/*! For license information please see main.js.LICENSE.txt */ (()=>{var __webpack_modules__={9669:(e,t,n)=>{e.exports=n(1609)},7970:(e,t,n)=>{"use strict";var i=n(4867),r=n(6026),s=n(4097),o=n(5327),a=n(3685),u=n(5687),c=n(938).http,l=n(938).https,h=n(7310),p=n(9796),f=n(7288).version,d=n(5061),m=n(481),g=n(5655),v=n(5263),y=/https:?/;function x(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var i=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+i}e.beforeRedirect=function(e){e.headers.host=e.host,x(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,n){var b;function E(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}var w=function(e){E(),t(e)},D=!1,C=function(e){E(),D=!0,n(e)},A=e.data,S=e.headers,k={};if(Object.keys(S).forEach((function(e){k[e.toLowerCase()]=e})),"user-agent"in k?S[k["user-agent"]]||delete S[k["user-agent"]]:S["User-Agent"]="axios/"+f,A&&!i.isStream(A)){if(Buffer.isBuffer(A));else if(i.isArrayBuffer(A))A=Buffer.from(new Uint8Array(A));else{if(!i.isString(A))return C(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));A=Buffer.from(A,"utf-8")}if(e.maxBodyLength>-1&&A.length>e.maxBodyLength)return C(d("Request body larger than maxBodyLength limit",e));k["content-length"]||(S["Content-Length"]=A.length)}var _=void 0;e.auth&&(_=(e.auth.username||"")+":"+(e.auth.password||""));var F=s(e.baseURL,e.url),T=h.parse(F),B=T.protocol||"http:";if(!_&&T.auth){var O=T.auth.split(":");_=(O[0]||"")+":"+(O[1]||"")}_&&k.authorization&&delete S[k.authorization];var L=y.test(B),I=L?e.httpsAgent:e.httpAgent;try{o(T.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){var N=new Error(t.message);N.config=e,N.url=e.url,N.exists=!0,C(N)}var M={path:o(T.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:S,agent:I,agents:{http:e.httpAgent,https:e.httpsAgent},auth:_};e.socketPath?M.socketPath=e.socketPath:(M.hostname=T.hostname,M.port=T.port);var P,j=e.proxy;if(!j&&!1!==j){var R=B.slice(0,-1)+"_proxy",$=process.env[R]||process.env[R.toUpperCase()];if($){var U=h.parse($),H=process.env.no_proxy||process.env.NO_PROXY,K=!0;if(H&&(K=!H.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&T.hostname.substr(T.hostname.length-e.length)===e||T.hostname===e)}))),K&&(j={host:U.hostname,port:U.port,protocol:U.protocol},U.auth)){var z=U.auth.split(":");j.auth={username:z[0],password:z[1]}}}}j&&(M.headers.host=T.hostname+(T.port?":"+T.port:""),x(M,j,B+"//"+T.hostname+(T.port?":"+T.port:"")+M.path));var J=L&&(!j||y.test(j.protocol));e.transport?P=e.transport:0===e.maxRedirects?P=J?u:a:(e.maxRedirects&&(M.maxRedirects=e.maxRedirects),P=J?l:c),e.maxBodyLength>-1&&(M.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(M.insecureHTTPParser=e.insecureHTTPParser);var X=P.request(M,(function(t){if(!X.aborted){var n=t,s=t.req||X;if(204!==t.statusCode&&"HEAD"!==s.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(p.createUnzip()),delete t.headers["content-encoding"]}var o={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:s};if("stream"===e.responseType)o.data=n,r(w,C,o);else{var a=[],u=0;n.on("data",(function(t){a.push(t),u+=t.length,e.maxContentLength>-1&&u>e.maxContentLength&&(D=!0,n.destroy(),C(d("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,s)))})),n.on("aborted",(function(){D||(n.destroy(),C(d("error request aborted",e,"ERR_REQUEST_ABORTED",s)))})),n.on("error",(function(t){X.aborted||C(m(t,e,null,s))})),n.on("end",(function(){try{var t=1===a.length?a[0]:Buffer.concat(a);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=i.stripBOM(t))),o.data=t}catch(t){C(m(t,e,t.code,o.request,o))}r(w,C,o)}))}}}));if(X.on("error",(function(t){X.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||C(m(t,e,null,X))})),X.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){var q=parseInt(e.timeout,10);if(isNaN(q))return void C(d("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",X));X.setTimeout(q,(function(){X.abort();var t;t=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";var n=e.transitional||g.transitional;C(d(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",X))}))}(e.cancelToken||e.signal)&&(b=function(e){X.aborted||(X.abort(),C(!e||e&&e.type?new v("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),i.isStream(A)?A.on("error",(function(t){C(m(t,e,null,X))})).pipe(X):X.end(A)}))}},5448:(e,t,n)=>{"use strict";var i=n(4867),r=n(6026),s=n(4372),o=n(5327),a=n(4097),u=n(4109),c=n(7985),l=n(5061),h=n(5655),p=n(5263);e.exports=function(e){return new Promise((function(t,n){var f,d=e.data,m=e.headers,g=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}i.isFormData(d)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(x+":"+b)}var E=a(e.baseURL,e.url);function w(){if(y){var i="getAllResponseHeaders"in y?u(y.getAllResponseHeaders()):null,s={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y};r((function(e){t(e),v()}),(function(e){n(e),v()}),s),y=null}}if(y.open(e.method.toUpperCase(),o(E,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(w)},y.onabort=function(){y&&(n(l("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(l("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||h.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,i.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},i.isStandardBrowserEnv()){var D=(e.withCredentials||c(E))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;D&&(m[e.xsrfHeaderName]=D)}"setRequestHeader"in y&&i.forEach(m,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){y&&(n(!e||e&&e.type?new p("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),d||(d=null),y.send(d)}))}},1609:(e,t,n)=>{"use strict";var i=n(4867),r=n(1849),s=n(321),o=n(7185),a=function e(t){var n=new s(t),a=r(s.prototype.request,n);return i.extend(a,s.prototype,n),i.extend(a,n),a.create=function(n){return e(o(t,n))},a}(n(5655));a.Axios=s,a.Cancel=n(5263),a.CancelToken=n(4972),a.isCancel=n(6502),a.VERSION=n(7288).version,a.all=function(e){return Promise.all(e)},a.spread=n(8713),a.isAxiosError=n(6268),e.exports=a,e.exports.default=a},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var i=n(5263);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var i=n(4867),r=n(5327),s=n(782),o=n(3572),a=n(7185),u=n(4875),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new s,response:new s}}l.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var s,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!r){var h=[o,void 0];for(Array.prototype.unshift.apply(h,i),h=h.concat(l),s=Promise.resolve(t);h.length;)s=s.then(h.shift(),h.shift());return s}for(var p=t;i.length;){var f=i.shift(),d=i.shift();try{p=f(p)}catch(e){d(e);break}}try{s=o(p)}catch(e){return Promise.reject(e)}for(;l.length;)s=s.then(l.shift(),l.shift());return s},l.prototype.getUri=function(e){return e=a(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,i){return this.request(a(i||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var i=n(4867);function r(){this.handlers=[]}r.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},4097:(e,t,n)=>{"use strict";var i=n(1793),r=n(7303);e.exports=function(e,t){return e&&!i(t)?r(e,t):t}},5061:(e,t,n)=>{"use strict";var i=n(481);e.exports=function(e,t,n,r,s){var o=new Error(e);return i(o,t,n,r,s)}},3572:(e,t,n)=>{"use strict";var i=n(4867),r=n(8527),s=n(6502),o=n(5655),a=n(5263);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return u(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(u(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var i=n(4867);e.exports=function(e,t){t=t||{};var n={};function r(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function o(e){if(!i.isUndefined(t[e]))return r(void 0,t[e])}function a(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function u(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return i.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||s,r=t(e);i.isUndefined(r)&&t!==u||(n[e]=r)})),n}},6026:(e,t,n)=>{"use strict";var i=n(5061);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var i=n(4867),r=n(5655);e.exports=function(e,t,n){var s=this||r;return i.forEach(n,(function(n){e=n.call(s,e,t)})),e}},5655:(e,t,n)=>{"use strict";var i=n(4867),r=n(6016),s=n(481),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?u=n(5448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(u=n(7970)),u),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(0,JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){c.headers[e]=i.merge(o)})),e.exports=c},7288:e=>{e.exports={version:"0.26.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i{"use strict";var i=n(4867);function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(i.isURLSearchParams(t))s=t.toString();else{var o=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),o.push(r(t)+"="+r(e))})))})),s=o.join("&")}if(s){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var i=n(4867);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,s,o){var a=[];a.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(r)&&a.push("path="+r),i.isString(s)&&a.push("domain="+s),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{"use strict";var i=n(4867);e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var i=n(4867);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var i=n(4867);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},4109:(e,t,n)=>{"use strict";var i=n(4867),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,o={};return e?(i.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=i.trim(e.substr(0,s)).toLowerCase(),n=i.trim(e.substr(s+1)),t){if(o[t]&&r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var i=n(7288).version,r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw new Error(r(i," has been removed"+(t?" in "+t:"")));return t&&!s[i]&&(s[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var i=Object.keys(e),r=i.length;r-- >0;){var s=i[r],o=t[s];if(o){var a=e[s],u=void 0===a||o(a,s,e);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:r}},4867:(e,t,n)=>{"use strict";var i=n(1849),r=Object.prototype.toString;function s(e){return Array.isArray(e)}function o(e){return void 0===e}function a(e){return"[object ArrayBuffer]"===r.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==r.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===r.call(e)}function h(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,i=e.length;n>>2]>>>24-s%4*8&255;t[i+s>>>2]|=o<<24-(i+s)%4*8}else for(var a=0;a>>2]=n[a>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=u.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-r%4*8&255;i.push((s>>>4).toString(16)),i.push((15&s).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new c.init(n,t/2)}},p=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(s))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new c.init(n,t)}},f=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,i=this._data,r=i.words,s=i.sigBytes,o=this.blockSize,a=s/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,l=e.min(4*u,s);if(u){for(var h=0;h>>24)|4278255360&(r<<24|r>>>8)}var s=this._hash.words,o=e[t+0],u=e[t+1],f=e[t+2],d=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],x=e[t+8],b=e[t+9],E=e[t+10],w=e[t+11],D=e[t+12],C=e[t+13],A=e[t+14],S=e[t+15],k=s[0],_=s[1],F=s[2],T=s[3];k=c(k,_,F,T,o,7,a[0]),T=c(T,k,_,F,u,12,a[1]),F=c(F,T,k,_,f,17,a[2]),_=c(_,F,T,k,d,22,a[3]),k=c(k,_,F,T,m,7,a[4]),T=c(T,k,_,F,g,12,a[5]),F=c(F,T,k,_,v,17,a[6]),_=c(_,F,T,k,y,22,a[7]),k=c(k,_,F,T,x,7,a[8]),T=c(T,k,_,F,b,12,a[9]),F=c(F,T,k,_,E,17,a[10]),_=c(_,F,T,k,w,22,a[11]),k=c(k,_,F,T,D,7,a[12]),T=c(T,k,_,F,C,12,a[13]),F=c(F,T,k,_,A,17,a[14]),k=l(k,_=c(_,F,T,k,S,22,a[15]),F,T,u,5,a[16]),T=l(T,k,_,F,v,9,a[17]),F=l(F,T,k,_,w,14,a[18]),_=l(_,F,T,k,o,20,a[19]),k=l(k,_,F,T,g,5,a[20]),T=l(T,k,_,F,E,9,a[21]),F=l(F,T,k,_,S,14,a[22]),_=l(_,F,T,k,m,20,a[23]),k=l(k,_,F,T,b,5,a[24]),T=l(T,k,_,F,A,9,a[25]),F=l(F,T,k,_,d,14,a[26]),_=l(_,F,T,k,x,20,a[27]),k=l(k,_,F,T,C,5,a[28]),T=l(T,k,_,F,f,9,a[29]),F=l(F,T,k,_,y,14,a[30]),k=h(k,_=l(_,F,T,k,D,20,a[31]),F,T,g,4,a[32]),T=h(T,k,_,F,x,11,a[33]),F=h(F,T,k,_,w,16,a[34]),_=h(_,F,T,k,A,23,a[35]),k=h(k,_,F,T,u,4,a[36]),T=h(T,k,_,F,m,11,a[37]),F=h(F,T,k,_,y,16,a[38]),_=h(_,F,T,k,E,23,a[39]),k=h(k,_,F,T,C,4,a[40]),T=h(T,k,_,F,o,11,a[41]),F=h(F,T,k,_,d,16,a[42]),_=h(_,F,T,k,v,23,a[43]),k=h(k,_,F,T,b,4,a[44]),T=h(T,k,_,F,D,11,a[45]),F=h(F,T,k,_,S,16,a[46]),k=p(k,_=h(_,F,T,k,f,23,a[47]),F,T,o,6,a[48]),T=p(T,k,_,F,y,10,a[49]),F=p(F,T,k,_,A,15,a[50]),_=p(_,F,T,k,g,21,a[51]),k=p(k,_,F,T,D,6,a[52]),T=p(T,k,_,F,d,10,a[53]),F=p(F,T,k,_,E,15,a[54]),_=p(_,F,T,k,u,21,a[55]),k=p(k,_,F,T,x,6,a[56]),T=p(T,k,_,F,S,10,a[57]),F=p(F,T,k,_,v,15,a[58]),_=p(_,F,T,k,C,21,a[59]),k=p(k,_,F,T,m,6,a[60]),T=p(T,k,_,F,w,10,a[61]),F=p(F,T,k,_,f,15,a[62]),_=p(_,F,T,k,b,21,a[63]),s[0]=s[0]+k|0,s[1]=s[1]+_|0,s[2]=s[2]+F|0,s[3]=s[3]+T|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var s=e.floor(i/4294967296),o=i;n[15+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,i,r,s,o){var a=e+(t&n|~t&i)+r+o;return(a<>>32-s)+t}function l(e,t,n,i,r,s,o){var a=e+(t&i|n&~i)+r+o;return(a<>>32-s)+t}function h(e,t,n,i,r,s,o){var a=e+(t^n^i)+r+o;return(a<>>32-s)+t}function p(e,t,n,i,r,s,o){var a=e+(n^(t|~i))+r+o;return(a<>>32-s)+t}t.MD5=s._createHelper(u),t.HmacMD5=s._createHmacHelper(u)}(Math),i.MD5)},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,r,s,o=null;function a(...e){if(!a.enabled)return;const i=a,r=Number(new Date),s=r-(n||r);i.diff=s,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";o++;const s=t.formatters[r];if("function"==typeof s){const t=e[o];n=s.call(i,t),e.splice(o,1),o--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=i,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==t.namespaces&&(r=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t=0;--r){var s=this.leading[r];t.end.offset>=s.start&&(n.unshift(s.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(s=this.stack[this.stack.length-1])&&s.start>=e.start.offset;)t=s.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=e.start.offset&&(n.unshift(s.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=n(5),a=n(6),u=n(7),c=n(8),l=n(13),h=n(14);function p(e){var t;switch(e.type){case a.JSXSyntax.JSXIdentifier:t=e.name;break;case a.JSXSyntax.JSXNamespacedName:var n=e;t=p(n.namespace)+":"+p(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=e;t=p(i.object)+"."+p(i.property)}return t}l.TokenName[100]="JSXIdentifier",l.TokenName[101]="JSXText";var f=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:r="#"===a;break;case 3:r&&(n=(o="x"===a)||s.Character.isDecimalDigit(a.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!s.Character.isDecimalDigit(a.charCodeAt(0))))&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&i&&t.length>2){var u=t.substr(1,t.length-2);r&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):r||o||!h.XHTMLEntities[u]||(t=h.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:a=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)i+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),o=this.scanner.source.charCodeAt(this.scanner.index+2),a=46===r&&46===o?"...":".";return t=this.scanner.index,this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(r,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;s=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(s),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new o.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(c.Parser);t.JSXParser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.JSXClosingElement=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXElement=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXEmptyExpression=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXExpressionContainer=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXIdentifier=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXMemberExpression=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXAttribute=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXNamespacedName=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXOpeningElement=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXSpreadAttribute=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXText=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);t.ArrayExpression=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayPattern=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.AssignmentExpression=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentPattern=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AsyncArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncFunctionDeclaration=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AwaitExpression=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.BinaryExpression=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BlockStatement=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BreakStatement=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.CallExpression=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CatchClause=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.ClassBody=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassDeclaration=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ComputedMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ConditionalExpression=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ContinueStatement=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.DebuggerStatement=function(){this.type=i.Syntax.DebuggerStatement};t.Directive=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.DoWhileStatement=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.EmptyStatement=function(){this.type=i.Syntax.EmptyStatement};t.ExportAllDeclaration=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportDefaultDeclaration=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportNamedDeclaration=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportSpecifier=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExpressionStatement=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ForInStatement=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForOfStatement=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForStatement=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.FunctionDeclaration=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.Identifier=function(e){this.type=i.Syntax.Identifier,this.name=e};t.IfStatement=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.ImportDeclaration=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDefaultSpecifier=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportNamespaceSpecifier=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportSpecifier=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.LabeledStatement=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.Literal=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.MetaProperty=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MethodDefinition=function(e,t,n,r,s){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=s};t.Module=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.NewExpression=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.ObjectExpression=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectPattern=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.Property=function(e,t,n,r,s,o){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=s,this.shorthand=o};t.RegexLiteral=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RestElement=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.ReturnStatement=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.Script=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.SequenceExpression=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SpreadElement=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.StaticMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.Super=function(){this.type=i.Syntax.Super};t.SwitchCase=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchStatement=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.TaggedTemplateExpression=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TemplateElement=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateLiteral=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.ThisExpression=function(){this.type=i.Syntax.ThisExpression};t.ThrowStatement=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.TryStatement=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.UnaryExpression=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UpdateExpression=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.VariableDeclaration=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclarator=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.WhileStatement=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WithStatement=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.YieldExpression=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),s=n(11),o=n(7),a=n(12),u=n(2),c=n(13),l="ArrowParameterPlaceHolder",h=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new o.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new o.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new o.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new o.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,s.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new o.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,a=null,u=!1,c=!1,l=!1,h=!1;if(3===i.type){var p=i.value;this.nextToken(),u=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(p))}else this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&f)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&f)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&f)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!h)!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===i.type)if(p=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),l=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new o.AssignmentPattern(p,d))}else l=!0,a=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(t,r,u,a,c,l))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new o.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new o.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s")||this.expect("=>"),this.context.isBindingElement=!1,s=0;s")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:l,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(s=0;s")){for(var u=0;u0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[s,n.value,a],c=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&i<=c[c.length-1];){a=u.pop();var l=u.pop();c.pop(),s=u.pop(),r.pop();var h=this.startNode(r[r.length-1]);u.push(this.finalize(h,new o.BinaryExpression(l,s,a)))}u.push(this.nextToken().value),c.push(i),r.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=u.length-1;t=u[p];for(var f=r.pop();p>1;){var d=r.pop(),m=f&&f.lineStart;h=this.startNode(d,m),l=u[p-1],t=this.finalize(h,new o.BinaryExpression(l,u[p-2],t)),p-=2,f=d}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,a=this.reinterpretAsCoverFormalsList(e);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var p=this.context.allowYield,f=this.context.await;this.context.allowYield=!0,this.context.await=r;var d=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=g}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=m.type!==u.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),e=r?this.finalize(d,new o.AsyncArrowFunctionExpression(a.params,m,v)):this.finalize(d,new o.ArrowFunctionExpression(a.params,m,v)),this.context.strict=c,this.context.allowStrictDirective=h,this.context.allowYield=p,this.context.await=f}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var x=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.AssignmentExpression(x,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new o.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new o.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new o.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),s=!1,a=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(r,new o.Identifier(u.value));if(this.match("=")){e.push(u),a=!0,this.nextToken();var l=this.parseAssignmentExpression();i=this.finalize(this.startNode(u),new o.AssignmentPattern(c,l))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(u),a=!0,i=c)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new o.Property("init",n,s,i,!1,a))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,s))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new o.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new o.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new o.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new o.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new o.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,a=null,c=!0,l=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===p.length&&this.matchKeyword("in")){var f=p[0];f.init&&(f.id.type===u.Syntax.ArrayPattern||f.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(p,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(p,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,c=!1):(i=this.finalize(i,new o.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var d=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(d,{inFor:!0}),this.context.allowIn=h,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(p,d)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(p,d)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,c=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(p,d)))):(i=this.finalize(i,new o.Identifier(d)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var m=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,c=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(m),new o.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(l,new o.ForStatement(i,r,a,n)):c?this.finalize(l,new o.ForInStatement(e,t,n)):this.finalize(l,new o.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new o.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new o.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new o.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),i.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new o.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,l=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,s.Messages.StrictFunction):l.generator&&this.tolerateUnexpectedToken(c,s.Messages.GeneratorInLegacyContext),a=l}else a=this.parseStatement();delete this.context.labelSet[r],e=new o.LabeledStatement(i,a)}else this.consumeSemicolon(),e=new o.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r0&&this.tolerateError(s.Messages.BadGetterArity);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(s.Messages.BadSetterArity):n.params[0]instanceof o.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new o.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,a=null,u=!1,c=!1,l=!1,h=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,l=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(h=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,s.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&f?(i="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===t.value&&f&&(i="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===t.type&&"*"===t.value&&f&&(i="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0),!i&&r&&this.match("(")&&(i="init",a=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),u||(l&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,s.Messages.StaticPrototype),!l&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!c||a&&a.generator)&&this.throwUnexpectedToken(t,s.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,s.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,u,a,i,l))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new o.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(t,new o.ClassDeclaration(i,r,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new o.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new o.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new o.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new o.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new o.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new o.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null));else{var a=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),a.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):c?(i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new o.ExportNamedDeclaration(null,a,u))}return e},e}();t.Parser=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,s=this.constructError(r,n);return s.index=e,s.lineNumber=t,s.description=i,s},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",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",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),s=n(11);function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function a(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(s)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(o)}return 13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(o)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(s)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},s={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(s)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=a(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+a(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+a(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),s=n(13),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t{"use strict";var i=n(1833);function r(e,t){for(var n in t)s(t,n)&&(e[n]=t[n])}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e){i(e)||(e={});for(var t=arguments.length,n=1;n{var i;e.exports=function(){if(!i){try{i=n(1227)("follow-redirects")}catch(e){}"function"!=typeof i&&(i=function(){})}i.apply(null,arguments)}},938:(e,t,n)=>{var i=n(7310),r=i.URL,s=n(3685),o=n(5687),a=n(2781).Writable,u=n(9491),c=n(2261),l=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);l.forEach((function(e){h[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}}));var p=E("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),f=E("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),d=E("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m=E("ERR_STREAM_WRITE_AFTER_END","write after end");function g(e,t){a.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function v(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(s){var o=s+":",a=n[o]=e[s],l=t[s]=Object.create(a);Object.defineProperties(l,{request:{value:function(e,s,a){if("string"==typeof e){var l=e;try{e=x(new r(l))}catch(t){e=i.parse(l)}}else r&&e instanceof r?e=x(e):(a=s,s=e,e={protocol:o});return"function"==typeof s&&(a=s,s=null),(s=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,s)).nativeProtocols=n,u.equal(s.protocol,o,"protocol mismatch"),c("options",s),new g(s,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var i=l.request(e,t,n);return i.end(),i},configurable:!0,enumerable:!0,writable:!0}})})),t}function y(){}function x(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function b(e,t){var n;for(var i in t)e.test(i)&&(n=t[i],delete t[i]);return null==n?void 0:String(n).trim()}function E(e,t){function n(e){Error.captureStackTrace(this,this.constructor),e?(this.message=t+": "+e.message,this.cause=e):this.message=t}return n.prototype=new Error,n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n.prototype.code=e,n}function w(e){for(var t=0;t=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(w(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new f);else{((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],b(/^content-/i,this._options.headers));var r,s=b(/^host$/i,this._options.headers),o=i.parse(this._currentUrl),a=s||o.host,u=/^\w+:/.test(n)?this._currentUrl:i.format(Object.assign(o,{host:a}));try{r=i.resolve(u,n)}catch(e){return void this.emit("error",new p(e))}c("redirecting to",r),this._isRedirect=!0;var l=i.parse(r);if(Object.assign(this._options,l),(l.protocol!==o.protocol&&"https:"!==l.protocol||l.host!==a&&!function(e,t){const n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(l.host,a))&&b(/^(?:authorization|cookie)$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var h={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,h)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new p(e))}}},e.exports=v({http:s,https:o}),e.exports.wrap=v},9675:(e,t,n)=>{"use strict";const i=n(7147),r=n(1006),s=n(5294),o=n(9809),a=n(8497),u=n(6378),c=n(8181),l=n(9254),h=n(5707);function p(e,t){if(""===e)return{data:{},content:e,excerpt:"",orig:e};let n=c(e);const i=p.cache[n.content];if(!t){if(i)return n=Object.assign({},i),n.orig=i.orig,n;p.cache[n.content]=n}return function(e,t){const n=s(t),i=n.delimiters[0],o="\n"+n.delimiters[1];let u=e.content;n.language&&(e.language=n.language);const c=i.length;if(!h.startsWith(u,i,c))return a(e,n),e;if(u.charAt(c)===i.slice(-1))return e;u=u.slice(c);const f=u.length,d=p.language(u,n);d.name&&(e.language=d.name,u=u.slice(d.raw.length));let m=u.indexOf(o);return-1===m&&(m=f),e.matter=u.slice(0,m),""===e.matter.replace(/^\s*#[^\n]+/gm,"").trim()?(e.isEmpty=!0,e.empty=e.content,e.data={}):e.data=l(e.language,e.matter,n),m===f?e.content="":(e.content=u.slice(m+o.length),"\r"===e.content[0]&&(e.content=e.content.slice(1)),"\n"===e.content[0]&&(e.content=e.content.slice(1))),a(e,n),(!0===n.sections||"function"==typeof n.section)&&r(e,n.section),e}(n,t)}p.engines=u,p.stringify=function(e,t,n){return"string"==typeof e&&(e=p(e,n)),o(e,t,n)},p.read=function(e,t){const n=p(i.readFileSync(e,"utf8"),t);return n.path=e,n},p.test=function(e,t){return h.startsWith(e,s(t).delimiters[0])},p.language=function(e,t){const n=s(t).delimiters[0];p.test(e)&&(e=e.slice(n.length));const i=e.slice(0,e.search(/\r?\n/));return{raw:i,name:i?i.trim():""}},p.cache={},p.clearCache=function(){p.cache={}},e.exports=p},5294:(e,t,n)=>{"use strict";const i=n(6378),r=n(5707);e.exports=function(e){const t=Object.assign({},e);return t.delimiters=r.arrayify(t.delims||t.delimiters||"---"),1===t.delimiters.length&&t.delimiters.push(t.delimiters[0]),t.language=(t.language||t.lang||"yaml").toLowerCase(),t.engines=Object.assign({},i,t.parsers,t.engines),t}},8193:e=>{"use strict";e.exports=function(e,t){let n=t.engines[e]||t.engines[function(e){switch(e.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return e}}(e)];if(void 0===n)throw new Error('gray-matter engine "'+e+'" is not registered');return"function"==typeof n&&(n={parse:n}),n}},6378:(module,exports,__webpack_require__)=>{"use strict";const yaml=__webpack_require__(4351),engines=exports=module.exports;engines.yaml={parse:yaml.safeLoad.bind(yaml),stringify:yaml.safeDump.bind(yaml)},engines.json={parse:JSON.parse.bind(JSON),stringify:function(e,t){const n=Object.assign({replacer:null,space:2},t);return JSON.stringify(e,n.replacer,n.space)}},engines.javascript={parse:function parse(str,options,wrap){try{return!1!==wrap&&(str="(function() {\nreturn "+str.trim()+";\n}());"),eval(str)||{}}catch(e){if(!1!==wrap&&/(unexpected|identifier)/i.test(e.message))return parse(str,options,!1);throw new SyntaxError(e)}},stringify:function(){throw new Error("stringifying JavaScript is not supported")}}},8497:(e,t,n)=>{"use strict";const i=n(5294);e.exports=function(e,t){const n=i(t);if(null==e.data&&(e.data={}),"function"==typeof n.excerpt)return n.excerpt(e,n);const r=e.data.excerpt_separator||n.excerpt_separator;if(null==r&&(!1===n.excerpt||null==n.excerpt))return e;const s="string"==typeof n.excerpt?n.excerpt:r||n.delimiters[0],o=e.content.indexOf(s);return-1!==o&&(e.excerpt=e.content.slice(0,o)),e}},9254:(e,t,n)=>{"use strict";const i=n(8193),r=n(5294);e.exports=function(e,t,n){const s=r(n),o=i(e,s);if("function"!=typeof o.parse)throw new TypeError('expected "'+e+'.parse" to be a function');return o.parse(t,s)}},9809:(e,t,n)=>{"use strict";const i=n(6401),r=n(8193),s=n(5294);function o(e){return"\n"!==e.slice(-1)?e+"\n":e}e.exports=function(e,t,n){if(null==t&&null==n)switch(i(e)){case"object":t=e.data,n={};break;case"string":return e;default:throw new TypeError("expected file to be a string or object")}const a=e.content,u=s(n);if(null==t){if(!u.data)return e;t=u.data}const c=e.language||u.language,l=r(c,u);if("function"!=typeof l.stringify)throw new TypeError('expected "'+c+'.stringify" to be a function');t=Object.assign({},e.data,t);const h=u.delimiters[0],p=u.delimiters[1],f=l.stringify(t,n).trim();let d="";return"{}"!==f&&(d=o(h)+o(f)+o(p)),"string"==typeof e.excerpt&&""!==e.excerpt&&-1===a.indexOf(e.excerpt.trim())&&(d+=o(e.excerpt)+o(p)),d+o(a)}},8181:(e,t,n)=>{"use strict";const i=n(6401),r=n(9809),s=n(5707);e.exports=function(e){return"object"!==i(e)&&(e={content:e}),"object"!==i(e.data)&&(e.data={}),e.contents&&null==e.content&&(e.content=e.contents),s.define(e,"orig",s.toBuffer(e.content)),s.define(e,"language",e.language||""),s.define(e,"matter",e.matter||""),s.define(e,"stringify",(function(t,n){return n&&n.language&&(e.language=n.language),r(e,t,n)})),e.content=s.toString(e.content),e.isEmpty=!1,e.excerpt="",e}},5707:(e,t,n)=>{"use strict";const i=n(7822),r=n(6401);t.define=function(e,t,n){Reflect.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})},t.isBuffer=function(e){return"buffer"===r(e)},t.isObject=function(e){return"object"===r(e)},t.toBuffer=function(e){return"string"==typeof e?Buffer.from(e):e},t.toString=function(e){if(t.isBuffer(e))return i(String(e));if("string"!=typeof e)throw new TypeError("expected input to be a string or buffer");return i(e)},t.arrayify=function(e){return e?Array.isArray(e)?e:[e]:[]},t.startsWith=function(e,t,n){return"number"!=typeof n&&(n=t.length),e.slice(0,n)===t}},4351:(e,t,n)=>{"use strict";var i=n(2189);e.exports=i},2189:(e,t,n)=>{"use strict";var i=n(137),r=n(7049);function s(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(2910),e.exports.Schema=n(6015),e.exports.FAILSAFE_SCHEMA=n(4662),e.exports.JSON_SCHEMA=n(6478),e.exports.CORE_SCHEMA=n(130),e.exports.DEFAULT_SAFE_SCHEMA=n(1039),e.exports.DEFAULT_FULL_SCHEMA=n(9705),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=r.dump,e.exports.safeDump=r.safeDump,e.exports.YAMLException=n(6473),e.exports.MINIMAL_SCHEMA=n(4662),e.exports.SAFE_SCHEMA=n(1039),e.exports.DEFAULT_SCHEMA=n(9705),e.exports.scan=s("scan"),e.exports.parse=s("parse"),e.exports.compose=s("compose"),e.exports.addConstructor=s("addConstructor")},3793:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,i="";for(n=0;n{"use strict";var i=n(3793),r=n(6473),s=n(9705),o=n(1039),a=Object.prototype.toString,u=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},l=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function h(e){var t,n,s;if(t=e.toString(16).toUpperCase(),e<=255)n="x",s=2;else if(e<=65535)n="u",s=4;else{if(!(e<=4294967295))throw new r("code point within a string may not be greater than 0xFFFFFFFF");n="U",s=8}return"\\"+n+i.repeat("0",s-t.length)+t}function p(e){this.schema=e.schema||s,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=i.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,s,o,a,c;if(null===t)return{};for(n={},r=0,s=(i=Object.keys(t)).length;r-1&&n>=e.flowLevel;switch(function(e,t,n,i,r){var s,o,a,u,c=!1,l=!1,h=-1!==i,p=-1,f=g(u=e.charCodeAt(0))&&65279!==u&&!m(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&!m(e.charCodeAt(e.length-1));if(t)for(s=0;s0?e.charCodeAt(s-1):null,f=f&&v(o,a)}else{for(s=0;si&&" "!==e[p+1],p=s);else if(!g(o))return 5;a=s>0?e.charCodeAt(s-1):null,f=f&&v(o,a)}l=l||h&&s-p-1>i&&" "!==e[p+1]}return c||l?n>9&&y(e)?5:l?4:3:f&&!r(e)?1:2}(t,a,e.indent,o,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+b(t,e.indent)+E(f(function(e,t){for(var n,i,r,s=/(\n+)([^\n]*)/g,o=(r=-1!==(r=e.indexOf("\n"))?r:e.length,s.lastIndex=r,w(e.slice(0,r),t)),a="\n"===e[0]||" "===e[0];i=s.exec(e);){var u=i[1],c=i[2];n=" "===c[0],o+=u+(a||n||""===c?"":"\n")+w(c,t),a=n}return o}(t,o),s));case 5:return'"'+function(e){for(var t,n,i,r="",s=0;s=55296&&t<=56319&&(n=e.charCodeAt(s+1))>=56320&&n<=57343?(r+=h(1024*(t-55296)+n-56320+65536),s++):r+=!(i=c[t])&&g(t)?e[s]:i||h(t);return r}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function b(e,t){var n=y(e)?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function E(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function w(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,s=0,o=0,a=0,u="";n=r.exec(e);)(a=n.index)-s>t&&(i=o>s?o:a,u+="\n"+e.slice(s,i),s=i+1),o=a;return u+="\n",e.length-s>t&&o>s?u+=e.slice(s,o)+"\n"+e.slice(o+1):u+=e.slice(s),u.slice(1)}function D(e,t,n){var i,s,o,c,l,h;for(o=0,c=(s=n?e.explicitTypes:e.implicitTypes).length;o tag resolver accepts not "'+h+'" style');i=l.represent[h](t,h)}e.dump=i}return!0}return!1}function C(e,t,n,i,s,o){e.tag=null,e.dump=n,D(e,n,!1)||D(e,n,!0);var u=a.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var c,l,h="[object Object]"===u||"[object Array]"===u;if(h&&(l=-1!==(c=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(s=!1),l&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(h&&l&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===u)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var s,o,a,u,c,l,h="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");for(s=0,o=f.length;s1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=d(e,t)),C(e,t+1,u,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",h+=l+=e.dump));e.tag=p,e.dump=h||"{}"}(e,t,e.dump,s),l&&(e.dump="&ref_"+c+e.dump)):(function(e,t,n){var i,r,s,o,a,u="",c=e.tag,l=Object.keys(n);for(i=0,r=l.length;i1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),C(e,t,o,!1,!1)&&(u+=a+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),l&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===u){var p=e.noArrayIndent&&t>0?t-1:t;i&&0!==e.dump.length?(function(e,t,n,i){var r,s,o="",a=e.tag;for(r=0,s=n.length;r "+e.dump)}return!0}function A(e,t){var n,i,r=[],s=[];for(S(e,r,s),n=0,i=s.length;n{"use strict";function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},137:(e,t,n)=>{"use strict";var i=n(3793),r=n(6473),s=n(6276),o=n(1039),a=n(9705),u=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,l=/[\x85\u2028\u2029]/,h=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,f=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function v(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function x(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function b(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function E(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var w=new Array(256),D=new Array(256),C=0;C<256;C++)w[C]=b(C)?1:0,D[C]=b(C);function A(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function S(e,t){return new r(t,new s(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function k(e,t){throw S(e,t)}function _(e,t){e.onWarning&&e.onWarning.call(null,S(e,t))}var F={YAML:function(e,t,n){var i,r,s;null!==e.version&&k(e,"duplication of %YAML directive"),1!==n.length&&k(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&k(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),s=parseInt(i[2],10),1!==r&&k(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,1!==s&&2!==s&&_(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&k(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],p.test(i)||k(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,i)&&k(e,'there is a previously declared suffix for "'+i+'" tag handle'),f.test(r)||k(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};function T(e,t,n,i){var r,s,o,a;if(t1&&(e.result+=i.repeat("\n",t-1))}function P(e,t){var n,i,r=e.tag,s=e.anchor,o=[],a=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),i=e.input.charCodeAt(e.position);0!==i&&45===i&&v(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,I(e,!0,-1)&&e.lineIndent<=t)o.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,$(e,t,3,!1,!0),o.push(e.result),I(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)k(e,"bad indentation of a sequence entry");else if(e.lineIndentt?b=1:e.lineIndent===t?b=0:e.lineIndentt?b=1:e.lineIndent===t?b=0:e.lineIndentt)&&($(e,t,4,!0,r)&&(m?f=e.result:d=e.result),m||(O(e,l,h,p,f,d,s,o),p=f=d=null),I(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)k(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===s?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?k(e,"repeat of an indentation width identifier"):(h=t+s-1,l=!0)}if(g(o)){do{o=e.input.charCodeAt(++e.position)}while(g(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!m(o)&&0!==o)}for(;0!==o;){for(L(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!l||e.lineIndenth&&(h=e.lineIndent),m(o))p++;else{if(e.lineIndent0){for(r=o,s=0;r>0;r--)(o=x(a=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+o:k(e,"expected hexadecimal character");e.result+=E(s),e.position++}else k(e,"unknown escape sequence");n=i=e.position}else m(a)?(T(e,n,i,!0),M(e,I(e,!1,t)),n=i=e.position):e.position===e.lineStart&&N(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?A=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!v(i)&&!y(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&k(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),u.call(e.anchorMap,n)||k(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],I(e,!0,-1),!0}(e)?(A=!0,null===e.tag&&null===e.anchor||k(e,"alias node should not have any properties")):function(e,t,n){var i,r,s,o,a,u,c,l,h=e.kind,p=e.result;if(v(l=e.input.charCodeAt(e.position))||y(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(v(i=e.input.charCodeAt(e.position+1))||n&&y(i)))return!1;for(e.kind="scalar",e.result="",r=s=e.position,o=!1;0!==l;){if(58===l){if(v(i=e.input.charCodeAt(e.position+1))||n&&y(i))break}else if(35===l){if(v(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&N(e)||n&&y(l))break;if(m(l)){if(a=e.line,u=e.lineStart,c=e.lineIndent,I(e,!1,-1),e.lineIndent>=t){o=!0,l=e.input.charCodeAt(e.position);continue}e.position=s,e.line=a,e.lineStart=u,e.lineIndent=c;break}}o&&(T(e,r,s,!1),M(e,e.line-a),r=s=e.position,o=!1),g(l)||(s=e.position+1),l=e.input.charCodeAt(++e.position)}return T(e,r,s,!1),!!e.result||(e.kind=h,e.result=p,!1)}(e,f,1===n)&&(A=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===b&&(A=c&&P(e,d))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&k(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,h=e.implicitTypes.length;l tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):k(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||A}function U(e){var t,n,i,r,s=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(I(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(o=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!v(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&k(e,"directive name must not be less than one character in length");0!==r;){for(;g(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!m(r));break}if(m(r))break;for(t=e.position;0!==r&&!v(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&L(e),u.call(F,n)?F[n](e,n,i):_(e,'unknown document directive "'+n+'"')}I(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,I(e,!0,-1)):o&&k(e,"directives end mark is expected"),$(e,e.lineIndent-1,4,!1,!0),I(e,!0,-1),e.checkLineBreaks&&l.test(e.input.slice(s,e.position))&&_(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&N(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,I(e,!0,-1)):e.position{"use strict";var i=n(3793);function r(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}r.prototype.getSnippet=function(e,t){var n,r,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",r=this.position;r>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(r,o),i.repeat(" ",e)+n+a+s+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=r},6015:(e,t,n)=>{"use strict";var i=n(3793),r=n(6473),s=n(2910);function o(e,t,n){var i=[];return e.include.forEach((function(e){n=o(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&i.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===i.indexOf(t)}))}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=o(this,"implicit",[]),this.compiledExplicit=o(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e{"use strict";var i=n(6015);e.exports=new i({include:[n(6478)]})},9705:(e,t,n)=>{"use strict";var i=n(6015);e.exports=i.DEFAULT=new i({include:[n(1039)],explicit:[n(4516),n(8750),n(3929)]})},1039:(e,t,n)=>{"use strict";var i=n(6015);e.exports=new i({include:[n(130)],implicit:[n(312),n(7431)],explicit:[n(1393),n(310),n(2006),n(8274)]})},4662:(e,t,n)=>{"use strict";var i=n(6015);e.exports=new i({explicit:[n(9175),n(8453),n(2642)]})},6478:(e,t,n)=>{"use strict";var i=n(6015);e.exports=new i({include:[n(4662)],implicit:[n(507),n(5775),n(8471),n(9470)]})},2910:(e,t,n)=>{"use strict";var i=n(6473),r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];e.exports=function(e,t){var n,o;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===r.indexOf(t))throw new i('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,o={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){o[String(t)]=e}))})),o),-1===s.indexOf(this.kind))throw new i('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},1393:(e,t,n)=>{"use strict";var i;try{i=n(4300).Buffer}catch(e){}var r=n(2910),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=s;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=s,u=0,c=[];for(t=0;t>16&255),c.push(u>>8&255),c.push(255&u)),u=u<<6|a.indexOf(r.charAt(t));return 0==(n=o%4*6)?(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)):18===n?(c.push(u>>10&255),c.push(u>>2&255)):12===n&&c.push(u>>4&255),i?i.from?i.from(c):new i(c):c},predicate:function(e){return i&&i.isBuffer(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=s;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0==(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}})},5775:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},9470:(e,t,n)=>{"use strict";var i=n(3793),r=n(2910),s=new RegExp("^(?:[-+]?(?:0|[1-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))$"),o=/^[-+]?[0-9]+e/;e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!s.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){r.unshift(parseFloat(e,10))})),t=0,i=1,r.forEach((function(e){t+=e*i,i*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),o.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},8471:(e,t,n)=>{"use strict";var i=n(3793),r=n(2910);function s(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=e.length,r=0,a=!1;if(!i)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===i)return!0;if("b"===(t=e[++r])){for(r++;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},3929:(e,t,n)=>{"use strict";var i;try{i=n(1072)}catch(e){"undefined"!=typeof window&&(i=window.esprima)}var r=n(2910);e.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=i.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",r=i.parse(n,{range:!0}),s=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"ArrowFunctionExpression"!==r.body[0].expression.type&&"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach((function(e){s.push(e.name)})),t=r.body[0].expression.body.range,"BlockStatement"===r.body[0].expression.body.type?new Function(s,n.slice(t[0]+1,t[1]-1)):new Function(s,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},8750:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},4516:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},2642:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},7431:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},507:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},310:(e,t,n)=>{"use strict";var i=n(2910),r=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,a,u=[],c=e;for(t=0,n=c.length;t{"use strict";var i=n(2910),r=Object.prototype.toString;e.exports=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,s,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},8274:(e,t,n)=>{"use strict";var i=n(2910),r=Object.prototype.hasOwnProperty;e.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(r.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},9175:(e,t,n)=>{"use strict";var i=n(2910);e.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},312:(e,t,n)=>{"use strict";var i=n(2910),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==r.exec(e)||null!==s.exec(e))},construct:function(e){var t,n,i,o,a,u,c,l,h=0,p=null;if(null===(t=r.exec(e))&&(t=s.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,i,o));if(a=+t[4],u=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),l=new Date(Date.UTC(n,i,o,a,u,c,h)),p&&l.setTime(l.getTime()-p),l},instanceOf:Date,represent:function(e){return e.toISOString()}})},1833:e=>{"use strict";e.exports=function(e){return null!=e&&("object"==typeof e||"function"==typeof e)}},6401:e=>{var t=Object.prototype.toString;function n(e){return"function"==typeof e.constructor?e.constructor.name:null}e.exports=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var i=typeof e;if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return"GeneratorFunction"===n(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(n(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(i=t.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")}},6040:(e,t,n)=>{e=n.nmd(e);var i="__lodash_hash_undefined__",r=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",l="[object Function]",h="[object Map]",p="[object Number]",f="[object Object]",d="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",x="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",w=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D=/^\w*$/,C=/^\./,A=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,k=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,F={};F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F[s]=F[o]=F[b]=F[a]=F[E]=F[u]=F[c]=F[l]=F[h]=F[p]=F[f]=F[m]=F[g]=F[v]=F[x]=!1;var T="object"==typeof global&&global&&global.Object===Object&&global,B="object"==typeof self&&self&&self.Object===Object&&self,O=T||B||Function("return this")(),L=t&&!t.nodeType&&t,I=L&&e&&!e.nodeType&&e,N=I&&I.exports===L&&T.process,M=function(){try{return N&&N.binding("util")}catch(e){}}(),P=M&&M.isTypedArray;function j(e,t){for(var n=-1,i=t.length,r=e.length;++na))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var l=-1,h=!0,p=1&r?new Ce:void 0;for(s.set(e,t),s.set(t,e);++l-1},we.prototype.set=function(e,t){var n=this.__data__,i=ke(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new Ee,map:new(ue||we),string:new Ee}},De.prototype.delete=function(e){return Le(this,e).delete(e)},De.prototype.get=function(e){return Le(this,e).get(e)},De.prototype.has=function(e){return Le(this,e).has(e)},De.prototype.set=function(e,t){return Le(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,i),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new we},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof we){var i=n.__data__;if(!ue||i.length<199)return i.push([e,t]),this;n=this.__data__=new De(i)}return n.set(e,t),this};var Ne=se?H(se,Object):at,Me=se?function(e){for(var t=[];e;)j(t,Ne(e)),e=ne(e);return t}:at,Pe=function(e){return Z.call(e)};function je(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||_.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}function Qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function et(e){return!!e&&"object"==typeof e}function tt(e){return"symbol"==typeof e||et(e)&&Z.call(e)==y}var nt,it=P?(nt=P,function(e){return nt(e)}):function(e){return et(e)&&Ze(e.length)&&!!F[Z.call(e)]};function rt(e){return We(e)?Se(e):function(e){if(!$e(e))return oe(e);var t=[];for(var n in Object(e))Y.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}function st(e){return We(e)?Se(e,!0):function(e){if(!Qe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=$e(e),n=[];for(var i in e)("constructor"!=i||!t&&Y.call(e,i))&&n.push(i);return n}(e)}function ot(e){return e}function at(){return[]}e.exports=function(e,t){return null==e?{}:function(e,t,n){for(var i=-1,r=t.length,s={};++i{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===c&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},2985:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";var i=Array.prototype,r=Object.prototype,s={"&":"&",'"':""","'":"'","<":"<",">":">"},o=/[&"'<>]/g;function a(e,t){return r.hasOwnProperty.call(e,t)}function u(e){return s[e]}function c(e,t,n){var i,r,s;if(e instanceof Error&&(e=(r=e).name+": "+r.message),Object.setPrototypeOf?(i=new Error(e),Object.setPrototypeOf(i,c.prototype)):(i=this,Object.defineProperty(i,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(i,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(i,this.constructor),r){var o=Object.getOwnPropertyDescriptor(r,"stack");(s=o&&(o.get||function(){return o.value}))||(s=function(){return r.stack})}else{var a=new Error(e).stack;s=function(){return a}}return Object.defineProperty(i,"stack",{get:function(){return s.call(i)}}),Object.defineProperty(i,"cause",{value:r}),i.lineno=t,i.colno=n,i.firstUpdate=!0,i.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},i}function l(e){return"[object Function]"===r.toString.call(e)}function h(e){return"[object Array]"===r.toString.call(e)}function p(e){return"[object String]"===r.toString.call(e)}function f(e){return"[object Object]"===r.toString.call(e)}function d(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,i=0;ie.length)o=r.slice(0,e.length),r.slice(o.length,a).forEach((function(e,n){n2?r-2:0),o=2;o0||!n)&&process.stdout.write(" ".repeat(t));var s=r===i.length-1?"":"\n";process.stdout.write(""+e+s)}))}e.exports={Node:u,Root:h,NodeList:l,Value:c,Literal:p,Symbol:f,Group:d,Array:m,Pair:g,Dict:v,Output:$,Capture:U,TemplateData:H,If:x,IfAsync:b,InlineIf:E,For:w,AsyncEach:D,AsyncAll:C,Macro:A,Caller:S,Import:k,FromImport:_,FunCall:F,Filter:T,FilterAsync:B,KeywordArgs:O,Block:L,Super:I,Extends:N,Include:M,Set:P,Switch:j,Case:R,LookupVal:y,BinOp:z,In:J,Is:X,Or:q,And:V,Not:G,Add:W,Concat:Y,Sub:Z,Mul:Q,Div:ee,FloorDiv:te,Mod:ne,Pow:ie,Neg:re,Pos:se,Compare:oe,CompareOperand:ae,CallExtension:ue,CallExtensionAsync:ce,printNodes:function e(t,n){if(n=n||0,le(t.typename+": ",n),t instanceof l)le("\n"),t.children.forEach((function(t){e(t,n+2)}));else if(t instanceof ue)le(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach((function(t){e(t,n+2)}));else{var i=[],r=null;t.iterFields((function(e,t){e instanceof u?i.push([t,e]):(r=r||{})[t]=e})),r?le(JSON.stringify(r,null,2)+"\n",null,!0):le("\n"),i.forEach((function(t){var i=t[0],r=t[1];le("["+i+"] =>",n+2),e(r,n+4)}))}}}},function(e,t){},function(e,t,n){"use strict";function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var r=n(8),s=n(17),o=n(3),a=n(0).TemplateError,u=n(2).Frame,c=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var s=r.prototype;return s.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},s.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new a(e,t,n)},s._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},s._popBuffer=function(){this.buffer=this.bufferStack.pop()},s._emit=function(e){this.codebuf.push(e)},s._emitLine=function(e){this._emit(e+"\n")},s._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i0&&r._emit(","),r.compile(e,t)})),i&&this._emit(i)},s._compileExpression=function(e,t){this.assertType(e,o.Literal,o.Symbol,o.Group,o.Array,o.Dict,o.FunCall,o.Caller,o.Filter,o.LookupVal,o.Compare,o.InlineIf,o.In,o.Is,o.And,o.Or,o.Not,o.Add,o.Concat,o.Sub,o.Mul,o.Div,o.FloorDiv,o.Mod,o.Pow,o.Neg,o.Pos,o.Compare,o.NodeList),this.compile(e,t)},s.assertType=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&i._emit(","),e){i._emitLine("function(cb) {"),i._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var r=i._pushBuffer();i._withScopedSyntax((function(){i.compile(e,t),i._emitLine("cb(null, "+r+");")})),i._popBuffer(),i._emitLine("return "+r+";"),i._emitLine("}")}else i._emit("null")})),n){var u=this._tmpid();this._emitLine(", "+this._makeCallback(u)),this._emitLine(this.buffer+" += runtime.suppressValue("+u+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},s.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},s.compileNodeList=function(e,t){this._compileChildren(e,t)},s.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},s.compileSymbol=function(e,t){var n=e.value,i=t.lookup(n);i?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},s.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},s.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},s.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},s.compilePair=function(e,t){var n=e.key,i=e.value;n instanceof o.Symbol?n=new o.Literal(n.lineno,n.colno,n.value):n instanceof o.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(i,t)},s.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},s.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},s.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},s._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},s.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},s.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},s.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},s.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},s.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},s.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},s.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},s.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},s.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},s.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},s.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},s.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},s.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},s.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach((function(e){n._emit(" "+l[e.type]+" "),n.compile(e.expr,t)}))},s.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},s._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},s.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},s.compileFilter=function(e,t){var n=e.name;this.assertType(n,o.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},s.compileFilterAsync=function(e,t){var n=e.name,i=e.symbol.value;this.assertType(n,o.Symbol),t.set(i,i),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(i)),this._addScopeLevel()},s.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},s.compileSet=function(e,t){var n=this,i=[];e.targets.forEach((function(e){var r=e.value,s=t.lookup(r);null==s&&(s=n._tmpid(),n._emitLine("var "+s+";")),i.push(s)})),e.value?(this._emit(i.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(i.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach((function(e,t){var r=i[t],s=e.value;n._emitLine('frame.set("'+s+'", '+r+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+s+'", '+r+");"),n._emitLine("}"),"_"!==s.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+s+'", '+r+");"),n._emitLine("}"))}))},s.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach((function(e,i){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")})),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},s.compileIf=function(e,t,n){var i=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax((function(){i.compile(e.body,t),n&&i._emit("cb()")})),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){i.compile(e.else_,t),n&&i._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},s.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},s._emitLoopBindings=function(e,t,n,i){var r=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:i+" - "+n},{name:"revindex0",val:i+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+i+" - 1"},{name:"length",val:i}].forEach((function(e){r._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")}))},s.compileFor=function(e,t){var n=this,i=this._tmpid(),r=this._tmpid(),s=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+s+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+s+") {"),this._emitLine(s+" = runtime.fromIterator("+s+");"),e.name instanceof o.Array){this._emitLine("var "+i+";"),this._emitLine("if(runtime.isArray("+s+")) {"),this._emitLine("var "+r+" = "+s+".length;"),this._emitLine("for("+i+"=0; "+i+" < "+s+".length; "+i+"++) {"),e.name.children.forEach((function(r,o){var a=n._tmpid();n._emitLine("var "+a+" = "+s+"["+i+"]["+o+"];"),n._emitLine('frame.set("'+r+'", '+s+"["+i+"]["+o+"]);"),t.set(e.name.children[o].value,a)})),this._emitLoopBindings(e,s,i,r),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}"),this._emitLine("} else {");var a=e.name.children,u=a[0],c=a[1],l=this._tmpid(),h=this._tmpid();t.set(u.value,l),t.set(c.value,h),this._emitLine(i+" = -1;"),this._emitLine("var "+r+" = runtime.keys("+s+").length;"),this._emitLine("for(var "+l+" in "+s+") {"),this._emitLine(i+"++;"),this._emitLine("var "+h+" = "+s+"["+l+"];"),this._emitLine('frame.set("'+u.value+'", '+l+");"),this._emitLine('frame.set("'+c.value+'", '+h+");"),this._emitLoopBindings(e,s,i,r),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}"),this._emitLine("}")}else{var p=this._tmpid();t.set(e.name.value,p),this._emitLine("var "+r+" = "+s+".length;"),this._emitLine("for(var "+i+"=0; "+i+" < "+s+".length; "+i+"++) {"),this._emitLine("var "+p+" = "+s+"["+i+"];"),this._emitLine('frame.set("'+e.name.value+'", '+p+");"),this._emitLoopBindings(e,s,i,r),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+r+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},s._compileAsyncLoop=function(e,t,n){var i=this,r=this._tmpid(),s=this._tmpid(),a=this._tmpid(),u=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof o.Array){var c=e.name.children.length;this._emit("runtime."+u+"("+a+", "+c+", function("),e.name.children.forEach((function(e){i._emit(e.value+",")})),this._emit(r+","+s+",next) {"),e.name.children.forEach((function(e){var n=e.value;t.set(n,n),i._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=e.name.value;this._emitLine("runtime."+u+"("+a+", 1, function("+l+", "+r+", "+s+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),t.set(l,l)}this._emitLoopBindings(e,a,r,s),this._withScopedSyntax((function(){var s;n&&(s=i._pushBuffer()),i.compile(e.body,t),i._emitLine("next("+r+(s?","+s:"")+");"),n&&i._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),e.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},s.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},s.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},s._compileMacro=function(e,t){var n=this,i=[],r=null,s="macro_"+this._tmpid(),a=void 0!==t;e.args.children.forEach((function(t,s){s===e.args.children.length-1&&t instanceof o.Dict?r=t:(n.assertType(t,o.Symbol),i.push(t))}));var c,l=[].concat(i.map((function(e){return"l_"+e.value})),["kwargs"]),h=i.map((function(e){return'"'+e.value+'"'})),p=(r&&r.children||[]).map((function(e){return'"'+e.key.value+'"'}));c=a?t.push(!0):new u,this._emitLines("var "+s+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+p.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),i.forEach((function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),c.set(e.value,"l_"+e.value)})),r&&r.children.forEach((function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,c),n._emit(");")}));var f=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(e.body,c)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+f+");"),this._emitLine("});"),this._popBuffer(),s},s.compileMacro=function(e,t){var n=this._compileMacro(e),i=e.name.value;t.set(i,n),t.parent?this._emitLine('frame.set("'+i+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+i+'");'),this._emitLine('context.setVariable("'+i+'", '+n+");"))},s.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},s._compileGetTemplate=function(e,t,n,i){var r=this._tmpid(),s=this._templateName(),o=this._makeCallback(r),a=n?"true":"false",u=i?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+a+", "+s+", "+u+", "+o),r},s.compileImport=function(e,t){var n=e.target.value,i=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(i+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(i)),this._addScopeLevel(),t.set(n,i),t.parent?this._emitLine('frame.set("'+n+'", '+i+");"):this._emitLine('context.setVariable("'+n+'", '+i+");")},s.compileFromImport=function(e,t){var n=this,i=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(i+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(i)),this._addScopeLevel(),e.names.children.forEach((function(e){var r,s,a=n._tmpid();e instanceof o.Pair?(r=e.key.value,s=e.value.value):s=r=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+i+', "'+r+'")) {'),n._emitLine("var "+a+" = "+i+"."+r+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+r+"'\")); return;"),n._emitLine("}"),t.set(s,a),t.parent?n._emitLine('frame.set("'+s+'", '+a+");"):n._emitLine('context.setVariable("'+s+'", '+a+");")}))},s.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},s.compileSuper=function(e,t){var n=e.blockName.value,i=e.symbol.value,r=this._makeCallback(i);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+r),this._emitLine(i+" = runtime.markSafe("+i+");"),this._addScopeLevel(),t.set(i,i)},s.compileExtends=function(e,t){var n=this._tmpid(),i=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+i),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},s.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var i=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(i)),this._emitLine("callback(null,"+i+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},s.compileTemplateData=function(e,t){this.compileLiteral(e,t)},s.compileCapture=function(e,t){var n=this,i=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=i},s.compileOutput=function(e,t){var n=this;e.children.forEach((function(i){i instanceof o.TemplateData?i.value&&(n._emit(n.buffer+" += "),n.compileLiteral(i,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(i,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},s.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new u,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var i=[],r=e.findAll(o.Block);r.forEach((function(e,t){var r=e.name.value;if(-1!==i.indexOf(r))throw new Error('Block "'+r+'" defined more than once.');i.push(r),n._emitFuncBegin(e,"b_"+r);var s=new u;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,s),n._emitFuncEnd()})),this._emitLine("return {"),r.forEach((function(e,t){var i="b_"+e.name.value;n._emitLine(i+": "+i+",")})),this._emitLine("root: root\n};")},s.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},s.getCode=function(){return this.codebuf.join("")},r}(c);e.exports={compile:function(e,t,n,i,o){void 0===o&&(o={});var a=new h(i,o.throwOnUndefined),u=(n||[]).map((function(e){return e.preprocess})).filter((function(e){return!!e})).reduce((function(e,t){return t(e)}),e);return a.compile(s.transform(r.parse(u,n,o),t,i)),a.getCode()},Compiler:h}},function(e,t,n){"use strict";function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var r=n(4),s=n(1).EmitterObj;e.exports=function(e){var t,n;function s(){return e.apply(this,arguments)||this}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var o=s.prototype;return o.resolve=function(e,t){return r.resolve(r.dirname(e),t)},o.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},s}(s)},function(e,t,n){"use strict";function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}var s=n(12),o=n(15),a=n(0),u=n(5),c=n(18),l=n(10),h=l.FileSystemLoader,p=l.WebLoader,f=l.PrecompiledLoader,d=n(20),m=n(21),g=n(1),v=g.Obj,y=g.EmitterObj,x=n(2),b=x.handleError,E=x.Frame,w=n(22);function D(e,t,n){s((function(){e(t,n)}))}var C={type:"code",obj:{root:function(e,t,n,i,r){try{r(null,"")}catch(e){r(b(e,null,null))}}}},A=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=a.isArray(e)?e:[e]:h?this.loaders=[new h("views")]:p&&(this.loaders=[new p("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new f(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(c).forEach((function(e){var t=e[0],i=e[1];return n.addFilter(t,i)})),a._entries(d).forEach((function(e){var t=e[0],i=e[1];return n.addTest(t,i)}))},n._initLoaders=function(){var e=this;this.loaders.forEach((function(t){t.cache={},"function"==typeof t.on&&(t.on("update",(function(n,i){t.cache[n]=null,e.emit("update",n,i,t)})),t.on("load",(function(n,i){e.emit("load",n,i,t)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(e){e.cache={}}))},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=a.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var i=t;return n&&this.asyncFilters.push(e),this.filters[e]=i,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,i,r){var s,o=this,u=this,c=null;if(e&&e.raw&&(e=e.raw),a.isFunction(n)&&(r=n,n=null,t=t||!1),a.isFunction(t)&&(r=t,t=!1),e instanceof k)c=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var l=0;l0&&!this.skip(r.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var u=this.parsePrimary();i.addChild(new s.Pair(a.lineno,a.colno,a,u))}else i.addChild(a);n=this.parseWithContext()}return new s.FromImport(e.lineno,e.colno,t,i,n)},u.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new s.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof s.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},u.parseExtends=function(){var e=this.peekToken();this.skipSymbol("extends")||this.fail("parseTemplateRef: expected extends");var t=new s.Extends(e.lineno,e.colno);return t.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t},u.parseInclude=function(){var e=this.peekToken();this.skipSymbol("include")||this.fail("parseInclude: expected include");var t=new s.Include(e.lineno,e.colno);return t.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(t.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),t},u.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new s.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new s.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},u.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new s.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(r.TOKEN_COMMA)););return this.skipValue(r.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(r.TOKEN_BLOCK_END)?(n.body=new s.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},u.parseSwitch=function(){var e="switch",t="endswitch",n="case",i="default",r=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(i)||this.fail('parseSwitch: expected "switch," "case" or "default"',r.lineno,r.colno);var o=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,i,t);var a,u=this.peekToken(),c=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(e);var h=this.parseUntilBlocks(n,i,t);c.push(new s.Case(u.line,u.col,l,h)),u=this.peekToken()}while(u&&u.value===n);switch(u.value){case i:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new s.Switch(r.lineno,r.colno,o,c,a)},u.parseStatement=function(){var e=this.peekToken();if(e.type!==r.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t0;){var u=o[0],c=o[1],l=o[2];l===e?i+=1:l===t&&(i-=1),0===i?(r+=c,this.tokens.backN(u.length-c.length)):r+=u}return new s.Output(a.lineno,a.colno,[new s.TemplateData(a.lineno,a.colno,r)])},u.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===r.TOKEN_LEFT_PAREN)e=new s.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===r.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new s.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==r.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var i=this.nextToken();i.type!==r.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+i.value,i.lineno,i.colno),t=new s.Literal(i.lineno,i.colno,i.value),e=new s.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},u.parseExpression=function(){return this.parseInlineIf()},u.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new s.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},u.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new s.Or(e.lineno,e.colno,e,t)}return e},u.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new s.And(e.lineno,e.colno,e,t)}return e},u.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new s.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},u.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===r.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var i=this.parseIs();e=new s.In(e.lineno,e.colno,e,i),n&&(e=new s.Not(e.lineno,e.colno,e))}return e},u.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new s.Is(e.lineno,e.colno,e,n),t&&(e=new s.Not(e.lineno,e.colno,e))}return e},u.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var i=this.nextToken();if(!i)break;if(-1===e.indexOf(i.value)){this.pushToken(i);break}n.push(new s.CompareOperand(i.lineno,i.colno,this.parseConcat(),i.value))}return n.length?new s.Compare(n[0].lineno,n[0].colno,t,n):t},u.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(r.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new s.Concat(e.lineno,e.colno,e,t)}return e},u.parseAdd=function(){for(var e=this.parseSub();this.skipValue(r.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new s.Add(e.lineno,e.colno,e,t)}return e},u.parseSub=function(){for(var e=this.parseMul();this.skipValue(r.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new s.Sub(e.lineno,e.colno,e,t)}return e},u.parseMul=function(){for(var e=this.parseDiv();this.skipValue(r.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new s.Mul(e.lineno,e.colno,e,t)}return e},u.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(r.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new s.Div(e.lineno,e.colno,e,t)}return e},u.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(r.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new s.FloorDiv(e.lineno,e.colno,e,t)}return e},u.parseMod=function(){for(var e=this.parsePow();this.skipValue(r.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new s.Mod(e.lineno,e.colno,e,t)}return e},u.parsePow=function(){for(var e=this.parseUnary();this.skipValue(r.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new s.Pow(e.lineno,e.colno,e,t)}return e},u.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(r.TOKEN_OPERATOR,"-")?new s.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(r.TOKEN_OPERATOR,"+")?new s.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},u.parsePrimary=function(e){var t,n=this.nextToken(),i=null;if(n?n.type===r.TOKEN_STRING?t=n.value:n.type===r.TOKEN_INT?t=parseInt(n.value,10):n.type===r.TOKEN_FLOAT?t=parseFloat(n.value):n.type===r.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===r.TOKEN_NONE?t=null:n.type===r.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?i=new s.Literal(n.lineno,n.colno,t):n.type===r.TOKEN_SYMBOL?i=new s.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),i=this.parseAggregate()),e||(i=this.parsePostfix(i)),i)return i;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},u.parseFilterName=function(){for(var e=this.expect(r.TOKEN_SYMBOL),t=e.value;this.skipValue(r.TOKEN_OPERATOR,".");)t+="."+this.expect(r.TOKEN_SYMBOL).value;return new s.Symbol(e.lineno,e.colno,t)},u.parseFilterArgs=function(e){return this.peekToken().type===r.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},u.parseFilter=function(e){for(;this.skip(r.TOKEN_PIPE);){var t=this.parseFilterName();e=new s.Filter(t.lineno,t.colno,t,new s.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},u.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var i=new s.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var r=new s.Filter(t.lineno,t.colno,t,new s.NodeList(t.lineno,t.colno,[i].concat(n)));return new s.Output(t.lineno,t.colno,[r])},u.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case r.TOKEN_LEFT_PAREN:e=new s.Group(t.lineno,t.colno);break;case r.TOKEN_LEFT_BRACKET:e=new s.Array(t.lineno,t.colno);break;case r.TOKEN_LEFT_CURLY:e=new s.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===r.TOKEN_RIGHT_PAREN||n===r.TOKEN_RIGHT_BRACKET||n===r.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(r.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof s.Dict){var i=this.parsePrimary();this.skip(r.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var o=this.parseExpression();e.addChild(new s.Pair(i.lineno,i.colno,i,o))}else{var a=this.parseExpression();e.addChild(a)}}return e},u.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==r.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===r.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var i=new s.NodeList(n.lineno,n.colno),o=new s.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!t&&n.type===r.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===r.TOKEN_BLOCK_END)break;if(a&&!this.skip(r.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var u=this.parseExpression();this.skipValue(r.TOKEN_OPERATOR,"=")?o.addChild(new s.Pair(u.lineno,u.colno,u,this.parseExpression())):i.addChild(u)}a=!0}return o.children.length&&i.addChild(o),i},u.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),i=0;i=","//","**"],P=B+this.current();switch(-1!==i.indexOf(M,P)&&(this.forward(),B=P,-1!==i.indexOf(M,P+this.current())&&(B=P+this.current(),this.forward())),B){case"(":N=d;break;case")":N=m;break;case"[":N=g;break;case"]":N=v;break;case"{":N=y;break;case"}":N=x;break;case",":N=E;break;case":":N=w;break;case"~":N=D;break;case"|":N=C;break;default:N=b}return T(N,B,t,n)}if((e=this._extractUntil(r+s)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var j=this._extract("0123456789");return T(A,e+"."+j,t,n)}return T("int",e,t,n)}if(e.match(/^(true|false)$/))return T(S,e,t,n);if("none"===e)return T(k,e,t,n);if("null"===e)return T(k,e,t,n);if(e)return T(_,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var R,$=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,T(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,T(h,e,t,n);e="";var U=!1;for(this._matches(this.tags.COMMENT_START)&&(U=!0,e=this._extractString(this.tags.COMMENT_START));null!==(R=this._extractUntil($));){if(e+=R,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!U){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var H=e.slice(-this.colno);if(/^\s+$/.test(H)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!U)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===R&&U)throw new Error("expected end of comment, got end of file");return T(U?f:u,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var i=this.current();this.forward();for(var r=t.indexOf(this.current());(e&&-1===r||!e&&-1!==r)&&!this.isFinished();)i+=this.current(),this.forward(),r=t.indexOf(this.current());return i}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t1024){for(var t=0,n=r.length-s;t0&&o.length>r&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,a=u,console&&console.warn&&console.warn(a)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=p.bind(i);return r.listener=n,i.wrapFn=r,r}function d(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=r[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var c=u.length,l=g(u,c);for(n=0;n=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,r=s;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){"use strict";var i=n(3),r=n(0),s=0;function o(){return"hole_"+s++}function a(e,t){for(var n=null,i=0;i=t)return e;var n=t-e.length,o=i.repeat(" ",n/2-n%2),a=i.repeat(" ",n/2);return r.copySafeness(e,o+e+a)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!i.isObject(e))throw new i.TemplateError("dictsort filter: val must be an object");var r,s=[];for(var o in e)s.push([o,e[o]]);if(void 0===n||"key"===n)r=0;else{if("value"!==n)throw new i.TemplateError("dictsort filter: You can only sort by either key or value");r=1}return s.sort((function(e,n){var s=e[r],o=n[r];return t||(i.isString(s)&&(s=s.toUpperCase()),i.isString(o)&&(o=o.toUpperCase())),s>o?1:s===o?0:-1})),s},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof r.SafeString?e:(e=null==e?"":e,r.markSafe(i.escape(e.toString())))},t.safe=function(e){return e instanceof r.SafeString?e:(e=null==e?"":e,r.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,r.markSafe(i.escape(e.toString()))},t.groupby=function(e,t){return i.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=s(e,"")))return"";t=t||4;var o=e.split("\n"),a=i.repeat(" ",t),u=o.map((function(e,t){return 0!==t||n?""+a+e:e})).join("\n");return r.copySafeness(e,u)},t.join=function(e,t,n){return t=t||"",n&&(e=i.map(e,(function(e){return e[n]}))),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=s(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!i.isObject(t)||t instanceof r.SafeString?t.length:i.keys(t).length:0},t.list=u,t.lower=function(e){return(e=s(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":r.copySafeness(e,e.replace(/\r\n|\n/g,"
\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=c(!1),t.rejectattr=function(e,t){return e.filter((function(e){return!e[t]}))},t.select=c(!0),t.selectattr=function(e,t){return e.filter((function(e){return!!e[t]}))},t.replace=function(e,t,n,i){var s=e;if(t instanceof RegExp)return e.replace(t,n);void 0===i&&(i=-1);var o="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof r.SafeString))return e;if(""===t)return o=n+e.split("").join(n)+n,r.copySafeness(e,o);var a=e.indexOf(t);if(0===i||-1===a)return e;for(var u=0,c=0;a>-1&&(-1===i||c=r&&l.push(n),s.push(l)}return s},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=i.map(e,(function(e){return e[t]}))),n+e.reduce((function(e,t){return e+t}),0)},t.sort=r.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(e,t,n,r){var s=this,o=i.map(e,(function(e){return e})),a=i.getAttrGetter(r);return o.sort((function(e,o){var u=r?a(e):e,c=r?a(o):o;if(s.env.opts.throwOnUndefined&&r&&(void 0===u||void 0===c))throw new TypeError('sort: attribute "'+r+'" resolved to undefined');return!n&&i.isString(u)&&i.isString(c)&&(u=u.toLowerCase(),c=c.toLowerCase()),uc?t?-1:1:0})),o})),t.string=function(e){return r.copySafeness(e,e)},t.striptags=function(e,t){var n,i=l((e=s(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=t?i.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):i.replace(/\s+/gi," "),r.copySafeness(e,n)},t.title=function(e){var t=(e=s(e,"")).split(" ").map((function(e){return a(e)}));return r.copySafeness(e,t.join(" "))},t.trim=l,t.truncate=function(e,t,n,i){var o=e;if(t=t||255,(e=s(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var a=e.lastIndexOf(" ",t);-1===a&&(a=t),e=e.substring(0,a)}return e+=null!=i?i:"...",r.copySafeness(o,e)},t.upper=function(e){return(e=s(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return i.isString(e)?t(e):(i.isArray(e)?e:i._entries(e)).map((function(e){var n=e[0],i=e[1];return t(n)+"="+t(i)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,p=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){o(t)&&(t=1/0);var i=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter((function(e){return e&&e.length})).map((function(e){var n=e.match(h),r=n?n[1]:e,s=r.substr(0,t);return f.test(r)?'"+s+"":d.test(r)?'"+s+"":p.test(r)?''+r+"":m.test(r)?'"+s+"":e})).join("")},t.wordcount=function(e){var t=(e=s(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return o(n)?t:n};var g=r.makeMacro(["value","default","base"],[],(function(e,t,n){void 0===n&&(n=10);var i=parseInt(e,n);return o(i)?t:i}));t.int=g,t.d=t.default,t.e=t.escape},function(e,t,n){"use strict";function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var r=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},r}(n(6));e.exports={PrecompiledLoader:r}},function(e,t,n){"use strict";var i=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t==0},t.escaped=function(e){return e instanceof i},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e=e.length&&(t=0),this.current=e[t],this.current}}}e.exports=function(){return{range:function(e,t,n){void 0===t?(t=e,e=0,n=1):n||(n=1);var i=[];if(n>0)for(var r=e;rt;s+=n)i.push(s);return i},cycler:function(){return i(Array.prototype.slice.call(arguments))},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var i=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=i.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){"use strict";var i=n(4),r=n(4),s=n(0)._prettifyError,o=n(5),a=n(7).Environment,u=n(24);function c(e,t){return!!Array.isArray(t)&&t.some((function(t){return e.match(t)}))}function l(e,t){(t=t||{}).isString=!0;var n=t.env||new a([]),i=t.wrapper||u;if(!t.name)throw new Error('the "name" option is required when compiling a string');return i([h(e,t.name,n)],t)}function h(e,t,n){var i,r=(n=n||new a([])).asyncFilters,u=n.extensionsList;t=t.replace(/\\/g,"/");try{i=o.compile(e,r,u,t,n.opts)}catch(e){throw s(t,!1,e)}return{name:t,template:i}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new a([]),s=t.wrapper||u;if(t.isString)return l(e,t);var o=i.existsSync(e)&&i.statSync(e),p=[],f=[];if(o.isFile())p.push(h(i.readFileSync(e,"utf-8"),t.name||e,n));else if(o.isDirectory()){!function n(s){i.readdirSync(s).forEach((function(o){var a=r.join(s,o),u=a.substr(r.join(e,"/").length),l=i.statSync(a);l&&l.isDirectory()?c(u+="/",t.exclude)||n(a):c(u,t.include)&&f.push(a)}))}(e);for(var d=0;de.length||r>0&&o>=i||r<0&&o<=i);o+=r)s.push(n.memberLookup(e,o));return s}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var d={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t{"use strict";var i=n(3700),r=/[\/\?<>\\:\*\|"]/g,s=/[\x00-\x1f\x80-\x9f]/g,o=/^\.+$/,a=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,u=/[\. ]+$/;function c(e,t){if("string"!=typeof e)throw new Error("Input must be string");var n=e.replace(r,t).replace(s,t).replace(o,t).replace(a,t).replace(u,t);return i(n,255)}e.exports=function(e,t){var n=t&&t.replacement||"",i=c(e,n);return""===n?i:c(i,"")}},1006:(e,t,n)=>{"use strict";var i=n(6401),r=n(6919);function s(e,t){return e.slice(0,t.length)===t&&e.charAt(t.length+1)!==t.slice(-1)}function o(e){return e}e.exports=function(e,t){"function"==typeof t&&(t={parse:t});var n=function(e){if("object"!==i(e)&&(e={content:e}),"string"!=typeof e.content&&!((t=e.content)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)))throw new TypeError("expected a buffer or string");var t;return e.content=e.content.toString(),e.sections=[],e}(e),a=r({},{section_delimiter:"---",parse:o},t),u=a.section_delimiter,c=n.content.split(/\r?\n/),l=null,h={key:"",data:"",content:""},p=[],f=[];function d(e){n.content=e,l=[],p=[]}function m(e){f.length&&(h.key=function(e,t){return e?e.slice(t.length).trim():""}(f[0],u),h.content=e,a.parse(h,l),l.push(h),h={key:"",data:"",content:""},p=[],f=[])}for(var g=0;g{"use strict";e.exports=function(e){return"string"==typeof e&&"\ufeff"===e.charAt(0)?e.slice(1):e}},3700:(e,t,n)=>{"use strict";var i=n(1156),r=n(793);e.exports=i.bind(null,r)},1156:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function n(e){return e>=56320&&e<=57343}e.exports=function(e,i,r){if("string"!=typeof i)throw new Error("Input must be string");for(var s,o,a=i.length,u=0,c=0;cr)return i.slice(0,c-o.length+1)}return i}},793:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function n(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var i=e.length,r=0,s=null,o=null,a=0;a=128&&s<=2047?r+=2:s>=2048&&s<=65535&&(r+=3),o=s;return r}},995:e=>{"use strict";e.exports='{% if is_new_article %}\n# {{title}}\n\n## Metadata\n{% if author %}- Author: [{{author}}]({{authorUrl}}){% endif %}\n- Title: {{title}}\n{% if url %}- Reference: {{url}}{% endif %}\n- Category: #article\n{% endif %}\n\n{%- if is_new_article %}\n## Page Notes\n{% for highlight in page_notes -%}\n{{highlight.annotation}}\n{%- if highlight.tags | length %}\nTags: {% for tag in highlight.tags -%} #{{tag | replace(" ", "-")+" "}}{%- endfor %}\n{% endif %}\n{% endfor %}\n{%- endif -%}\n\n{%- if is_new_article -%}\n## Highlights\n{% for highlight in highlights -%}\n- {{highlight.text}} — [Updated on {{highlight.updated}}]({{highlight.incontext}})\n{%- if \'Private\' != highlight.group %} — Group: #{{highlight.group | replace(" ", "-")}}{% endif %}\n{% if highlight.tags | length %} - Tags: {% for tag in highlight.tags %} #{{tag | replace(" ", "-")+" "}}{% endfor %}\n{% endif -%}\n{% if highlight.annotation %} - Annotation: {{highlight.annotation}}{% endif %}\n{% endfor %}\n{% endif %}\n'},2506:e=>{"use strict";e.exports='\n \n'},3626:e=>{"use strict";e.exports='Configure how {{created}} and {{updated}} timestamps in the Nunjucks template will be formatted.\n
\nFor more syntax, refer to the (format reference).'},3317:e=>{"use strict";e.exports='Template (Nunjucks) for\nrendering every synced Hypothesis highlights & annotations.\n\n

\n Available variables to use\n

\n\nArticle Metadata\n
    \n
  • {{is_new_article}} - New file indicator
  • \n
  • {{title}} - Title
  • \n
  • {{author}} - Author
  • \n
  • {{url}} - Link to source
  • \n
  • {{highlights}} - List of your Highlights
  • \n
\n\nHighlight\n
    \n
  • {{id}} - Unique Id
  • \n
  • {{text}} - Text
  • \n
  • {{color}} - Highlight color
  • \n
  • {{incontext}} - Link to Highlight in context
  • \n
  • {{created}} - Created on
  • \n
  • {{updated}} - Updated on
  • \n
  • {{user}} - Username
  • \n
  • {{group}} - Group name
  • \n
\n\nAnnotation\n
    \n
  • {{annotation}} - Annotation
  • \n
  • {{tags}} - List of tags
  • \n
'},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},6113:e=>{"use strict";e.exports=require("crypto")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},2781:e=>{"use strict";e.exports=require("stream")},7310:e=>{"use strict";e.exports=require("url")},9796:e=>{"use strict";e.exports=require("zlib")}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>bn});const e=require("obsidian");var t=__webpack_require__(3317),n=__webpack_require__(3626),i=__webpack_require__(6040),r=__webpack_require__.n(i);function s(){}function o(e,t){for(const n in t)e[n]=t[n];return e}function a(e){return e()}function u(){return Object.create(null)}function c(e){e.forEach(a)}function l(e){return"function"==typeof e}function h(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function p(e){return 0===Object.keys(e).length}function f(e){let t;return function(e,...t){if(null==e)return s;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(e,(e=>t=e))(),t}function d(e,t,n,i){return e[1]&&i?o(n.ctx.slice(),e[1](i(t))):n.ctx}new Set;let m,g,v=!1;function y(e,t){e.appendChild(t)}function x(e,t,n){const i=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}(e);if(!i.getElementById(t)){const e=D("style");e.id=t,e.textContent=n,function(e,t){y(e.head||e,t)}(i,e)}}function b(e,t,n){e.insertBefore(t,n||null)}function E(e){e.parentNode.removeChild(e)}function w(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function F(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function T(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)null==t[i]?e.removeAttribute(i):"style"===i?e.style.cssText=t[i]:"__value"===i?e.value=e[i]=t[i]:n[i]&&n[i].set?e[i]=t[i]:F(e,i,t[i])}function B(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:F(e,t,n)}function O(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function L(e,t){e.value=null==t?"":t}function I(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function N(){if(void 0===m){m=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){m=!0}}return m}function M(e,t,n){e.classList[n?"add":"remove"](t)}class P{constructor(){this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.e=D(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t{const i=e.$$.callbacks[t];if(i){const r=function(e,t,n=!1){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}(t,n);i.slice().forEach((t=>{t.call(e,r)}))}}}new Set;const K=[],z=[],J=[],X=[],q=Promise.resolve();let V=!1;function G(){V||(V=!0,q.then(te))}function W(){return G(),q}function Y(e){J.push(e)}function Z(e){X.push(e)}let Q=!1;const ee=new Set;function te(){if(!Q){Q=!0;do{for(let e=0;e{ie.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function le(e,t){ce(e,1,1,(()=>{t.delete(e.key)}))}function he(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[s];if(a){for(const e in o)e in a||(i[e]=1);for(const e in a)r[e]||(n[e]=a[e],r[e]=1);e[s]=a}else for(const e in o)r[e]=1}for(const e in i)e in n||(n[e]=void 0);return n}function pe(e){return"object"==typeof e&&null!==e?e:{}}function fe(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function de(e){e&&e.c()}function me(e,t,n,i){const{fragment:r,on_mount:s,on_destroy:o,after_update:u}=e.$$;r&&r.m(t,n),i||Y((()=>{const t=s.map(a).filter(l);o?o.push(...t):c(t),e.$$.on_mount=[]})),u.forEach(Y)}function ge(e,t){const n=e.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ve(e,t,n,i,r,o,a,l=[-1]){const h=g;j(e);const p=e.$$={fragment:null,ctx:null,props:o,update:s,not_equal:r,bound:u(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(h?h.$$.context:[])),callbacks:u(),dirty:l,skip_bound:!1,root:t.target||h.$$.root};a&&a(p.root);let f=!1;if(p.ctx=n?n(e,t.props||{},((t,n,...i)=>{const s=i.length?i[0]:n;return p.ctx&&r(p.ctx[t],p.ctx[t]=s)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](s),f&&function(e,t){-1===e.$$.dirty[0]&&(K.push(e),G(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!p(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class ye{$destroy(){ge(this,1),this.$destroy=s}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!p(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const xe=[];function be(e,t=s){let n;const i=new Set;function r(t){if(h(e,t)&&(e=t,n)){const t=!xe.length;for(const t of i)t[1](),xe.push(t,e);if(t){for(let e=0;e{i.delete(u),0===i.size&&(n(),n=null)}}}}var Ee=__webpack_require__(2985),we=__webpack_require__.n(Ee),De=__webpack_require__(9669),Ce=__webpack_require__.n(De);class Ae{constructor(e,t){this.baseUrl="https://hypothes.is/api",this.token=e,this.userid=t}getHeaders(){return{AUTHORIZATION:`Bearer ${this.token}`,Accept:"application/json"}}async getProfile(){try{return(await Ce().get(`${this.baseUrl}/profile`,{headers:this.getHeaders()})).data.userid}catch(t){return new e.Notice("Failed to authorize Hypothes.is user. Please check your API token and try again."),void console.error(t)}}async getHighlights(t,n=2e3){let i=[];try{let r=t&&e.moment.utc(t).format();for(;i.length{const e=be(ke);let t;return e.subscribe((async e=>{if(t){const n=Object.assign(Object.assign({},e),{lastSyncDate:e.lastSyncDate?e.lastSyncDate.toJSON():void 0});await t.saveData(n)}})),{subscribe:e.subscribe,initialise:async n=>{const i=Object.assign({},ke,await n.loadData()),r=Object.assign(Object.assign({},i),{lastSyncDate:i.lastSyncDate?new Date(i.lastSyncDate):void 0});e.set(r),t=n},actions:{setHighlightsFolder:t=>{e.update((e=>(e.highlightsFolder=t,e)))},resetSyncHistory:()=>{e.update((e=>(e.history.totalArticles=0,e.history.totalHighlights=0,e.lastSyncDate=void 0,e)))},setSyncDateToNow:()=>{e.update((e=>(e.lastSyncDate=new Date,e)))},connect:async(t,n)=>{e.update((e=>(e.isConnected=!0,e.token=t,e.user=n,e)))},disconnect:()=>{e.update((e=>(e.isConnected=!1,e.user=void 0,e.token=void 0,e.groups=[],e)))},setAutoSyncInterval:t=>{e.update((e=>(e.autoSyncInterval=t,e)))},setTemplate:t=>{e.update((e=>(e.template=t,e)))},setSyncOnBoot:t=>{e.update((e=>(e.syncOnBoot=t,e)))},incrementHistory:t=>{e.update((e=>(e.history.totalArticles+=t.totalArticles,e.history.totalHighlights+=t.totalHighlights,e)))},setDateTimeFormat:t=>{e.update((e=>(e.dateTimeFormat=t,e)))},setGroups:async t=>{e.update((e=>(e.groups=t,e)))},resetGroups:async()=>{e.update((e=>(e.groups=[],e)))},setUseDomainFolder:t=>{e.update((e=>(e.useDomainFolders=t,e)))}}}})(),Fe=(()=>{const e=be({status:"idle",jobs:[]}),t=()=>{e.update((e=>(e.status="idle",e.errorMessage=void 0,e.jobs=[],e)))},n=(t,n)=>{e.update((e=>(e.jobs.filter((e=>e.articleId===t.id))[0].status=n,"done"===n&&_e.actions.setSyncDateToNow(),e)))};return{subscribe:e.subscribe,actions:{startSync:()=>{e.update((e=>(e.status="loading",e.errorMessage=void 0,e.jobs=[],e)))},errorSync:t=>{e.update((e=>(e.status="error",e.errorMessage=t,e)))},completeSync:n=>{e.update((e=>(_e.actions.setSyncDateToNow(),_e.actions.incrementHistory({totalArticles:n.newArticlesCount,totalHighlights:n.newHighlightsCount}),t(),e)))},setJobs:t=>{e.update((e=>{for(const n of t)e.jobs.push({status:"idle",articleId:n.id});return e}))},startJob:e=>n(e,"in-progress"),completeJob:e=>n(e,"done"),errorJob:e=>n(e,"error"),reset:t}}})();class Te{constructor(){we().configure({autoescape:!1})}validate(e){try{return we().renderString(e,{}),!0}catch(e){return!1}}render(e,t=!0){const{metadata:n,highlights:i,page_notes:r}=e,s=Object.assign(Object.assign({is_new_article:t},n),{highlights:i,page_notes:r}),o=f(_e).template;return we().renderString(o,s)}}function Be(e){let t,n,i,r,o,a,u,c;return{c(){t=D("div"),t.innerHTML='
Hypothesis API Token
\n
Log into your\n Hypothes.is Developer settings to retrieve API\n token
',n=S(),i=D("div"),r=D("input"),o=S(),a=D("button"),a.textContent="Save",F(t,"class","setting-item"),F(r,"type","text"),F(r,"placeholder","API token"),F(r,"size","40"),F(a,"class","mod-cta"),I(a,"float","right"),F(i,"class","setting-item-info")},m(s,l){b(s,t,l),b(s,n,l),b(s,i,l),y(i,r),e[2](r),y(i,o),y(i,a),u||(c=_(a,"click",e[3]),u=!0)},p:s,i:s,o:s,d(r){r&&E(t),r&&E(n),r&&E(i),e[2](null),u=!1,c()}}}function Oe(e,t,n){let i,{onSubmit:r}=t;return e.$$set=e=>{"onSubmit"in e&&n(0,r=e.onSubmit)},[r,i,function(e){z[e?"unshift":"push"]((()=>{i=e,n(1,i)}))},()=>r(i.value)]}const Le=class extends ye{constructor(e){super(),ve(this,e,Oe,Be,h,{onSubmit:0})}};class Ie extends e.Modal{constructor(e,t){super(e),this.tokenManager=t,this.waitForClose=new Promise((e=>this.resolvePromise=e)),this.titleEl.innerText="Enter Hypothesis API token",this.modalContent=new Le({target:this.contentEl,props:{onSubmit:async e=>{await this.tokenManager.setToken(e),this.close()}}}),this.open()}onClose(){super.onClose(),this.modalContent.$destroy(),this.resolvePromise()}}function Ne(e){x(e,"svelte-3e0qet",".item.svelte-3e0qet{cursor:default;height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--itemPadding, 0 20px);color:var(--itemColor, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.groupHeader.svelte-3e0qet{text-transform:var(--groupTitleTextTransform, uppercase)}.groupItem.svelte-3e0qet{padding-left:var(--groupItemPaddingLeft, 40px)}.item.svelte-3e0qet:active{background:var(--itemActiveBackground, #b9daff)}.item.active.svelte-3e0qet{background:var(--itemIsActiveBG, #007aff);color:var(--itemIsActiveColor, #fff)}.item.notSelectable.svelte-3e0qet{color:var(--itemIsNotSelectableColor, #999)}.item.first.svelte-3e0qet{border-radius:var(--itemFirstBorderRadius, 4px 4px 0 0)}.item.hover.svelte-3e0qet:not(.active){background:var(--itemHoverBG, #e7f2ff);color:var(--itemHoverColor, inherit)}")}function Me(e){let t,n,i=e[0](e[1],e[2])+"";return{c(){t=D("div"),F(t,"class",n="item "+e[3]+" svelte-3e0qet")},m(e,n){b(e,t,n),t.innerHTML=i},p(e,[r]){7&r&&i!==(i=e[0](e[1],e[2])+"")&&(t.innerHTML=i),8&r&&n!==(n="item "+e[3]+" svelte-3e0qet")&&F(t,"class",n)},i:s,o:s,d(e){e&&E(t)}}}function Pe(e,t,n){let{isActive:i=!1}=t,{isFirst:r=!1}=t,{isHover:s=!1}=t,{isSelectable:o=!1}=t,{getOptionLabel:a}=t,{item:u}=t,{filterText:c=""}=t,l="";return e.$$set=e=>{"isActive"in e&&n(4,i=e.isActive),"isFirst"in e&&n(5,r=e.isFirst),"isHover"in e&&n(6,s=e.isHover),"isSelectable"in e&&n(7,o=e.isSelectable),"getOptionLabel"in e&&n(0,a=e.getOptionLabel),"item"in e&&n(1,u=e.item),"filterText"in e&&n(2,c=e.filterText)},e.$$.update=()=>{if(242&e.$$.dirty){const e=[];i&&e.push("active"),r&&e.push("first"),s&&e.push("hover"),u.isGroupHeader&&e.push("groupHeader"),u.isGroupItem&&e.push("groupItem"),o||e.push("notSelectable"),n(3,l=e.join(" "))}},[a,u,c,l,i,r,s,o]}const je=class extends ye{constructor(e){super(),ve(this,e,Pe,Me,h,{isActive:4,isFirst:5,isHover:6,isSelectable:7,getOptionLabel:0,item:1,filterText:2},Ne)}};function Re(e){x(e,"svelte-1uyqfml",".listContainer.svelte-1uyqfml{box-shadow:var(--listShadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--listBorderRadius, 4px);max-height:var(--listMaxHeight, 250px);overflow-y:auto;background:var(--listBackground, #fff);border:var(--listBorder, none);position:var(--listPosition, absolute);z-index:var(--listZIndex, 2);width:100%;left:var(--listLeft, 0);right:var(--listRight, 0)}.virtualList.svelte-1uyqfml{height:var(--virtualListHeight, 200px)}.listGroupTitle.svelte-1uyqfml{color:var(--groupTitleColor, #8f8f8f);cursor:default;font-size:var(--groupTitleFontSize, 12px);font-weight:var(--groupTitleFontWeight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--groupTitlePadding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--groupTitleTextTransform, uppercase)}.empty.svelte-1uyqfml{text-align:var(--listEmptyTextAlign, center);padding:var(--listEmptyPadding, 20px 0);color:var(--listEmptyColor, #78848f)}")}function $e(e,t,n){const i=e.slice();return i[41]=t[n],i[42]=n,i}function Ue(e){let t,n,i=e[1],r=[];for(let t=0;tce(r[e],1,1,(()=>{r[e]=null}));let o=null;return i.length||(o=Ke(e)),{c(){for(let e=0;e({41:e,42:t}),({item:e,i:t})=>[0,(e?1024:0)|(t?2048:0)]]},$$scope:{ctx:e}}}}return r&&(t=new r(s(e))),{c(){t&&de(t.$$.fragment),n=k()},m(e,r){t&&me(t,e,r),b(e,n,r),i=!0},p(e,i){const o={};if(2&i[0]&&(o.items=e[1]),256&i[0]&&(o.itemHeight=e[8]),9814&i[0]|11264&i[1]&&(o.$$scope={dirty:i,ctx:e}),r!==(r=e[3])){if(t){oe();const e=t;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}r?(t=new r(s(e)),de(t.$$.fragment),ue(t.$$.fragment,1),me(t,n.parentNode,n)):t=null}else r&&t.$set(o)},i(e){i||(t&&ue(t.$$.fragment,e),i=!0)},o(e){t&&ce(t.$$.fragment,e),i=!1},d(e){e&&E(n),t&&ge(t,e)}}}function Ke(e){let t,n=!e[11]&&ze(e);return{c(){n&&n.c(),t=k()},m(e,i){n&&n.m(e,i),b(e,t,i)},p(e,i){e[11]?n&&(n.d(1),n=null):n?n.p(e,i):(n=ze(e),n.c(),n.m(t.parentNode,t))},d(e){n&&n.d(e),e&&E(t)}}}function ze(e){let t,n;return{c(){t=D("div"),n=A(e[12]),F(t,"class","empty svelte-1uyqfml")},m(e,i){b(e,t,i),y(t,n)},p(e,t){4096&t[0]&&O(n,e[12])},d(e){e&&E(t)}}}function Je(e){let t,n,i,r,s,o;var a=e[4];function u(e){return{props:{item:e[41],filterText:e[13],getOptionLabel:e[6],isFirst:Ye(e[42]),isActive:We(e[41],e[9],e[10]),isHover:Ze(e[2],e[41],e[42],e[1]),isSelectable:Qe(e[41])}}}function l(){return e[29](e[42])}function h(){return e[30](e[42])}function p(...t){return e[31](e[41],e[42],...t)}return a&&(n=new a(u(e))),{c(){t=D("div"),n&&de(n.$$.fragment),i=S(),F(t,"class","listItem"),F(t,"tabindex","-1")},m(e,a){b(e,t,a),n&&me(n,t,null),y(t,i),r=!0,s||(o=[_(t,"mouseover",l),_(t,"focus",h),_(t,"click",p)],s=!0)},p(r,s){e=r;const o={};if(2&s[0]&&(o.item=e[41]),8192&s[0]&&(o.filterText=e[13]),64&s[0]&&(o.getOptionLabel=e[6]),1538&s[0]&&(o.isActive=We(e[41],e[9],e[10])),6&s[0]&&(o.isHover=Ze(e[2],e[41],e[42],e[1])),2&s[0]&&(o.isSelectable=Qe(e[41])),a!==(a=e[4])){if(n){oe();const e=n;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}a?(n=new a(u(e)),de(n.$$.fragment),ue(n.$$.fragment,1),me(n,t,i)):n=null}else a&&n.$set(o)},i(e){r||(n&&ue(n.$$.fragment,e),r=!0)},o(e){n&&ce(n.$$.fragment,e),r=!1},d(e){e&&E(t),n&&ge(n),s=!1,c(o)}}}function Xe(e){let t,n,i=e[7](e[41])+"";return{c(){t=D("div"),n=A(i),F(t,"class","listGroupTitle svelte-1uyqfml")},m(e,i){b(e,t,i),y(t,n)},p(e,t){130&t[0]&&i!==(i=e[7](e[41])+"")&&O(n,i)},i:s,o:s,d(e){e&&E(t)}}}function qe(e){let t,n,i,r;const s=[Xe,Je],o=[];function a(e,t){return e[41].isGroupHeader&&!e[41].isSelectable?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=k()},m(e,n){o[t].m(e,n),b(e,i,n),r=!0},p(e,r){let u=t;t=a(e),t===u?o[t].p(e,r):(oe(),ce(o[u],1,1,(()=>{o[u]=null})),ae(),n=o[t],n?n.p(e,r):(n=o[t]=s[t](e),n.c()),ue(n,1),n.m(i.parentNode,i))},i(e){r||(ue(n),r=!0)},o(e){ce(n),r=!1},d(e){o[t].d(e),e&&E(i)}}}function Ve(e){let t,n,i,r,s;var o=e[4];function a(e){return{props:{item:e[41],filterText:e[13],getOptionLabel:e[6],isFirst:Ye(e[42]),isActive:We(e[41],e[9],e[10]),isHover:Ze(e[2],e[41],e[42],e[1]),isSelectable:Qe(e[41])}}}function u(){return e[26](e[42])}function l(){return e[27](e[42])}function h(...t){return e[28](e[41],e[42],...t)}return o&&(n=new o(a(e))),{c(){t=D("div"),n&&de(n.$$.fragment),F(t,"class","listItem")},m(e,o){b(e,t,o),n&&me(n,t,null),i=!0,r||(s=[_(t,"mouseover",u),_(t,"focus",l),_(t,"click",h)],r=!0)},p(i,r){e=i;const s={};if(1024&r[1]&&(s.item=e[41]),8192&r[0]&&(s.filterText=e[13]),64&r[0]&&(s.getOptionLabel=e[6]),2048&r[1]&&(s.isFirst=Ye(e[42])),1536&r[0]|1024&r[1]&&(s.isActive=We(e[41],e[9],e[10])),6&r[0]|3072&r[1]&&(s.isHover=Ze(e[2],e[41],e[42],e[1])),1024&r[1]&&(s.isSelectable=Qe(e[41])),o!==(o=e[4])){if(n){oe();const e=n;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}o?(n=new o(a(e)),de(n.$$.fragment),ue(n.$$.fragment,1),me(n,t,null)):n=null}else o&&n.$set(s)},i(e){i||(n&&ue(n.$$.fragment,e),i=!0)},o(e){n&&ce(n.$$.fragment,e),i=!1},d(e){e&&E(t),n&&ge(n),r=!1,c(s)}}}function Ge(e){let t,n,i,r,s,o;const a=[He,Ue],u=[];function l(e,t){return e[5]?0:1}return n=l(e),i=u[n]=a[n](e),{c(){t=D("div"),i.c(),F(t,"class","listContainer svelte-1uyqfml"),F(t,"style",e[14]),M(t,"virtualList",e[5])},m(i,a){b(i,t,a),u[n].m(t,null),e[32](t),r=!0,s||(o=[_(window,"keydown",e[17]),_(window,"resize",e[18])],s=!0)},p(e,s){let o=n;n=l(e),n===o?u[n].p(e,s):(oe(),ce(u[o],1,1,(()=>{u[o]=null})),ae(),i=u[n],i?i.p(e,s):(i=u[n]=a[n](e),i.c()),ue(i,1),i.m(t,null)),(!r||16384&s[0])&&F(t,"style",e[14]),32&s[0]&&M(t,"virtualList",e[5])},i(e){r||(ue(i),r=!0)},o(e){ce(i),r=!1},d(i){i&&E(t),u[n].d(),e[32](null),s=!1,c(o)}}}function We(e,t,n){return t&&t[n]===e[n]}function Ye(e){return 0===e}function Ze(e,t,n,i){return Qe(t)&&(e===n||1===i.length)}function Qe(e){return e.isGroupHeader&&e.isSelectable||e.selectable||!e.hasOwnProperty("selectable")}function et(e,t,n){const i=H();let r,s,{container:o}=t,{VirtualList:a=null}=t,{Item:u=je}=t,{isVirtualList:c=!1}=t,{items:l=[]}=t,{labelIdentifier:h="label"}=t,{getOptionLabel:p=((e,t)=>{if(e)return e.isCreator?`Create "${t}"`:e[h]})}=t,{getGroupHeaderLabel:f=null}=t,{itemHeight:d=40}=t,{hoverItemIndex:m=0}=t,{value:g}=t,{optionIdentifier:v="value"}=t,{hideEmptyState:y=!1}=t,{noOptionsMessage:x="No options"}=t,{isMulti:b=!1}=t,{activeItemIndex:E=0}=t,{filterText:w=""}=t,{parent:D=null}=t,{listPlacement:C=null}=t,{listAutoWidth:A=null}=t,{listOffset:S=5}=t,k=0,_=!1;function F(e){e.isCreator||i("itemSelected",e)}function T(e){_||n(2,m=e)}function B(e){const{item:t,i:r,event:s}=e;if(s.stopPropagation(),g&&!b&&g[v]===t[v])return O();t.isCreator?i("itemCreated",w):Qe(t)&&(n(19,E=r),n(2,m=r),F(t))}function O(){i("closeList")}async function L(e){if(c)return;let t=!0;for(;t;)e>0&&m===l.length-1?n(2,m=0):n(2,e<0&&0===m?m=l.length-1:m+=e),t=!Qe(l[m]);await W(),I("hover")}function I(e){if(c||!o)return;let t;const i=o.querySelector(`.listItem .${e}`);i&&(t=o.getBoundingClientRect().bottom-i.getBoundingClientRect().bottom),n(0,o.scrollTop-=t,o)}function N(){const{top:e,height:t,width:i}=D.getBoundingClientRect();n(14,s=""),n(14,s+=`min-width:${i}px;width:${A?"auto":"100%"};`),"top"===C||"auto"===C&&function(e){const t=e.getBoundingClientRect(),n={};return n.top=t.top<0,n.left=t.left<0,n.bottom=t.bottom>(window.innerHeight||document.documentElement.clientHeight),n.right=t.right>(window.innerWidth||document.documentElement.clientWidth),n.any=n.top||n.left||n.bottom||n.right,n}(D).bottom?n(14,s+=`bottom:${t+S}px;`):n(14,s+=`top:${t+S}px;`)}return U((()=>{if(l.length>0&&!b&&g){const e=l.findIndex((e=>e[v]===g[v]));e&&n(2,m=e)}I("active"),o.addEventListener("scroll",(()=>{clearTimeout(k),k=setTimeout((()=>{_=!1}),100)}),!1)})),$((()=>{l||n(1,l=[]),l!==r&&l.length>0&&n(2,m=0),r=l})),e.$$set=e=>{"container"in e&&n(0,o=e.container),"VirtualList"in e&&n(3,a=e.VirtualList),"Item"in e&&n(4,u=e.Item),"isVirtualList"in e&&n(5,c=e.isVirtualList),"items"in e&&n(1,l=e.items),"labelIdentifier"in e&&n(20,h=e.labelIdentifier),"getOptionLabel"in e&&n(6,p=e.getOptionLabel),"getGroupHeaderLabel"in e&&n(7,f=e.getGroupHeaderLabel),"itemHeight"in e&&n(8,d=e.itemHeight),"hoverItemIndex"in e&&n(2,m=e.hoverItemIndex),"value"in e&&n(9,g=e.value),"optionIdentifier"in e&&n(10,v=e.optionIdentifier),"hideEmptyState"in e&&n(11,y=e.hideEmptyState),"noOptionsMessage"in e&&n(12,x=e.noOptionsMessage),"isMulti"in e&&n(21,b=e.isMulti),"activeItemIndex"in e&&n(19,E=e.activeItemIndex),"filterText"in e&&n(13,w=e.filterText),"parent"in e&&n(22,D=e.parent),"listPlacement"in e&&n(23,C=e.listPlacement),"listAutoWidth"in e&&n(24,A=e.listAutoWidth),"listOffset"in e&&n(25,S=e.listOffset)},e.$$.update=()=>{4194305&e.$$.dirty[0]&&D&&o&&N()},[o,l,m,a,u,c,p,f,d,g,v,y,x,w,s,T,B,function(e){switch(e.key){case"Escape":e.preventDefault(),O();break;case"ArrowDown":e.preventDefault(),l.length&&L(1);break;case"ArrowUp":e.preventDefault(),l.length&&L(-1);break;case"Enter":if(e.preventDefault(),0===l.length)break;const t=l[m];if(g&&!b&&g[v]===t[v]){O();break}t.isCreator?i("itemCreated",w):(n(19,E=m),F(l[m]));break;case"Tab":if(e.preventDefault(),0===l.length)return O();if(g&&g[v]===l[m][v])return O();n(19,E=m),F(l[m])}},N,E,h,b,D,C,A,S,e=>T(e),e=>T(e),(e,t,n)=>B({item:e,i:t,event:n}),e=>T(e),e=>T(e),(e,t,n)=>B({item:e,i:t,event:n}),function(e){z[e?"unshift":"push"]((()=>{o=e,n(0,o)}))}]}const tt=class extends ye{constructor(e){super(),ve(this,e,et,Ge,h,{container:0,VirtualList:3,Item:4,isVirtualList:5,items:1,labelIdentifier:20,getOptionLabel:6,getGroupHeaderLabel:7,itemHeight:8,hoverItemIndex:2,value:9,optionIdentifier:10,hideEmptyState:11,noOptionsMessage:12,isMulti:21,activeItemIndex:19,filterText:13,parent:22,listPlacement:23,listAutoWidth:24,listOffset:25},Re,[-1,-1])}};function nt(e){x(e,"svelte-pu1q1n",".selection.svelte-pu1q1n{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}")}function it(e){let t,n=e[0](e[1])+"";return{c(){t=D("div"),F(t,"class","selection svelte-pu1q1n")},m(e,i){b(e,t,i),t.innerHTML=n},p(e,[i]){3&i&&n!==(n=e[0](e[1])+"")&&(t.innerHTML=n)},i:s,o:s,d(e){e&&E(t)}}}function rt(e,t,n){let{getSelectionLabel:i}=t,{item:r}=t;return e.$$set=e=>{"getSelectionLabel"in e&&n(0,i=e.getSelectionLabel),"item"in e&&n(1,r=e.item)},[i,r]}const st=class extends ye{constructor(e){super(),ve(this,e,rt,it,h,{getSelectionLabel:0,item:1},nt)}};function ot(e){x(e,"svelte-liu9pa",".multiSelectItem.svelte-liu9pa.svelte-liu9pa{background:var(--multiItemBG, #ebedef);margin:var(--multiItemMargin, 5px 5px 0 0);border-radius:var(--multiItemBorderRadius, 16px);height:var(--multiItemHeight, 32px);line-height:var(--multiItemHeight, 32px);display:flex;cursor:default;padding:var(--multiItemPadding, 0 10px 0 15px);max-width:100%}.multiSelectItem_label.svelte-liu9pa.svelte-liu9pa{margin:var(--multiLabelMargin, 0 5px 0 0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multiSelectItem.svelte-liu9pa.svelte-liu9pa:hover,.multiSelectItem.active.svelte-liu9pa.svelte-liu9pa{background-color:var(--multiItemActiveBG, #006fff);color:var(--multiItemActiveColor, #fff)}.multiSelectItem.disabled.svelte-liu9pa.svelte-liu9pa:hover{background:var(--multiItemDisabledHoverBg, #ebedef);color:var(--multiItemDisabledHoverColor, #c1c6cc)}.multiSelectItem_clear.svelte-liu9pa.svelte-liu9pa{border-radius:var(--multiClearRadius, 50%);background:var(--multiClearBG, #52616f);min-width:var(--multiClearWidth, 16px);max-width:var(--multiClearWidth, 16px);height:var(--multiClearHeight, 16px);position:relative;top:var(--multiClearTop, 8px);text-align:var(--multiClearTextAlign, center);padding:var(--multiClearPadding, 1px)}.multiSelectItem_clear.svelte-liu9pa.svelte-liu9pa:hover,.active.svelte-liu9pa .multiSelectItem_clear.svelte-liu9pa{background:var(--multiClearHoverBG, #fff)}.multiSelectItem_clear.svelte-liu9pa:hover svg.svelte-liu9pa,.active.svelte-liu9pa .multiSelectItem_clear svg.svelte-liu9pa{fill:var(--multiClearHoverFill, #006fff)}.multiSelectItem_clear.svelte-liu9pa svg.svelte-liu9pa{fill:var(--multiClearFill, #ebedef);vertical-align:top}")}function at(e,t,n){const i=e.slice();return i[9]=t[n],i[11]=n,i}function ut(e){let t,n,i;function r(...t){return e[6](e[11],...t)}return{c(){t=D("div"),t.innerHTML='',F(t,"class","multiSelectItem_clear svelte-liu9pa")},m(e,s){b(e,t,s),n||(i=_(t,"click",r),n=!0)},p(t,n){e=t},d(e){e&&E(t),n=!1,i()}}}function ct(e){let t,n,i,r,s,o,a,u=e[4](e[9])+"",c=!e[2]&&!e[3]&&ut(e);function l(...t){return e[7](e[11],...t)}return{c(){t=D("div"),n=D("div"),i=S(),c&&c.c(),r=S(),F(n,"class","multiSelectItem_label svelte-liu9pa"),F(t,"class",s="multiSelectItem "+(e[1]===e[11]?"active":"")+" "+(e[2]?"disabled":"")+" svelte-liu9pa")},m(e,s){b(e,t,s),y(t,n),n.innerHTML=u,y(t,i),c&&c.m(t,null),y(t,r),o||(a=_(t,"click",l),o=!0)},p(i,o){e=i,17&o&&u!==(u=e[4](e[9])+"")&&(n.innerHTML=u),e[2]||e[3]?c&&(c.d(1),c=null):c?c.p(e,o):(c=ut(e),c.c(),c.m(t,r)),6&o&&s!==(s="multiSelectItem "+(e[1]===e[11]?"active":"")+" "+(e[2]?"disabled":"")+" svelte-liu9pa")&&F(t,"class",s)},d(e){e&&E(t),c&&c.d(),o=!1,a()}}}function lt(e){let t,n=e[0],i=[];for(let t=0;t{"value"in e&&n(0,r=e.value),"activeValue"in e&&n(1,s=e.activeValue),"isDisabled"in e&&n(2,o=e.isDisabled),"multiFullItemClearable"in e&&n(3,a=e.multiFullItemClearable),"getSelectionLabel"in e&&n(4,u=e.getSelectionLabel)},[r,s,o,a,u,c,(e,t)=>c(e,t),(e,t)=>a?c(e,t):{}]}const pt=class extends ye{constructor(e){super(),ve(this,e,ht,lt,h,{value:0,activeValue:1,isDisabled:2,multiFullItemClearable:3,getSelectionLabel:4},ot)}};function ft(e){x(e,"svelte-g2cagw","svelte-virtual-list-viewport.svelte-g2cagw{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}svelte-virtual-list-contents.svelte-g2cagw,svelte-virtual-list-row.svelte-g2cagw{display:block}svelte-virtual-list-row.svelte-g2cagw{overflow:hidden}")}function dt(e,t,n){const i=e.slice();return i[23]=t[n],i}const mt=e=>({item:32&e,i:32&e,hoverItemIndex:2&e}),gt=e=>({item:e[23].data,i:e[23].index,hoverItemIndex:e[1]});function vt(e,t){let n,i,r;const s=t[15].default,o=function(e,t,n,i){if(e){const r=d(e,t,n,i);return e[0](r)}}(s,t,t[14],gt),a=o||function(e){let t;return{c(){t=A("Missing template")},m(e,n){b(e,t,n)},d(e){e&&E(t)}}}();return{key:e,first:null,c(){n=D("svelte-virtual-list-row"),a&&a.c(),i=S(),B(n,"class","svelte-g2cagw"),this.first=n},m(e,t){b(e,n,t),a&&a.m(n,null),y(n,i),r=!0},p(e,n){t=e,o&&o.p&&(!r||16418&n)&&function(e,t,n,i,r,s){if(r){const o=d(t,n,i,s);e.p(o,r)}}(o,s,t,t[14],r?function(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let i=0;i32){const t=[],n=e.ctx.length/32;for(let e=0;ee[23].index;for(let t=0;te[18].call(t)))},m(u,c){b(u,t,c),y(t,n);for(let e=0;e{e.source===n.contentWindow&&t()}))):(n.src="about:blank",n.onload=()=>{r=_(n.contentWindow,"resize",t)}),y(e,n),()=>{(i||r&&n.contentWindow)&&r(),E(n)}}(t,e[18].bind(t)),r=!0,s||(o=_(t,"scroll",e[8]),s=!0)},p(e,[i]){16418&i&&(c=e[5],oe(),a=function(e,t,n,i,r,s,o,a,u,c,l,h){let p=e.length,f=s.length,d=p;const m={};for(;d--;)m[e[d].key]=d;const g=[],v=new Map,y=new Map;for(d=f;d--;){const e=h(r,s,d),i=n(e);let a=o.get(i);a?a.p(e,t):(a=c(i,e),a.c()),v.set(i,g[d]=a),i in m&&y.set(i,Math.abs(d-m[i]))}const x=new Set,b=new Set;function E(e){ue(e,1),e.m(a,l),o.set(e.key,e),l=e.first,f--}for(;p&&f;){const t=g[f-1],n=e[p-1],i=t.key,r=n.key;t===n?(l=t.first,p--,f--):v.has(r)?!o.has(i)||x.has(i)?E(t):b.has(r)?p--:y.get(i)>y.get(r)?(b.add(i),E(t)):(x.add(r),p--):(u(n,o),p--)}for(;p--;){const t=e[p];v.has(t.key)||u(t,o)}for(;f;)E(g[f-1]);return g}(a,i,l,0,e,c,u,n,le,vt,null,dt),ae()),(!r||64&i)&&I(n,"padding-top",e[6]+"px"),(!r||128&i)&&I(n,"padding-bottom",e[7]+"px"),(!r||1&i)&&I(t,"height",e[0])},i(e){if(!r){for(let e=0;e{i=s.getElementsByTagName("svelte-virtual-list-row"),n(13,a=!0)})),e.$$set=e=>{"items"in e&&n(11,h=e.items),"height"in e&&n(0,p=e.height),"itemHeight"in e&&n(12,f=e.itemHeight),"hoverItemIndex"in e&&n(1,d=e.hoverItemIndex),"start"in e&&n(9,m=e.start),"end"in e&&n(10,g=e.end),"$$scope"in e&&n(14,l=e.$$scope)},e.$$.update=()=>{3584&e.$$.dirty&&n(5,o=h.slice(m,g).map(((e,t)=>({index:t+m,data:e})))),14340&e.$$.dirty&&a&&async function(e,t,s){const{scrollTop:o}=r;await W();let a=x-o,c=m;for(;ae){n(9,m=s),n(6,x=o);break}o+=t,s+=1}for(;se+y)););n(10,g=s);const a=h.length-g;for(u=o/g;s{s=e,n(4,s)}))},function(e){z[e?"unshift":"push"]((()=>{r=e,n(3,r)}))},function(){y=this.offsetHeight,n(2,y)}]}const bt=class extends ye{constructor(e){super(),ve(this,e,xt,yt,h,{items:11,height:0,itemHeight:12,hoverItemIndex:1,start:9,end:10},ft)}};function Et(e){let t,n;return{c(){t=C("svg"),n=C("path"),F(n,"fill","currentColor"),F(n,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),F(t,"width","100%"),F(t,"height","100%"),F(t,"viewBox","-2 -2 50 50"),F(t,"focusable","false"),F(t,"aria-hidden","true"),F(t,"role","presentation")},m(e,i){b(e,t,i),y(t,n)},p:s,i:s,o:s,d(e){e&&E(t)}}}const wt=class extends ye{constructor(e){super(),ve(this,e,null,Et,h,{})}};function Dt(e){x(e,"svelte-17l1npl",".selectContainer.svelte-17l1npl.svelte-17l1npl{--internalPadding:0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--borderRadius, 3px);box-sizing:border-box;height:var(--height, 42px);position:relative;display:flex;align-items:center;padding:var(--padding, var(--internalPadding));background:var(--background, #fff);margin:var(--margin, 0)}.selectContainer.svelte-17l1npl input.svelte-17l1npl{cursor:default;border:none;color:var(--inputColor, #3f4f5f);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--inputPadding, var(--padding, var(--internalPadding)));width:100%;background:transparent;font-size:var(--inputFontSize, 14px);letter-spacing:var(--inputLetterSpacing, -0.08px);position:absolute;left:var(--inputLeft, 0);margin:var(--inputMargin, 0)}.selectContainer.svelte-17l1npl input.svelte-17l1npl::placeholder{color:var(--placeholderColor, #78848f);opacity:var(--placeholderOpacity, 1)}.selectContainer.svelte-17l1npl input.svelte-17l1npl:focus{outline:none}.selectContainer.svelte-17l1npl.svelte-17l1npl:hover{border-color:var(--borderHoverColor, #b2b8bf)}.selectContainer.focused.svelte-17l1npl.svelte-17l1npl{border-color:var(--borderFocusColor, #006fe8)}.selectContainer.disabled.svelte-17l1npl.svelte-17l1npl{background:var(--disabledBackground, #ebedef);border-color:var(--disabledBorderColor, #ebedef);color:var(--disabledColor, #c1c6cc)}.selectContainer.disabled.svelte-17l1npl input.svelte-17l1npl::placeholder{color:var(--disabledPlaceholderColor, #c1c6cc);opacity:var(--disabledPlaceholderOpacity, 1)}.selectedItem.svelte-17l1npl.svelte-17l1npl{line-height:var(--height, 42px);height:var(--height, 42px);overflow-x:hidden;padding:var(--selectedItemPadding, 0 20px 0 0)}.selectedItem.svelte-17l1npl.svelte-17l1npl:focus{outline:none}.clearSelect.svelte-17l1npl.svelte-17l1npl{position:absolute;right:var(--clearSelectRight, 10px);top:var(--clearSelectTop, 11px);bottom:var(--clearSelectBottom, 11px);width:var(--clearSelectWidth, 20px);color:var(--clearSelectColor, #c5cacf);flex:none !important}.clearSelect.svelte-17l1npl.svelte-17l1npl:hover{color:var(--clearSelectHoverColor, #2c3e50)}.selectContainer.focused.svelte-17l1npl .clearSelect.svelte-17l1npl{color:var(--clearSelectFocusColor, #3f4f5f)}.indicator.svelte-17l1npl.svelte-17l1npl{position:absolute;right:var(--indicatorRight, 10px);top:var(--indicatorTop, 11px);width:var(--indicatorWidth, 20px);height:var(--indicatorHeight, 20px);color:var(--indicatorColor, #c5cacf)}.indicator.svelte-17l1npl svg.svelte-17l1npl{display:inline-block;fill:var(--indicatorFill, currentcolor);line-height:1;stroke:var(--indicatorStroke, currentcolor);stroke-width:0}.spinner.svelte-17l1npl.svelte-17l1npl{position:absolute;right:var(--spinnerRight, 10px);top:var(--spinnerLeft, 11px);width:var(--spinnerWidth, 20px);height:var(--spinnerHeight, 20px);color:var(--spinnerColor, #51ce6c);animation:svelte-17l1npl-rotate 0.75s linear infinite}.spinner_icon.svelte-17l1npl.svelte-17l1npl{display:block;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;-webkit-transform:none}.spinner_path.svelte-17l1npl.svelte-17l1npl{stroke-dasharray:90;stroke-linecap:round}.multiSelect.svelte-17l1npl.svelte-17l1npl{display:flex;padding:var(--multiSelectPadding, 0 35px 0 16px);height:auto;flex-wrap:wrap;align-items:stretch}.multiSelect.svelte-17l1npl>.svelte-17l1npl{flex:1 1 50px}.selectContainer.multiSelect.svelte-17l1npl input.svelte-17l1npl{padding:var(--multiSelectInputPadding, 0);position:relative;margin:var(--multiSelectInputMargin, 0)}.hasError.svelte-17l1npl.svelte-17l1npl{border:var(--errorBorder, 1px solid #ff2d55);background:var(--errorBackground, #fff)}.a11yText.svelte-17l1npl.svelte-17l1npl{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}@keyframes svelte-17l1npl-rotate{100%{transform:rotate(360deg)}}")}function Ct(e,t,n){const i=e.slice();return i[103]=t[n],i}function At(e){let t,n,i,r,s;return{c(){t=D("span"),n=A(e[33]),i=S(),r=D("span"),s=A(e[32]),F(t,"id","aria-selection"),F(r,"id","aria-context")},m(e,o){b(e,t,o),y(t,n),b(e,i,o),b(e,r,o),y(r,s)},p(e,t){4&t[1]&&O(n,e[33]),2&t[1]&&O(s,e[32])},d(e){e&&E(t),e&&E(i),e&&E(r)}}}function St(e){let t,n,i;const r=[e[18]];var s=e[17];function a(e){let t={};for(let e=0;e{ge(e,1)})),ae()}s?(t=new s(a()),de(t.$$.fragment),ue(t.$$.fragment,1),me(t,n.parentNode,n)):t=null}else s&&t.$set(o)},i(e){i||(t&&ue(t.$$.fragment,e),i=!0)},o(e){t&&ce(t.$$.fragment,e),i=!1},d(e){e&&E(n),t&&ge(t,e)}}}function kt(e){let t,n,i;var r=e[26];function s(e){return{props:{value:e[2],getSelectionLabel:e[12],activeValue:e[30],isDisabled:e[9],multiFullItemClearable:e[8]}}}return r&&(t=new r(s(e)),t.$on("multiItemClear",e[38]),t.$on("focus",e[40])),{c(){t&&de(t.$$.fragment),n=k()},m(e,r){t&&me(t,e,r),b(e,n,r),i=!0},p(e,i){const o={};if(4&i[0]&&(o.value=e[2]),4096&i[0]&&(o.getSelectionLabel=e[12]),1073741824&i[0]&&(o.activeValue=e[30]),512&i[0]&&(o.isDisabled=e[9]),256&i[0]&&(o.multiFullItemClearable=e[8]),r!==(r=e[26])){if(t){oe();const e=t;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}r?(t=new r(s(e)),t.$on("multiItemClear",e[38]),t.$on("focus",e[40]),de(t.$$.fragment),ue(t.$$.fragment,1),me(t,n.parentNode,n)):t=null}else r&&t.$set(o)},i(e){i||(t&&ue(t.$$.fragment,e),i=!0)},o(e){t&&ce(t.$$.fragment,e),i=!1},d(e){e&&E(n),t&&ge(t,e)}}}function _t(e){let t,n,i,r,s;var o=e[25];function a(e){return{props:{item:e[2],getSelectionLabel:e[12]}}}return o&&(n=new o(a(e))),{c(){t=D("div"),n&&de(n.$$.fragment),F(t,"class","selectedItem svelte-17l1npl")},m(o,a){b(o,t,a),n&&me(n,t,null),i=!0,r||(s=_(t,"focus",e[40]),r=!0)},p(e,i){const r={};if(4&i[0]&&(r.item=e[2]),4096&i[0]&&(r.getSelectionLabel=e[12]),o!==(o=e[25])){if(n){oe();const e=n;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}o?(n=new o(a(e)),de(n.$$.fragment),ue(n.$$.fragment,1),me(n,t,null)):n=null}else o&&n.$set(r)},i(e){i||(n&&ue(n.$$.fragment,e),i=!0)},o(e){n&&ce(n.$$.fragment,e),i=!1},d(e){e&&E(t),n&&ge(n),r=!1,s()}}}function Ft(e){let t,n,i,r,s;var o=e[23];return o&&(n=new o({})),{c(){t=D("div"),n&&de(n.$$.fragment),F(t,"class","clearSelect svelte-17l1npl"),F(t,"aria-hidden","true")},m(o,a){var u;b(o,t,a),n&&me(n,t,null),i=!0,r||(s=_(t,"click",(u=e[27],function(e){return e.preventDefault(),u.call(this,e)})),r=!0)},p(e,i){if(o!==(o=e[23])){if(n){oe();const e=n;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}o?(n=new o({}),de(n.$$.fragment),ue(n.$$.fragment,1),me(n,t,null)):n=null}},i(e){i||(n&&ue(n.$$.fragment,e),i=!0)},o(e){n&&ce(n.$$.fragment,e),i=!1},d(e){e&&E(t),n&&ge(n),r=!1,s()}}}function Tt(e){let t;function n(e,t){return e[22]?Ot:Bt}let i=n(e),r=i(e);return{c(){t=D("div"),r.c(),F(t,"class","indicator svelte-17l1npl"),F(t,"aria-hidden","true")},m(e,n){b(e,t,n),r.m(t,null)},p(e,s){i===(i=n(e))&&r?r.p(e,s):(r.d(1),r=i(e),r&&(r.c(),r.m(t,null)))},d(e){e&&E(t),r.d()}}}function Bt(e){let t,n;return{c(){t=C("svg"),n=C("path"),F(n,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),F(t,"width","100%"),F(t,"height","100%"),F(t,"viewBox","0 0 20 20"),F(t,"focusable","false"),F(t,"aria-hidden","true"),F(t,"class","svelte-17l1npl")},m(e,i){b(e,t,i),y(t,n)},p:s,d(e){e&&E(t)}}}function Ot(e){let t,n;return{c(){t=new P,n=k(),t.a=n},m(i,r){t.m(e[22],i,r),b(i,n,r)},p(e,n){4194304&n[0]&&t.p(e[22])},d(e){e&&E(n),e&&t.d()}}}function Lt(e){let t;return{c(){t=D("div"),t.innerHTML='',F(t,"class","spinner svelte-17l1npl")},m(e,n){b(e,t,n)},d(e){e&&E(t)}}}function It(e){let t,n,i,r;const s=[e[34]];function a(t){e[84](t)}var u=e[24];function c(e){let t={};for(let e=0;efe(t,"hoverItemIndex",a))),t.$on("itemSelected",e[43]),t.$on("itemCreated",e[44]),t.$on("closeList",e[45])),{c(){t&&de(t.$$.fragment),i=k()},m(e,n){t&&me(t,e,n),b(e,i,n),r=!0},p(e,r){const o=8&r[1]?he(s,[pe(e[34])]):{};if(!n&&268435456&r[0]&&(n=!0,o.hoverItemIndex=e[28],Z((()=>n=!1))),u!==(u=e[24])){if(t){oe();const e=t;ce(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}u?(t=new u(c(e)),z.push((()=>fe(t,"hoverItemIndex",a))),t.$on("itemSelected",e[43]),t.$on("itemCreated",e[44]),t.$on("closeList",e[45]),de(t.$$.fragment),ue(t.$$.fragment,1),me(t,i.parentNode,i)):t=null}else u&&t.$set(o)},i(e){r||(t&&ue(t.$$.fragment,e),r=!0)},o(e){t&&ce(t.$$.fragment,e),r=!1},d(e){e&&E(i),t&&ge(t,e)}}}function Nt(e){let t,n,i;return{c(){t=D("input"),F(t,"name",n=e[16].name),F(t,"type","hidden"),t.value=i=e[2]?e[12](e[2]):null,F(t,"class","svelte-17l1npl")},m(e,n){b(e,t,n)},p(e,r){65536&r[0]&&n!==(n=e[16].name)&&F(t,"name",n),4100&r[0]&&i!==(i=e[2]?e[12](e[2]):null)&&(t.value=i)},d(e){e&&E(t)}}}function Mt(e){let t,n=e[2],i=[];for(let t=0;t{k=null})),ae()),e[35]?B?(B.p(e,i),16&i[1]&&ue(B,1)):(B=kt(e),B.c(),ue(B,1),B.m(t,s)):B&&(oe(),ce(B,1,1,(()=>{B=null})),ae()),T(a,I=he(O,[(!x||8192&i[0]&&u!==(u=!e[13]))&&{readOnly:u},1&i[1]&&e[31],(!x||32&i[1])&&{placeholder:e[36]},(!x||16384&i[0])&&{style:e[14]},(!x||512&i[0])&&{disabled:e[9]}])),8&i[0]&&a.value!==e[3]&&L(a,e[3]),M(a,"svelte-17l1npl",!0),!e[7]&&e[29]?N?(N.p(e,i),536871040&i[0]&&ue(N,1)):(N=_t(e),N.c(),ue(N,1),N.m(t,h)):N&&(oe(),ce(N,1,1,(()=>{N=null})),ae()),e[37]?P?(P.p(e,i),64&i[1]&&ue(P,1)):(P=Ft(e),P.c(),ue(P,1),P.m(t,p)):P&&(oe(),ce(P,1,1,(()=>{P=null})),ae()),e[37]||!(e[20]||e[19]&&!e[2])&&(e[13]||e[9]||e[4]||(!e[29]||e[15])&&e[29])?j&&(j.d(1),j=null):j?j.p(e,i):(j=Tt(e),j.c(),j.m(t,f)),e[4]?R||(R=Lt(),R.c(),R.m(t,d)):R&&(R.d(1),R=null),e[5]?$?($.p(e,i),32&i[0]&&ue($,1)):($=It(e),$.c(),ue($,1),$.m(t,m)):$&&(oe(),ce($,1,1,(()=>{$=null})),ae()),!e[7]||e[7]&&!e[35]?U?U.p(e,i):(U=Nt(e),U.c(),U.m(t,g)):U&&(U.d(1),U=null),e[7]&&e[35]?H?H.p(e,i):(H=Mt(e),H.c(),H.m(t,null)):H&&(H.d(1),H=null),(!x||2097152&i[0]&&v!==(v="selectContainer "+e[21]+" svelte-17l1npl"))&&F(t,"class",v),(!x||2048&i[0])&&F(t,"style",e[11]),2098176&i[0]&&M(t,"hasError",e[10]),2097280&i[0]&&M(t,"multiSelect",e[7]),2097664&i[0]&&M(t,"disabled",e[9]),2097154&i[0]&&M(t,"focused",e[1])},i(e){x||(ue(k),ue(B),ue(N),ue(P),ue($),x=!0)},o(e){ce(k),ce(B),ce(N),ce(P),ce($),x=!1},d(n){n&&E(t),A&&A.d(),k&&k.d(),B&&B.d(),e[82](null),N&&N.d(),P&&P.d(),j&&j.d(),R&&R.d(),$&&$.d(),U&&U.d(),H&&H.d(),e[85](null),w=!1,c(C)}}}function Rt(e){return e.map(((e,t)=>({index:t,value:e,label:`${e}`})))}function $t(e,t,n){let i,r,s,o,a,u,c,l;const h=H();let{id:p=null}=t,{container:f}=t,{input:d}=t,{isMulti:m=!1}=t,{multiFullItemClearable:g=!1}=t,{isDisabled:v=!1}=t,{isCreatable:y=!1}=t,{isFocused:x=!1}=t,{value:b=null}=t,{filterText:E=""}=t,{placeholder:w="Select..."}=t,{placeholderAlwaysShow:D=!1}=t,{items:C=null}=t,{itemFilter:A=((e,t,n)=>`${e}`.toLowerCase().includes(t.toLowerCase()))}=t,{groupBy:S}=t,{groupFilter:k=(e=>e)}=t,{isGroupHeaderSelectable:_=!1}=t,{getGroupHeaderLabel:F=(e=>e[T]||e.id)}=t,{labelIdentifier:T="label"}=t,{getOptionLabel:B=((e,t)=>e.isCreator?`Create "${t}"`:e[T])}=t,{optionIdentifier:O="value"}=t,{loadOptions:L}=t,{hasError:I=!1}=t,{containerStyles:N=""}=t,{getSelectionLabel:M=(e=>e?e[T]:null)}=t,{createGroupHeaderItem:P=(e=>({value:e,label:e}))}=t,{createItem:j=(e=>({value:e,label:e}))}=t,{isSearchable:R=!0}=t,{inputStyles:K=""}=t,{isClearable:J=!0}=t,{isWaiting:X=!1}=t,{listPlacement:q="auto"}=t,{listOpen:V=!1}=t,{isVirtualList:G=!1}=t,{loadOptionsInterval:W=300}=t,{noOptionsMessage:Y="No options"}=t,{hideEmptyState:Z=!1}=t,{inputAttributes:Q={}}=t,{listAutoWidth:ee=!0}=t,{itemHeight:te=40}=t,{Icon:ne}=t,{iconProps:ie={}}=t,{showChevron:re=!1}=t,{showIndicator:se=!1}=t,{containerClasses:oe=""}=t,{indicatorSvg:ae}=t,{listOffset:ue=5}=t,{ClearIcon:ce=wt}=t,{Item:le=je}=t,{List:he=tt}=t,{Selection:pe=st}=t,{MultiSelection:fe=pt}=t,{VirtualList:de=bt}=t;function me(e,t){if(0===t.length)return e;const n=j(t);return e[0]&&t===e[0][T]?e:(n.isCreator=!0,[...e,n])}let ge,ve,ye,xe,be,Ee,{selectedValue:we=null}=t;const De=function(e,t,n){let i;return function(){let r=this,s=arguments,o=function(){i=null,e.apply(r,s)},a=n;clearTimeout(i),i=setTimeout(o,t),a&&e.apply(r,s)}}((async()=>{n(4,X=!0);let e=await L(E).catch((e=>{console.warn("svelte-select loadOptions error :>> ",e),h("error",{type:"loadOptions",details:e})}));e&&!e.cancelled&&(e?(e&&e.length>0&&"object"!=typeof e[0]&&(e=Rt(e)),n(81,i=[...e]),h("loaded",{items:i})):n(81,i=[]),y&&n(81,i=me(i,E)),n(4,X=!1),n(1,x=!0),n(5,V=!0))}),W);let Ce;function Ae(){let e=!0;if(b){const t=[],i=[];b.forEach((n=>{t.includes(n[O])?e=!1:(t.push(n[O]),i.push(n))})),e||n(2,b=i)}return e}function Se(e){let t=e?e[O]:b[O];return C.find((e=>e[O]===t))}function ke(e){const{detail:t}=e,i=b[t?t.i:b.length-1];1===b.length?n(2,b=void 0):n(2,b=b.filter((e=>e!==i))),h("clear",i)}function _e(){n(1,x=!0),d&&d.focus()}$((async()=>{n(77,ve=b),n(78,ye=E),n(79,xe=x),n(80,be=m)})),U((()=>{x&&d&&d.focus()}));let{ariaValues:Fe=(e=>`Option ${e}, selected.`)}=t,{ariaListOpen:Te=((e,t)=>`You are currently focused on option ${e}. There are ${t} results available.`)}=t,{ariaFocused:Be=(()=>"Select is focused, type to refine list, press down to open the menu.")}=t;return e.$$set=e=>{"id"in e&&n(46,p=e.id),"container"in e&&n(0,f=e.container),"input"in e&&n(6,d=e.input),"isMulti"in e&&n(7,m=e.isMulti),"multiFullItemClearable"in e&&n(8,g=e.multiFullItemClearable),"isDisabled"in e&&n(9,v=e.isDisabled),"isCreatable"in e&&n(47,y=e.isCreatable),"isFocused"in e&&n(1,x=e.isFocused),"value"in e&&n(2,b=e.value),"filterText"in e&&n(3,E=e.filterText),"placeholder"in e&&n(48,w=e.placeholder),"placeholderAlwaysShow"in e&&n(49,D=e.placeholderAlwaysShow),"items"in e&&n(50,C=e.items),"itemFilter"in e&&n(51,A=e.itemFilter),"groupBy"in e&&n(52,S=e.groupBy),"groupFilter"in e&&n(53,k=e.groupFilter),"isGroupHeaderSelectable"in e&&n(54,_=e.isGroupHeaderSelectable),"getGroupHeaderLabel"in e&&n(55,F=e.getGroupHeaderLabel),"labelIdentifier"in e&&n(56,T=e.labelIdentifier),"getOptionLabel"in e&&n(57,B=e.getOptionLabel),"optionIdentifier"in e&&n(58,O=e.optionIdentifier),"loadOptions"in e&&n(59,L=e.loadOptions),"hasError"in e&&n(10,I=e.hasError),"containerStyles"in e&&n(11,N=e.containerStyles),"getSelectionLabel"in e&&n(12,M=e.getSelectionLabel),"createGroupHeaderItem"in e&&n(60,P=e.createGroupHeaderItem),"createItem"in e&&n(61,j=e.createItem),"isSearchable"in e&&n(13,R=e.isSearchable),"inputStyles"in e&&n(14,K=e.inputStyles),"isClearable"in e&&n(15,J=e.isClearable),"isWaiting"in e&&n(4,X=e.isWaiting),"listPlacement"in e&&n(63,q=e.listPlacement),"listOpen"in e&&n(5,V=e.listOpen),"isVirtualList"in e&&n(64,G=e.isVirtualList),"loadOptionsInterval"in e&&n(65,W=e.loadOptionsInterval),"noOptionsMessage"in e&&n(66,Y=e.noOptionsMessage),"hideEmptyState"in e&&n(67,Z=e.hideEmptyState),"inputAttributes"in e&&n(16,Q=e.inputAttributes),"listAutoWidth"in e&&n(68,ee=e.listAutoWidth),"itemHeight"in e&&n(69,te=e.itemHeight),"Icon"in e&&n(17,ne=e.Icon),"iconProps"in e&&n(18,ie=e.iconProps),"showChevron"in e&&n(19,re=e.showChevron),"showIndicator"in e&&n(20,se=e.showIndicator),"containerClasses"in e&&n(21,oe=e.containerClasses),"indicatorSvg"in e&&n(22,ae=e.indicatorSvg),"listOffset"in e&&n(70,ue=e.listOffset),"ClearIcon"in e&&n(23,ce=e.ClearIcon),"Item"in e&&n(71,le=e.Item),"List"in e&&n(24,he=e.List),"Selection"in e&&n(25,pe=e.Selection),"MultiSelection"in e&&n(26,fe=e.MultiSelection),"VirtualList"in e&&n(72,de=e.VirtualList),"selectedValue"in e&&n(73,we=e.selectedValue),"ariaValues"in e&&n(74,Fe=e.ariaValues),"ariaListOpen"in e&&n(75,Te=e.ariaListOpen),"ariaFocused"in e&&n(76,Be=e.ariaFocused)},e.$$.update=()=>{140&e.$$.dirty[0]|405340160&e.$$.dirty[1]&&n(81,i=function(e){if(e.loadOptions&&e.filterText.length>0)return;if(!e.items)return[];e.items&&e.items.length>0&&"object"!=typeof e.items[0]&&(e.items=Rt(e.items));let t=e.items.filter((t=>{let n=A(B(t,e.filterText),e.filterText,t);return n&&e.isMulti&&e.value&&Array.isArray(e.value)&&(n=!e.value.some((n=>n[e.optionIdentifier]===t[e.optionIdentifier]))),n}));return e.groupBy&&(t=function(e){const t=[],n={};e.forEach((e=>{const i=S(e);t.includes(i)||(t.push(i),n[i]=[],i&&n[i].push(Object.assign(P(i,e),{id:i,isGroupHeader:!0,isSelectable:_}))),n[i].push(Object.assign({isGroupItem:!!i},e))}));const i=[];return k(t).forEach((e=>{i.push(...n[e])})),i}(t)),e.isCreatable&&(t=me(t,e.filterText)),t}({loadOptions:L,filterText:E,items:C,value:b,isMulti:m,optionIdentifier:O,groupBy:S,isCreatable:y})),2048&e.$$.dirty[2]&&we&&console.warn("selectedValue is no longer used. Please use value instead."),524288&e.$$.dirty[1]&&function(e){e&&0!==e.length&&!e.some((e=>"object"!=typeof e))&&b&&(m?!b.some((e=>!e||!e[O])):b[O])&&(Array.isArray(b)?n(2,b=b.map((e=>Se(e)||e))):n(2,b=Se()||b))}(C),4&e.$$.dirty[0]&&b&&("string"==typeof b?n(2,b={[O]:b,label:b}):m&&Array.isArray(b)&&b.length>0&&n(2,b=b.map((e=>"string"==typeof e?{value:e,label:e}:e)))),73728&e.$$.dirty[0]&&(!Q&&R||(n(31,Ce=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},Q)),p&&n(31,Ce.id=p,Ce),R||n(31,Ce.readonly=!0,Ce))),128&e.$$.dirty[0]|262144&e.$$.dirty[2]&&(m&&b&&(Array.isArray(b)?n(2,b=[...b]):n(2,b=[b])),be&&!m&&b&&n(2,b=null)),132&e.$$.dirty[0]&&m&&b&&b.length>1&&Ae(),4&e.$$.dirty[0]&&b&&(m?JSON.stringify(b)!==JSON.stringify(ve)&&Ae()&&h("select",b):ve&&JSON.stringify(b[O])===JSON.stringify(ve[O])||h("select",b)),132&e.$$.dirty[0]|32768&e.$$.dirty[2]&&!b&&m&&ve&&h("select",b),2&e.$$.dirty[0]|131072&e.$$.dirty[2]&&x!==xe&&(x||V?_e():d&&d.blur()),8&e.$$.dirty[0]|65536&e.$$.dirty[2]&&E!==ye&&0!==E.length&&(n(1,x=!0),n(5,V=!0),L?De():(n(5,V=!0),m&&n(30,ge=void 0))),12&e.$$.dirty[0]&&n(29,r=b&&0===E.length),536904208&e.$$.dirty[0]&&n(37,s=r&&J&&!v&&!X),132&e.$$.dirty[0]|393216&e.$$.dirty[1]&&n(36,o=D&&m?w:b?"":w),132&e.$$.dirty[0]&&n(35,a=m&&b&&b.length>0),141&e.$$.dirty[0]|218103808&e.$$.dirty[1]|526326&e.$$.dirty[2]&&n(34,u={Item:le,filterText:E,optionIdentifier:O,noOptionsMessage:Y,hideEmptyState:Z,isVirtualList:G,VirtualList:de,value:b,isMulti:m,getGroupHeaderLabel:F,items:i,itemHeight:te,getOptionLabel:B,listPlacement:q,parent:f,listAutoWidth:ee,listOffset:ue}),132&e.$$.dirty[0]&&n(33,c=b?function(){let e;return e=m&&b.length>0?b.map((e=>M(e))).join(", "):M(b),Fe(e)}():""),268435490&e.$$.dirty[0]|524288&e.$$.dirty[2]&&n(32,l=function(){if(!x||!i||0===i.length)return"";let e=i[Ee];if(V&&e){let t=M(e),n=i?i.length:0;return Te(t,n)}return Be()}())},[f,x,b,E,X,V,d,m,g,v,I,N,M,R,K,J,Q,ne,ie,re,se,oe,ae,ce,he,pe,fe,function(){n(2,b=void 0),n(5,V=!1),h("clear",b),_e()},Ee,r,ge,Ce,l,c,u,a,o,s,ke,function(e){if(x)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),n(5,V=!0),n(30,ge=void 0);break;case"Tab":V||n(1,x=!1);break;case"Backspace":if(!m||E.length>0)return;if(m&&b&&b.length>0){if(ke(void 0!==ge?ge:b.length-1),0===ge||void 0===ge)break;n(30,ge=b.length>ge?ge-1:void 0)}break;case"ArrowLeft":if(!m||E.length>0)return;void 0===ge?n(30,ge=b.length-1):b.length>ge&&0!==ge&&n(30,ge-=1);break;case"ArrowRight":if(!m||E.length>0||void 0===ge)return;ge===b.length-1?n(30,ge=void 0):ge0?e.path[0]:e.target;f.contains(t)||(n(1,x=!1),n(5,V=!1),n(30,ge=void 0),d&&d.blur())},function(){v||(n(1,x=!0),n(5,V=!V))},function(e){const{detail:t}=e;if(t){n(3,E="");const e=Object.assign({},t);e.isGroupHeader&&!e.isSelectable||(n(2,b=m?b?b.concat([e]):[e]:e),n(2,b),setTimeout((()=>{n(5,V=!1),n(30,ge=void 0)})))}},function(e){const{detail:t}=e;m?(n(2,b=b||[]),n(2,b=[...b,j(t)])):n(2,b=j(t)),h("itemCreated",t),n(3,E=""),n(5,V=!1),n(30,ge=void 0)},function(){n(3,E=""),n(5,V=!1)},p,y,w,D,C,A,S,k,_,F,T,B,O,L,P,j,()=>i,q,G,W,Y,Z,ee,te,ue,le,de,we,Fe,Te,Be,ve,ye,xe,be,i,function(e){z[e?"unshift":"push"]((()=>{d=e,n(6,d)}))},function(){E=this.value,n(3,E)},function(e){Ee=e,n(28,Ee)},function(e){z[e?"unshift":"push"]((()=>{f=e,n(0,f)}))}]}const Ut=class extends ye{constructor(e){super(),ve(this,e,$t,jt,h,{id:46,container:0,input:6,isMulti:7,multiFullItemClearable:8,isDisabled:9,isCreatable:47,isFocused:1,value:2,filterText:3,placeholder:48,placeholderAlwaysShow:49,items:50,itemFilter:51,groupBy:52,groupFilter:53,isGroupHeaderSelectable:54,getGroupHeaderLabel:55,labelIdentifier:56,getOptionLabel:57,optionIdentifier:58,loadOptions:59,hasError:10,containerStyles:11,getSelectionLabel:12,createGroupHeaderItem:60,createItem:61,getFilteredItems:62,isSearchable:13,inputStyles:14,isClearable:15,isWaiting:4,listPlacement:63,listOpen:5,isVirtualList:64,loadOptionsInterval:65,noOptionsMessage:66,hideEmptyState:67,inputAttributes:16,listAutoWidth:68,itemHeight:69,Icon:17,iconProps:18,showChevron:19,showIndicator:20,containerClasses:21,indicatorSvg:22,listOffset:70,ClearIcon:23,Item:71,List:24,Selection:25,MultiSelection:26,VirtualList:72,selectedValue:73,handleClear:27,ariaValues:74,ariaListOpen:75,ariaFocused:76},Dt,[-1,-1,-1,-1])}get getFilteredItems(){return this.$$.ctx[62]}get handleClear(){return this.$$.ctx[27]}};function Ht(e){x(e,"svelte-1s90b1",".ow-info.svelte-1s90b1{padding-top:0px;border-top:0px !important}.ow-dropdown.svelte-1s90b1{width:500px !important}.ow-themed.svelte-1s90b1{--border:3px solid var(--background-modifier-border) !important;--borderRadius:3px;--placeholderColor:var(--text-muted) !important;--background:var(--background-secondary-alt) !important;--itemColor:var(--text-normal) !important;--itemHoverBG:var(--interactive-accent-hover) !important;--itemHoverColor:var(--text-on-accent) !important;--listBackground:var(--interactive-normal) !important}")}function Kt(e){let t,n,i,r,s,o,a,u,c,l,h,p,f,d,m,g,v,x;function w(t){e[7](t)}let C={isMulti:!0,optionIdentifier:zt,labelIdentifier:Jt,items:e[0]};return void 0!==e[2]&&(C.value=e[2]),o=new Ut({props:C}),z.push((()=>fe(o,"value",w))),o.$on("select",e[5]),o.$on("clear",e[6]),{c(){t=D("div"),n=D("div"),i=D("div"),r=D("div"),s=D("p"),de(o.$$.fragment),u=S(),c=D("div"),l=D("div"),h=D("div"),h.textContent=`${e[4]}`,p=S(),f=D("div"),d=D("button"),m=A("Sync"),F(r,"class","ow-dropdown ow-themed svelte-1s90b1"),F(i,"class","setting-item-description"),F(n,"class","setting-item-info"),F(t,"class","setting-item"),F(h,"class","setting-item-description"),F(l,"class","setting-item-info"),F(d,"class","mod-cta"),d.disabled=e[3],I(d,"float","right"),F(f,"class","setting-item-control"),F(c,"class","setting-item ow-info svelte-1s90b1")},m(a,E){b(a,t,E),y(t,n),y(n,i),y(i,r),y(r,s),me(o,s,null),b(a,u,E),b(a,c,E),y(c,l),y(l,h),y(c,p),y(c,f),y(f,d),y(d,m),g=!0,v||(x=_(d,"click",e[8]),v=!0)},p(e,[t]){const n={};1&t&&(n.items=e[0]),!a&&4&t&&(a=!0,n.value=e[2],Z((()=>a=!1))),o.$set(n),(!g||8&t)&&(d.disabled=e[3])},i(e){g||(ue(o.$$.fragment,e),g=!0)},o(e){ce(o.$$.fragment,e),g=!1},d(e){e&&E(t),ge(o),e&&E(u),e&&E(c),v=!1,x()}}}const zt="uri",Jt="filename";function Xt(e,t,n){let i,{deletedFiles:r}=t,{onSubmit:s}=t,o=!0,a=0===r.length?"No deleted file(s) found...":"Select file(s) to resync from Hypothes.is";return e.$$set=e=>{"deletedFiles"in e&&n(0,r=e.deletedFiles),"onSubmit"in e&&n(1,s=e.onSubmit)},[r,s,i,o,a,function(e){n(3,o=!i)},function(e){n(3,o=!i)},function(e){i=e,n(2,i)},()=>s({selected:i})]}const qt=class extends ye{constructor(e){super(),ve(this,e,Xt,Kt,h,{deletedFiles:0,onSubmit:1},Ht)}};var Vt=__webpack_require__(8214),Gt=__webpack_require__.n(Vt);const Wt=e=>{for(e=(e=e.replaceAll("\n"," ")).replace("\t"," ");e.contains(" ");)e=e.replaceAll(" "," ");return e},Yt=t=>{const n=f(_e).dateTimeFormat,i=f(_e).groups,r=t.reduce(((t,r)=>{var s;const o=r.uri,a=Gt()(o);if(o.startsWith("urn:x-pdf"))return t;const u=i.find((e=>e.id==r.group));if(!u.selected)return t;const c=(null===(s=r.document.title)||void 0===s?void 0:s[0])||(e=>{let t=new URL(e).pathname;return t=t.slice(1),t.endsWith("/")&&(t=t.slice(0,t.length-1)),t.replaceAll("/","-")})(o),l=(e=>new URL(e).hostname.replace("www.",""))(o);t[a]||(t[a]={id:a,metadata:{title:c,url:o,author:l},highlights:[],page_notes:[]});const h=((t,n,i)=>{var r;try{let s,o=null;const a=t.target[0].selector;return a?o=null===(r=a.find((e=>"TextQuoteSelector"===e.type)))||void 0===r?void 0:r.exact:t.references&&(s=!0),{id:t.id,created:(0,e.moment)(t.created).format(i),updated:(0,e.moment)(t.updated).format(i),text:o&&Wt(o),incontext:t.links.incontext,user:t.user,annotation:t.text,tags:t.tags,group:n,isReply:s}}catch(e){return console.log(`Error parsing annotation format: ${e}`,t),null}})(r,u.name,n);return h.text||h.isReply?t[a].highlights.push(h):t[a].page_notes.push(h),t}),{});return Object.values(r)};const Zt=async e=>e.map((e=>{e.selected=!0;const{organization:t,scoped:n,groupid:i,links:r}=e;return function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r!o.has(e.id)&&(o.add(e.id),!0)),o);await _e.actions.setGroups(a)}}class en{constructor(e){this.syncState={newArticlesSynced:0,newHighlightsSynced:0},this.fileManager=e,this.syncGroup=new Qt}async startSync(e){this.syncState={newArticlesSynced:0,newHighlightsSynced:0};const t=await f(_e).token,n=await f(_e).user,i=new Ae(t,n);Fe.actions.startSync(),await this.syncGroup.startSync();const r=e?await i.getHighlightWithUri(e):await i.getHighlights(f(_e).lastSyncDate),s=await Yt(r);Fe.actions.setJobs(s),s.length>0&&await this.syncArticles(s),Fe.actions.completeSync({newArticlesCount:this.syncState.newArticlesSynced,newHighlightsCount:this.syncState.newHighlightsSynced,updatedArticlesCount:0,updatedHighlightsCount:0})}async syncArticles(e){for(const t of e)try{Fe.actions.startJob(t),await this.syncArticle(t),Fe.actions.completeJob(t)}catch(e){console.error(`Error syncing ${t.metadata.title}`,e),Fe.actions.errorJob(t)}}async syncArticle(e){await this.fileManager.saveArticle(e)&&(this.syncState.newArticlesSynced+=1),this.syncState.newHighlightsSynced+=e.highlights.length}}var tn=__webpack_require__(202),nn=__webpack_require__.n(tn);const rn=e=>{const t=e.replace(/[':#|]/g,"").trim();return nn()(t)};var sn=__webpack_require__(9675),on=__webpack_require__.n(sn);const an="hypothesis-highlights";class un{constructor(e,t){this.vault=e,this.metadataCache=t,this.renderer=new Te}async saveArticle(e){const t=await this.getArticleFile(e);if(t){console.debug(`Updating ${t.path}`);const n=this.renderer.render(e,!1),i=await this.vault.cachedRead(t)+n;return await this.vault.modify(t,i),!1}{const t=await this.getNewArticleFilePath(e);console.debug(`Creating ${t}`);const n=((e,t)=>{const n={doc_type:an,url:t.metadata.url};return on().stringify(e,n)})(this.renderer.render(e,!0),e);return await this.vault.create(t,n),!0}}async createFolder(e){await this.vault.createFolder(e)}async isArticleSaved(e){return!!await this.getArticleFile(e)}async getArticleFile(e){var t;return(null===(t=(await this.getAnnotationFiles()).find((t=>t.articleUrl===e.metadata.url)))||void 0===t?void 0:t.file)||null}async getAnnotationFiles(){return this.vault.getMarkdownFiles().map((e=>{const t=this.metadataCache.getFileCache(e);return{file:e,frontmatter:null==t?void 0:t.frontmatter}})).filter((({frontmatter:e})=>(null==e?void 0:e.doc_type)===an)).map((({file:e,frontmatter:t})=>({file:e,articleUrl:t.url})))}async getNewArticleFilePath(e){const t=(e=>{const t=f(_e);return t.useDomainFolders?`${t.highlightsFolder}/${e.metadata.author}`:t.highlightsFolder})(e);await this.vault.adapter.exists(t)||(console.info(`Folder ${t} not found. Will be created`),await this.createFolder(t));let n=`${rn(e.metadata.title)}.md`,i=`${t}/${n}`,r=1;const s=this.vault.getMarkdownFiles();for(;s.find((e=>e.path===i));)console.debug(`${i} alreay exists`),n=`${rn(e.metadata.title)} (${r++}).md`,i=`${t}/${n}`;return i}}class cn extends e.Modal{constructor(e){super(e),this.vault=e.vault,this.fileManager=new un(this.vault,this.app.metadataCache),this.waitForClose=new Promise((e=>this.resolvePromise=e)),this.open()}async onOpen(){super.onOpen(),this.syncHypothesis=new en(this.fileManager);const e=await this.retrieveDeletedFiles();this.titleEl.innerText="Hypothes.is: Resync deleted file(s)",this.modalContent=new qt({target:this.contentEl,props:{deletedFiles:e,onSubmit:async e=>{e.selected&&e.selected.length>0?this.startResync(e.selected):console.log("No files selected"),this.close()}}})}onClose(){super.onClose(),this.modalContent.$destroy(),this.resolvePromise()}async retrieveDeletedFiles(){const e=f(_e).token,t=f(_e).user,n=new Ae(e,t),i=await n.getHighlights(),r=Object.values(await Yt(i));return(await Promise.all(r.filter((async e=>!await this.fileManager.isArticleSaved(e))))).map((e=>({uri:e.metadata.url,filename:this.fileManager.getNewArticleFilePath(e)})))}async startResync(e){e.forEach((async e=>{console.log(`Start resync deleted file - ${e.filename}`),await this.syncHypothesis.startSync(e.uri)}))}}function ln(e){x(e,"svelte-1gqavgt",".ow-info.svelte-1gqavgt{padding-top:0px;border-top:0px !important}.ow-dropdown.svelte-1gqavgt{width:500px !important}.ow-themed.svelte-1gqavgt{--border:3px solid var(--background-modifier-border) !important;--borderRadius:3px;--placeholderColor:var(--text-muted) !important;--background:var(--background-secondary-alt) !important;--itemColor:var(--text-normal) !important;--itemHoverBG:var(--interactive-accent-hover) !important;--itemHoverColor:var(--text-on-accent) !important;--listBackground:var(--interactive-normal) !important}")}function hn(e){let t,n,i,r,s,o,a,u,c,l,h,p,f,d,m,g,v;function x(t){e[6](t)}let w={isMulti:!0,optionIdentifier:pn,labelIdentifier:fn,items:e[0]};return void 0!==e[2]&&(w.value=e[2]),o=new Ut({props:w}),z.push((()=>fe(o,"value",x))),o.$on("select",e[4]),o.$on("clear",e[5]),{c(){t=D("div"),n=D("div"),i=D("div"),r=D("div"),s=D("p"),de(o.$$.fragment),u=S(),c=D("div"),l=D("div"),l.innerHTML='
Note: Use with caution.
Highlight(s) and annotation(s) will not sync retroactively.
',h=S(),p=D("div"),f=D("button"),d=A("Save"),F(r,"class","ow-dropdown ow-themed svelte-1gqavgt"),F(i,"class","setting-item-description"),F(n,"class","setting-item-info"),F(t,"class","setting-item"),F(l,"class","setting-item-info"),F(f,"class","mod-cta"),f.disabled=e[3],I(f,"float","right"),F(p,"class","setting-item-control"),F(c,"class","setting-item ow-info svelte-1gqavgt")},m(a,x){b(a,t,x),y(t,n),y(n,i),y(i,r),y(r,s),me(o,s,null),b(a,u,x),b(a,c,x),y(c,l),y(c,h),y(c,p),y(p,f),y(f,d),m=!0,g||(v=_(f,"click",e[7]),g=!0)},p(e,[t]){const n={};1&t&&(n.items=e[0]),!a&&4&t&&(a=!0,n.value=e[2],Z((()=>a=!1))),o.$set(n),(!m||8&t)&&(f.disabled=e[3])},i(e){m||(ue(o.$$.fragment,e),m=!0)},o(e){ce(o.$$.fragment,e),m=!1},d(e){e&&E(t),ge(o),e&&E(u),e&&E(c),g=!1,v()}}}const pn="id",fn="name";function dn(e,t,n){let{groups:i}=t,{onSubmit:r}=t,s=i.filter((e=>e.selected)),o=!0;return e.$$set=e=>{"groups"in e&&n(0,i=e.groups),"onSubmit"in e&&n(1,r=e.onSubmit)},[i,r,s,o,function(e){n(3,o=!s)},function(e){n(3,o=!s)},function(e){s=e,n(2,s)},()=>r({selectedGroups:s})]}const mn=class extends ye{constructor(e){super(),ve(this,e,dn,hn,h,{groups:0,onSubmit:1},ln)}};class gn extends e.Modal{constructor(e){super(e),this.waitForClose=new Promise((e=>this.resolvePromise=e)),this.open()}async onOpen(){super.onOpen();const e=f(_e).groups;this.titleEl.innerText="Hypothes.is: Manage groups to be synced",this.modalContent=new mn({target:this.contentEl,props:{groups:e,onSubmit:async e=>{this.setGroupsSettings(e.selectedGroups),this.close()}}})}onClose(){super.onClose(),this.modalContent.$destroy(),this.resolvePromise()}async setGroupsSettings(e){const t=f(_e).groups;t.forEach((t=>{t.selected=e.some((e=>e.id===t.id))})),await _e.actions.setGroups(t)}}const{moment:vn}=window;class yn extends e.PluginSettingTab{constructor(e,t){super(e,t),this.app=e,this.plugin=t,this.renderer=new Te,this.tokenManager=new Se,this.syncGroup=new Qt}async display(){const{containerEl:e}=this;e.empty(),f(_e).isConnected?this.disconnect():this.connect(),this.autoSyncInterval(),this.highlightsFolder(),this.folderPath(),this.syncOnBoot(),this.dateFormat(),this.template(),this.manageGroups(),this.resetSyncHistory()}disconnect(){const t=f(_e).lastSyncDate?`Last sync ${vn(f(_e).lastSyncDate).fromNow()}`:"Sync has never run",n=document.createRange().createContextualFragment(`\n ${f(_e).history.totalArticles} article(s) & ${f(_e).history.totalHighlights} highlight(s) synced
\n ${t}\n `);new e.Setting(this.containerEl).setName(`Connected to Hypothes.is as ${f(_e).user.match(/([^:]+)@/)[1]}`).setDesc(n).addButton((e=>e.setButtonText("Disconnect").setCta().onClick((async()=>{e.removeCta().setButtonText("Removing API token...").setDisabled(!0),await _e.actions.disconnect(),this.display()}))))}connect(){new e.Setting(this.containerEl).setName("Connect to Hypothes.is").addButton((e=>e.setButtonText("Connect").setCta().onClick((async()=>{e.removeCta().setButtonText("Removing API token...").setDisabled(!0);const t=new Ie(this.app,this.tokenManager);await t.waitForClose,this.display()}))))}autoSyncInterval(){new e.Setting(this.containerEl).setName("Auto sync in interval (minutes)").setDesc("Sync every X minutes. To disable auto sync, specify negative value or zero (default)").addText((e=>{e.setPlaceholder(String(0)).setValue(String(f(_e).autoSyncInterval)).onChange((async e=>{if(!isNaN(Number(e))){const t=Number(e);await _e.actions.setAutoSyncInterval(t);const n=f(_e).autoSyncInterval;console.log(n),n>0?(this.plugin.clearAutoSync(),this.plugin.startAutoSync(t),console.log(`Auto sync enabled! Every ${t} minutes.`)):n<=0&&this.plugin.clearAutoSync()&&console.log("Auto sync disabled!")}}))}))}highlightsFolder(){new e.Setting(this.containerEl).setName("Highlights folder location").setDesc("Vault folder to use for writing hypothesis highlights").addDropdown((e=>{const t=this.app.vault.adapter.files,n=r()(t,(e=>"folder"===e.type));return Object.keys(n).forEach((t=>{e.addOption(t,t)})),e.setValue(f(_e).highlightsFolder).onChange((async e=>{await _e.actions.setHighlightsFolder(e)}))}))}template(){const n=document.createRange().createContextualFragment(t);new e.Setting(this.containerEl).setName("Highlights template").setDesc(n).addTextArea((e=>(e.inputEl.style.width="100%",e.inputEl.style.height="450px",e.inputEl.style.fontSize="0.8em",e.setValue(f(_e).template).onChange((async t=>{const n=this.renderer.validate(t);n&&await _e.actions.setTemplate(t),e.inputEl.style.border=n?"":"1px solid red"})),e)))}folderPath(){new e.Setting(this.containerEl).setName("Use domain folders").setDesc("Group generated files into folders based on the domain of the annotated URL").addToggle((e=>e.setValue(f(_e).useDomainFolders).onChange((async e=>{await _e.actions.setUseDomainFolder(e)}))))}syncOnBoot(){new e.Setting(this.containerEl).setName("Sync on Startup").setDesc("Automatically sync new highlights when Obsidian starts").addToggle((e=>e.setValue(f(_e).syncOnBoot).onChange((async e=>{await _e.actions.setSyncOnBoot(e)}))))}resetSyncHistory(){new e.Setting(this.containerEl).setName("Reset sync").setDesc("Wipe sync history to allow for resync").addButton((e=>e.setButtonText("Reset").setDisabled(!f(_e).isConnected).setWarning().onClick((async()=>{await _e.actions.resetSyncHistory(),this.display()}))))}dateFormat(){const t=document.createRange().createContextualFragment(n);new e.Setting(this.containerEl).setName("Date & time format").setDesc(t).addText((e=>{e.setPlaceholder("YYYY-MM-DD HH:mm:ss").setValue(f(_e).dateTimeFormat).onChange((async e=>{await _e.actions.setDateTimeFormat(e)}))}))}async resyncDeletedFile(){new e.Setting(this.containerEl).setName("Sync deleted file(s)").setDesc("Manually sync deleted file(s)").addButton((e=>e.setButtonText("Show deleted file(s)").setCta().onClick((async()=>{e.removeCta().setButtonText("Resync deleted file..").setDisabled(!0);const t=new cn(this.app);await t.waitForClose,this.display()}))))}async manageGroups(){const t=document.createRange().createContextualFragment(`Add/remove group(s) to be synced.
\n ${f(_e).groups.length} group(s) synced from Hypothesis
`);new e.Setting(this.containerEl).setName("Groups").setDesc(t).addExtraButton((e=>e.setIcon("switch").setTooltip("Reset group selections").setDisabled(!f(_e).isConnected).onClick((async()=>{await _e.actions.resetGroups(),await this.syncGroup.startSync(),this.display()})))).addButton((e=>e.setButtonText("Manage").setCta().setDisabled(!f(_e).isConnected).onClick((async()=>{const e=new gn(this.app);await e.waitForClose,this.display()}))))}}var xn=__webpack_require__(2506);(0,e.addIcon)("hypothesisIcon",xn);class bn extends e.Plugin{async onload(){console.log("loading plugin",(new Date).toLocaleString()),await async function(e){await _e.initialise(e)}(this);const t=new un(this.app.vault,this.app.metadataCache);this.syncHypothesis=new en(t),this.addRibbonIcon("hypothesisIcon","Sync your hypothesis highlights",(()=>{f(_e).isConnected?this.startSync():new e.Notice("Please configure Hypothesis API token in the plugin setting")})),this.addCommand({id:"hypothesis-sync",name:"Sync highlights",callback:()=>{f(_e).isConnected?this.startSync():new e.Notice("Please configure Hypothesis API token in the plugin setting")}}),this.addCommand({id:"hypothesis-resync-deleted",name:"Resync deleted file(s)",callback:()=>{f(_e).isConnected?this.showResyncModal():new e.Notice("Please configure Hypothesis API token in the plugin setting")}}),this.addSettingTab(new yn(this.app,this)),f(_e).syncOnBoot&&(f(_e).isConnected?await this.startSync():console.info("Sync disabled. API Token not configured")),f(_e).autoSyncInterval&&this.startAutoSync()}async showResyncModal(){const e=new cn(this.app);await e.waitForClose}async onunload(){console.log("unloading plugin",(new Date).toLocaleString()),this.clearAutoSync()}async startSync(){console.log("Start syncing..."),await this.syncHypothesis.startSync()}async clearAutoSync(){this.timeoutIDAutoSync&&(window.clearTimeout(this.timeoutIDAutoSync),this.timeoutIDAutoSync=void 0),console.log("Clearing auto sync...")}async startAutoSync(e){const t=null!=e?e:Number(f(_e).autoSyncInterval);t>0&&(this.timeoutIDAutoSync=window.setTimeout((()=>{this.startSync(),this.startAutoSync()}),6e4*t)),console.log(`StartAutoSync: this.timeoutIDAutoSync ${this.timeoutIDAutoSync} with ${t} minutes`)}}})();var __webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})();