diff --git a/build/xcode/Save to Raindrop.io/App/Info.plist b/build/xcode/Save to Raindrop.io/App/Info.plist
index de2151d6..c628ad6a 100644
--- a/build/xcode/Save to Raindrop.io/App/Info.plist
+++ b/build/xcode/Save to Raindrop.io/App/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
- 5.6.57
+ 5.6.60
CFBundleURLTypes
@@ -32,7 +32,7 @@
CFBundleVersion
- 366
+ 367
LSApplicationCategoryType
public.app-category.productivity
LSMinimumSystemVersion
diff --git a/build/xcode/Save to Raindrop.io/Extension/Info.plist b/build/xcode/Save to Raindrop.io/Extension/Info.plist
index 4baf5ac8..a8d301e5 100644
--- a/build/xcode/Save to Raindrop.io/Extension/Info.plist
+++ b/build/xcode/Save to Raindrop.io/Extension/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
- 5.6.57
+ 5.6.60
CFBundleVersion
- 366
+ 367
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSExtension
diff --git a/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.pbxproj b/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.pbxproj
index 4c052340..f1ecb7de 100644
--- a/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.pbxproj
+++ b/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.pbxproj
@@ -441,7 +441,7 @@
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 366;
+ CURRENT_PROJECT_VERSION = 367;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
@@ -452,7 +452,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
- MARKETING_VERSION = 5.6.57;
+ MARKETING_VERSION = 5.6.60;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari.extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -467,7 +467,7 @@
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 366;
+ CURRENT_PROJECT_VERSION = 367;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
@@ -478,7 +478,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
- MARKETING_VERSION = 5.6.57;
+ MARKETING_VERSION = 5.6.60;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari.extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -497,7 +497,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 366;
+ CURRENT_PROJECT_VERSION = 367;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
@@ -508,7 +508,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
- MARKETING_VERSION = 5.6.57;
+ MARKETING_VERSION = 5.6.60;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -525,7 +525,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 366;
+ CURRENT_PROJECT_VERSION = 367;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
@@ -536,7 +536,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
- MARKETING_VERSION = 5.6.57;
+ MARKETING_VERSION = 5.6.60;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
diff --git a/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.xcworkspace/xcuserdata/exentrich.xcuserdatad/UserInterfaceState.xcuserstate b/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.xcworkspace/xcuserdata/exentrich.xcuserdatad/UserInterfaceState.xcuserstate
index 020c3751..e431702c 100644
Binary files a/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.xcworkspace/xcuserdata/exentrich.xcuserdatad/UserInterfaceState.xcuserstate and b/build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.xcworkspace/xcuserdata/exentrich.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/package.json b/package.json
index c9b9adb6..9351bcd6 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "app",
- "version": "5.6.60",
+ "version": "5.6.61",
"description": "All-in-one bookmark manager",
"author": "Rustem Mussabekov",
"license": "MIT",
diff --git a/src/assets/target/extension/welcome/index.html b/src/assets/target/extension/welcome/index.html
index 3e58aac6..ff3a9895 100644
--- a/src/assets/target/extension/welcome/index.html
+++ b/src/assets/target/extension/welcome/index.html
@@ -28,6 +28,18 @@
+
+
+
+
+ To use this app, we require your email and username for account setup.
+ When you create a bookmark, the page’s URL and title are also sent to Raindrop.io server.
+ Your data is handled safely according to our Privacy Policy and won’t be shared with third parties.
+
+
+
Allow
+
Decline and uninstall
+
diff --git a/src/assets/target/extension/welcome/logic.js b/src/assets/target/extension/welcome/logic.js
index 399d7aa5..69377025 100644
--- a/src/assets/target/extension/welcome/logic.js
+++ b/src/assets/target/extension/welcome/logic.js
@@ -131,4 +131,9 @@ window.onload = ()=>{
}
updateNavVisibility()
window.addEventListener('scroll', updateNavVisibility)
+
+ document.querySelector('#decline-uninstall').addEventListener('click', e=>{
+ e.preventDefault()
+ browser.management.uninstallSelf({ showConfirmDialog: false })
+ })
}
\ No newline at end of file
diff --git a/src/target/extension/background/highlights/highlight.js b/src/target/extension/background/highlights/highlight.js
index 806c4356..516168bd 100644
--- a/src/target/extension/background/highlights/highlight.js
+++ b/src/target/extension/background/highlights/highlight.js
@@ -1,9 +1,9 @@
-"use strict";var Kr=Object.defineProperty;var In=t=>{throw TypeError(t)};var Jr=(t,e,n)=>e in t?Kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ct=(t,e,n)=>Jr(t,typeof e!="symbol"?e+"":e,n),Pn=(t,e,n)=>e.has(t)||In("Cannot "+n);var K=(t,e,n)=>(Pn(t,e,"read from private field"),n?n.call(t):e.get(t)),Ue=(t,e,n)=>e.has(t)?In("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ze=(t,e,n,r)=>(Pn(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);(function(){var t=window.Document.prototype.createElement,e=window.Document.prototype.createElementNS,n=window.Document.prototype.importNode,r=window.Document.prototype.prepend,o=window.Document.prototype.append,s=window.DocumentFragment.prototype.prepend,l=window.DocumentFragment.prototype.append,d=window.Node.prototype.cloneNode,h=window.Node.prototype.appendChild,f=window.Node.prototype.insertBefore,_=window.Node.prototype.removeChild,m=window.Node.prototype.replaceChild,k=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),g=window.Element.prototype.attachShadow,b=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),T=window.Element.prototype.getAttribute,L=window.Element.prototype.setAttribute,S=window.Element.prototype.removeAttribute,C=window.Element.prototype.toggleAttribute,$=window.Element.prototype.getAttributeNS,A=window.Element.prototype.setAttributeNS,xt=window.Element.prototype.removeAttributeNS,Z=window.Element.prototype.insertAdjacentElement,N=window.Element.prototype.insertAdjacentHTML,I=window.Element.prototype.prepend,P=window.Element.prototype.append,F=window.Element.prototype.before,O=window.Element.prototype.after,X=window.Element.prototype.replaceWith,U=window.Element.prototype.remove,yt=window.HTMLElement,ut=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),te=window.HTMLElement.prototype.insertAdjacentElement,ee=window.HTMLElement.prototype.insertAdjacentHTML,Nn=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(i){return Nn.add(i)});function Sn(i){var a=Nn.has(i);return i=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(i),!a&&i}var qr=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function V(i){var a=i.isConnected;if(a!==void 0)return a;if(qr(i))return!0;for(;i&&!(i.__CE_isImportDocument||i instanceof Document);)i=i.parentNode||(window.ShadowRoot&&i instanceof ShadowRoot?i.host:void 0);return!(!i||!(i.__CE_isImportDocument||i instanceof Document))}function qe(i){var a=i.children;if(a)return Array.prototype.slice.call(a);for(a=[],i=i.firstChild;i;i=i.nextSibling)i.nodeType===Node.ELEMENT_NODE&&a.push(i);return a}function Be(i,a){for(;a&&a!==i&&!a.nextSibling;)a=a.parentNode;return a&&a!==i?a.nextSibling:null}function Ve(i,a,c){for(var p=i;p;){if(p.nodeType===Node.ELEMENT_NODE){var u=p;a(u);var v=u.localName;if(v==="link"&&u.getAttribute("rel")==="import"){if(p=u.import,c===void 0&&(c=new Set),p instanceof Node&&!c.has(p))for(c.add(p),p=p.firstChild;p;p=p.nextSibling)Ve(p,a,c);p=Be(i,u);continue}else if(v==="template"){p=Be(i,u);continue}if(u=u.__CE_shadowRoot)for(u=u.firstChild;u;u=u.nextSibling)Ve(u,a,c)}p=p.firstChild?p.firstChild:Be(i,p)}}function ge(){var i=!(dt==null||!dt.noDocumentConstructionObserver),a=!(dt==null||!dt.shadyDomFastWalk);this.m=[],this.g=[],this.j=!1,this.shadyDomFastWalk=a,this.I=!i}function ne(i,a,c,p){var u=window.ShadyDOM;if(i.shadyDomFastWalk&&u&&u.inUse){if(a.nodeType===Node.ELEMENT_NODE&&c(a),a.querySelectorAll)for(i=u.nativeMethods.querySelectorAll.call(a,"*"),a=0;a{Zt(e)}}function wn(t){return Gt(nr,t,!1)}function he(t){return Gt(Jt,t,!0)}function vt(t){return he(t)}function ar(t,e=0){return Gt(Jt|rr|e,t,!0)}function ae(t,e=!0){return Gt(Jt|Lt,t,!0,e)}function ur(t){var e=t.teardown;if(e!==null){const n=kn,r=H;Bn(!0),Se(null);try{e.call(null)}finally{Bn(n),Se(r)}}}function Zt(t,e=!0){var n=!1;if((e||t.f&so)&&t.nodes_start!==null){for(var r=t.nodes_start,o=t.nodes_end;r!==null;){var s=r===o?null:$t(r);r.remove(),r=s}n=!0}br(t,e&&!n),ce(t,0),mt(t,de);var l=t.transitions;if(l!==null)for(const h of l)h.stop();ur(t);var d=t.parent;d!==null&&d.first!==null&&cr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes_start=t.nodes_end=null}function cr(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Qe(t,e){var n=[];bn(t,n,!0),fr(n,()=>{Zt(t),e&&e()})}function fr(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function bn(t,e,n){if(!(t.f&Ht)){if(t.f^=Ht,t.transitions!==null)for(const l of t.transitions)(l.is_global||n)&&e.push(l);for(var r=t.first;r!==null;){var o=r.next,s=(r.f&mn)!==0||(r.f&Lt)!==0;bn(r,e,s?n:!1),r=o}}}function xe(t){dr(t,!0)}function dr(t,e){if(t.f&Ht){t.f^=Ht,ve(t)&&Oe(t);for(var n=t.first;n!==null;){var r=n.next,o=(n.f&mn)!==0||(n.f&Lt)!==0;dr(n,o?e:!1),n=r}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}const Co=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Te=!1,Ne=!1,tn=[],en=[];function hr(){Te=!1;const t=tn.slice();tn=[],er(t)}function vr(){Ne=!1;const t=en.slice();en=[],er(t)}function It(t){Te||(Te=!0,queueMicrotask(hr)),tn.push(t)}function $o(t){Ne||(Ne=!0,Co(vr)),en.push(t)}function xo(){Te&&hr(),Ne&&vr()}function En(t){let e=Ct|St;M===null?e|=Pt:M.f|=or;const n={children:null,deps:null,equals:ir,f:e,fn:t,reactions:null,v:null,version:0,parent:M};if(H!==null&&H.f&Ct){var r=H;(r.children??(r.children=[])).push(n)}return n}function pr(t){var e=t.children;if(e!==null){t.children=null;for(var n=0;nt.version)return!0}}r||mt(t,G)}return!1}function Do(t,e,n){throw t}function wr(t){var _;var e=z,n=et,r=Nt,o=H,s=Yt,l=pt;z=null,et=0,Nt=null,H=t.f&(Lt|je)?null:t,Yt=!zt&&(t.f&Pt)!==0,pt=null;try{var d=(0,t.fn)(),h=t.deps;if(z!==null){var f;if(ce(t,et),h!==null&&et>0)for(h.length=et+z.length,f=0;f1e3&&(Xt=0,vo()),Xt++}function kr(t){var e=t.length;if(e!==0){Er();var n=zt;zt=!0;try{for(var r=0;r1001)return;const t=Ot;Ot=[],kr(t),ue||(Xt=0)}function Re(t){be===mr&&(ue||(ue=!0,queueMicrotask(jo)));for(var e=t;e.parent!==null;){e=e.parent;var n=e.f;if(n&(je|Lt)){if(!(n&G))return;e.f^=G}}Ot.push(e)}function Cr(t,e){var n=t.first,r=[];t:for(;n!==null;){var o=n.f,s=(o&Lt)!==0,l=s&&(o&G)!==0;if(!l&&!(o&Ht))if(o&Jt){s?n.f^=G:ve(n)&&Oe(n);var d=n.first;if(d!==null){n=d;continue}}else o&nr&&r.push(n);var h=n.next;if(h===null){let m=n.parent;for(;m!==null;){if(t===m)break t;var f=m.next;if(f!==null){n=f;continue t}m=m.parent}}n=h}for(var _=0;_0||o.length>0)&&Qt(),Xt=0,r}finally{be=e,Ot=n}}function x(t){var e=t.f;if(e&de)return t.v;if(H!==null){pt!==null&&pt.includes(t)&&yo();var n=H.deps;z===null&&n!==null&&n[et]===t?et++:z===null?z=[t]:z.push(t),Nt!==null&&M!==null&&M.f&G&&!(M.f&Lt)&&Nt.includes(t)&&(mt(M,St),Re(M))}if(e&Ct){var r=t;ve(r)&&_r(r)}return t.v}function Oo(t){const e=H;try{return H=null,t()}finally{H=e}}const Ro=~(St|fe|G);function mt(t,e){t.f=t.f&Ro|e}function pe(t,e=!1,n){Y={p:Y,c:null,e:null,m:!1,s:t,x:null,l:null},e||(Y.l={s:null,u:null,r1:[],r2:nt(!1)})}function _e(t){const e=Y;if(e!==null){t!==void 0&&(e.x=t);const l=e.e;if(l!==null){var n=M,r=H;e.e=null;try{for(var o=0;o=S.v&&B(S,C+1)}Vn(l)}return!0},ownKeys(h){x(l);var f=Reflect.ownKeys(h).filter(k=>{var g=o.get(k);return g===void 0||g.v!==tt});for(var[_,m]of o)m.v!==tt&&!(_ in h)&&f.push(_);return f},setPrototypeOf(){go()}})}function Vn(t,e=1){B(t,t.v+e)}function De(t){return t!==null&&typeof t=="object"&&Ut in t?t[Ut]:t}function Fo(t,e){return Object.is(De(t),De(e))}var Le,Mt,$r,xr;function rn(){if(Le===void 0){Le=window,Mt=document;var t=Element.prototype,e=Node.prototype;$r=Rt(e,"firstChild").get,xr=Rt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__e=void 0,Text.prototype.__t=void 0}}function me(t=""){return document.createTextNode(t)}function At(t){return $r.call(t)}function $t(t){return xr.call(t)}function lt(t){if(!j)return At(t);var e=At(R);return e===null&&(e=R.appendChild(me())),_t(e),e}function Cn(t,e){if(!j){var n=At(t);return n instanceof Comment&&n.data===""?$t(n):n}return R}function rt(t,e=1,n=!1){let r=j?R:t;for(;e--;)r=$t(r);if(!j)return r;var o=r.nodeType;if(n&&o!==3){var s=me();return r==null||r.before(s),_t(s),s}return _t(r),r}function $n(t){t.textContent=""}let j=!1;function kt(t){j=t}let R;function _t(t){if(t===null)throw vn(),se;return R=t}function Fe(){return _t($t(R))}function J(t){if(j){if($t(R)!==null)throw vn(),se;R=t}}function Ho(t=1){if(j){for(var e=t,n=R;e--;)n=$t(n);R=n}}function on(){for(var t=0,e=R;;){if(e.nodeType===8){var n=e.data;if(n===hn){if(t===0)return e;t-=1}else(n===Qn||n===dn)&&(t+=1)}var r=$t(e);e.remove(),e=r}}const Tr=new Set,sn=new Set;function Io(t,e,n,r){function o(s){if(r.capture||oe.call(e,s),!s.cancelBubble)return n.call(this,s)}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?It(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function ht(t,e,n,r,o){var s={capture:r,passive:o},l=Io(t,e,n,s);(e===document.body||e===window||e===document)&&lr(()=>{e.removeEventListener(t,l,s)})}function Nr(t){for(var e=0;e{throw S});throw _}}finally{t.__root=e,delete t.currentTarget}}}function Po(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function Kt(t,e){var n=M;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function gt(t,e){var n=(e&to)!==0,r=(e&eo)!==0,o,s=!t.startsWith("");return()=>{if(j)return Kt(R,null),R;o===void 0&&(o=Po(s?t:""+t),n||(o=At(o)));var l=r?document.importNode(o,!0):o.cloneNode(!0);if(n){var d=At(l),h=l.lastChild;Kt(d,h)}else Kt(l,l);return l}}function qo(){if(j)return Kt(R,null),R;var t=document.createDocumentFragment(),e=document.createComment(""),n=me();return t.append(e,n),Kt(e,n),t}function at(t,e){if(j){M.nodes_end=R,Fe();return}t!==null&&t.before(e)}const Bo=["touchstart","touchmove"];function Vo(t){return Bo.includes(t)}function Xe(t,e){e!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=e,t.nodeValue=e==null?"":e+"")}function Sr(t,e){const n=e.anchor??e.target.appendChild(me());return Ar(t,{...e,anchor:n})}function Wo(t,e){rn(),e.intro=e.intro??!1;const n=e.target,r=j,o=R;try{for(var s=At(n);s&&(s.nodeType!==8||s.data!==Qn);)s=$t(s);if(!s)throw se;kt(!0),_t(s),Fe();const l=Ar(t,{...e,anchor:s});if(R===null||R.nodeType!==8||R.data!==hn)throw vn(),se;return kt(!1),l}catch(l){if(l===se)return e.recover===!1&&po(),rn(),$n(n),kt(!1),Sr(t,e);throw l}finally{kt(r),_t(o)}}const Wt=new Map;function Ar(t,{target:e,anchor:n,props:r={},events:o,context:s,intro:l=!0}){rn();var d=new Set,h=m=>{for(var k=0;k(ae(()=>{if(s){pe({});var m=Y;m.c=s}o&&(r.$$events=o),j&&Kt(n,null),f=t(n,r)||{},j&&(M.nodes_end=R),s&&_e()}),()=>{for(var m of d){e.removeEventListener(m,oe);var k=Wt.get(m);--k===0?(document.removeEventListener(m,oe),Wt.delete(m)):Wt.set(m,k)}sn.delete(h),ln.delete(f)}));return ln.set(f,_),f}let ln=new WeakMap;function Yo(t){const e=ln.get(t);e&&e()}function Me(t,e,n,r=null,o=!1){j&&Fe();var s=t,l=null,d=null,h=null,f=o?mn:0;ar(()=>{if(h===(h=!!e()))return;let _=!1;if(j){const m=s.data===dn;h===m&&(s=on(),_t(s),kt(!1),_=!0)}h?(l?xe(l):l=ae(()=>n(s)),d&&Qe(d,()=>{d=null})):(d?xe(d):r&&(d=ae(()=>r(s))),l&&Qe(l,()=>{l=null})),_&&kt(!0)},f),j&&(s=R)}let Ke=null;function Uo(t,e){return e}function zo(t,e,n,r){for(var o=[],s=e.length,l=0;l0&&o.length===0&&n!==null;if(d){var h=n.parentNode;$n(h),h.append(n),r.clear(),Tt(t,e[0].prev,e[s-1].next)}fr(o,()=>{for(var f=0;f{var m=n(),k=pn(m)?m:m==null?[]:_n(m),g=k.length;let b=!1;if(j){var T=l.data===dn;T!==(g===0)&&(l=on(),_t(l),kt(!1),b=!0)}if(j){for(var L=null,S,C=0;C0&&_t(on())}j||Xo(k,d,l,o,e,r),s!==null&&(g===0?_?xe(_):_=ae(()=>s(l)):_!==null&&Qe(_,()=>{_=null})),b&&kt(!0)}),j&&(l=R)}function Xo(t,e,n,r,o,s){var U,yt,ut,te;var l=(o&Gr)!==0,d=(o&(cn|fn))!==0,h=t.length,f=e.items,_=e.first,m=_,k,g=null,b,T=[],L=[],S,C,$,A;if(l)for(A=0;A0){var X=o&Zn&&h===0?n:null;if(l){for(A=0;A{var ee;if(b!==void 0)for($ of b)(ee=$.a)==null||ee.apply()}),M.first=e.first&&e.first.e,M.last=g&&g.e}function Ko(t,e,n,r){r&cn&&B(t.v,e),r&fn?B(t.i,n):t.i=n}function Dr(t,e,n,r,o,s,l,d,h){var f=Ke;try{var _=(h&cn)!==0,m=(h&Zr)===0,k=_?m?gn(o):nt(o):o,g=h&fn?nt(l):l,b={i:g,v:k,k:s,a:null,e:null,prev:n,next:r};return Ke=b,b.e=ae(()=>d(t,k,g),j),b.e.prev=n&&n.e,b.e.next=r&&r.e,n===null?e.first=b:(n.next=b,n.e.next=b.e),r!==null&&(r.prev=b,r.e.prev=b.e),b}finally{Ke=f}}function Wn(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,s=t.e.nodes_start;s!==r;){var l=$t(s);o.before(s),s=l}}function Tt(t,e,n){e===null?t.first=n:(e.next=n,e.e.next=n&&n.e),n!==null&&(n.prev=e,n.e.prev=e&&e.e)}function Tn(t,e){It(()=>{var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,r.appendChild(o)}})}function Jo(t,e){{const n=document.body;t.autofocus=!0,It(()=>{document.activeElement===n&&t.focus()})}}function Go(t){j&&At(t)!==null&&$n(t)}let Yn=!1;function Lr(){Yn||(Yn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)(e=n.__on_r)==null||e.call(n)})},{capture:!0}))}function Zo(t){if(j){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;it(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var o=t.checked;it(t,"checked",null),t.checked=o}}};t.__on_r=n,$o(n),Lr()}}function Qo(t,e){var n=t.__attributes??(t.__attributes={});n.value!==(n.value=e)&&(t.value=e)}function it(t,e,n,r){n=n==null?null:n+"";var o=t.__attributes??(t.__attributes={});j&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=n)&&(e==="loading"&&(t[lo]=n),n===null?t.removeAttribute(e):t.setAttribute(e,n))}function le(t,e,n){if(n){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function Mr(t,e,n,r=n){t.addEventListener(e,n);const o=t.__on_r;o?t.__on_r=()=>{o(),r()}:t.__on_r=r,Lr()}function ti(t,e,n=e){Mr(t,"input",()=>{n(zn(t)?Xn(t.value):t.value)}),he(()=>{var r=e();if(j&&t.defaultValue!==t.value){n(t.value);return}zn(t)&&r===Xn(t.value)||t.type==="date"&&!r&&!t.value||(t.value=r??"")})}const Je=new Set;function ei(t,e,n,r,o=r){var s=n.getAttribute("type")==="checkbox",l=t;let d=!1;if(e!==null)for(var h of e)l=l[h]??(l[h]=[]);l.push(n),Mr(n,"change",()=>{var f=n.__value;s&&(f=Un(l,f,n.checked)),o(f)},()=>o(s?[]:null)),he(()=>{var f=r();if(j&&n.defaultChecked!==n.checked){d=!0;return}s?(f=f||[],n.checked=De(f).includes(De(n.__value))):n.checked=Fo(n.__value,f)}),lr(()=>{var f=l.indexOf(n);f!==-1&&l.splice(f,1)}),Je.has(l)||(Je.add(l),It(()=>{l.sort((f,_)=>f.compareDocumentPosition(_)===4?-1:1),Je.delete(l)})),It(()=>{if(d){var f;if(s)f=Un(l,f,n.checked);else{var _=l.find(m=>m.checked);f=_==null?void 0:_.__value}o(f)}})}function Un(t,e,n){for(var r=new Set,o=0;o{var o,s;return he(()=>{o=s,s=[],Oo(()=>{t!==n(...s)&&(e(t,...s),o&&Kn(n(...o),t)&&e(null,...o))})}),()=>{It(()=>{s&&Kn(n(...s),t)&&e(null,...s)})}}),t}function He(t,e,n,r){var L;var o=(n&Qr)!==0,s=t[e],l=(L=Rt(t,e))==null?void 0:L.set,d=r,h=!0,f=!1,_=()=>(f=!0,h&&(h=!1,d=r),d);s===void 0&&r!==void 0&&(l&&o&&_o(),s=_(),l&&l(s));var m;if(m=()=>{var S=t[e];return S===void 0?_():(h=!0,f=!1,S)},l){var k=t.$$legacy;return function(S,C){return arguments.length>0?((!C||k)&&l(C?m():S),S):m()}}var g=!1,b=gn(s),T=En(()=>{var S=m(),C=x(b);return g?(g=!1,C):b.v=S});return function(S,C){var $=x(T);if(arguments.length>0){const A=C?x(T):S;return T.equals(A)||(g=!0,B(b,A),f&&d!==void 0&&(d=A),x(T)),S}return $}}function ni(t){return new ri(t)}var bt,ot;class ri{constructor(e){Ue(this,bt);Ue(this,ot);var s;var n=new Map,r=(l,d)=>{var h=gn(d);return n.set(l,h),h};const o=new Proxy({...e.props||{},$$events:{}},{get(l,d){return x(n.get(d)??r(d,Reflect.get(l,d)))},has(l,d){return x(n.get(d)??r(d,Reflect.get(l,d))),Reflect.has(l,d)},set(l,d,h){return B(n.get(d)??r(d,h),h),Reflect.set(l,d,h)}});ze(this,ot,(e.hydrate?Wo:Sr)(e.component,{target:e.target,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&Qt(),ze(this,bt,o.$$events);for(const l of Object.keys(K(this,ot)))l==="$set"||l==="$destroy"||l==="$on"||Ce(this,l,{get(){return K(this,ot)[l]},set(d){K(this,ot)[l]=d},enumerable:!0});K(this,ot).$set=l=>{Object.assign(o,l)},K(this,ot).$destroy=()=>{Yo(K(this,ot))}}$set(e){K(this,ot).$set(e)}$on(e,n){K(this,bt)[e]=K(this,bt)[e]||[];const r=(...o)=>n.call(this,...o);return K(this,bt)[e].push(r),()=>{K(this,bt)[e]=K(this,bt)[e].filter(o=>o!==r)}}$destroy(){K(this,ot).$destroy()}}bt=new WeakMap,ot=new WeakMap;let jr;typeof HTMLElement=="function"&&(jr=class extends HTMLElement{constructor(e,n,r){super();ct(this,"$$ctor");ct(this,"$$s");ct(this,"$$c");ct(this,"$$cn",!1);ct(this,"$$d",{});ct(this,"$$r",!1);ct(this,"$$p_d",{});ct(this,"$$l",{});ct(this,"$$l_u",new Map);ct(this,"$$me");this.$$ctor=e,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(e,n,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(n),this.$$c){const o=this.$$c.$on(e,n);this.$$l_u.set(n,o)}super.addEventListener(e,n,r)}removeEventListener(e,n,r){if(super.removeEventListener(e,n,r),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return s=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),at(s,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=oi(this);for(const o of this.$$s)o in r&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),n.default=!0):n[o]=e(o));for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=Ee(s,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=ni({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=yn(()=>{he(()=>{var o;this.$$r=!0;for(const s of ke(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const l=Ee(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1})});for(const o in this.$$l)for(const s of this.$$l[o]){const l=this.$$c.$on(o,s);this.$$l_u.set(s,l)}this.$$l={}}}attributeChangedCallback(e,n,r){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ee(e,r,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return ke(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function Ee(t,e,n,r){var s;const o=(s=n[t])==null?void 0:s.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function oi(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function Ie(t,e,n,r,o,s){let l=class extends jr{constructor(){super(t,n,o),this.$$p_d=e}static get observedAttributes(){return ke(e).map(d=>(e[d].attribute||d).toLowerCase())}};return ke(e).forEach(d=>{Ce(l.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(h){var m;h=Ee(d,h,e),this.$$d[d]=h;var f=this.$$c;if(f){var _=(m=Rt(f,d))==null?void 0:m.get;_?f[d]=h:f.$set({[d]:h})}}})}),r.forEach(d=>{Ce(l.prototype,d,{get(){var h;return(h=this.$$c)==null?void 0:h[d]}})}),t.element=l,l}const Dt=new Map([["yellow","#F8B920"],["red","#FF4646"],["blue","#0064FF"],["green","#00C564"]]),ii=["SCRIPT","STYLE","NOSCRIPT","TEXTAREA","OPTION"];function Or(t){const e=document.documentElement.lang||void 0,n=t.map(d=>d.trim().toLocaleLowerCase(e)),r=n.map(()=>({start:null,end:null,shift:0})),o=n.map(()=>[]),s=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,d=>{var h,f;return ii.includes((h=d.parentNode)==null?void 0:h.tagName)||((f=d.parentNode)==null?void 0:f.contentEditable)=="true"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let l;for(;l=s.nextNode();)if(l!=null&&l.nodeValue)for(let d=0;d{var k,g;for(;f[r[_].shift]&&!f[r[_].shift].trim();)r[_].shift++;let m=f[r[_].shift]===h;if(!m&&r[_].shift&&(r[_].shift=0,m=f[r[_].shift]===h),m&&(r[_].shift||(r[_].start=[l,d]),r[_].end=[l,d],r[_].shift++),r[_].shift>=f.length){const b=document.createRange();b.setStart(r[_].start[0],r[_].start[1]),b.setEnd(r[_].end[0],r[_].end[1]+1),!b.collapsed&&(!((k=b.commonAncestorContainer.parentElement)!=null&&k.checkVisibility)||(g=b.commonAncestorContainer.parentElement)!=null&&g.checkVisibility())?o[_].push(b):b.detach(),m=!1}m||(r[_].shift=0,r[_].start=null,r[_].end=null)})}return o}const Ft=`rh-${new Date().getTime()}-`,Pe="highlights"in CSS;function si(t){if(!t.length&&!CSS.highlights.size)return;const e=[];if(CSS.highlights.clear(),t.length){const r=Or(t.map(({text:o})=>o||""));for(const o in t){if(!r[o].length)continue;const{_id:s,color:l,note:d}=t[o],h=`${Ft}${s}`;CSS.highlights.set(h,new Highlight(...r[o]));const f=r[o][0].getBoundingClientRect();e.push(`
+"use strict";var no=Object.defineProperty;var Wn=e=>{throw TypeError(e)};var ro=(e,t,n)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fe=(e,t,n)=>ro(e,typeof t!="symbol"?t+"":t,n),Yn=(e,t,n)=>t.has(e)||Wn("Cannot "+n);var G=(e,t,n)=>(Yn(e,t,"read from private field"),n?n.call(e):t.get(e)),Xt=(e,t,n)=>t.has(e)?Wn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Kt=(e,t,n,r)=>(Yn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);(function(){var e=window.Document.prototype.createElement,t=window.Document.prototype.createElementNS,n=window.Document.prototype.importNode,r=window.Document.prototype.prepend,o=window.Document.prototype.append,s=window.DocumentFragment.prototype.prepend,l=window.DocumentFragment.prototype.append,f=window.Node.prototype.cloneNode,p=window.Node.prototype.appendChild,d=window.Node.prototype.insertBefore,h=window.Node.prototype.removeChild,g=window.Node.prototype.replaceChild,m=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),b=window.Element.prototype.attachShadow,w=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),N=window.Element.prototype.getAttribute,D=window.Element.prototype.setAttribute,M=window.Element.prototype.removeAttribute,k=window.Element.prototype.toggleAttribute,x=window.Element.prototype.getAttributeNS,$=window.Element.prototype.setAttributeNS,L=window.Element.prototype.removeAttributeNS,oe=window.Element.prototype.insertAdjacentElement,A=window.Element.prototype.insertAdjacentHTML,j=window.Element.prototype.prepend,B=window.Element.prototype.append,I=window.Element.prototype.before,R=window.Element.prototype.after,z=window.Element.prototype.replaceWith,X=window.Element.prototype.remove,Ee=window.HTMLElement,ce=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),nt=window.HTMLElement.prototype.insertAdjacentElement,rt=window.HTMLElement.prototype.insertAdjacentHTML,ot=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(i){return ot.add(i)});function Mn(i){var a=ot.has(i);return i=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(i),!a&&i}var Xr=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function V(i){var a=i.isConnected;if(a!==void 0)return a;if(Xr(i))return!0;for(;i&&!(i.__CE_isImportDocument||i instanceof Document);)i=i.parentNode||(window.ShadowRoot&&i instanceof ShadowRoot?i.host:void 0);return!(!i||!(i.__CE_isImportDocument||i instanceof Document))}function Vt(i){var a=i.children;if(a)return Array.prototype.slice.call(a);for(a=[],i=i.firstChild;i;i=i.nextSibling)i.nodeType===Node.ELEMENT_NODE&&a.push(i);return a}function Wt(i,a){for(;a&&a!==i&&!a.nextSibling;)a=a.parentNode;return a&&a!==i?a.nextSibling:null}function Yt(i,a,c){for(var _=i;_;){if(_.nodeType===Node.ELEMENT_NODE){var u=_;a(u);var v=u.localName;if(v==="link"&&u.getAttribute("rel")==="import"){if(_=u.import,c===void 0&&(c=new Set),_ instanceof Node&&!c.has(_))for(c.add(_),_=_.firstChild;_;_=_.nextSibling)Yt(_,a,c);_=Wt(i,u);continue}else if(v==="template"){_=Wt(i,u);continue}if(u=u.__CE_shadowRoot)for(u=u.firstChild;u;u=u.nextSibling)Yt(u,a,c)}_=_.firstChild?_.firstChild:Wt(i,_)}}function bt(){var i=!(pe==null||!pe.noDocumentConstructionObserver),a=!(pe==null||!pe.shadyDomFastWalk);this.m=[],this.g=[],this.j=!1,this.shadyDomFastWalk=a,this.I=!i}function it(i,a,c,_){var u=window.ShadyDOM;if(i.shadyDomFastWalk&&u&&u.inUse){if(a.nodeType===Node.ELEMENT_NODE&&c(a),a.querySelectorAll)for(i=u.nativeMethods.querySelectorAll.call(a,"*"),a=0;a{Ve(t)}}function xn(e){return et(ar,e,!1)}function jt(e){return et(vt,e,!0)}function xe(e){return $n(e)}function $n(e,t=0){return et(vt|wn|t,e,!0)}function ft(e,t=!0){return et(vt|he,e,!0,t)}function _r(e){var t=e.teardown;if(t!==null){const n=Nn,r=P;zn(!0),Le(null);try{t.call(null)}finally{zn(n),Le(r)}}}function gr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n{Ve(e),t&&t()})}function wr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var o of e)o.out(r)}else t()}function Tn(e,t,n){if(!(e.f&ge)){if(e.f^=ge,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var o=r.next,s=(r.f&bn)!==0||(r.f&he)!==0;Tn(r,t,s?n:!1),r=o}}}function St(e){br(e,!0)}function br(e,t){if(e.f&ge){mt(e)&&Ft(e),e.f^=ge;for(var n=e.first;n!==null;){var r=n.next,o=(n.f&bn)!==0||(n.f&he)!==0;br(n,o?t:!1),n=r}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}const Oo=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let At=!1,Dt=!1,on=[],sn=[];function Er(){At=!1;const e=on.slice();on=[],lr(e)}function Cr(){Dt=!1;const e=sn.slice();sn=[],lr(e)}function qe(e){At||(At=!0,queueMicrotask(Er)),on.push(e)}function Lo(e){Dt||(Dt=!0,Oo(Cr)),sn.push(e)}function Mo(){At&&Er(),Dt&&Cr()}const kr=0,jo=1;let kt=kr,dt=!1,Ge=!1,Nn=!1;function Un(e){Ge=e}function zn(e){Nn=e}let Pe=[],Je=0;let P=null;function Le(e){P=e}let O=null;function ye(e){O=e}let me=null;function Ro(e){me=e}let K=null,te=0,De=null;function Fo(e){De=e}let xr=0,Xe=!1,U=null;function $r(){return++xr}function Rt(){return U!==null&&U.l===null}function mt(e){var l,f;var t=e.f;if(t&Oe)return!0;if(t&_t){var n=e.deps,r=(t&Be)!==0;if(n!==null){var o;if(t&Nt){for(o=0;oe.version)return!0}}r||we(e,Z)}return!1}function Po(e,t,n){throw e}function Tr(e){var m;var t=K,n=te,r=De,o=P,s=Xe,l=me,f=U,p=e.f;K=null,te=0,De=null,P=p&(he|pt)?null:e,Xe=!Ge&&(p&Be)!==0,me=null,U=e.ctx;try{var d=(0,e.fn)(),h=e.deps;if(K!==null){var g;if(ht(e,te),h!==null&&te>0)for(h.length=te+K.length,g=0;g1e3&&(Je=0,bo()),Je++}function Sr(e){var t=e.length;if(t!==0){Nr();var n=Ge;Ge=!0;try{for(var r=0;r1001)return;const e=Pe;Pe=[],Sr(e),dt||(Je=0)}function Pt(e){kt===kr&&(dt||(dt=!0,queueMicrotask(qo)));for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(pt|he)){if(!(n&Z))return;t.f^=Z}}Pe.push(t)}function Ar(e,t){var n=e.first,r=[];e:for(;n!==null;){var o=n.f,s=(o&he)!==0,l=s&&(o&Z)!==0;if(!l&&!(o&ge))if(o&vt){s?n.f^=Z:mt(n)&&Ft(n);var f=n.first;if(f!==null){n=f;continue}}else o&ar&&r.push(n);var p=n.next;if(p===null){let g=n.parent;for(;g!==null;){if(e===g)break e;var d=g.next;if(d!==null){n=d;continue e}g=g.parent}}n=p}for(var h=0;h0||o.length>0)&&tt(),Je=0,r}finally{kt=t,Pe=n}}function T(e){var f;var t=e.f,n=(t&Ne)!==0;if(n&&t>){var r=hr(e);return Cn(e),r}if(P!==null){me!==null&&me.includes(e)&&$o();var o=P.deps;K===null&&o!==null&&o[te]===e?te++:K===null?K=[e]:K.push(e),De!==null&&O!==null&&O.f&Z&&!(O.f&he)&&De.includes(e)&&(we(O,Oe),Pt(O))}else if(n&&e.deps===null){var s=e,l=s.parent;l!==null&&!((f=l.deriveds)!=null&&f.includes(s))&&(l.deriveds??(l.deriveds=[])).push(s)}return n&&(s=e,mt(s)&&vr(s)),e.v}function Dr(e){const t=P;try{return P=null,e()}finally{P=t}}const Bo=~(Oe|_t|Z);function we(e,t){e.f=e.f&Bo|t}function yt(e,t=!1,n){U={p:U,c:null,e:null,m:!1,s:e,x:null,l:null},t||(U.l={s:null,u:null,r1:[],r2:ne(!1)})}function wt(e){const t=U;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var n=O,r=P;t.e=null;try{for(var o=0;o=M.v&&W(M,k+1)}Xn(l)}return!0},ownKeys(p){T(l);var d=Reflect.ownKeys(p).filter(m=>{var b=o.get(m);return b===void 0||b.v!==ee});for(var[h,g]of o)g.v!==ee&&!(h in p)&&d.push(h);return d},setPrototypeOf(){xo()}})}function Xn(e,t=1){W(e,e.v+t)}function Kn(e){return e!==null&&typeof e=="object"&&Ke in e?e[Ke]:e}function Vo(e,t){return Object.is(Kn(e),Kn(t))}var Ot,Re,Or,Lr;function ln(){if(Ot===void 0){Ot=window,Re=document;var e=Element.prototype,t=Node.prototype;Or=He(t,"firstChild").get,Lr=He(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Qe(e=""){return document.createTextNode(e)}function Me(e){return Or.call(e)}function Se(e){return Lr.call(e)}function ae(e,t){if(!F)return Me(e);var n=Me(H);if(n===null)n=H.appendChild(Qe());else if(t&&n.nodeType!==3){var r=Qe();return n==null||n.before(r),de(r),r}return de(n),n}function Sn(e,t){if(!F){var n=Me(e);return n instanceof Comment&&n.data===""?Se(n):n}return H}function re(e,t=1,n=!1){let r=F?H:e;for(;t--;)r=Se(r);if(!F)return r;var o=r.nodeType;if(n&&o!==3){var s=Qe();return r==null||r.before(s),de(s),s}return de(r),r}function An(e){e.textContent=""}let F=!1;function Te(e){F=e}let H;function de(e){if(e===null)throw gn(),ut;return H=e}function Ht(){return de(Se(H))}function J(e){if(F){if(Se(H)!==null)throw gn(),ut;H=e}}function Wo(e=1){if(F){for(var t=e,n=H;t--;)n=Se(n);H=n}}function an(){for(var e=0,t=H;;){if(t.nodeType===8){var n=t.data;if(n===_n){if(e===0)return t;e-=1}else(n===ir||n===pn)&&(e+=1)}var r=Se(t);t.remove(),t=r}}const Mr=new Set,un=new Set;function Yo(e,t,n,r){function o(s){if(r.capture||lt.call(t,s),!s.cancelBubble){var l=P,f=O;Le(null),ye(null);try{return n.call(this,s)}finally{Le(l),ye(f)}}}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?qe(()=>{t.addEventListener(e,o,r)}):t.addEventListener(e,o,r),o}function _e(e,t,n,r,o){var s={capture:r,passive:o},l=Yo(e,t,n,s);(t===document.body||t===window||t===document)&&pr(()=>{t.removeEventListener(e,l,s)})}function jr(e){for(var t=0;t{throw x});throw m}}finally{e.__root=t,delete e.currentTarget,Le(h),ye(g)}}}function Uo(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ze(e,t){var n=O;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function be(e,t){var n=(t&lo)!==0,r=(t&ao)!==0,o,s=!e.startsWith("");return()=>{if(F)return Ze(H,null),H;o===void 0&&(o=Uo(s?e:""+e),n||(o=Me(o)));var l=r?document.importNode(o,!0):o.cloneNode(!0);if(n){var f=Me(l),p=l.lastChild;Ze(f,p)}else Ze(l,l);return l}}function zo(){if(F)return Ze(H,null),H;var e=document.createDocumentFragment(),t=document.createComment(""),n=Qe();return e.append(t,n),Ze(t,n),e}function ue(e,t){if(F){O.nodes_end=H,Ht();return}e!==null&&e.before(t)}const Xo=["touchstart","touchmove"];function Ko(e){return Xo.includes(e)}function Gt(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function Rr(e,t){return Fr(e,t)}function Go(e,t){ln(),t.intro=t.intro??!1;const n=t.target,r=F,o=H;try{for(var s=Me(n);s&&(s.nodeType!==8||s.data!==ir);)s=Se(s);if(!s)throw ut;Te(!0),de(s),Ht();const l=Fr(e,{...t,anchor:s});if(H===null||H.nodeType!==8||H.data!==_n)throw gn(),ut;return Te(!1),l}catch(l){if(l===ut)return t.recover===!1&&Eo(),ln(),An(n),Te(!1),Rr(e,t);throw l}finally{Te(r),de(o)}}const ze=new Map;function Fr(e,{target:t,anchor:n,props:r={},events:o,context:s,intro:l=!0}){ln();var f=new Set,p=g=>{for(var m=0;m{var g=n??t.appendChild(Qe());return ft(()=>{if(s){yt({});var m=U;m.c=s}o&&(r.$$events=o),F&&Ze(g,null),d=e(g,r)||{},F&&(O.nodes_end=H),s&&wt()}),()=>{var w;for(var m of f){t.removeEventListener(m,lt);var b=ze.get(m);--b===0?(document.removeEventListener(m,lt),ze.delete(m)):ze.set(m,b)}un.delete(p),cn.delete(d),g!==n&&((w=g.parentNode)==null||w.removeChild(g))}});return cn.set(d,h),d}let cn=new WeakMap;function Jo(e){const t=cn.get(e);t&&t()}function Lt(e,t,n,r=null,o=!1){F&&Ht();var s=e,l=null,f=null,p=null,d=o?bn:0;$n(()=>{if(p===(p=!!t()))return;let h=!1;if(F){const g=s.data===pn;p===g&&(s=an(),de(s),Te(!1),h=!0)}p?(l?St(l):l=ft(()=>n(s)),f&&rn(f,()=>{f=null})):(f?St(f):r&&(f=ft(()=>r(s))),l&&rn(l,()=>{l=null})),h&&Te(!0)},d),F&&(s=H)}let Jt=null;function Zo(e,t){return t}function Qo(e,t,n,r){for(var o=[],s=t.length,l=0;l0&&o.length===0&&n!==null;if(f){var p=n.parentNode;An(p),p.append(n),r.clear(),Ae(e,t[0].prev,t[s-1].next)}wr(o,()=>{for(var d=0;d{var m=n(),b=mn(m)?m:m==null?[]:yn(m),w=b.length;if(g&&w===0)return;g=w===0;let N=!1;if(F){var D=l.data===pn;D!==(w===0)&&(l=an(),de(l),Te(!1),N=!0)}if(F){for(var M=null,k,x=0;x0&&de(an())}if(!F){var oe=P;ei(b,f,l,o,t,(oe.f&ge)!==0,r)}s!==null&&(w===0?h?St(h):h=ft(()=>s(l)):h!==null&&rn(h,()=>{h=null})),N&&Te(!0),n()}),F&&(l=H)}function ei(e,t,n,r,o,s,l){var Ee,ce,nt,rt;var f=(o&oo)!==0,p=(o&(hn|vn))!==0,d=e.length,h=t.items,g=t.first,m=g,b,w=null,N,D=[],M=[],k,x,$,L;if(f)for(L=0;L0){var X=o&or&&d===0?n:null;if(f){for(L=0;L{var ot;if(N!==void 0)for($ of N)(ot=$.a)==null||ot.apply()}),O.first=t.first&&t.first.e,O.last=w&&w.e}function ti(e,t,n,r){r&hn&&tn(e.v,t),r&vn?tn(e.i,n):e.i=n}function Pr(e,t,n,r,o,s,l,f,p){var d=Jt;try{var h=(p&hn)!==0,g=(p&io)===0,m=h?g?En(o):ne(o):o,b=p&vn?ne(l):l,w={i:b,v:m,k:s,a:null,e:null,prev:n,next:r};return Jt=w,w.e=ft(()=>f(e,m,b),F),w.e.prev=n&&n.e,w.e.next=r&&r.e,n===null?t.first=w:(n.next=w,n.e.next=w.e),r!==null&&(r.prev=w,r.e.prev=w.e),w}finally{Jt=d}}function Gn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,o=t?t.e.nodes_start:n,s=e.e.nodes_start;s!==r;){var l=Se(s);o.before(s),s=l}}function Ae(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function On(e,t){qe(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const o=document.createElement("style");o.id=t.hash,o.textContent=t.code,r.appendChild(o)}})}function ni(e,t){{const n=document.body;e.autofocus=!0,qe(()=>{document.activeElement===n&&e.focus()})}}function ri(e){F&&Me(e)!==null&&An(e)}let Jn=!1;function Hr(){Jn||(Jn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function oi(e){if(F){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;se(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var o=e.checked;se(e,"checked",null),e.checked=o}}};e.__on_r=n,Lo(n),Hr()}}function ii(e,t){var n=e.__attributes??(e.__attributes={});n.value===(n.value=t)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t)}function se(e,t,n,r){var o=e.__attributes??(e.__attributes={});F&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||o[t]!==(o[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[po]=n),n==null?e.removeAttribute(t):typeof n!="string"&&si(e).includes(t)?e[t]=n:e.setAttribute(t,n))}var Zn=new Map;function si(e){var t=Zn.get(e.nodeName);if(t)return t;Zn.set(e.nodeName,t=[]);for(var n,r=en(e),o=Element.prototype;o!==r;){n=uo(r);for(var s in n)n[s].set&&t.push(s);r=en(r)}return t}function ct(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function Ir(e,t,n,r=n){e.addEventListener(t,n);const o=e.__on_r;o?e.__on_r=()=>{o(),r()}:e.__on_r=r,Hr()}function li(e,t,n=t){var r=Rt();Ir(e,"input",()=>{var o=er(e)?tr(e.value):e.value;n(o),r&&o!==(o=t())&&(e.value=o??"")}),jt(()=>{var o=t();if(F&&e.defaultValue!==e.value){n(e.value);return}er(e)&&o===tr(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}const Zt=new Set;function ai(e,t,n,r,o=r){var s=n.getAttribute("type")==="checkbox",l=e;let f=!1;if(t!==null)for(var p of t)l=l[p]??(l[p]=[]);l.push(n),Ir(n,"change",()=>{var d=n.__value;s&&(d=Qn(l,d,n.checked)),o(d)},()=>o(s?[]:null)),jt(()=>{var d=r();if(F&&n.defaultChecked!==n.checked){f=!0;return}s?(d=d||[],n.checked=d.includes(n.__value)):n.checked=Vo(n.__value,d)}),pr(()=>{var d=l.indexOf(n);d!==-1&&l.splice(d,1)}),Zt.has(l)||(Zt.add(l),qe(()=>{l.sort((d,h)=>d.compareDocumentPosition(h)===4?-1:1),Zt.delete(l)})),qe(()=>{if(f){var d;if(s)d=Qn(l,d,n.checked);else{var h=l.find(g=>g.checked);d=h==null?void 0:h.__value}o(d)}})}function Qn(e,t,n){for(var r=new Set,o=0;o{var o,s;return jt(()=>{o=s,s=[],Dr(()=>{e!==n(...s)&&(t(e,...s),o&&nr(n(...o),e)&&t(null,...o))})}),()=>{qe(()=>{s&&nr(n(...s),e)&&t(null,...s)})}}),e}function ui(e){for(var t=O,n=O;t!==null&&!(t.f&(he|pt));)t=t.parent;try{return ye(t),e()}finally{ye(n)}}function It(e,t,n,r){var k;var o=(n&so)!==0,s=!1,l;l=e[t];var f=(k=He(e,t))==null?void 0:k.set,p=r,d=!0,h=!1,g=()=>(h=!0,d&&(d=!1,p=r),p);l===void 0&&r!==void 0&&(f&&o&&Co(),l=g(),f&&f(l));var m;if(m=()=>{var x=e[t];return x===void 0?g():(d=!0,h=!1,x)},f){var b=e.$$legacy;return function(x,$){return arguments.length>0?((!$||b||s)&&f($?m():x),x):m()}}var w=!1,N=!1,D=En(l),M=ui(()=>Mt(()=>{var x=m(),$=T(D);return w?(w=!1,N=!0,$):(N=!1,D.v=x)}));return function(x,$){if(arguments.length>0){const L=$?T(M):x;return M.equals(L)||(w=!0,W(D,L),h&&p!==void 0&&(p=L),Dr(()=>T(M))),x}return T(M)}}function ci(e){return new fi(e)}var ke,ie;class fi{constructor(t){Xt(this,ke);Xt(this,ie);var s;var n=new Map,r=(l,f)=>{var p=En(f);return n.set(l,p),p};const o=new Proxy({...t.props||{},$$events:{}},{get(l,f){return T(n.get(f)??r(f,Reflect.get(l,f)))},has(l,f){return T(n.get(f)??r(f,Reflect.get(l,f))),Reflect.has(l,f)},set(l,f,p){return W(n.get(f)??r(f,p),p),Reflect.set(l,f,p)}});Kt(this,ie,(t.hydrate?Go:Rr)(t.component,{target:t.target,props:o,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((s=t==null?void 0:t.props)!=null&&s.$$host)||t.sync===!1)&&tt(),Kt(this,ke,o.$$events);for(const l of Object.keys(G(this,ie)))l==="$set"||l==="$destroy"||l==="$on"||Tt(this,l,{get(){return G(this,ie)[l]},set(f){G(this,ie)[l]=f},enumerable:!0});G(this,ie).$set=l=>{Object.assign(o,l)},G(this,ie).$destroy=()=>{Jo(G(this,ie))}}$set(t){G(this,ie).$set(t)}$on(t,n){G(this,ke)[t]=G(this,ke)[t]||[];const r=(...o)=>n.call(this,...o);return G(this,ke)[t].push(r),()=>{G(this,ke)[t]=G(this,ke)[t].filter(o=>o!==r)}}$destroy(){G(this,ie).$destroy()}}ke=new WeakMap,ie=new WeakMap;let qr;typeof HTMLElement=="function"&&(qr=class extends HTMLElement{constructor(t,n,r){super();fe(this,"$$ctor");fe(this,"$$s");fe(this,"$$c");fe(this,"$$cn",!1);fe(this,"$$d",{});fe(this,"$$r",!1);fe(this,"$$p_d",{});fe(this,"$$l",{});fe(this,"$$l_u",new Map);fe(this,"$$me");this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return s=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),ue(s,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=di(this);for(const o of this.$$s)o in r&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),n.default=!0):n[o]=t(o));for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=xt(s,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=ci({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=kn(()=>{jt(()=>{var o;this.$$r=!0;for(const s of $t(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const l=xt(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1})});for(const o in this.$$l)for(const s of this.$$l[o]){const l=this.$$c.$on(o,s);this.$$l_u.set(s,l)}this.$$l={}}}attributeChangedCallback(t,n,r){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=xt(t,r,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return $t(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function xt(e,t,n,r){var s;const o=(s=n[e])==null?void 0:s.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function di(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function qt(e,t,n,r,o,s){let l=class extends qr{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return $t(t).map(f=>(t[f].attribute||f).toLowerCase())}};return $t(t).forEach(f=>{Tt(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(p){var g;p=xt(f,p,t),this.$$d[f]=p;var d=this.$$c;if(d){var h=(g=He(d,f))==null?void 0:g.get;h?d[f]=p:d.$set({[f]:p})}}})}),r.forEach(f=>{Tt(l.prototype,f,{get(){var p;return(p=this.$$c)==null?void 0:p[f]}})}),e.element=l,l}const je=new Map([["yellow","#F8B920"],["red","#FF4646"],["blue","#0064FF"],["green","#00C564"]]),hi=["SCRIPT","STYLE","NOSCRIPT","TEXTAREA","OPTION"];function Ln(e){const t=document.documentElement.lang||void 0,n=e.map(f=>f.trim().toLocaleLowerCase(t)),r=n.map(()=>({start:null,end:null,shift:0})),o=n.map(()=>[]),s=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,f=>{var p,d;return hi.includes((p=f.parentNode)==null?void 0:p.tagName)||((d=f.parentNode)==null?void 0:d.contentEditable)=="true"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let l;for(;l=s.nextNode();)if(l!=null&&l.nodeValue)for(let f=0;f{var m,b;for(;d[r[h].shift]&&!d[r[h].shift].trim();)r[h].shift++;let g=d[r[h].shift]===p;if(!g&&r[h].shift&&(r[h].shift=0,g=d[r[h].shift]===p),g&&(r[h].shift||(r[h].start=[l,f]),r[h].end=[l,f],r[h].shift++),r[h].shift>=d.length){const w=document.createRange();w.setStart(r[h].start[0],r[h].start[1]),w.setEnd(r[h].end[0],r[h].end[1]+1),!w.collapsed&&(!((m=w.commonAncestorContainer.parentElement)!=null&&m.checkVisibility)||(b=w.commonAncestorContainer.parentElement)!=null&&b.checkVisibility())?o[h].push(w):w.detach(),g=!1}g||(r[h].shift=0,r[h].start=null,r[h].end=null)})}return o}const Ie=`rh-${new Date().getTime()}-`,Bt="highlights"in CSS;function vi(e){if(!e.length&&!CSS.highlights.size)return;const t=[];if(CSS.highlights.clear(),e.length){const r=Ln(e.map(({text:o})=>o||""));for(const o in e){const s=r[o];if(!s.length)continue;const{_id:l,color:f,note:p,index:d=0}=e[o],h=`${Ie}${l}`,g=(s==null?void 0:s[d])||s[0];CSS.highlights.set(h,new Highlight(g));const m=g.getBoundingClientRect();t.push(`
::highlight(${h}) {
all: unset;
- background-color: color-mix(in srgb, ${Dt.get(l)||l||"yellow"}, white 60%) !important;
- color: color-mix(in srgb, ${Dt.get(l)||l||"yellow"}, black 80%) !important;
- ${d?"text-decoration: underline wavy; -webkit-text-decoration: underline wavy;":""}
+ background-color: color-mix(in srgb, ${je.get(f)||f||"yellow"}, white 60%) !important;
+ color: color-mix(in srgb, ${je.get(f)||f||"yellow"}, black 80%) !important;
+ ${p?"text-decoration: underline wavy; -webkit-text-decoration: underline wavy;":""}
text-decoration-thickness: from-font;
}
@@ -13,454 +13,77 @@
}
:root {
- --highlight-${s}-top: ${(100/document.documentElement.scrollHeight*(window.scrollY+f.top-10)).toFixed(2)}%;
+ --highlight-${l}-top: ${(100/document.documentElement.scrollHeight*(window.scrollY+m.top-10)).toFixed(2)}%;
}
- `);for(const _ of r[o])_.detach()}}const n=(()=>{let r=document.getElementById(Ft);return r||(r=document.createElement("style"),r.id=Ft,document.head.appendChild(r)),r})();n.innerHTML=e.join(`
-`)}function li(){var t;(t=document.getElementById(Ft))==null||t.remove()}function ai(t){var e;for(const[n,r]of CSS.highlights){const o=n.replace(Ft,"");if(t==o)for(const s of r){(e=s.startContainer.parentElement)==null||e.scrollIntoView({behavior:"smooth",block:"start"});break}}}function ui(t){let e;for(const[n,r]of CSS.highlights)for(const o of r){const s=t.compareBoundaryPoints(Range.START_TO_START,o),l=t.compareBoundaryPoints(Range.END_TO_END,o);(s==0&&l==0||t!=null&&t.collapsed&&s>=0&&l<=0)&&(e=[n.replace(Ft,""),o])}if(e)return e[0].replace(Ft,"")}const Et=`rh-${new Date().getTime()}`;function ci(t){const e=document.body.querySelectorAll(`.${Et}`);if(!t.length&&!e.length)return;e.forEach(s=>s.outerHTML=s.innerText);const n=[],r=Or(t.map(({text:s})=>s||""));for(const s in t){const{_id:l,color:d}=t[s];for(const h of r[s]){const f=document.createElement("mark");f.className=Et,f.setAttribute("data-id",String(l)),f.append(h.extractContents()),h.insertNode(f),h.detach()}n.push(`
- .${Et}[data-id="${l}"] {
+ `);for(const b of s)b.detach()}}const n=(()=>{let r=document.getElementById(Ie);return r||(r=document.createElement("style"),r.id=Ie,document.head.appendChild(r)),r})();n.innerHTML=t.join(`
+`)}function pi(){var e;(e=document.getElementById(Ie))==null||e.remove()}function _i(e){var t;for(const[n,r]of CSS.highlights){const o=n.replace(Ie,"");if(e==o)for(const s of r){(t=s.startContainer.parentElement)==null||t.scrollIntoView({behavior:"smooth",block:"start"});break}}}function gi(e){let t;for(const[n,r]of CSS.highlights)for(const o of r){const s=e.compareBoundaryPoints(Range.START_TO_START,o),l=e.compareBoundaryPoints(Range.END_TO_END,o);(s==0&&l==0||e!=null&&e.collapsed&&s>=0&&l<=0)&&(t=[n.replace(Ie,""),o])}if(t)return t[0].replace(Ie,"")}const $e=`rh-${new Date().getTime()}`;function mi(e){const t=document.body.querySelectorAll(`.${$e}`);if(!e.length&&!t.length)return;t.forEach(s=>s.outerHTML=s.innerText);const n=[],r=Ln(e.map(({text:s})=>s||""));for(const s in e){const{_id:l,color:f}=e[s];for(const p of r[s]){const d=document.createElement("mark");d.className=$e,d.setAttribute("data-id",String(l)),d.append(p.extractContents()),p.insertNode(d),p.detach()}n.push(`
+ .${$e}[data-id="${l}"] {
all: unset;
display: inline-block !important;
background-color: white !important;
- background-image: linear-gradient(to bottom, ${Jn(Dt.get(d)||d,.4)} 0, ${Jn(Dt.get(d)||d,.4)} 100%) !important;
+ background-image: linear-gradient(to bottom, ${rr(je.get(f)||f,.4)} 0, ${rr(je.get(f)||f,.4)} 100%) !important;
color: black !important;
}
- `)}const o=(()=>{let s=document.getElementById(Et);return s||(s=document.createElement("style"),s.id=Et,document.head.appendChild(s)),s})();o.innerHTML=n.join(`
-`)}function fi(){var t;document.body.querySelectorAll(`.${Et}`).forEach(e=>e.outerHTML=e.innerText),(t=document.getElementById(Et))==null||t.remove()}function di(t){const e=document.body.querySelector(`.${Et}[data-id="${t}"]`);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}function hi(t){const e=t.commonAncestorContainer.nodeType==Node.ELEMENT_NODE?t.commonAncestorContainer:t.commonAncestorContainer.parentElement;if((e==null?void 0:e.className)==Et){if(!t.collapsed){const n=new Range;n.selectNodeContents(t.commonAncestorContainer);const r=t.compareBoundaryPoints(Range.START_TO_START,n),o=t.compareBoundaryPoints(Range.END_TO_END,n);if(n.detach(),r!=0||o!=0)return}return e.getAttribute("data-id")||void 0}}function Jn(t,e){if(!t)return t;const n=parseInt(t.slice(1,3),16),r=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);return`rgba(${n}, ${r}, ${o}, ${e})`}function vi(t){return Pe?si(t):ci(t)}function Ge(t){return vi(t)}function pi(){return Pe?li():fi()}function Rr(t){return Pe?ai(t):di(t)}function Fr(){var n,r,o;const t=document.getSelection();if(!(t!=null&&t.rangeCount))return;const e=t.getRangeAt(0);if(!((o=((n=e==null?void 0:e.commonAncestorContainer)==null?void 0:n.nodeType)==1?e==null?void 0:e.commonAncestorContainer:(r=e==null?void 0:e.commonAncestorContainer)==null?void 0:r.parentElement)!=null&&o.closest('[contenteditable=""], [contenteditable=true]')))return e}function ie(){const t=document.getSelection();t!=null&&t.rangeCount&&t.removeAllRanges()}function _i(t){return Pe?ui(t):hi(t)}function Gn(t){if(!t)return"";var e=document.createElement("div");e.appendChild(t.cloneContents().cloneNode(!0)),document.body.appendChild(e);const n=e.innerText;return document.body.removeChild(e),e=void 0,n}function mi(t,e,n){let r=jt(st([])),o=jt(!1),s=jt(!1),l=jt(void 0);function d(g){const b=_i(g);if(b)return x(r).find(L=>L._id==b);if(Gn(g).trim())return{text:Gn(g).trim()}}function h(g){const b={...typeof g._id=="string"?{_id:g._id}:{},...typeof g.text=="string"?{text:g.text}:{},...typeof g.note=="string"?{note:g.note}:{},color:g.color||"yellow"};if(!b.text)return;const T=x(r).findIndex(L=>{var S,C;return L._id==b._id||((S=L.text)==null?void 0:S.toLocaleLowerCase().trim())===((C=b.text)==null?void 0:C.toLocaleLowerCase().trim())});T!=-1?(x(r)[T]=b,e(b)):(x(r).push(b),t(b))}function f({_id:g}){B(r,st(x(r).filter(b=>b._id!=g))),n({_id:g})}function _(g){B(l,st(JSON.parse(JSON.stringify(g))))}function m(){x(l)&&(h(x(l)),B(l,void 0))}function k(){B(l,void 0)}return{get highlights(){return x(r)},set highlights(g){B(r,st(g))},get pro(){return x(o)},set pro(g){B(o,st(g))},get nav(){return x(s)},set nav(g){B(s,st(g))},get draft(){return x(l)},find:d,upsert:h,remove:f,setDraft:_,draftSubmit:m,draftCancel:k}}const gi="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gi);function yi(t,e){let n=null,r=!0;return function(...s){n||(r?(t(...s),r=!1):(clearTimeout(n),n=setTimeout(()=>{t(...s),clearTimeout(n),n=null},e)))}}function un(){var t;return(t=navigator==null?void 0:navigator.userAgentData)!=null&&t.mobile?!0:/Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent)}var wi=gt(' '),bi=gt(' '),Ei=gt(' ');const ki={hash:"svelte-f9ok5r",code:`
- .svelte-f9ok5r {
- user-select: none;
- -webkit-user-select: none;
- box-sizing: border-box;
- -webkit-tap-highlight-color: transparent;
- }
-
- dialog.svelte-f9ok5r {
- --control-size: 16px;
- --padding-s: 6px;
- --padding-m: 8px;
-
- --bg-light: rgb(255, 255, 255);
- --bg-dark: rgb(60, 60, 60);
- --control-fg-light: rgb(65, 65, 65);
- --control-fg-dark: rgb(230, 230, 230);
- --hover-bg-light: rgba(0,0,0,.07);
- --hover-bg-dark: rgba(255,255,255,.1);
- --active-bg-light: rgba(0,0,0,.13);
- --active-bg-dark: rgba(255,255,255,.2);
- }
-
- @supports (background-color: -apple-system-control-background) {
- dialog.svelte-f9ok5r {
- --bg-light: rgba(255, 255, 255, .8);
- --bg-dark: rgba(60, 60, 60, .8);
- backdrop-filter: blur(5px);
- -webkit-backdrop-filter: blur(5px);
- }
- }
-
- dialog.mobile.svelte-f9ok5r {
- --control-size: 26px;
- }
-
- dialog.svelte-f9ok5r {
- position: absolute;
- left: unset;
- top: unset;
- right: unset;
- bottom: unset;
- border: none;
- padding: 2px;
- border-radius: var(--control-size);
- overflow: clip;
- z-index: 999999999999999;
-
- background: var(--bg-light);
- color: var(--control-fg-light);
-
- @supports(color: light-dark(white,black)) {
- background: light-dark(var(--bg-light), var(--bg-dark));
- color: light-dark(var(--control-fg-light), var(--control-fg-dark));
- }
- }
-
- dialog.mobile.new.svelte-f9ok5r {
- position: fixed;
- top: auto !important;
- left: auto !important;
- right: 16px !important;
- bottom: 16px !important;
- margin-right: env(safe-area-inset-right);
- margin-bottom: env(safe-area-inset-bottom);
- }
-
- [open].svelte-f9ok5r {
- box-shadow: 0 0 0 .5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.05), 0 15px 40px rgba(0,0,0,.1);
- }
-
- form.svelte-f9ok5r {
- display: flex;
- gap: 2px;
- margin: 0;
- padding: 0;
- }
-
- button.svelte-f9ok5r {
- border-radius: var(--control-size);
- border: 0;
- background: transparent;
- cursor: pointer;
- appearance: none;
- touch-action: manipulation;
- width: calc(var(--control-size) + var(--padding-s)*2);
- height: calc(var(--control-size) + var(--padding-s)*2);
- padding: var(--padding-s);
- color: inherit;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: background .15s ease-in-out;
- }
+ `)}const o=(()=>{let s=document.getElementById($e);return s||(s=document.createElement("style"),s.id=$e,document.head.appendChild(s)),s})();o.innerHTML=n.join(`
+`)}function yi(){var e;document.body.querySelectorAll(`.${$e}`).forEach(t=>t.outerHTML=t.innerText),(e=document.getElementById($e))==null||e.remove()}function wi(e){const t=document.body.querySelector(`.${$e}[data-id="${e}"]`);t&&t.scrollIntoView({behavior:"smooth",block:"start"})}function bi(e){const t=e.commonAncestorContainer.nodeType==Node.ELEMENT_NODE?e.commonAncestorContainer:e.commonAncestorContainer.parentElement;if((t==null?void 0:t.className)==$e){if(!e.collapsed){const n=new Range;n.selectNodeContents(e.commonAncestorContainer);const r=e.compareBoundaryPoints(Range.START_TO_START,n),o=e.compareBoundaryPoints(Range.END_TO_END,n);if(n.detach(),r!=0||o!=0)return}return t.getAttribute("data-id")||void 0}}function rr(e,t){if(!e)return e;const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`rgba(${n}, ${r}, ${o}, ${t})`}function Ei(e){return Bt?vi(e):mi(e)}function Qt(e){return Ei(e)}function Ci(){return Bt?pi():yi()}function Br(e){return Bt?_i(e):wi(e)}function Vr(){var n,r,o;const e=document.getSelection();if(!(e!=null&&e.rangeCount))return;const t=e.getRangeAt(0);if(!((o=((n=t==null?void 0:t.commonAncestorContainer)==null?void 0:n.nodeType)==1?t==null?void 0:t.commonAncestorContainer:(r=t==null?void 0:t.commonAncestorContainer)==null?void 0:r.parentElement)!=null&&o.closest('[contenteditable=""], [contenteditable=true]')))return t}function at(){const e=document.getSelection();e!=null&&e.rangeCount&&e.removeAllRanges()}function ki(e){return Bt?gi(e):bi(e)}function Wr(e){if(!e)return"";var t=document.createElement("div");t.appendChild(e.cloneContents().cloneNode(!0)),document.body.appendChild(t);const n=t.innerText;return document.body.removeChild(t),t=void 0,n}function xi(e){if(!e)return;const t=Wr(e);if(!t)return;const[n]=Ln([t]),r=n.findIndex(o=>{const s=o.compareBoundaryPoints(Range.START_TO_START,e),l=o.compareBoundaryPoints(Range.END_TO_END,e);return s==0&&l==0||(e==null?void 0:e.collapsed)&&s>=0&&l<=0});return r==-1?void 0:r}function $i(e,t,n){let r=Fe(le([])),o=Fe(!1),s=Fe(!1),l=Fe(void 0);function f(b){const w=ki(b);if(w)return T(r).find(D=>D._id==w);const N=Wr(b).trim();if(N)return{text:N,index:xi(b)}}function p(b){const w={...typeof b._id=="string"?{_id:b._id}:{},...typeof b.text=="string"?{text:b.text}:{},...typeof b.note=="string"?{note:b.note}:{},...typeof b.index=="number"?{index:b.index}:{},color:b.color||"yellow"};if(!w.text)return;const N=T(r).findIndex(D=>{var M,k;return D._id==w._id||((M=D.text)==null?void 0:M.toLocaleLowerCase().trim())===((k=w.text)==null?void 0:k.toLocaleLowerCase().trim())});N!=-1?(w._id=T(r)[N]._id,T(r)[N]=w,t(w)):(T(r).push(w),e(w))}function d({_id:b}){W(r,le(T(r).filter(w=>w._id!=b))),n({_id:b})}function h(b){W(l,le(JSON.parse(JSON.stringify(b))))}function g(){T(l)&&(p(T(l)),W(l,void 0))}function m(){W(l,void 0)}return{get highlights(){return T(r)},set highlights(b){W(r,le(b))},get pro(){return T(o)},set pro(b){W(o,le(b))},get nav(){return T(s)},set nav(b){W(s,le(b))},get draft(){return T(l)},find:f,upsert:p,remove:d,setDraft:h,draftSubmit:g,draftCancel:m}}const Ti="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ti);function Ni(e,t){let n=null,r=!0;return function(...s){n||(r?(e(...s),r=!1):(clearTimeout(n),n=setTimeout(()=>{e(...s),clearTimeout(n),n=null},t)))}}function dn(){var e;return(e=navigator==null?void 0:navigator.userAgentData)!=null&&e.mobile?!0:/Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent)}var Si=be(' '),Ai=be(' '),Di=be(' ');const Oi={hash:"svelte-nxgeeo",code:`.svelte-nxgeeo {user-select:none;-webkit-user-select:none;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}dialog.svelte-nxgeeo {--control-size: 16px;--padding-s: 6px;--padding-m: 8px;--bg-light: rgb(255, 255, 255);--bg-dark: rgb(60, 60, 60);--control-fg-light: rgb(65, 65, 65);--control-fg-dark: rgb(230, 230, 230);--hover-bg-light: rgba(0,0,0,.07);--hover-bg-dark: rgba(255,255,255,.1);--active-bg-light: rgba(0,0,0,.13);--active-bg-dark: rgba(255,255,255,.2);}
- @media (pointer: fine) {
- button.svelte-f9ok5r:hover {
- transition: none;
- background: var(--hover-bg-light);
+ @supports (background-color: -apple-system-control-background) {dialog.svelte-nxgeeo {--bg-light: rgba(255, 255, 255, .8);--bg-dark: rgba(60, 60, 60, .8);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);}
+ }dialog.mobile.svelte-nxgeeo {--control-size: 26px;}dialog.svelte-nxgeeo {position:absolute;left:unset;top:unset;right:unset;bottom:unset;border:none;padding:2px;border-radius:var(--control-size);overflow:clip;z-index:999999999999999;background:var(--bg-light);color:var(--control-fg-light);
- @supports(color: light-dark(white,black)) {
- background: light-dark(var(--hover-bg-light), var(--hover-bg-dark));
- }
- }
- }
+ @supports(color: light-dark(white,black)) {background:light-dark(var(--bg-light), var(--bg-dark));color:light-dark(var(--control-fg-light), var(--control-fg-dark));
+ }}dialog.mobile.new.svelte-nxgeeo {position:fixed;top:auto !important;left:auto !important;right:16px !important;bottom:16px !important;margin-right:env(safe-area-inset-right);margin-bottom:env(safe-area-inset-bottom);}[open].svelte-nxgeeo {box-shadow:0 0 0 .5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.05), 0 15px 40px rgba(0,0,0,.1);}form.svelte-nxgeeo {display:flex;gap:2px;margin:0;padding:0;}button.svelte-nxgeeo {border-radius:var(--control-size);border:0;background:transparent;cursor:pointer;appearance:none;touch-action:manipulation;width:calc(var(--control-size) + var(--padding-s)*2);height:calc(var(--control-size) + var(--padding-s)*2);padding:var(--padding-s);color:inherit;display:flex;align-items:center;justify-content:center;transition:background .15s ease-in-out;}
- button.svelte-f9ok5r:active {
- transition: none;
- background: var(--active-bg-light);
+ @media (pointer: fine) {button.svelte-nxgeeo:hover {transition:none;background:var(--hover-bg-light);
- @supports(color: light-dark(white,black)) {
- background: light-dark(var(--active-bg-light), var(--active-bg-dark));
- }
- }
+ @supports(color: light-dark(white,black)) {background:light-dark(var(--hover-bg-light), var(--hover-bg-dark));
+ }}
+ }button.svelte-nxgeeo:active {transition:none;background:var(--active-bg-light);
- svg.svelte-f9ok5r {
- stroke: currentColor;
- stroke-width: 1.5px;
- }
+ @supports(color: light-dark(white,black)) {background:light-dark(var(--active-bg-light), var(--active-bg-dark));
+ }}svg.svelte-nxgeeo {stroke:currentColor;stroke-width:1.5px;}.color.svelte-nxgeeo {pointer-events:none;content:'';display:block;width:15px;height:15px;background:var(--color);transition:background .15s ease-in-out, box-shadow .15s ease-in-out;border-radius:50%;}.color.active.svelte-nxgeeo {background:transparent;box-shadow:inset 0 0 0 5px var(--color);}
- .color.svelte-f9ok5r {
- pointer-events: none;
- content: '';
- display: block;
- width: 15px;
- height: 15px;
- background: var(--color);
- transition: background .15s ease-in-out, box-shadow .15s ease-in-out;
- border-radius: 50%;
- }
-
- .color.active.svelte-f9ok5r {
- background: transparent;
- box-shadow: inset 0 0 0 5px var(--color);
- }
-
- /* animation */
- dialog.svelte-f9ok5r {
- transition:
- display .25s allow-discrete ease-in-out,
+ /* animation */dialog.svelte-nxgeeo {transition:display .25s allow-discrete ease-in-out,
overlay .25s allow-discrete ease-in-out,
box-shadow .25s allow-discrete ease-in-out,
- opacity .25s ease-in-out,
- left .15s ease-in-out,
- top .15s ease-in-out,
- right .15s ease-in-out,
- bottom .15s ease-in-out;
- opacity: 0;
- }
-
- [open].svelte-f9ok5r {
- opacity: 1;
- }
-
- dialog.svelte-f9ok5r:not([open]) {
- transition-duration: .2s;
- pointer-events: none;
- }
+ opacity .25s ease-in-out;opacity:0;}[open].svelte-nxgeeo {opacity:1;}dialog.svelte-nxgeeo:not([open]:where(.svelte-nxgeeo)) {transition-duration:.2s;pointer-events:none;}
- @starting-style {
- [open].svelte-f9ok5r {
- opacity: 0;
- }
- }
-`};function Hr(t,e){pe(e,!0),Tn(t,ki);let n=He(e,"store",7),r,o=jt(void 0),s=jt(!1);function l(N){if(!x(o))return;const I=N.currentTarget.returnValue;switch(N.currentTarget.returnValue="",I){case"add":n().upsert(x(o)),ie();break;case"note":n().setDraft(x(o)),ie();break;case"remove":n().remove(x(o)),ie();break;default:if(Dt.has(I)){n().upsert({...x(o),color:I}),ie();return}break}}function d(){B(s,!0)}function h(){B(s,!1),setTimeout(f)}function f(){if(x(s)){r==null||r.close();return}requestAnimationFrame(()=>{const N=Fr(),I=N&&n().find(N);if(!N||!(I!=null&&I._id)&&!N.toString().trim()){r==null||r.close();return}B(o,st(I)),r.inert=!0,r==null||r.show(),r.inert=!1;const P=256,F=10,O=N.getBoundingClientRect(),X=Math.min(Math.max(O.x,F)+window.scrollX,window.innerWidth+window.scrollX-P-F),U=Math.min(window.innerWidth-Math.max(O.x,F)-window.scrollX-O.width,window.innerWidth-window.scrollX-P-F),yt=Math.max(O.y,40)+window.scrollY+O.height+4;window.innerHeight-Math.max(O.y,40)-window.scrollY+4;const ut=Xr=N,()=>r);const k=En(un);vt(()=>le(m,"mobile",x(k)));var g=lt(m),b=lt(g);xn(b,17,()=>Dt,([N,I])=>N,(N,I)=>{let P=()=>x(I)[0],F=()=>x(I)[1];var O=wi(),X=lt(O);J(O),vt(()=>{var U;it(O,"aria-label",P()),Qo(O,P()),it(X,"style",`--color: ${F()??""}`),le(X,"active",P()==((U=x(o))==null?void 0:U.color))}),at(N,O)});var T=rt(b,2),L=lt(T),S=lt(L),C=lt(S),$=rt(C),A=rt($),xt=rt(A);J(S),J(L),J(T);var Z=rt(T,2);return Me(Z,()=>{var N;return(N=x(o))==null?void 0:N._id},N=>{var I=bi();at(N,I)}),J(g),J(m),vt(()=>{var N,I,P,F,O,X;le(m,"new",!((N=x(o))!=null&&N._id)),it(C,"fill",(I=x(o))!=null&&I.note?"currentColor":"none"),it(C,"stroke-width",(P=x(o))!=null&&P.note?"0":void 0),it($,"fill",(F=x(o))!=null&&F.note?"none":"currentColor"),it(A,"fill",(O=x(o))!=null&&O.note?"none":"currentColor"),it(xt,"fill",(X=x(o))!=null&&X.note?"none":"currentColor")}),ht("close",m,l),at(t,m),_e({get store(){return n()},set store(N){n(N),Qt()}})}Ie(Hr,{store:{}},[],[],!0);function Ci(t){const e=t.currentTarget.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||(t.preventDefault(),t.currentTarget.close())}var $i=(t,e)=>B(e,!1),xi=gt(' '),Ti=gt(''),Ni=gt(' ',1),Si=gt(' ');const Ai={hash:"svelte-n7j6yt",code:`
- .svelte-n7j6yt {
- box-sizing: border-box;
- -webkit-tap-highlight-color: transparent;
- }
+ @starting-style {[open].svelte-nxgeeo {opacity:0;}
+ }`};function Yr(e,t){yt(t,!0),On(e,Oi);let n=It(t,"store",7),r,o=Fe(void 0),s=Fe(!1);function l(A){if(!T(o))return;const j=A.currentTarget.returnValue;switch(A.currentTarget.returnValue="",j){case"add":n().upsert(T(o)),at();break;case"note":n().setDraft(T(o)),at();break;case"remove":n().remove(T(o)),at();break;default:if(je.has(j)){n().upsert({...T(o),color:j}),at();return}break}}function f(){W(s,!0)}function p(){W(s,!1),setTimeout(d)}function d(){if(T(s)){r==null||r.close();return}requestAnimationFrame(()=>{const A=Vr(),j=A&&n().find(A);if(!A||!(j!=null&&j._id)&&!A.toString().trim()){r==null||r.close();return}W(o,le(j)),r.inert=!0,r==null||r.show(),r.inert=!1;const B=256,I=10,R=A.getBoundingClientRect(),z=Math.min(Math.max(R.x,I)+window.scrollX,window.innerWidth+window.scrollX-B-I),X=Math.min(window.innerWidth-Math.max(R.x,I)-window.scrollX-R.width,window.innerWidth-window.scrollX-B-I),Ee=Math.max(R.y,40)+window.scrollY+R.height+4;window.innerHeight-Math.max(R.y,40)-window.scrollY+4;const ce=zct(g,"mobile",T(m)));var b=ae(g),w=ae(b);Dn(w,17,()=>je,([A,j])=>A,(A,j)=>{let B=()=>T(j)[0],I=()=>T(j)[1];var R=Si(),z=ae(R);J(R),xe(()=>{var X;se(R,"aria-label",B()),ii(R,B()),se(z,"style",`--color: ${I()??""}`),ct(z,"active",B()==((X=T(o))==null?void 0:X.color))}),ue(A,R)});var N=re(w,2),D=ae(N),M=ae(D),k=ae(M),x=re(k),$=re(x),L=re($);J(M),J(D),J(N);var oe=re(N,2);return Lt(oe,()=>{var A;return(A=T(o))==null?void 0:A._id},A=>{var j=Ai();ue(A,j)}),J(b),J(g),fn(g,A=>r=A,()=>r),xe(()=>{var A,j,B,I,R,z;ct(g,"new",!((A=T(o))!=null&&A._id)),se(k,"fill",(j=T(o))!=null&&j.note?"currentColor":"none"),se(k,"stroke-width",(B=T(o))!=null&&B.note?"0":void 0),se(x,"fill",(I=T(o))!=null&&I.note?"none":"currentColor"),se($,"fill",(R=T(o))!=null&&R.note?"none":"currentColor"),se(L,"fill",(z=T(o))!=null&&z.note?"none":"currentColor")}),_e("close",g,l),ue(e,g),wt({get store(){return n()},set store(A){n(A),tt()}})}qt(Yr,{store:{}},[],[],!0);function Li(e){const t=e.currentTarget.getBoundingClientRect();t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width||(e.preventDefault(),e.currentTarget.close())}var Mi=(e,t)=>W(t,!1),ji=be(' '),Ri=be(''),Fi=be(' ',1),Pi=be(' ');const Hi={hash:"svelte-n7j6yt",code:`.svelte-n7j6yt {box-sizing:border-box;-webkit-tap-highlight-color:transparent;}dialog.svelte-n7j6yt {--bg-light: rgb(245, 245, 245);--bg-dark: rgb(35, 35, 35);--fg-light: black;--fg-dark: white;--control-bg-light: rgb(230, 230, 230);--control-bg-dark: rgb(55, 55, 55);font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;font-size:18px;line-height:1.4;border:none;border-radius:.5em;padding:0;overscroll-behavior:none;color:var(--fg-light);
- dialog.svelte-n7j6yt {
- --bg-light: rgb(245, 245, 245);
- --bg-dark: rgb(35, 35, 35);
- --fg-light: black;
- --fg-dark: white;
- --control-bg-light: rgb(230, 230, 230);
- --control-bg-dark: rgb(55, 55, 55);
+ @supports(color: light-dark(white,black)) {color:light-dark(var(--fg-light), var(--fg-dark));
+ }}dialog.mobile.svelte-n7j6yt {left:0;right:0;bottom:0;top:0;width:100%;margin:0;max-width:100%;max-height:100%;border-radius:0;bottom:auto;}dialog.svelte-n7j6yt, header.svelte-n7j6yt {background:var(--bg-light);
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
- font-size: 18px;
- line-height: 1.4;
- border: none;
- border-radius: .5em;
- padding: 0;
- overscroll-behavior: none;
+ @supports(color: light-dark(white,black)) {background:light-dark(var(--bg-light), var(--bg-dark));
+ }}[open].svelte-n7j6yt {box-shadow:0 0 0 .5px rgba(60, 60, 60, .9), 0 3px 10px rgba(0,0,0,.05), 0 7px 15px -3px rgba(0,0,0,.15);}.svelte-n7j6yt::backdrop {background-color:rgba(0,0,0,.3);}header.svelte-n7j6yt {margin:0;padding:1em;font-weight:bold;position:sticky;top:0;}
- color: var(--fg-light);
-
- @supports(color: light-dark(white,black)) {
- color: light-dark(var(--fg-light), var(--fg-dark));
- }
- }
-
- dialog.mobile.svelte-n7j6yt {
- left: 0;right: 0;bottom: 0;top: 0;
- width: 100%;
- margin: 0;
- max-width: 100%;
- max-height: 100%;
- border-radius: 0;
- bottom: auto;
- }
-
- dialog.svelte-n7j6yt, header.svelte-n7j6yt {
- background: var(--bg-light);
-
- @supports(color: light-dark(white,black)) {
- background: light-dark(var(--bg-light), var(--bg-dark));
- }
- }
-
- [open].svelte-n7j6yt {
- box-shadow: 0 0 0 .5px rgba(60, 60, 60, .9), 0 3px 10px rgba(0,0,0,.05), 0 7px 15px -3px rgba(0,0,0,.15);
- }
-
- .svelte-n7j6yt::backdrop {
- background-color: rgba(0,0,0,.3);
- }
-
- header.svelte-n7j6yt {
- margin: 0;
- padding: 1em;
- font-weight: bold;
- position: sticky;
- top: 0;
- }
-
- @supports(animation-timeline: scroll()) {
- header.svelte-n7j6yt {
- animation: svelte-n7j6yt-header-scroll linear both;
- animation-timeline: scroll();
- animation-range: 0 1px;
- }
+ @supports(animation-timeline: scroll()) {header.svelte-n7j6yt {
+ animation: svelte-n7j6yt-header-scroll linear both;animation-timeline:scroll();animation-range:0 1px;}
}
@keyframes svelte-n7j6yt-header-scroll {
to {
box-shadow: 0 .5px 0 rgba(0,0,0,.2);
}
- }
-
- form.svelte-n7j6yt {
- display: flex;
- flex-direction: column;
- gap: 1em;
- padding: 1em;
- padding-top: 0;
- }
-
- .color.svelte-n7j6yt {
- all: unset;
- display: flex;
- gap: .75em;
- }
-
- .color.svelte-n7j6yt input[type="radio"]:where(.svelte-n7j6yt) {
- cursor: pointer;
- appearance: none;
- user-select: none;
- -webkit-user-select: none;
- margin: 0;
- background: var(--color);
- transition: box-shadow .2s ease-in-out, background .2s ease-in-out;
- width: 2em;
- height: 2em;
- border-radius: 50%;
- }
-
- .color.svelte-n7j6yt input[type="radio"]:where(.svelte-n7j6yt):checked {
- background: transparent;
- box-shadow: inset 0 0 0 .5em var(--color);
- }
-
- .color.svelte-n7j6yt input[type="radio"]:where(.svelte-n7j6yt):active {
- transform: translateY(1px);
- }
-
- blockquote.svelte-n7j6yt, .note.svelte-n7j6yt, button.svelte-n7j6yt {
- background: var(--control-bg-light);
-
- @supports(color: light-dark(white,black)) {
- background: light-dark(var(--control-bg-light), var(--control-bg-dark));
- }
- }
-
- blockquote.svelte-n7j6yt {
- white-space: pre-wrap;
- margin: 0;
- min-width: 100%;
- width: 0;
- font-size: 16px;
- }
-
- blockquote.compact.svelte-n7j6yt {
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- overflow: clip;
- }
-
- blockquote.svelte-n7j6yt, .note.svelte-n7j6yt {
- border-radius: .5em;
- padding: .5em .6em;
- }
-
- .note.svelte-n7j6yt {
- min-width: min(21em, 70vw);
- min-height: 4lh;
- appearance: none;
- border: 0;
- font: inherit;
- color: inherit;
- display: block;
- scroll-margin-top: 100vh;
- transition: background .15s ease-in-out, box-shadow .15s ease-in-out;
- }
-
- .note.svelte-n7j6yt:focus {
- background: transparent;
- }
-
- footer.svelte-n7j6yt {
- all: unset;
- display: flex;
- justify-content: flex-end;
- gap: .75em;
- }
+ }form.svelte-n7j6yt {display:flex;flex-direction:column;gap:1em;padding:1em;padding-top:0;}.color.svelte-n7j6yt {all:unset;display:flex;gap:.75em;}.color.svelte-n7j6yt input[type="radio"]:where(.svelte-n7j6yt) {cursor:pointer;appearance:none;user-select:none;-webkit-user-select:none;margin:0;background:var(--color);transition:box-shadow .2s ease-in-out, background .2s ease-in-out;width:2em;height:2em;border-radius:50%;}.color.svelte-n7j6yt input[type="radio"]:where(.svelte-n7j6yt):checked {background:transparent;box-shadow:inset 0 0 0 .5em var(--color);}.color.svelte-n7j6yt input[type="radio"]:where(.svelte-n7j6yt):active {transform:translateY(1px);}blockquote.svelte-n7j6yt, .note.svelte-n7j6yt, button.svelte-n7j6yt {background:var(--control-bg-light);
- button.svelte-n7j6yt {
- appearance: none;
- user-select: none;
- -webkit-user-select: none;
- touch-action: manipulation;
- border: 0;
- font: inherit;
- color: inherit;
- cursor: pointer;
- padding: .25em .75em;
- border-radius: .5em;
- }
-
- button.svelte-n7j6yt:active {
- transform: translateY(1px);
- }
-
- button.svelte-n7j6yt sup:where(.svelte-n7j6yt) {
- margin-left: .25em;
- vertical-align: text-top;
- opacity: .5;
- }
-
- dialog.mobile.svelte-n7j6yt button:where(.svelte-n7j6yt) sup:where(.svelte-n7j6yt) {
- display: none;
- }
+ @supports(color: light-dark(white,black)) {background:light-dark(var(--control-bg-light), var(--control-bg-dark));
+ }}blockquote.svelte-n7j6yt {white-space:pre-wrap;margin:0;min-width:100%;width:0;font-size:16px;}blockquote.compact.svelte-n7j6yt {white-space:nowrap;text-overflow:ellipsis;overflow:hidden;overflow:clip;}blockquote.svelte-n7j6yt, .note.svelte-n7j6yt {border-radius:.5em;padding:.5em .6em;}.note.svelte-n7j6yt {min-width:min(21em, 70vw);min-height:4lh;appearance:none;border:0;font:inherit;color:inherit;display:block;scroll-margin-top:100vh;transition:background .15s ease-in-out, box-shadow .15s ease-in-out;}.note.svelte-n7j6yt:focus {background:transparent;}footer.svelte-n7j6yt {all:unset;display:flex;justify-content:flex-end;gap:.75em;}button.svelte-n7j6yt {appearance:none;user-select:none;-webkit-user-select:none;touch-action:manipulation;border:0;font:inherit;color:inherit;cursor:pointer;padding:.25em .75em;border-radius:.5em;}button.svelte-n7j6yt:active {transform:translateY(1px);}button.svelte-n7j6yt sup:where(.svelte-n7j6yt) {margin-left:.25em;vertical-align:text-top;opacity:.5;}dialog.mobile.svelte-n7j6yt button:where(.svelte-n7j6yt) sup:where(.svelte-n7j6yt) {display:none;}button[value].svelte-n7j6yt {background:blue;background:AccentColor;color:white;}.unlock.svelte-n7j6yt {font-size:.75em;color:GrayText;}
- button[value].svelte-n7j6yt {
- background: blue;
- background: AccentColor;
- color: white;
- }
-
- .unlock.svelte-n7j6yt {
- font-size: .75em;
- color: GrayText;
- }
-
- /* animation */
- dialog.svelte-n7j6yt, .svelte-n7j6yt::backdrop {
- transition:
- display .2s allow-discrete ease-in-out,
+ /* animation */dialog.svelte-n7j6yt, .svelte-n7j6yt::backdrop {transition:display .2s allow-discrete ease-in-out,
overlay .2s allow-discrete ease-in-out,
opacity .2s ease-in-out,
transform .2s ease-in-out,
- box-shadow .2s ease-in-out;
- opacity: 0;
- }
-
- dialog.svelte-n7j6yt {
- transform: translateY(1em);
- }
+ box-shadow .2s ease-in-out;opacity:0;}dialog.svelte-n7j6yt {transform:translateY(1em);}[open].svelte-n7j6yt,
+ [open].svelte-n7j6yt::backdrop {opacity:1;transform:translateY(0);}
- [open].svelte-n7j6yt,
- [open].svelte-n7j6yt::backdrop {
- opacity: 1;
- transform: translateY(0);
+ @starting-style {[open].svelte-n7j6yt,
+ [open].svelte-n7j6yt::backdrop {opacity:0;}[open].svelte-n7j6yt {transform:translateY(-1em);}
}
- @starting-style {
- [open].svelte-n7j6yt,
- [open].svelte-n7j6yt::backdrop {
- opacity: 0;
- }
-
- [open].svelte-n7j6yt {
- transform: translateY(-1em);
- }
- }
-
- @supports not selector(::highlight(a)) {
- dialog.svelte-n7j6yt, dialog.svelte-n7j6yt::backdrop {
- animation: svelte-n7j6yt-simple-appear .2s forwards;
- }
+ @supports not selector(::highlight(a)) {dialog.svelte-n7j6yt, dialog.svelte-n7j6yt::backdrop {
+ animation: svelte-n7j6yt-simple-appear .2s forwards;}
@keyframes svelte-n7j6yt-simple-appear {
from { opacity: 0; }
to { opacity: 1; }
}
- }
-`};function Ir(t,e){pe(e,!0),Tn(t,Ai);const n=[];let r=He(e,"store",7),o,s,l=jt(!0);Ze(()=>{r().draft?(B(l,!0),o==null||o.showModal()):o==null||o.close()});function d(C){const $=C.currentTarget.returnValue;C.currentTarget.returnValue="",setTimeout($?r().draftSubmit:r().draftCancel,200)}function h(C){var $;un()||(C.stopImmediatePropagation(),C.stopPropagation(),C.key=="Enter"&&!C.shiftKey&&(C.preventDefault(),s&&(($=C.currentTarget.closest("form"))==null||$.requestSubmit(s))))}var f=Si();an(f,C=>o=C,()=>o),f.__mousedown=[Ci];const _=En(un);vt(()=>le(f,"mobile",x(_)));var m=lt(f),k=lt(m);J(m);var g=rt(m,2),b=lt(g);Me(b,()=>r().draft,C=>{var $=Ni(),A=Cn($);A.__click=[$i,l];var xt=lt(A);vt(()=>{var P,F;return Xe(xt,((F=(P=r().draft)==null?void 0:P.text)==null?void 0:F.trim())||"")}),J(A);var Z=rt(A,2);xn(Z,21,()=>Dt,Uo,(P,F)=>{let O=()=>x(F)[0],X=()=>x(F)[1];var U=xi();Zo(U);var yt;vt(()=>{yt!==(yt=O())&&(U.value=(U.__value=O())==null?"":O()),it(U,"style",`--color: ${X()??""}`)}),ei(n,[],U,()=>(O(),r().draft.color),ut=>r().draft.color=ut),at(P,U)}),J(Z);var N=rt(Z,2);Go(N),Jo(N),N.__keydown=h;var I=rt(N,2);Me(I,()=>!r().pro,P=>{var F=Ti();at(P,F)}),vt(()=>{le(A,"compact",x(l)),N.disabled=!r().pro}),ti(N,()=>r().draft.note,P=>r().draft.note=P),at(C,$)});var T=rt(b,2),L=rt(lt(T),2);an(L,C=>s=C,()=>s);var S=lt(L);return Ho(),J(L),J(T),J(g),J(f),vt(()=>{var C,$;Xe(k,`${((C=r().draft)!=null&&C._id?"Edit":"New")??""} highlight`),Xe(S,`${(($=r().draft)!=null&&$._id?"Update":"Create")??""} `)}),ht("close",f,d),at(t,f),_e({get store(){return r()},set store(C){r(C),Qt()}})}Nr(["mousedown","click","keydown"]);Ie(Ir,{store:{}},[],[],!0);const Di=t=>{const e=t.target.getAttribute("data-highlight");e&&(t.preventDefault(),Rr(e))};var Li=gt('
'),Mi=gt(' ');const ji={hash:"svelte-rwfy02",code:`
- nav.svelte-rwfy02 {
- all: unset;
- }
-
- div.svelte-rwfy02 {
- position: fixed;
- right: 0;
- width: 24px;
- height: 20px;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- cursor: pointer;
- background: transparent;
- z-index: 99999999999999;
- }
-
- div.svelte-rwfy02::before {
- content: '';
- display: block;
- height: 3px;
- border-radius: 3px;
- width: 16px;
- background: var(--color);
- transition: width .15s ease-in-out;
- }
-
- div.svelte-rwfy02:hover::before {
- width: 100%;
- }
-`};function Pr(t,e){pe(e,!0),Tn(t,ji);let n=He(e,"store",7);var r=qo(),o=Cn(r);return Me(o,()=>n().nav,s=>{var l=Mi();l.__click=[Di],xn(l,21,()=>n().highlights,d=>d._id,(d,h)=>{var f=Li();vt(()=>it(f,"style",`top: var(--highlight-${x(h)._id??""}-top); --color: ${(Dt.get(x(h).color)||x(h).color)??""}`)),vt(()=>it(f,"data-highlight",x(h)._id)),at(d,f)}),J(l),at(s,l)}),at(t,r),_e({get store(){return n()},set store(s){n(s),Qt()}})}Nr(["click"]);Ie(Pr,{store:{}},[],[],!0);var Oi=gt(" ",1);function Ri(t,e){pe(e,!0);let n=He(e,"store",7);Ze(()=>{Ge(n().highlights)});let r;function o(){Ge(n().highlights),clearTimeout(r),r=setTimeout(()=>Ge(n().highlights),3e3)}yn(()=>{document.readyState&&o()}),Ze(()=>pi);var s=Oi();ht("load",Le,o),ht("popstate",Le,o);var l=Cn(s);Hr(l,{get store(){return n()}});var d=rt(l,2);Ir(d,{get store(){return n()}});var h=rt(d,2);return Pr(h,{get store(){return n()}}),at(t,s),_e({get store(){return n()},set store(f){n(f),Qt()}})}customElements.define("rdh-ui",Ie(Ri,{store:{}},[],[],!0));function Fi(t){if(typeof chrome=="object"&&chrome.runtime&&chrome.runtime.onMessage||typeof browser=="object"&&browser.runtime&&browser.runtime.onMessage){const{runtime:e}=typeof browser=="object"?browser:chrome,n=(r,o)=>{o.id==e.id&&typeof r.type=="string"&&t(r)};return e.onMessage.removeListener(n),e.onMessage.addListener(n),r=>e.sendMessage(null,r)}if(window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.rdh)return window.rdhSend=t,e=>window.webkit.messageHandlers.rdh.postMessage(e);if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron){const{ipcRenderer:e}=require("electron"),n=(r,o)=>t(o);return e.removeListener("RDH",n),e.on("RDH",n),r=>e.sendToHost("RDH",r)}if("ReactNativeWebView"in window)return window.ReactNativeWebViewSendMessage=t,e=>window.ReactNativeWebView.postMessage(JSON.stringify(e));if(window.self!==window.top){const e=({data:n,source:r})=>{r!==window.parent||typeof n!="object"||typeof n.type!="string"||t(n)};return window.removeEventListener("message",e),window.addEventListener("message",e),n=>window.parent.postMessage(n,"*")}throw new Error("unsupported platform")}async function Hi(t){let e=!1;const n=new Set,r=Fi(o=>{if(!e){n.add(o);return}t(o)});await new Promise(o=>{function s(){window.removeEventListener("DOMContentLoaded",s),o()}document.readyState=="loading"?(window.removeEventListener("DOMContentLoaded",s),window.addEventListener("DOMContentLoaded",s,{once:!0})):o()}),e=!0;for(const o of n)t(o),n.delete(o);return r}const re=document.createElement("rdh-ui");(async()=>{const t=await Hi(n=>{switch(n.type){case"RDH_APPLY":Array.isArray(n.payload)&&(e.highlights=n.payload);break;case"RDH_CONFIG":typeof n.payload.pro=="boolean"&&(e.pro=n.payload.pro),typeof n.payload.nav=="boolean"&&(e.nav=n.payload.nav),typeof n.payload.enabled=="boolean"&&(n.payload.enabled===!0?document.body.contains(re)||document.body.appendChild(re):document.body.contains(re)&&document.body.removeChild(re));break;case"RDH_SCROLL":typeof n.payload._id=="string"&&Rr(n.payload._id);break;case"RDH_ADD_SELECTION":const r=Fr();if(!r)return;const o=e.find(r);if(!o)return;e.upsert(o),ie();break;case"RDH_NOTE_SELECTION":console.log("not implemented yet");break}}),e=mi(n=>t({type:"RDH_ADD",payload:n}),n=>t({type:"RDH_UPDATE",payload:n}),({_id:n})=>t({type:"RDH_REMOVE",payload:{_id:n}}));re.store=e,t({type:"RDH_READY",payload:{url:location.href}})})();
+ }`};function Ur(e,t){yt(t,!0),On(e,Hi);const n=[];let r=It(t,"store",7),o,s,l=Fe(!0);nn(()=>{r().draft?(W(l,!0),o==null||o.showModal()):o==null||o.close()});function f(k){const x=k.currentTarget.returnValue;k.currentTarget.returnValue="",setTimeout(x?r().draftSubmit:r().draftCancel,200)}function p(k){var x;dn()||(k.stopImmediatePropagation(),k.stopPropagation(),k.key=="Enter"&&!k.shiftKey&&(k.preventDefault(),s&&((x=k.currentTarget.closest("form"))==null||x.requestSubmit(s))))}var d=Pi();d.__mousedown=[Li];const h=Mt(dn);xe(()=>ct(d,"mobile",T(h)));var g=ae(d),m=ae(g);J(g);var b=re(g,2),w=ae(b);Lt(w,()=>r().draft,k=>{var x=Fi(),$=Sn(x);$.__click=[Mi,l];var L=ae($,!0);xe(()=>{var B,I;return Gt(L,((I=(B=r().draft)==null?void 0:B.text)==null?void 0:I.trim())||"")}),J($);var oe=re($,2);Dn(oe,21,()=>je,Zo,(B,I)=>{let R=()=>T(I)[0],z=()=>T(I)[1];var X=ji();oi(X);var Ee;xe(()=>{Ee!==(Ee=R())&&(X.value=(X.__value=R())==null?"":R()),se(X,"style",`--color: ${z()??""}`)}),ai(n,[],X,()=>(R(),r().draft.color),ce=>r().draft.color=ce),ue(B,X)}),J(oe);var A=re(oe,2);ri(A),ni(A),A.__keydown=p;var j=re(A,2);Lt(j,()=>!r().pro,B=>{var I=Ri();ue(B,I)}),xe(()=>{ct($,"compact",T(l)),A.disabled=!r().pro}),li(A,()=>r().draft.note,B=>r().draft.note=B),ue(k,x)});var N=re(w,2),D=re(ae(N),2),M=ae(D);return Wo(),J(D),fn(D,k=>s=k,()=>s),J(N),J(b),J(d),fn(d,k=>o=k,()=>o),xe(()=>{var k,x;Gt(m,`${((k=r().draft)!=null&&k._id?"Edit":"New")??""} highlight`),Gt(M,`${((x=r().draft)!=null&&x._id?"Update":"Create")??""} `)}),_e("close",d,f),ue(e,d),wt({get store(){return r()},set store(k){r(k),tt()}})}jr(["mousedown","click","keydown"]);qt(Ur,{store:{}},[],[],!0);const Ii=e=>{const t=e.target.getAttribute("data-highlight");t&&(e.preventDefault(),Br(t))};var qi=be('
'),Bi=be(' ');const Vi={hash:"svelte-rwfy02",code:"nav.svelte-rwfy02 {all:unset;}div.svelte-rwfy02 {position:fixed;right:0;width:24px;height:20px;display:flex;justify-content:flex-end;align-items:center;cursor:pointer;background:transparent;z-index:99999999999999;}div.svelte-rwfy02::before {content:'';display:block;height:3px;border-radius:3px;width:16px;background:var(--color);transition:width .15s ease-in-out;}div.svelte-rwfy02:hover::before {width:100%;}"};function zr(e,t){yt(t,!0),On(e,Vi);let n=It(t,"store",7);var r=zo(),o=Sn(r);return Lt(o,()=>n().nav,s=>{var l=Bi();l.__click=[Ii],Dn(l,21,()=>n().highlights,f=>f._id,(f,p)=>{var d=qi();const h=Mt(()=>`top: var(--highlight-${T(p)._id??""}-top); --color: ${(je.get(T(p).color)||T(p).color)??""}`);xe(()=>{se(d,"data-highlight",T(p)._id),se(d,"style",T(h))}),ue(f,d)}),J(l),ue(s,l)}),ue(e,r),wt({get store(){return n()},set store(s){n(s),tt()}})}jr(["click"]);qt(zr,{store:{}},[],[],!0);var Wi=be(" ",1);function Yi(e,t){yt(t,!0);let n=It(t,"store",7);nn(()=>{Qt(n().highlights)});let r;function o(){Qt(n().highlights),clearTimeout(r),r=setTimeout(()=>Qt(n().highlights),3e3)}kn(()=>{document.readyState&&o()}),nn(()=>Ci);var s=Wi();_e("load",Ot,o),_e("popstate",Ot,o);var l=Sn(s);Yr(l,{get store(){return n()}});var f=re(l,2);Ur(f,{get store(){return n()}});var p=re(f,2);return zr(p,{get store(){return n()}}),ue(e,s),wt({get store(){return n()},set store(d){n(d),tt()}})}customElements.define("rdh-ui",qt(Yi,{store:{}},[],[],!0));function Ui(e){if(typeof chrome=="object"&&chrome.runtime&&chrome.runtime.onMessage||typeof browser=="object"&&browser.runtime&&browser.runtime.onMessage){const{runtime:t}=typeof browser=="object"?browser:chrome,n=(r,o)=>{o.id==t.id&&typeof r.type=="string"&&e(r)};return t.onMessage.removeListener(n),t.onMessage.addListener(n),r=>t.sendMessage(null,r)}if(window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.rdh)return window.rdhSend=e,t=>window.webkit.messageHandlers.rdh.postMessage(t);if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron){const{ipcRenderer:t}=require("electron"),n=(r,o)=>e(o);return t.removeListener("RDH",n),t.on("RDH",n),r=>t.sendToHost("RDH",r)}if("ReactNativeWebView"in window)return window.ReactNativeWebViewSendMessage=e,t=>window.ReactNativeWebView.postMessage(JSON.stringify(t));if(window.self!==window.top){const t=({data:n,source:r})=>{r!==window.parent||typeof n!="object"||typeof n.type!="string"||e(n)};return window.removeEventListener("message",t),window.addEventListener("message",t),n=>window.parent.postMessage(n,"*")}throw new Error("unsupported platform")}async function zi(e){let t=!1;const n=new Set,r=Ui(o=>{if(!t){n.add(o);return}e(o)});await new Promise(o=>{function s(){window.removeEventListener("DOMContentLoaded",s),o()}document.readyState=="loading"?(window.removeEventListener("DOMContentLoaded",s),window.addEventListener("DOMContentLoaded",s,{once:!0})):o()}),t=!0;for(const o of n)e(o),n.delete(o);return r}const st=document.createElement("rdh-ui");(async()=>{const e=await zi(n=>{switch(n.type){case"RDH_APPLY":Array.isArray(n.payload)&&(t.highlights=n.payload);break;case"RDH_CONFIG":typeof n.payload.pro=="boolean"&&(t.pro=n.payload.pro),typeof n.payload.nav=="boolean"&&(t.nav=n.payload.nav),typeof n.payload.enabled=="boolean"&&(n.payload.enabled===!0?document.body.contains(st)||document.body.appendChild(st):document.body.contains(st)&&document.body.removeChild(st));break;case"RDH_SCROLL":typeof n.payload._id=="string"&&Br(n.payload._id);break;case"RDH_ADD_SELECTION":const r=Vr();if(!r)return;const o=t.find(r);if(!o)return;t.upsert(o),at();break;case"RDH_NOTE_SELECTION":console.log("not implemented yet");break}}),t=$i(n=>e({type:"RDH_ADD",payload:n}),n=>e({type:"RDH_UPDATE",payload:n}),({_id:n})=>e({type:"RDH_REMOVE",payload:{_id:n}}));st.store=t,e({type:"RDH_READY",payload:{url:location.href}})})();
diff --git a/src/target/extension/manifest/index.js b/src/target/extension/manifest/index.js
index 722cfc5b..2b29ea6e 100644
--- a/src/target/extension/manifest/index.js
+++ b/src/target/extension/manifest/index.js
@@ -99,17 +99,16 @@ module.exports = ({ vendor, production=false }, l) => {
optional_permissions: [
...(vendor != 'safari-ios' ? ['tabs'] : []),
- ...(vendor == 'firefox' ? ['*://*/*'] : [])
],
- ...(vendor != 'firefox' ? {
- optional_host_permissions: ['*://*/*']
- } : {}),
+ host_permissions: [
+ ...(!production ? ['http://localhost:3000/*'] : []),
+ ...(vendor == 'firefox' ? ['*://api.raindrop.io/*'] : [])
+ ],
- //dev
- ...(production ? {} : {
- host_permissions: ['http://localhost:3000/*']
- }),
+ optional_host_permissions: [
+ '*://*/*'
+ ],
omnibox: {
keyword: 'rd'