diff --git a/src/replay.js b/src/replay.js
index 33d76f4..3d8b975 100644
--- a/src/replay.js
+++ b/src/replay.js
@@ -8,7 +8,6 @@ class Replay extends LitElement
{
constructor() {
super();
- this.isLoading = false;
this.replayUrl = "";
this.replayTS = "";
this.url = "";
@@ -34,7 +33,6 @@ class Replay extends LitElement
title: { type: String },
iframeUrl: { type: String },
- isLoading: { type: Boolean },
showAuth: { type: Boolean },
}
@@ -86,14 +84,6 @@ class Replay extends LitElement
this.dispatchEvent(new CustomEvent("coll-tab-nav", {detail: {replaceLoc: true, data}}));
}
-
- if (this.embed && window.parent !== window && changedProperties.has("title")) {
- window.parent.postMessage({
- title: this.title,
- url: this.replayUrl,
- ts: this.replayTS
- }, '*');
- }
}
onReplayMessage(event) {
@@ -117,7 +107,7 @@ class Replay extends LitElement
}
waitForLoad() {
- this.isLoading = true;
+ this.setLoading();
this._loadPoll = window.setInterval(() => {
const iframe = this.renderRoot.querySelector("iframe");
if (!iframe || !iframe.contentDocument || !iframe.contentWindow ||
@@ -128,7 +118,8 @@ class Replay extends LitElement
}
clearLoading(iframeWin) {
- this.isLoading = false;
+ this.dispatchEvent(new CustomEvent("replay-loading", {detail: {loading: false}}));
+
if (this._loadPoll) {
window.clearInterval(this._loadPoll);
this._loadPoll = null;
@@ -136,16 +127,16 @@ class Replay extends LitElement
if (iframeWin) {
iframeWin.addEventListener("beforeunload", () => {
- this.isLoading = true;
+ this.setLoading();
});
}
}
- refresh() {
- if (this.isLoading && !forceReload) {
- return;
- }
+ setLoading() {
+ this.dispatchEvent(new CustomEvent("replay-loading", {detail: {loading: true}}));
+ }
+ refresh() {
const iframe = this.renderRoot.querySelector("iframe");
if (iframe) {
diff --git a/src/sorter.js b/src/sorter.js
index c3251ea..ad868ee 100644
--- a/src/sorter.js
+++ b/src/sorter.js
@@ -16,6 +16,12 @@ class Sorter extends LitElement
this.numResults = DEFAULT_RESULTS;
this.defaultDesc = false;
+
+ this.sortKey = "url";
+ this.sortDesc = false;
+
+ this.defaultKey = "";
+ this.defaultDesc = false;
}
static get properties() {
@@ -68,13 +74,19 @@ class Sorter extends LitElement
this.sortedData = [...this.data];
this.numResults = DEFAULT_RESULTS;
- this.sortedData.sort((first, second) => {
- if (first[this.sortKey] === second[this.sortKey]) {
- return 0;
+ if (this.sortKey === "") {
+ if (this.sortDesc) {
+ this.sortedData.reverse();
}
+ } else {
+ this.sortedData.sort((first, second) => {
+ if (first[this.sortKey] === second[this.sortKey]) {
+ return 0;
+ }
- return (this.sortDesc == (first[this.sortKey] < second[this.sortKey])) ? 1 : -1;
- });
+ return (this.sortDesc == (first[this.sortKey] < second[this.sortKey])) ? 1 : -1;
+ });
+ }
this.sendSortChanged();
}
diff --git a/src/url-resources.js b/src/url-resources.js
index ae4a638..2eacdba 100644
--- a/src/url-resources.js
+++ b/src/url-resources.js
@@ -235,10 +235,12 @@ class URLResources extends LitElement
}
.result {
border-bottom: 1px #dbdbdb solid;
+ min-height: fit-content;
}
.results-head {
border-bottom: 2px #dbdbdb solid;
margin-right: 16px;
+ min-height: fit-content;
}
.results-head a {
color: black;
diff --git a/sw.js b/sw.js
index f295c0a..4d9c7ae 100644
--- a/sw.js
+++ b/sw.js
@@ -1,12 +1,12 @@
/*! sw.js is part of ReplayWeb.page (https://replayweb.page) Copyright (C) 2020, Webrecorder Software. Licensed under the Affero General Public License v3. */
-!function(e,t){for(var n in t)e[n]=t[n]}(self,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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=221)}([function(e,t,n){"use strict";function r(e,t){for(const n of t)if(e.startsWith(n))return!0;return!1}function i(e,t){for(const n of t)if(e.indexOf(n)>=0)return!0;return!1}function s(e){return e.replace(/[-:T]/g,"").slice(0,14)}function o(e){if(!e)return new Date;e.length<14&&(e+="00000101000000".substr(e.length));const t=e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)+"T"+e.substring(8,10)+":"+e.substring(10,12)+":"+e.substring(12,14)+"-00:00";return new Date(t)}function a(e){if(!e)return"";try{return""+parseInt(e.getTime()/1e3)}catch(e){return""}}async function u(e,t){const n="string"==typeof e?(new TextEncoder).encode(e):e,r=await crypto.subtle.digest(t,n);return t+":"+new Uint8Array(r).map(e=>e.toString(16).padStart(2,"0")).join("")}function l(e){try{return new Headers(e)}catch(t){for(let t of Object.keys(e)){const n=e[t],r=n.replace(/[\r\n]+/g,", ");n!=r&&(e[t]=r)}return new Headers(e)}}n.d(t,"k",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"l",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return p})),n.d(t,"g",(function(){return d})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return m}));const c=[101,204,205,304];function h(e){return c.includes(e)}function d(e){return"XMLHttpRequest"===e.headers.get("X-Pywb-Requested-With")}function p(e,t){let n,r;return t||(t="Sorry, this url was not found in the archive."),"script"===e.destination||e.headers.get("x-pywb-requested-with")?(n=JSON.stringify(t),r="application/json"):(n=t,r="text/html"),new Response(n,{status:404,statusText:"Not Found",headers:{"Content-Type":r}})}class f extends class{constructor(e,t){this.url=e,this.status=t}}{}class m{}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return y})),n.d(t,"f",(function(){return T})),n.d(t,"e",(function(){return b})),n.d(t,"c",(function(){return D}));var r=n(112);const i=new TextDecoder("utf-8");class s extends r.Inflate{constructor(e,t){super(e),this.reader=t}onEnd(e){this.err=e,this.err||(this.reader._rawOffset+=this.strm.total_in)}}class o{static concatChunks(e,t){if(1===e.length)return e[0];const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.byteLength;return n}static splitChunk(e,t){return[e.slice(0,t),e.slice(t)]}static async readFully(e){const t=[];let n=0;for await(const r of e)t.push(r),n+=r.byteLength;return o.concatChunks(t,n)}getReadableStream(){const e=this[Symbol.asyncIterator]();return new ReadableStream({pull:t=>e.next().then(e=>{e.done||!e.value?t.close():t.enqueue(e.value)})})}readFully(){return o.readFully(this)}async readline(e=0){const t=await this.readlineRaw(e);return t?i.decode(t):""}async*iterLines(e=0){let t=null;for(;t=await this.readline(e);)yield t}}class a extends o{constructor(e,t="gzip",n=!1){if(super(),this.compressed=t,this.opts={raw:"deflateRaw"===t},this.inflator=t?new s(this.opts,this):null,"function"!=typeof e[Symbol.asyncIterator])if("function"==typeof e.getReader)e=a.fromReadable(e.getReader());else if("function"==typeof e.read)e=a.fromReadable(e);else{if("function"!=typeof e[Symbol.iterator])throw new TypeError("Invalid Stream Source");e=a.fromIter(e)}this._sourceIter=n?this.dechunk(e):e[Symbol.asyncIterator](),this.lastValue=null,this.errored=!1,this._savedChunk=null,this._rawOffset=0,this._readOffset=0,this.numChunks=0}async _loadNext(){const e=await this._sourceIter.next();return e.done?null:e.value}async*dechunk(e){const t=e instanceof a?e:new a(e,null);let n=-1,r=!0;for(;0!=n;){const e=await t.readlineRaw(64);let s=null;if(n=parseInt(i.decode(e),16),!n||n>2**32){if(Number.isNaN(n)||n>2**32){r||(this.errored=!0),yield e;break}}else if(s=await t.readSize(n),s.length!=n){r?yield e:this.errored=!0,yield s;break}const o=await t.readSize(2);if(13!=o[0]||10!=o[1]){r?yield e:this.errored=!0,yield s,yield o;break}if(r=!1,!s||0===n)return;yield s}yield*t}_unread(e){e.length&&(this._readOffset-=e.length,this._savedChunk&&console.log("Already have chunk!"),this._savedChunk=e)}async _next(){if(this._savedChunk){const e=this._savedChunk;return this._savedChunk=null,e}if(this.compressed){const e=this._getNextChunk();if(e)return e}let e=await this._loadNext();for(;this.compressed&&e;){this._push(e);const t=this._getNextChunk(e);if(t)return t;e=await this._loadNext()}return e}_push(e){this.lastValue=e,this.inflator.ended&&(this.inflator=new s(this.opts,this)),this.inflator.push(e),this.inflator.err&&this.inflator.ended&&"deflate"===this.compressed&&!1===this.opts.raw&&0===this.numChunks&&(this.opts.raw=!0,this.compressed="deflateRaw",this.inflator=new s(this.opts,this),this.inflator.push(e))}_getNextChunk(e){for(;;){if(this.inflator.chunks.length>0)return this.numChunks++,this.inflator.chunks.shift();if(this.inflator.ended){if(0!==this.inflator.err)return this.compressed=null,e;const t=this.inflator.strm.avail_in;if(t&&this.lastValue){this._push(this.lastValue.slice(-t));continue}}return null}}async*[Symbol.asyncIterator](){let e=null;for(;e=await this._next();)this._readOffset+=e.length,yield e}async readlineRaw(e){const t=[];let n,r=0,i=null;for await(const s of this){if(e&&r+s.byteLength>e){i=s,n=e-r-1;const t=s.slice(0,n+1).indexOf(10);t>=0&&(n=t);break}if(n=s.indexOf(10),n>=0){i=s;break}t.push(s),r+=s.byteLength}if(i){const[e,s]=a.splitChunk(i,n+1);t.push(e),r+=e.byteLength,this._unread(s)}else if(!t.length)return null;return a.concatChunks(t,r)}readFully(){return this.readSize()}async readSize(e=-1,t=!1){const n=[];let r=0;for await(const i of this){if(e>=0){if(i.length>e){const[s,o]=a.splitChunk(i,e);t||n.push(s),r+=s.byteLength,this._unread(o);break}if(i.length===e){t||n.push(i),r+=i.byteLength,e=0;break}e-=i.length}t||n.push(i),r+=i.byteLength}return t?r:a.concatChunks(n,r)}getReadOffset(){return this._readOffset}getRawOffset(){return this.compressed?this._rawOffset:this._readOffset}getRawLength(e){return this.compressed?this.inflator.strm.total_in:this._readOffset-e}static fromReadable(e){return{async*[Symbol.asyncIterator](){let t=null;for(;(t=await e.read())&&!t.done;)yield t.value}}}static fromIter(e){return{async*[Symbol.asyncIterator](){for(const t of e)yield t}}}}class u extends o{constructor(e,t,n=0){super(),this.sourceIter=e,this.length=t,this.limit=t,this.skip=n}setLimitSkip(e,t=0){this.limit=e,this.skip=t}async*[Symbol.asyncIterator](){if(!(this.limit<=0))for await(let e of this.sourceIter){if(this.skip>0){if(!(e.length>=this.skip)){this.skip-=e.length;continue}{const[t,n]=u.splitChunk(e,this.skip);e=n,this.skip=0}}if(e.length>this.limit){const[t,n]=u.splitChunk(e,this.limit);e=t,this.sourceIter._unread(n)}if(e.length&&(this.limit-=e.length,yield e),this.limit<=0)break}}async readlineRaw(e){if(this.limit<=0)return null;const t=await this.sourceIter.readlineRaw(e?Math.min(e,this.limit):this.limit);return this.limit-=t.length,t}async skipFully(){const e=this.limit;for(;this.limit>0;)this.limit-=await this.sourceIter.readSize(this.limit,!0);return e}}const l=new Uint8Array([13,10]),c=new Uint8Array([13,10,13,10]);class h{constructor({statusline:e,headers:t}){this.statusline=e,this.headers=t}toString(){const e=[this.statusline];for(const[t,n]of this.headers)e.push(`${t}: ${n}`);return e.join("\r\n")+"\r\n"}async*iterSerialize(e){yield e.encode(this.statusline),yield l;for(const[t,n]of this.headers)yield e.encode(`${t}: ${n}\r\n`)}_parseResponseStatusLine(){const e=p(this.statusline," ",2);this._protocol=e[0],this._statusCode=e.length>1?Number(e[1]):"",this._statusText=e.length>2?e[2]:""}get statusCode(){return void 0===this._statusCode&&this._parseResponseStatusLine(),this._statusCode}get protocol(){return void 0===this._protocol&&this._parseResponseStatusLine(),this._protocol}get statusText(){return void 0===this._statusText&&this._parseResponseStatusLine(),this._statusText}_parseRequestStatusLine(){const e=this.statusline.split(" ",2);this._method=e[0],this._requestPath=e.length>1?e[1]:""}get method(){return void 0===this._method&&this._parseRequestStatusLine(),this._method}get requestPath(){return void 0===this._requestPath&&this._parseRequestStatusLine(),this._requestPath}}class d{startsWithSpace(e){const t=e.charAt(0);return" "===t||"\t"===t}async parse(e,{headersClass:t=Map}={}){const n=await e.readline();if(!n)return null;let r=n.trimEnd();const i=new t;if(!r)return null;let s=(await e.readline()).trimEnd();for(;s;){let[t,n]=p(s,":",1);n&&(t=t.trimStart(),n=n.trim());let r=(await e.readline()).trimEnd();for(;this.startsWithSpace(r);)n&&(n+=r),r=(await e.readline()).trimEnd();if(n)try{i.set(t,n)}catch(e){}s=r}return new h({statusline:r,headers:i,totalRead:this.totalRead})}}function p(e,t,n){const r=e.split(t),i=r.slice(0,n);return r.slice(n).length>0&&i.push(r.slice(n).join(t)),i}var f=n(113),m=n.n(f);const w=new TextDecoder("utf-8"),g=new TextEncoder("utf-8"),_={warcinfo:"application/warc-fields",response:"application/http; msgtype=response",revisit:"application/http; msgtype=response",request:"application/http; msgtype=request",metadata:"application/warc-fields"};class b extends o{static create({url:e,date:t,type:n,warcHeaders:r={},filename:i="",httpHeaders:s={},status:o="200",statusText:a="OK",httpVersion:u="HTTP/1.1",warcVersion:l="WARC/1.0",keepHeadersCase:c=!0,refersToUrl:d,refersToDate:p}={},f){function w(e){return"WARC/1.0"===l&&"Z"!=(e=e.split(".")[0]).charAt(t.length-1)&&(e+="Z"),e}t||(t=(new Date).toISOString()),t=w(t),r={...r},"warcinfo"===n?i&&(r["WARC-Filename"]=i):r["WARC-Target-URI"]=e,r["WARC-Date"]=t,r["WARC-Type"]=n,"revisit"===n&&(r["WARC-Profile"]="WARC/1.1"===l?"http://netpreserve.org/warc/1.1/revisit/identical-payload-digest":"http://netpreserve.org/warc/1.0/revisit/identical-payload-digest",r["WARC-Refers-To-Target-URI"]=d,r["WARC-Refers-To-Date"]=w(p)),(r=new h({statusline:l,headers:c?new Map(Object.entries(r)):new Headers(r)})).headers.get("WARC-Record-ID")||r.headers.set("WARC-Record-ID",` l){l=p;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,h=-1,l=0;continue}return i(m,String(e),d,t)}d=!1,(l=(f=r(f,t,10,m.s)).indexOf("."))>-1?f=f.replace(".",""):l=f.length}for(h=0;48===f.charCodeAt(h);h++);for(p=f.length;48===f.charCodeAt(--p););if(f=f.slice(h,++p)){if(p-=h,d&&M.DEBUG&&p>15&&(e>9007199254740991||e!==u(e)))throw Error(c+m.s*e);if((l=l-h-1)>N)m.c=m.e=null;else if(l=O)?b(u,o):y(u,o,"0");else if(s=(e=H(new M(e),t,n)).e,a=(u=m(e.c)).length,1==r||2==r&&(t<=s||s<=R)){for(;a 0;++f){var b,y=d[f],v=0;r.fillBitWindow(),v+=r.val_>>>r.bit_pos_&15,r.bit_pos_+=_[v].bits,b=_[v].value,m[y]=b,0!==b&&(w-=32>>b,++g)}if(1!==g&&0!==w)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function(e,t,n,r){for(var i=0,s=8,o=0,l=0,c=32768,h=[],d=0;d<32;d++)h.push(new a(0,0));for(u(h,0,5,e,18);i >6:64,l=2 >4,n=(15&o)<<4|(a=s.indexOf(e.charAt(l++)))>>2,r=(3&a)<<6|(u=s.indexOf(e.charAt(l++))),d[c++]=t,64!==a&&(d[c++]=n),64!==u&&(d[c++]=r);return d}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/DataLengthProbe"),o=e("./stream/Crc32Probe");function a(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s=e("./stream/DataLengthProbe"),a.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var s=i,o=0+n;e^=-1;for(var a=0;ae.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function F(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function P(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,s){return s||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,s){return s||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s=a/2&&T++;do{if(m=0,(l=t(R,y,S,v))<0){if(E=y[0],S!=v&&(E=E*a+(y[1]||0)),(m=u(E/T))>1)for(m>=a&&(m=a-1),g=(w=e(R,m,a)).length,v=y.length;1==t(w,y,g,v);)m--,n(w,S=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(n)?r.showHidden=n:n&&t._extend(r,n),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,e,r.depth)}function u(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&A(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return g(i)||(i=c(e,i,r)),i}var s=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(g(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(w(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,n);if(s)return s;var o=Object.keys(n),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(n)),E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(n);if(0===o.length){if(A(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(v(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return h(n)}var l,y="",x=!1,T=["{","}"];(p(n)&&(x=!0,T=["[","]"]),A(n))&&(y=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(y=" "+RegExp.prototype.toString.call(n)),v(n)&&(y=" "+Date.prototype.toUTCString.call(n)),E(n)&&(y=" "+h(n)),0!==o.length||x&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=x?function(e,t,n,r,i){for(var s=[],o=0,a=t.length;o=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(l,y,T)):T[0]+y+T[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),k(r,i)||(o="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(n)?c(e,u.value,null):c(e,u.value,n-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),_(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function w(e){return"number"==typeof e}function g(e){return"string"==typeof e}function _(e){return void 0===e}function b(e){return y(e)&&"[object RegExp]"===x(e)}function y(e){return"object"==typeof e&&null!==e}function v(e){return y(e)&&"[object Date]"===x(e)}function E(e){return y(e)&&("[object Error]"===x(e)||e instanceof Error)}function A(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(_(s)&&(s=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(s)){var r=e.pid;o[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else o[n]=function(){};return o[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=f,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=w,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=b,t.isObject=y,t.isDate=v,t.isError=E,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(207);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",C(),t.format.apply(t,arguments))},t.inherits=n(208),t._extend=function(e,t){if(!t||!y(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!=typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],s=0;s0&&(u=this._consume(),r++),u===a.EOF){i=!1;break}if(l=e[o],u!==l&&(n||u!==b(l))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(let e=0;e{const s=[],o=new C(n);o.on("data",e=>s.push(e)),o.on("error",i),o.on("finish",()=>r(t.concat(s))),o.pushAny(e),o.end()})}}e.exports=C}).call(this,n(3).Buffer)},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";const r=n(56),{escapeString:i}=n(146);e.exports=class extends r{constructor(){super({sourceCodeLocationInfo:!0}),this.posTracker=this.locInfoMixin.posTracker}_transformChunk(e){super._transformChunk(e)}_getRawHtml(e){const t=this.posTracker.droppedBufferSize,n=e.startOffset-t,r=e.endOffset-t;return this.tokenizer.preprocessor.html.slice(n,r)}_handleToken(e){super._handleToken(e)||this.emitRaw(this._getRawHtml(e.location)),this.parserFeedbackSimulator.skipNextNewLine=!1}_emitToken(e,t){this.emit(e,t,this._getRawHtml(t.sourceCodeLocation))}emitDoctype(e){let t="",this.push(t)}emitStartTag(e){let t="<"+e.tagName;const n=e.attrs;for(let e=0;et.length)throw new RangeError("Index out of range")}function O(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,s=Math.min(t.length-r,2);n>>8*(i?n:1-n)}function F(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,s=Math.min(t.length-r,4);n>>8*(i?n:3-n)&255}function P(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,i,s){return s||P(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function L(t,e,r,i,s){return s||P(t,0,r,8),n.write(t,e,r,i,52,8),r+8}u.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s=a/2&&x++;do{if(m=0,(h=e(R,b,S,E))<0){if(v=b[0],S!=E&&(v=v*a+(b[1]||0)),(m=u(v/x))>1)for(m>=a&&(m=a-1),g=(w=t(R,m,a)).length,E=b.length;1==e(w,b,g,E);)m--,r(w,S=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(r)?i.showHidden=r:r&&e._extend(i,r),y(i.showHidden)&&(i.showHidden=!1),y(i.depth)&&(i.depth=2),y(i.colors)&&(i.colors=!1),y(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=u),c(i,t,i.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function h(t,e){return t}function c(t,r,i){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,t);return g(n)||(n=c(t,n,i)),n}var s=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(w(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(s)return s;var o=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),v(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(A(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(v(r))return l(r)}var h,b="",T=!1,x=["{","}"];(f(r)&&(T=!0,x=["[","]"]),A(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(b=" "+RegExp.prototype.toString.call(r)),E(r)&&(b=" "+Date.prototype.toUTCString.call(r)),v(r)&&(b=" "+l(r)),0!==o.length||T&&0!=r.length?i<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=T?function(t,e,r,i,n){for(var s=[],o=0,a=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,b,x)):x[0]+b+x[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,i,n,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),D(i,n)||(o="["+n+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),y(o)){if(s&&n.match(/^\d+$/))return a;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function w(t){return"number"==typeof t}function g(t){return"string"==typeof t}function y(t){return void 0===t}function _(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function E(t){return b(t)&&"[object Date]"===T(t)}function v(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function A(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(y(s)&&(s=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!o[r])if(new RegExp("\\b"+r+"\\b","i").test(s)){var i=t.pid;o[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,i,t)}}else o[r]=function(){};return o[r]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=w,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=_,e.isObject=b,e.isDate=E,e.isError=v,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(192);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(193),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,i=new Promise((function(t,i){e=t,r=i})),n=[],s=0;s0&&(u=this._consume(),i++),u===a.EOF){n=!1;break}if(h=t[o],u!==h&&(r||u!==_(h))){n=!1;break}}if(!n)for(;i--;)this._unconsume();return n}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(let t=0;t{const s=[],o=new D(r);o.on("data",t=>s.push(t)),o.on("error",n),o.on("finish",()=>i(e.concat(s))),o.pushAny(t),o.end()})}}t.exports=D}).call(this,r(3).Buffer)},,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";const i=r(54),{escapeString:n}=r(141);t.exports=class extends i{constructor(){super({sourceCodeLocationInfo:!0}),this.posTracker=this.locInfoMixin.posTracker}_transformChunk(t){super._transformChunk(t)}_getRawHtml(t){const e=this.posTracker.droppedBufferSize,r=t.startOffset-e,i=t.endOffset-e;return this.tokenizer.preprocessor.html.slice(r,i)}_handleToken(t){super._handleToken(t)||this.emitRaw(this._getRawHtml(t.location)),this.parserFeedbackSimulator.skipNextNewLine=!1}_emitToken(t,e){this.emit(t,e,this._getRawHtml(e.sourceCodeLocation))}emitDoctype(t){let e="",this.push(e)}emitStartTag(t){let e="<"+t.tagName;const r=t.attrs;for(let t=0;t