diff --git a/Gemfile.lock b/Gemfile.lock
index 76bb371..c2f5840 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -50,7 +50,7 @@ GEM
forwardable-extended (~> 2.6)
public_suffix (4.0.3)
rake (12.3.3)
- rb-fsevent (0.10.3)
+ rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.17.0)
diff --git a/_config.yml b/_config.yml
index 06055a7..bba31e0 100644
--- a/_config.yml
+++ b/_config.yml
@@ -17,7 +17,7 @@ aux_links:
"Back to ReplayWeb.page":
- "https://replayweb.page/"
-logo: "/static/logo.svg"
+logo: "/assets/logo.svg"
plugins:
- jekyll-remote-theme
diff --git a/_includes/title.html b/_includes/title.html
index 428514e..11e13b0 100644
--- a/_includes/title.html
+++ b/_includes/title.html
@@ -2,4 +2,4 @@
{% endif %}
replay
-web.page
+web.page
diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss
index 6bb7f78..c43b3b8 100644
--- a/_sass/custom/custom.scss
+++ b/_sass/custom/custom.scss
@@ -1,7 +1,8 @@
-$rwp-green: #64e986;
+$rwp-green: #55be6f;
$rwp-yellow: #f5c71a;
+$rwp-blue: #4876ff;
//$link-color: #27a0ff;
-$link-color: #4876ff;
+$link-color: #384ea2;
//$content-width: 960px;
$nav-width-md: $nav-width;
@@ -31,3 +32,6 @@ $nav-width-md: $nav-width;
color: $rwp-yellow;
}
+.rwp-blue {
+ color: $rwp-blue;
+}
diff --git a/assets/logo.svg b/assets/logo.svg
index d5147a3..3cfe321 100644
--- a/assets/logo.svg
+++ b/assets/logo.svg
@@ -8,15 +8,25 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- sodipodi:docname="logoonly.svg"
+ sodipodi:docname="logo.svg"
inkscape:version="1.0rc1 (09960d6, 2020-04-09)"
id="wrlogo"
version="1.1"
- viewBox="0 0 66.712425 66.712425"
- height="66.712425mm"
- width="66.712425mm">
+ viewBox="0 0 66.712418 66.712418"
+ height="66.712418mm"
+ width="66.712418mm">
+ id="defs1341">
+
@@ -29,85 +39,80 @@
offset="1"
style="stop-color:#04cdff;stop-opacity:1" />
-
+
+
+
+ image/svg+xml
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/dist/embed.js b/dist/embed.js
index 1fe311f..f52c59c 100644
--- a/dist/embed.js
+++ b/dist/embed.js
@@ -1,4 +1,4 @@
-!function(t,e){for(var s in e)t[s]=e[s]}(self,function(t){var e={};function s(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(n,r,function(e){return t[e]}.bind(null,r));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/dist/",s(s.s=107)}({0:function(t,e,s){"use strict";s.d(e,"c",(function(){return d.e})),s.d(e,"d",(function(){return N})),s.d(e,"b",(function(){return C})),s.d(e,"a",(function(){return O}));var n=s(5),r=s(1);function i(t,e){const{element:{content:s},parts:n}=t,r=document.createTreeWalker(s,133,null,!1);let i=a(n),o=n[i],c=-1,l=0;const u=[];let d=null;for(;r.nextNode();){c++;const t=r.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(u.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===c;)o.index=null!==d?-1:o.index-l,i=a(n,i),o=n[i]}u.forEach(t=>t.parentNode.removeChild(t))}const o=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},a=(t,e=-1)=>{for(let s=e+1;st.parentNode.removeChild(t))}const o=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},a=(t,e=-1)=>{for(let s=e+1;st.reduceRight((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t),s),s=e(t,new Set),n=[];s.forEach(t=>n.unshift(t)),this._styles=n}else this._styles=[t]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?w?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==T&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return T}}O.finalized=!0,O.render=(t,e,s)=>{if(!s||"object"!=typeof s||!s.scopeName)throw new Error("The `scopeName` option is required.");const r=s.scopeName,i=c.a.has(e),o=p&&11===e.nodeType&&!!e.host,a=o&&!_.has(r),l=a?document.createDocumentFragment():e;if(Object(c.b)(t,l,Object.assign({templateFactory:f(r)},s)),a){const t=c.a.get(l);c.a.delete(l);const s=t.value instanceof u.a?t.value.template:void 0;g(r,l,s),Object(n.b)(e,e.firstChild),e.appendChild(l),c.a.set(e,t)}!i&&o&&window.ShadyCSS.styleElement(e.host)}},1:function(t,e,s){"use strict";s.d(e,"f",(function(){return n})),s.d(e,"g",(function(){return r})),s.d(e,"b",(function(){return o})),s.d(e,"a",(function(){return a})),s.d(e,"d",(function(){return l})),s.d(e,"c",(function(){return u})),s.d(e,"e",(function(){return d}));
+(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const T={};class E extends b{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){const e=(t,s)=>t.reduceRight((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t),s),s=e(t,new Set),n=[];s.forEach(t=>n.unshift(t)),this._styles=n}else this._styles=[t]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?w?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==T&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return T}}E.finalized=!0,E.render=(t,e,s)=>{if(!s||"object"!=typeof s||!s.scopeName)throw new Error("The `scopeName` option is required.");const r=s.scopeName,i=c.a.has(e),o=p&&11===e.nodeType&&!!e.host,a=o&&!_.has(r),l=a?document.createDocumentFragment():e;if(Object(c.b)(t,l,Object.assign({templateFactory:f(r)},s)),a){const t=c.a.get(l);c.a.delete(l);const s=t.value instanceof u.a?t.value.template:void 0;g(r,l,s),Object(n.b)(e,e.firstChild),e.appendChild(l),c.a.set(e,t)}!i&&o&&window.ShadyCSS.styleElement(e.host)}},1:function(t,e,s){"use strict";s.d(e,"f",(function(){return n})),s.d(e,"g",(function(){return r})),s.d(e,"b",(function(){return o})),s.d(e,"a",(function(){return a})),s.d(e,"d",(function(){return l})),s.d(e,"c",(function(){return u})),s.d(e,"e",(function(){return d}));
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -65,7 +65,7 @@ const n=`{{lit-${String(Math.random()).slice(2)}}}`,r=`\x3c!--${n}--\x3e`,i=new
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
-const n=new WeakMap,r=t=>(...e)=>{const s=t(...e);return n.set(s,!0),s},i=t=>"function"==typeof t&&n.has(t)},107:function(t,e,s){"use strict";s.r(e);var n=s(0);class r extends n.a{constructor(){super(),this.replayBase="http://localhost:9990/",this.view="replay",this.ts="",this.url="",this.config="",this.coll="",this.paramString=null}static get properties(){return{url:{type:String},ts:{type:String},source:{type:String},replayBase:{type:String},title:{type:String},coll:{type:String},config:{type:String},paramString:{type:String},hashString:{type:String}}}firstUpdated(){window.addEventListener("message",t=>{const e=this.renderRoot.querySelector("iframe");e&&t.source===e.contentWindow&&t.data.title&&(this.title=t.data.title)})}updated(t){(t.has("url")||t.has("ts")||t.has("source"))&&(this.paramString=new URLSearchParams({source:this.source,customColl:this.coll,config:this.config,embed:"true"}).toString(),this.hashString=new URLSearchParams({url:this.url,ts:this.ts,view:this.view}).toString())}static get styles(){return n.b`
+const n=new WeakMap,r=t=>(...e)=>{const s=t(...e);return n.set(s,!0),s},i=t=>"function"==typeof t&&n.has(t)},107:function(t,e,s){"use strict";s.r(e);var n=s(0);class r extends n.a{constructor(){super(),this.replayBase="http://localhost:9990/",this.view="replay",this.ts="",this.url="",this.config="",this.coll="",this.paramString=null,this.deepLink=!1}static get properties(){return{url:{type:String},ts:{type:String},source:{type:String},replayBase:{type:String},title:{type:String},coll:{type:String},config:{type:String},paramString:{type:String},hashString:{type:String},deepLink:{type:Boolean}}}firstUpdated(){window.addEventListener("message",t=>{const e=this.renderRoot.querySelector("iframe");if(e&&t.source===e.contentWindow){if(t.data.title&&(this.title=t.data.title),console.log(t.data),!this.deepLink)return;const e=new URLSearchParams({url:t.data.url,ts:t.data.ts});window.location.hash="#"+e.toString()}}),this.deepLink&&(this.updateFromHash(),window.addEventListener("hashchange",t=>this.updateFromHash()))}updateFromHash(){const t=new URLSearchParams(window.location.hash.slice(1));t.has("url")&&(this.url=t.get("url")),t.has("ts")&&(this.ts=t.get("ts"))}updated(t){(t.has("url")||t.has("ts")||t.has("source"))&&(this.paramString=new URLSearchParams({source:this.source,customColl:this.coll,config:this.config,embed:"true"}).toString(),this.hashString=new URLSearchParams({url:this.url,ts:this.ts,view:this.view}).toString())}static get styles(){return n.b`
iframe {
width: 100%;
height: 100%;
diff --git a/dist/frontend.js b/dist/frontend.js
index 9013c93..e9c4916 100644
--- a/dist/frontend.js
+++ b/dist/frontend.js
@@ -134,7 +134,7 @@ const n=new WeakMap,s=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error(
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
- */const c=new WeakMap,d=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error("unsafeSVG can only be used in text bindings");const i=c.get(t);if(void 0!==i&&Object(o.h)(e)&&e===i.value&&t.value===i.fragment)return;const a=document.createElement("template");a.innerHTML=`${e} `;const n=a.content,s=n.firstChild;n.removeChild(s),Object(l.c)(n,s.firstChild);const d=document.importNode(n,!0);t.setValue(d),c.set(t,{value:e,fragment:d})}),b=new WeakMap,f=Object(r.d)(e=>t=>{if(!(t instanceof r.a)||t instanceof r.c||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:i}=t,{style:a}=i.element;let o=b.get(t);void 0===o&&(a.cssText=i.strings.join(" "),b.set(t,o=new Set)),o.forEach(t=>{t in e||(o.delete(t),-1===t.indexOf("-")?a[t]=null:a.removeProperty(t))});for(const t in e)o.add(t),-1===t.indexOf("-")?a[t]=e[t]:a.setProperty(t,e[t])});async function h(e){try{e=new URL(e,window.location.origin).href}catch(e){}return{url:e,coll:"id-"+(await async function(e,t){const i=(new TextEncoder).encode(e),a=await crypto.subtle.digest(t,i);return Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,"0")).join("")}(e,"SHA-256")).slice(0,12)}}var u;function m(e,t){void 0===t&&(t={});var i=t.registrationOptions;void 0===i&&(i={}),delete t.registrationOptions;var a=function(e){for(var i=[],a=arguments.length-1;a-- >0;)i[a]=arguments[a+1];t&&t[e]&&t[e].apply(t,i)};"serviceWorker"in navigator&&u.then((function(){Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))?(!function(e,t,i){fetch(e).then((function(a){404===a.status?(t("error",new Error("Service worker not found at "+e)),v()):-1===a.headers.get("content-type").indexOf("javascript")?(t("error",new Error("Expected "+e+" to have javascript content-type, but received "+a.headers.get("content-type"))),v()):g(e,t,i)})).catch((function(e){return p(t,e)}))}(e,a,i),navigator.serviceWorker.ready.then((function(e){a("ready",e)}))):(g(e,a,i),navigator.serviceWorker.ready.then((function(e){a("ready",e)})))}))}function p(e,t){navigator.onLine||e("offline"),e("error",t)}function g(e,t,i){navigator.serviceWorker.register(e,i).then((function(e){t("registered",e),e.waiting?t("updated",e):e.onupdatefound=function(){t("updatefound",e);var i=e.installing;i.onstatechange=function(){"installed"===i.state&&(navigator.serviceWorker.controller?t("updated",e):t("cached",e))}}})).catch((function(e){return p(t,e)}))}function v(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}"undefined"!=typeof window&&(u="undefined"!=typeof Promise?new Promise((function(e){return window.addEventListener("load",e)})):{then:function(e){return window.addEventListener("load",e)}});var x=i(53),w=i.n(x),k=i(81),y=i.n(k),z=i(82),S=i.n(z),_=i(54),$=i.n(_),C=i(83),T=i.n(C),U=i(84),A=i.n(U),j=i(85),P=i.n(j),I=i(86),L=i.n(I),E=i(87),R=i.n(E),N=i(88),O=i.n(N),D=i(89),G=i.n(D),M=i(90),q=i.n(M),B=i(91),F=i.n(B),H=i(92),V=i.n(H);const W=Object(a.d)(S.a);function Z(e){return[W,e]}const K=new Worker("./sw.js");class Y extends a.a{constructor(){super(),this.sourceUrl=null,this.collInfo=null,this.showTerms=!1,this.pageParams={}}static get properties(){return{pageParams:{type:Object},sourceUrl:{type:String},navMenuShown:{type:Boolean},showTerms:{type:Boolean},collInfo:{type:Object},loadInfo:{type:Object},embed:{type:String}}}static get styles(){return Z(a.b`
+ */const c=new WeakMap,d=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error("unsafeSVG can only be used in text bindings");const i=c.get(t);if(void 0!==i&&Object(o.h)(e)&&e===i.value&&t.value===i.fragment)return;const a=document.createElement("template");a.innerHTML=`${e} `;const n=a.content,s=n.firstChild;n.removeChild(s),Object(l.c)(n,s.firstChild);const d=document.importNode(n,!0);t.setValue(d),c.set(t,{value:e,fragment:d})}),b=new WeakMap,f=Object(r.d)(e=>t=>{if(!(t instanceof r.a)||t instanceof r.c||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:i}=t,{style:a}=i.element;let o=b.get(t);void 0===o&&(a.cssText=i.strings.join(" "),b.set(t,o=new Set)),o.forEach(t=>{t in e||(o.delete(t),-1===t.indexOf("-")?a[t]=null:a.removeProperty(t))});for(const t in e)o.add(t),-1===t.indexOf("-")?a[t]=e[t]:a.setProperty(t,e[t])});async function h(e){try{e=new URL(e,window.location.origin).href}catch(e){}return{url:e,coll:"id-"+(await async function(e,t){const i=(new TextEncoder).encode(e),a=await crypto.subtle.digest(t,i);return Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,"0")).join("")}(e,"SHA-256")).slice(0,12)}}var u;function m(e,t){void 0===t&&(t={});var i=t.registrationOptions;void 0===i&&(i={}),delete t.registrationOptions;var a=function(e){for(var i=[],a=arguments.length-1;a-- >0;)i[a]=arguments[a+1];t&&t[e]&&t[e].apply(t,i)};"serviceWorker"in navigator&&u.then((function(){Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))?(!function(e,t,i){fetch(e).then((function(a){404===a.status?(t("error",new Error("Service worker not found at "+e)),v()):-1===a.headers.get("content-type").indexOf("javascript")?(t("error",new Error("Expected "+e+" to have javascript content-type, but received "+a.headers.get("content-type"))),v()):g(e,t,i)})).catch((function(e){return p(t,e)}))}(e,a,i),navigator.serviceWorker.ready.then((function(e){a("ready",e)}))):(g(e,a,i),navigator.serviceWorker.ready.then((function(e){a("ready",e)})))}))}function p(e,t){navigator.onLine||e("offline"),e("error",t)}function g(e,t,i){navigator.serviceWorker.register(e,i).then((function(e){t("registered",e),e.waiting?t("updated",e):e.onupdatefound=function(){t("updatefound",e);var i=e.installing;i.onstatechange=function(){"installed"===i.state&&(navigator.serviceWorker.controller?t("updated",e):t("cached",e))}}})).catch((function(e){return p(t,e)}))}function v(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}"undefined"!=typeof window&&(u="undefined"!=typeof Promise?new Promise((function(e){return window.addEventListener("load",e)})):{then:function(e){return window.addEventListener("load",e)}});var x=i(53),w=i.n(x),k=i(81),y=i.n(k),z=i(82),S=i.n(z),_=i(54),$=i.n(_),C=i(83),T=i.n(C),U=i(84),A=i.n(U),j=i(85),P=i.n(j),I=i(86),E=i.n(I),L=i(87),R=i.n(L),N=i(88),O=i.n(N),D=i(89),G=i.n(D),M=i(90),q=i.n(M),B=i(91),F=i.n(B),H=i(92),V=i.n(H);const W=Object(a.d)(S.a);function Z(e){return[W,e]}const K=new Worker("./sw.js");class Y extends a.a{constructor(){super(),this.sourceUrl=null,this.collInfo=null,this.showTerms=!1,this.pageParams={}}static get properties(){return{pageParams:{type:Object},sourceUrl:{type:String},navMenuShown:{type:Boolean},showTerms:{type:Boolean},collInfo:{type:Object},loadInfo:{type:Object},embed:{type:String}}}static get styles(){return Z(a.b`
#wrlogo {
max-height: 2.5rem;
margin-right: 8px;
@@ -222,7 +222,7 @@ const n=new WeakMap,s=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error(
`}
${this.showTerms?a.c`
-
+
this.showTerms=!1}">
Terms and Privacy
@@ -238,7 +238,8 @@ const n=new WeakMap,s=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error(
Privacy
No data is uploaded anywhere and no information is collected.
- All content rendered stays directly in your browser.
+ All content rendered stays directly in your browser. When loading an archive from Google Drive,
+ the site may ask for account authorization to download the specified file only.
Disclaimer of Warranties
The application may not always be available. No guarantees!
@@ -252,7 +253,6 @@ const n=new WeakMap,s=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error(
-
`:""} `}firstUpdated(){this.initRoute()}updated(e){e.has("sourceUrl")&&(this.collInfo=null)}onFavIcons(e){const t=document.querySelector("head"),i=document.querySelectorAll("link[rel*='icon']");for(const e of i)t.removeChild(e);for(const i of e.detail.icons){const e=document.createElement("link");e.rel=i.rel,e.href=i.href,t.appendChild(e)}}onNavMenu(){this.navMenuShown=!this.navMenuShown}initRoute(){this.pageParams=new URLSearchParams(window.location.search);let e=this.pageParams.get("state");if(e)try{if(e=JSON.parse(e),e.ids instanceof Array&&e.userId&&"open"===e.action)return this.pageParams.set("source","googledrive://"+e.ids[0]),this.pageParams.delete("state"),void(window.location.search=this.pageParams.toString())}catch(e){console.log(e)}if(this.sourceUrl=this.pageParams.get("source")||"",this.embed=this.pageParams.get("embed")||"",this.pageParams.has("terms")&&(this.showTerms=!0),this.pageParams.get("config")){this.loadInfo||(this.loadInfo={});try{this.loadInfo.extraConfig=JSON.parse(this.pageParams.get("config"))}catch(e){console.log("invalid config: "+e)}}this.pageParams.get("customColl")&&(this.loadInfo||(this.loadInfo={}),this.loadInfo.customColl=this.pageParams.get("customColl"))}onStartLoad(e){if(!e.detail.blobUrl)return this.pageParams.set("source",e.detail.sourceUrl),void(window.location.search=this.pageParams.toString());this.sourceUrl=e.detail.sourceUrl,this.loadInfo=e.detail}onCollLoaded(e){this.loadInfo=null,e.detail.collInfo&&(this.collInfo=e.detail.collInfo),e.detail.alreadyLoaded||(this.initRoute(),e.detail.sourceUrl!==this.sourceUrl&&(this.pageParams.set("source",e.detail.sourceUrl),window.location.search=this.pageParams.toString()))}}class J extends a.a{constructor(){super(),this.progress=0,this.total=0,this.percent=0,this.coll="",this.state="waiting",this.loadInfo=null}static get properties(){return{sourceUrl:{type:String},loadInfo:{type:Object},state:{type:String},progress:{type:Number},percent:{type:Number},error:{type:String},total:{type:Number},status:{type:String},coll:{type:String}}}firstUpdated(e){this.initMessages()}initMessages(){K.addEventListener("message",e=>{switch(e.data.msg_type){case"collProgress":e.data.name===this.coll&&(this.percent=e.data.percent,e.data.error&&(this.error=e.data.error,this.state="errored"));break;case"collAdded":e.data.name===this.coll&&(this.total||(this.total=100),this.progress=this.total,this.percent=100,this.dispatchEvent(new CustomEvent("coll-loaded",{detail:e.data})))}})}async doLoad(){let e=this.sourceUrl,t=null;try{const{scheme:i,host:a,path:o}=function(e){let t=e.indexOf("://"),i=0,a="",o="",r="";return t>=0?(a=e.slice(0,t),t+=3):(t++,e.startsWith("//")&&(t+=2)),i=e.indexOf("/",t),i>0?(o=e.slice(t,i),r=e.slice(i)):(o=e.slice(t),r=""),{scheme:a,host:o,path:r}}(e);switch(i){case"googledrive":this.state="googledrive",t=await this.googledriveInit();break;case"s3":t={sourceUrl:e,loadUrl:`https://${a}.s3.amazonaws.com${o}`,name:this.sourceUrl};break;case"file":if(!this.loadInfo)return this.state="errored",void(this.error="File URLs can not be entered directly or shared.\nYou can select a file to upload from the main page by clicking the 'Choose File...' button.");t={sourceUrl:this.loadInfo.sourceUrl,loadUrl:this.loadInfo.blobUrl,name:this.loadInfo.name}}}catch(e){}t||(t={sourceUrl:e}),this.state="started";const i={msg_type:"addColl",name:this.coll,skipExisting:!0,file:t};this.loadInfo&&this.loadInfo.extraConfig&&(i.extraConfig=this.loadInfo.extraConfig),K.postMessage(i)}googledriveInit(){return this._gdWait=new Promise(e=>this._gdResolve=e),this._gdWait}async onLoadReady(e){this._gdResolve&&this._gdResolve(e.detail)}onCancel(){K.postMessage({msg_type:"cancelLoad",name:this.coll})}updated(e){this.sourceUrl&&e.has("sourceUrl")&&this.doLoad()}static get styles(){return Z(a.b`
.logo {
@@ -786,7 +786,7 @@ const n=new WeakMap,s=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error(
-
`:""}
`}onReAuthed(e){this.reauthWait=(async()=>{const t=e.detail.headers;await fetch(`/wabac/api/${this.collInfo.coll}/updateAuth`,{method:"POST",body:JSON.stringify({headers:t})});this.showAuth&&(this.onRefresh(null,!0),this.showAuth=!1)})()}}class ae extends a.a{constructor(){super(),this.state="trypublic",this.sourceUrl="",this.scriptLoaded=!1,this.error=!1}static get properties(){return{state:{type:String},sourceUrl:{type:String},error:{type:Boolean},reauth:{type:Boolean}}}updated(e){e.has("sourceUrl")&&(this.error=!1,this.state="trypublic",this.tryPublicAccess().then(e=>{e||(this.state="tryauto",this.requestUpdate())}))}async tryPublicAccess(){try{const e=this.sourceUrl,t="https://helper-proxy.webrecorder.workers.dev/g/"+e.slice("googledrive://".length);let i=null;try{i=await fetch(t)}catch(e){return!1}const a=await i.json();if(!a.url||!a.name||!a.size)return!1;if(a.size>15e6)return!1;const o=a.url;try{const e=new AbortController,t=e.signal;if(i=await fetch(o,{signal:t}),e.abort(),200!=i.status)return!1}catch(e){return!1}const r=a.name,n={publicUrl:o},s=Number(a.size);return this.dispatchEvent(new CustomEvent("load-ready",{detail:{name:r,extra:n,size:s,sourceUrl:e}})),!0}catch(e){return!1}}onLoad(){this.scriptLoaded=!0,this.gauth("none",e=>{"immediate_failed"===e.error?"implicitonly"!==this.state&&(this.state="trymanual"):this.authed(e)})}onClickAuth(){this.gauth("select_account",e=>{e.error||this.authed(e)})}async authed(e){const t=this.sourceUrl,i="https://www.googleapis.com/drive/v3/files/"+t.slice("googledrive://".length),a={Authorization:"Bearer "+e.access_token},o=await fetch(i+"?fields=name,size&supportsAllDrives=true",{headers:a});if(404===o.status||403==o.status)return"implicitonly"!==this.state&&(this.state="trymanual"),void(this.error=!0);this.error=!1;const r=await o.json(),n=r.name,s=Number(r.size);this.dispatchEvent(new CustomEvent("load-ready",{detail:{sourceUrl:t,headers:a,size:s,name:n}}))}static get styles(){return Z(a.b``)}render(){return a.c`
@@ -883,7 +882,7 @@ const a={},o={}},5:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
-const a="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,i=null,a=null)=>{for(;t!==i;){const i=t.nextSibling;e.insertBefore(t,a),t=i}},r=(e,t,i=null)=>{for(;t!==i;){const i=t.nextSibling;e.removeChild(t),t=i}}},53:function(e,t,i){"use strict";const a=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],o=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],r=(e,t)=>{let i=e;return"string"==typeof t?i=e.toLocaleString(t):!0===t&&(i=e.toLocaleString()),i};e.exports=(e,t)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const i=(t=Object.assign({bits:!1},t)).bits?o:a;if(t.signed&&0===e)return" 0 "+i[0];const n=e<0,s=n?"-":t.signed?"+":"";if(n&&(e=-e),e<1){return s+r(e,t.locale)+" "+i[0]}const l=Math.min(Math.floor(Math.log10(e)/3),i.length-1);return e=Number((e/Math.pow(1e3,l)).toPrecision(3)),s+r(e,t.locale)+" "+i[l]}},54:function(e,t){e.exports=' '},56:function(e,t,i){const{defaults:a}=i(26),{rtrim:o,splitCells:r,escape:n,findClosingBracket:s}=i(27);function l(e,t,i){const a=t.href,o=t.title?n(t.title):null;return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:a,title:o,text:e[1]}:{type:"image",raw:i,text:n(e[1]),href:a,title:o}}e.exports=class{constructor(e){this.options=e||a}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e,t){const i=this.rules.block.code.exec(e);if(i){const e=t[t.length-1];if(e&&"paragraph"===e.type)return t.pop(),e.text+="\n"+i[0].trimRight(),e.raw+="\n"+i[0],e;{const e=i[0].replace(/^ {4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?e:o(e,"\n")}}}}fences(e){const t=this.rules.block.fences.exec(e);if(t)return{type:"code",raw:t[0],lang:t[2]?t[2].trim():t[2],text:t[3]||""}}heading(e){const t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:r(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,i=e.align.length;for(t=0;t ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const i=t[2],a=i.length>1,o={type:"list",raw:e,ordered:a,start:a?+i:"",loose:!1,items:[]},r=t[0].match(this.rules.block.item);let n,s,l,c,d,b,f,h=!1;const u=r.length;for(let t=0;t1?1===l.length:l.length>1||this.options.smartLists&&l!==i)&&(c=r.slice(t+1).join("\n"),o.raw=o.raw.substring(0,o.raw.length-c.length),t=u-1)),d=h||/\n\n(?!\s*$)/.test(n),t!==u-1&&(h="\n"===n.charAt(n.length-1),d||(d=h)),d&&(o.loose=!0),b=/^\[[ xX]\] /.test(n),f=void 0,b&&(f=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),o.items.push({raw:e,task:b,checked:f,loose:d,text:n});return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):n(t[0]):t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:r(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,a=e.align.length;for(i=0;i/i.test(a[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:a[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):n(a[0]):a[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=s(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}let i=t[2],a="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e?(i=e[1],a=e[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),l(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return l(i,e,i[0])}}strong(e){const t=this.rules.inline.strong.exec(e);if(t)return{type:"strong",raw:t[0],text:t[4]||t[3]||t[2]||t[1]}}em(e){const t=this.rules.inline.em.exec(e);if(t)return{type:"em",raw:t[0],text:t[6]||t[5]||t[4]||t[3]||t[2]||t[1]}}codespan(e){const t=this.rules.inline.code.exec(e);if(t)return{type:"codespan",raw:t[0],text:n(t[2].trim(),!0)}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,a;return"@"===i[2]?(e=n(this.options.mangle?t(i[1]):i[1]),a="mailto:"+e):(e=n(i[1]),a=e),{type:"link",raw:i[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,a;if("@"===i[2])e=n(this.options.mangle?t(i[0]):i[0]),a="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=n(i[0]),a="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,i){const a=this.rules.inline.text.exec(e);if(a){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):n(a[0]):a[0]:n(this.options.smartypants?i(a[0]):a[0]),{type:"text",raw:a[0],text:e}}}}},57:function(e,t,i){const{defaults:a}=i(26),{cleanUrl:o,escape:r}=i(27);e.exports=class{constructor(e){this.options=e||a}code(e,t,i){const a=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,a);null!=t&&t!==e&&(i=!0,e=t)}return a?''+(i?e:r(e,!0))+" \n":""+(i?e:r(e,!0))+" "}blockquote(e){return"\n"+e+" \n"}html(e){return e}heading(e,t,i,a){return this.options.headerIds?"\n":""+e+" \n"}hr(){return this.options.xhtml?" \n":" \n"}list(e,t,i){const a=t?"ol":"ul";return"<"+a+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+""+a+">\n"}listitem(e){return""+e+" \n"}checkbox(e){return" "}paragraph(e){return""+e+"
\n"}table(e,t){return t&&(t=""+t+" ")," \n"}tablerow(e){return"\n"+e+" \n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+""+i+">\n"}strong(e){return""+e+" "}em(e){return""+e+" "}codespan(e){return""+e+""}br(){return this.options.xhtml?" ":" "}del(e){return""+e+""}link(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a='"+i+" ",a}image(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a=' ":">",a}text(e){return e}}},58:function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}},59:function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},6:function(e,t,i){"use strict";i.d(t,"d",(function(){return n.a})),i.d(t,"a",(function(){return a.b})),i.d(t,"b",(function(){return a.e})),i.d(t,"c",(function(){return a.g})),i.d(t,"e",(function(){return s}));var a=i(2);
+const a="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,i=null,a=null)=>{for(;t!==i;){const i=t.nextSibling;e.insertBefore(t,a),t=i}},r=(e,t,i=null)=>{for(;t!==i;){const i=t.nextSibling;e.removeChild(t),t=i}}},53:function(e,t,i){"use strict";const a=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],o=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],r=(e,t)=>{let i=e;return"string"==typeof t?i=e.toLocaleString(t):!0===t&&(i=e.toLocaleString()),i};e.exports=(e,t)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const i=(t=Object.assign({bits:!1},t)).bits?o:a;if(t.signed&&0===e)return" 0 "+i[0];const n=e<0,s=n?"-":t.signed?"+":"";if(n&&(e=-e),e<1){return s+r(e,t.locale)+" "+i[0]}const l=Math.min(Math.floor(Math.log10(e)/3),i.length-1);return e=Number((e/Math.pow(1e3,l)).toPrecision(3)),s+r(e,t.locale)+" "+i[l]}},54:function(e,t){e.exports='image/svg+xml '},56:function(e,t,i){const{defaults:a}=i(26),{rtrim:o,splitCells:r,escape:n,findClosingBracket:s}=i(27);function l(e,t,i){const a=t.href,o=t.title?n(t.title):null;return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:a,title:o,text:e[1]}:{type:"image",raw:i,text:n(e[1]),href:a,title:o}}e.exports=class{constructor(e){this.options=e||a}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e,t){const i=this.rules.block.code.exec(e);if(i){const e=t[t.length-1];if(e&&"paragraph"===e.type)return t.pop(),e.text+="\n"+i[0].trimRight(),e.raw+="\n"+i[0],e;{const e=i[0].replace(/^ {4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?e:o(e,"\n")}}}}fences(e){const t=this.rules.block.fences.exec(e);if(t)return{type:"code",raw:t[0],lang:t[2]?t[2].trim():t[2],text:t[3]||""}}heading(e){const t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:r(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,i=e.align.length;for(t=0;t ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const i=t[2],a=i.length>1,o={type:"list",raw:e,ordered:a,start:a?+i:"",loose:!1,items:[]},r=t[0].match(this.rules.block.item);let n,s,l,c,d,b,f,h=!1;const u=r.length;for(let t=0;t1?1===l.length:l.length>1||this.options.smartLists&&l!==i)&&(c=r.slice(t+1).join("\n"),o.raw=o.raw.substring(0,o.raw.length-c.length),t=u-1)),d=h||/\n\n(?!\s*$)/.test(n),t!==u-1&&(h="\n"===n.charAt(n.length-1),d||(d=h)),d&&(o.loose=!0),b=/^\[[ xX]\] /.test(n),f=void 0,b&&(f=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),o.items.push({raw:e,task:b,checked:f,loose:d,text:n});return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):n(t[0]):t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:r(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,a=e.align.length;for(i=0;i/i.test(a[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:a[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):n(a[0]):a[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=s(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}let i=t[2],a="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e?(i=e[1],a=e[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),l(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return l(i,e,i[0])}}strong(e){const t=this.rules.inline.strong.exec(e);if(t)return{type:"strong",raw:t[0],text:t[4]||t[3]||t[2]||t[1]}}em(e){const t=this.rules.inline.em.exec(e);if(t)return{type:"em",raw:t[0],text:t[6]||t[5]||t[4]||t[3]||t[2]||t[1]}}codespan(e){const t=this.rules.inline.code.exec(e);if(t)return{type:"codespan",raw:t[0],text:n(t[2].trim(),!0)}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,a;return"@"===i[2]?(e=n(this.options.mangle?t(i[1]):i[1]),a="mailto:"+e):(e=n(i[1]),a=e),{type:"link",raw:i[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,a;if("@"===i[2])e=n(this.options.mangle?t(i[0]):i[0]),a="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=n(i[0]),a="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,i){const a=this.rules.inline.text.exec(e);if(a){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):n(a[0]):a[0]:n(this.options.smartypants?i(a[0]):a[0]),{type:"text",raw:a[0],text:e}}}}},57:function(e,t,i){const{defaults:a}=i(26),{cleanUrl:o,escape:r}=i(27);e.exports=class{constructor(e){this.options=e||a}code(e,t,i){const a=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,a);null!=t&&t!==e&&(i=!0,e=t)}return a?''+(i?e:r(e,!0))+" \n":""+(i?e:r(e,!0))+" "}blockquote(e){return"\n"+e+" \n"}html(e){return e}heading(e,t,i,a){return this.options.headerIds?"\n":""+e+" \n"}hr(){return this.options.xhtml?" \n":" \n"}list(e,t,i){const a=t?"ol":"ul";return"<"+a+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+""+a+">\n"}listitem(e){return""+e+" \n"}checkbox(e){return" "}paragraph(e){return""+e+"
\n"}table(e,t){return t&&(t=""+t+" ")," \n"}tablerow(e){return"\n"+e+" \n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+""+i+">\n"}strong(e){return""+e+" "}em(e){return""+e+" "}codespan(e){return""+e+""}br(){return this.options.xhtml?" ":" "}del(e){return""+e+""}link(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a='"+i+" ",a}image(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a=' ":">",a}text(e){return e}}},58:function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}},59:function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},6:function(e,t,i){"use strict";i.d(t,"d",(function(){return n.a})),i.d(t,"a",(function(){return a.b})),i.d(t,"b",(function(){return a.e})),i.d(t,"c",(function(){return a.g})),i.d(t,"e",(function(){return s}));var a=i(2);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
diff --git a/src/embed.js b/src/embed.js
index 86941f2..1a17628 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -13,6 +13,7 @@ class EmbedRWP extends LitElement
this.config = "";
this.coll = "";
this.paramString = null;
+ this.deepLink = false;
}
static get properties() {
@@ -28,7 +29,9 @@ class EmbedRWP extends LitElement
config: { type: String },
paramString: { type: String },
- hashString: { type: String }
+ hashString: { type: String },
+
+ deepLink: { type: Boolean }
}
}
@@ -40,8 +43,36 @@ class EmbedRWP extends LitElement
if (event.data.title) {
this.title = event.data.title;
}
+
+ console.log(event.data);
+
+ if (!this.deepLink) {
+ return;
+ }
+
+ const currHash = new URLSearchParams({
+ url: event.data.url,
+ ts: event.data.ts,
+ });
+ window.location.hash = "#" + currHash.toString();
}
});
+
+ if (this.deepLink) {
+ this.updateFromHash();
+ window.addEventListener("hashchange", (event) => this.updateFromHash());
+ }
+ }
+
+ updateFromHash() {
+ const qs = new URLSearchParams(window.location.hash.slice(1));
+
+ if (qs.has("url")) {
+ this.url = qs.get("url");
+ }
+ if (qs.has("ts")) {
+ this.ts = qs.get("ts");
+ }
}
updated(changedProperties) {
diff --git a/src/frontend.js b/src/frontend.js
index 5591860..b93a8c6 100644
--- a/src/frontend.js
+++ b/src/frontend.js
@@ -156,7 +156,7 @@ class AppMain extends LitElement
`}
${this.showTerms ? html`
-
+
this.showTerms = false}">
Terms and Privacy
@@ -172,7 +172,8 @@ class AppMain extends LitElement
Privacy
No data is uploaded anywhere and no information is collected.
- All content rendered stays directly in your browser.
+ All content rendered stays directly in your browser. When loading an archive from Google Drive,
+ the site may ask for account authorization to download the specified file only.
Disclaimer of Warranties
The application may not always be available. No guarantees!
@@ -186,7 +187,6 @@ class AppMain extends LitElement
-
` : ``} `
}
@@ -1818,7 +1818,6 @@ class WrReplayPage extends LitElement
-
` : ``}
`;