0)for(;k!==t;){var S=k.nextSibling;k.remove(),k=S}}X||Fo(w,c,t,o,g,r),s!==null&&(E===0?d?xe(d):d=se(()=>s(t)):d!==null&&Qe(d,()=>{d=null})),z&&$t(!0)})}function Fo(t,e,n,r,o,s){var tt,et,rt,ht;var c=(o&Yr)!==0,v=(o&(re|on))!==0,p=t.length,d=e.items,y=e.next,w=y,E=new Set,g=e,z=new Set,T=[],k=[],O,$,C,D;if(c)for(D=0;D0){var G=o&Wn&&p===0?n:null;if(c){for(D=0;D{var Jt;for(C of z)(Jt=C.a)==null||Jt.apply()})}function Po(t,e,n,r){r&re&&P(t.v,e),r&on?P(t.i,n):t.i=n}function Cr(t,e,n,r,o,s,c,v){var p=Ye;try{var d=(v&re)!==0,y=(v&We)===0,w=d?y?Ee(r):Q(r):r,E=v&on?Q(s):s,g={i:E,v:w,k:o,a:null,e:null,prev:e,next:n};return e.next=g,n!==null&&(n.prev=g),Ye=g,g.e=se(()=>c(t,w,E)),g}finally{Ye=p}}function Hn(t,e){if(t.nodeType===3&&t.data===""||t.nodeType===8){for(var n=e.first,r;n!==null&&(r=n.first,n.dom===null);){if(r===null)return t.previousSibling;n=r}return ee(n)}return t}function ee(t){var e=t.dom;return Dt(e)?Hn(e[0],t):Hn(e,t)}function jn(t,e,n){for(var r=t.next?ee(t.next.e):n,o=e?ee(e.e):n,s=ee(t.e);s!==r;){var c=s.nextSibling;o.before(s),s=c}}function kt(t,e){t.next=e,e!==null&&(e.prev=t)}function Se(t,e=R){var n=e.dom;return n===null?e.dom=t:(Dt(n)||(n=e.dom=[n]),Dt(t)?n.push(...t):n.push(t)),t}function wt(t,e){var n=(e&Wr)!==0,r=(e&Ur)!==0,o;return()=>{if(X)return Se(n?Ht:Tt),Tt;o||(o=So(t),n||(o=o.firstChild));var s=r?document.importNode(o,!0):o.cloneNode(!0);return Se(n?[...s.childNodes]:s),s}}function Io(){if(X)return Se(Ht),Tt;var t=document.createDocumentFragment(),e=he();return t.append(e),Se([e]),t}function lt(t,e){X||t.before(e)}function qo(t,e){{const n=document.body;t.autofocus=!0,le(()=>{document.activeElement===n&&t.focus()})}}function Bo(t){X&&t.firstChild!==null&&vn(t)}let Fn=!1;function $r(){Fn||(Fn=!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 Yo(t){if(X){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;ft(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var o=t.checked;ft(t,"checked",null),t.checked=o}}};t.__on_r=n,_o(n),$r()}}function Vo(t,e){var n=t.__attributes??(t.__attributes={});n.value!==(n.value=e)&&(t.value=e)}function ft(t,e,n){n=n==null?null:n+"";var r=t.__attributes??(t.__attributes={});X&&(r[e]=t.getAttribute(e),e==="src"||e==="href"||e==="srcset")||r[e]!==(r[e]=n)&&(e==="loading"&&(t[oo]=n),n===null?t.removeAttribute(e):t.setAttribute(e,n))}function ne(t,e,n){n?t.classList.add(e):t.classList.remove(e)}function kr(t,e,n,r=n){t.addEventListener(e,n);const o=t.__on_r;o?t.__on_r=()=>{o(),r()}:t.__on_r=r,$r()}function Wo(t,e,n){kr(t,"input",()=>{n(In(t)?qn(t.value):t.value)}),fe(()=>{var r=e();if(X&&t.defaultValue!==t.value){n(t.value);return}In(t)&&r===qn(t.value)||t.type==="date"&&!r&&!t.value||(t.value=r??"")})}function Uo(t,e,n,r,o){var s=n.getAttribute("type")==="checkbox",c=t;let v=!1;if(e!==null)for(var p of e){var d=c;c=d[p],c===void 0&&(c=d[p]=[])}c.push(n),kr(n,"change",()=>{var y=n.__value;s&&(y=Pn(c,y,n.checked)),o(y)},()=>o(s?[]:null)),fe(()=>{var y=r();if(X&&n.defaultChecked!==n.checked){v=!0;return}s?(y=y||[],n.checked=Ce(y).includes(Ce(n.__value))):n.checked=mo(n.__value,y)}),dr(()=>{var y=c.indexOf(n);y!==-1&&c.splice(y,1)}),le(()=>{if(c.sort((E,g)=>E.compareDocumentPosition(g)===4?-1:1),v){var y;if(s)y=Pn(c,y,n.checked);else{var w=c.find(E=>E.checked);y=w==null?void 0:w.__value}o(y)}})}function Pn(t,e,n){for(var r=new Set,o=0;o{var o,s;return fe(()=>{o=s,s=[],fr(()=>{t!==n(...s)&&(e(t,...s),o&&Bn(n(...o),t)&&e(null,...o))})}),()=>{le(()=>{s&&Bn(n(...s),t)&&e(null,...s)})}})}function Oe(t,e,n,r){var z;var o=(n&Vr)!==0,s=t[e],c=(z=Xe(t,e))==null?void 0:z.set,v=r,p=()=>v;s===void 0&&r!==void 0&&(c&&o&&ho(),s=p(),c&&c(s));var d;if(d=()=>{var T=t[e];return T===void 0?p():T},c){var y=t.$$legacy;return function(T,k){return arguments.length>0?((!k||y)&&c(k?d():T),T):d()}}var w=!1,E=Ee(s),g=wo(()=>{var T=d(),k=A(E);return w?(w=!1,k):E.v=T});return function(T,k){var O=A(g);if(arguments.length>0){const $=k?A(g):T;return g.equals($)||(w=!0,P(E,$),A(g)),T}return O}}function Xo(t){return new Ko(t)}var Et,ot;class Ko{constructor(e){Ie(this,Et);Ie(this,ot);const n=it({...e.props||{},$$events:{}},!1);qe(this,ot,(e.hydrate?Lo:br)(e.component,{target:e.target,props:n,context:e.context,intro:e.intro,recover:e.recover})),qe(this,Et,n.$$events);for(const r of Object.keys(Z(this,ot)))r==="$set"||r==="$destroy"||r==="$on"||oe(this,r,{get(){return Z(this,ot)[r]},set(o){Z(this,ot)[r]=o},enumerable:!0});Z(this,ot).$set=r=>{Object.assign(n,r)},Z(this,ot).$destroy=()=>{Mo(Z(this,ot))}}$set(e){Z(this,ot).$set(e)}$on(e,n){Z(this,Et)[e]=Z(this,Et)[e]||[];const r=(...o)=>n.call(this,...o);return Z(this,Et)[e].push(r),()=>{Z(this,Et)[e]=Z(this,Et)[e].filter(o=>o!==r)}}$destroy(){Z(this,ot).$destroy()}}Et=new WeakMap,ot=new WeakMap;let xr;typeof HTMLElement=="function"&&(xr=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 c=document.createElement("slot");o!=="default"&&(c.name=o),lt(s,c)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=Jo(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]=_e(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=Xo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=fe(()=>{var o;this.$$r=!0;for(const s of we(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const c=_e(s,this.$$d[s],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,c)}this.$$r=!1});for(const o in this.$$l)for(const s of this.$$l[o]){const c=this.$$c.$on(o,s);this.$$l_u.set(s,c)}this.$$l={}}}attributeChangedCallback(e,n,r){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=_e(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(),de(this.$$me),this.$$c=void 0)})}$$g_p(e){return we(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function _e(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 Jo(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function Le(t,e,n,r,o,s){let c=class extends xr{constructor(){super(t,n,o),this.$$p_d=e}static get observedAttributes(){return we(e).map(v=>(e[v].attribute||v).toLowerCase())}};return we(e).forEach(v=>{oe(c.prototype,v,{get(){return this.$$c&&v in this.$$c?this.$$c[v]:this.$$d[v]},set(p){var d;p=_e(v,p,e),this.$$d[v]=p,(d=this.$$c)==null||d.$set({[v]:p})}})}),r.forEach(v=>{oe(c.prototype,v,{get(){var p;return(p=this.$$c)==null?void 0:p[v]}})}),t.element=c,c}const Rt=new Map([["yellow","#F8B920"],["red","#FF4646"],["blue","#0064FF"],["green","#00C564"]]),Go=["SCRIPT","STYLE","NOSCRIPT","TEXTAREA","OPTION"];function Tr(t){const e=t.map(c=>c.trim().toLocaleLowerCase()),n=e.map(()=>({start:null,end:null,shift:0})),r=e.map(()=>[]),o=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,c=>{var v,p;return Go.includes((v=c.parentNode)==null?void 0:v.tagName)||!((p=c.parentNode)!=null&&p.checkVisibility())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let s;for(;s=o.nextNode();)if(s!=null&&s.nodeValue)for(let c=0;c{var w;for(;p[n[d].shift]&&!p[n[d].shift].trim();)n[d].shift++;let y=p[n[d].shift]===v;if(!y&&n[d].shift&&(n[d].shift=0,y=p[n[d].shift]===v),y&&(n[d].shift||(n[d].start=[s,c]),n[d].end=[s,c],n[d].shift++),n[d].shift>=p.length){const E=document.createRange();E.setStart(n[d].start[0],n[d].start[1]),E.setEnd(n[d].end[0],n[d].end[1]+1),!E.collapsed&&((w=E.commonAncestorContainer.parentElement)!=null&&w.checkVisibility())?r[d].push(E):E.detach(),y=!1}y||(n[d].shift=0,n[d].start=null,n[d].end=null)})}return r}const At=`rh-${new Date().getTime()}-`,Me="highlights"in CSS;function Zo(t){if(!t.length&&!CSS.highlights.size)return;const e=[];if(CSS.highlights.clear(),t.length){const r=Tr(t.map(({text:o})=>o||""));for(const o in t){if(!r[o].length)continue;const{_id:s,color:c}=t[o],v=`${At}${s}`;CSS.highlights.set(v,new Highlight(...r[o]));const p=r[o][0].getBoundingClientRect();e.push(`
- ::highlight(${v}) {
+"use strict";var Yr=Object.defineProperty;var Sn=t=>{throw TypeError(t)};var zr=(t,e,n)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ct=(t,e,n)=>zr(t,typeof e!="symbol"?e+"":e,n),Nn=(t,e,n)=>e.has(t)||Sn("Cannot "+n);var Z=(t,e,n)=>(Nn(t,e,"read from private field"),n?n.call(t):e.get(t)),je=(t,e,n)=>e.has(t)?Sn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Be=(t,e,n,r)=>(Nn(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,c=window.DocumentFragment.prototype.append,p=window.Node.prototype.cloneNode,h=window.Node.prototype.appendChild,d=window.Node.prototype.insertBefore,_=window.Node.prototype.removeChild,b=window.Node.prototype.replaceChild,E=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),g=window.Element.prototype.attachShadow,$=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),S=window.Element.prototype.getAttribute,x=window.Element.prototype.setAttribute,O=window.Element.prototype.removeAttribute,k=window.Element.prototype.toggleAttribute,C=window.Element.prototype.getAttributeNS,L=window.Element.prototype.setAttributeNS,ut=window.Element.prototype.removeAttributeNS,N=window.Element.prototype.insertAdjacentElement,A=window.Element.prototype.insertAdjacentHTML,J=window.Element.prototype.prepend,q=window.Element.prototype.append,M=window.Element.prototype.before,U=window.Element.prototype.after,G=window.Element.prototype.replaceWith,tt=window.Element.prototype.remove,et=window.HTMLElement,rt=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),ht=window.HTMLElement.prototype.insertAdjacentElement,Jt=window.HTMLElement.prototype.insertAdjacentHTML,_n=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 _n.add(i)});function gn(i){var l=_n.has(i);return i=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(i),!l&&i}var Rr=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function P(i){var l=i.isConnected;if(l!==void 0)return l;if(Rr(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 l=i.children;if(l)return Array.prototype.slice.call(l);for(l=[],i=i.firstChild;i;i=i.nextSibling)i.nodeType===Node.ELEMENT_NODE&&l.push(i);return l}function He(i,l){for(;l&&l!==i&&!l.nextSibling;)l=l.parentNode;return l&&l!==i?l.nextSibling:null}function Fe(i,l,u){for(var v=i;v;){if(v.nodeType===Node.ELEMENT_NODE){var a=v;l(a);var f=a.localName;if(f==="link"&&a.getAttribute("rel")==="import"){if(v=a.import,u===void 0&&(u=new Set),v instanceof Node&&!u.has(v))for(u.add(v),v=v.firstChild;v;v=v.nextSibling)Fe(v,l,u);v=He(i,a);continue}else if(f==="template"){v=He(i,a);continue}if(a=a.__CE_shadowRoot)for(a=a.firstChild;a;a=a.nextSibling)Fe(a,l,u)}v=v.firstChild?v.firstChild:He(i,v)}}function pe(){var i=!(vt==null||!vt.noDocumentConstructionObserver),l=!(vt==null||!vt.shadyDomFastWalk);this.m=[],this.g=[],this.j=!1,this.shadyDomFastWalk=l,this.I=!i}function Gt(i,l,u,v){var a=window.ShadyDOM;if(i.shadyDomFastWalk&&a&&a.inUse){if(l.nodeType===Node.ELEMENT_NODE&&u(l),l.querySelectorAll)for(i=a.nativeMethods.querySelectorAll.call(l,"*"),l=0;lr[e]),s=o.s.get(e)),s!==void 0&&I(s,it(n,o.i,o));const c=o.a,p=!(e in t);if(c&&e==="length")for(let h=n;h"u"?t=>setTimeout(t,1):requestIdleCallback;let $e=!1,ke=!1,Ke=[],Je=[];function tr(){$e=!1;const t=Ke.slice();Ke=[],Qn(t)}function er(){ke=!1;const t=Je.slice();Je=[],Qn(t)}function le(t){$e||($e=!0,queueMicrotask(tr)),Ke.push(t)}function yo(t){ke||(ke=!0,bo(er)),Je.push(t)}function Eo(){$e&&tr(),ke&&er()}function Co(t){let e=Mt|gt;R===null&&(e|=At);const n={deps:null,deriveds:null,equals:Zn,f:e,first:null,fn:t,last:null,reactions:null,v:null,version:0};if(j!==null&&j.f&Mt){var r=j;r.deriveds===null?r.deriveds=[n]:r.deriveds.push(n)}return n}function nr(t){un(t);var e=t.deriveds;if(e!==null){t.deriveds=null;for(var n=0;nt.version)return!0;!Bt&&!((b=d==null?void 0:d.reactions)!=null&&b.includes(t))&&(d.reactions??(d.reactions=[])).push(t)}else{if(t.f>)return!0;o&&(_>t.version&&(n=!0),p=d.reactions,p===null?d.reactions=[t]:p.includes(t)||p.push(t))}}r||at(t,dt),o&&(t.f^=ye)}return n}function So(t,e,n){throw t}function sr(t){const e=z,n=Y,r=St,o=j,s=Bt;z=null,Y=0,St=null,j=t.f&(wt|sn)?null:t,Bt=!Yt&&(t.f&At)!==0;try{let c=(0,t.fn)(),p=t.deps;if(z!==null){let h;if(p!==null){const d=p.length,_=Y===0?z:p.slice(0,Y).concat(z),E=_.length>16&&d-Y>1?new Set(_):null;for(h=Y;h0)for(p.length=Y+z.length,h=0;h1e3&&(zt=0,po()),zt++}function ur(t){var e=t.length;if(e!==0){ar();var n=Yt;Yt=!0;try{for(var r=0;r1001)return;const t=Lt;Lt=[],ur(t),ie||(zt=0)}function Le(t){_e===or&&(ie||(ie=!0,queueMicrotask(No)));for(var e=t;e.parent!==null;){e=e.parent;var n=e.f;if(n&wt){if(!(n&dt))return;at(e,Rt)}}Lt.push(e)}function cr(t,e){var n=t.first,r=[];t:for(;n!==null;){var o=n.f,s=(o&(Xt|qt))===0,c=o&wt,p=(o&dt)!==0,h=n.first;if(s&&(!c||!p)){if(c&&at(n,dt),o&Ut){if(!c&&ae(n)&&(De(n),h=n.first),h!==null){n=h;continue}}else if(o&Kn)if(c||p){if(h!==null){n=h;continue}}else r.push(n)}var d=n.next;if(d===null){let E=n.parent;for(;E!==null;){if(t===E)break t;var _=E.next;if(_!==null){n=_;continue t}E=E.parent}}n=d}for(var b=0;b0||s.length>0)&&Ht(),zt=0,o}finally{_e=n,Lt=r}}function D(t){const e=t.f;if(e&Xt)return t.v;if(j!==null){const n=(j.f&At)!==0,r=j.deps;z===null&&r!==null&&r[Y]===t&&!(n&&R!==null)?Y++:(r===null||Y===0||r[Y-1]!==t)&&(z===null?z=[t]:z[z.length-1]!==t&&z.push(t)),St!==null&&R!==null&&R.f&dt&&!(R.f&wt)&&St.includes(t)&&(at(R,gt),Le(R))}return e&Mt&&ae(t)&&rr(t),t.v}function cn(t,e,n){var r=t.reactions;if(r!==null)for(var o=Ge(),s=r.length,c=0;c{de(e)}}function fn(t){return Kt(Kn,t,!1)}function fe(t){return Kt(Ut,t,!0)}function _t(t){return fe(t)}function pr(t,e,n){const r=Kt(Ut|Jn|e,n,!0);return t!==null&&(r.nodes={start:null,anchor:null,end:t}),r}function se(t,e=!0){return Kt(Ut|wt,t,!0,e)}function vr(t){var e=t.teardown;if(e!==null){const n=an,r=j;Ln(!0),On(null);try{e.call(null)}finally{Ln(n),On(r)}}}function de(t,e=!0){var n=!1;if((e||t.f&Gn)&&t.nodes!==null){for(var r=Vt(t),o=t.nodes.end;r!==null;){var s=r===o?null:r.nextSibling;r.remove(),r=s}n=!0}if(un(t,e&&!n),Ae(t,0),at(t,Xt),t.transitions)for(const p of t.transitions)p.stop();vr(t);var c=t.parent;c!==null&&t.f&wt&&c.first!==null&&mr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes=null}function Vt(t){var e=t.nodes,n=e.start;if(n===void 0)return e.anchor;if(n!==null)return n;for(var r=t.first;r&&(r.nodes===null||r.f&Gn);)r=r.next;return r!==null&&r.nodes!==null?Vt(r):e.end}function mr(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=[];dn(t,n,!0),_r(n,()=>{de(t),e&&e()})}function _r(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function dn(t,e,n){if(!(t.f&qt)){if(t.f^=qt,t.transitions!==null)for(const c of t.transitions)(c.is_global||n)&&e.push(c);for(var r=t.first;r!==null;){var o=r.next,s=(r.f&ln)!==0||(r.f&wt)!==0;dn(r,e,s?n:!1),r=o}}}function xe(t){gr(t,!0)}function gr(t,e){if(t.f&qt){t.f^=qt,ae(t)&&De(t);for(var n=t.first;n!==null;){var r=n.next,o=(n.f&ln)!==0||(n.f&wt)!==0;gr(n,o?e:!1),n=r}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}var Te,Dt;function wr(){if(Te===void 0){Te=window,Dt=document;var t=Element.prototype;t.__click=void 0,t.__className="",t.__attributes=null,t.__e=void 0,Text.prototype.__t=void 0}}function he(){return document.createTextNode("")}function st(t){const e=t.firstChild;return V?e===null?t.appendChild(he()):Wt(e):e}function hn(t,e){return V?Wt(xt):t.firstChild}function F(t,e=!1){var n=t.nextSibling;if(!V)return n;var r=n.nodeType;if(r===8&&n.data===Gr)return F(n,e);if(e&&r!==3){var o=he();return n==null||n.before(o),o}return Wt(n)}function pn(t){t.textContent=""}function Oo(t){return document.createElement(t)}function Mo(t,e,n,r){function o(s){if(r.capture||Qt.call(e,s),!s.cancelBubble)return n.call(this,s)}return t.startsWith("pointer")||t==="wheel"?le(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function mt(t,e,n,r,o){var s={capture:r,passive:o},c=Mo(t,e,n,s);(e===document.body||e===window||e===document)&&dr(()=>{e.removeEventListener(t,c,s)})}function br(t){for(var e=0;e{throw O});throw _}}finally{t.__root=e,s=e}}}const yr=new Set,tn=new Set;function Ye(t,e){(t.__t??(t.__t=t.nodeValue))!==e&&(t.nodeValue=t.__t=e)}function Er(t,e){const n=e.anchor??e.target.appendChild(he());return Ht(()=>Cr(t,{...e,anchor:n}),!1)}function Ro(t,e){const n=e.target,r=kt;try{return Ht(()=>{$t(!0);for(var o=n.firstChild;o&&(o.nodeType!==8||o.data!==we);)o=o.nextSibling;if(!o)throw Ue;const s=Wt(o),c=Cr(t,{...e,anchor:s});return $t(!1),c},!1)}catch(o){if(o===Ue)return e.recover===!1&&vo(),wr(),pn(n),$t(!1),Er(t,e);throw o}finally{$t(!!r),to(r)}}function Cr(t,{target:e,anchor:n,props:r={},events:o,context:s,intro:c=!1}){wr();const p=new Set,h=b=>{for(let E=0;E(se(()=>{if(s){ue({});var b=W;b.c=s}o&&(r.$$events=o),d=t(n,r)||{},s&&ce()}),()=>{for(const b of p)e.removeEventListener(b,Qt),document.removeEventListener(b,Qt);tn.delete(h),en.delete(d)}));return en.set(d,_),d}let en=new WeakMap;function qo(t){const e=en.get(t);e==null||e()}async function vn(t,e,n){await Promise.resolve();const r=Ho(t);if(!r.getElementById(e)){const o=Oo("style");o.id=e,o.textContent=n,(r.head||r).appendChild(o)}}function Ho(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Fo(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function $r(t){if(Ne(t))for(var e=0;e{if(p===(p=!!e()))return;let d=!1;if(V){const _=t.data===Wn;p===_&&($r(kt),$t(!1),d=!0)}p?(s?xe(s):s=se(()=>n(t)),c&&Qe(c,()=>{c=null})):(c?xe(c):r&&(c=se(()=>r(t))),s&&Qe(s,()=>{s=null})),d&&$t(!0)})}let ze=null;function Po(t,e){return e}function Io(t,e,n,r){for(var o=[],s=e.length,c=0;c0&&o.length===0&&n!==null;if(p){var h=n.parentNode;pn(h),h.append(n),r.clear(),Tt(t,e[0].prev,e[s-1].next)}_r(o,()=>{for(var d=0;d{var _=n(),b=Ne(_)?_:_==null?[]:Array.from(_),E=b.length,g=c.flags;g&We&&!Xn(b)&&!(X in b)&&(g^=We,g&Vr&&!(g&re)&&(g^=re));let $=!1;if(V){var S=t.data===Wn;(S!==(E===0)||xt===void 0)&&($r(kt),$t(!1),$=!0)}if(V){for(var x=xt,O=null,k,C=0;C0)for(;x!==t;){var N=x.nextSibling;x.remove(),x=N}}V||jo(b,c,t,o,g,r),s!==null&&(E===0?d?xe(d):d=se(()=>s(t)):d!==null&&Qe(d,()=>{d=null})),$&&$t(!0)})}function jo(t,e,n,r,o,s){var tt,et,rt,ht;var c=(o&Wr)!==0,p=(o&(re|on))!==0,h=t.length,d=e.items,_=e.first,b=_,E=new Set,g=null,$=new Set,S=[],x=[],O,k,C,L;if(c)for(L=0;L0){var G=o&zn&&h===0?n:null;if(c){for(L=0;L{var Jt;for(C of $)(Jt=C.a)==null||Jt.apply()}),R.first=e.first&&e.first.e,R.last=g&&g.e}function Bo(t,e,n,r){r&re&&I(t.v,e),r&on?I(t.i,n):t.i=n}function kr(t,e,n,r,o,s,c,p,h){var d=ze;try{var _=(h&re)!==0,b=(h&We)===0,E=_?b?Ee(o):Q(o):o,g=h&on?Q(c):c,$={i:g,v:E,k:s,a:null,e:null,prev:n,next:r};return ze=$,$.e=se(()=>p(t,E,g),V),$.e.prev=n&&n.e,$.e.next=r&&r.e,n===null?e.first=$:(n.next=$,n.e.next=$.e),r!==null&&(r.prev=$,r.e.prev=$.e),$}finally{ze=d}}function qn(t,e,n){for(var r=t.next?Vt(t.next.e):n,o=e?Vt(e.e):n,s=Vt(t.e);s!==r;){var c=s.nextSibling;o.before(s),s=c}}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 ee(t,e,n=null){const r=R;r.nodes===null?r.nodes={start:t,anchor:n,end:e}:r.nodes.start===void 0&&(r.nodes.start=t)}function bt(t,e){var n=(e&Xr)!==0,r=(e&Kr)!==0,o,s=!t.startsWith(""),c=(e&Jr)!==0;return()=>{if(V)return ee(Un(),kt[kt.length-1]),xt;o||(o=Fo(t),n||(o=o.firstChild));var p=r?document.importNode(o,!0):o.cloneNode(!0);if(n){var h=p.firstChild,d=s?h:c?void 0:null,_=p.lastChild;ee(d,_,h)}else ee(p,p);return p}}function Yo(t=!1){if(V)return ee(Un(),kt[kt.length-1]),xt;var e=document.createDocumentFragment(),n=he();return e.append(n),ee(t?void 0:null,n,n),e}function lt(t,e){V||t.before(e)}function zo(t,e){{const n=document.body;t.autofocus=!0,le(()=>{document.activeElement===n&&t.focus()})}}function Vo(t){V&&t.firstChild!==null&&pn(t)}let Hn=!1;function xr(){Hn||(Hn=!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 Wo(t){if(V){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;ft(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var o=t.checked;ft(t,"checked",null),t.checked=o}}};t.__on_r=n,yo(n),xr()}}function Uo(t,e){var n=t.__attributes??(t.__attributes={});n.value!==(n.value=e)&&(t.value=e)}function ft(t,e,n){n=n==null?null:n+"";var r=t.__attributes??(t.__attributes={});V&&(r[e]=t.getAttribute(e),e==="src"||e==="href"||e==="srcset")||r[e]!==(r[e]=n)&&(e==="loading"&&(t[lo]=n),n===null?t.removeAttribute(e):t.setAttribute(e,n))}function ne(t,e,n){n?t.classList.add(e):t.classList.remove(e)}function Tr(t,e,n,r=n){t.addEventListener(e,n);const o=t.__on_r;o?t.__on_r=()=>{o(),r()}:t.__on_r=r,xr()}function Xo(t,e,n){Tr(t,"input",()=>{n(Pn(t)?In(t.value):t.value)}),fe(()=>{var r=e();if(V&&t.defaultValue!==t.value){n(t.value);return}Pn(t)&&r===In(t.value)||t.type==="date"&&!r&&!t.value||(t.value=r??"")})}function Ko(t,e,n,r,o){var s=n.getAttribute("type")==="checkbox",c=t;let p=!1;if(e!==null)for(var h of e){var d=c;c=d[h],c===void 0&&(c=d[h]=[])}c.push(n),Tr(n,"change",()=>{var _=n.__value;s&&(_=Fn(c,_,n.checked)),o(_)},()=>o(s?[]:null)),fe(()=>{var _=r();if(V&&n.defaultChecked!==n.checked){p=!0;return}s?(_=_||[],n.checked=Ce(_).includes(Ce(n.__value))):n.checked=wo(n.__value,_)}),dr(()=>{var _=c.indexOf(n);_!==-1&&c.splice(_,1)}),le(()=>{if(c.sort((E,g)=>E.compareDocumentPosition(g)===4?-1:1),p){var _;if(s)_=Fn(c,_,n.checked);else{var b=c.find(E=>E.checked);_=b==null?void 0:b.__value}o(_)}})}function Fn(t,e,n){for(var r=new Set,o=0;o{var o,s;return fe(()=>{o=s,s=[],fr(()=>{t!==n(...s)&&(e(t,...s),o&&jn(n(...o),t)&&e(null,...o))})}),()=>{le(()=>{s&&jn(n(...s),t)&&e(null,...s)})}})}function Oe(t,e,n,r){var $;var o=(n&Ur)!==0,s=t[e],c=($=Xe(t,e))==null?void 0:$.set,p=r,h=()=>p;s===void 0&&r!==void 0&&(c&&o&&mo(),s=h(),c&&c(s));var d;if(d=()=>{var S=t[e];return S===void 0?h():S},c){var _=t.$$legacy;return function(S,x){return arguments.length>0?((!x||_)&&c(x?d():S),S):d()}}var b=!1,E=Ee(s),g=Co(()=>{var S=d(),x=D(E);return b?(b=!1,x):E.v=S});return function(S,x){var O=D(g);if(arguments.length>0){const k=x?D(g):S;return g.equals(k)||(b=!0,I(E,k),D(g)),S}return O}}function Jo(t){return new Go(t)}var Et,ot;class Go{constructor(e){je(this,Et);je(this,ot);const n=it({...e.props||{},$$events:{}},!1);Be(this,ot,(e.hydrate?Ro:Er)(e.component,{target:e.target,props:n,context:e.context,intro:e.intro,recover:e.recover})),Be(this,Et,n.$$events);for(const r of Object.keys(Z(this,ot)))r==="$set"||r==="$destroy"||r==="$on"||oe(this,r,{get(){return Z(this,ot)[r]},set(o){Z(this,ot)[r]=o},enumerable:!0});Z(this,ot).$set=r=>{Object.assign(n,r)},Z(this,ot).$destroy=()=>{qo(Z(this,ot))}}$set(e){Z(this,ot).$set(e)}$on(e,n){Z(this,Et)[e]=Z(this,Et)[e]||[];const r=(...o)=>n.call(this,...o);return Z(this,Et)[e].push(r),()=>{Z(this,Et)[e]=Z(this,Et)[e].filter(o=>o!==r)}}$destroy(){Z(this,ot).$destroy()}}Et=new WeakMap,ot=new WeakMap;let Sr;typeof HTMLElement=="function"&&(Sr=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 c=document.createElement("slot");o!=="default"&&(c.name=o),lt(s,c)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=Zo(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]=ge(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=Jo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=fe(()=>{var o;this.$$r=!0;for(const s of be(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const c=ge(s,this.$$d[s],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,c)}this.$$r=!1});for(const o in this.$$l)for(const s of this.$$l[o]){const c=this.$$c.$on(o,s);this.$$l_u.set(s,c)}this.$$l={}}}attributeChangedCallback(e,n,r){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ge(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(),de(this.$$me),this.$$c=void 0)})}$$g_p(e){return be(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function ge(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 Zo(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function Me(t,e,n,r,o,s){let c=class extends Sr{constructor(){super(t,n,o),this.$$p_d=e}static get observedAttributes(){return be(e).map(p=>(e[p].attribute||p).toLowerCase())}};return be(e).forEach(p=>{oe(c.prototype,p,{get(){return this.$$c&&p in this.$$c?this.$$c[p]:this.$$d[p]},set(h){var d;h=ge(p,h,e),this.$$d[p]=h,(d=this.$$c)==null||d.$set({[p]:h})}})}),r.forEach(p=>{oe(c.prototype,p,{get(){var h;return(h=this.$$c)==null?void 0:h[p]}})}),t.element=c,c}const Nt=new Map([["yellow","#F8B920"],["red","#FF4646"],["blue","#0064FF"],["green","#00C564"]]),Qo=["SCRIPT","STYLE","NOSCRIPT","TEXTAREA","OPTION"];function Nr(t){const e=t.map(c=>c.trim().toLocaleLowerCase()),n=e.map(()=>({start:null,end:null,shift:0})),r=e.map(()=>[]),o=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,c=>{var p,h,d;return Qo.includes((p=c.parentNode)==null?void 0:p.tagName)||((h=c.parentNode)==null?void 0:h.contentEditable)=="true"||!((d=c.parentNode)!=null&&d.checkVisibility())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});let s;for(;s=o.nextNode();)if(s!=null&&s.nodeValue)for(let c=0;c{var b;for(;h[n[d].shift]&&!h[n[d].shift].trim();)n[d].shift++;let _=h[n[d].shift]===p;if(!_&&n[d].shift&&(n[d].shift=0,_=h[n[d].shift]===p),_&&(n[d].shift||(n[d].start=[s,c]),n[d].end=[s,c],n[d].shift++),n[d].shift>=h.length){const E=document.createRange();E.setStart(n[d].start[0],n[d].start[1]),E.setEnd(n[d].end[0],n[d].end[1]+1),!E.collapsed&&((b=E.commonAncestorContainer.parentElement)!=null&&b.checkVisibility())?r[d].push(E):E.detach(),_=!1}_||(n[d].shift=0,n[d].start=null,n[d].end=null)})}return r}const Ot=`rh-${new Date().getTime()}-`,Re="highlights"in CSS;function ti(t){if(!t.length&&!CSS.highlights.size)return;const e=[];if(CSS.highlights.clear(),t.length){const r=Nr(t.map(({text:o})=>o||""));for(const o in t){if(!r[o].length)continue;const{_id:s,color:c,note:p}=t[o],h=`${Ot}${s}`;CSS.highlights.set(h,new Highlight(...r[o]));const d=r[o][0].getBoundingClientRect();e.push(`
+ ::highlight(${h}) {
all: unset;
- background-color: color-mix(in srgb, ${Rt.get(c)||c}, white 50%) !important;
- color: black;
+ background-color: color-mix(in srgb, ${Nt.get(c)||c||"yellow"}, white 60%) !important;
+ color: color-mix(in srgb, ${Nt.get(c)||c||"yellow"}, black 80%) !important;
+ ${p?"text-decoration: underline wavy; -webkit-text-decoration: underline wavy;":""}
+ text-decoration-thickness: from-font;
}
:root {
- --highlight-${s}-top: ${(100/document.documentElement.scrollHeight*(window.scrollY+p.top-10)).toFixed(2)}%;
+ --highlight-${s}-top: ${(100/document.documentElement.scrollHeight*(window.scrollY+d.top-10)).toFixed(2)}%;
}
- `);for(const d of r[o])d.detach()}}const n=(()=>{let r=document.getElementById(At);return r||(r=document.createElement("style"),r.id=At,document.head.appendChild(r)),r})();n.innerHTML=e.join(`
-`)}function Qo(){var t;(t=document.getElementById(At))==null||t.remove()}function ti(t){var e;for(const[n,r]of CSS.highlights){const o=n.replace(At,"");if(t==o)for(const s of r){(e=s.startContainer.parentElement)==null||e.scrollIntoView({behavior:"smooth",block:"start"});break}}}function ei(t){let e;for(const[n,r]of CSS.highlights)for(const o of r){const s=t.compareBoundaryPoints(Range.START_TO_START,o),c=t.compareBoundaryPoints(Range.END_TO_END,o);(s==0&&c==0||t!=null&&t.collapsed&&s>=0&&c<=0)&&(e=[n.replace(At,""),o])}if(e)return e[0].replace(At,"")}const Ct=`rh-${new Date().getTime()}`;function ni(t){const e=document.body.querySelectorAll(`.${Ct}`);if(!t.length&&!e.length)return;e.forEach(s=>s.outerHTML=s.innerText);const n=[],r=Tr(t.map(({text:s})=>s||""));for(const s in t){const{_id:c,color:v}=t[s];for(const p of r[s]){const d=document.createElement("mark");d.className=Ct,d.setAttribute("data-id",String(c)),d.append(p.extractContents()),p.insertNode(d),p.detach()}n.push(`
+ `);for(const _ of r[o])_.detach()}}const n=(()=>{let r=document.getElementById(Ot);return r||(r=document.createElement("style"),r.id=Ot,document.head.appendChild(r)),r})();n.innerHTML=e.join(`
+`)}function ei(){var t;(t=document.getElementById(Ot))==null||t.remove()}function ni(t){var e;for(const[n,r]of CSS.highlights){const o=n.replace(Ot,"");if(t==o)for(const s of r){(e=s.startContainer.parentElement)==null||e.scrollIntoView({behavior:"smooth",block:"start"});break}}}function ri(t){let e;for(const[n,r]of CSS.highlights)for(const o of r){const s=t.compareBoundaryPoints(Range.START_TO_START,o),c=t.compareBoundaryPoints(Range.END_TO_END,o);(s==0&&c==0||t!=null&&t.collapsed&&s>=0&&c<=0)&&(e=[n.replace(Ot,""),o])}if(e)return e[0].replace(Ot,"")}const Ct=`rh-${new Date().getTime()}`;function oi(t){const e=document.body.querySelectorAll(`.${Ct}`);if(!t.length&&!e.length)return;e.forEach(s=>s.outerHTML=s.innerText);const n=[],r=Nr(t.map(({text:s})=>s||""));for(const s in t){const{_id:c,color:p}=t[s];for(const h of r[s]){const d=document.createElement("mark");d.className=Ct,d.setAttribute("data-id",String(c)),d.append(h.extractContents()),h.insertNode(d),h.detach()}n.push(`
.${Ct}[data-id="${c}"] {
all: unset;
display: inline-block !important;
background-color: white !important;
- background-image: linear-gradient(to bottom, ${Yn(Rt.get(v)||v,.4)} 0, ${Yn(Rt.get(v)||v,.4)} 100%) !important;
+ background-image: linear-gradient(to bottom, ${Bn(Nt.get(p)||p,.4)} 0, ${Bn(Nt.get(p)||p,.4)} 100%) !important;
color: black !important;
}
`)}const o=(()=>{let s=document.getElementById(Ct);return s||(s=document.createElement("style"),s.id=Ct,document.head.appendChild(s)),s})();o.innerHTML=n.join(`
-`)}function ri(){var t;document.body.querySelectorAll(`.${Ct}`).forEach(e=>e.outerHTML=e.innerText),(t=document.getElementById(Ct))==null||t.remove()}function oi(t){const e=document.body.querySelector(`.${Ct}[data-id="${t}"]`);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}function ii(t){const e=t.commonAncestorContainer.nodeType==Node.ELEMENT_NODE?t.commonAncestorContainer:t.commonAncestorContainer.parentElement;if((e==null?void 0:e.className)==Ct){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 Yn(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 si(t){return Me?Zo(t):ni(t)}function Ve(t){return si(t)}function li(){return Me?Qo():ri()}function zr(t){return Me?ti(t):oi(t)}function Sr(){var n,r;const t=document.getSelection();if(!(t!=null&&t.rangeCount))return;const e=t.getRangeAt(0);if(!((r=(n=e==null?void 0:e.commonAncestorContainer)==null?void 0:n.parentElement)!=null&&r.hasAttribute("contenteditable")))return e}function te(){const t=document.getSelection();t!=null&&t.rangeCount&&t.removeAllRanges()}function ai(t){return Me?ei(t):ii(t)}function Vn(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 ui(t,e,n){let r=Q(it([])),o=Q(!1),s=Q(!1),c=Q(void 0);function v(g){const z=ai(g);if(z)return A(r).find(k=>k._id==z);if(Vn(g).trim())return{text:Vn(g).trim()}}function p(g){const z={...g._id?{_id:g._id}:{},...g.text?{text:g.text}:{},...g.note?{note:g.note}:{},color:g.color||"yellow"};if(!z.text)return;const T=A(r).findIndex(k=>{var O,$;return k._id==z._id||((O=k.text)==null?void 0:O.toLocaleLowerCase().trim())===(($=z.text)==null?void 0:$.toLocaleLowerCase().trim())});T!=-1?(A(r)[T]=z,e(z)):(A(r).push(z),t(z))}function d({_id:g}){P(r,it(A(r).filter(z=>z._id!=g))),n({_id:g})}function y(g){P(c,it(JSON.parse(JSON.stringify(g))))}function w(){A(c)&&(p(A(c)),P(c,void 0))}function E(){P(c,void 0)}return{get highlights(){return A(r)},set highlights(g){P(r,it(g))},get pro(){return A(o)},set pro(g){P(o,it(g))},get nav(){return A(s)},set nav(g){P(s,it(g))},get draft(){return A(c)},find:v,upsert:p,remove:d,setDraft:y,draftSubmit:w,draftCancel:E}}const ci="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ci);function fi(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 rn(){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 di=wt(''),hi=wt(''),pi=wt('');function Nr(t,e){ue(e,!0);let n=Oe(e,"store",7),r,o=Q(void 0),s=Q(!1);function c(S){if(!A(o))return;const N=S.currentTarget.returnValue;switch(S.currentTarget.returnValue="",N){case"add":n().upsert(A(o)),te();break;case"note":n().setDraft(A(o)),te();break;case"remove":n().remove(A(o)),te();break;default:if(Rt.has(N)){n().upsert({...A(o),color:N}),te();return}break}}function v(){P(s,!0)}function p(){P(s,!1),setTimeout(d)}function d(){if(A(s)){r==null||r.close();return}requestAnimationFrame(()=>{const S=Sr(),N=S&&n().find(S);if(!S||!(N!=null&&N._id)&&!S.toString().trim()){r==null||r.close();return}P(o,it(N)),r.inert=!0,r==null||r.show(),r.inert=!1;const J=256,M=10,L=S.getBoundingClientRect(),W=Math.min(Math.max(L.x,M)+window.scrollX,window.innerWidth+window.scrollX-J-M),G=Math.min(window.innerWidth-Math.max(L.x,M)-window.scrollX-L.width,window.innerWidth-window.scrollX-J-M),tt=Math.max(L.y,40)+window.scrollY+L.height+4,et=window.innerHeight-Math.max(L.y,40)-window.scrollY+4,rt=Wr=S,()=>r),gt(()=>ne(w,"mobile",rn()));var E=st(w),g=st(E);gn(g,71,()=>Rt,(S,N)=>K(K(S))[0],(S,N,J)=>{let M=()=>K(K(N))[0],L=()=>K(K(N))[1];var W=di(),G=st(W);gt(()=>{var tt;Vo(W,M()),ft(G,"style",`--color: ${L()??""}`),ne(G,"active",M()==((tt=A(o))==null?void 0:tt.color))}),lt(S,W)});var z=j(j(g,!0)),T=st(z),k=st(T),O=st(k),$=j(O),C=j($),D=j(C),ut=j(j(z,!0));return ze(ut,()=>{var S;return(S=A(o))==null?void 0:S._id},S=>{var N=hi();lt(S,N)}),gt(()=>{var S,N,J,M,L,W;ne(w,"new",!((S=A(o))!=null&&S._id)),ft(O,"fill",(N=A(o))!=null&&N.note?"currentColor":"none"),ft(O,"stroke-width",(J=A(o))!=null&&J.note?"0":void 0),ft($,"fill",(M=A(o))!=null&&M.note?"none":"currentColor"),ft(C,"fill",(L=A(o))!=null&&L.note?"none":"currentColor"),ft(D,"fill",(W=A(o))!=null&&W.note?"none":"currentColor")}),mt("close",w,c,!1),lt(t,w),mn(t,"svelte-1iojgl7",`
- .svelte-1iojgl7 {
+`)}function ii(){var t;document.body.querySelectorAll(`.${Ct}`).forEach(e=>e.outerHTML=e.innerText),(t=document.getElementById(Ct))==null||t.remove()}function si(t){const e=document.body.querySelector(`.${Ct}[data-id="${t}"]`);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}function li(t){const e=t.commonAncestorContainer.nodeType==Node.ELEMENT_NODE?t.commonAncestorContainer:t.commonAncestorContainer.parentElement;if((e==null?void 0:e.className)==Ct){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 Bn(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 ai(t){return Re?ti(t):oi(t)}function Ve(t){return ai(t)}function ui(){return Re?ei():ii()}function Ar(t){return Re?ni(t):si(t)}function Dr(){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 te(){const t=document.getSelection();t!=null&&t.rangeCount&&t.removeAllRanges()}function ci(t){return Re?ri(t):li(t)}function Yn(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 fi(t,e,n){let r=Q(it([])),o=Q(!1),s=Q(!1),c=Q(void 0);function p(g){const $=ci(g);if($)return D(r).find(x=>x._id==$);if(Yn(g).trim())return{text:Yn(g).trim()}}function h(g){const $={...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(!$.text)return;const S=D(r).findIndex(x=>{var O,k;return x._id==$._id||((O=x.text)==null?void 0:O.toLocaleLowerCase().trim())===((k=$.text)==null?void 0:k.toLocaleLowerCase().trim())});S!=-1?(D(r)[S]=$,e($)):(D(r).push($),t($))}function d({_id:g}){I(r,it(D(r).filter($=>$._id!=g))),n({_id:g})}function _(g){I(c,it(JSON.parse(JSON.stringify(g))))}function b(){D(c)&&(h(D(c)),I(c,void 0))}function E(){I(c,void 0)}return{get highlights(){return D(r)},set highlights(g){I(r,it(g))},get pro(){return D(o)},set pro(g){I(o,it(g))},get nav(){return D(s)},set nav(g){I(s,it(g))},get draft(){return D(c)},find:p,upsert:h,remove:d,setDraft:_,draftSubmit:b,draftCancel:E}}const di="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(di);function hi(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 rn(){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 pi=bt(''),vi=bt(''),mi=bt('');function Lr(t,e){ue(e,!0);let n=Oe(e,"store",7),r,o=Q(void 0),s=Q(!1);function c(N){if(!D(o))return;const A=N.currentTarget.returnValue;switch(N.currentTarget.returnValue="",A){case"add":n().upsert(D(o)),te();break;case"note":n().setDraft(D(o)),te();break;case"remove":n().remove(D(o)),te();break;default:if(Nt.has(A)){n().upsert({...D(o),color:A}),te();return}break}}function p(){I(s,!0)}function h(){I(s,!1),setTimeout(d)}function d(){if(D(s)){r==null||r.close();return}requestAnimationFrame(()=>{const N=Dr(),A=N&&n().find(N);if(!N||!(A!=null&&A._id)&&!N.toString().trim()){r==null||r.close();return}I(o,it(A)),r.inert=!0,r==null||r.show(),r.inert=!1;const J=256,q=10,M=N.getBoundingClientRect(),U=Math.min(Math.max(M.x,q)+window.scrollX,window.innerWidth+window.scrollX-J-q),G=Math.min(window.innerWidth-Math.max(M.x,q)-window.scrollX-M.width,window.innerWidth-window.scrollX-J-q),tt=Math.max(M.y,40)+window.scrollY+M.height+4,et=window.innerHeight-Math.max(M.y,40)-window.scrollY+4,rt=Ur=N,()=>r),_t(()=>ne(b,"mobile",rn()));var E=st(b),g=st(E);mn(g,71,()=>Nt,(N,A)=>K(K(N))[0],(N,A,J)=>{let q=()=>K(K(A))[0],M=()=>K(K(A))[1];var U=pi(),G=st(U);_t(()=>{var tt;Uo(U,q()),ft(G,"style",`--color: ${M()??""}`),ne(G,"active",q()==((tt=D(o))==null?void 0:tt.color))}),lt(N,U)});var $=F(F(g,!0)),S=st($),x=st(S),O=st(x),k=F(O),C=F(k),L=F(C),ut=F(F($,!0));return Se(ut,()=>{var N;return(N=D(o))==null?void 0:N._id},N=>{var A=vi();lt(N,A)}),_t(()=>{var N,A,J,q,M,U;ne(b,"new",!((N=D(o))!=null&&N._id)),ft(O,"fill",(A=D(o))!=null&&A.note?"currentColor":"none"),ft(O,"stroke-width",(J=D(o))!=null&&J.note?"0":void 0),ft(k,"fill",(q=D(o))!=null&&q.note?"none":"currentColor"),ft(C,"fill",(M=D(o))!=null&&M.note?"none":"currentColor"),ft(L,"fill",(U=D(o))!=null&&U.note?"none":"currentColor")}),mt("close",b,c,!1),lt(t,b),vn(t,"svelte-q15s48",`
+ .svelte-q15s48 {
user-select: none;
-webkit-user-select: none;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
- dialog.svelte-1iojgl7 {
+ dialog.svelte-q15s48 {
--control-size: 16px;
--padding-s: 6px;
--padding-m: 8px;
@@ -42,7 +44,7 @@
}
@supports (background-color: -apple-system-control-background) {
- dialog.svelte-1iojgl7 {
+ dialog.svelte-q15s48 {
--bg-light: rgba(255, 255, 255, .8);
--bg-dark: rgba(60, 60, 60, .8);
backdrop-filter: blur(5px);
@@ -50,11 +52,11 @@
}
}
- dialog.mobile.svelte-1iojgl7 {
+ dialog.mobile.svelte-q15s48 {
--control-size: 26px;
}
- dialog.svelte-1iojgl7 {
+ dialog.svelte-q15s48 {
position: absolute;
left: unset;
top: unset;
@@ -75,7 +77,7 @@
}
}
- dialog.mobile.new.svelte-1iojgl7 {
+ dialog.mobile.new.svelte-q15s48 {
position: fixed;
top: auto !important;
left: auto !important;
@@ -85,17 +87,17 @@
margin-bottom: env(safe-area-inset-bottom);
}
- [open].svelte-1iojgl7 {
+ [open].svelte-q15s48 {
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-1iojgl7 {
+ form.svelte-q15s48 {
display: flex;
margin: 0;
padding: 0;
}
- button.svelte-1iojgl7 {
+ button.svelte-q15s48 {
border-radius: 8px;
border: 0;
background: transparent;
@@ -112,18 +114,18 @@
transition: background .15s ease-in-out;
}
- button.svelte-1iojgl7:first-child {
+ button.svelte-q15s48:first-child {
border-top-left-radius: var(--control-size);
border-bottom-left-radius: var(--control-size);
}
- button.svelte-1iojgl7:last-child {
+ button.svelte-q15s48:last-child {
border-top-right-radius: var(--control-size);
border-bottom-right-radius: var(--control-size);
}
@media (pointer: fine) {
- button.svelte-1iojgl7:hover {
+ button.svelte-q15s48:hover {
background: var(--hover-bg-light);
@supports(color: light-dark(white,black)) {
@@ -132,7 +134,7 @@
}
}
- button.svelte-1iojgl7:active {
+ button.svelte-q15s48:active {
transition: none;
background: var(--active-bg-light);
@@ -141,12 +143,12 @@
}
}
- svg.svelte-1iojgl7 {
+ svg.svelte-q15s48 {
stroke: currentColor;
stroke-width: 1.5px;
}
- .color.svelte-1iojgl7 {
+ .color.svelte-q15s48 {
pointer-events: none;
content: '';
display: block;
@@ -157,47 +159,47 @@
border-radius: 50%;
}
- .color.active.svelte-1iojgl7 {
+ .color.active.svelte-q15s48 {
width: 16px;
height: 16px;
box-shadow: inset 0 0 0 6px var(--color)
}
/* animation */
- dialog.svelte-1iojgl7 {
+ dialog.svelte-q15s48 {
transition:
display .25s allow-discrete ease-in-out,
overlay .25s allow-discrete ease-in-out,
box-shadow .25s allow-discrete ease-in-out,
- transform .25s allow-discrete ease-in-out,
- opacity .25s 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;
- transform: translateY(3px);
}
- [open].svelte-1iojgl7 {
+ [open].svelte-q15s48 {
opacity: 1;
- transform: translateY(0);
}
- dialog.svelte-1iojgl7:not([open]) {
+ dialog.svelte-q15s48:not([open]) {
transition-duration: .2s;
pointer-events: none;
}
@starting-style {
- [open].svelte-1iojgl7 {
+ [open].svelte-q15s48 {
opacity: 0;
- transform: translateY(-3px);
}
}
-`),ce({get store(){return n()},set store(S){n(S),jt()}})}Le(Nr,{store:{}},[],[],!0);function vi(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 mi=(t,e)=>P(e,!1),gi=wt(''),_i=wt(''),yi=wt('
',1),wi=wt('');function Ar(t,e){ue(e,!0);const n=[];let r=Oe(e,"store",7),o,s,c=Q(!0);Ze(()=>{r().draft?(P(c,!0),o==null||o.showModal()):o==null||o.close()});function v($){const C=$.currentTarget.returnValue;$.currentTarget.returnValue="",setTimeout(C?r().draftSubmit:r().draftCancel,200)}function p($){var C;rn()||($.stopImmediatePropagation(),$.stopPropagation(),$.key=="Enter"&&!$.shiftKey&&($.preventDefault(),s&&((C=$.currentTarget.closest("form"))==null||C.requestSubmit(s))))}var d=wi();nn(d,$=>o=$,()=>o),d.__mousedown=[vi],gt(()=>ne(d,"mobile",rn()));var y=st(d),w=st(y),E=j(j(y,!0)),g=st(E);ze(g,()=>r().draft,$=>{var C=yi(),D=pn(C);D.__click=[mi,c];var ut=st(D);gt(()=>{var M,L;return Be(ut,((L=(M=r().draft)==null?void 0:M.text)==null?void 0:L.trim())||"")});var S=j(j(D,!0));gn(S,73,()=>Rt,Ho,(M,L,W)=>{let G=()=>K(K(L))[0],tt=()=>K(K(L))[1];var et=gi();Yo(et);var rt;gt(()=>{rt!==(rt=G())&&(et.value=(et.__value=G())==null?"":G()),ft(et,"style",`--color: ${tt()??""}`)}),Uo(n,[],et,()=>(G(),r().draft.color),ht=>r().draft.color=ht),lt(M,et)});var N=j(j(S,!0));Bo(N),qo(N),N.__keydown=p;var J=j(j(N,!0));ze(J,()=>!r().pro,M=>{var L=_i();lt(M,L)}),gt(()=>{ne(D,"compact",A(c)),N.disabled=!r().pro}),Wo(N,()=>r().draft.note,M=>r().draft.note=M),lt($,C)});var z=j(j(g,!0)),T=st(z),k=j(j(T,!0));nn(k,$=>s=$,()=>s);var O=st(k);return gt(()=>{var $,C;Be(w,`${(($=r().draft)!=null&&$._id?"Edit":"New")??""} highlight`),Be(O,`${((C=r().draft)!=null&&C._id?"Update":"Create")??""} `)}),mt("close",d,v,!1),lt(t,d),mn(t,"svelte-2yzs5z",`
- .svelte-2yzs5z {
+`),ce({get store(){return n()},set store(N){n(N),Ht()}})}Me(Lr,{store:{}},[],[],!0);function _i(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 gi=(t,e)=>I(e,!1),wi=bt(''),bi=bt(''),yi=bt('
',1),Ei=bt('');function Or(t,e){ue(e,!0);const n=[];let r=Oe(e,"store",7),o,s,c=Q(!0);Ze(()=>{r().draft?(I(c,!0),o==null||o.showModal()):o==null||o.close()});function p(k){const C=k.currentTarget.returnValue;k.currentTarget.returnValue="",setTimeout(C?r().draftSubmit:r().draftCancel,200)}function h(k){var C;rn()||(k.stopImmediatePropagation(),k.stopPropagation(),k.key=="Enter"&&!k.shiftKey&&(k.preventDefault(),s&&((C=k.currentTarget.closest("form"))==null||C.requestSubmit(s))))}var d=Ei();nn(d,k=>o=k,()=>o),d.__mousedown=[_i],_t(()=>ne(d,"mobile",rn()));var _=st(d),b=st(_),E=F(F(_,!0)),g=st(E);Se(g,()=>r().draft,k=>{var C=yi(),L=hn(C);L.__click=[gi,c];var ut=st(L);_t(()=>{var q,M;return Ye(ut,((M=(q=r().draft)==null?void 0:q.text)==null?void 0:M.trim())||"")});var N=F(F(L,!0));mn(N,73,()=>Nt,Po,(q,M,U)=>{let G=()=>K(K(M))[0],tt=()=>K(K(M))[1];var et=wi();Wo(et);var rt;_t(()=>{rt!==(rt=G())&&(et.value=(et.__value=G())==null?"":G()),ft(et,"style",`--color: ${tt()??""}`)}),Ko(n,[],et,()=>(G(),r().draft.color),ht=>r().draft.color=ht),lt(q,et)});var A=F(F(N,!0));Vo(A),zo(A),A.__keydown=h;var J=F(F(A,!0));Se(J,()=>!r().pro,q=>{var M=bi();lt(q,M)}),_t(()=>{ne(L,"compact",D(c)),A.disabled=!r().pro}),Xo(A,()=>r().draft.note,q=>r().draft.note=q),lt(k,C)});var $=F(F(g,!0)),S=st($),x=F(F(S,!0));nn(x,k=>s=k,()=>s);var O=st(x);return _t(()=>{var k,C;Ye(b,`${((k=r().draft)!=null&&k._id?"Edit":"New")??""} highlight`),Ye(O,`${((C=r().draft)!=null&&C._id?"Update":"Create")??""} `)}),mt("close",d,p,!1),lt(t,d),vn(t,"svelte-aehutt",`
+ .svelte-aehutt {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
- dialog.svelte-2yzs5z {
+ dialog.svelte-aehutt {
--bg-light: rgb(245, 245, 245);
--bg-dark: rgb(35, 35, 35);
--fg-light: black;
@@ -220,7 +222,7 @@
}
}
- dialog.mobile.svelte-2yzs5z {
+ dialog.mobile.svelte-aehutt {
left: 0;right: 0;bottom: 0;top: 0;
width: 100%;
margin: 0;
@@ -230,7 +232,7 @@
bottom: auto;
}
- dialog.svelte-2yzs5z, header.svelte-2yzs5z {
+ dialog.svelte-aehutt, header.svelte-aehutt {
background: var(--bg-light);
@supports(color: light-dark(white,black)) {
@@ -238,38 +240,37 @@
}
}
- [open].svelte-2yzs5z {
+ [open].svelte-aehutt {
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-2yzs5z::backdrop {
+ .svelte-aehutt::backdrop {
background-color: rgba(0,0,0,.3);
}
- header.svelte-2yzs5z {
+ header.svelte-aehutt {
margin: 0;
padding: 1em;
font-weight: bold;
position: sticky;
top: 0;
-
}
@supports(animation-timeline: scroll()) {
- header.svelte-2yzs5z {
- animation: svelte-2yzs5z-header-scroll linear both;
+ header.svelte-aehutt {
+ animation: svelte-aehutt-header-scroll linear both;
animation-timeline: scroll();
animation-range: 0 1px;
}
}
- @keyframes svelte-2yzs5z-header-scroll {
+ @keyframes svelte-aehutt-header-scroll {
to {
box-shadow: 0 .5px 0 rgba(0,0,0,.2);
}
}
- form.svelte-2yzs5z {
+ form.svelte-aehutt {
display: flex;
flex-direction: column;
gap: 1em;
@@ -277,13 +278,13 @@
padding-top: 0;
}
- .color.svelte-2yzs5z {
+ .color.svelte-aehutt {
all: unset;
display: flex;
gap: .75em;
}
- .color.svelte-2yzs5z input[type="radio"]:where(.svelte-2yzs5z) {
+ .color.svelte-aehutt input[type="radio"]:where(.svelte-aehutt) {
cursor: pointer;
appearance: none;
user-select: none;
@@ -297,15 +298,15 @@
border-radius: 50%;
}
- .color.svelte-2yzs5z input[type="radio"]:where(.svelte-2yzs5z):checked {
+ .color.svelte-aehutt input[type="radio"]:where(.svelte-aehutt):checked {
box-shadow: inset 0 0 0 .5em var(--color);
}
- .color.svelte-2yzs5z input[type="radio"]:where(.svelte-2yzs5z):active {
+ .color.svelte-aehutt input[type="radio"]:where(.svelte-aehutt):active {
transform: translateY(1px);
}
- blockquote.svelte-2yzs5z, .note.svelte-2yzs5z, button.svelte-2yzs5z {
+ blockquote.svelte-aehutt, .note.svelte-aehutt, button.svelte-aehutt {
background: var(--control-bg-light);
@supports(color: light-dark(white,black)) {
@@ -313,7 +314,7 @@
}
}
- blockquote.svelte-2yzs5z {
+ blockquote.svelte-aehutt {
white-space: pre-wrap;
margin: 0;
min-width: 100%;
@@ -321,19 +322,19 @@
font-size: 16px;
}
- blockquote.compact.svelte-2yzs5z {
+ blockquote.compact.svelte-aehutt {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
overflow: clip;
}
- blockquote.svelte-2yzs5z, .note.svelte-2yzs5z {
+ blockquote.svelte-aehutt, .note.svelte-aehutt {
border-radius: .5em;
padding: .5em .6em;
}
- .note.svelte-2yzs5z {
+ .note.svelte-aehutt {
min-width: min(21em, 70vw);
min-height: 4lh;
appearance: none;
@@ -345,18 +346,18 @@
transition: background .15s ease-in-out, box-shadow .15s ease-in-out;
}
- .note.svelte-2yzs5z:focus {
+ .note.svelte-aehutt:focus {
background: transparent;
}
- footer.svelte-2yzs5z {
+ footer.svelte-aehutt {
all: unset;
display: flex;
justify-content: flex-end;
gap: .75em;
}
- button.svelte-2yzs5z {
+ button.svelte-aehutt {
appearance: none;
user-select: none;
-webkit-user-select: none;
@@ -369,33 +370,33 @@
border-radius: .5em;
}
- button.svelte-2yzs5z:active {
+ button.svelte-aehutt:active {
transform: translateY(1px);
}
- button.svelte-2yzs5z sup:where(.svelte-2yzs5z) {
+ button.svelte-aehutt sup:where(.svelte-aehutt) {
margin-left: .25em;
vertical-align: text-top;
opacity: .5;
}
- dialog.mobile.svelte-2yzs5z button:where(.svelte-2yzs5z) sup:where(.svelte-2yzs5z) {
+ dialog.mobile.svelte-aehutt button:where(.svelte-aehutt) sup:where(.svelte-aehutt) {
display: none;
}
- button[value].svelte-2yzs5z {
+ button[value].svelte-aehutt {
background: blue;
background: AccentColor;
color: white;
}
- .unlock.svelte-2yzs5z {
+ .unlock.svelte-aehutt {
font-size: .75em;
color: GrayText;
}
/* animation */
- dialog.svelte-2yzs5z, .svelte-2yzs5z::backdrop {
+ dialog.svelte-aehutt, .svelte-aehutt::backdrop {
transition:
display .2s allow-discrete ease-in-out,
overlay .2s allow-discrete ease-in-out,
@@ -405,37 +406,37 @@
opacity: 0;
}
- dialog.svelte-2yzs5z {
+ dialog.svelte-aehutt {
transform: translateY(1em);
}
- [open].svelte-2yzs5z,
- [open].svelte-2yzs5z::backdrop {
+ [open].svelte-aehutt,
+ [open].svelte-aehutt::backdrop {
opacity: 1;
transform: translateY(0);
}
@starting-style {
- [open].svelte-2yzs5z,
- [open].svelte-2yzs5z::backdrop {
+ [open].svelte-aehutt,
+ [open].svelte-aehutt::backdrop {
opacity: 0;
}
- [open].svelte-2yzs5z {
+ [open].svelte-aehutt {
transform: translateY(-1em);
}
}
@supports not selector(::highlight(a)) {
- dialog.svelte-2yzs5z, dialog.svelte-2yzs5z::backdrop {
- animation: svelte-2yzs5z-simple-appear .2s forwards;
+ dialog.svelte-aehutt, dialog.svelte-aehutt::backdrop {
+ animation: svelte-aehutt-simple-appear .2s forwards;
}
- @keyframes svelte-2yzs5z-simple-appear {
+ @keyframes svelte-aehutt-simple-appear {
from { opacity: 0; }
to { opacity: 1; }
}
}
-`),ce({get store(){return r()},set store($){r($),jt()}})}yr(["mousedown","click","keydown"]);Le(Ar,{store:{}},[],[],!0);const bi=(t,e)=>{const n=t.target.getAttribute("data-highlight");n&&(t.preventDefault(),e(n))};var Ei=wt(''),Ci=wt('');function Dr(t,e){ue(e,!0);let n=Oe(e,"store",7);var r=Io(),o=pn(r);return ze(o,()=>n().nav,s=>{var c=Ci();c.__click=[bi,zr],gn(c,77,()=>n().highlights,(v,p)=>K(v)._id,(v,p,d)=>{var y=Ei();gt(()=>ft(y,"style",`top: var(--highlight-${K(p)._id??""}-top); --color: ${(Rt.get(K(p).color)||K(p).color)??""}`)),gt(()=>ft(y,"data-highlight",K(p)._id)),lt(v,y)}),lt(s,c)}),lt(t,r),mn(t,"svelte-1t9y4ki",`
+`),ce({get store(){return r()},set store(k){r(k),Ht()}})}br(["mousedown","click","keydown"]);Me(Or,{store:{}},[],[],!0);const Ci=(t,e)=>{const n=t.target.getAttribute("data-highlight");n&&(t.preventDefault(),e(n))};var $i=bt(''),ki=bt('');function Mr(t,e){ue(e,!0);let n=Oe(e,"store",7);var r=Yo(),o=hn(r);return Se(o,()=>n().nav,s=>{var c=ki();c.__click=[Ci,Ar],mn(c,77,()=>n().highlights,(p,h)=>K(p)._id,(p,h,d)=>{var _=$i();_t(()=>ft(_,"style",`top: var(--highlight-${K(h)._id??""}-top); --color: ${(Nt.get(K(h).color)||K(h).color)??""}`)),_t(()=>ft(_,"data-highlight",K(h)._id)),lt(p,_)}),lt(s,c)}),lt(t,r),vn(t,"svelte-1t9y4ki",`
nav.svelte-1t9y4ki {
all: unset;
}
@@ -460,4 +461,4 @@
width: 100%;
background: var(--color);
}
-`),ce({get store(){return n()},set store(s){n(s),jt()}})}yr(["click"]);Le(Dr,{store:{}},[],[],!0);var $i=wt(" ",1);function ki(t,e){ue(e,!0);let n=Oe(e,"store",7);Ze(()=>{Ve(n().highlights)});let r;function o(){Ve(n().highlights),clearTimeout(r),r=setTimeout(()=>Ve(n().highlights),3e3)}Ze(()=>li);var s=$i();mt("load",Te,o,!1),mt("popstate",Te,o,!1);var c=pn(s);Nr(c,{get store(){return n()}});var v=j(j(c,!0));Ar(v,{get store(){return n()}});var p=j(j(v,!0));return Dr(p,{get store(){return n()}}),lt(t,s),ce({get store(){return n()},set store(d){n(d),jt()}})}customElements.define("rdh-ui",Le(ki,{store:{}},[],[],!0));function xi(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 Ti(t){let e=!1;const n=new Set,r=xi(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 Zt=document.createElement("rdh-ui");(async()=>{const t=await Ti(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(Zt)||document.body.appendChild(Zt):document.body.contains(Zt)&&document.body.removeChild(Zt));break;case"RDH_SCROLL":typeof n.payload._id=="string"&&zr(n.payload._id);break;case"RDH_ADD_SELECTION":const r=Sr();if(!r)return;const o=e.find(r);if(!o)return;e.upsert(o),te();break;case"RDH_NOTE_SELECTION":console.log("not implemented yet");break}}),e=ui(n=>t({type:"RDH_ADD",payload:n}),n=>t({type:"RDH_UPDATE",payload:n}),({_id:n})=>t({type:"RDH_REMOVE",payload:{_id:n}}));Zt.store=e,t({type:"RDH_READY",payload:{url:location.href}})})();
+`),ce({get store(){return n()},set store(s){n(s),Ht()}})}br(["click"]);Me(Mr,{store:{}},[],[],!0);var xi=bt(" ",5);function Ti(t,e){ue(e,!0);let n=Oe(e,"store",7);Ze(()=>{Ve(n().highlights)});let r;function o(){Ve(n().highlights),clearTimeout(r),r=setTimeout(()=>{console.log("rerender",n().highlights),Ve(n().highlights)},3e3)}hr(()=>{document.readyState&&o()}),Ze(()=>ui);var s=xi();mt("load",Te,o,!1),mt("popstate",Te,o,!1);var c=hn(s);Lr(c,{get store(){return n()}});var p=F(F(c,!0));Or(p,{get store(){return n()}});var h=F(F(p,!0));return Mr(h,{get store(){return n()}}),lt(t,s),ce({get store(){return n()},set store(d){n(d),Ht()}})}customElements.define("rdh-ui",Me(Ti,{store:{}},[],[],!0));function Si(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 Ni(t){let e=!1;const n=new Set,r=Si(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 Zt=document.createElement("rdh-ui");(async()=>{const t=await Ni(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(Zt)||document.body.appendChild(Zt):document.body.contains(Zt)&&document.body.removeChild(Zt));break;case"RDH_SCROLL":typeof n.payload._id=="string"&&Ar(n.payload._id);break;case"RDH_ADD_SELECTION":const r=Dr();if(!r)return;const o=e.find(r);if(!o)return;e.upsert(o),te();break;case"RDH_NOTE_SELECTION":console.log("not implemented yet");break}}),e=fi(n=>t({type:"RDH_ADD",payload:n}),n=>t({type:"RDH_UPDATE",payload:n}),({_id:n})=>t({type:"RDH_REMOVE",payload:{_id:n}}));Zt.store=e,t({type:"RDH_READY",payload:{url:location.href}})})();