visual-comments 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +19 -2
  2. package/dist/cli/index.d.ts +2 -0
  3. package/dist/cli/index.js +477 -0
  4. package/dist/core/presence.d.ts +13 -0
  5. package/dist/core/presence.js +25 -0
  6. package/dist/core/threads.svelte.d.ts +36 -2
  7. package/dist/core/threads.svelte.js +120 -3
  8. package/dist/index.d.ts +1 -1
  9. package/dist/server/env.d.ts +78 -0
  10. package/dist/server/env.js +94 -0
  11. package/dist/server/index.d.ts +1 -0
  12. package/dist/server/index.js +10 -3
  13. package/dist/server/variables.d.ts +28 -0
  14. package/dist/server/variables.js +73 -0
  15. package/dist/shared/protocol.d.ts +4 -0
  16. package/dist/shared/protocol.js +4 -0
  17. package/dist/shared/types.d.ts +64 -0
  18. package/dist/sveltekit/CommentTools.svelte +98 -0
  19. package/dist/sveltekit/CommentTools.svelte.d.ts +6 -0
  20. package/dist/sveltekit/Comments.svelte +104 -0
  21. package/dist/sveltekit/Comments.svelte.d.ts +25 -0
  22. package/dist/sveltekit/Toolbar.svelte +64 -0
  23. package/dist/sveltekit/Toolbar.svelte.d.ts +13 -0
  24. package/dist/sveltekit/ToolbarButton.svelte +66 -0
  25. package/dist/sveltekit/ToolbarButton.svelte.d.ts +12 -0
  26. package/dist/sveltekit/context.d.ts +16 -0
  27. package/dist/sveltekit/context.js +9 -0
  28. package/dist/sveltekit/index.d.ts +6 -0
  29. package/dist/sveltekit/index.js +6 -0
  30. package/dist/ui/Account.svelte +45 -7
  31. package/dist/ui/App.svelte +12 -3
  32. package/dist/ui/Avatar.svelte +28 -6
  33. package/dist/ui/Avatar.svelte.d.ts +4 -5
  34. package/dist/ui/Connect.svelte +128 -0
  35. package/dist/ui/Connect.svelte.d.ts +6 -0
  36. package/dist/ui/Menu.svelte +5 -1
  37. package/dist/ui/Menu.svelte.d.ts +2 -0
  38. package/dist/ui/Overlay.svelte +15 -1
  39. package/dist/ui/Panel.svelte +141 -127
  40. package/dist/ui/Pin.svelte +22 -2
  41. package/dist/ui/Pin.svelte.d.ts +2 -0
  42. package/dist/ui/Presence.svelte +43 -0
  43. package/dist/ui/Presence.svelte.d.ts +8 -0
  44. package/dist/ui/ThreadCard.svelte +26 -2
  45. package/dist/ui/generated/styles.css +1 -1
  46. package/dist/ui/generated/styles.js +2 -2
  47. package/dist/ui/styles.css +21 -0
  48. package/dist/ui/text.d.ts +3 -1
  49. package/dist/ui/text.js +4 -0
  50. package/dist/visual-comments.svelte.d.ts +53 -4
  51. package/dist/visual-comments.svelte.js +154 -29
  52. package/dist/vite/index.d.ts +20 -0
  53. package/dist/vite/index.js +78 -0
  54. package/dist-widget/visual-comments.js +17 -10
  55. package/package.json +88 -66
@@ -1,16 +1,18 @@
1
- (function(){var e={},t=Symbol(`uninitialized`),n=`http://www.w3.org/1999/xhtml`,r=Array.isArray,i=Array.prototype.indexOf,a=Array.prototype.includes,o=Array.from,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,u=Object.prototype,d=Array.prototype,f=Object.getPrototypeOf,p=Object.isExtensible;function m(e){return typeof e==`function`}var h=()=>{};function g(e){for(var t=0;t<e.length;t++)e[t]()}function _(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var v=1<<24,y=1024,b=2048,x=4096,S=8192,C=16384,w=32768,ee=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,ae=1<<21,oe=1<<22,T=1<<23,se=Symbol(`$state`),ce=Symbol(`component`),le=Symbol(`legacy props`),ue=Symbol(``),de=Symbol(`attributes`),fe=Symbol(`class`),pe=Symbol(`style`),me=Symbol(`text`),he=Symbol(`form reset`),ge=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},_e=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ve(){console.warn(`https://svelte.dev/e/derived_inert`)}function ye(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function xe(e){E=e}var D;function Se(t){if(t===null)throw ye(),e;return D=t}function Ce(){return Se(on(D))}function O(t){if(E){if(on(D)!==null)throw ye(),e;D=t}}function we(e=1){if(E){for(var t=e,n=D;t--;)n=on(n);D=n}}function Te(e=!0){for(var t=0,n=D;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=on(n);e&&n.remove(),n=i}}function Ee(t){if(!t||t.nodeType!==8)throw ye(),e;return t.data}function De(e){return e===this.v}function Oe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function ke(e){return!Oe(e,this.v)}function Ae(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Re(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function ze(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ve(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function He(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function Ue(e,t){return e===null&&Ae(t),e.c??=new Map(He(e)||void 0)}var k=null;function We(e){k=e}function Ge(e){return Ue(k,`getContext`).get(e)}function Ke(e,t){return Ue(k,`setContext`).set(e,t),t}function qe(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:V,l:null}}function Je(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)bn(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,Ye(e)}function Ye(e={}){return s(e,ce,{value:!0}),e}function Xe(){return!0}var Ze=[];function Qe(){var e=Ze;Ze=[],g(e)}function $e(e){if(Ze.length===0&&!Et){var t=Ze;queueMicrotask(()=>{t===Ze&&Qe()})}Ze.push(e)}function et(){for(;Ze.length>0;)Qe()}var tt=~(b|x|y);function A(e,t){e.f=e.f&tt|t}function nt(e){e.f&512||e.deps===null?A(e,y):A(e,x)}function rt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),A(e,y)}function it(e){E&&an(e)!==null&&cn(e)}var at=!1;function ot(){at||(at=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[he]?.()})},{capture:!0}))}function st(e){var t=B,n=V;Un(null),Wn(null);try{return e()}finally{Un(t),Wn(n)}}function ct(e,t,n,r=n){e.addEventListener(t,()=>st(n));let i=e[he];e[he]=i?()=>{i(),r(!0)}:()=>r(!0),ot()}function lt(e,t,n,r){let i=Xe()?pt:gt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=V,c=ut(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){pn(e,s)}dt()}}var d=ft();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>ht(e))).then(u).catch(e=>pn(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),dt())}):f()}function ut(){var e=V,t=B,n=k,r=M;return function(i=!0){Wn(e),Un(t),We(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function dt(e=!0){Wn(null),Un(null),We(null),e&&M?.deactivate()}function ft(){var e=V,t=e.b,n=M,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function pt(e){var n=2|b;return V!==null&&(V.f|=ne),{ctx:k,deps:null,effects:null,equals:De,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:V,ac:null}}var mt=Symbol(`obsolete`);function ht(e,n,r){let i=V;i===null&&je();var a=void 0,o=Ut(t),s=!B,c=new Set;return wn(()=>{var t=V,n=_();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ge&&n.reject(e)}).finally(dt)}catch(e){n.reject(e),dt()}var r=M;if(s){if(t.f&32768)var l=ft();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(mt);else for(let e of c.values())e.reject(mt);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==mt&&(r.activate(),t?(o.f|=T,qt(o,t)):(o.f&8388608&&(o.f^=T),qt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),vn(()=>{for(let e of c)e.reject(mt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function j(e){let t=pt(e);return Kn(t),t}function gt(e){let t=pt(e);return t.equals=ke,t}function _t(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function vt(e){var n,r=V,i=e.parent;if(!Bn&&i!==null&&e.v!==t&&i.f&24576)return ve(),e.v;Wn(i);try{_t(e),n=ir(e)}finally{Wn(r)}return n}function yt(e){var t=vt(e);!e.equals(t)&&(e.wv=tr(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),Ct?.capture(e,t,!0)),e.deps===null))?A(e,y):Bn||(wt===null?nt(e):(_n()||M?.is_fork)&&wt.set(e,t))}function bt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&st(()=>{t.ac.abort(ge),t.ac=null}),t.fn!==null&&(t.teardown=h),sr(t,0),An(t))}function xt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&cr(t)}var St=null,M=null,Ct=null,wt=null,Tt=null,Et=!1,Dt=!1,Ot=null,kt=null,At=0,jt=1,Mt=class e{id=jt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){St===null?St=this:(St.#n=this,this.#t=St),St=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)A(r,b),t(r);for(r of n.m)A(r,x),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=y}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),A(e,b),this.schedule(e);for(let e of this.#d)A(e,x),this.schedule(e);this.apply();for(var t=Ot=[],n=[],r=kt=[];this.#c.length>0;){At++>1e3&&(this.#S(),Pt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw zt(e),this.#h()||this.discard(),t}}if(M=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(Ot=null,kt=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Rt(e,t);r.length>0&&M.#_();return}let a=this.#y();if(a)this.#x(n),this.#x(t),a.#b(this);else{this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Ct=this,It(n),It(t),Ct=null,this.#s?.resolve();var o=M;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0){if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this}o!==null&&(Vt.clear(),o.#_())}}#v(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):nr(r)&&(i&16&&this.#d.add(r),cr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),A(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)rt(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),wt?.set(e,n)),this.is_fork||(e.v=n)}activate(){M=this}deactivate(){M=null,wt=null}flush(){try{Dt=!0,M=this,this.#_()}finally{At=0,Tt=null,Ot=null,kt=null,Dt=!1,M=null,wt=null,Vt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(mt);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,$e(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=_()).promise}static ensure(){if(M===null){let t=M=new e;!Dt&&!Et&&$e(()=>{t.#e||t.flush()})}return M}apply(){wt=null}schedule(e){Tt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?St=e:t.#t=e,this.linked=!1}}};function Nt(e){var t=Et,n=Ct;Ct=null,Et=!0;try{var r;for(e&&(Nt(),r=e());;){if(et(),M===null)return r;M.flush()}}finally{Et=t,Ct=n}}function Pt(){try{Ie()}catch(e){pn(e,Tt)}}var Ft=null;function It(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&nr(r)&&(Ft=new Set,cr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Nn(r),Ft?.size>0)){Vt.clear();for(let e of Ft){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ft.has(n)&&(Ft.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||cr(n)}}Ft.clear()}}Ft=null}}function Lt(e){M.schedule(e)}function Rt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),A(e,y);for(var n=e.first;n!==null;)Rt(n,t),n=n.next}}function zt(e){A(e,y);for(var t=e.first;t!==null;)zt(t),t=t.next}var Bt=new Set,Vt=new Map,Ht=!1;function Ut(e,t){return{f:0,v:e,reactions:null,equals:De,rv:0,wv:0}}function N(e,t){let n=Ut(e,t);return Kn(n),n}function Wt(e,t=!1,n=!0){let r=Ut(e);return t||(r.equals=ke),r}function P(e,t,n=!1){return B!==null&&(!Hn||B.f&131072)&&Xe()&&B.f&4325394&&(Gn===null||!Gn.has(e))&&Be(),qt(e,n?Zt(t):t,kt)}var Gt=null,Kt=0;function qt(e,t,n=null){if(!e.equals(t)){Bn?Vt.set(e,t):Vt.has(e)||Vt.set(e,e.v);var r=Mt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&vt(t),wt===null&&nt(t)}e.wv=tr(),Gt=null,Kt=0,Xt(e,b,n),Gt=null,Xe()&&V!==null&&V.f&1024&&!(V.f&96)&&(Yn===null?Xn([e]):Yn.push(e)),!r.is_fork&&Bt.size>0&&!Ht&&Jt()}return t}function Jt(){Ht=!1;for(let e of Bt){e.f&1024&&A(e,x);let t;try{t=nr(e)}catch{t=!0}t&&cr(e)}Bt.clear()}function Yt(e){P(e,e.v+1)}function Xt(e,t,n){var r=e.reactions;if(r!==null){var i=Xe(),a=r.length;if(Kt+=a,Kt>1e5&&Gt===null&&(Gt=new Set),Gt!==null){if(Gt.has(e))return;Gt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==V){var l=(c&b)===0;if(l&&A(s,t),c&131072)Bt.add(s);else if(c&2){var u=s;wt?.delete(u),Xt(u,x,n)}else if(l){var d=s;c&16&&Ft!==null&&Ft.add(d),n===null?Lt(d):n.push(d)}}}}}function Zt(e){if(typeof e!=`object`||!e||se in e||ce in e)return e;let n=f(e);if(n!==u&&n!==d)return e;var i=new Map,a=r(e),o=N(0),s=null,l=$n,p=e=>{if($n===l)return e();var t=B,n=$n;Un(null),er(l);var r=e();return Un(t),er(n),r};return a&&i.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Re();var r=i.get(t);return r===void 0?p(()=>{var e=N(n.value,s);return i.set(t,e),e}):P(r,n.value,!0),!0},deleteProperty(e,n){var r=i.get(n);if(r===void 0){if(n in e){let e=p(()=>N(t,s));i.set(n,e),Yt(o)}}else P(r,t),Yt(o);return!0},get(n,r,a){if(r===se)return e;var o=i.get(r),l=r in n;if(o===void 0&&(!l||c(n,r)?.writable)&&(o=p(()=>N(Zt(l?n[r]:t),s)),i.set(r,o)),o!==void 0){var u=H(o);return u===t?void 0:u}return Reflect.get(n,r,a)},getOwnPropertyDescriptor(e,n){this.has?.(e,n);var r=Reflect.getOwnPropertyDescriptor(e,n),a=i.get(n);if(a!==void 0){var o=H(a);if(o===t)return;if(r&&`value`in r)r.value=o;else return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,n){if(n===se)return!0;var r=i.get(n),a=r!==void 0&&r.v!==t||Reflect.has(e,n);return(r!==void 0||V!==null&&(!a||c(e,n)?.writable))&&(r===void 0&&(r=p(()=>N(a?Zt(e[n]):t,s)),i.set(n,r)),H(r)===t)?!1:a},set(e,n,r,l){var u=i.get(n),d=n in e;if(a&&n===`length`)for(var f=r;f<u.v;f+=1){var m=i.get(f+``);m===void 0?f in e&&(m=p(()=>N(t,s)),i.set(f+``,m)):P(m,t)}if(u===void 0)(!d||c(e,n)?.writable)&&(u=p(()=>N(void 0,s)),P(u,Zt(r)),i.set(n,u));else{d=u.v!==t;var h=p(()=>Zt(r));P(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(l,r),!d){if(a&&typeof n==`string`){var _=i.get(`length`),v=Number(n);Number.isInteger(v)&&v>=_.v&&P(_,v+1)}Yt(o)}return!0},ownKeys(e){H(o);var n=Reflect.ownKeys(e).filter(e=>{var n=i.get(e);return n===void 0||n.v!==t});for(var[r,a]of i)a.v!==t&&!(r in e)&&n.push(r);return n},setPrototypeOf(){ze()}})}var Qt,$t,en,tn;function nn(){if(Qt===void 0){Qt=window,$t=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;en=c(t,`firstChild`).get,tn=c(t,`nextSibling`).get,p(e)&&(e[fe]=void 0,e[de]=null,e[pe]=void 0,e.__e=void 0),p(n)&&(n[me]=void 0)}}function rn(e=``){return document.createTextNode(e)}function an(e){return en.call(e)}function on(e){return tn.call(e)}function F(e,t){if(!E)return an(e);var n=an(D);if(n===null)n=D.appendChild(rn());else if(t&&n.nodeType!==3){var r=rn();return n?.before(r),Se(r),r}return t&&dn(n),Se(n),n}function sn(e,t=!1){if(!E){var n=an(e);return n instanceof Comment&&n.data===``?on(n):n}if(t){if(D?.nodeType!==3){var r=rn();return D?.before(r),Se(r),r}dn(D)}return D}function I(e,t=!1){if(!E)return an(e);var n=F(e,t);return O(e),n}function L(e,t=1,n=!1){let r=E?D:e;for(var i;t--;)i=r,r=on(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=rn();return r===null?i?.after(a):r.before(a),Se(a),a}dn(r)}return Se(r),r}function cn(e){e.textContent=``}function ln(){return!1}function un(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function dn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function fn(e){var t=V;if(t===null)return B.f|=T,e;if(!(t.f&32768)&&!(t.f&4))throw e;pn(e,t)}function pn(t,n){if(t===e)throw t;if(!(n!==null&&n.f&16384)){for(;n!==null;){if(n.f&128&&!(n.f&33570816)){if(!(n.f&32768))throw t;try{n.b.error(t);return}catch(e){t=e}}n=n.parent}throw t}}function mn(e){V===null&&(B===null&&Fe(e),Pe()),Bn&&Ne(e)}function hn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function gn(e,t){var n=V;n!==null&&n.f&8192&&(e|=S);var r={ctx:k,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)Ot===null?Mt.ensure().schedule(r):Ot.push(r);else if(t!==null){try{cr(r)}catch(e){throw z(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=te))}if(i!==null&&(i.parent=n,n!==null&&hn(i,n),B!==null&&B.f&2&&!(e&64))){var a=B;(a.effects??=[]).push(i)}return r}function _n(){return B!==null&&!Hn}function vn(e){let t=gn(8,null);return A(t,y),t.teardown=e,t}function yn(e){mn(`$effect`);var t=V.f;if(!B&&t&32&&k!==null&&!k.i){var n=k;(n.e??=[]).push(e)}else return bn(e)}function bn(e){return gn(4|re,e)}function xn(e){Mt.ensure();let t=gn(64|ne,e);return()=>{z(t)}}function Sn(e){Mt.ensure();let t=gn(64|ne,e);return(e={})=>new Promise(n=>{e.outro?Pn(t,()=>{z(t),n(void 0)}):(z(t),n(void 0))})}function Cn(e){return gn(4,e)}function wn(e){return gn(oe|ne,e)}function Tn(e,t=0){return gn(8|t,e)}function R(e,t=[],n=[],r=[]){lt(r,t,n,t=>{gn(8,()=>{e(...t.map(H))})})}function En(e,t=0){return gn(16|t,e)}function Dn(e,t=0){return gn(v|t,e)}function On(e){return gn(32|ne,e)}function kn(e){var t=e.teardown;if(t!==null){let n=Bn,r=B;Vn(!0),Un(null);try{t.call(null)}catch(t){pn(t,e.parent)}finally{Vn(n),Un(r)}}}function An(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&st(()=>{e.abort(ge)});var r=n.next;n.f&64?n.parent=null:z(n,t),n=r}}function jn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||z(t),t=n}}function z(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Mn(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,An(e,t&&!n),sr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();kn(e),e.f^=ee,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&Nn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mn(e,t){for(;e!==null;){var n=e===t?null:on(e);e.remove(),e=n}}function Nn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Pn(e,t,n=!0){var r=[];e.f|=256,Fn(e,r,!0);var i=()=>{n&&z(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Fn(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Fn(i,t,o?n:!1)}i=a}}}function In(e){e.f&=-257,Ln(e,!0)}function Ln(e,t){if(!(e.f&256)&&e.f&8192){e.f^=S,e.f&1024||(A(e,b),Mt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Ln(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Rn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:on(n);t.append(n),n=i}}var zn=null,Bn=!1;function Vn(e){Bn=e}var B=null,Hn=!1;function Un(e){B=e}var V=null;function Wn(e){V=e}var Gn=null;function Kn(e){B!==null&&(B.f&2097152||B.f&2)&&(Gn??=new Set).add(e)}var qn=null,Jn=0,Yn=null;function Xn(e){Yn=e}var Zn=1,Qn=0,$n=Qn;function er(e){$n=e}function tr(){return++Zn}function nr(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(nr(a)&&yt(a),a.wv>e.wv)return!0}t&512&&wt===null&&A(e,y)}return!1}function rr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Gn!==null&&Gn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?rr(a,t,!1):t===a&&(n?A(a,b):a.f&1024&&A(a,x),Lt(a))}}function ir(e){var t=qn,n=Jn,r=Yn,i=B,a=Gn,o=k,s=Hn,c=$n,l=e.f;qn=null,Jn=0,Yn=null,B=l&96?null:e,Gn=null,We(e.ctx),Hn=!1,$n=++Qn,e.ac!==null&&(st(()=>{e.ac.abort(ge)}),e.ac=null);try{e.f|=ae;var u=e.fn,d=u();e.f|=w;var f=ar(e);if(Xe()&&Yn!==null&&!Hn&&f!==null&&!(e.f&6146))for(var p=0;p<Yn.length;p++)rr(Yn[p],e);if(i!==null&&i!==e){if(Qn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Qn;if(t!==null)for(let e of t)e.rv=Qn;Yn!==null&&(r===null?r=Yn:r.push(...Yn))}return e.f&8388608&&(e.f^=T),d}catch(t){return ar(e),fn(t)}finally{e.f^=ae,qn=t,Jn=n,Yn=r,B=i,Gn=a,We(o),Hn=s,$n=c}}function ar(e){var t=e.deps,n=M?.is_fork;if(qn!==null){var r;if(n||sr(e,Jn),t!==null&&Jn>0)for(t.length=Jn+qn.length,r=0;r<qn.length;r++)t[Jn+r]=qn[r];else e.deps=t=qn;if(_n()&&e.f&512)for(r=Jn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Jn<t.length&&(sr(e,Jn),t.length=Jn);return t}function or(e,n){let r=n.reactions;if(r!==null){var o=i.call(r,e);if(o!==-1){var s=r.length-1;s===0?r=n.reactions=null:(r[o]=r[s],r.pop())}}if(r===null&&n.f&2&&(qn===null||!a.call(qn,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&nt(c),c.ac!==null&&st(()=>{c.ac.abort(ge),c.ac=null,A(c,b)}),bt(c),sr(c,0)}}function sr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)or(e,n[r])}function cr(e){var t=e.f;if(!(t&16384)){A(e,y);var n=V;V=e;try{t&16777232?jn(e):An(e),kn(e);var r=ir(e);e.teardown=typeof r==`function`?r:null,e.wv=Zn}finally{V=n}}}async function lr(){await Promise.resolve(),Nt()}function H(e){var t=!!(e.f&2);if(zn?.add(e),B!==null&&!Hn&&!(V!==null&&V.f&16384)&&(Gn===null||!Gn.has(e))){var n=B.deps;if(B.f&2097152)e.rv<Qn&&(e.rv=Qn,qn===null&&n!==null&&n[Jn]===e?Jn++:qn===null?qn=[e]:qn.push(e));else{B.deps??=[],a.call(B.deps,e)||B.deps.push(e);var r=e.reactions;r===null?e.reactions=[B]:a.call(r,B)||r.push(B)}}if(Bn&&Vt.has(e))return Vt.get(e);if(t){var i=e;if(Bn){var o=i.v;return(!(i.f&1024)&&i.reactions!==null||dr(i))&&(o=vt(i)),Vt.set(i,o),o}var s=!(i.f&512)&&!Hn&&B!==null&&!!(B.f&512),c=(i.f&w)===0;nr(i)&&(s&&(i.f|=512),yt(i)),s&&!c&&(xt(i),ur(i))}if(wt?.has(e))return wt.get(e);if(e.f&8388608)throw e.v;return e.v}function ur(e){if(e.f|=512,e.deps!==null)for(let n of e.deps){var t=n.reactions;t===null?n.reactions=[e]:a.call(t,e)||t.push(e),n.f&2&&!(n.f&512)&&(xt(n),ur(n))}}function dr(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Vt.has(t)||t.f&2&&dr(t))return!0;return!1}function fr(e){var t=Hn;try{return Hn=!0,e()}finally{Hn=t}}var pr=Symbol(`events`),mr=new Set,hr=new Set;function gr(e){if(!E)return;e.removeAttribute(`onload`),e.removeAttribute(`onerror`);let t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function _r(e,t,n,r={}){function i(e){if(r.capture||Sr.call(t,e),!e.cancelBubble)return st(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,$e(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function vr(e,t,n,r,i){var a={capture:r,passive:i},o=_r(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&vn(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function U(e,t,n){(t[pr]??={})[e]=n}function yr(e){for(var t=0;t<e.length;t++)mr.add(e[t]);for(var n of hr)n(e)}var br=null,xr=!1;function Sr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;br=e,xr||(xr=!0,setTimeout(()=>{xr=!1,br=null}));var o=0,c=br===e&&e[pr];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[pr]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(a=i[o]||e.target,a!==t){s(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=B,f=V;Un(null),Wn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[pr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[pr]=t,delete e.currentTarget,Un(d),Wn(f)}}}var Cr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function wr(e){return Cr?.createHTML(e)??e}function Tr(e){var t=un(`template`);return t.innerHTML=wr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Er(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(E)return Er(D,null),D;i===void 0&&(i=Tr(a?e:`<!>`+e),n||(i=an(i)));var t=r||$t?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=an(t),s=t.lastChild;Er(o,s)}else Er(t,t);return t}}function Dr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return Er(D,null),D;if(!o){var e=an(Tr(a));if(i)for(o=document.createDocumentFragment();an(e);)o.appendChild(an(e));else o=an(e)}var t=o.cloneNode(!0);if(i){var n=an(t),r=t.lastChild;Er(n,r)}else Er(t,t);return t}}function Or(e,t){return Dr(e,t,`svg`)}function G(e=``){if(!E){var t=rn(e+``);return Er(t,t),t}var n=D;return n.nodeType===3?dn(n):(n.before(n=rn()),Se(n)),Er(n,n),n}function kr(){if(E)return Er(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=rn();return e.append(t,n),Er(t,n),e}function K(e,t){if(E){var n=V;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=D),Ce()}else e!==null&&e.before(t)}function Ar(){if(E&&D&&D.nodeType===8&&D.textContent?.startsWith(`$`)){let e=D.textContent.substring(1);return Ce(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var jr=[`touchstart`,`touchmove`];function Mr(e){return jr.includes(e)}function Nr(e){let t=0,n=Ut(0),r;return()=>{_n()&&(H(n),Tn(()=>(t===0&&(r=fr(()=>e(()=>Yt(n)))),t+=1,()=>{$e(()=>{--t,t===0&&(r?.(),r=void 0,Yt(n))})})))}}var Pr=te|ne;function Fr(e,t,n,r){new Ir(e,t,n,r)}var Ir=class{parent;is_pending=!1;transform_error;#e;#t=E?D:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Nr(()=>(this.#m=Ut(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=V;t.b=this,t.f|=128,n(e)},this.parent=V.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=En(()=>{if(E){let e=Ee(this.#t);Ce();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#_(t)}else t?this.#b():this.#g()}else this.#x()},Pr),E&&(this.#e=D)}#g(){try{this.#a=On(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);$e(r),t&&(this.#s=On(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{this.#y()||(t?be():(t=!0,n&&Ve(),this.#s!==null&&Pn(this.#s,()=>{this.#s=null}),this.#C(()=>{this.#x()})))};return{reset:r,invoke_onerror:()=>{if(!this.#y())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){pn(e,this.#i&&this.#i.parent)}}}}#y(){return(this.#i.f&(C|ee))!==0}#b(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=On(()=>e(this.#e)),$e(()=>{if(!this.#y()){var e=this.#c=document.createDocumentFragment(),t=rn(),n=!1;e.append(t),this.#a=this.#C(()=>{try{return On(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){pn(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#S(M)):this.#u===0&&(this.#e.before(e),this.#c=null,Pn(this.#o,()=>{this.#o=null}),this.#S(M))}}))}#x(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=On(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Rn(this.#a,e);let t=this.#n.pending;this.#o=On(()=>t(this.#e))}else this.#S(M)}catch(e){this.error(e)}}#S(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){rt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#C(e){var t=V,n=B,r=k;Wn(this.#i),Un(this.#i),We(this.#i.ctx);try{return Mt.ensure(),e()}finally{Wn(t),Un(n),We(r)}}#w(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#S(t),this.#o&&Pn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#w(e,t)}update_pending_count(e,t){this.#w(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,$e(()=>{this.#d=!1,this.#m&&qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(t){if(t===e||!this.#n.onerror&&!this.#n.failed)throw t;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.oncommit(()=>{this.#y()||this.#T(t)})):this.#T(t)}#T(e){this.#a&&=(z(this.#a),null),this.#o&&=(z(this.#o),null),this.#s&&=(z(this.#s),null),E&&(Se(this.#t),we(),Se(Te()));let t=this.#n.failed,n=e=>{if(this.#y())return;let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&!this.#y()&&(this.#s=this.#C(()=>{try{return On(()=>{var r=V;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return pn(e,this.#i.parent),null}}))};$e(()=>{if(!this.#y()){var t;try{t=this.transform_error(e)}catch(e){pn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>pn(e,this.#i&&this.#i.parent)):n(t)}})}},Lr=!0;function q(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[me]??=e.nodeValue)&&(e[me]=n,e.nodeValue=`${n}`)}function Rr(e,t){return Br(e,t)}var zr=new Map;function Br(t,{target:n,anchor:r,props:i={},events:a,context:s,intro:c=!0,transformError:l}){nn();var u=void 0,d=Sn(()=>{var d=r??n.appendChild(rn());Fr(d,{pending:()=>{}},n=>{qe({});var r=k;if(s&&(r.c=s),a&&(i.$$events=a),E&&Er(n,null),Lr=c,u=t(n,i)||Ye(),Lr=!0,E&&(V.nodes.end=D,D===null||D.nodeType!==8||D.data!==`]`))throw ye(),e;Je()},l);var f=new Set,p=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!f.has(r)){f.add(r);var i=Mr(r);for(let e of[n,document]){var a=zr.get(e);a===void 0&&(a=new Map,zr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Sr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return p(o(mr)),hr.add(p),()=>{for(var e of f)for(let r of[n,document]){var t=zr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,Sr),t.delete(e),t.size===0&&zr.delete(r)):t.set(e,i)}hr.delete(p),d!==r&&d.parentNode?.removeChild(d)}});return Vr.set(u,d),u}var Vr=new WeakMap;function Hr(e,t){let n=Vr.get(e);return n?(Vr.delete(e),n(t)):Promise.resolve()}var Ur=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)In(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(In(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(z(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Rn(r,t),t.append(rn()),this.#n.set(e,{effect:r,fragment:t})}else z(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Pn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(z(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=ln();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=rn();i.append(a),this.#n.set(e,{effect:On(()=>t(a)),fragment:i})}else this.#t.set(e,On(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else E&&(this.anchor=D),this.#a(n)}};function Wr(e,t,...n){var r=new Ur(e);En(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},te)}function Gr(e){k===null&&Ae(`onMount`),yn(()=>{let t=fr(e);if(typeof t==`function`)return t})}function Kr(e){k===null&&Ae(`onDestroy`),Gr(()=>()=>fr(e))}function J(e,t,n=!1){var r;E&&(r=D,Ce());var i=new Ur(e),a=n?te:0;function o(e,t){if(E){var n=Ee(r);if(e!==parseInt(n.substring(1))){var a=Te();Se(a),i.anchor=a,xe(!1),i.ensure(e,t),xe(!0);return}}i.ensure(e,t)}En(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var qr=Symbol(`NaN`);function Jr(e,t,n){E&&Ce();var r=new Ur(e),i=!Xe();En(()=>{var e=t();e!==e&&(e=qr),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Yr(e,t,n){for(var r=[],i=t.length,a,s=t.length,c=0;c<i;c++){let n=t[c];Pn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Xr(e,o(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;cn(d),d.append(u),e.items.clear()}Xr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Xr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ie,Rn(a,document.createDocumentFragment())):z(t[i],n)}}var Zr;function Qr(e,t,n,i,a,s=null){var c=e,l=new Map;if(t&4){var u=e;c=E?Se(an(u)):u.appendChild(rn())}E&&Ce();var d=null,f=gt(()=>{var e=n();return r(e)?e:e==null?[]:o(e)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var n=H(f);_.fallback=d,ei(_,n,c,t,i),d!==null&&(n.length===0?d.f&33554432?(d.f^=ie,ni(d,null,c)):In(d):Pn(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:En(()=>{var e=H(f),r=e.length;let o=!1;E&&Ee(c)===`[!`!=(r===0)&&(c=Te(),Se(c),xe(!1),o=!0);for(var u=new Set,_=M,v=ln(),y=0;y<r;y+=1){E&&D.nodeType===8&&D.data===`]`&&(c=D,o=!0,xe(!1));var b=e[y],x=i(b,y),S=m?null:l.get(x);S?(S.v&&qt(S.v,b),S.i&&qt(S.i,y),v&&_.unskip_effect(S.e)):(S=ti(l,m?c:Zr??=rn(),b,x,y,a,t,n),m||(S.e.f|=ie),l.set(x,S)),u.add(x)}if(r===0&&s&&!d&&(m?d=On(()=>s(c)):(d=On(()=>s(Zr??=rn())),d.f|=ie)),r>u.size&&Me(``,``,``),E&&r>0&&Se(Te()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}o&&xe(!0),H(f)}),flags:t,items:l,pending:p,outrogroups:null,fallback:d};m=!1,E&&(c=D)}function $r(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function ei(e,t,n,r,i){var a=!!(r&8),s=t.length,c=e.items,l=$r(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<s;v+=1)h=t[v],g=i(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=i(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(In(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=ie,_===l)ni(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),ri(e,d,_),ri(e,_,y),ni(_,y,n),d=_,p=[],m=[],l=$r(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)ni(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);ri(e,S.prev,C.next),ri(e,d,S),ri(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),ni(_,l,n),ri(e,_.prev,_.next),ri(e,_,d===null?e.effect.first:d.next),ri(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=$r(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=$r(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Xr(e,o(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=$r(l.next);var ee=w.length;if(ee>0){var te=r&4&&s===0?n:null;if(a){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}Yr(e,w,te)}}a&&$e(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function ti(e,t,n,r,i,a,o,s){var c=o&1?o&16?Ut(n):Wt(n,!1,!1):null,l=o&2?Ut(i):null;return{v:c,i:l,e:On(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function ni(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=on(r);if(a.before(r),r===i)return;r=o}}function ri(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}var ii=()=>performance.now(),ai={tick:e=>requestAnimationFrame(e),now:()=>ii(),tasks:new Set};function oi(){let e=ai.now();ai.tasks.forEach(t=>{t.c(e)||(ai.tasks.delete(t),t.f())}),ai.tasks.size!==0&&ai.tick(oi)}function si(e){let t;return ai.tasks.size===0&&ai.tick(oi),{promise:new Promise(n=>{ai.tasks.add(t={c:e,f:n})}),abort(){ai.tasks.delete(t)}}}function ci(e,t){st(()=>{e.dispatchEvent(new CustomEvent(t))})}function li(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function ui(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=li(n.trim());t[i]=r.trim()}return t}var di=e=>e;function fi(e,t,n,r){var i=!!(e&1),a=!!(e&2),o=i&&a,s=!!(e&4),c=o?`both`:i?`in`:`out`,l,u=t.inert,d=t.style.overflow,f,p;function m(){return st(()=>l??=n()(t,r?.()??{},{direction:c}))}var h={is_global:s,in(){t.inert=u,i?(a||f?.abort(),f=pi(t,m(),p,1,()=>{ci(t,`introstart`)},()=>{ci(t,`introend`),f?.abort(),f=l=void 0,t.style.overflow=d})):(p?.abort(),p?.reset?.())},out(e){a?(t.inert=!0,p=pi(t,m(),f,0,()=>{ci(t,`outrostart`)},()=>{ci(t,`outroend`),e?.()})):(e?.(),l=void 0)},stop:()=>{f?.abort(),p?.abort()}},g=V;if((g.nodes.t??=[]).push(h),i&&Lr){var _=s;if(!_){for(var v=g.parent;v&&v.f&65536;)for(;(v=v.parent)&&!(v.f&16););_=!v||!!(v.f&32768)}_&&Cn(()=>{fr(()=>h.in())})}}function pi(e,t,n,r,i,a){var o=r===1,s=!1;if(m(t)){var c;return $e(()=>{s||(c=pi(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{s=!0,c?.abort()},deactivate:()=>c?.deactivate(),reset:()=>c?.reset(),t:()=>c?.t()??1-r}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:h,deactivate:h,reset:h,t:()=>r};let{delay:l=0,css:u,tick:d,easing:f=di}=t;var p,g=()=>1-r;return $e(()=>{if(!s){var c=[];if(o&&n===void 0&&(d&&d(0,1),u)){var m=ui(u(0,1));c.push(m,m)}p=e.animate(c,{duration:l,fill:`forwards`}),p.onfinish=()=>{p.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var m=!1;if(u)for(var h=Math.ceil(c/(1e3/60)),_=0;_<=h;_+=1){var v=o+s*f(_/h),y=ui(u(v,1-v));l.push(y),m||=y.overflow===`hidden`}m&&(e.style.overflow=`hidden`),g=()=>{var e=p.currentTime;return o+s*f(e/c)},d&&si(()=>{if(p.playState!==`running`)return!1;var e=g();return d(e,1-e),!0})}p=e.animate(l,{duration:c,fill:`forwards`}),p.onfinish=()=>{g=()=>r,d?.(r,1-r),a()}}}}),{abort:()=>{s=!0,p&&(p.cancel(),p.effect=null,p.onfinish=h)},deactivate:()=>{a=h},reset:()=>{r===0&&d?.(1,0)},t:()=>g()}}function mi(e,t){Cn(()=>{e=V?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=un(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function hi(e,t){var n=void 0,r;Dn(()=>{n!==(n=t())&&(r&&=(z(r),null),n&&(r=On(()=>{Cn(()=>n(e))})))})}function gi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function _i(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gi(e))&&(r&&(r+=` `),r+=t);return r}function Y(e){return typeof e==`object`?_i(e):e??``}var vi=[...`
2
- \r\f\xA0\v`];function yi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||vi.includes(r[o-1]))&&(s===r.length||vi.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function bi(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function xi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Si(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(xi)),i&&c.push(...Object.keys(i).map(xi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=xi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=bi(r)),i&&(n+=bi(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function X(e,t,n,r,i,a){var o=e[fe];if(E||o!==n||o===void 0){var s=yi(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[fe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Ci(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function wi(e,t,n,r){var i=e[pe];if(E||i!==t){var a=Si(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[pe]=t}else r&&(Array.isArray(r)?(Ci(e,n?.[0],r[0]),Ci(e,n?.[1],r[1],`important`)):Ci(e,n,r));return r}var Ti=Symbol(`is custom element`),Ei=Symbol(`is html`),Di=_e?`link`:`LINK`;function Oi(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Z(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Z(e,`checked`,null),e.checked=r}}};e[he]=n,$e(n),ot()}}function Z(e,t,n,r){var i=ki(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Di)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ue]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ji(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ki(e){return e[de]??={[Ti]:e.nodeName.includes(`-`),[Ei]:e.namespaceURI===n}}var Ai=new Map;function ji(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ai.get(t);if(n)return n;Ai.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=l(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=f(i)}return n}function Mi(e,t,n=t){var r=new WeakSet;ct(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Ni(e)?Pi(a):a,n(a),M!==null&&r.add(M),await lr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(E&&e.defaultValue!==e.value||fr(t)==null&&e.value)&&(n(Ni(e)?Pi(e.value):e.value),M!==null&&r.add(M)),Tn(()=>{var n=t();if(e===document.activeElement){var i=M;if(r.has(i))return}Ni(e)&&n===Pi(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function Ni(e){var t=e.type;return t===`number`||t===`range`}function Pi(e){return e===``?null:+e}var Fi=new class e{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(e){this.#n=e}observe(e,t){var n=this.#e.get(e)||new Set;return n.add(t),this.#e.set(e,n),this.#r().observe(e,this.#n),()=>{var n=this.#e.get(e);n.delete(t),n.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#r(){return this.#t??=new ResizeObserver(t=>{for(var n of t){e.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}})}}({box:`border-box`});function Ii(e,t,n){var r=Fi.observe(e,()=>n(e[t]));Cn(()=>(fr(()=>n(e[t])),r))}function Li(e,t){return e===t||e?.[se]===t}function Ri(e=Ye(),t,n,r){var i=k.r,a=V;return Cn(()=>{var o,s;return Tn(()=>{o=s,s=r?.()||[],fr(()=>{Li(n(...s),e)||(t(e,...s),o&&Li(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Li(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var zi=!1;function Bi(e){var t=zi;try{return zi=!1,[e(),zi]}finally{zi=t}}function Q(e,t,n,r){var i=!0,a=!!(n&8),o=!!(n&16),s=r,l=!0,u=void 0,d=()=>o&&i?(u??=pt(r),H(u)):(l&&(l=!1,s=o?fr(r):r),s);let f;if(a){var p=se in e||le in e;f=c(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=Bi(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Le(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?pt:gt)(()=>(v=!1,g()));a&&H(y);var b=V;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&a?Zt(e):e;return P(y,n),v=!0,s!==void 0&&(s=n),e}return Bn&&v||b.f&16384?y.v:H(y)})}var Vi=.6,Hi={width:480,height:56},Ui=`[data-vc-target],[data-pf-comment]`,Wi=`a[href],button,input,select,textarea,label,summary,[contenteditable],[tabindex]:not([tabindex="-1"]),[role=button],[role=link],[role=tab],[role=menuitem],[role=checkbox],[role=switch],[role=option],[data-vc-interactive],[data-pf-link],[data-pf-interactive]`,Gi=`img,svg,canvas,video,picture,iframe`,Ki=`h1,h2,h3,h4,h5,h6,p,li,td,th,dt,dd,blockquote,pre,figcaption,caption,legend`,qi=`section,article,aside,nav,header,footer,form,table,tr,fieldset,dialog,figure,ul,ol,[role=region],[role=dialog],[role=row],[role=grid],[role=table],[role=tablist],[role=listitem],[role=cell],[role=gridcell],[role=columnheader]`,Ji=`http://www.w3.org/2000/svg`,Yi=/^transparent$|,\s*0\)$|\/\s*0\)$/;function Xi(e,t,n,r){return e.elementsFromPoint(t,n).filter(e=>!r(e))}function Zi(e,t,n,r,i){let a=new aa(e,i),{region:o}=i,s=new Map;for(let[c,l]of va(r)){let r=t+c,u=n+l;if(!(r<o.x||u<o.y||r>=o.x+o.width||u>=o.y+o.height))for(let t of Xi(e,r,u,i.skip)){let e=a.target(t);e&&!s.has(e)&&s.set(e,a.box(e))}}let c;for(let[e,r]of s)ya(r,t,n)===0&&(!c||ba(r)<ba(c.box))&&(c={element:e,box:r});let l;for(let[e,i]of s){let a=ya(i,t,n);a===0||a>r||(!c||ba(i)<ba(c.box)&&c.element.contains(e))&&(!l||a<l.gap||a===l.gap&&ba(i)<ba(l.box))&&(l={element:e,box:i,gap:a})}let u=l??c;return u&&a.describe(u.element,u.box)}function Qi(e,t){if(!e.element.ownerDocument.defaultView)return;let n=new aa(e.element.ownerDocument,t);for(let r=e.element.parentElement;r&&(!t.within||t.within.contains(r));r=r.parentElement){if(!n.candidate(r))continue;let t=n.box(r);if(ba(t)>ba(e.box)*1.02)return n.describe(r,t)}}function $i(e,t){let n=null;try{n=e.querySelector(t.selector)}catch{return}if(!n)return;let r=ma(t.text).replace(/…$/,``).slice(0,40);return!r||ma(pa(n)).startsWith(r)?n:void 0}function ea(e,t,n,r){let{region:i}=r;if(t<i.x||n<i.y||t>=i.x+i.width||n>=i.y+i.height||ra(e,t,n))return!1;let a=Xi(e.ownerDocument,t,n,r.skip)[0];return!!(a&&(a===e||e.contains(a)||a.contains(e)))}function ta(e){let t=e.ownerDocument.defaultView;if(!t)return;for(let n=e.parentElement;n;n=n.parentElement){let r=t.getComputedStyle(n);if(!/auto|scroll/.test(r.overflowX+r.overflowY)||n===e.ownerDocument.body)continue;let i=n.getBoundingClientRect(),a=e.getBoundingClientRect();(a.top<i.top||a.bottom>i.bottom)&&(n.scrollTop+=a.top-i.top-(i.height-a.height)/2),(a.left<i.left||a.right>i.right)&&(n.scrollLeft+=a.left-i.left-(i.width-a.width)/2)}let n=e.getBoundingClientRect();(n.top<0||n.bottom>t.innerHeight)&&t.scrollBy(0,n.top-(t.innerHeight-n.height)/2)}function na(e,t,n){let r=e?.ownerDocument.defaultView;if(r)for(let i=e;i;i=i.parentElement){let e=r.getComputedStyle(i),a=i===i.ownerDocument.scrollingElement,o=(a||/auto|scroll/.test(e.overflowY))&&i.scrollHeight>i.clientHeight&&(n<0?i.scrollTop>0:i.scrollTop+i.clientHeight<i.scrollHeight-1),s=(a||/auto|scroll/.test(e.overflowX))&&i.scrollWidth>i.clientWidth&&(t<0?i.scrollLeft>0:i.scrollLeft+i.clientWidth<i.scrollWidth-1);if(n&&o||t&&s)return i}}function ra(e,t,n){let r=e.ownerDocument.defaultView;for(let i=e.parentElement;i&&i!==e.ownerDocument.body;i=i.parentElement){let e=r.getComputedStyle(i);if(e.overflowX===`visible`&&e.overflowY===`visible`)continue;let a=i.getBoundingClientRect();if(t<a.left||t>a.right||n<a.top||n>a.bottom)return!0}return!1}function ia(e){return{selector:fa(e.element),label:e.label,text:Sa(pa(e.element),300)}}var aa=class{view;search;ranks=new Map;constructor(e,t){this.view=e.defaultView,this.search=t}box(e){let t=e.getBoundingClientRect(),{region:n}=this.search,r=Math.max(t.left,n.x),i=Math.max(t.top,n.y);return{x:r,y:i,width:Math.max(Math.min(t.right,n.x+n.width)-r,0),height:Math.max(Math.min(t.bottom,n.y+n.height)-i,0)}}rank(e){let t=this.ranks.get(e);return t===void 0&&(t=this.measure(e),this.ranks.set(e,t)),t}measure(e){let t=e.localName;if(t===`html`||t===`body`||t===`head`)return 0;let{within:n,region:r,skip:i}=this.search;if(n&&(e===n||!n.contains(e))||i(e)||e.namespaceURI===Ji&&(t!==`svg`||e.parentElement?.closest(`svg`)))return 0;let a=e.getBoundingClientRect();if(a.width<2||a.height<2)return 0;let o=this.view.getComputedStyle(e);return o.visibility!==`visible`||o.opacity===`0`?0:e.matches(Ui)?5:a.width*a.height>r.width*r.height*Vi?0:e.matches(Wi)||e.matches(Gi)?4:e.matches(Ki)||ha(e)?3:e.matches(qi)||ga(o)?2:0}candidate(e){return this.rank(e)>0}target(e){let t=e;for(;t&&!this.candidate(t);)t=t.parentElement;if(!t)return;let n=t.parentElement?.closest(Wi);if(n&&this.candidate(n)){let e=n.getBoundingClientRect();e.width<=Hi.width&&e.height<=Hi.height&&(t=n)}for(let e=t.parentElement;e&&_a(e,t)&&!(this.rank(e)<this.rank(t));e=e.parentElement)t=e;return t}describe(e,t){let n=parseFloat(this.view.getComputedStyle(e).borderTopLeftRadius)||0;return{element:e,box:t,radius:Math.min(n,t.width/2,t.height/2),label:oa(e)}}};function oa(e){let t=e.getAttribute(`data-vc-target`)||e.getAttribute(`data-pf-comment`)||e.getAttribute(`aria-label`)||e.getAttribute(`alt`)||e.getAttribute(`title`)||e.getAttribute(`placeholder`)||pa(e)||e.querySelector(`input,textarea,select`)?.getAttribute(`placeholder`)||e.querySelector(`input,textarea,select`)?.getAttribute(`aria-label`),n=t?`${da(e)} “${Sa(t,60)}”`:da(e),r=sa(e);return r?`${n} in “${Sa(r,40)}”`:n}function sa(e){if(e.localName!==`td`)return;let t=[...e.parentElement?.children??[]].indexOf(e),n=e.closest(`table`)?.querySelector(`thead tr`)?.children[t];return n&&pa(n)||void 0}var ca={button:`button`,link:`link`,tab:`tab`,menuitem:`menu item`,checkbox:`checkbox`,switch:`switch`,option:`option`,row:`row`,cell:`cell`,gridcell:`cell`,columnheader:`column header`,listitem:`list item`,region:`region`,dialog:`dialog`,tablist:`tabs`,grid:`table`,table:`table`,img:`image`},la={a:`link`,button:`button`,select:`menu`,textarea:`field`,label:`label`,summary:`button`,img:`image`,picture:`image`,svg:`graphic`,canvas:`graphic`,video:`video`,iframe:`embed`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,p:`text`,li:`list item`,td:`cell`,th:`column header`,tr:`row`,table:`table`,ul:`list`,ol:`list`,nav:`navigation`,header:`header`,footer:`footer`,aside:`sidebar`,section:`section`,article:`article`,form:`form`,dialog:`dialog`,figure:`figure`,blockquote:`quote`,pre:`code`,caption:`caption`,figcaption:`caption`,legend:`legend`},ua=new Set([`tr`,`td`,`th`,`li`]);function da(e){if(ua.has(e.localName))return la[e.localName];let t=ca[e.getAttribute(`role`)??``];if(t)return t;if(e.localName===`input`){let t=e.getAttribute(`type`)??`text`;return t===`checkbox`||t===`radio`?t:t===`button`||t===`submit`?`button`:`field`}return la[e.localName]??(ha(e)?`text`:`box`)}function fa(e){let t=[];for(let n=e;n&&n.localName!==`html`;n=n.parentElement){if(n.id){t.unshift(`#${CSS.escape(n.id)}`);break}let e=[`data-vc-target`,`data-testid`].find(e=>n.hasAttribute(e));if(e){let r=`[${e}="${CSS.escape(n.getAttribute(e))}"]`;if(n.ownerDocument.querySelectorAll(r).length===1){t.unshift(r);break}}let r=n.localName,i=n.parentElement?[...n.parentElement.children].filter(e=>e.localName===n.localName):[];i.length>1&&(r+=`:nth-of-type(${i.indexOf(n)+1})`),t.unshift(r)}return t.join(` > `)}function pa(e){return(e.innerText??e.textContent??``).replace(/\s+/g,` `).trim()}var ma=e=>e.replace(/\s+/g,` `).trim().toLowerCase();function ha(e){for(let t of e.childNodes)if(t.nodeType===3&&t.textContent?.trim())return!0;return!1}function ga(e){return!Yi.test(e.backgroundColor)||e.backgroundImage!==`none`||e.boxShadow!==`none`||[`Top`,`Right`,`Bottom`,`Left`].some(t=>parseFloat(e[`border${t}Width`])>0&&!Yi.test(e[`border${t}Color`]))}function _a(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return Math.abs(n.left-r.left)<1&&Math.abs(n.top-r.top)<1&&Math.abs(n.right-r.right)<1&&Math.abs(n.bottom-r.bottom)<1}function va(e){let t=[[0,0]];for(let[n,r]of[[e/2,4],[e,8]])for(let e=0;e<r;e++){let i=e/r*Math.PI*2+(r===4?Math.PI/4:0);t.push([Math.cos(i)*n,Math.sin(i)*n])}return t}function ya(e,t,n){let r=Math.max(e.x-t,0,t-(e.x+e.width)),i=Math.max(e.y-n,0,n-(e.y+e.height));return Math.hypot(r,i)}var ba=e=>e.width*e.height,xa=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n)),Sa=(e,t)=>e.length>t?`${e.slice(0,t-1)}…`:e;function Ca(e,t){let n=e.defaultView,r=[...e.querySelectorAll(`[data-vc-surface]`)],i={left:0,top:0,right:e.documentElement.clientWidth,bottom:e.documentElement.clientHeight},a=e=>t.ours(e)||!!e.closest(`[data-vc-ignore]`);if(!r.length){let t=e.scrollingElement??e.documentElement;return[{id:``,title:e.title,element:null,doc:e,origin:{x:-n.scrollX,y:-n.scrollY},scale:1,size:{width:t.scrollWidth,height:t.scrollHeight},clip:i,stage:i,docOrigin:{x:0,y:0},docScale:1,search:{region:Fa(i),skip:a},catches:!1,passGestures:!1,context:{}}]}let o=new Map,s=e=>{let t=o.get(e);return t||o.set(e,t=n.getComputedStyle(e)),t},c=[];for(let n of r){let r=n.getBoundingClientRect();if(r.width<1||r.height<1)continue;let o=n,l=o.offsetWidth||r.width,u=r.width/l,d=Pa(i,Ia(n,s)),f=n.localName===`iframe`?n:n.querySelector(`iframe[data-vc-frame]`),p={id:n.getAttribute(`data-vc-surface`)??``,title:n.getAttribute(`data-vc-title`)??f?.title??n.getAttribute(`aria-label`)??``,element:n,origin:{x:r.left+o.clientLeft*u,y:r.top+o.clientTop*u},scale:u,size:{width:o.clientWidth||l,height:o.clientHeight||o.offsetHeight||r.height/u},clip:Pa(d,{left:r.left,top:r.top,right:r.right,bottom:r.bottom}),stage:d,docOrigin:{x:0,y:0},docScale:1,search:{region:{x:0,y:0,width:0,height:0},skip:a},catches:!1,passGestures:!!n.closest(`[data-vc-gestures="host"]`),context:La(n)};if(f){let e=(t.documentOf??wa)(n,f),r=f.getBoundingClientRect(),i=f.offsetWidth?r.width/f.offsetWidth:u;p.doc=e,p.docOrigin={x:r.left+f.clientLeft*i,y:r.top+f.clientTop*i},p.docScale=i,p.search={region:{x:0,y:0,width:f.clientWidth,height:f.clientHeight},skip:a},p.catches=s(f).pointerEvents!==`none`}else p.doc=e,p.search={region:Fa(p.clip),within:n,skip:a};c.push(p)}return c}function wa(e,t){try{let e=t.contentDocument;return!e||e.readyState===`loading`||e.URL===`about:blank`?void 0:e}catch{return}}function Ta(e,t,n,r,i){let a=Xi(t,n,r,i)[0];if(!a||a.closest(`[data-vc-ignore]`))return;let o;for(let t of e)Na(t.clip,n,r)&&(!t.element||t.element===a||t.element.contains(a))&&(!o||o.element&&t.element&&o.element.contains(t.element))&&(o=t);return o}var Ea=(e,t,n)=>({x:e.origin.x+t*e.scale,y:e.origin.y+n*e.scale}),Da=(e,t,n)=>({x:(t-e.origin.x)/e.scale,y:(n-e.origin.y)/e.scale}),Oa=(e,t,n)=>({x:e.docOrigin.x+t*e.docScale,y:e.docOrigin.y+n*e.docScale}),ka=(e,t,n)=>({x:(t-e.docOrigin.x)/e.docScale,y:(n-e.docOrigin.y)/e.docScale});function Aa(e,t){let n=Oa(e,t.x,t.y);return{left:n.x,top:n.y,right:n.x+t.width*e.docScale,bottom:n.y+t.height*e.docScale}}function ja(e,t){let n=Oa(e,t.x,t.y),r=Da(e,n.x,n.y),i=e.docScale/e.scale;return{x:r.x,y:r.y,width:t.width*i,height:t.height*i}}function Ma(e,t){let n=()=>{let n=Ea(e,Math.min(t.x,e.size.width),Math.min(t.y,e.size.height));return{...n,hidden:!Na(e.clip,n.x,n.y)}},{anchor:r}=t;if(!r||!e.doc)return n();let i=$i(e.doc,r);if(!i)return{...n(),hidden:!0};let a=i.getBoundingClientRect(),o=ja(e,{x:a.left,y:a.top,width:a.width,height:a.height}),s=(e,t)=>t>0?e/t:0,c=Ea(e,o.x+xa(s(t.x-r.x,r.width)*o.width,1,o.width-1),o.y+xa(s(t.y-r.y,r.height)*o.height,1,o.height-1)),l=ka(e,c.x,c.y),u=Aa(e,{x:a.left,y:a.top,width:a.width,height:a.height}),d=a.width>0&&a.height>0&&Na(e.clip,c.x,c.y)&&ea(i,l.x,l.y,e.search);return{x:c.x,y:c.y,element:i,box:u,hidden:!d}}function Na(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Pa(e,t){return{left:Math.max(e.left,t.left),top:Math.max(e.top,t.top),right:Math.min(e.right,t.right),bottom:Math.min(e.bottom,t.bottom)}}var Fa=e=>({x:e.left,y:e.top,width:Math.max(0,e.right-e.left),height:Math.max(0,e.bottom-e.top)});function Ia(e,t){let n={left:-1/0,top:-1/0,right:1/0,bottom:1/0},r=e.ownerDocument.body;for(let i=e.parentElement;i&&i!==r;i=i.parentElement){let e=t(i);if(e.overflowX===`visible`&&e.overflowY===`visible`)continue;let r=i.getBoundingClientRect();n=Pa(n,{left:r.left,top:r.top,right:r.right,bottom:r.bottom})}return n}function La(e){let t=e.getAttribute(`data-vc-context`);if(!t)return{};try{let e=JSON.parse(t);return!e||typeof e!=`object`||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`||typeof e==`number`).map(([e,t])=>[e,String(t)]))}catch{return{}}}function Ra(e,t,n,r){let i=Da(e,t,n),a={surface:e.id,x:i.x,y:i.y,point:i};if(r||!e.doc)return a;let o=ka(e,t,n),s=Zi(e.doc,o.x,o.y,14/e.docScale,e.search);if(!s)return a;let c=ja(e,s.box);return{...a,x:xa(i.x,c.x+1,c.x+c.width-1),y:xa(i.y,c.y+1,c.y+c.height-1),target:s,targetBox:c}}var za=class{endpoint;constructor(e){this.endpoint=e.replace(/\/$/,``)}fetch(e,t={}){return fetch(`${this.endpoint}${e}`,{...t,credentials:`same-origin`,cache:`no-store`})}},Ba=class{#e=N(null);get viewer(){return H(this.#e)}set viewer(e){P(this.#e,e,!0)}#t=N(Zt([]));get threads(){return H(this.#t)}set threads(e){P(this.#t,e,!0)}#n=N(``);get spaceName(){return H(this.#n)}set spaceName(e){P(this.#n,e,!0)}#r=N(!0);get loading(){return H(this.#r)}set loading(e){P(this.#r,e,!0)}#i=N(null);get error(){return H(this.#i)}set error(e){P(this.#i,e,!0)}#a=N(Zt(Date.now()));get now(){return H(this.#a)}set now(e){P(this.#a,e,!0)}api;refreshing;queued=!1;listening;nextPending=-1;constructor(e){this.api=e}get unreadCount(){return this.threads.filter(e=>e.unread&&!e.resolvedAt).length}start(){this.refresh();let e=()=>{this.refresh()};window.addEventListener(`focus`,e);let t=setInterval(()=>{this.now=Date.now()},3e4);return()=>{window.removeEventListener(`focus`,e),clearInterval(t),this.stopListening()}}refresh(){return this.refreshing?(this.queued=!0,this.refreshing):(this.refreshing=(async()=>{try{let e=await this.api.fetch(``);if(!e.ok)throw Error();let t=await e.json();this.viewer=t.viewer,this.spaceName=t.space.name;let n=new Map(this.threads.map(e=>[e.id,e.comments.filter(e=>e.pending)]));this.threads=t.threads.map(e=>{let t=n.get(e.id);return t?.length?{...e,comments:[...e.comments,...t]}:e}),this.viewer?this.listen():this.stopListening()}catch{}finally{this.loading=!1,this.refreshing=void 0,this.queued&&(this.queued=!1,this.refresh())}})(),this.refreshing)}stopListening(){this.listening?.abort(),this.listening=void 0}listen(){if(this.listening)return;let e=new AbortController;this.listening=e,(async()=>{let t=!1;for(;!e.signal.aborted&&this.viewer;){try{let n=await this.api.fetch(`/events`,{signal:e.signal});if(!n.ok||!n.body)break;t&&this.refresh(),t=!0;let r=n.body.pipeThrough(new TextDecoderStream).getReader(),i=``;for(;;){let{value:e,done:t}=await r.read();if(t)break;i+=e;let n;for(;(n=i.indexOf(`
1
+ (function(){var e={},t=Symbol(`uninitialized`),n=`http://www.w3.org/1999/xhtml`,r=Array.isArray,i=Array.prototype.indexOf,a=Array.prototype.includes,o=Array.from,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,u=Object.prototype,d=Array.prototype,f=Object.getPrototypeOf,p=Object.isExtensible;function m(e){return typeof e==`function`}var h=()=>{};function g(e){for(var t=0;t<e.length;t++)e[t]()}function _(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var v=1<<24,y=1024,b=2048,x=4096,S=8192,C=16384,w=32768,ee=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,ae=1<<21,oe=1<<22,se=1<<23,ce=Symbol(`$state`),le=Symbol(`component`),ue=Symbol(`legacy props`),de=Symbol(``),fe=Symbol(`attributes`),pe=Symbol(`class`),me=Symbol(`style`),he=Symbol(`text`),ge=Symbol(`form reset`),_e=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ve=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ye(){console.warn(`https://svelte.dev/e/derived_inert`)}function be(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function xe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function Se(e){T=e}var E;function Ce(t){if(t===null)throw be(),e;return E=t}function we(){return Ce(on(E))}function D(t){if(T){if(on(E)!==null)throw be(),e;E=t}}function O(e=1){if(T){for(var t=e,n=E;t--;)n=on(n);E=n}}function Te(e=!0){for(var t=0,n=E;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=on(n);e&&n.remove(),n=i}}function Ee(t){if(!t||t.nodeType!==8)throw be(),e;return t.data}function De(e){return e===this.v}function Oe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function ke(e){return!Oe(e,this.v)}function Ae(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Re(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function ze(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ve(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function He(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function Ue(e,t){return e===null&&Ae(t),e.c??=new Map(He(e)||void 0)}var k=null;function We(e){k=e}function Ge(e){return Ue(k,`getContext`).get(e)}function Ke(e,t){return Ue(k,`setContext`).set(e,t),t}function qe(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:V,l:null}}function Je(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)yn(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,Ye(e)}function Ye(e={}){return s(e,le,{value:!0}),e}function Xe(){return!0}var Ze=[];function Qe(){var e=Ze;Ze=[],g(e)}function $e(e){if(Ze.length===0&&!Et){var t=Ze;queueMicrotask(()=>{t===Ze&&Qe()})}Ze.push(e)}function et(){for(;Ze.length>0;)Qe()}var tt=~(b|x|y);function A(e,t){e.f=e.f&tt|t}function nt(e){e.f&512||e.deps===null?A(e,y):A(e,x)}function rt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),A(e,y)}function it(e){T&&an(e)!==null&&sn(e)}var at=!1;function ot(){at||(at=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ge]?.()})},{capture:!0}))}function st(e){var t=B,n=V;Un(null),Wn(null);try{return e()}finally{Un(t),Wn(n)}}function ct(e,t,n,r=n){e.addEventListener(t,()=>st(n));let i=e[ge];e[ge]=i?()=>{i(),r(!0)}:()=>r(!0),ot()}function lt(e,t,n,r){let i=Xe()?pt:gt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=V,c=ut(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){fn(e,s)}dt()}}var d=ft();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>ht(e))).then(u).catch(e=>fn(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),dt())}):f()}function ut(){var e=V,t=B,n=k,r=M;return function(i=!0){Wn(e),Un(t),We(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function dt(e=!0){Wn(null),Un(null),We(null),e&&M?.deactivate()}function ft(){var e=V,t=e.b,n=M,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function pt(e){var n=2|b;return V!==null&&(V.f|=ne),{ctx:k,deps:null,effects:null,equals:De,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:V,ac:null}}var mt=Symbol(`obsolete`);function ht(e,n,r){let i=V;i===null&&je();var a=void 0,o=Ut(t),s=!B,c=new Set;return Cn(()=>{var t=V,n=_();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==_e&&n.reject(e)}).finally(dt)}catch(e){n.reject(e),dt()}var r=M;if(s){if(t.f&32768)var l=ft();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(mt);else for(let e of c.values())e.reject(mt);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==mt&&(r.activate(),t?(o.f|=se,qt(o,t)):(o.f&8388608&&(o.f^=se),qt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),_n(()=>{for(let e of c)e.reject(mt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function j(e){let t=pt(e);return Kn(t),t}function gt(e){let t=pt(e);return t.equals=ke,t}function _t(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)jn(t[n])}}function vt(e){var n,r=V,i=e.parent;if(!Bn&&i!==null&&e.v!==t&&i.f&24576)return ye(),e.v;Wn(i);try{_t(e),n=ir(e)}finally{Wn(r)}return n}function yt(e){var t=vt(e);!e.equals(t)&&(e.wv=tr(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),Ct?.capture(e,t,!0)),e.deps===null))?A(e,y):Bn||(wt===null?nt(e):(gn()||M?.is_fork)&&wt.set(e,t))}function bt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&st(()=>{t.ac.abort(_e),t.ac=null}),t.fn!==null&&(t.teardown=h),sr(t,0),kn(t))}function xt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&cr(t)}var St=null,M=null,Ct=null,wt=null,Tt=null,Et=!1,Dt=!1,Ot=null,kt=null,At=0,jt=1,Mt=class e{id=jt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){St===null?St=this:(St.#n=this,this.#t=St),St=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)A(r,b),t(r);for(r of n.m)A(r,x),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=y}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),A(e,b),this.schedule(e);for(let e of this.#d)A(e,x),this.schedule(e);this.apply();for(var t=Ot=[],n=[],r=kt=[];this.#c.length>0;){At++>1e3&&(this.#S(),Pt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw zt(e),this.#h()||this.discard(),t}}if(M=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(Ot=null,kt=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Rt(e,t);r.length>0&&M.#_();return}let a=this.#y();if(a)this.#x(n),this.#x(t),a.#b(this);else{this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Ct=this,It(n),It(t),Ct=null,this.#s?.resolve();var o=M;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0){if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this}o!==null&&(Vt.clear(),o.#_())}}#v(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):nr(r)&&(i&16&&this.#d.add(r),cr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),A(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)rt(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),wt?.set(e,n)),this.is_fork||(e.v=n)}activate(){M=this}deactivate(){M=null,wt=null}flush(){try{Dt=!0,M=this,this.#_()}finally{At=0,Tt=null,Ot=null,kt=null,Dt=!1,M=null,wt=null,Vt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(mt);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,$e(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=_()).promise}static ensure(){if(M===null){let t=M=new e;!Dt&&!Et&&$e(()=>{t.#e||t.flush()})}return M}apply(){wt=null}schedule(e){Tt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?St=e:t.#t=e,this.linked=!1}}};function Nt(e){var t=Et,n=Ct;Ct=null,Et=!0;try{var r;for(e&&(Nt(),r=e());;){if(et(),M===null)return r;M.flush()}}finally{Et=t,Ct=n}}function Pt(){try{Ie()}catch(e){fn(e,Tt)}}var Ft=null;function It(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&nr(r)&&(Ft=new Set,cr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Nn(r),Ft?.size>0)){Vt.clear();for(let e of Ft){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ft.has(n)&&(Ft.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||cr(n)}}Ft.clear()}}Ft=null}}function Lt(e){M.schedule(e)}function Rt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),A(e,y);for(var n=e.first;n!==null;)Rt(n,t),n=n.next}}function zt(e){A(e,y);for(var t=e.first;t!==null;)zt(t),t=t.next}var Bt=new Set,Vt=new Map,Ht=!1;function Ut(e,t){return{f:0,v:e,reactions:null,equals:De,rv:0,wv:0}}function N(e,t){let n=Ut(e,t);return Kn(n),n}function Wt(e,t=!1,n=!0){let r=Ut(e);return t||(r.equals=ke),r}function P(e,t,n=!1){return B!==null&&(!Hn||B.f&131072)&&Xe()&&B.f&4325394&&(Gn===null||!Gn.has(e))&&Be(),qt(e,n?Zt(t):t,kt)}var Gt=null,Kt=0;function qt(e,t,n=null){if(!e.equals(t)){Bn?Vt.set(e,t):Vt.has(e)||Vt.set(e,e.v);var r=Mt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&vt(t),wt===null&&nt(t)}e.wv=tr(),Gt=null,Kt=0,Xt(e,b,n),Gt=null,Xe()&&V!==null&&V.f&1024&&!(V.f&96)&&(Yn===null?Xn([e]):Yn.push(e)),!r.is_fork&&Bt.size>0&&!Ht&&Jt()}return t}function Jt(){Ht=!1;for(let e of Bt){e.f&1024&&A(e,x);let t;try{t=nr(e)}catch{t=!0}t&&cr(e)}Bt.clear()}function Yt(e){P(e,e.v+1)}function Xt(e,t,n){var r=e.reactions;if(r!==null){var i=Xe(),a=r.length;if(Kt+=a,Kt>1e5&&Gt===null&&(Gt=new Set),Gt!==null){if(Gt.has(e))return;Gt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==V){var l=(c&b)===0;if(l&&A(s,t),c&131072)Bt.add(s);else if(c&2){var u=s;wt?.delete(u),Xt(u,x,n)}else if(l){var d=s;c&16&&Ft!==null&&Ft.add(d),n===null?Lt(d):n.push(d)}}}}}function Zt(e){if(typeof e!=`object`||!e||ce in e||le in e)return e;let n=f(e);if(n!==u&&n!==d)return e;var i=new Map,a=r(e),o=N(0),s=null,l=$n,p=e=>{if($n===l)return e();var t=B,n=$n;Un(null),er(l);var r=e();return Un(t),er(n),r};return a&&i.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Re();var r=i.get(t);return r===void 0?p(()=>{var e=N(n.value,s);return i.set(t,e),e}):P(r,n.value,!0),!0},deleteProperty(e,n){var r=i.get(n);if(r===void 0){if(n in e){let e=p(()=>N(t,s));i.set(n,e),Yt(o)}}else P(r,t),Yt(o);return!0},get(n,r,a){if(r===ce)return e;var o=i.get(r),l=r in n;if(o===void 0&&(!l||c(n,r)?.writable)&&(o=p(()=>N(Zt(l?n[r]:t),s)),i.set(r,o)),o!==void 0){var u=H(o);return u===t?void 0:u}return Reflect.get(n,r,a)},getOwnPropertyDescriptor(e,n){this.has?.(e,n);var r=Reflect.getOwnPropertyDescriptor(e,n),a=i.get(n);if(a!==void 0){var o=H(a);if(o===t)return;if(r&&`value`in r)r.value=o;else return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,n){if(n===ce)return!0;var r=i.get(n),a=r!==void 0&&r.v!==t||Reflect.has(e,n);return(r!==void 0||V!==null&&(!a||c(e,n)?.writable))&&(r===void 0&&(r=p(()=>N(a?Zt(e[n]):t,s)),i.set(n,r)),H(r)===t)?!1:a},set(e,n,r,l){var u=i.get(n),d=n in e;if(a&&n===`length`)for(var f=r;f<u.v;f+=1){var m=i.get(f+``);m===void 0?f in e&&(m=p(()=>N(t,s)),i.set(f+``,m)):P(m,t)}if(u===void 0)(!d||c(e,n)?.writable)&&(u=p(()=>N(void 0,s)),P(u,Zt(r)),i.set(n,u));else{d=u.v!==t;var h=p(()=>Zt(r));P(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(l,r),!d){if(a&&typeof n==`string`){var _=i.get(`length`),v=Number(n);Number.isInteger(v)&&v>=_.v&&P(_,v+1)}Yt(o)}return!0},ownKeys(e){H(o);var n=Reflect.ownKeys(e).filter(e=>{var n=i.get(e);return n===void 0||n.v!==t});for(var[r,a]of i)a.v!==t&&!(r in e)&&n.push(r);return n},setPrototypeOf(){ze()}})}var Qt,$t,en,tn;function nn(){if(Qt===void 0){Qt=window,$t=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;en=c(t,`firstChild`).get,tn=c(t,`nextSibling`).get,p(e)&&(e[pe]=void 0,e[fe]=null,e[me]=void 0,e.__e=void 0),p(n)&&(n[he]=void 0)}}function rn(e=``){return document.createTextNode(e)}function an(e){return en.call(e)}function on(e){return tn.call(e)}function F(e,t){if(!T)return an(e);var n=an(E);if(n===null)n=E.appendChild(rn());else if(t&&n.nodeType!==3){var r=rn();return n?.before(r),Ce(r),r}return t&&un(n),Ce(n),n}function I(e,t=!1){if(!T){var n=an(e);return n instanceof Comment&&n.data===``?on(n):n}if(t){if(E?.nodeType!==3){var r=rn();return E?.before(r),Ce(r),r}un(E)}return E}function L(e,t=!1){if(!T)return an(e);var n=F(e,t);return D(e),n}function R(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=on(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=rn();return r===null?i?.after(a):r.before(a),Ce(a),a}un(r)}return Ce(r),r}function sn(e){e.textContent=``}function cn(){return!1}function ln(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function un(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function dn(e){var t=V;if(t===null)return B.f|=se,e;if(!(t.f&32768)&&!(t.f&4))throw e;fn(e,t)}function fn(t,n){if(t===e)throw t;if(!(n!==null&&n.f&16384)){for(;n!==null;){if(n.f&128&&!(n.f&33570816)){if(!(n.f&32768))throw t;try{n.b.error(t);return}catch(e){t=e}}n=n.parent}throw t}}function pn(e){V===null&&(B===null&&Fe(e),Pe()),Bn&&Ne(e)}function mn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function hn(e,t){var n=V;n!==null&&n.f&8192&&(e|=S);var r={ctx:k,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)Ot===null?Mt.ensure().schedule(r):Ot.push(r);else if(t!==null){try{cr(r)}catch(e){throw jn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=te))}if(i!==null&&(i.parent=n,n!==null&&mn(i,n),B!==null&&B.f&2&&!(e&64))){var a=B;(a.effects??=[]).push(i)}return r}function gn(){return B!==null&&!Hn}function _n(e){let t=hn(8,null);return A(t,y),t.teardown=e,t}function vn(e){pn(`$effect`);var t=V.f;if(!B&&t&32&&k!==null&&!k.i){var n=k;(n.e??=[]).push(e)}else return yn(e)}function yn(e){return hn(4|re,e)}function bn(e){Mt.ensure();let t=hn(64|ne,e);return()=>{jn(t)}}function xn(e){Mt.ensure();let t=hn(64|ne,e);return(e={})=>new Promise(n=>{e.outro?Pn(t,()=>{jn(t),n(void 0)}):(jn(t),n(void 0))})}function Sn(e){return hn(4,e)}function Cn(e){return hn(oe|ne,e)}function wn(e,t=0){return hn(8|t,e)}function z(e,t=[],n=[],r=[]){lt(r,t,n,t=>{hn(8,()=>{e(...t.map(H))})})}function Tn(e,t=0){return hn(16|t,e)}function En(e,t=0){return hn(v|t,e)}function Dn(e){return hn(32|ne,e)}function On(e){var t=e.teardown;if(t!==null){let n=Bn,r=B;Vn(!0),Un(null);try{t.call(null)}catch(t){fn(t,e.parent)}finally{Vn(n),Un(r)}}}function kn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&st(()=>{e.abort(_e)});var r=n.next;n.f&64?n.parent=null:jn(n,t),n=r}}function An(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||jn(t),t=n}}function jn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Mn(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,kn(e,t&&!n),sr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();On(e),e.f^=ee,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&Nn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mn(e,t){for(;e!==null;){var n=e===t?null:on(e);e.remove(),e=n}}function Nn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Pn(e,t,n=!0){var r=[];e.f|=256,Fn(e,r,!0);var i=()=>{n&&jn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Fn(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Fn(i,t,o?n:!1)}i=a}}}function In(e){e.f&=-257,Ln(e,!0)}function Ln(e,t){if(!(e.f&256)&&e.f&8192){e.f^=S,e.f&1024||(A(e,b),Mt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Ln(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Rn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:on(n);t.append(n),n=i}}var zn=null,Bn=!1;function Vn(e){Bn=e}var B=null,Hn=!1;function Un(e){B=e}var V=null;function Wn(e){V=e}var Gn=null;function Kn(e){B!==null&&(B.f&2097152||B.f&2)&&(Gn??=new Set).add(e)}var qn=null,Jn=0,Yn=null;function Xn(e){Yn=e}var Zn=1,Qn=0,$n=Qn;function er(e){$n=e}function tr(){return++Zn}function nr(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(nr(a)&&yt(a),a.wv>e.wv)return!0}t&512&&wt===null&&A(e,y)}return!1}function rr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Gn!==null&&Gn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?rr(a,t,!1):t===a&&(n?A(a,b):a.f&1024&&A(a,x),Lt(a))}}function ir(e){var t=qn,n=Jn,r=Yn,i=B,a=Gn,o=k,s=Hn,c=$n,l=e.f;qn=null,Jn=0,Yn=null,B=l&96?null:e,Gn=null,We(e.ctx),Hn=!1,$n=++Qn,e.ac!==null&&(st(()=>{e.ac.abort(_e)}),e.ac=null);try{e.f|=ae;var u=e.fn,d=u();e.f|=w;var f=ar(e);if(Xe()&&Yn!==null&&!Hn&&f!==null&&!(e.f&6146))for(var p=0;p<Yn.length;p++)rr(Yn[p],e);if(i!==null&&i!==e){if(Qn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Qn;if(t!==null)for(let e of t)e.rv=Qn;Yn!==null&&(r===null?r=Yn:r.push(...Yn))}return e.f&8388608&&(e.f^=se),d}catch(t){return ar(e),dn(t)}finally{e.f^=ae,qn=t,Jn=n,Yn=r,B=i,Gn=a,We(o),Hn=s,$n=c}}function ar(e){var t=e.deps,n=M?.is_fork;if(qn!==null){var r;if(n||sr(e,Jn),t!==null&&Jn>0)for(t.length=Jn+qn.length,r=0;r<qn.length;r++)t[Jn+r]=qn[r];else e.deps=t=qn;if(gn()&&e.f&512)for(r=Jn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Jn<t.length&&(sr(e,Jn),t.length=Jn);return t}function or(e,n){let r=n.reactions;if(r!==null){var o=i.call(r,e);if(o!==-1){var s=r.length-1;s===0?r=n.reactions=null:(r[o]=r[s],r.pop())}}if(r===null&&n.f&2&&(qn===null||!a.call(qn,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&nt(c),c.ac!==null&&st(()=>{c.ac.abort(_e),c.ac=null,A(c,b)}),bt(c),sr(c,0)}}function sr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)or(e,n[r])}function cr(e){var t=e.f;if(!(t&16384)){A(e,y);var n=V;V=e;try{t&16777232?An(e):kn(e),On(e);var r=ir(e);e.teardown=typeof r==`function`?r:null,e.wv=Zn}finally{V=n}}}async function lr(){await Promise.resolve(),Nt()}function H(e){var t=!!(e.f&2);if(zn?.add(e),B!==null&&!Hn&&!(V!==null&&V.f&16384)&&(Gn===null||!Gn.has(e))){var n=B.deps;if(B.f&2097152)e.rv<Qn&&(e.rv=Qn,qn===null&&n!==null&&n[Jn]===e?Jn++:qn===null?qn=[e]:qn.push(e));else{B.deps??=[],a.call(B.deps,e)||B.deps.push(e);var r=e.reactions;r===null?e.reactions=[B]:a.call(r,B)||r.push(B)}}if(Bn&&Vt.has(e))return Vt.get(e);if(t){var i=e;if(Bn){var o=i.v;return(!(i.f&1024)&&i.reactions!==null||dr(i))&&(o=vt(i)),Vt.set(i,o),o}var s=!(i.f&512)&&!Hn&&B!==null&&!!(B.f&512),c=(i.f&w)===0;nr(i)&&(s&&(i.f|=512),yt(i)),s&&!c&&(xt(i),ur(i))}if(wt?.has(e))return wt.get(e);if(e.f&8388608)throw e.v;return e.v}function ur(e){if(e.f|=512,e.deps!==null)for(let n of e.deps){var t=n.reactions;t===null?n.reactions=[e]:a.call(t,e)||t.push(e),n.f&2&&!(n.f&512)&&(xt(n),ur(n))}}function dr(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Vt.has(t)||t.f&2&&dr(t))return!0;return!1}function fr(e){var t=Hn;try{return Hn=!0,e()}finally{Hn=t}}var pr=Symbol(`events`),mr=new Set,hr=new Set;function gr(e){if(!T)return;e.removeAttribute(`onload`),e.removeAttribute(`onerror`);let t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function _r(e,t,n,r={}){function i(e){if(r.capture||Sr.call(t,e),!e.cancelBubble)return st(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,$e(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function vr(e,t,n,r,i){var a={capture:r,passive:i},o=_r(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&_n(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function U(e,t,n){(t[pr]??={})[e]=n}function yr(e){for(var t=0;t<e.length;t++)mr.add(e[t]);for(var n of hr)n(e)}var br=null,xr=!1;function Sr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;br=e,xr||(xr=!0,setTimeout(()=>{xr=!1,br=null}));var o=0,c=br===e&&e[pr];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[pr]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(a=i[o]||e.target,a!==t){s(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=B,f=V;Un(null),Wn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[pr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[pr]=t,delete e.currentTarget,Un(d),Wn(f)}}}var Cr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function wr(e){return Cr?.createHTML(e)??e}function Tr(e){var t=ln(`template`);return t.innerHTML=wr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Er(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(T)return Er(E,null),E;i===void 0&&(i=Tr(a?e:`<!>`+e),n||(i=an(i)));var t=r||$t?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=an(t),s=t.lastChild;Er(o,s)}else Er(t,t);return t}}function Dr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return Er(E,null),E;if(!o){var e=an(Tr(a));if(i)for(o=document.createDocumentFragment();an(e);)o.appendChild(an(e));else o=an(e)}var t=o.cloneNode(!0);if(i){var n=an(t),r=t.lastChild;Er(n,r)}else Er(t,t);return t}}function Or(e,t){return Dr(e,t,`svg`)}function G(e=``){if(!T){var t=rn(e+``);return Er(t,t),t}var n=E;return n.nodeType===3?un(n):(n.before(n=rn()),Ce(n)),Er(n,n),n}function kr(){if(T)return Er(E,null),E;var e=document.createDocumentFragment(),t=document.createComment(``),n=rn();return e.append(t,n),Er(t,n),e}function K(e,t){if(T){var n=V;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),we()}else e!==null&&e.before(t)}function Ar(){if(T&&E&&E.nodeType===8&&E.textContent?.startsWith(`$`)){let e=E.textContent.substring(1);return we(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var jr=[`touchstart`,`touchmove`];function Mr(e){return jr.includes(e)}function Nr(e){let t=0,n=Ut(0),r;return()=>{gn()&&(H(n),wn(()=>(t===0&&(r=fr(()=>e(()=>Yt(n)))),t+=1,()=>{$e(()=>{--t,t===0&&(r?.(),r=void 0,Yt(n))})})))}}var Pr=te|ne;function Fr(e,t,n,r){new Ir(e,t,n,r)}var Ir=class{parent;is_pending=!1;transform_error;#e;#t=T?E:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Nr(()=>(this.#m=Ut(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=V;t.b=this,t.f|=128,n(e)},this.parent=V.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Tn(()=>{if(T){let e=Ee(this.#t);we();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#_(t)}else t?this.#b():this.#g()}else this.#x()},Pr),T&&(this.#e=E)}#g(){try{this.#a=Dn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);$e(r),t&&(this.#s=Dn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{this.#y()||(t?xe():(t=!0,n&&Ve(),this.#s!==null&&Pn(this.#s,()=>{this.#s=null}),this.#C(()=>{this.#x()})))};return{reset:r,invoke_onerror:()=>{if(!this.#y())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){fn(e,this.#i&&this.#i.parent)}}}}#y(){return(this.#i.f&(C|ee))!==0}#b(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Dn(()=>e(this.#e)),$e(()=>{if(!this.#y()){var e=this.#c=document.createDocumentFragment(),t=rn(),n=!1;e.append(t),this.#a=this.#C(()=>{try{return Dn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){fn(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#S(M)):this.#u===0&&(this.#e.before(e),this.#c=null,Pn(this.#o,()=>{this.#o=null}),this.#S(M))}}))}#x(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Dn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Rn(this.#a,e);let t=this.#n.pending;this.#o=Dn(()=>t(this.#e))}else this.#S(M)}catch(e){this.error(e)}}#S(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){rt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#C(e){var t=V,n=B,r=k;Wn(this.#i),Un(this.#i),We(this.#i.ctx);try{return Mt.ensure(),e()}finally{Wn(t),Un(n),We(r)}}#w(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#S(t),this.#o&&Pn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#w(e,t)}update_pending_count(e,t){this.#w(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,$e(()=>{this.#d=!1,this.#m&&qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(t){if(t===e||!this.#n.onerror&&!this.#n.failed)throw t;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.oncommit(()=>{this.#y()||this.#T(t)})):this.#T(t)}#T(e){this.#a&&=(jn(this.#a),null),this.#o&&=(jn(this.#o),null),this.#s&&=(jn(this.#s),null),T&&(Ce(this.#t),O(),Ce(Te()));let t=this.#n.failed,n=e=>{if(this.#y())return;let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&!this.#y()&&(this.#s=this.#C(()=>{try{return Dn(()=>{var r=V;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return fn(e,this.#i.parent),null}}))};$e(()=>{if(!this.#y()){var t;try{t=this.transform_error(e)}catch(e){fn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>fn(e,this.#i&&this.#i.parent)):n(t)}})}},Lr=!0;function q(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[he]??=e.nodeValue)&&(e[he]=n,e.nodeValue=`${n}`)}function Rr(e,t){return Br(e,t)}var zr=new Map;function Br(t,{target:n,anchor:r,props:i={},events:a,context:s,intro:c=!0,transformError:l}){nn();var u=void 0,d=xn(()=>{var d=r??n.appendChild(rn());Fr(d,{pending:()=>{}},n=>{qe({});var r=k;if(s&&(r.c=s),a&&(i.$$events=a),T&&Er(n,null),Lr=c,u=t(n,i)||Ye(),Lr=!0,T&&(V.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw be(),e;Je()},l);var f=new Set,p=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!f.has(r)){f.add(r);var i=Mr(r);for(let e of[n,document]){var a=zr.get(e);a===void 0&&(a=new Map,zr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Sr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return p(o(mr)),hr.add(p),()=>{for(var e of f)for(let r of[n,document]){var t=zr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,Sr),t.delete(e),t.size===0&&zr.delete(r)):t.set(e,i)}hr.delete(p),d!==r&&d.parentNode?.removeChild(d)}});return Vr.set(u,d),u}var Vr=new WeakMap;function Hr(e,t){let n=Vr.get(e);return n?(Vr.delete(e),n(t)):Promise.resolve()}var Ur=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)In(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(In(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(jn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Rn(r,t),t.append(rn()),this.#n.set(e,{effect:r,fragment:t})}else jn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Pn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(jn(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=cn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=rn();i.append(a),this.#n.set(e,{effect:Dn(()=>t(a)),fragment:i})}else this.#t.set(e,Dn(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else T&&(this.anchor=E),this.#a(n)}};function Wr(e,t,...n){var r=new Ur(e);Tn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},te)}function Gr(e){k===null&&Ae(`onMount`),vn(()=>{let t=fr(e);if(typeof t==`function`)return t})}function Kr(e){k===null&&Ae(`onDestroy`),Gr(()=>()=>fr(e))}function J(e,t,n=!1){var r;T&&(r=E,we());var i=new Ur(e),a=n?te:0;function o(e,t){if(T){var n=Ee(r);if(e!==parseInt(n.substring(1))){var a=Te();Ce(a),i.anchor=a,Se(!1),i.ensure(e,t),Se(!0);return}}i.ensure(e,t)}Tn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var qr=Symbol(`NaN`);function Jr(e,t,n){T&&we();var r=new Ur(e),i=!Xe();Tn(()=>{var e=t();e!==e&&(e=qr),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Yr(e,t,n){for(var r=[],i=t.length,a,s=t.length,c=0;c<i;c++){let n=t[c];Pn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Xr(e,o(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;sn(d),d.append(u),e.items.clear()}Xr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Xr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ie,Rn(a,document.createDocumentFragment())):jn(t[i],n)}}var Zr;function Qr(e,t,n,i,a,s=null){var c=e,l=new Map;if(t&4){var u=e;c=T?Ce(an(u)):u.appendChild(rn())}T&&we();var d=null,f=gt(()=>{var e=n();return r(e)?e:e==null?[]:o(e)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var n=H(f);_.fallback=d,ei(_,n,c,t,i),d!==null&&(n.length===0?d.f&33554432?(d.f^=ie,ni(d,null,c)):In(d):Pn(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:Tn(()=>{var e=H(f),r=e.length;let o=!1;T&&Ee(c)===`[!`!=(r===0)&&(c=Te(),Ce(c),Se(!1),o=!0);for(var u=new Set,_=M,v=cn(),y=0;y<r;y+=1){T&&E.nodeType===8&&E.data===`]`&&(c=E,o=!0,Se(!1));var b=e[y],x=i(b,y),S=m?null:l.get(x);S?(S.v&&qt(S.v,b),S.i&&qt(S.i,y),v&&_.unskip_effect(S.e)):(S=ti(l,m?c:Zr??=rn(),b,x,y,a,t,n),m||(S.e.f|=ie),l.set(x,S)),u.add(x)}if(r===0&&s&&!d&&(m?d=Dn(()=>s(c)):(d=Dn(()=>s(Zr??=rn())),d.f|=ie)),r>u.size&&Me(``,``,``),T&&r>0&&Ce(Te()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}o&&Se(!0),H(f)}),flags:t,items:l,pending:p,outrogroups:null,fallback:d};m=!1,T&&(c=E)}function $r(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function ei(e,t,n,r,i){var a=!!(r&8),s=t.length,c=e.items,l=$r(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<s;v+=1)h=t[v],g=i(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=i(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(In(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=ie,_===l)ni(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),ri(e,d,_),ri(e,_,y),ni(_,y,n),d=_,p=[],m=[],l=$r(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)ni(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);ri(e,S.prev,C.next),ri(e,d,S),ri(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),ni(_,l,n),ri(e,_.prev,_.next),ri(e,_,d===null?e.effect.first:d.next),ri(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=$r(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=$r(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Xr(e,o(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=$r(l.next);var ee=w.length;if(ee>0){var te=r&4&&s===0?n:null;if(a){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}Yr(e,w,te)}}a&&$e(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function ti(e,t,n,r,i,a,o,s){var c=o&1?o&16?Ut(n):Wt(n,!1,!1):null,l=o&2?Ut(i):null;return{v:c,i:l,e:Dn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function ni(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=on(r);if(a.before(r),r===i)return;r=o}}function ri(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}var ii=()=>performance.now(),ai={tick:e=>requestAnimationFrame(e),now:()=>ii(),tasks:new Set};function oi(){let e=ai.now();ai.tasks.forEach(t=>{t.c(e)||(ai.tasks.delete(t),t.f())}),ai.tasks.size!==0&&ai.tick(oi)}function si(e){let t;return ai.tasks.size===0&&ai.tick(oi),{promise:new Promise(n=>{ai.tasks.add(t={c:e,f:n})}),abort(){ai.tasks.delete(t)}}}function ci(e,t){st(()=>{e.dispatchEvent(new CustomEvent(t))})}function li(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function ui(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=li(n.trim());t[i]=r.trim()}return t}var di=e=>e;function fi(e,t,n,r){var i=!!(e&1),a=!!(e&2),o=i&&a,s=!!(e&4),c=o?`both`:i?`in`:`out`,l,u=t.inert,d=t.style.overflow,f,p;function m(){return st(()=>l??=n()(t,r?.()??{},{direction:c}))}var h={is_global:s,in(){t.inert=u,i?(a||f?.abort(),f=pi(t,m(),p,1,()=>{ci(t,`introstart`)},()=>{ci(t,`introend`),f?.abort(),f=l=void 0,t.style.overflow=d})):(p?.abort(),p?.reset?.())},out(e){a?(t.inert=!0,p=pi(t,m(),f,0,()=>{ci(t,`outrostart`)},()=>{ci(t,`outroend`),e?.()})):(e?.(),l=void 0)},stop:()=>{f?.abort(),p?.abort()}},g=V;if((g.nodes.t??=[]).push(h),i&&Lr){var _=s;if(!_){for(var v=g.parent;v&&v.f&65536;)for(;(v=v.parent)&&!(v.f&16););_=!v||!!(v.f&32768)}_&&Sn(()=>{fr(()=>h.in())})}}function pi(e,t,n,r,i,a){var o=r===1,s=!1;if(m(t)){var c;return $e(()=>{s||(c=pi(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{s=!0,c?.abort()},deactivate:()=>c?.deactivate(),reset:()=>c?.reset(),t:()=>c?.t()??1-r}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:h,deactivate:h,reset:h,t:()=>r};let{delay:l=0,css:u,tick:d,easing:f=di}=t;var p,g=()=>1-r;return $e(()=>{if(!s){var c=[];if(o&&n===void 0&&(d&&d(0,1),u)){var m=ui(u(0,1));c.push(m,m)}p=e.animate(c,{duration:l,fill:`forwards`}),p.onfinish=()=>{p.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var m=!1;if(u)for(var h=Math.ceil(c/(1e3/60)),_=0;_<=h;_+=1){var v=o+s*f(_/h),y=ui(u(v,1-v));l.push(y),m||=y.overflow===`hidden`}m&&(e.style.overflow=`hidden`),g=()=>{var e=p.currentTime;return o+s*f(e/c)},d&&si(()=>{if(p.playState!==`running`)return!1;var e=g();return d(e,1-e),!0})}p=e.animate(l,{duration:c,fill:`forwards`}),p.onfinish=()=>{g=()=>r,d?.(r,1-r),a()}}}}),{abort:()=>{s=!0,p&&(p.cancel(),p.effect=null,p.onfinish=h)},deactivate:()=>{a=h},reset:()=>{r===0&&d?.(1,0)},t:()=>g()}}function mi(e,t){Sn(()=>{e=V?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=ln(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function hi(e,t){var n=void 0,r;En(()=>{n!==(n=t())&&(r&&=(jn(r),null),n&&(r=Dn(()=>{Sn(()=>n(e))})))})}function gi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function _i(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gi(e))&&(r&&(r+=` `),r+=t);return r}function Y(e){return typeof e==`object`?_i(e):e??``}var vi=[...`
2
+ \r\f\xA0\v`];function yi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||vi.includes(r[o-1]))&&(s===r.length||vi.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function bi(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function xi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Si(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(xi)),i&&c.push(...Object.keys(i).map(xi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=xi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=bi(r)),i&&(n+=bi(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function X(e,t,n,r,i,a){var o=e[pe];if(T||o!==n||o===void 0){var s=yi(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[pe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Ci(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function wi(e,t,n,r){var i=e[me];if(T||i!==t){var a=Si(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[me]=t}else r&&(Array.isArray(r)?(Ci(e,n?.[0],r[0]),Ci(e,n?.[1],r[1],`important`)):Ci(e,n,r));return r}var Ti=Symbol(`is custom element`),Ei=Symbol(`is html`),Di=ve?`link`:`LINK`;function Oi(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Z(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Z(e,`checked`,null),e.checked=r}}};e[ge]=n,$e(n),ot()}}function Z(e,t,n,r){var i=ki(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Di)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[de]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ji(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ki(e){return e[fe]??={[Ti]:e.nodeName.includes(`-`),[Ei]:e.namespaceURI===n}}var Ai=new Map;function ji(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ai.get(t);if(n)return n;Ai.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=l(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=f(i)}return n}function Mi(e,t,n=t){var r=new WeakSet;ct(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Ni(e)?Pi(a):a,n(a),M!==null&&r.add(M),await lr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(T&&e.defaultValue!==e.value||fr(t)==null&&e.value)&&(n(Ni(e)?Pi(e.value):e.value),M!==null&&r.add(M)),wn(()=>{var n=t();if(e===document.activeElement){var i=M;if(r.has(i))return}Ni(e)&&n===Pi(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function Ni(e){var t=e.type;return t===`number`||t===`range`}function Pi(e){return e===``?null:+e}var Fi=new class e{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(e){this.#n=e}observe(e,t){var n=this.#e.get(e)||new Set;return n.add(t),this.#e.set(e,n),this.#r().observe(e,this.#n),()=>{var n=this.#e.get(e);n.delete(t),n.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#r(){return this.#t??=new ResizeObserver(t=>{for(var n of t){e.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}})}}({box:`border-box`});function Ii(e,t,n){var r=Fi.observe(e,()=>n(e[t]));Sn(()=>(fr(()=>n(e[t])),r))}function Li(e,t){return e===t||e?.[ce]===t}function Ri(e=Ye(),t,n,r){var i=k.r,a=V;return Sn(()=>{var o,s;return wn(()=>{o=s,s=r?.()||[],fr(()=>{Li(n(...s),e)||(t(e,...s),o&&Li(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Li(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var zi=!1;function Bi(e){var t=zi;try{return zi=!1,[e(),zi]}finally{zi=t}}function Q(e,t,n,r){var i=!0,a=!!(n&8),o=!!(n&16),s=r,l=!0,u=void 0,d=()=>o&&i?(u??=pt(r),H(u)):(l&&(l=!1,s=o?fr(r):r),s);let f;if(a){var p=ce in e||ue in e;f=c(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=Bi(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Le(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?pt:gt)(()=>(v=!1,g()));a&&H(y);var b=V;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&a?Zt(e):e;return P(y,n),v=!0,s!==void 0&&(s=n),e}return Bn&&v||b.f&16384?y.v:H(y)})}var Vi=.6,Hi={width:480,height:56},Ui=`[data-vc-target],[data-pf-comment]`,Wi=`a[href],button,input,select,textarea,label,summary,[contenteditable],[tabindex]:not([tabindex="-1"]),[role=button],[role=link],[role=tab],[role=menuitem],[role=checkbox],[role=switch],[role=option],[data-vc-interactive],[data-pf-link],[data-pf-interactive]`,Gi=`img,svg,canvas,video,picture,iframe`,Ki=`h1,h2,h3,h4,h5,h6,p,li,td,th,dt,dd,blockquote,pre,figcaption,caption,legend`,qi=`section,article,aside,nav,header,footer,form,table,tr,fieldset,dialog,figure,ul,ol,[role=region],[role=dialog],[role=row],[role=grid],[role=table],[role=tablist],[role=listitem],[role=cell],[role=gridcell],[role=columnheader]`,Ji=`http://www.w3.org/2000/svg`,Yi=/^transparent$|,\s*0\)$|\/\s*0\)$/;function Xi(e,t,n,r){return e.elementsFromPoint(t,n).filter(e=>!r(e))}function Zi(e,t,n,r,i){let a=new aa(e,i),{region:o}=i,s=new Map;for(let[c,l]of va(r)){let r=t+c,u=n+l;if(!(r<o.x||u<o.y||r>=o.x+o.width||u>=o.y+o.height))for(let t of Xi(e,r,u,i.skip)){let e=a.target(t);e&&!s.has(e)&&s.set(e,a.box(e))}}let c;for(let[e,r]of s)ya(r,t,n)===0&&(!c||ba(r)<ba(c.box))&&(c={element:e,box:r});let l;for(let[e,i]of s){let a=ya(i,t,n);a===0||a>r||(!c||ba(i)<ba(c.box)&&c.element.contains(e))&&(!l||a<l.gap||a===l.gap&&ba(i)<ba(l.box))&&(l={element:e,box:i,gap:a})}let u=l??c;return u&&a.describe(u.element,u.box)}function Qi(e,t){if(!e.element.ownerDocument.defaultView)return;let n=new aa(e.element.ownerDocument,t);for(let r=e.element.parentElement;r&&(!t.within||t.within.contains(r));r=r.parentElement){if(!n.candidate(r))continue;let t=n.box(r);if(ba(t)>ba(e.box)*1.02)return n.describe(r,t)}}function $i(e,t){let n=null;try{n=e.querySelector(t.selector)}catch{return}if(!n)return;let r=ma(t.text).replace(/…$/,``).slice(0,40);return!r||ma(pa(n)).startsWith(r)?n:void 0}function ea(e,t,n,r){let{region:i}=r;if(t<i.x||n<i.y||t>=i.x+i.width||n>=i.y+i.height||ra(e,t,n))return!1;let a=Xi(e.ownerDocument,t,n,r.skip)[0];return!!(a&&(a===e||e.contains(a)||a.contains(e)))}function ta(e){let t=e.ownerDocument.defaultView;if(!t)return;for(let n=e.parentElement;n;n=n.parentElement){let r=t.getComputedStyle(n);if(!/auto|scroll/.test(r.overflowX+r.overflowY)||n===e.ownerDocument.body)continue;let i=n.getBoundingClientRect(),a=e.getBoundingClientRect();(a.top<i.top||a.bottom>i.bottom)&&(n.scrollTop+=a.top-i.top-(i.height-a.height)/2),(a.left<i.left||a.right>i.right)&&(n.scrollLeft+=a.left-i.left-(i.width-a.width)/2)}let n=e.getBoundingClientRect();(n.top<0||n.bottom>t.innerHeight)&&t.scrollBy(0,n.top-(t.innerHeight-n.height)/2)}function na(e,t,n){let r=e?.ownerDocument.defaultView;if(r)for(let i=e;i;i=i.parentElement){let e=r.getComputedStyle(i),a=i===i.ownerDocument.scrollingElement,o=(a||/auto|scroll/.test(e.overflowY))&&i.scrollHeight>i.clientHeight&&(n<0?i.scrollTop>0:i.scrollTop+i.clientHeight<i.scrollHeight-1),s=(a||/auto|scroll/.test(e.overflowX))&&i.scrollWidth>i.clientWidth&&(t<0?i.scrollLeft>0:i.scrollLeft+i.clientWidth<i.scrollWidth-1);if(n&&o||t&&s)return i}}function ra(e,t,n){let r=e.ownerDocument.defaultView;for(let i=e.parentElement;i&&i!==e.ownerDocument.body;i=i.parentElement){let e=r.getComputedStyle(i);if(e.overflowX===`visible`&&e.overflowY===`visible`)continue;let a=i.getBoundingClientRect();if(t<a.left||t>a.right||n<a.top||n>a.bottom)return!0}return!1}function ia(e){return{selector:fa(e.element),label:e.label,text:Sa(pa(e.element),300)}}var aa=class{view;search;ranks=new Map;constructor(e,t){this.view=e.defaultView,this.search=t}box(e){let t=e.getBoundingClientRect(),{region:n}=this.search,r=Math.max(t.left,n.x),i=Math.max(t.top,n.y);return{x:r,y:i,width:Math.max(Math.min(t.right,n.x+n.width)-r,0),height:Math.max(Math.min(t.bottom,n.y+n.height)-i,0)}}rank(e){let t=this.ranks.get(e);return t===void 0&&(t=this.measure(e),this.ranks.set(e,t)),t}measure(e){let t=e.localName;if(t===`html`||t===`body`||t===`head`)return 0;let{within:n,region:r,skip:i}=this.search;if(n&&(e===n||!n.contains(e))||i(e)||e.namespaceURI===Ji&&(t!==`svg`||e.parentElement?.closest(`svg`)))return 0;let a=e.getBoundingClientRect();if(a.width<2||a.height<2)return 0;let o=this.view.getComputedStyle(e);return o.visibility!==`visible`||o.opacity===`0`?0:e.matches(Ui)?5:a.width*a.height>r.width*r.height*Vi?0:e.matches(Wi)||e.matches(Gi)?4:e.matches(Ki)||ha(e)?3:e.matches(qi)||ga(o)?2:0}candidate(e){return this.rank(e)>0}target(e){let t=e;for(;t&&!this.candidate(t);)t=t.parentElement;if(!t)return;let n=t.parentElement?.closest(Wi);if(n&&this.candidate(n)){let e=n.getBoundingClientRect();e.width<=Hi.width&&e.height<=Hi.height&&(t=n)}for(let e=t.parentElement;e&&_a(e,t)&&!(this.rank(e)<this.rank(t));e=e.parentElement)t=e;return t}describe(e,t){let n=parseFloat(this.view.getComputedStyle(e).borderTopLeftRadius)||0;return{element:e,box:t,radius:Math.min(n,t.width/2,t.height/2),label:oa(e)}}};function oa(e){let t=e.getAttribute(`data-vc-target`)||e.getAttribute(`data-pf-comment`)||e.getAttribute(`aria-label`)||e.getAttribute(`alt`)||e.getAttribute(`title`)||e.getAttribute(`placeholder`)||pa(e)||e.querySelector(`input,textarea,select`)?.getAttribute(`placeholder`)||e.querySelector(`input,textarea,select`)?.getAttribute(`aria-label`),n=t?`${da(e)} “${Sa(t,60)}”`:da(e),r=sa(e);return r?`${n} in “${Sa(r,40)}”`:n}function sa(e){if(e.localName!==`td`)return;let t=[...e.parentElement?.children??[]].indexOf(e),n=e.closest(`table`)?.querySelector(`thead tr`)?.children[t];return n&&pa(n)||void 0}var ca={button:`button`,link:`link`,tab:`tab`,menuitem:`menu item`,checkbox:`checkbox`,switch:`switch`,option:`option`,row:`row`,cell:`cell`,gridcell:`cell`,columnheader:`column header`,listitem:`list item`,region:`region`,dialog:`dialog`,tablist:`tabs`,grid:`table`,table:`table`,img:`image`},la={a:`link`,button:`button`,select:`menu`,textarea:`field`,label:`label`,summary:`button`,img:`image`,picture:`image`,svg:`graphic`,canvas:`graphic`,video:`video`,iframe:`embed`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,p:`text`,li:`list item`,td:`cell`,th:`column header`,tr:`row`,table:`table`,ul:`list`,ol:`list`,nav:`navigation`,header:`header`,footer:`footer`,aside:`sidebar`,section:`section`,article:`article`,form:`form`,dialog:`dialog`,figure:`figure`,blockquote:`quote`,pre:`code`,caption:`caption`,figcaption:`caption`,legend:`legend`},ua=new Set([`tr`,`td`,`th`,`li`]);function da(e){if(ua.has(e.localName))return la[e.localName];let t=ca[e.getAttribute(`role`)??``];if(t)return t;if(e.localName===`input`){let t=e.getAttribute(`type`)??`text`;return t===`checkbox`||t===`radio`?t:t===`button`||t===`submit`?`button`:`field`}return la[e.localName]??(ha(e)?`text`:`box`)}function fa(e){let t=[];for(let n=e;n&&n.localName!==`html`;n=n.parentElement){if(n.id){t.unshift(`#${CSS.escape(n.id)}`);break}let e=[`data-vc-target`,`data-testid`].find(e=>n.hasAttribute(e));if(e){let r=`[${e}="${CSS.escape(n.getAttribute(e))}"]`;if(n.ownerDocument.querySelectorAll(r).length===1){t.unshift(r);break}}let r=n.localName,i=n.parentElement?[...n.parentElement.children].filter(e=>e.localName===n.localName):[];i.length>1&&(r+=`:nth-of-type(${i.indexOf(n)+1})`),t.unshift(r)}return t.join(` > `)}function pa(e){return(e.innerText??e.textContent??``).replace(/\s+/g,` `).trim()}var ma=e=>e.replace(/\s+/g,` `).trim().toLowerCase();function ha(e){for(let t of e.childNodes)if(t.nodeType===3&&t.textContent?.trim())return!0;return!1}function ga(e){return!Yi.test(e.backgroundColor)||e.backgroundImage!==`none`||e.boxShadow!==`none`||[`Top`,`Right`,`Bottom`,`Left`].some(t=>parseFloat(e[`border${t}Width`])>0&&!Yi.test(e[`border${t}Color`]))}function _a(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return Math.abs(n.left-r.left)<1&&Math.abs(n.top-r.top)<1&&Math.abs(n.right-r.right)<1&&Math.abs(n.bottom-r.bottom)<1}function va(e){let t=[[0,0]];for(let[n,r]of[[e/2,4],[e,8]])for(let e=0;e<r;e++){let i=e/r*Math.PI*2+(r===4?Math.PI/4:0);t.push([Math.cos(i)*n,Math.sin(i)*n])}return t}function ya(e,t,n){let r=Math.max(e.x-t,0,t-(e.x+e.width)),i=Math.max(e.y-n,0,n-(e.y+e.height));return Math.hypot(r,i)}var ba=e=>e.width*e.height,xa=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n)),Sa=(e,t)=>e.length>t?`${e.slice(0,t-1)}…`:e;function Ca(e,t){let n=e.defaultView,r=[...e.querySelectorAll(`[data-vc-surface]`)],i={left:0,top:0,right:e.documentElement.clientWidth,bottom:e.documentElement.clientHeight},a=e=>t.ours(e)||!!e.closest(`[data-vc-ignore]`);if(!r.length){let t=e.scrollingElement??e.documentElement;return[{id:``,title:e.title,element:null,doc:e,origin:{x:-n.scrollX,y:-n.scrollY},scale:1,size:{width:t.scrollWidth,height:t.scrollHeight},clip:i,stage:i,docOrigin:{x:0,y:0},docScale:1,search:{region:Fa(i),skip:a},catches:!1,passGestures:!1,context:{}}]}let o=new Map,s=e=>{let t=o.get(e);return t||o.set(e,t=n.getComputedStyle(e)),t},c=[];for(let n of r){let r=n.getBoundingClientRect();if(r.width<1||r.height<1)continue;let o=n,l=o.offsetWidth||r.width,u=r.width/l,d=Pa(i,Ia(n,s)),f=n.localName===`iframe`?n:n.querySelector(`iframe[data-vc-frame]`),p={id:n.getAttribute(`data-vc-surface`)??``,title:n.getAttribute(`data-vc-title`)??f?.title??n.getAttribute(`aria-label`)??``,element:n,origin:{x:r.left+o.clientLeft*u,y:r.top+o.clientTop*u},scale:u,size:{width:o.clientWidth||l,height:o.clientHeight||o.offsetHeight||r.height/u},clip:Pa(d,{left:r.left,top:r.top,right:r.right,bottom:r.bottom}),stage:d,docOrigin:{x:0,y:0},docScale:1,search:{region:{x:0,y:0,width:0,height:0},skip:a},catches:!1,passGestures:!!n.closest(`[data-vc-gestures="host"]`),context:La(n)};if(f){let e=(t.documentOf??wa)(n,f),r=f.getBoundingClientRect(),i=f.offsetWidth?r.width/f.offsetWidth:u;p.doc=e,p.docOrigin={x:r.left+f.clientLeft*i,y:r.top+f.clientTop*i},p.docScale=i,p.search={region:{x:0,y:0,width:f.clientWidth,height:f.clientHeight},skip:a},p.catches=s(f).pointerEvents!==`none`}else p.doc=e,p.search={region:Fa(p.clip),within:n,skip:a};c.push(p)}return c}function wa(e,t){try{let e=t.contentDocument;return!e||e.readyState===`loading`||e.URL===`about:blank`?void 0:e}catch{return}}function Ta(e,t,n,r,i){let a=Xi(t,n,r,i)[0];if(!a||a.closest(`[data-vc-ignore]`))return;let o;for(let t of e)Na(t.clip,n,r)&&(!t.element||t.element===a||t.element.contains(a))&&(!o||o.element&&t.element&&o.element.contains(t.element))&&(o=t);return o}var Ea=(e,t,n)=>({x:e.origin.x+t*e.scale,y:e.origin.y+n*e.scale}),Da=(e,t,n)=>({x:(t-e.origin.x)/e.scale,y:(n-e.origin.y)/e.scale}),Oa=(e,t,n)=>({x:e.docOrigin.x+t*e.docScale,y:e.docOrigin.y+n*e.docScale}),ka=(e,t,n)=>({x:(t-e.docOrigin.x)/e.docScale,y:(n-e.docOrigin.y)/e.docScale});function Aa(e,t){let n=Oa(e,t.x,t.y);return{left:n.x,top:n.y,right:n.x+t.width*e.docScale,bottom:n.y+t.height*e.docScale}}function ja(e,t){let n=Oa(e,t.x,t.y),r=Da(e,n.x,n.y),i=e.docScale/e.scale;return{x:r.x,y:r.y,width:t.width*i,height:t.height*i}}function Ma(e,t){let n=()=>{let n=Ea(e,Math.min(t.x,e.size.width),Math.min(t.y,e.size.height));return{...n,hidden:!Na(e.clip,n.x,n.y)}},{anchor:r}=t;if(!r||!e.doc)return n();let i=$i(e.doc,r);if(!i)return{...n(),hidden:!0};let a=i.getBoundingClientRect(),o=ja(e,{x:a.left,y:a.top,width:a.width,height:a.height}),s=(e,t)=>t>0?e/t:0,c=Ea(e,o.x+xa(s(t.x-r.x,r.width)*o.width,1,o.width-1),o.y+xa(s(t.y-r.y,r.height)*o.height,1,o.height-1)),l=ka(e,c.x,c.y),u=Aa(e,{x:a.left,y:a.top,width:a.width,height:a.height}),d=a.width>0&&a.height>0&&Na(e.clip,c.x,c.y)&&ea(i,l.x,l.y,e.search);return{x:c.x,y:c.y,element:i,box:u,hidden:!d}}function Na(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Pa(e,t){return{left:Math.max(e.left,t.left),top:Math.max(e.top,t.top),right:Math.min(e.right,t.right),bottom:Math.min(e.bottom,t.bottom)}}var Fa=e=>({x:e.left,y:e.top,width:Math.max(0,e.right-e.left),height:Math.max(0,e.bottom-e.top)});function Ia(e,t){let n={left:-1/0,top:-1/0,right:1/0,bottom:1/0},r=e.ownerDocument.body;for(let i=e.parentElement;i&&i!==r;i=i.parentElement){let e=t(i);if(e.overflowX===`visible`&&e.overflowY===`visible`)continue;let r=i.getBoundingClientRect();n=Pa(n,{left:r.left,top:r.top,right:r.right,bottom:r.bottom})}return n}function La(e){let t=e.getAttribute(`data-vc-context`);if(!t)return{};try{let e=JSON.parse(t);return!e||typeof e!=`object`||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`||typeof e==`number`).map(([e,t])=>[e,String(t)]))}catch{return{}}}function Ra(e,t,n,r){let i=Da(e,t,n),a={surface:e.id,x:i.x,y:i.y,point:i};if(r||!e.doc)return a;let o=ka(e,t,n),s=Zi(e.doc,o.x,o.y,14/e.docScale,e.search);if(!s)return a;let c=ja(e,s.box);return{...a,x:xa(i.x,c.x+1,c.x+c.width-1),y:xa(i.y,c.y+1,c.y+c.height-1),target:s,targetBox:c}}var za=class{endpoint;constructor(e){this.endpoint=e.replace(/\/$/,``)}fetch(e,t={}){return fetch(`${this.endpoint}${e}`,{...t,credentials:`same-origin`,cache:`no-store`})}},Ba=class{#e=N(null);get viewer(){return H(this.#e)}set viewer(e){P(this.#e,e,!0)}#t=N(Zt([]));get threads(){return H(this.#t)}set threads(e){P(this.#t,e,!0)}#n=N(``);get spaceName(){return H(this.#n)}set spaceName(e){P(this.#n,e,!0)}#r=N(!0);get loading(){return H(this.#r)}set loading(e){P(this.#r,e,!0)}#i=N(!1);get viewerKnown(){return H(this.#i)}set viewerKnown(e){P(this.#i,e,!0)}#a=N(null);get error(){return H(this.#a)}set error(e){P(this.#a,e,!0)}#o=N(Zt(Date.now()));get now(){return H(this.#o)}set now(e){P(this.#o,e,!0)}#s=N();get connection(){return H(this.#s)}set connection(e){P(this.#s,e,!0)}#c=N([]);get participants(){return H(this.#c)}set participants(e){P(this.#c,e)}#l=N();get agents(){return H(this.#l)}set agents(e){P(this.#l,e)}api;refreshing;queued=!1;listening;nextPending=-1;presence;posted=``;received=`[]`;constructor(e,t){this.api=e,t!==void 0&&(this.viewer=t,this.viewerKnown=!0)}get unreadCount(){return this.threads.filter(e=>e.unread&&!e.resolvedAt).length}start(){this.refresh();let e=()=>{this.refresh()};window.addEventListener(`focus`,e);let t=setInterval(()=>{this.now=Date.now()},3e4);return()=>{window.removeEventListener(`focus`,e),clearInterval(t),this.stopListening()}}refresh(){return this.refreshing?(this.queued=!0,this.refreshing):(this.refreshing=(async()=>{try{let e=await this.api.fetch(``);if(!e.ok)throw Error();let t=await e.json();this.viewer=t.viewer,this.viewerKnown=!0,this.spaceName=t.space.name;let n=new Map(this.threads.map(e=>[e.id,e.comments.filter(e=>e.pending)]));this.threads=t.threads.map(e=>{let t=n.get(e.id);return t?.length?{...e,comments:[...e.comments,...t]}:e}),this.viewer?this.listen():this.stopListening()}catch{}finally{this.loading=!1,this.refreshing=void 0,this.queued&&(this.queued=!1,this.refresh())}})(),this.refreshing)}stopListening(){this.listening?.abort(),this.listening=void 0,this.disconnected()}disconnected(){this.connection=void 0,this.setParticipants([])}setParticipants(e){let t=JSON.stringify(e);t!==this.received&&(this.received=t,this.participants=e)}listen(){if(this.listening)return;let e=new AbortController;this.listening=e,(async()=>{let t=!1;for(;!e.signal.aborted&&this.viewer;){try{let n=await this.api.fetch(`/events`,{signal:e.signal});if(!n.ok||!n.body)break;t&&this.refresh(),t=!0;let r=n.body.pipeThrough(new TextDecoderStream).getReader(),i=``;for(;;){let{value:e,done:t}=await r.read();if(t)break;i+=e;let n;for(;(n=i.indexOf(`
3
3
 
4
- `))!==-1;)/^event: change$/m.test(i.slice(0,n))&&this.refresh(),i=i.slice(n+2)}}catch{}if(e.signal.aborted)break;await new Promise(e=>setTimeout(e,3e3))}this.listening===e&&(this.listening=void 0)})()}async request(e,t,n){let r=await this.api.fetch(t,{method:e,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error??`Something went wrong. Try again.`);return i}apply(e){if(e.thread){let t=e.thread,n=this.threads.findIndex(e=>e.id===t.id);n===-1?this.threads.push(t):this.threads[n]=t}e.deleted!==void 0&&(this.threads=this.threads.filter(t=>t.id!==e.deleted))}async run(e,t=!1){try{this.apply(await e())}catch(e){if(this.error=e.message,this.refresh(),t)throw e}}update(e,t){let n=this.threads.findIndex(t=>t.id===e);n!==-1&&(this.threads[n]=t(this.threads[n]))}imageUrl(e){return`${this.api.endpoint}/images/${e.id}/${e.key}`}async upload(e,t,n){let r=await this.api.fetch(`/images?width=${t}&height=${n}`,{method:`POST`,headers:{"Content-Type":e.type},body:e}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error??(r.status===413?`This image is too large.`:`The image could not be uploaded.`));return i.image}async create(e,t=[]){let{thread:n}=await this.request(`POST`,`/threads`,{...e,images:t.map(e=>e.id)});return this.apply({thread:n}),n}async reply(e,t,n=[]){let r={id:this.nextPending--,author:this.viewer,body:t,images:n,createdAt:Date.now(),editedAt:null,pending:!0};this.update(e,e=>({...e,resolvedAt:null,resolvedBy:null,comments:[...e.comments,r]}));try{await this.run(()=>this.request(`POST`,`/threads/${e}/comments`,{body:t,images:n.map(e=>e.id)}),!0)}finally{this.update(e,e=>({...e,comments:e.comments.filter(e=>e.id!==r.id)}))}}async edit(e,t,n){await this.run(()=>this.request(`PATCH`,`/comments/${e}`,{body:t,images:n.map(e=>e.id)}),!0)}async removeComment(e){await this.run(()=>this.request(`DELETE`,`/comments/${e}`))}async removeThread(e){this.threads=this.threads.filter(t=>t.id!==e),await this.run(()=>this.request(`DELETE`,`/threads/${e}`))}async resolve(e,t){this.update(e,e=>({...e,resolvedAt:t?Date.now():null,resolvedBy:t?this.viewer:null})),await this.run(()=>this.request(`PATCH`,`/threads/${e}`,{resolved:t}))}async markRead(e,t){this.update(e,e=>({...e,unread:!t&&e.comments.some(e=>e.author.sub!==this.viewer?.sub)})),await this.run(()=>this.request(`POST`,`/threads/${e}/read`,{read:t}))}async markAllRead(){await Promise.all(this.threads.filter(e=>e.unread).map(e=>this.markRead(e.id,!0)))}};typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var Va=Symbol(`visual-comments`);function Ha(e){Ke(Va,e)}function Ua(){return Ge(Va)}var Wa={canvas:`M3 6.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M14 6.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M3 17.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M14 17.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0`,"chevron-left":`M15 6l-6 6 6 6`,"chevron-right":`M9 6l6 6-6 6`,"chevron-down":`M6 9l6 6 6-6`,"chevron-up":`M6 15l6-6 6 6`,play:`M7 5l12 7-12 7z`,external:`M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5`,restart:`M4 12a8 8 0 1 0 2.4-5.7M4 4v4h4`,check:`M5 12.5l4.5 4.5L19 7.5`,plus:`M12 5v14M5 12h14`,minus:`M5 12h14`,fit:`M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5`,comment:`M12 3.5a8.5 8.5 0 1 1 0 17H3.5V12A8.5 8.5 0 0 1 12 3.5z`,search:`M11 4.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 1 0 0-13zM20 20l-4.4-4.4`,filter:`M4 7h16M7 12h10M10 17h4`,more:`M5 11a1 1 0 1 0 0 2a1 1 0 1 0 0-2zM12 11a1 1 0 1 0 0 2a1 1 0 1 0 0-2zM19 11a1 1 0 1 0 0 2a1 1 0 1 0 0-2z`,resolve:`M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM8 12.2l2.7 2.7L16 9.6`,close:`M6 6l12 12M18 6L6 18`,send:`M12 19V5M6.5 10.5L12 5l5.5 5.5`},Ga=Or(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg>`);function $(e,t){let n=Q(t,`size`,3,16);var r=Ga(),i=I(r);R(()=>{Z(r,`width`,n()),Z(r,`height`,n()),Z(i,`d`,Wa[t.name])}),K(e,r)}var Ka=10485760,qa=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],Ja=5e3,Ya=W(`<span class="absolute inset-0 grid place-items-center bg-white/85 px-1 text-center text-[10px] leading-tight font-medium text-red-600">Not added</span>`),Xa=W(`<span class="absolute inset-0 m-auto size-4 animate-spin rounded-full border-2 border-vc-comment border-t-transparent" aria-label="Uploading"></span>`),Za=W(`<li class="relative size-14 overflow-hidden rounded-lg border border-vc-line bg-vc-surface"><img alt=""/> <!> <button type="button" class="absolute top-0.5 right-0.5 grid size-4 place-items-center rounded-full bg-black/60 text-white hover:bg-black/80" aria-label="Remove image" title="Remove"><!></button></li>`),Qa=W(`<ul class="flex flex-wrap gap-1.5 pt-1.5 pr-1.5 pb-1" aria-label="Images"></ul>`),$a=W(`<button type="button" class="h-6 rounded-full px-2 text-xs text-vc-muted hover:bg-vc-wash">Cancel</button>`),eo=W(`<form><!> <div class="flex items-end gap-2"><textarea rows="1" class="max-h-40 min-w-0 flex-1 resize-none self-center bg-transparent py-1 leading-5 outline-none placeholder:text-vc-muted/70"></textarea> <!> <button type="submit"><!></button></div></form>`);function to(e,t){qe(t,!0);let n=Q(t,`variant`,3,`reply`),r=Q(t,`placeholder`,3,`Reply`),i=Q(t,`initial`,3,``),a=Q(t,`initialImages`,19,()=>[]),o=Q(t,`autofocus`,3,!1),s=Ua().store,c=N(Zt(i())),l=N(Zt(a().map((e,t)=>({key:t,preview:s.imageUrl(e),image:e})))),u=a().length,d=N(!1),f=N(!1),p=N(void 0),m=N(void 0),h=j(()=>H(l).some(e=>!e.image&&!e.error)),g=j(()=>!H(c).trim()&&!H(l).some(e=>e.image)),_=j(()=>H(g)||H(d)||H(h)||H(l).some(e=>e.error));yn(()=>t.onimages?.(H(l).length));function v(){H(p)?.focus()}function y(){H(p)&&(H(p).style.height=`auto`,H(p).style.height=`${Math.min(H(p).scrollHeight,160)}px`)}function b(e){for(let t of e){if(!qa.includes(t.type)){s.error=`Only PNG, JPEG, GIF and WebP images can be added.`;continue}if(H(l).length>=6){s.error=`A comment can have up to 6 images.`;break}let e=u++;H(l).push({key:e,preview:URL.createObjectURL(t)}),x(e,t)}H(p)?.focus()}async function x(e,t){let n=t=>{let n=H(l).find(t=>t.key===e);n&&Object.assign(n,t)};if(t.size>10485760)n({error:`Larger than ${Ka/1024/1024} MB`});else try{let e=await createImageBitmap(t).catch(()=>{throw Error(`Not a readable image`)}),{width:r,height:i}=e;e.close(),n({image:await s.upload(t,r,i)})}catch(e){n({error:e.message})}}function S(e){for(let t of e)t.preview.startsWith(`blob:`)&&URL.revokeObjectURL(t.preview)}function C(e){S(H(l).filter(t=>t.key===e)),P(l,H(l).filter(t=>t.key!==e),!0),H(p)?.focus()}Kr(()=>S(H(l)));let w=e=>e.dataTransfer?.types.includes(`Files`)??!1;function ee(e){w(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`,P(f,!0))}function te(e){H(m)?.contains(e.relatedTarget)||P(f,!1)}function ne(e){w(e)&&(e.preventDefault(),P(f,!1),b(e.dataTransfer.files))}function re(e){let t=[...e.clipboardData?.files??[]].filter(e=>e.type.startsWith(`image/`));t.length&&(e.preventDefault(),b(t))}async function ie(e){if(e?.preventDefault(),H(_))return;let r=H(c),i=H(l);P(d,!0),n()!==`edit`&&(P(c,``),P(l,[],!0)),requestAnimationFrame(y);try{await t.onsubmit(r.trim(),i.map(e=>e.image)),n()!==`edit`&&S(i)}catch{P(c,r,!0),P(l,i,!0),requestAnimationFrame(y)}finally{P(d,!1),H(p)?.focus()}}function ae(e){e.isComposing||(e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),ie()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t.oncancel?.()))}Gr(()=>{y(),o()&&(H(p)?.focus({preventScroll:!0}),H(p)?.setSelectionRange(H(c).length,H(c).length))});var oe={focus:v},T=eo(),se=F(T),ce=e=>{var t=Qa();Qr(t,21,()=>H(l),e=>e.key,(e,t)=>{var n=Za(),r=F(n),i=L(r,2),a=e=>{K(e,Ya())},o=e=>{K(e,Xa())};J(i,e=>{H(t).error?e(a):H(t).image||e(o,1)});var s=L(i,2);$(F(s),{name:`close`,size:10}),O(s),O(n),R(()=>{Z(n,`title`,H(t).error),Z(r,`src`,H(t).preview),X(r,1,Y([`size-full object-cover`,!H(t).image&&`opacity-50`]))}),U(`click`,s,()=>C(H(t).key)),K(e,n)}),O(t),K(e,t)};J(se,e=>{H(l).length&&e(ce)});var le=L(se,2),ue=F(le);it(ue),Ri(ue,e=>P(p,e),()=>H(p));var de=L(ue,2),fe=e=>{var n=$a();U(`click`,n,()=>t.oncancel?.()),K(e,n)};J(de,e=>{n()===`edit`&&e(fe)});var pe=L(de,2),me=F(pe);{let e=j(()=>n()===`edit`?`check`:`send`),t=j(()=>n()===`new`?16:14);$(me,{get name(){return H(e)},get size(){return H(t)}})}return O(pe),O(le),O(T),Ri(T,e=>P(m,e),()=>H(m)),R(()=>{X(T,1,Y([`flex flex-col bg-white text-[13px] text-vc-ink transition-colors`,n()===`new`?`w-[296px] rounded-[18px] border border-vc-comment py-[5px] pr-[5px] pl-3.5 shadow-[0_2px_14px_rgb(0_0_0/0.18)]`:`rounded-[14px] border border-vc-line py-[3px] pr-[3px] pl-3 focus-within:border-vc-comment`,H(f)&&`border-vc-comment! bg-vc-comment-soft ring-2 ring-vc-comment/30`])),Z(ue,`placeholder`,r()),Z(ue,`aria-label`,r()),Z(ue,`maxlength`,Ja),pe.disabled=H(_),Z(pe,`aria-label`,n()===`edit`?`Save`:`Send`),Z(pe,`title`,H(h)?`Uploading images…`:n()===`edit`?`Save (Enter)`:`Send (Enter)`),X(pe,1,Y([`grid shrink-0 place-items-center rounded-full text-white transition-colors`,n()===`new`?`size-7`:`size-6`,H(_)?`bg-[#d9d9d9]`:`bg-vc-comment hover:brightness-110`]))}),vr(`submit`,T,ie),vr(`dragover`,T,ee),vr(`dragenter`,T,ee),vr(`dragleave`,T,te),vr(`drop`,T,ne),U(`keydown`,ue,ae),vr(`paste`,ue,re),U(`input`,ue,()=>{y(),t.oninput?.(H(c))}),Mi(ue,()=>H(c),e=>P(c,e)),K(e,T),Je(oe)}yr([`click`,`keydown`,`input`]);function no(e){return--e*e*(2.70158*e+1.70158)+1}function ro(e){return e*e*e}var io=[`#7b61ff`,`#f24822`,`#14ae5c`,`#ffa629`,`#0d99ff`,`#e5487d`,`#667799`];function ao(e){let t=0;for(let n of e)t=t*31+n.codePointAt(0)|0;return io[Math.abs(t)%io.length]}var oo=W(`<img alt="" referrerpolicy="no-referrer" class="size-full object-cover" draggable="false"/>`),so=W(`<span aria-hidden="true"><!></span>`);function co(e,t){qe(t,!0);let n=Q(t,`size`,3,24),r=Q(t,`class`,3,``),i=Ua(),a=N(void 0),o=j(()=>Array.from(t.user.name.trim()||`?`)[0].toLocaleUpperCase()),s=j(()=>i?.viewer?.sub===t.user.sub);var c=so();let l;var u=F(c),d=e=>{var n=oo();R(()=>Z(n,`src`,t.user.picture)),vr(`error`,n,()=>{P(a,t.user.picture,!0)}),gr(n),K(e,n)},f=e=>{var t=G();R(()=>q(t,H(o))),K(e,t)};J(u,e=>{t.user.picture&&t.user.picture!==H(a)?e(d):e(f,-1)}),O(c),R((e,t)=>{X(c,1,Y([`flex shrink-0 items-center justify-center overflow-hidden rounded-full leading-none text-white select-none`,r()])),l=wi(c,``,l,{width:`${n()??``}px`,height:`${n()??``}px`,"font-size":e,background:t})},[()=>`${Math.round(n()*.5)}px`,()=>H(s)?`var(--color-vc-avatar)`:ao(t.user.sub)]),K(e,c),Je()}function lo(e){if(e.body)return e.body;let t=e.images?.length??0;return t===1?`Image`:`${t} images`}var uo=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`}),fo=[[`minute`,6e4],[`hour`,36e5],[`day`,864e5]];function po(e,t){let n=Math.max(0,t-e);if(n<6e4)return`just now`;if(n<6048e5){let[e,t]=fo.findLast(([,e])=>n>=e);return uo.format(-Math.floor(n/t),e)}let r=new Date(e);return r.toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:r.getFullYear()===new Date(t).getFullYear()?void 0:`numeric`})}function mo(e){return new Date(e).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}function ho(e,{duration:t,easing:n}){return{duration:matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:t,easing:n,css:e=>`transform-origin: 0 100%; transform: translateY(-100%) scale(${.2+.8*e}); opacity: ${Math.min(1,e*2)}`}}var go=W(`<span class="mt-0.5 block text-xs text-vc-muted"> </span>`),_o=W(`<span class="absolute top-0.5 right-0.5 size-2.5 rounded-full bg-vc-comment ring-2 ring-white"></span>`),vo=W(`<button type="button" data-vc-ui=""><!> <span class="vc-pin-text absolute top-2.5 left-[42px] block w-max max-w-[240px] text-[13px] leading-[18px] text-vc-ink svelte-2kdshp" aria-hidden="true"><span class="block truncate whitespace-nowrap"><span class="font-medium"> </span> <span class="ml-1 text-vc-muted"> </span></span> <span class="line-clamp-2 block break-words whitespace-pre-line"> </span> <!></span> <!></button>`),yo={hash:`svelte-2kdshp`,code:`.vc-pin.svelte-2kdshp {transform:translateY(-100%);transition:width 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
4
+ `))!==-1;)this.receive(i.slice(0,n)),i=i.slice(n+2)}}catch{}if(e.signal.aborted)break;this.disconnected(),await new Promise(e=>setTimeout(e,3e3))}this.listening===e&&(this.listening=void 0)})()}receive(e){let t=/^event: (.*)$/m.exec(e)?.[1];if(t===`change`)return void this.refresh();if(t!==`hello`&&t!==`presence`)return;let n;try{n=JSON.parse(e.match(/^data: ?(.*)$/gm)?.map(e=>e.replace(/^data: ?/,``)).join(`
5
+ `)??``)}catch{return}t===`hello`&&typeof n?.connection==`string`?(this.connection=n.connection,this.postPresence()):t===`presence`&&Array.isArray(n?.participants)&&this.setParticipants(n.participants)}setPresence(e,t=!1){this.presence=e,this.postPresence(t)}async postPresence(e=!1){let t=this.connection;if(!t||!this.presence)return;let n=JSON.stringify({connection:t,...this.presence});if(n!==this.posted||e){this.posted=n;try{!(await this.api.fetch(`/presence`,{method:`POST`,headers:{"Content-Type":`application/json`},body:n})).ok&&this.posted===n&&(this.posted=``)}catch{this.posted===n&&(this.posted=``)}}}async request(e,t,n){let r=await this.api.fetch(t,{method:e,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error??`Something went wrong. Try again.`);return i}apply(e){if(e.thread){let t=e.thread,n=this.threads.findIndex(e=>e.id===t.id);n===-1?this.threads.push(t):this.threads[n]=t}e.deleted!==void 0&&(this.threads=this.threads.filter(t=>t.id!==e.deleted))}async run(e,t=!1){try{this.apply(await e())}catch(e){if(this.error=e.message,this.refresh(),t)throw e}}update(e,t){let n=this.threads.findIndex(t=>t.id===e);n!==-1&&(this.threads[n]=t(this.threads[n]))}imageUrl(e){return`${this.api.endpoint}/images/${e.id}/${e.key}`}async upload(e,t,n){let r=await this.api.fetch(`/images?width=${t}&height=${n}`,{method:`POST`,headers:{"Content-Type":e.type},body:e}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error??(r.status===413?`This image is too large.`:`The image could not be uploaded.`));return i.image}async create(e,t=[]){let{thread:n}=await this.request(`POST`,`/threads`,{...e,images:t.map(e=>e.id)});return this.apply({thread:n}),n}async reply(e,t,n=[]){let r={id:this.nextPending--,author:this.viewer,body:t,images:n,createdAt:Date.now(),editedAt:null,pending:!0};this.update(e,e=>({...e,resolvedAt:null,resolvedBy:null,comments:[...e.comments,r]}));try{await this.run(()=>this.request(`POST`,`/threads/${e}/comments`,{body:t,images:n.map(e=>e.id)}),!0)}finally{this.update(e,e=>({...e,comments:e.comments.filter(e=>e.id!==r.id)}))}}async edit(e,t,n){await this.run(()=>this.request(`PATCH`,`/comments/${e}`,{body:t,images:n.map(e=>e.id)}),!0)}async removeComment(e){await this.run(()=>this.request(`DELETE`,`/comments/${e}`))}async removeThread(e){this.threads=this.threads.filter(t=>t.id!==e),await this.run(()=>this.request(`DELETE`,`/threads/${e}`))}async resolve(e,t){this.update(e,e=>({...e,resolvedAt:t?Date.now():null,resolvedBy:t?this.viewer:null})),await this.run(()=>this.request(`PATCH`,`/threads/${e}`,{resolved:t}))}async markRead(e,t){this.update(e,e=>({...e,unread:!t&&e.comments.some(e=>e.author.sub!==this.viewer?.sub)})),await this.run(()=>this.request(`POST`,`/threads/${e}/read`,{read:t}))}async markAllRead(){await Promise.all(this.threads.filter(e=>e.unread).map(e=>this.markRead(e.id,!0)))}async loadAgents(){try{this.agents=(await this.request(`GET`,`/agents`)).agents}catch{this.agents=void 0}}async removeAgent(e){this.agents=this.agents?.filter(t=>t.id!==e);try{await this.request(`DELETE`,`/agents/${encodeURIComponent(e)}`)}catch(e){this.error=e.message,this.loadAgents()}}async agentRequest(e){return(await this.request(`GET`,`/agents/requests/${encodeURIComponent(e)}`)).request}async approveAgent(e){let{agent:t}=await this.request(`POST`,`/agents/requests/${encodeURIComponent(e)}/approve`);return this.agents&&=[...this.agents.filter(e=>e.id!==t.id),t],t}async denyAgent(e){await this.request(`DELETE`,`/agents/requests/${encodeURIComponent(e)}`)}};typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var Va=Symbol(`visual-comments`);function Ha(e){Ke(Va,e)}function Ua(){return Ge(Va)}var Wa=W(`<p class="mt-2 text-vc-muted">Connecting…</p>`),Ga=W(`<p class="mt-2 text-vc-muted">Sign in to see which agent asks, and to let it read and write comments here.</p> <div class="mt-5 flex justify-end gap-2"><form method="dialog"><button class="vc-dialog-button svelte-gy3e4s">Cancel</button></form> <button type="button" class="vc-dialog-button vc-dialog-primary svelte-gy3e4s">Sign in</button></div>`,1),Ka=W(`<h2 id="vc-connect-title" class="text-[15px] font-semibold">An agent wants to join</h2> <!>`,1),qa=W(`<h2 id="vc-connect-title" class="text-[15px] font-semibold"> </h2> <p class="mt-2 text-vc-muted">It sees new comments and replies under its own name. Remove it from your account menu at any time.</p> <form method="dialog" class="mt-5 flex justify-end"><button class="vc-dialog-button vc-dialog-primary svelte-gy3e4s">Done</button></form>`,1),Ja=W(`<p role="alert" class="mt-3 text-red-600"> </p>`),Ya=W(`<h2 id="vc-connect-title" class="text-[15px] font-semibold"> </h2> <p class="mt-2 text-vc-muted">It will see every comment here, and may reply and act on them under its own name. Allow it only if you started it.</p> <p class="mt-4 text-vc-muted">The agent shows this code:</p> <p class="mt-1 rounded-[8px] bg-vc-surface py-2 text-center font-mono text-xl tracking-[0.2em]"> </p> <!> <div class="mt-5 flex justify-end gap-2"><button type="button" class="vc-dialog-button svelte-gy3e4s">Deny</button> <button type="button" class="vc-dialog-button vc-dialog-primary svelte-gy3e4s">Allow</button></div>`,1),Xa=W(`<h2 id="vc-connect-title" class="text-[15px] font-semibold">This request cannot be answered</h2> <p class="mt-2 text-vc-muted"> </p> <form method="dialog" class="mt-5 flex justify-end"><button class="vc-dialog-button svelte-gy3e4s">Close</button></form>`,1),Za=W(`<h2 id="vc-connect-title" class="text-[15px] font-semibold">An agent wants to join</h2> <p class="mt-2 text-vc-muted">Loading…</p>`,1),Qa=W(`<dialog aria-labelledby="vc-connect-title" class="vc-ui pointer-events-auto m-auto w-[360px] max-w-[calc(100vw-24px)] rounded-[12px] bg-white p-5 text-[13px] text-vc-ink shadow-[0_8px_40px_rgb(0_0_0/0.28)] outline-none backdrop:bg-black/30"><!></dialog>`),$a={hash:`svelte-gy3e4s`,code:`.vc-dialog-button.svelte-gy3e4s {height:2rem;border-radius:9999px;padding:0 0.875rem;font-weight:500;background:var(--color-vc-wash);outline:none;}.vc-dialog-button.svelte-gy3e4s:hover:not(:disabled) {filter:brightness(0.96);}.vc-dialog-button.svelte-gy3e4s:focus-visible {box-shadow:0 0 0 2px var(--color-vc-comment);}.vc-dialog-button.svelte-gy3e4s:disabled {opacity:0.6;}.vc-dialog-primary.svelte-gy3e4s {background:var(--color-vc-comment);color:white;}.vc-dialog-primary.svelte-gy3e4s:focus-visible {box-shadow:0 0 0 2px white, 0 0 0 4px var(--color-vc-comment);}`};function eo(e,t){qe(t,!0),mi(e,$a);let n=Ua(),r=j(()=>n.store.spaceName||`this space`),i=j(()=>!!n.viewer),a=N(void 0),o=N(void 0),s=N(void 0),c=N(!1);vn(()=>{if(!H(i))return;let e=!0;return P(a,void 0),P(s,void 0),n.store.agentRequest(t.id).then(t=>{e&&P(a,t,!0)},t=>{e&&(P(s,t.message,!0),n.store.refresh())}),()=>{e=!1}});async function l(e){P(c,!0),P(s,void 0);try{e?P(o,await n.store.approveAgent(t.id),!0):(await n.store.denyAgent(t.id),n.endConnect())}catch(e){P(s,e.message,!0)}finally{P(c,!1)}}var u=Qa(),d=F(u),f=e=>{var t=Ka(),r=R(I(t),2),i=e=>{K(e,Wa())},a=e=>{var t=Ga(),r=R(I(t),2),i=R(F(r),2);D(r),U(`click`,i,()=>n.signIn()),K(e,t)};J(r,e=>{n.loading?e(i):e(a,-1)}),K(e,t)},p=e=>{var t=qa(),n=L(I(t));O(4),z(()=>q(n,`${H(o).name??``} joined ${H(r)??``}`)),K(e,t)},m=e=>{var t=Ya(),n=I(t),i=L(n),o=R(n,6),u=L(o,!0),d=R(o,2),f=e=>{var t=Ja(),n=L(t,!0);z(()=>q(n,H(s))),K(e,t)};J(d,e=>{H(s)&&e(f)});var p=R(d,2),m=F(p),h=R(m,2);D(p),z(()=>{q(i,`${H(a).name??``} wants to join ${H(r)??``} as an agent`),q(u,H(a).code),m.disabled=H(c),h.disabled=H(c)}),U(`click`,m,()=>l(!1)),U(`click`,h,()=>l(!0)),K(e,t)},h=e=>{var t=Xa(),n=L(R(I(t),2),!0);O(2),z(()=>q(n,H(s))),K(e,t)},g=e=>{var t=Za();O(2),K(e,t)};J(d,e=>{n.viewer?H(o)?e(p,1):H(a)?e(m,2):H(s)?e(h,3):e(g,-1):e(f)}),D(u),hi(u,()=>e=>e.showModal()),vr(`close`,u,()=>n.endConnect()),K(e,u),Je()}yr([`click`]);var to={canvas:`M3 6.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M14 6.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M3 17.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M14 17.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0`,"chevron-left":`M15 6l-6 6 6 6`,"chevron-right":`M9 6l6 6-6 6`,"chevron-down":`M6 9l6 6 6-6`,"chevron-up":`M6 15l6-6 6 6`,play:`M7 5l12 7-12 7z`,external:`M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5`,restart:`M4 12a8 8 0 1 0 2.4-5.7M4 4v4h4`,check:`M5 12.5l4.5 4.5L19 7.5`,plus:`M12 5v14M5 12h14`,minus:`M5 12h14`,fit:`M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5`,comment:`M12 3.5a8.5 8.5 0 1 1 0 17H3.5V12A8.5 8.5 0 0 1 12 3.5z`,search:`M11 4.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 1 0 0-13zM20 20l-4.4-4.4`,filter:`M4 7h16M7 12h10M10 17h4`,more:`M5 11a1 1 0 1 0 0 2a1 1 0 1 0 0-2zM12 11a1 1 0 1 0 0 2a1 1 0 1 0 0-2zM19 11a1 1 0 1 0 0 2a1 1 0 1 0 0-2z`,resolve:`M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM8 12.2l2.7 2.7L16 9.6`,close:`M6 6l12 12M18 6L6 18`,send:`M12 19V5M6.5 10.5L12 5l5.5 5.5`},no=Or(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg>`);function $(e,t){let n=Q(t,`size`,3,16);var r=no(),i=L(r);z(()=>{Z(r,`width`,n()),Z(r,`height`,n()),Z(i,`d`,to[t.name])}),K(e,r)}var ro=10485760,io=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],ao=5e3,oo=W(`<span class="absolute inset-0 grid place-items-center bg-white/85 px-1 text-center text-[10px] leading-tight font-medium text-red-600">Not added</span>`),so=W(`<span class="absolute inset-0 m-auto size-4 animate-spin rounded-full border-2 border-vc-comment border-t-transparent" aria-label="Uploading"></span>`),co=W(`<li class="relative size-14 overflow-hidden rounded-lg border border-vc-line bg-vc-surface"><img alt=""/> <!> <button type="button" class="absolute top-0.5 right-0.5 grid size-4 place-items-center rounded-full bg-black/60 text-white hover:bg-black/80" aria-label="Remove image" title="Remove"><!></button></li>`),lo=W(`<ul class="flex flex-wrap gap-1.5 pt-1.5 pr-1.5 pb-1" aria-label="Images"></ul>`),uo=W(`<button type="button" class="h-6 rounded-full px-2 text-xs text-vc-muted hover:bg-vc-wash">Cancel</button>`),fo=W(`<form><!> <div class="flex items-end gap-2"><textarea rows="1" class="max-h-40 min-w-0 flex-1 resize-none self-center bg-transparent py-1 leading-5 outline-none placeholder:text-vc-muted/70"></textarea> <!> <button type="submit"><!></button></div></form>`);function po(e,t){qe(t,!0);let n=Q(t,`variant`,3,`reply`),r=Q(t,`placeholder`,3,`Reply`),i=Q(t,`initial`,3,``),a=Q(t,`initialImages`,19,()=>[]),o=Q(t,`autofocus`,3,!1),s=Ua().store,c=N(Zt(i())),l=N(Zt(a().map((e,t)=>({key:t,preview:s.imageUrl(e),image:e})))),u=a().length,d=N(!1),f=N(!1),p=N(void 0),m=N(void 0),h=j(()=>H(l).some(e=>!e.image&&!e.error)),g=j(()=>!H(c).trim()&&!H(l).some(e=>e.image)),_=j(()=>H(g)||H(d)||H(h)||H(l).some(e=>e.error));vn(()=>t.onimages?.(H(l).length));function v(){H(p)?.focus()}function y(){H(p)&&(H(p).style.height=`auto`,H(p).style.height=`${Math.min(H(p).scrollHeight,160)}px`)}function b(e){for(let t of e){if(!io.includes(t.type)){s.error=`Only PNG, JPEG, GIF and WebP images can be added.`;continue}if(H(l).length>=6){s.error=`A comment can have up to 6 images.`;break}let e=u++;H(l).push({key:e,preview:URL.createObjectURL(t)}),x(e,t)}H(p)?.focus()}async function x(e,t){let n=t=>{let n=H(l).find(t=>t.key===e);n&&Object.assign(n,t)};if(t.size>10485760)n({error:`Larger than ${ro/1024/1024} MB`});else try{let e=await createImageBitmap(t).catch(()=>{throw Error(`Not a readable image`)}),{width:r,height:i}=e;e.close(),n({image:await s.upload(t,r,i)})}catch(e){n({error:e.message})}}function S(e){for(let t of e)t.preview.startsWith(`blob:`)&&URL.revokeObjectURL(t.preview)}function C(e){S(H(l).filter(t=>t.key===e)),P(l,H(l).filter(t=>t.key!==e),!0),H(p)?.focus()}Kr(()=>S(H(l)));let w=e=>e.dataTransfer?.types.includes(`Files`)??!1;function ee(e){w(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`,P(f,!0))}function te(e){H(m)?.contains(e.relatedTarget)||P(f,!1)}function ne(e){w(e)&&(e.preventDefault(),P(f,!1),b(e.dataTransfer.files))}function re(e){let t=[...e.clipboardData?.files??[]].filter(e=>e.type.startsWith(`image/`));t.length&&(e.preventDefault(),b(t))}async function ie(e){if(e?.preventDefault(),H(_))return;let r=H(c),i=H(l);P(d,!0),n()!==`edit`&&(P(c,``),P(l,[],!0)),requestAnimationFrame(y);try{await t.onsubmit(r.trim(),i.map(e=>e.image)),n()!==`edit`&&S(i)}catch{P(c,r,!0),P(l,i,!0),requestAnimationFrame(y)}finally{P(d,!1),H(p)?.focus()}}function ae(e){e.isComposing||(e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),ie()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t.oncancel?.()))}Gr(()=>{y(),o()&&(H(p)?.focus({preventScroll:!0}),H(p)?.setSelectionRange(H(c).length,H(c).length))});var oe={focus:v},se=fo(),ce=F(se),le=e=>{var t=lo();Qr(t,21,()=>H(l),e=>e.key,(e,t)=>{var n=co(),r=F(n),i=R(r,2),a=e=>{K(e,oo())},o=e=>{K(e,so())};J(i,e=>{H(t).error?e(a):H(t).image||e(o,1)});var s=R(i,2);$(F(s),{name:`close`,size:10}),D(s),D(n),z(()=>{Z(n,`title`,H(t).error),Z(r,`src`,H(t).preview),X(r,1,Y([`size-full object-cover`,!H(t).image&&`opacity-50`]))}),U(`click`,s,()=>C(H(t).key)),K(e,n)}),D(t),K(e,t)};J(ce,e=>{H(l).length&&e(le)});var ue=R(ce,2),de=F(ue);it(de),Ri(de,e=>P(p,e),()=>H(p));var fe=R(de,2),pe=e=>{var n=uo();U(`click`,n,()=>t.oncancel?.()),K(e,n)};J(fe,e=>{n()===`edit`&&e(pe)});var me=R(fe,2),he=F(me);{let e=j(()=>n()===`edit`?`check`:`send`),t=j(()=>n()===`new`?16:14);$(he,{get name(){return H(e)},get size(){return H(t)}})}return D(me),D(ue),D(se),Ri(se,e=>P(m,e),()=>H(m)),z(()=>{X(se,1,Y([`flex flex-col bg-white text-[13px] text-vc-ink transition-colors`,n()===`new`?`w-[296px] rounded-[18px] border border-vc-comment py-[5px] pr-[5px] pl-3.5 shadow-[0_2px_14px_rgb(0_0_0/0.18)]`:`rounded-[14px] border border-vc-line py-[3px] pr-[3px] pl-3 focus-within:border-vc-comment`,H(f)&&`border-vc-comment! bg-vc-comment-soft ring-2 ring-vc-comment/30`])),Z(de,`placeholder`,r()),Z(de,`aria-label`,r()),Z(de,`maxlength`,ao),me.disabled=H(_),Z(me,`aria-label`,n()===`edit`?`Save`:`Send`),Z(me,`title`,H(h)?`Uploading images…`:n()===`edit`?`Save (Enter)`:`Send (Enter)`),X(me,1,Y([`grid shrink-0 place-items-center rounded-full text-white transition-colors`,n()===`new`?`size-7`:`size-6`,H(_)?`bg-[#d9d9d9]`:`bg-vc-comment hover:brightness-110`]))}),vr(`submit`,se,ie),vr(`dragover`,se,ee),vr(`dragenter`,se,ee),vr(`dragleave`,se,te),vr(`drop`,se,ne),U(`keydown`,de,ae),vr(`paste`,de,re),U(`input`,de,()=>{y(),t.oninput?.(H(c))}),Mi(de,()=>H(c),e=>P(c,e)),K(e,se),Je(oe)}yr([`click`,`keydown`,`input`]);function mo(e){return--e*e*(2.70158*e+1.70158)+1}function ho(e){return e*e*e}function go(e){if(e.body)return e.body;let t=e.images?.length??0;return t===1?`Image`:`${t} images`}function _o(e){return e.agent?`${e.name} · added by ${e.agent.addedBy.name}`:e.name}var vo=[`#7b61ff`,`#f24822`,`#14ae5c`,`#ffa629`,`#0d99ff`,`#e5487d`,`#667799`];function yo(e){let t=0;for(let n of e)t=t*31+n.codePointAt(0)|0;return vo[Math.abs(t)%vo.length]}var bo=W(`<img alt="" referrerpolicy="no-referrer" class="size-full rounded-full object-cover [grid-area:1/1]" draggable="false"/>`),xo=W(`<span class="[grid-area:1/1]"> </span>`),So=W(`<span class="grid place-items-center self-end justify-self-end rounded-full bg-vc-agent text-white ring-[1.5px] ring-white [grid-area:1/1]"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2c.8 5.6 4.4 9.2 10 10-5.6.8-9.2 4.4-10 10-.8-5.6-4.4-9.2-10-10 5.6-.8 9.2-4.4 10-10z"></path></svg></span>`),Co=W(`<span aria-hidden="true"><!> <!></span>`);function wo(e,t){qe(t,!0);let n=Q(t,`size`,3,24),r=Q(t,`class`,3,``),i=Ua(),a=N(void 0),o=j(()=>Array.from(t.user.name.trim()||`?`)[0].toLocaleUpperCase()),s=j(()=>i?.viewer?.sub===t.user.sub),c=j(()=>Math.max(10,Math.round(n()*.45)));var l=Co();let u;var d=F(l),f=e=>{var n=bo();z(()=>Z(n,`src`,t.user.picture)),vr(`error`,n,()=>{P(a,t.user.picture,!0)}),gr(n),K(e,n)},p=e=>{var t=xo(),n=L(t,!0);z(()=>q(n,H(o))),K(e,t)};J(d,e=>{t.user.picture&&t.user.picture!==H(a)?e(f):e(p,-1)});var m=R(d,2),h=e=>{var t=So();let n;var r=L(t);z(()=>{n=wi(t,``,n,{width:`${H(c)??``}px`,height:`${H(c)??``}px`,margin:`0 ${-H(c)/4}px ${-H(c)/4}px 0`}),Z(r,`width`,H(c)-3),Z(r,`height`,H(c)-3)}),K(e,t)};J(m,e=>{t.user.agent&&e(h)}),D(l),z((e,t,i)=>{X(l,1,Y([`grid shrink-0 place-items-center rounded-full leading-none text-white select-none`,r()])),Z(l,`title`,e),u=wi(l,``,u,{width:`${n()??``}px`,height:`${n()??``}px`,"font-size":t,background:i})},[()=>t.title??(t.user.agent?_o(t.user):void 0),()=>`${Math.round(n()*.5)}px`,()=>H(s)?`var(--color-vc-avatar)`:yo(t.user.sub)]),K(e,l),Je()}var To=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`}),Eo=[[`minute`,6e4],[`hour`,36e5],[`day`,864e5]];function Do(e,t){let n=Math.max(0,t-e);if(n<6e4)return`just now`;if(n<6048e5){let[e,t]=Eo.findLast(([,e])=>n>=e);return To.format(-Math.floor(n/t),e)}let r=new Date(e);return r.toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:r.getFullYear()===new Date(t).getFullYear()?void 0:`numeric`})}function Oo(e){return new Date(e).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}function ko(e,{duration:t,easing:n}){return{duration:matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:t,easing:n,css:e=>`transform-origin: 0 100%; transform: translateY(-100%) scale(${.2+.8*e}); opacity: ${Math.min(1,e*2)}`}}var Ao=W(`<span aria-hidden="true"></span>`),jo=W(`<span class="mt-0.5 block text-xs text-vc-muted"> </span>`),Mo=W(`<span class="mt-0.5 block truncate text-xs text-vc-working"> </span>`),No=W(`<span class="absolute top-0.5 right-0.5 size-2.5 rounded-full bg-vc-comment ring-2 ring-white"></span>`),Po=W(`<!> <button type="button" data-vc-ui=""><!> <span class="vc-pin-text absolute top-2.5 left-[42px] block w-max max-w-[240px] text-[13px] leading-[18px] text-vc-ink svelte-2kdshp" aria-hidden="true"><span class="block truncate whitespace-nowrap"><span class="font-medium"> </span> <span class="ml-1 text-vc-muted"> </span></span> <span class="line-clamp-2 block break-words whitespace-pre-line"> </span> <!> <!></span> <!></button>`,1),Fo={hash:`svelte-2kdshp`,code:`.vc-pin.svelte-2kdshp {transform:translateY(-100%);transition:width 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
5
6
  height 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
6
7
  border-radius 220ms ease,
7
8
  box-shadow 160ms ease,
8
- opacity 160ms ease;}.vc-pin.svelte-2kdshp .vc-pin-avatar {top:4px;left:4px;transition:top 220ms cubic-bezier(0.2, 0.9, 0.3, 1), left 220ms cubic-bezier(0.2, 0.9, 0.3, 1);}.vc-pin-expanded.svelte-2kdshp .vc-pin-avatar {top:10px;left:10px;}.vc-pin-text.svelte-2kdshp {transition:opacity 140ms ease 60ms;}
9
+ opacity 160ms ease;}.vc-pin.svelte-2kdshp .vc-pin-avatar {top:4px;left:4px;transition:top 220ms cubic-bezier(0.2, 0.9, 0.3, 1), left 220ms cubic-bezier(0.2, 0.9, 0.3, 1);}.vc-pin-expanded.svelte-2kdshp .vc-pin-avatar {top:10px;left:10px;}
10
+ /* The collapsed pin's shape, under it: its ring pulses out from the pin's edge. */.vc-pin-pulse.svelte-2kdshp {width:32px;height:32px;border-radius:16px 16px 16px 0;transform:translateY(-100%);}.vc-pin-text.svelte-2kdshp {transition:opacity 140ms ease 60ms;}
9
11
  @media (prefers-reduced-motion: reduce) {.vc-pin.svelte-2kdshp,
10
12
  .vc-pin.svelte-2kdshp .vc-pin-avatar,
11
13
  .vc-pin-text.svelte-2kdshp {transition:none;}
12
- }`};function bo(e,t){qe(t,!0),mi(e,yo);let n=j(()=>t.thread.comments[0]),r=j(()=>lo(H(n))),i=j(()=>t.thread.comments.length-1),a=N(!1),o=N(!1),s=N(0),c=N(0),l=j(()=>(H(a)||H(o))&&!t.open&&H(s)>0);var u=vo();let d;var f=F(u);co(f,{get user(){return H(n).author},size:24,class:`vc-pin-avatar absolute`});var p=L(f,2);let m;var h=F(p),g=F(h),_=I(g,!0),v=I(L(g,2),!0);O(h);var y=L(h,2),b=I(y,!0),x=L(y,2),S=e=>{var t=go(),n=I(t);R(()=>q(n,`${H(i)??``} ${H(i)===1?`reply`:`replies`}`)),K(e,t)};J(x,e=>{H(i)>0&&e(S)}),O(p);var C=L(p,2),w=e=>{K(e,_o())};J(C,e=>{t.thread.unread&&e(w)}),O(u),R((e,i)=>{X(u,1,Y([`vc-pin pointer-events-auto absolute block overflow-hidden bg-white text-left outline-none`,H(l)?`z-30`:t.open?`z-20`:`z-10`,t.thread.resolvedAt&&!H(l)&&!t.open&&`opacity-60`,H(l)&&`vc-pin-expanded`]),`svelte-2kdshp`),Z(u,`aria-label`,`Comment #${t.thread.id??``} by ${H(n).author.name??``}: ${H(r)??``}`),Z(u,`aria-expanded`,t.open),d=wi(u,``,d,{left:`${t.left??``}px`,top:`${t.top??``}px`,width:`${H(l)?H(s)+54:32}px`,height:e,"border-radius":H(l)?`18px 18px 18px 4px`:`16px 16px 16px 0`,"box-shadow":t.open?`0 0 0 2px var(--color-vc-comment), 0 2px 8px rgb(0 0 0 / 0.25)`:H(l)?`0 4px 18px rgb(0 0 0 / 0.22)`:`0 1px 4px rgb(0 0 0 / 0.3)`}),m=wi(p,``,m,{opacity:+!!H(l)}),q(_,H(n).author.name),q(v,i),q(b,H(r))},[()=>`${H(l)?Math.max(44,H(c)+20):32}px`,()=>po(H(n).createdAt,t.now)]),vr(`pointerenter`,u,()=>P(a,!0)),vr(`pointerleave`,u,()=>P(a,!1)),vr(`focus`,u,()=>P(o,!0)),vr(`blur`,u,()=>P(o,!1)),U(`click`,u,function(...e){t.onopen?.apply(this,e)}),Ii(p,`offsetWidth`,e=>P(s,e)),Ii(p,`offsetHeight`,e=>P(c,e)),fi(1,u,()=>ho,()=>({duration:240,easing:no})),fi(2,u,()=>ho,()=>({duration:140,easing:ro})),K(e,u),Je()}yr([`click`]);var xo=W(`<button type="button"><!></button> <div popover="auto"><!></div>`,1);function So(e,t){let n=Ar(),r=Q(t,`align`,3,`start`),i=Q(t,`tone`,3,`light`),a=Q(t,`class`,3,``),o=N(void 0),s=N(void 0),c=N(!1);function l(e){if(P(c,e.newState===`open`),e.newState!==`open`||!H(o)||!H(s))return;let t=H(o).getBoundingClientRect(),n=r()===`start`?t.left:t.right-H(s).offsetWidth;H(s).style.left=`${Math.max(12,Math.min(n,window.innerWidth-H(s).offsetWidth-12))}px`,H(s).style.top=`${Math.max(12,Math.min(t.bottom+6,window.innerHeight-H(s).offsetHeight-12))}px`}let u=()=>H(s)?.hidePopover();var d=xo(),f=sn(d);Wr(F(f),()=>t.trigger),O(f),Ri(f,e=>P(o,e),()=>H(o));var p=L(f,2);Wr(F(p),()=>t.children,()=>u),O(p),Ri(p,e=>P(s,e),()=>H(s)),R(()=>{Z(f,`popovertarget`,`vc-menu-${n}`),Z(f,`aria-label`,t.label),Z(f,`aria-expanded`,H(c)),Z(f,`aria-controls`,`vc-menu-${n}`),Z(f,`title`,t.label),X(f,1,Y(a())),Z(p,`id`,`vc-menu-${n}`),X(p,1,Y([`vc-menu vc-ui fixed inset-auto m-0 max-h-[min(70vh,560px)] w-max min-w-52 max-w-[calc(100vw-24px)] overflow-y-auto rounded border p-1 text-[13px] shadow-lg`,i()===`dark`?`border-white/10 bg-vc-ink text-white/90`:`border-vc-line bg-vc-surface text-vc-ink`]))}),vr(`toggle`,p,l),K(e,d)}var Co=W(`<span class="w-4 shrink-0 text-vc-accent"><!></span>`),wo=W(`<span class="shrink-0 opacity-50"> </span>`),To=W(`<button type="button" role="menuitem"><!> <span class="min-w-0 flex-1 truncate"><!></span> <!></button>`);function Eo(e,t){let n=Q(t,`tone`,3,`light`);var r=To(),i=F(r),a=e=>{var n=Co(),r=F(n),i=e=>{$(e,{name:`check`,size:14})};J(r,e=>{t.checked&&e(i)}),O(n),K(e,n)};J(i,e=>{t.checked!==void 0&&e(a)});var o=L(i,2);Wr(F(o),()=>t.children),O(o);var s=L(o,2),c=e=>{var n=wo(),r=I(n,!0);R(()=>q(r,t.hint)),K(e,n)};J(s,e=>{t.hint&&e(c)}),O(r),R(()=>X(r,1,Y([`flex w-full items-center gap-2 rounded-[2px] px-2 py-1.5 text-left`,n()===`dark`?`hover:bg-white/10 focus-visible:bg-white/10`:`hover:bg-vc-wash focus-visible:bg-vc-wash`,`outline-none`]))),U(`click`,r,function(...e){t.onselect?.apply(this,e)}),K(e,r)}yr([`click`]);var Do=W(`<!> <!> <!>`,1),Oo=W(`<!> <button type="button"><!></button>`,1),ko=W(`<p class="shrink-0 border-b border-vc-line/70 bg-vc-comment-soft px-3.5 py-1.5 text-xs text-vc-ink"> </p>`),Ao=W(`<span class="text-vc-muted">· edited</span>`),jo=W(`<!> <!>`,1),Mo=W(`<div class="ml-auto opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100 has-[[aria-expanded=true]]:opacity-100"><!></div>`),No=W(`<div class="mt-1"><!></div>`),Po=W(`<p class="break-words whitespace-pre-wrap"> </p>`),Fo=W(`<a target="_blank" rel="noopener" title="Open full size" class="block overflow-hidden rounded-lg border border-vc-line/70 bg-vc-surface hover:border-vc-line"><img loading="lazy"/></a>`),Io=W(`<div></div>`),Lo=W(`<li><!> <div class="min-w-0 flex-1"><div class="flex h-6 items-center gap-1.5"><p class="min-w-0 truncate"><span class="font-medium"> </span> <time class="ml-1 text-vc-muted"> </time> <!></p> <!></div> <!></div></li>`),Ro=W(`<footer class="flex shrink-0 items-start gap-2.5 border-t border-vc-line/70 px-3.5 py-3"><!> <div class="min-w-0 flex-1"><!></div></footer>`),zo=W(`<div data-vc-ui="" role="dialog" class="pointer-events-auto flex w-[320px] cursor-default flex-col overflow-hidden rounded-[12px] bg-white text-[13px] text-vc-ink shadow-[0_4px_24px_rgb(0_0_0/0.22)]"><header class="flex h-11 shrink-0 items-center gap-0.5 border-b border-vc-line/70 pr-1.5 pl-3.5"><p class="min-w-0 flex-1 truncate text-vc-muted"> </p> <!> <button type="button" class="vc-tool-light size-7 rounded-full" title="Close (Esc)" aria-label="Close"><!></button></header> <!> <ol data-vc-scroll="" class="min-h-0 flex-1 overflow-y-auto overscroll-contain px-3.5 py-1"></ol> <!></div>`);function Bo(e,t){qe(t,!0);let n=Ua(),r=n.store,i=j(()=>n.viewer),a=j(()=>Object.entries(t.thread.context).map(([e,t])=>`${e}: ${t}`).join(`
13
- `)),o=j(()=>t.thread.comments[0]?.author.sub===H(i)?.sub),s=N(void 0),c=N(void 0);yn(()=>{t.thread.comments.length,lr().then(()=>H(c)?.scrollTo({top:H(c).scrollHeight}))});async function l(e,t){(!t||confirm(`Delete this thread and all its replies?`))&&await r.removeComment(e)}function u(){t.link&&navigator.clipboard?.writeText(t.link)}var d=zo();let f;var p=F(d),m=F(p),g=I(m),_=L(m,2),v=e=>{var n=Oo(),i=sn(n);So(i,{label:`Thread options`,align:`end`,class:`vc-tool-light size-7 rounded-full`,trigger:e=>{$(e,{name:`more`})},children:(e,n=h)=>{var i=Do(),a=sn(i);Eo(a,{onselect:()=>{n()(),r.markRead(t.thread.id,!1),t.onclose()},children:(e,t)=>{we(),K(e,G(`Mark as unread`))},$$slots:{default:!0}});var s=L(a,2),c=e=>{Eo(e,{onselect:()=>{n()(),u()},children:(e,t)=>{we(),K(e,G(`Copy link`))},$$slots:{default:!0}})};J(s,e=>{t.link&&e(c)});var d=L(s,2),f=e=>{Eo(e,{onselect:()=>{n()(),l(t.thread.comments[0].id,!0)},children:(e,t)=>{we(),K(e,G(`Delete thread…`))},$$slots:{default:!0}})};J(d,e=>{H(o)&&e(f)}),K(e,i)},$$slots:{trigger:!0,default:!0}});var a=L(i,2);$(F(a),{name:`resolve`,size:18}),O(a),R(e=>{X(a,1,Y([`vc-tool-light size-7 rounded-full`,t.thread.resolvedAt&&`text-vc-comment`])),Z(a,`aria-pressed`,e),Z(a,`title`,t.thread.resolvedAt?`Reopen`:`Resolve`),Z(a,`aria-label`,t.thread.resolvedAt?`Reopen`:`Resolve`)},[()=>!!t.thread.resolvedAt]),U(`click`,a,()=>{let e=!t.thread.resolvedAt;r.resolve(t.thread.id,e),e&&t.onclose()}),K(e,n)};J(_,e=>{H(i)&&e(v)});var y=L(_,2);$(F(y),{name:`close`}),O(y),O(p);var b=L(p,2),x=e=>{var n=ko(),i=I(n);R(e=>q(i,`Resolved${t.thread.resolvedBy?` by ${t.thread.resolvedBy.name}`:``}, ${e??``}`),[()=>po(t.thread.resolvedAt,r.now)]),K(e,n)};J(b,e=>{t.thread.resolvedAt&&e(x)});var S=L(b,2);Qr(S,23,()=>t.thread.comments,e=>e.id,(e,t,n)=>{let a=j(()=>H(t).author.sub===H(i)?.sub);var o=Lo(),c=F(o);co(c,{get user(){return H(t).author},size:24});var u=L(c,2),d=F(u),f=F(d),p=F(f),m=I(p,!0),g=L(p,2),_=I(g,!0),v=L(g,2),y=e=>{var n=Ao();R(e=>Z(n,`title`,e),[()=>mo(H(t).editedAt)]),K(e,n)};J(v,e=>{H(t).editedAt&&e(y)}),O(f);var b=L(f,2),x=e=>{var r=Mo();So(F(r),{label:`Comment options`,align:`end`,class:`vc-tool-light size-6 rounded-full`,trigger:e=>{$(e,{name:`more`,size:14})},children:(e,r=h)=>{var i=jo(),a=sn(i);Eo(a,{onselect:()=>{r()(),P(s,H(t).id,!0)},children:(e,t)=>{we(),K(e,G(`Edit`))},$$slots:{default:!0}}),Eo(L(a,2),{onselect:()=>{r()(),l(H(t).id,H(n)===0)},children:(e,t)=>{we();var r=G();R(()=>q(r,H(n)===0?`Delete thread…`:`Delete`)),K(e,r)},$$slots:{default:!0}}),K(e,i)},$$slots:{trigger:!0,default:!0}}),O(r),K(e,r)};J(b,e=>{H(a)&&!H(t).pending&&H(s)!==H(t).id&&e(x)}),O(d);var S=L(d,2),C=e=>{var n=No();to(F(n),{variant:`edit`,placeholder:`Edit comment`,get initial(){return H(t).body},get initialImages(){return H(t).images},autofocus:!0,onsubmit:async(e,n)=>{await r.edit(H(t).id,e,n),P(s,void 0)},oncancel:()=>P(s,void 0)}),O(n),K(e,n)},w=e=>{var n=jo(),i=sn(n),a=e=>{var n=Po(),r=I(n,!0);R(()=>q(r,H(t).body)),K(e,n)};J(i,e=>{H(t).body&&e(a)});var o=L(i,2),s=e=>{let n=j(()=>H(t).images.length>1);var i=Io();Qr(i,23,()=>H(t).images,e=>e.id,(e,t,i)=>{var a=Fo(),o=I(a);R((e,r)=>{Z(a,`href`,e),Z(o,`src`,r),Z(o,`alt`,`Image ${H(i)+1}`),Z(o,`width`,H(t).width),Z(o,`height`,H(t).height),X(o,1,Y([`block w-full`,H(n)?`aspect-square object-cover`:`h-auto max-h-64 object-contain`]))},[()=>r.imageUrl(H(t)),()=>r.imageUrl(H(t))]),K(e,a)}),O(i),R(()=>X(i,1,Y([`mt-1.5 grid gap-1.5`,H(n)&&`grid-cols-2`]))),K(e,i)};J(o,e=>{H(t).images.length&&e(s)}),K(e,n)};J(S,e=>{H(s)===H(t).id?e(C):e(w,-1)}),O(u),O(o),R((e,n,r)=>{X(o,1,Y([`group flex gap-2.5 py-2.5`,H(t).pending&&`opacity-60`])),q(m,H(t).author.name),Z(g,`datetime`,e),Z(g,`title`,n),q(_,r)},[()=>new Date(H(t).createdAt).toISOString(),()=>mo(H(t).createdAt),()=>H(t).pending?`sending…`:po(H(t).createdAt,r.now)]),K(e,o)}),O(S),Ri(S,e=>P(c,e),()=>H(c));var C=L(S,2),w=e=>{var n=Ro(),a=F(n);co(a,{get user(){return H(i)},size:24,class:`mt-[3px]`});var o=L(a,2);Jr(F(o),()=>t.thread.id,e=>{to(e,{placeholder:`Reply`,autofocus:!0,onsubmit:(e,n)=>r.reply(t.thread.id,e,n),get oncancel(){return t.onclose}})}),O(o),O(n),K(e,n)};J(C,e=>{H(i)&&e(w)}),O(d),R(()=>{Z(d,`aria-label`,`Comment #${t.thread.id??``}`),f=wi(d,``,f,{"max-height":`${t.maxHeight??``}px`}),Z(m,`title`,H(a)||void 0),q(g,`#${t.thread.id??``} · ${t.title??``}`)}),U(`click`,y,function(...e){t.onclose?.apply(this,e)}),K(e,d),Je()}yr([`click`]);function Vo(e,t,n,r,i){let a=Math.min(r.radius,r.width/2,r.height/2),o=Ho(e,r.left+a,r.left+r.width-a),s=Ho(t,r.top+a,r.top+r.height-a),c=Math.hypot(e-o,t-s),l=c-a;if(l<=n||l>i)return;let u=(o-e)/c,d=(s-t)/c,f=-d,p=u,m=o-u*(a-1),h=s-d*(a-1),g=Math.min(1,(l-n)/Math.max(i-n,1)),_=n*.85,v=n*(1.8-.8*g),y=2*Math.max(.6,n*(.55-.35*g))-(_+v)/2,b=e+u*n*.3,x=t+d*n*.3,S=(b+m)/2,C=(x+h)/2,w=(e,t,n,r)=>`${(e+f*n*r).toFixed(2)} ${(t+p*n*r).toFixed(2)}`;return[`M ${w(b,x,1,_)}`,`Q ${w(S,C,1,y)} ${w(m,h,1,v)}`,`L ${w(m,h,-1,v)}`,`Q ${w(S,C,-1,y)} ${w(b,x,-1,_)}`,`Z`].join(` `)}var Ho=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n)),Uo=Or(`<svg width="28" height="28" viewBox="0 0 28 28" aria-hidden="true"><path d="M14 1.5a12.5 12.5 0 1 1 0 25H1.5V14A12.5 12.5 0 0 1 14 1.5z" fill="white" stroke="#1c1917" stroke-width="1.5" class="svelte-q7vqsu"></path><path d="M14 9v10M9 14h10" stroke="#1c1917" stroke-width="1.5" stroke-linecap="round" class="svelte-q7vqsu"></path></svg>`),Wo=Or(`<path class="svelte-q7vqsu"></path>`),Go=Or(`<svg class="vc-dot svelte-q7vqsu" aria-hidden="true"><g class="svelte-q7vqsu"><!><circle class="svelte-q7vqsu"></circle></g></svg>`),Ko=W(`<span class="vc-target vc-target-aim absolute svelte-q7vqsu" aria-hidden="true"></span>`),qo=W(`<span aria-hidden="true"></span>`),Jo=W(`<button type="button" class="vc-target-tool svelte-q7vqsu" aria-label="Select the element inside" title="Inside (⌥↓)"><!></button>`),Yo=W(`<button type="button" class="vc-target-tool svelte-q7vqsu" aria-label="Select the element around it" title="Around it (⌥↑)"><!></button>`),Xo=W(`<div class="mt-1.5 flex w-fit max-w-[296px] items-center rounded-full bg-white py-0.5 pr-0.5 pl-3 text-xs text-vc-muted shadow-[0_1px_6px_rgb(0_0_0/0.16)] svelte-q7vqsu"><span class="min-w-0 truncate pr-1 svelte-q7vqsu"> </span> <!> <!> <button type="button" class="vc-target-tool svelte-q7vqsu" aria-label="Pin to the point instead" title="Pin to the point instead"><!></button></div>`),Zo=W(`<!> <!>`,1),Qo=W(`<div class="flex w-[296px] items-center gap-3 rounded-[18px] bg-white py-2 pr-2 pl-4 text-[13px] text-vc-ink shadow-[0_2px_14px_rgb(0_0_0/0.18)] svelte-q7vqsu"><p class="flex-1 svelte-q7vqsu">Sign in to comment.</p> <button type="button" class="h-7 rounded-full bg-vc-comment px-3 font-medium text-white hover:brightness-110 svelte-q7vqsu">Sign in</button></div>`),$o=W(`<span class="vc-draft-pin absolute z-20 block size-8 bg-vc-comment shadow-[0_1px_4px_rgb(0_0_0/0.3)] svelte-q7vqsu" aria-hidden="true"></span> <div data-vc-ui="" role="group" aria-label="New comment"><!></div>`,1),es=W(`<div class="absolute z-40 svelte-q7vqsu"><!></div>`),ts=W(`<!> <!> <!> <!> <!> <!> <!>`,1),ns={hash:`svelte-q7vqsu`,code:`.vc-cursor.svelte-q7vqsu {position:fixed;z-index:50;transform-origin:1px 27px;transition:opacity 140ms ease, scale 140ms ease;}.vc-cursor-hidden.svelte-q7vqsu {opacity:0;scale:0.6;}.vc-dot.svelte-q7vqsu {position:fixed;inset:0;z-index:50;width:100%;height:100%;overflow:visible;
14
+ }`};function Io(e,t){qe(t,!0),mi(e,Fo);let n=j(()=>t.thread.comments[0]),r=j(()=>go(H(n))),i=j(()=>t.thread.comments.length-1),a=N(!1),o=N(!1),s=N(0),c=N(0),l=j(()=>(H(a)||H(o))&&!t.open&&H(s)>0);var u=Po(),d=I(u),f=e=>{var n=Ao();let r;z(()=>{X(n,1,Y([`vc-pin-pulse vc-working pointer-events-none absolute`,H(l)?`z-30`:t.open?`z-20`:`z-10`]),`svelte-2kdshp`),r=wi(n,``,r,{left:`${t.left??``}px`,top:`${t.top??``}px`})}),K(e,n)};J(d,e=>{t.working&&e(f)});var p=R(d,2);let m;var h=F(p);wo(h,{get user(){return H(n).author},size:24,class:`vc-pin-avatar absolute`});var g=R(h,2);let _;var v=F(g),y=F(v),b=L(y,!0),x=L(R(y,2),!0);D(v);var S=R(v,2),C=L(S,!0),w=R(S,2),ee=e=>{var t=jo(),n=L(t);z(()=>q(n,`${H(i)??``} ${H(i)===1?`reply`:`replies`}`)),K(e,t)};J(w,e=>{H(i)>0&&e(ee)});var te=R(w,2),ne=e=>{var n=Mo(),r=L(n,!0);z(()=>q(r,t.working)),K(e,n)};J(te,e=>{t.working&&e(ne)}),D(g);var re=R(g,2),ie=e=>{K(e,No())};J(re,e=>{t.thread.unread&&e(ie)}),D(p),z((e,i)=>{X(p,1,Y([`vc-pin pointer-events-auto absolute block overflow-hidden bg-white text-left outline-none`,H(l)?`z-30`:t.open?`z-20`:`z-10`,t.thread.resolvedAt&&!H(l)&&!t.open&&`opacity-60`,H(l)&&`vc-pin-expanded`]),`svelte-2kdshp`),Z(p,`aria-label`,`Comment #${t.thread.id??``} by ${H(n).author.name??``}: ${H(r)??``}${t.working?`. ${t.working}`:``}`),Z(p,`aria-expanded`,t.open),m=wi(p,``,m,{left:`${t.left??``}px`,top:`${t.top??``}px`,width:`${H(l)?H(s)+54:32}px`,height:e,"border-radius":H(l)?`18px 18px 18px 4px`:`16px 16px 16px 0`,"box-shadow":t.open?`0 0 0 2px var(--color-vc-comment), 0 2px 8px rgb(0 0 0 / 0.25)`:H(l)?`0 4px 18px rgb(0 0 0 / 0.22)`:`0 1px 4px rgb(0 0 0 / 0.3)`}),_=wi(g,``,_,{opacity:+!!H(l)}),q(b,H(n).author.name),q(x,i),q(C,H(r))},[()=>`${H(l)?Math.max(44,H(c)+20):32}px`,()=>Do(H(n).createdAt,t.now)]),vr(`pointerenter`,p,()=>P(a,!0)),vr(`pointerleave`,p,()=>P(a,!1)),vr(`focus`,p,()=>P(o,!0)),vr(`blur`,p,()=>P(o,!1)),U(`click`,p,function(...e){t.onopen?.apply(this,e)}),Ii(g,`offsetWidth`,e=>P(s,e)),Ii(g,`offsetHeight`,e=>P(c,e)),fi(1,p,()=>ko,()=>({duration:240,easing:mo})),fi(2,p,()=>ko,()=>({duration:140,easing:ho})),K(e,u),Je()}yr([`click`]);var Lo=W(`<button type="button"><!></button> <div popover="auto"><!></div>`,1);function Ro(e,t){let n=Ar();qe(t,!0);let r=Q(t,`align`,3,`start`),i=Q(t,`tone`,3,`light`),a=Q(t,`class`,3,``),o=N(void 0),s=N(void 0),c=N(!1);function l(e){if(P(c,e.newState===`open`),e.newState!==`open`||!H(o)||!H(s))return;t.onopen?.();let n=H(o).getBoundingClientRect(),i=r()===`start`?n.left:n.right-H(s).offsetWidth;H(s).style.left=`${Math.max(12,Math.min(i,window.innerWidth-H(s).offsetWidth-12))}px`,H(s).style.top=`${Math.max(12,Math.min(n.bottom+6,window.innerHeight-H(s).offsetHeight-12))}px`}let u=()=>H(s)?.hidePopover();var d=Lo(),f=I(d);Wr(F(f),()=>t.trigger),D(f),Ri(f,e=>P(o,e),()=>H(o));var p=R(f,2);Wr(F(p),()=>t.children,()=>u),D(p),Ri(p,e=>P(s,e),()=>H(s)),z(()=>{Z(f,`popovertarget`,`vc-menu-${n}`),Z(f,`aria-label`,t.label),Z(f,`aria-expanded`,H(c)),Z(f,`aria-controls`,`vc-menu-${n}`),Z(f,`title`,t.label),X(f,1,Y(a())),Z(p,`id`,`vc-menu-${n}`),X(p,1,Y([`vc-menu vc-ui fixed inset-auto m-0 max-h-[min(70vh,560px)] w-max min-w-52 max-w-[calc(100vw-24px)] overflow-y-auto rounded border p-1 text-[13px] shadow-lg`,i()===`dark`?`border-white/10 bg-vc-ink text-white/90`:`border-vc-line bg-vc-surface text-vc-ink`]))}),vr(`toggle`,p,l),K(e,d),Je()}var zo=W(`<span class="w-4 shrink-0 text-vc-accent"><!></span>`),Bo=W(`<span class="shrink-0 opacity-50"> </span>`),Vo=W(`<button type="button" role="menuitem"><!> <span class="min-w-0 flex-1 truncate"><!></span> <!></button>`);function Ho(e,t){let n=Q(t,`tone`,3,`light`);var r=Vo(),i=F(r),a=e=>{var n=zo(),r=F(n),i=e=>{$(e,{name:`check`,size:14})};J(r,e=>{t.checked&&e(i)}),D(n),K(e,n)};J(i,e=>{t.checked!==void 0&&e(a)});var o=R(i,2);Wr(F(o),()=>t.children),D(o);var s=R(o,2),c=e=>{var n=Bo(),r=L(n,!0);z(()=>q(r,t.hint)),K(e,n)};J(s,e=>{t.hint&&e(c)}),D(r),z(()=>X(r,1,Y([`flex w-full items-center gap-2 rounded-[2px] px-2 py-1.5 text-left`,n()===`dark`?`hover:bg-white/10 focus-visible:bg-white/10`:`hover:bg-vc-wash focus-visible:bg-vc-wash`,`outline-none`]))),U(`click`,r,function(...e){t.onselect?.apply(this,e)}),K(e,r)}yr([`click`]);var Uo={viewing:0,typing:1,working:2};function Wo(e){let t=new Map;for(let n of e){let e=t.get(n.author.sub);e?e.push(n):t.set(n.author.sub,[n])}return[...t.values()].map(e=>(e.sort((e,t)=>Uo[t.state]-Uo[e.state]),{author:e[0].author,state:e[0].state,participants:e}))}function Go(e){let{name:t}=e.author;if(e.state===`typing`)return`${t} is typing…`;if(e.state===`working`)return e.note?`${t} is working: ${e.note}`:`${t} is working…`}var Ko=W(`<!> <!> <!>`,1),qo=W(`<!> <button type="button"><!></button>`,1),Jo=W(`<p class="shrink-0 border-b border-vc-line/70 bg-vc-comment-soft px-3.5 py-1.5 text-xs text-vc-ink"> </p>`),Yo=W(`<span class="text-vc-muted">· edited</span>`),Xo=W(`<!> <!>`,1),Zo=W(`<div class="ml-auto opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100 has-[[aria-expanded=true]]:opacity-100"><!></div>`),Qo=W(`<div class="mt-1"><!></div>`),$o=W(`<p class="break-words whitespace-pre-wrap"> </p>`),es=W(`<a target="_blank" rel="noopener" title="Open full size" class="block overflow-hidden rounded-lg border border-vc-line/70 bg-vc-surface hover:border-vc-line"><img loading="lazy"/></a>`),ts=W(`<div></div>`),ns=W(`<li><!> <div class="min-w-0 flex-1"><div class="flex h-6 items-center gap-1.5"><p class="min-w-0 truncate"><span class="font-medium"> </span> <time class="ml-1 text-vc-muted"> </time> <!></p> <!></div> <!></div></li>`),rs=W(`<p class="truncate"> </p>`),is=W(`<div class="shrink-0 space-y-0.5 px-3.5 pb-2 text-xs text-vc-muted" aria-live="polite"></div>`),as=W(`<footer class="flex shrink-0 items-start gap-2.5 border-t border-vc-line/70 px-3.5 py-3"><!> <div class="min-w-0 flex-1"><!></div></footer>`),os=W(`<div data-vc-ui="" role="dialog" class="pointer-events-auto flex w-[320px] cursor-default flex-col overflow-hidden rounded-[12px] bg-white text-[13px] text-vc-ink shadow-[0_4px_24px_rgb(0_0_0/0.22)]"><header class="flex h-11 shrink-0 items-center gap-0.5 border-b border-vc-line/70 pr-1.5 pl-3.5"><p class="min-w-0 flex-1 truncate text-vc-muted"> </p> <!> <button type="button" class="vc-tool-light size-7 rounded-full" title="Close (Esc)" aria-label="Close"><!></button></header> <!> <ol data-vc-scroll="" class="min-h-0 flex-1 overflow-y-auto overscroll-contain px-3.5 py-1"></ol> <!> <!></div>`);function ss(e,t){qe(t,!0);let n=Ua(),r=n.store,i=j(()=>n.viewer),a=j(()=>Object.entries(t.thread.context).map(([e,t])=>`${e}: ${t}`).join(`
15
+ `)),o=j(()=>t.thread.comments[0]?.author.sub===H(i)?.sub),s=N(void 0),c=j(()=>[...new Set(n.participants.filter(e=>e.thread===t.thread.id&&e.state!==`viewing`&&e.author.sub!==H(i)?.sub).sort((e,t)=>Number(t.state===`working`)-Number(e.state===`working`)).map(Go).filter(e=>!!e))]),l=N(void 0);vn(()=>{t.thread.comments.length,lr().then(()=>H(l)?.scrollTo({top:H(l).scrollHeight}))});async function u(e,t){(!t||confirm(`Delete this thread and all its replies?`))&&await r.removeComment(e)}function d(){t.link&&navigator.clipboard?.writeText(t.link)}var f=os();let p;var m=F(f),g=F(m),_=L(g),v=R(g,2),y=e=>{var n=qo(),i=I(n);Ro(i,{label:`Thread options`,align:`end`,class:`vc-tool-light size-7 rounded-full`,trigger:e=>{$(e,{name:`more`})},children:(e,n=h)=>{var i=Ko(),a=I(i);Ho(a,{onselect:()=>{n()(),r.markRead(t.thread.id,!1),t.onclose()},children:(e,t)=>{O(),K(e,G(`Mark as unread`))},$$slots:{default:!0}});var s=R(a,2),c=e=>{Ho(e,{onselect:()=>{n()(),d()},children:(e,t)=>{O(),K(e,G(`Copy link`))},$$slots:{default:!0}})};J(s,e=>{t.link&&e(c)});var l=R(s,2),f=e=>{Ho(e,{onselect:()=>{n()(),u(t.thread.comments[0].id,!0)},children:(e,t)=>{O(),K(e,G(`Delete thread…`))},$$slots:{default:!0}})};J(l,e=>{H(o)&&e(f)}),K(e,i)},$$slots:{trigger:!0,default:!0}});var a=R(i,2);$(F(a),{name:`resolve`,size:18}),D(a),z(e=>{X(a,1,Y([`vc-tool-light size-7 rounded-full`,t.thread.resolvedAt&&`text-vc-comment`])),Z(a,`aria-pressed`,e),Z(a,`title`,t.thread.resolvedAt?`Reopen`:`Resolve`),Z(a,`aria-label`,t.thread.resolvedAt?`Reopen`:`Resolve`)},[()=>!!t.thread.resolvedAt]),U(`click`,a,()=>{let e=!t.thread.resolvedAt;r.resolve(t.thread.id,e),e&&t.onclose()}),K(e,n)};J(v,e=>{H(i)&&e(y)});var b=R(v,2);$(F(b),{name:`close`}),D(b),D(m);var x=R(m,2),S=e=>{var n=Jo(),i=L(n);z(e=>q(i,`Resolved${t.thread.resolvedBy?` by ${t.thread.resolvedBy.name}`:``}, ${e??``}`),[()=>Do(t.thread.resolvedAt,r.now)]),K(e,n)};J(x,e=>{t.thread.resolvedAt&&e(S)});var C=R(x,2);Qr(C,23,()=>t.thread.comments,e=>e.id,(e,t,a)=>{let o=j(()=>H(t).author.sub===H(i)?.sub);var c=ns(),l=F(c);wo(l,{get user(){return H(t).author},size:24});var d=R(l,2),f=F(d),p=F(f),m=F(p),g=L(m,!0),_=R(m,2),v=L(_,!0),y=R(_,2),b=e=>{var n=Yo();z(e=>Z(n,`title`,e),[()=>Oo(H(t).editedAt)]),K(e,n)};J(y,e=>{H(t).editedAt&&e(b)}),D(p);var x=R(p,2),S=e=>{var n=Zo();Ro(F(n),{label:`Comment options`,align:`end`,class:`vc-tool-light size-6 rounded-full`,trigger:e=>{$(e,{name:`more`,size:14})},children:(e,n=h)=>{var r=Xo(),i=I(r);Ho(i,{onselect:()=>{n()(),P(s,H(t).id,!0)},children:(e,t)=>{O(),K(e,G(`Edit`))},$$slots:{default:!0}}),Ho(R(i,2),{onselect:()=>{n()(),u(H(t).id,H(a)===0)},children:(e,t)=>{O();var n=G();z(()=>q(n,H(a)===0?`Delete thread…`:`Delete`)),K(e,n)},$$slots:{default:!0}}),K(e,r)},$$slots:{trigger:!0,default:!0}}),D(n),K(e,n)};J(x,e=>{H(o)&&!H(t).pending&&H(s)!==H(t).id&&e(S)}),D(f);var C=R(f,2),w=e=>{var i=Qo();po(F(i),{variant:`edit`,placeholder:`Edit comment`,get initial(){return H(t).body},get initialImages(){return H(t).images},autofocus:!0,oninput:()=>n.noteTyping(),onsubmit:async(e,i)=>{n.stopTyping(),await r.edit(H(t).id,e,i),P(s,void 0)},oncancel:()=>P(s,void 0)}),D(i),K(e,i)},ee=e=>{var n=Xo(),i=I(n),a=e=>{var n=$o(),r=L(n,!0);z(()=>q(r,H(t).body)),K(e,n)};J(i,e=>{H(t).body&&e(a)});var o=R(i,2),s=e=>{let n=j(()=>H(t).images.length>1);var i=ts();Qr(i,23,()=>H(t).images,e=>e.id,(e,t,i)=>{var a=es(),o=L(a);z((e,r)=>{Z(a,`href`,e),Z(o,`src`,r),Z(o,`alt`,`Image ${H(i)+1}`),Z(o,`width`,H(t).width),Z(o,`height`,H(t).height),X(o,1,Y([`block w-full`,H(n)?`aspect-square object-cover`:`h-auto max-h-64 object-contain`]))},[()=>r.imageUrl(H(t)),()=>r.imageUrl(H(t))]),K(e,a)}),D(i),z(()=>X(i,1,Y([`mt-1.5 grid gap-1.5`,H(n)&&`grid-cols-2`]))),K(e,i)};J(o,e=>{H(t).images.length&&e(s)}),K(e,n)};J(C,e=>{H(s)===H(t).id?e(w):e(ee,-1)}),D(d),D(c),z((e,n,r,i)=>{X(c,1,Y([`group flex gap-2.5 py-2.5`,H(t).pending&&`opacity-60`])),Z(m,`title`,e),q(g,H(t).author.name),Z(_,`datetime`,n),Z(_,`title`,r),q(v,i)},[()=>H(t).author.agent?_o(H(t).author):void 0,()=>new Date(H(t).createdAt).toISOString(),()=>Oo(H(t).createdAt),()=>H(t).pending?`sending…`:Do(H(t).createdAt,r.now)]),K(e,c)}),D(C),Ri(C,e=>P(l,e),()=>H(l));var w=R(C,2),ee=e=>{var t=is();Qr(t,20,()=>H(c),e=>e,(e,t)=>{var n=rs(),r=L(n,!0);z(()=>{Z(n,`title`,t),q(r,t)}),K(e,n)}),D(t),K(e,t)};J(w,e=>{H(c).length&&e(ee)});var te=R(w,2),ne=e=>{var a=as(),o=F(a);wo(o,{get user(){return H(i)},size:24,class:`mt-[3px]`});var s=R(o,2);Jr(F(s),()=>t.thread.id,e=>{po(e,{placeholder:`Reply`,autofocus:!0,oninput:()=>n.noteTyping(),onsubmit:(e,i)=>(n.stopTyping(),r.reply(t.thread.id,e,i)),get oncancel(){return t.onclose}})}),D(s),D(a),K(e,a)};J(te,e=>{H(i)&&e(ne)}),D(f),z(()=>{Z(f,`aria-label`,`Comment #${t.thread.id??``}`),p=wi(f,``,p,{"max-height":`${t.maxHeight??``}px`}),Z(g,`title`,H(a)||void 0),q(_,`#${t.thread.id??``} · ${t.title??``}`)}),U(`click`,b,function(...e){t.onclose?.apply(this,e)}),K(e,f),Je()}yr([`click`]);function cs(e,t,n,r,i){let a=Math.min(r.radius,r.width/2,r.height/2),o=ls(e,r.left+a,r.left+r.width-a),s=ls(t,r.top+a,r.top+r.height-a),c=Math.hypot(e-o,t-s),l=c-a;if(l<=n||l>i)return;let u=(o-e)/c,d=(s-t)/c,f=-d,p=u,m=o-u*(a-1),h=s-d*(a-1),g=Math.min(1,(l-n)/Math.max(i-n,1)),_=n*.85,v=n*(1.8-.8*g),y=2*Math.max(.6,n*(.55-.35*g))-(_+v)/2,b=e+u*n*.3,x=t+d*n*.3,S=(b+m)/2,C=(x+h)/2,w=(e,t,n,r)=>`${(e+f*n*r).toFixed(2)} ${(t+p*n*r).toFixed(2)}`;return[`M ${w(b,x,1,_)}`,`Q ${w(S,C,1,y)} ${w(m,h,1,v)}`,`L ${w(m,h,-1,v)}`,`Q ${w(S,C,-1,y)} ${w(b,x,-1,_)}`,`Z`].join(` `)}var ls=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n)),us=Or(`<svg width="28" height="28" viewBox="0 0 28 28" aria-hidden="true"><path d="M14 1.5a12.5 12.5 0 1 1 0 25H1.5V14A12.5 12.5 0 0 1 14 1.5z" fill="white" stroke="#1c1917" stroke-width="1.5" class="svelte-q7vqsu"></path><path d="M14 9v10M9 14h10" stroke="#1c1917" stroke-width="1.5" stroke-linecap="round" class="svelte-q7vqsu"></path></svg>`),ds=Or(`<path class="svelte-q7vqsu"></path>`),fs=Or(`<svg class="vc-dot svelte-q7vqsu" aria-hidden="true"><g class="svelte-q7vqsu"><!><circle class="svelte-q7vqsu"></circle></g></svg>`),ps=W(`<span class="vc-target vc-target-aim absolute svelte-q7vqsu" aria-hidden="true"></span>`),ms=W(`<span aria-hidden="true"></span>`),hs=W(`<button type="button" class="vc-target-tool svelte-q7vqsu" aria-label="Select the element inside" title="Inside (⌥↓)"><!></button>`),gs=W(`<button type="button" class="vc-target-tool svelte-q7vqsu" aria-label="Select the element around it" title="Around it (⌥↑)"><!></button>`),_s=W(`<div class="mt-1.5 flex w-fit max-w-[296px] items-center rounded-full bg-white py-0.5 pr-0.5 pl-3 text-xs text-vc-muted shadow-[0_1px_6px_rgb(0_0_0/0.16)] svelte-q7vqsu"><span class="min-w-0 truncate pr-1 svelte-q7vqsu"> </span> <!> <!> <button type="button" class="vc-target-tool svelte-q7vqsu" aria-label="Pin to the point instead" title="Pin to the point instead"><!></button></div>`),vs=W(`<!> <!>`,1),ys=W(`<div class="flex w-[296px] items-center gap-3 rounded-[18px] bg-white py-2 pr-2 pl-4 text-[13px] text-vc-ink shadow-[0_2px_14px_rgb(0_0_0/0.18)] svelte-q7vqsu"><p class="flex-1 svelte-q7vqsu">Sign in to comment.</p> <button type="button" class="h-7 rounded-full bg-vc-comment px-3 font-medium text-white hover:brightness-110 svelte-q7vqsu">Sign in</button></div>`),bs=W(`<span class="vc-draft-pin absolute z-20 block size-8 bg-vc-comment shadow-[0_1px_4px_rgb(0_0_0/0.3)] svelte-q7vqsu" aria-hidden="true"></span> <div data-vc-ui="" role="group" aria-label="New comment"><!></div>`,1),xs=W(`<div class="absolute z-40 svelte-q7vqsu"><!></div>`),Ss=W(`<!> <!> <!> <!> <!> <!> <!>`,1),Cs={hash:`svelte-q7vqsu`,code:`.vc-cursor.svelte-q7vqsu {position:fixed;z-index:50;transform-origin:1px 27px;transition:opacity 140ms ease, scale 140ms ease;}.vc-cursor-hidden.svelte-q7vqsu {opacity:0;scale:0.6;}.vc-dot.svelte-q7vqsu {position:fixed;inset:0;z-index:50;width:100%;height:100%;overflow:visible;
14
16
  animation: svelte-q7vqsu-vc-dot-in 140ms ease;}
15
17
  /* One group, so where the neck overlaps the dot it is not darker. */.vc-dot.svelte-q7vqsu g:where(.svelte-q7vqsu) {fill:var(--color-vc-comment);opacity:0.5;}
16
18
  @keyframes svelte-q7vqsu-vc-dot-in {
@@ -43,9 +45,14 @@
43
45
  .vc-cursor.svelte-q7vqsu,
44
46
  .vc-dot.svelte-q7vqsu {
45
47
  animation: none;transition:none;}
46
- }`};function rs(e,t){qe(t,!0),mi(e,ns);let n=Ua(),r=n.store,i=N(void 0),a=N(0),o=N(!1);function s(){H(i)?.focus(),P(o,!1),requestAnimationFrame(()=>P(o,!0))}yn(()=>(n.onFocusDraft(s),()=>n.onFocusDraft(void 0)));function c(e){let t=n.active?n.panelRect??l():void 0,r=Pa(e.stage,{left:0,top:0,right:innerWidth,bottom:innerHeight});return t&&t.left<r.right&&t.left>r.left?{...r,right:t.left}:r}function l(){return{left:innerWidth-12-320,top:12,right:innerWidth-12,bottom:innerHeight-12}}function u(e){n.layout;let t=n.surface(e.surface);if(t)return{surface:t,...Ma(t,e)}}yn(()=>{n.layout;let e=n.revealing;e!==void 0&&fr(()=>{let t=r.threads.find(t=>t.id===e);if(!t?.anchor)return void(n.revealing=void 0);let i=u(t);i?.surface.doc&&(i.element&&i.hidden?n.revealElement(i.element):n.revealing=void 0)})});let d=j(()=>n.pinned.flatMap(e=>{let t=u(e);return t&&!t.hidden?[{thread:e,left:t.x,top:t.y}]:[]}));function f(e,t,n,r){let i=e.left+32+10;i+t>r.right-8&&(i=e.left-10-t),i=Math.max(r.left+8,Math.min(i,r.right-8-t));let a=Math.max(r.top+8,Math.min(e.top-32,r.bottom-8-n));return{left:i,top:a}}let p=j(()=>{let e=n.open,t=e&&u(e);if(!e||!t||t.hidden)return;let r=c(t.surface);return{thread:e,where:t,card:f({left:t.x,top:t.y},320,H(a),r),maxHeight:r.bottom-r.top-16}});function m(e,t=0){return{left:e.left-3,top:e.top-3,width:e.right-e.left+6,height:e.bottom-e.top+6,radius:t+3}}let h=j(()=>n.aim&&n.surface(n.aim.surface)),g=j(()=>{let e=n.aim;if(!e?.target||!H(h))return;let t=m(Aa(H(h),e.target.box),e.target.radius*H(h).docScale),r=e.targetBox,i=(e,t)=>Math.max(-1,Math.min(1,e/(t/2||1)))*3;return{...t,dx:i(e.point.x-(r.x+r.width/2),r.width),dy:i(e.point.y-(r.y+r.height/2),r.height)}}),_=j(()=>{let e=n.cursor;if(!e||!H(g))return;let t={left:H(g).left+H(g).dx,top:H(g).top+H(g).dy,width:H(g).width,height:H(g).height,radius:H(g).radius};return{...e,neck:Vo(e.x,e.y,4,t,22)}}),v=j(()=>n.draft&&n.surface(n.draft.surface)),y=j(()=>{n.layout;let e=n.draft?.target;if(!e||!H(v))return;if(!e.element.isConnected)return n.draft.targetBox;let t=e.element.getBoundingClientRect();return ja(H(v),{x:t.left,y:t.top,width:t.width,height:t.height})}),b=j(()=>{let e=n.draft?.target;if(!e||!H(y)||!H(v))return;let t=Ea(H(v),H(y).x,H(y).y),r=H(v).scale;return m({left:t.x,top:t.y,right:t.x+H(y).width*r,bottom:t.y+H(y).height*r},e.radius*H(v).docScale)}),x=j(()=>n.draft?.target&&H(v)&&Qi(n.draft.target,H(v).search)),S=j(()=>H(p)?.thread.anchor&&H(p).where.box&&m(H(p).where.box)),C=j(()=>H(b)||(n.draft?void 0:H(S)));function w(e){let t=n.draft;t&&H(v)&&e&&(t.target=e,t.targetBox=ja(H(v),e.box),H(i)?.focus())}function ee(){n.draft?.target&&H(x)&&(n.draft.inner=[n.draft.target,...n.draft.inner??[]],w(H(x)))}function te(){let[e,...t]=n.draft?.inner??[];n.draft&&e&&(n.draft.inner=t,w(e))}function ne(){let e=n.draft;e&&(e.x=e.point.x,e.y=e.point.y,e.target=void 0,e.targetBox=void 0,e.inner=void 0,H(i)?.focus())}function re(e){if(!(!e.altKey||e.metaKey||e.ctrlKey)){if(e.key===`ArrowUp`)ee();else if(e.key===`ArrowDown`)te();else return;e.preventDefault()}}let ie=j(()=>{let e=n.draft;if(!e||!H(v))return;let t=e.targetBox&&H(y),r=t?t.x+e.x-e.targetBox.x:e.x,i=t?t.y+e.y-e.targetBox.y:e.y,a=Ea(H(v),r,i),o={left:a.x,top:a.y};return{at:o,card:f({left:o.left,top:o.top+4},296,40,c(H(v)))}});async function ae(e,t){let i=n.draft,a=H(v);if(i&&a)try{let o=i.target&&i.targetBox?{...ia(i.target),...i.targetBox}:null,s=await r.create({page:n.page,url:location.href,surface:a.id,title:a.title||document.title,x:i.x,y:i.y,anchor:o,context:oe(a),body:e},t);n.draft=void 0,n.openThread(s.id)}catch(e){throw r.error=e.message,e}}function oe(e){let t=n.options.context?.({id:e.id,title:e.title,element:e.element})??{},r=Object.entries({viewport:`${innerWidth}×${innerHeight}`,...e.context,...t}).filter(([,e])=>e!==void 0&&e!==``).map(([e,t])=>[e,String(t)]);return Object.fromEntries(r)}var T=ts(),se=sn(T),ce=e=>{var t=Uo();let r;R(()=>{X(t,0,Y([`vc-cursor`,H(g)&&`vc-cursor-hidden`]),`svelte-q7vqsu`),r=wi(t,``,r,{left:`${n.cursor.x-1}px`,top:`${n.cursor.y-27}px`})}),K(e,t)};J(se,e=>{n.cursor&&e(ce)});var le=L(se,2),ue=e=>{var t=Go(),n=F(t),r=F(n),i=e=>{var t=Wo();R(()=>Z(t,`d`,H(_).neck)),K(e,t)};J(r,e=>{H(_).neck&&e(i)});var a=L(r);Z(a,`r`,4),O(n),O(t),R(()=>{Z(a,`cx`,H(_).x),Z(a,`cy`,H(_).y)}),K(e,t)};J(le,e=>{H(_)&&e(ue)});var de=L(le,2),fe=e=>{var t=Ko();let n;R(()=>n=wi(t,``,n,{left:`${H(g).left??``}px`,top:`${H(g).top??``}px`,width:`${H(g).width??``}px`,height:`${H(g).height??``}px`,"border-radius":`${H(g).radius??``}px`,translate:`${H(g).dx??``}px ${H(g).dy??``}px`})),K(e,t)};J(de,e=>{H(g)&&e(fe)});var pe=L(de,2),me=e=>{var t=qo();let n;R(()=>{X(t,1,Y([`vc-target absolute`,!H(b)&&`vc-target-quiet`]),`svelte-q7vqsu`),n=wi(t,``,n,{left:`${H(C).left??``}px`,top:`${H(C).top??``}px`,width:`${H(C).width??``}px`,height:`${H(C).height??``}px`,"border-radius":`${H(C).radius??``}px`})}),K(e,t)};J(pe,e=>{H(C)&&e(me)});var he=L(pe,2);Qr(he,17,()=>H(d),e=>e.thread.id,(e,t)=>{{let i=j(()=>H(t).thread.id===n.openId);bo(e,{get thread(){return H(t).thread},get left(){return H(t).left},get top(){return H(t).top},get now(){return r.now},get open(){return H(i)},onopen:()=>{n.draft=void 0,n.openThread(H(t).thread.id===n.openId?void 0:H(t).thread.id)}})}});var ge=L(he,2),_e=e=>{var t=$o(),r=sn(t);let a;var s=L(r,2);let c;var l=F(s),u=e=>{var t=Zo(),r=sn(t);Ri(to(r,{variant:`new`,placeholder:`Add a comment`,get initial(){return n.draft.text},autofocus:!0,oninput:e=>{n.draft&&(n.draft.text=e)},onimages:e=>{n.draft&&(n.draft.images=e)},onsubmit:ae,oncancel:()=>n.draft=void 0}),e=>P(i,e,!0),()=>H(i));var a=L(r,2),o=e=>{var t=Xo(),r=F(t),i=I(r),a=L(r,2),o=e=>{var t=Jo();$(F(t),{name:`chevron-down`,size:14}),O(t),U(`click`,t,te),K(e,t)};J(a,e=>{n.draft.inner?.length&&e(o)});var s=L(a,2),c=e=>{var t=Yo();$(F(t),{name:`chevron-up`,size:14}),O(t),U(`click`,t,ee),K(e,t)};J(s,e=>{H(x)&&e(c)});var l=L(s,2);$(F(l),{name:`close`,size:14}),O(l),O(t),R(()=>{Z(r,`title`,n.draft.target.label),q(i,`On ${n.draft.target.label??``}`)}),U(`click`,l,ne),K(e,t)};J(a,e=>{n.draft.target&&e(o)}),K(e,t)},d=e=>{var t=Qo(),r=L(F(t),2);O(t),U(`click`,r,()=>n.signIn()),K(e,t)};J(l,e=>{n.viewer?e(u):e(d,-1)}),O(s),R(()=>{a=wi(r,``,a,{left:`${H(ie).at.left??``}px`,top:`${H(ie).at.top??``}px`}),X(s,1,Y([`pointer-events-auto absolute z-40 cursor-default`,H(o)&&`vc-shake`]),`svelte-q7vqsu`),c=wi(s,``,c,{left:`${H(ie).card.left??``}px`,top:`${H(ie).card.top??``}px`})}),vr(`animationend`,s,()=>P(o,!1)),U(`keydown`,s,re),K(e,t)};J(ge,e=>{H(ie)&&n.draft&&e(_e)});var ve=L(ge,2),ye=e=>{var t=es();let r;var i=F(t);{let e=j(()=>n.titleOf(H(p).thread)),t=j(()=>n.linkOf(H(p).thread)),r=j(()=>Math.max(200,H(p).maxHeight));Bo(i,{get thread(){return H(p).thread},get title(){return H(e)},get link(){return H(t)},get maxHeight(){return H(r)},onclose:()=>n.openThread(void 0)})}O(t),R(()=>r=wi(t,``,r,{left:`${H(p).card.left??``}px`,top:`${H(p).card.top??``}px`})),Ii(t,`offsetHeight`,e=>P(a,e)),K(e,t)};J(ve,e=>{H(p)&&e(ye)}),K(e,T),Je()}yr([`keydown`,`click`]);function is(e){let t=e-1;return t*t*t+1}function as(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function os(e,{delay:t=0,duration:n=400,easing:r=is,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=as(i),[p,m]=as(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
48
+ }`};function ws(e,t){qe(t,!0),mi(e,Cs);let n=Ua(),r=n.store,i=N(void 0),a=N(0),o=N(!1);function s(){H(i)?.focus(),P(o,!1),requestAnimationFrame(()=>P(o,!0))}vn(()=>(n.onFocusDraft(s),()=>n.onFocusDraft(void 0)));function c(e){let t=n.active&&!n.panelCollapsed?n.panelRect??l():void 0,r=Pa(e.stage,{left:0,top:0,right:innerWidth,bottom:innerHeight});return t&&t.left<r.right&&t.left>r.left?{...r,right:t.left}:r}function l(){return{left:innerWidth-12-320,top:12,right:innerWidth-12,bottom:innerHeight-12}}function u(e){n.layout;let t=n.surface(e.surface);if(t)return{surface:t,...Ma(t,e)}}vn(()=>{n.layout;let e=n.revealing;e!==void 0&&fr(()=>{let t=r.threads.find(t=>t.id===e);if(!t?.anchor)return void(n.revealing=void 0);let i=u(t);i?.surface.doc&&(i.element&&i.hidden?n.revealElement(i.element):n.revealing=void 0)})});let d=j(()=>n.pinned.flatMap(e=>{let t=u(e);return t&&!t.hidden?[{thread:e,left:t.x,top:t.y}]:[]})),f=j(()=>{let e=new Map;for(let t of n.participants){if(t.state!==`working`||t.thread===void 0)continue;let n=Go(t),r=e.get(t.thread);e.set(t.thread,r?`${r} · ${n}`:n)}return e});function p(e,t,n,r){let i=e.left+32+10;i+t>r.right-8&&(i=e.left-10-t),i=Math.max(r.left+8,Math.min(i,r.right-8-t));let a=Math.max(r.top+8,Math.min(e.top-32,r.bottom-8-n));return{left:i,top:a}}let m=j(()=>{let e=n.open,t=e&&u(e);if(!e||!t||t.hidden)return;let r=c(t.surface);return{thread:e,where:t,card:p({left:t.x,top:t.y},320,H(a),r),maxHeight:r.bottom-r.top-16}});function h(e,t=0){return{left:e.left-3,top:e.top-3,width:e.right-e.left+6,height:e.bottom-e.top+6,radius:t+3}}let g=j(()=>n.aim&&n.surface(n.aim.surface)),_=j(()=>{let e=n.aim;if(!e?.target||!H(g))return;let t=h(Aa(H(g),e.target.box),e.target.radius*H(g).docScale),r=e.targetBox,i=(e,t)=>Math.max(-1,Math.min(1,e/(t/2||1)))*3;return{...t,dx:i(e.point.x-(r.x+r.width/2),r.width),dy:i(e.point.y-(r.y+r.height/2),r.height)}}),v=j(()=>{let e=n.cursor;if(!e||!H(_))return;let t={left:H(_).left+H(_).dx,top:H(_).top+H(_).dy,width:H(_).width,height:H(_).height,radius:H(_).radius};return{...e,neck:cs(e.x,e.y,4,t,22)}}),y=j(()=>n.draft&&n.surface(n.draft.surface)),b=j(()=>{n.layout;let e=n.draft?.target;if(!e||!H(y))return;if(!e.element.isConnected)return n.draft.targetBox;let t=e.element.getBoundingClientRect();return ja(H(y),{x:t.left,y:t.top,width:t.width,height:t.height})}),x=j(()=>{let e=n.draft?.target;if(!e||!H(b)||!H(y))return;let t=Ea(H(y),H(b).x,H(b).y),r=H(y).scale;return h({left:t.x,top:t.y,right:t.x+H(b).width*r,bottom:t.y+H(b).height*r},e.radius*H(y).docScale)}),S=j(()=>n.draft?.target&&H(y)&&Qi(n.draft.target,H(y).search)),C=j(()=>H(m)?.thread.anchor&&H(m).where.box&&h(H(m).where.box)),w=j(()=>H(x)||(n.draft?void 0:H(C)));function ee(e){let t=n.draft;t&&H(y)&&e&&(t.target=e,t.targetBox=ja(H(y),e.box),H(i)?.focus())}function te(){n.draft?.target&&H(S)&&(n.draft.inner=[n.draft.target,...n.draft.inner??[]],ee(H(S)))}function ne(){let[e,...t]=n.draft?.inner??[];n.draft&&e&&(n.draft.inner=t,ee(e))}function re(){let e=n.draft;e&&(e.x=e.point.x,e.y=e.point.y,e.target=void 0,e.targetBox=void 0,e.inner=void 0,H(i)?.focus())}function ie(e){if(!(!e.altKey||e.metaKey||e.ctrlKey)){if(e.key===`ArrowUp`)te();else if(e.key===`ArrowDown`)ne();else return;e.preventDefault()}}let ae=j(()=>{let e=n.draft;if(!e||!H(y))return;let t=e.targetBox&&H(b),r=t?t.x+e.x-e.targetBox.x:e.x,i=t?t.y+e.y-e.targetBox.y:e.y,a=Ea(H(y),r,i),o={left:a.x,top:a.y};return{at:o,card:p({left:o.left,top:o.top+4},296,40,c(H(y)))}});async function oe(e,t){let i=n.draft,a=H(y);if(i&&a)try{let o=i.target&&i.targetBox?{...ia(i.target),...i.targetBox}:null,s=await r.create({page:n.page,url:location.href,surface:a.id,title:a.title||document.title,x:i.x,y:i.y,anchor:o,context:se(a),body:e},t);n.draft=void 0,n.openThread(s.id)}catch(e){throw r.error=e.message,e}}function se(e){let t=n.options.context?.({id:e.id,title:e.title,element:e.element})??{},r=Object.entries({viewport:`${innerWidth}×${innerHeight}`,...e.context,...t}).filter(([,e])=>e!==void 0&&e!==``).map(([e,t])=>[e,String(t)]);return Object.fromEntries(r)}var ce=Ss(),le=I(ce),ue=e=>{var t=us();let r;z(()=>{X(t,0,Y([`vc-cursor`,H(_)&&`vc-cursor-hidden`]),`svelte-q7vqsu`),r=wi(t,``,r,{left:`${n.cursor.x-1}px`,top:`${n.cursor.y-27}px`})}),K(e,t)};J(le,e=>{n.cursor&&e(ue)});var de=R(le,2),fe=e=>{var t=fs(),n=F(t),r=F(n),i=e=>{var t=ds();z(()=>Z(t,`d`,H(v).neck)),K(e,t)};J(r,e=>{H(v).neck&&e(i)});var a=R(r);Z(a,`r`,4),D(n),D(t),z(()=>{Z(a,`cx`,H(v).x),Z(a,`cy`,H(v).y)}),K(e,t)};J(de,e=>{H(v)&&e(fe)});var pe=R(de,2),me=e=>{var t=ps();let n;z(()=>n=wi(t,``,n,{left:`${H(_).left??``}px`,top:`${H(_).top??``}px`,width:`${H(_).width??``}px`,height:`${H(_).height??``}px`,"border-radius":`${H(_).radius??``}px`,translate:`${H(_).dx??``}px ${H(_).dy??``}px`})),K(e,t)};J(pe,e=>{H(_)&&e(me)});var he=R(pe,2),ge=e=>{var t=ms();let n;z(()=>{X(t,1,Y([`vc-target absolute`,!H(x)&&`vc-target-quiet`]),`svelte-q7vqsu`),n=wi(t,``,n,{left:`${H(w).left??``}px`,top:`${H(w).top??``}px`,width:`${H(w).width??``}px`,height:`${H(w).height??``}px`,"border-radius":`${H(w).radius??``}px`})}),K(e,t)};J(he,e=>{H(w)&&e(ge)});var _e=R(he,2);Qr(_e,17,()=>H(d),e=>e.thread.id,(e,t)=>{{let i=j(()=>H(f).get(H(t).thread.id)),a=j(()=>H(t).thread.id===n.openId);Io(e,{get thread(){return H(t).thread},get left(){return H(t).left},get top(){return H(t).top},get now(){return r.now},get working(){return H(i)},get open(){return H(a)},onopen:()=>{n.draft=void 0,n.openThread(H(t).thread.id===n.openId?void 0:H(t).thread.id)}})}});var ve=R(_e,2),ye=e=>{var t=bs(),r=I(t);let a;var s=R(r,2);let c;var l=F(s),u=e=>{var t=vs(),r=I(t);Ri(po(r,{variant:`new`,placeholder:`Add a comment`,get initial(){return n.draft.text},autofocus:!0,oninput:e=>{n.draft&&(n.draft.text=e)},onimages:e=>{n.draft&&(n.draft.images=e)},onsubmit:oe,oncancel:()=>n.draft=void 0}),e=>P(i,e,!0),()=>H(i));var a=R(r,2),o=e=>{var t=_s(),r=F(t),i=L(r),a=R(r,2),o=e=>{var t=hs();$(F(t),{name:`chevron-down`,size:14}),D(t),U(`click`,t,ne),K(e,t)};J(a,e=>{n.draft.inner?.length&&e(o)});var s=R(a,2),c=e=>{var t=gs();$(F(t),{name:`chevron-up`,size:14}),D(t),U(`click`,t,te),K(e,t)};J(s,e=>{H(S)&&e(c)});var l=R(s,2);$(F(l),{name:`close`,size:14}),D(l),D(t),z(()=>{Z(r,`title`,n.draft.target.label),q(i,`On ${n.draft.target.label??``}`)}),U(`click`,l,re),K(e,t)};J(a,e=>{n.draft.target&&e(o)}),K(e,t)},d=e=>{var t=ys(),r=R(F(t),2);D(t),U(`click`,r,()=>n.signIn()),K(e,t)};J(l,e=>{n.viewer?e(u):e(d,-1)}),D(s),z(()=>{a=wi(r,``,a,{left:`${H(ae).at.left??``}px`,top:`${H(ae).at.top??``}px`}),X(s,1,Y([`pointer-events-auto absolute z-40 cursor-default`,H(o)&&`vc-shake`]),`svelte-q7vqsu`),c=wi(s,``,c,{left:`${H(ae).card.left??``}px`,top:`${H(ae).card.top??``}px`})}),vr(`animationend`,s,()=>P(o,!1)),U(`keydown`,s,ie),K(e,t)};J(ve,e=>{H(ae)&&n.draft&&e(ye)});var be=R(ve,2),xe=e=>{var t=xs();let r;var i=F(t);{let e=j(()=>n.titleOf(H(m).thread)),t=j(()=>n.linkOf(H(m).thread)),r=j(()=>Math.max(200,H(m).maxHeight));ss(i,{get thread(){return H(m).thread},get title(){return H(e)},get link(){return H(t)},get maxHeight(){return H(r)},onclose:()=>n.openThread(void 0)})}D(t),z(()=>r=wi(t,``,r,{left:`${H(m).card.left??``}px`,top:`${H(m).card.top??``}px`})),Ii(t,`offsetHeight`,e=>P(a,e)),K(e,t)};J(be,e=>{H(m)&&e(xe)}),K(e,ce),Je()}yr([`keydown`,`click`]);function Ts(e){let t=e-1;return t*t*t+1}function Es(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function Ds(e,{delay:t=0,duration:n=400,easing:r=Ts,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=Es(i),[p,m]=Es(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
47
49
  transform: ${l} translate(${(1-e)*d}${f}, ${(1-e)*p}${m});
48
- opacity: ${c-u*t}`}}var ss=W(`<!> <div class="my-1 border-t border-vc-line"></div> <!>`,1),cs=W(`<!> <!> <div class="my-1 border-t border-vc-line"></div> <!> <!> <!>`,1),ls=W(`<div class="shrink-0 border-b border-vc-line px-3.5 py-3"><p>Sign in to see comments and add your own.</p> <button type="button" class="mt-2 h-7 rounded-full bg-vc-comment px-3 font-medium text-white hover:brightness-110">Sign in</button></div>`),us=W(`<span class="absolute top-3 -left-2 size-1.5 rounded-full bg-vc-comment" title="Unread"></span>`),ds=W(`<p class="mt-1 text-xs text-vc-muted"> </p>`),fs=W(`<!> <!> <!>`,1),ps=W(`<div class="absolute top-2.5 right-2 flex items-center"><div><!></div> <button type="button"><!></button></div>`),ms=W(`<li><button type="button" class="absolute inset-0 rounded-[8px] focus-visible:outline-2 focus-visible:outline-vc-comment"></button> <div><div class="flex h-7 items-center"><!> <!></div> <p class="mt-1.5 truncate text-vc-muted"> </p> <p class="truncate"><span class="font-medium"> </span> <time class="ml-1 text-vc-muted"> </time></p> <p> </p> <!></div> <!></li>`),hs=W(`Every thread is resolved. <button type="button" class="text-vc-comment hover:underline">Show resolved</button>`,1),gs=W(`<li class="px-3 py-6 text-center text-vc-muted"><!></li>`),_s=W(`<div role="alert" class="m-2 mt-0 flex shrink-0 items-start gap-2 rounded-[8px] bg-vc-ink px-3 py-2 text-white"><p class="flex-1"> </p> <button type="button" class="text-white/70 hover:text-white" aria-label="Dismiss"><!></button></div>`),vs=W(`<aside data-vc-ui="" aria-label="Comments"><header class="flex h-11 shrink-0 items-center gap-0.5 pr-1.5 pl-3.5"><h2 class="min-w-0 flex-1 truncate font-semibold">Comments</h2> <!> <button type="button" class="vc-tool-light size-7 rounded-full" title="Close comments (C)" aria-label="Close comments"><!></button></header> <div class="shrink-0 border-b border-vc-line px-2.5 pb-2.5"><label class="flex h-8 items-center gap-2 rounded-[6px] bg-vc-surface px-2.5 text-vc-muted focus-within:ring-1 focus-within:ring-vc-comment"><!> <input type="search" placeholder="Search" aria-label="Search comments" class="min-w-0 flex-1 bg-transparent text-vc-ink outline-none placeholder:text-vc-muted/80"/></label></div> <!> <ol class="min-h-0 flex-1 space-y-1 overflow-y-auto overscroll-contain p-2"></ol> <!></aside>`);function ys(e,t){qe(t,!0);let n=Q(t,`class`,3,``),r=Q(t,`style`,3,``),i=Ua(),a=i.store,o=j(()=>i.filters),s=j(()=>i.viewer),c=e=>e.comments.at(-1)?.createdAt??e.createdAt,l=j(()=>a.threads.filter(e=>e.page!==i.page).length),u=j(()=>a.threads.filter(e=>H(o).allPages||e.page===i.page)),d=j(()=>H(u).filter(e=>e.resolvedAt).length),f=j(()=>{let e=H(o).query.trim().toLocaleLowerCase(),t=t=>!e||`#${t.id}`===e||i.titleOf(t).toLocaleLowerCase().includes(e)||t.comments.some(t=>t.body.toLocaleLowerCase().includes(e)||t.author.name.toLocaleLowerCase().includes(e)),n=H(u).filter(e=>(H(o).showResolved||!e.resolvedAt)&&(!H(o).onlyMine||e.comments.some(e=>e.author.sub===H(s)?.sub))&&t(e)),r=e=>i.orderOf(e);return H(o).sort===`place`?n.sort((e,t)=>e.page.localeCompare(t.page)||r(e)-r(t)||e.id-t.id):n.sort((e,t)=>c(t)-c(e))});function p(e){navigator.clipboard?.writeText(i.linkOf(e))}var m=vs(),g=F(m),_=F(g),v=L(_,2);So(v,{label:`Filter and sort`,align:`end`,class:`vc-tool-light size-7 rounded-full`,trigger:e=>{$(e,{name:`filter`})},children:(e,t=h)=>{var n=cs(),r=sn(n);{let e=j(()=>H(o).sort===`date`);Eo(r,{get checked(){return H(e)},onselect:()=>{t()(),H(o).sort=`date`},children:(e,t)=>{we(),K(e,G(`Sort by date`))},$$slots:{default:!0}})}var i=L(r,2);{let e=j(()=>H(o).sort===`place`);Eo(i,{get checked(){return H(e)},onselect:()=>{t()(),H(o).sort=`place`},children:(e,t)=>{we(),K(e,G(`Sort by place`))},$$slots:{default:!0}})}var c=L(i,4),u=e=>{Eo(e,{get checked(){return H(o).allPages},onselect:()=>{t()(),H(o).allPages=!H(o).allPages},children:(e,t)=>{we(),K(e,G(`Show every page`))},$$slots:{default:!0}})};J(c,e=>{(H(l)||H(o).allPages)&&e(u)});var d=L(c,2);Eo(d,{get checked(){return H(o).showResolved},onselect:()=>{t()(),H(o).showResolved=!H(o).showResolved},children:(e,t)=>{we(),K(e,G(`Show resolved comments`))},$$slots:{default:!0}});var f=L(d,2),p=e=>{var n=ss(),r=sn(n);Eo(r,{get checked(){return H(o).onlyMine},onselect:()=>{t()(),H(o).onlyMine=!H(o).onlyMine},children:(e,t)=>{we(),K(e,G(`Only your threads`))},$$slots:{default:!0}}),Eo(L(r,4),{checked:!1,onselect:()=>{t()(),a.markAllRead()},children:(e,t)=>{we(),K(e,G(`Mark all as read`))},$$slots:{default:!0}}),K(e,n)};J(f,e=>{H(s)&&e(p)}),K(e,n)},$$slots:{trigger:!0,default:!0}});var y=L(v,2);$(F(y),{name:`close`}),O(y),O(g);var b=L(g,2),x=F(b),S=F(x);$(S,{name:`search`,size:15});var C=L(S,2);Oi(C),O(x),O(b);var w=L(b,2),ee=e=>{var t=ls(),n=L(F(t),2);O(t),U(`click`,n,()=>i.signIn()),K(e,t)};J(w,e=>{!H(s)&&!a.loading&&e(ee)});var te=L(w,2);Qr(te,21,()=>H(f),e=>e.id,(e,n)=>{let r=j(()=>H(n).comments[0]),o=j(()=>H(n).comments.length-1),c=j(()=>H(n).id===i.openId);var l=ms(),u=F(l),d=L(u,2),f=F(d),m=F(f),g=e=>{K(e,us())};J(m,e=>{H(n).unread&&e(g)}),co(L(m,2),{get user(){return H(r).author},size:28}),O(f);var _=L(f,2),v=I(_),y=L(_,2),b=F(y),x=I(b,!0),S=L(b,2),C=I(S,!0);O(y);var w=L(y,2),ee=I(w,!0),te=L(w,2),ne=e=>{var t=ds(),n=I(t);R(()=>q(n,`${H(o)??``} ${H(o)===1?`reply`:`replies`}`)),K(e,t)};J(te,e=>{H(o)>0&&e(ne)}),O(d);var re=L(d,2),ie=e=>{var t=ps(),i=F(t);So(F(i),{label:`Thread options`,align:`end`,class:`vc-tool-light size-7 rounded-full`,trigger:e=>{$(e,{name:`more`})},children:(e,t=h)=>{var i=fs(),o=sn(i);Eo(o,{onselect:()=>{t()(),a.markRead(H(n).id,!H(n).unread)},children:(e,t)=>{we();var r=G();R(()=>q(r,H(n).unread?`Mark as read`:`Mark as unread`)),K(e,r)},$$slots:{default:!0}});var c=L(o,2);Eo(c,{onselect:()=>{t()(),p(H(n))},children:(e,t)=>{we(),K(e,G(`Copy link`))},$$slots:{default:!0}});var l=L(c,2),u=e=>{Eo(e,{onselect:()=>{t()(),confirm(`Delete this thread and all its replies?`)&&a.removeThread(H(n).id)},children:(e,t)=>{we(),K(e,G(`Delete thread…`))},$$slots:{default:!0}})};J(l,e=>{H(r).author.sub===H(s).sub&&e(u)}),K(e,i)},$$slots:{trigger:!0,default:!0}}),O(i);var o=L(i,2);$(F(o),{name:`resolve`,size:18}),O(o),O(t),R(e=>{X(i,1,Y([`transition-opacity`,!H(c)&&`opacity-0 group-hover:opacity-100 focus-within:opacity-100 has-[[aria-expanded=true]]:opacity-100`])),X(o,1,Y([`vc-tool-light size-7 rounded-full`,H(n).resolvedAt&&`text-vc-comment`])),Z(o,`aria-pressed`,e),Z(o,`title`,H(n).resolvedAt?`Reopen`:`Resolve`),Z(o,`aria-label`,H(n).resolvedAt?`Reopen #${H(n).id}`:`Resolve #${H(n).id}`)},[()=>!!H(n).resolvedAt]),U(`click`,o,()=>a.resolve(H(n).id,!H(n).resolvedAt)),K(e,t)};J(re,e=>{H(s)&&e(ie)}),O(l),R((e,t,i,a,o)=>{X(l,1,Y([`group relative rounded-[8px] px-3 py-2.5`,H(c)?`bg-vc-comment-soft`:`hover:bg-vc-surface`])),Z(u,`aria-label`,`Show comment #${H(n).id??``} on ${e??``}`),Z(u,`aria-current`,H(c)||void 0),X(d,1,Y([`pointer-events-none relative`,H(n).resolvedAt&&`opacity-55`])),q(v,`#${H(n).id??``} · ${t??``}`),q(x,H(r).author.name),Z(S,`title`,i),q(C,a),X(w,1,Y([`line-clamp-3 break-words whitespace-pre-line`,H(n).unread&&`font-medium`])),q(ee,o)},[()=>i.titleOf(H(n)),()=>i.titleOf(H(n)),()=>mo(H(r).createdAt),()=>po(H(r).createdAt,a.now),()=>lo(H(r))]),U(`click`,u,()=>t.onselect(H(n))),K(e,l)},e=>{var t=kr(),n=sn(t),r=e=>{var t=gs(),n=F(t),r=e=>{var t=G();R(e=>q(t,`No comments match “${e??``}”.`),[()=>H(o).query.trim()]),K(e,t)},a=j(()=>H(o).query.trim()),s=e=>{K(e,G(`You have not started or replied to any threads.`))},c=e=>{var t=hs();U(`click`,L(sn(t)),()=>H(o).showResolved=!0),K(e,t)},l=e=>{var t=G();R(e=>q(t,`No comments yet. Click ${e??``} to add one.`),[()=>i.surfaces.some(e=>e.element)?`a frame`:`anywhere on the page`]),K(e,t)};J(n,e=>{H(a)?e(r):H(o).onlyMine?e(s,1):H(d)&&!H(o).showResolved?e(c,2):e(l,-1)}),O(t),K(e,t)};J(n,e=>{H(s)&&!a.loading&&e(r)}),K(e,t)}),O(te);var ne=L(te,2),re=e=>{var t=_s(),n=F(t),r=I(n,!0),i=L(n,2);$(F(i),{name:`close`,size:14}),O(i),O(t),R(()=>q(r,a.error)),U(`click`,i,()=>a.error=null),K(e,t)};J(ne,e=>{a.error&&e(re)}),O(m),R(()=>{X(m,1,Y([`pointer-events-auto flex min-h-0 flex-col overflow-hidden rounded border border-vc-line bg-white text-[13px] text-vc-ink shadow-[0_1px_3px_rgb(0_0_0/0.12)]`,n()])),wi(m,r()),Z(_,`title`,a.spaceName||void 0)}),U(`click`,y,function(...e){t.onclose?.apply(this,e)}),U(`keydown`,C,e=>{e.key===`Escape`&&(H(o).query=``,e.target.blur())}),Mi(C,()=>H(o).query,e=>H(o).query=e),fi(3,m,()=>os,()=>({x:16,duration:160})),K(e,m),Je()}yr([`click`,`keydown`]);var bs=W(`<!> <!>`,1),xs=W(`<p class="mt-0.5 truncate text-xs text-vc-muted"> </p>`),Ss=W(`<div class="max-w-72 border-b border-vc-line px-3 py-2"><p class="truncate font-medium"> </p> <!> <!></div> <!>`,1),Cs=W(`<button type="button" part="button"> </button>`),ws=W(`<span><!></span>`),Ts={hash:`svelte-11k4s29`,code:`.vc-slot.svelte-11k4s29 {font-family:inherit;font-size:inherit;color:inherit;}.vc-slot-tool {display:inline-flex;height:2rem;align-items:center;gap:0.375rem;border-radius:9999px;color:inherit;outline:none;}.vc-slot-tool:hover,
49
- .vc-slot-tool[aria-expanded='true'] {background:color-mix(in srgb, currentColor 14%, transparent);}.vc-slot-tool:focus-visible {box-shadow:0 0 0 2px color-mix(in srgb, currentColor 50%, transparent);}`};function Es(e,t){qe(t,!0),mi(e,Ts);let n=Q(t,`slot`,3,!1);n()&&Ha(t.vc);let r=j(()=>n()?`vc-slot-tool`:`vc-island-tool`);var i=ws(),a=F(i),o=e=>{{let n=e=>{var n=bs(),r=sn(n),i=e=>{co(e,{get user(){return t.vc.viewer},size:28})};J(r,e=>{t.vc.viewer&&e(i)}),$(L(r,2),{name:`chevron-down`,size:14}),K(e,n)},i=(e,n=h)=>{var r=Ss(),i=sn(r),a=F(i),o=I(a,!0),s=L(a,2),c=e=>{var n=xs(),r=I(n,!0);R(()=>q(r,t.vc.viewer.email)),K(e,n)};J(s,e=>{t.vc.viewer?.email&&e(c)});var l=L(s,2),u=e=>{var n=xs(),r=I(n);R(()=>q(r,`Comments in ${t.vc.store.spaceName??``}`)),K(e,n)};J(l,e=>{t.vc.store.spaceName&&e(u)}),O(i),Eo(L(i,2),{onselect:()=>{n()(),t.vc.signOut()},children:(e,t)=>{we(),K(e,G(`Sign out`))},$$slots:{default:!0}}),R(()=>q(o,t.vc.viewer?.name)),K(e,r)},a=j(()=>`Account: ${t.vc.viewer.name}`);So(e,{get label(){return H(a)},align:`end`,get class(){return`${H(r)??``} pr-2 pl-0.5`},trigger:n,children:i,$$slots:{trigger:!0,default:!0}})}},s=e=>{var n=Cs(),i=I(n,!0);R(()=>{X(n,1,`${H(r)??``} px-3.5 font-medium`,`svelte-11k4s29`),n.disabled=t.vc.loading,q(i,t.vc.loading?`Connecting…`:`Sign in`)}),U(`click`,n,()=>t.vc.signIn()),K(e,n)};J(a,e=>{t.vc.viewer?e(o):e(s,-1)}),O(i),R(()=>X(i,1,Y([`vc-ui inline-flex`,n()&&`vc-slot`]),`svelte-11k4s29`)),K(e,i),Je()}yr([`click`]);var Ds=W(`<div role="alert" class="flex max-w-80 items-start gap-2 rounded-[8px] bg-vc-ink px-3 py-2 text-white shadow-lg"><p class="flex-1"> </p> <button type="button" class="text-white/70 hover:text-white" aria-label="Dismiss"><!></button></div>`),Os=W(`<span class="absolute top-1 right-1 size-2 rounded-full bg-vc-comment"></span>`),ks=W(`<div data-vc-ui="" class="pointer-events-auto absolute bottom-4 left-1/2 flex -translate-x-1/2 flex-col items-center gap-2"><!> <div class="flex items-center gap-0.5 rounded-full bg-vc-island p-1 text-vc-island-ink shadow-[0_2px_10px_rgb(0_0_0/0.2)] backdrop-blur-[5px]"><button type="button" class="vc-island-tool relative" aria-label="Comments"><!> <!></button> <!></div></div>`);function As(e,t){qe(t,!0);let n=Ua();var r=ks(),i=F(r),a=e=>{var t=Ds(),r=F(t),i=I(r,!0),a=L(r,2);$(F(a),{name:`close`,size:14}),O(a),O(t),R(()=>q(i,n.store.error)),U(`click`,a,()=>n.store.error=null),K(e,t)};J(i,e=>{n.store.error&&!n.active&&e(a)});var o=L(i,2),s=F(o),c=F(s);$(c,{name:`comment`});var l=L(c,2),u=e=>{K(e,Os())};J(l,e=>{n.unreadCount&&!n.active&&e(u)}),O(s),Es(L(s,2),{get vc(){return n}}),O(o),O(r),R(e=>{Z(s,`aria-pressed`,n.active),Z(s,`title`,`Comments${e??``}`)},[()=>n.options.shortcut===!1?``:` (${(n.options.shortcut??`c`).toUpperCase()})`]),U(`click`,s,()=>n.toggle()),K(e,r),Je()}yr([`click`]);var js=W(`<div role="presentation"></div>`),Ms=W(`<div class="vc-ui pointer-events-none fixed inset-0 font-vc text-[13px] text-vc-ink"><!> <!> <!> <!></div>`);function Ns(e,t){qe(t,!0);let n=Q(t,`vc`,7);Ha(n()),yn(()=>{n().openId!==void 0&&!n().loading&&!n().open&&(n().openId=void 0)});let r=j(()=>n().active?n().surfaces.filter(e=>e.catches):[]);function i(e){return t=>{let r=t=>n().wheel(e,t);return t.addEventListener(`wheel`,r,{passive:!1}),()=>t.removeEventListener(`wheel`,r)}}let a=j(()=>n().panelRect);var o=Ms(),s=F(o);Qr(s,17,()=>H(r),e=>e.id,(e,t)=>{var r=js();let a;hi(r,()=>i(H(t))),R((e,i)=>{X(r,1,Y([`pointer-events-auto absolute`,n().cursor?`cursor-none!`:`vc-comment-cursor`])),a=wi(r,``,a,{left:`${H(t).clip.left??``}px`,top:`${H(t).clip.top??``}px`,width:e,height:i})},[()=>`${Math.max(0,H(t).clip.right-H(t).clip.left)}px`,()=>`${Math.max(0,H(t).clip.bottom-H(t).clip.top)}px`]),U(`pointermove`,r,e=>n().move({x:e.clientX,y:e.clientY,alt:e.altKey})),vr(`pointerleave`,r,()=>n().move(void 0)),U(`click`,r,e=>n().place(H(t),e.clientX,e.clientY,e.altKey)),K(e,r)});var c=L(s,2);rs(c,{});var l=L(c,2),u=e=>{{let t=j(()=>H(a)?`absolute z-20`:`absolute top-3 right-3 bottom-3 z-20 w-80`),r=j(()=>H(a)?`left:${H(a).left}px;top:${H(a).top}px;width:${H(a).right-H(a).left}px;height:${H(a).bottom-H(a).top}px`:``);ys(e,{get class(){return H(t)},get style(){return H(r)},onselect:e=>n().focus(e),onclose:()=>n().toggle(!1)})}};J(l,e=>{n().active&&e(u)});var d=L(l,2),f=e=>{As(e,{})};J(d,e=>{n().showToolbar&&e(f)}),O(o),K(e,o),Je()}yr([`pointermove`,`click`]);var Ps=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
50
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-vc:var(--vc-font,var(--vc-font-default));--color-vc-ink:var(--vc-ink,#292524);--color-vc-muted:var(--vc-muted,#78716c);--color-vc-wash:var(--vc-wash,#e7e5e4);--color-vc-accent:var(--vc-accent,#57534e);--color-vc-avatar:var(--vc-avatar,#009aaa);--color-vc-comment:var(--vc-comment,#0d99ff);--color-vc-island-ink:var(--vc-island-ink,#fff);--color-vc-island-hover:var(--vc-island-hover,#ffffff24)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{font-family:var(--font-vc);color:var(--color-vc-ink);-webkit-font-smoothing:antialiased;font-size:13px;line-height:1.4}.vc-ui{cursor:auto!important}.vc-ui button,.vc-ui a,.vc-ui [role=menuitem]{cursor:pointer}}@layer components{.vc-tool{border-radius:.125rem;outline:none;justify-content:center;align-items:center;min-width:1.75rem;height:1.75rem;display:inline-flex}.vc-tool:hover{background:var(--color-vc-wash)}.vc-tool:focus-visible{box-shadow:0 0 0 2px var(--color-vc-accent)}.vc-island-tool{min-width:2rem;height:2rem;color:var(--color-vc-island-ink);border-radius:9999px;outline:none;justify-content:center;align-items:center;gap:.375rem;display:inline-flex}.vc-island-tool:hover,.vc-island-tool[aria-expanded=true]{background:var(--color-vc-island-hover)}.vc-island-tool[aria-pressed=true]{background:var(--color-vc-island-ink);color:var(--color-vc-ink)}.vc-island-tool:focus-visible{box-shadow:0 0 0 2px #fff9}.vc-comment-cursor{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 1.5a12.5 12.5 0 1 1 0 25H1.5V14A12.5 12.5 0 0 1 14 1.5z' fill='white' stroke='%231c1917' stroke-width='1.5'/%3E%3Cpath d='M14 9v10M9 14h10' stroke='%231c1917' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 1 27,crosshair}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-auto{inset:auto}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-2\\.5{top:calc(var(--spacing) * 2.5)}.top-3{top:calc(var(--spacing) * 3)}.right-0\\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.-left-2{left:calc(var(--spacing) * -2)}.left-1\\/2{left:50%}.left-\\[42px\\]{left:42px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.m-0{margin:0}.m-2{margin:calc(var(--spacing) * 2)}.m-auto{margin:auto}.my-1{margin-block:var(--spacing)}.mt-0{margin-top:0}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-\\[3px\\]{margin-top:3px}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.aspect-square{aspect-ratio:1}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-full{width:100%;height:100%}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-11{height:calc(var(--spacing) * 11)}.h-auto{height:auto}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-\\[min\\(70vh\\,560px\\)\\]{max-height:min(70vh,560px)}.min-h-0{min-height:0}.w-4{width:calc(var(--spacing) * 4)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[296px\\]{width:296px}.w-\\[320px\\]{width:320px}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-80{max-width:calc(var(--spacing) * 80)}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[296px\\]{max-width:296px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.min-w-0{min-width:0}.min-w-52{min-width:calc(var(--spacing) * 52)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-none\\!{cursor:none!important}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[8px\\]{border-radius:8px}.rounded-\\[12px\\]{border-radius:12px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[18px\\]{border-radius:18px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-vc-comment{border-color:var(--vc-comment,#0d99ff)}.border-vc-comment\\!{border-color:var(--vc-comment,#0d99ff)!important}.border-vc-line,.border-vc-line\\/70{border-color:var(--vc-line,#d6d3d1)}@supports (color:color-mix(in lab, red, red)){.border-vc-line\\/70{border-color:color-mix(in oklab, var(--vc-line,#d6d3d1) 70%, transparent)}}.border-white\\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.border-white\\/10{border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#d9d9d9\\]{background-color:#d9d9d9}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-transparent{background-color:#0000}.bg-vc-comment{background-color:var(--vc-comment,#0d99ff)}.bg-vc-comment-soft{background-color:var(--vc-comment-soft,#e5f4ff)}.bg-vc-ink{background-color:var(--vc-ink,#292524)}.bg-vc-island{background-color:var(--vc-island,#323232b8)}.bg-vc-surface{background-color:var(--vc-surface,#f5f5f4)}.bg-white{background-color:var(--color-white)}.bg-white\\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab, red, red)){.bg-white\\/85{background-color:color-mix(in oklab, var(--color-white) 85%, transparent)}}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-\\[3px\\]{padding-block:3px}.py-\\[5px\\]{padding-block:5px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-1{padding-right:var(--spacing)}.pr-1\\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-\\[3px\\]{padding-right:3px}.pr-\\[5px\\]{padding-right:5px}.pb-1{padding-bottom:var(--spacing)}.pb-2\\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-3\\.5{padding-left:calc(var(--spacing) * 3.5)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.font-vc{font-family:var(--vc-font,var(--vc-font-default))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-red-600{color:var(--color-red-600)}.text-vc-accent{color:var(--vc-accent,#57534e)}.text-vc-comment{color:var(--vc-comment,#0d99ff)}.text-vc-ink{color:var(--vc-ink,#292524)}.text-vc-island-ink{color:var(--vc-island-ink,#fff)}.text-vc-muted{color:var(--vc-muted,#78716c)}.text-white{color:var(--color-white)}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_3px_rgb\\(0_0_0\\/0\\.12\\)\\]{--tw-shadow:0 1px 3px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_4px_rgb\\(0_0_0\\/0\\.3\\)\\]{--tw-shadow:0 1px 4px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_6px_rgb\\(0_0_0\\/0\\.16\\)\\]{--tw-shadow:0 1px 6px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_10px_rgb\\(0_0_0\\/0\\.2\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_14px_rgb\\(0_0_0\\/0\\.18\\)\\]{--tw-shadow:0 2px 14px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_24px_rgb\\(0_0_0\\/0\\.22\\)\\]{--tw-shadow:0 4px 24px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-vc-comment\\/30{--tw-ring-color:var(--vc-comment,#0d99ff)}@supports (color:color-mix(in lab, red, red)){.ring-vc-comment\\/30{--tw-ring-color:color-mix(in oklab, var(--vc-comment,#0d99ff) 30%, transparent)}}.ring-white{--tw-ring-color:var(--color-white)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[5px\\]{--tw-backdrop-blur:blur(5px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-vc-muted\\/70::placeholder{color:var(--vc-muted,#78716c)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-vc-muted\\/70::placeholder{color:color-mix(in oklab, var(--vc-muted,#78716c) 70%, transparent)}}.placeholder\\:text-vc-muted\\/80::placeholder{color:var(--vc-muted,#78716c)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-vc-muted\\/80::placeholder{color:color-mix(in oklab, var(--vc-muted,#78716c) 80%, transparent)}}.focus-within\\:border-vc-comment:focus-within{border-color:var(--vc-comment,#0d99ff)}.focus-within\\:opacity-100:focus-within{opacity:1}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-vc-comment:focus-within{--tw-ring-color:var(--vc-comment,#0d99ff)}@media (hover:hover){.hover\\:border-vc-line:hover{border-color:var(--vc-line,#d6d3d1)}.hover\\:bg-black\\/80:hover{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.hover\\:bg-vc-surface:hover{background-color:var(--vc-surface,#f5f5f4)}.hover\\:bg-vc-wash:hover{background-color:var(--vc-wash,#e7e5e4)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus-visible\\:bg-vc-wash:focus-visible{background-color:var(--vc-wash,#e7e5e4)}.focus-visible\\:bg-white\\/10:focus-visible{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:bg-white\\/10:focus-visible{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-vc-comment:focus-visible{outline-color:var(--vc-comment,#0d99ff)}.has-\\[\\[aria-expanded\\=true\\]\\]\\:opacity-100:has([aria-expanded=true]){opacity:1}}:host{--vc-font-default:ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif}@keyframes spin{to{transform:rotate(360deg)}}`,Fs=`@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}`,Is=4,Ls=class{api;store;#e=N();get options(){return H(this.#e)}set options(e){P(this.#e,e)}#t=N(!1);get active(){return H(this.#t)}set active(e){P(this.#t,e,!0)}#n=N();get openId(){return H(this.#n)}set openId(e){P(this.#n,e,!0)}#r=N();get draft(){return H(this.#r)}set draft(e){P(this.#r,e,!0)}#i=N(Zt({query:``,sort:`date`,showResolved:!1,onlyMine:!1,allPages:!1}));get filters(){return H(this.#i)}set filters(e){P(this.#i,e,!0)}#a=N([]);get surfaces(){return H(this.#a)}set surfaces(e){P(this.#a,e)}#o=N(0);get layout(){return H(this.#o)}set layout(e){P(this.#o,e,!0)}#s=N(``);get page(){return H(this.#s)}set page(e){P(this.#s,e,!0)}#c=N();get panelRect(){return H(this.#c)}set panelRect(e){P(this.#c,e)}#l=N(!1);get hostToggles(){return H(this.#l)}set hostToggles(e){P(this.#l,e,!0)}#u=N();get aim(){return H(this.#u)}set aim(e){P(this.#u,e)}#d=N();get cursor(){return H(this.#d)}set cursor(e){P(this.#d,e)}#f=N();get revealing(){return H(this.#f)}set revealing(e){P(this.#f,e,!0)}doc;host;app;slots=new Map;frames=new Map;cleanup=[];pointer;pressed;measuring=0;aiming=0;animating=0;cursorSheet=new CSSStyleSheet;focusDraftHandler;linked;constructor(e,t=document){this.options=e,this.doc=t,this.api=new za(e.endpoint??`/_comments`),this.store=new Ba(this.api),this.host=t.createElement(`visual-comments`),this.host.setAttribute(`data-vc-ignore`,``),this.host.style.cssText=`position:fixed;inset:0;z-index:2147483600;pointer-events:none;display:block;`,this.start()}get viewer(){return this.store.viewer}get threads(){return this.store.threads}get unreadCount(){return this.store.unreadCount}get loading(){return this.store.loading}get open(){return this.store.threads.find(e=>e.id===this.openId)}get pinned(){return this.store.threads.filter(e=>e.page===this.page&&(!e.resolvedAt||this.filters.showResolved||e.id===this.openId))}get showToolbar(){return this.options.toolbar??!this.hostToggles}surface(e){return this.surfaces.find(t=>t.id===e)}titleOf(e){return this.surface(e.surface)?.title||this.options.describe?.(e.surface)?.title||e.title||new URL(e.url).pathname}orderOf(e){return this.options.describe?.(e.surface)?.order??this.surfaces.findIndex(t=>t.id===e.surface)}linkOf(e){return this.options.link?.(e)??`${e.url}#vc=${e.id}`}imageUrl(e){return this.store.imageUrl(e)}ours=e=>e===this.host||this.slots.has(e);configure(e){this.options={...fr(()=>this.options),...e},this.schedule()}toggle(e=!this.active){this.active=e,this.cursor=void 0,this.aim=void 0,e||(this.draft=void 0,this.openId=void 0),this.updateCursorStyle(),this.updateAim()}openThread(e){this.openId=e;let t=this.open;t?.unread&&this.store.markRead(t.id,!0)}focus(e){if(this.draft=void 0,this.active=!0,this.openThread(e.id),this.revealing=e.id,this.options.show?.(e))return;if(e.page!==this.page){location.assign(this.linkOf(e));return}let t=this.surface(e.surface);if(t){if(t.element){let{clip:e}=t;(e.right-e.left<80||e.bottom-e.top<80)&&t.element.scrollIntoView({block:`center`,inline:`center`})}else if(!e.anchor){let n=Ea(t,e.x,e.y);Na(t.clip,n.x,n.y)||window.scrollTo({top:e.y-innerHeight/3,behavior:`smooth`})}}}revealElement(e){ta(e),this.revealing=void 0}signIn(){let e=this.options.auth??`/auth`;if(typeof e==`object`)return e.signIn();let t=`${location.pathname}${location.search}${location.hash}`;location.assign(`${e.replace(/\/$/,``)}/login?${new URLSearchParams({returnTo:t})}`)}signOut(){this.toggle(!1);let e=this.options.auth??`/auth`;if(typeof e==`object`)return e.signOut();let t=this.doc.createElement(`form`);t.method=`POST`,t.action=`${e.replace(/\/$/,``)}/logout`,t.hidden=!0,this.doc.body.appendChild(t),t.submit()}relayout(){this.schedule()}subscribe(e){return xn(()=>{yn(()=>{this.active,this.openId,this.unreadCount,this.viewer,this.store.threads.length,this.loading,e(this)})})}destroy(){for(let e of this.cleanup.splice(0))e();for(let e of this.frames.values())e();this.frames.clear();for(let e of this.slots.values())Hr(e);this.slots.clear(),this.app&&Hr(this.app),this.host.remove(),this.doc.adoptedStyleSheets=this.doc.adoptedStyleSheets.filter(e=>e!==this.cursorSheet)}onFocusDraft(e){this.focusDraftHandler=e}get draftHasContent(){return!!(this.draft?.text.trim()||this.draft?.images)}start(){let e=this.doc,t=e.defaultView,n=this.host.attachShadow({mode:`open`});Vs(n),Us(e),e.adoptedStyleSheets=[...e.adoptedStyleSheets,this.cursorSheet],e.documentElement.appendChild(this.host),this.app=Rr(Ns,{target:n,props:{vc:this}}),this.cleanup.push(this.store.start());let r=/(?:^#|&)vc=(\d+)/.exec(location.hash);if(r){this.linked=Number(r[1]);let e=location.hash.slice(1).split(`&`).filter(e=>!e.startsWith(`vc=`)).join(`&`);history.replaceState(history.state,``,`${location.pathname}${location.search}${e?`#${e}`:``}`)}this.cleanup.push(xn(()=>{yn(()=>{if(this.linked===void 0||this.store.loading)return;let e=this.store.threads.find(e=>e.id===this.linked);(e||this.viewer)&&(this.linked=void 0,e&&(this.filters.showResolved||=!!e.resolvedAt,this.focus(e)))}),yn(()=>{let t=this.unreadCount>0&&!this.active,n=String(this.active);this.layout;for(let r of e.querySelectorAll(`[data-vc-toggle]`))r.getAttribute(`aria-pressed`)!==n&&r.setAttribute(`aria-pressed`,n),r.hasAttribute(`data-vc-unread`)!==t&&r.toggleAttribute(`data-vc-unread`,t)})}));let i=(e,t,n,r)=>{e.addEventListener(t,n,r),this.cleanup.push(()=>e.removeEventListener(t,n,r))},a={capture:!0};i(t,`pointermove`,e=>this.onPointerMove(e),{capture:!0,passive:!0}),i(t,`pointerdown`,e=>this.onPress(e),a),i(t,`mousedown`,e=>this.onPress(e),a),i(t,`pointerup`,e=>this.onRelease(e),a),i(t,`mouseup`,e=>this.onRelease(e),a),i(t,`click`,e=>this.onClick(e),a);for(let e of[`dblclick`,`auxclick`,`contextmenu`])i(t,e,e=>this.onOtherClick(e),a);i(t,`keydown`,e=>this.onKey(e)),i(t,`keyup`,e=>this.onKey(e)),i(t,`resize`,()=>this.schedule()),i(e,`scroll`,()=>this.schedule(),{capture:!0,passive:!0});let o=()=>this.move(void 0);e.documentElement.addEventListener(`pointerleave`,o),this.cleanup.push(()=>e.documentElement.removeEventListener(`pointerleave`,o)),i(t,`blur`,()=>this.move(void 0));let s=e=>{this.active&&e.dataTransfer?.types.includes(`Files`)&&!e.composedPath().includes(this.host)&&e.preventDefault()};i(t,`dragover`,s),i(t,`drop`,s);for(let t of[`transitionrun`,`animationstart`])i(e,t,()=>{this.animating++,this.schedule()},a);for(let t of[`transitionend`,`transitioncancel`,`animationend`,`animationcancel`])i(e,t,()=>{this.animating=Math.max(0,this.animating-1),this.schedule()},a);let c=new MutationObserver(()=>this.schedule());c.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),this.cleanup.push(()=>c.disconnect());let l=setInterval(()=>{this.animating=0,this.schedule()},1e3);this.cleanup.push(()=>clearInterval(l)),this.measure()}watchFrame(e){let t=e.defaultView;if(!t||this.frames.has(e))return;let n=()=>this.schedule(),r=e=>this.onKey(e),i=new MutationObserver(n);i.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),e.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t.addEventListener(`resize`,n),t.addEventListener(`keydown`,r),t.addEventListener(`keyup`,r),this.frames.set(e,()=>{i.disconnect(),e.removeEventListener(`scroll`,n,{capture:!0}),t.removeEventListener(`resize`,n),t.removeEventListener(`keydown`,r),t.removeEventListener(`keyup`,r)})}schedule(){this.measuring||=requestAnimationFrame(()=>{this.measuring=0,this.measure(),this.animating&&this.schedule()})}measure(){let e=this.doc;this.surfaces=Ca(e,{ours:this.ours,documentOf:this.options.documentOf}),this.page=Bs(this.options.page),this.draft&&!this.surface(this.draft.surface)&&(this.draft=void 0);let t=new Set(this.surfaces.map(e=>e.doc).filter(t=>!!t&&t!==e));for(let e of t)this.watchFrame(e);for(let[e,n]of this.frames)t.has(e)||(n(),this.frames.delete(e));let n=e.querySelector(`[data-vc-panel]`)?.getBoundingClientRect(),r=n&&n.width>0&&n.height>0?{left:n.left,top:n.top,right:n.right,bottom:n.bottom}:void 0;(r?.left!==this.panelRect?.left||r?.top!==this.panelRect?.top||r?.right!==this.panelRect?.right||r?.bottom!==this.panelRect?.bottom)&&(this.panelRect=r),this.hostToggles=!!e.querySelector(`[data-vc-toggle]`),this.mountSlots(),this.layout++,this.updateAim()}mountSlots(){for(let e of this.doc.querySelectorAll(`[data-vc-account]`)){if(this.slots.has(e)||e.shadowRoot)continue;let t=e.attachShadow({mode:`open`});Vs(t),this.slots.set(e,Rr(Es,{target:t,props:{vc:this,slot:!0}}))}for(let[e,t]of this.slots)e.isConnected||(Hr(t),this.slots.delete(e))}fromUs(e){return e.composedPath().includes(this.host)}surfaceAt(e,t){return Ta(this.surfaces,this.doc,e,t,this.ours)}move(e){this.pointer=e,this.updateAim()}onPointerMove(e){if(this.active){if(this.fromUs(e))return this.move(void 0);this.move({x:e.clientX,y:e.clientY,alt:e.altKey})}}updateAim(){this.aiming||=requestAnimationFrame(()=>{this.aiming=0;let e=this.pointer,t=this.active&&e?this.surfaceAt(e.x,e.y):void 0,n=t&&e?{x:e.x,y:e.y}:void 0;this.cursor=n,this.aim=t&&e&&!this.draft&&this.openId===void 0?Ra(t,e.x,e.y,e.alt):void 0,this.updateCursorStyle()})}updateCursorStyle(){let e=this.active&&this.cursor?`*, *::before, *::after { cursor: none !important; }`:``;this.cursorSheet.cssRules.length!==+!!e&&this.cursorSheet.replaceSync(e)}onPress(e){if(!this.active||this.fromUs(e))return;this.pressed={x:e.clientX,y:e.clientY};let t=this.surfaceAt(e.clientX,e.clientY);t&&!t.passGestures&&Rs(e)}onRelease(e){if(!this.active||this.fromUs(e))return;let t=this.surfaceAt(e.clientX,e.clientY);t&&!t.passGestures&&Rs(e)}onOtherClick(e){this.active&&!this.fromUs(e)&&this.surfaceAt(e.clientX,e.clientY)&&Rs(e)}onClick(e){if(e.composedPath().some(e=>e instanceof Element&&e.matches(`[data-vc-toggle]`))){this.toggle();return}if(this.fromUs(e))return;if(!this.active){this.openId!==void 0&&this.openThread(void 0);return}let t=this.surfaceAt(e.clientX,e.clientY);if(!t){this.draftHasContent?this.focusDraftHandler?.():this.draft?this.draft=void 0:this.openId!==void 0&&this.openThread(void 0);return}Rs(e);let n=this.pressed;this.pressed=void 0,!(n&&Math.hypot(e.clientX-n.x,e.clientY-n.y)>Is)&&this.place(t,e.clientX,e.clientY,e.altKey)}place(e,t,n,r){this.draftHasContent?this.focusDraftHandler?.():this.openId===void 0?(this.draft={...Ra(e,t,n,r),text:``},this.updateAim()):this.openThread(void 0)}wheel(e,t){let n=t.deltaMode===1?16:1,r=t.deltaX*n,i=t.deltaY*n;if(e.doc&&e.doc!==this.doc){let n={x:(t.clientX-e.docOrigin.x)/e.docScale,y:(t.clientY-e.docOrigin.y)/e.docScale},a=na(e.doc.elementFromPoint(n.x,n.y),r/e.docScale,i/e.docScale);if(a){t.preventDefault(),a.scrollBy(r/e.docScale,i/e.docScale);return}}let a=na(e.element?.parentElement??null,r,i);a&&(t.preventDefault(),a.scrollBy(r,i))}onKey(e){if(e.key===`Alt`&&this.pointer){this.pointer={...this.pointer,alt:e.type===`keydown`},this.updateAim();return}if(e.type!==`keydown`||e.defaultPrevented)return;let t=e.composedPath()[0];if(zs(t))return;if(e.key===`Escape`){if(this.host.shadowRoot?.querySelector(`:popover-open`)||this.doc.querySelector(`:popover-open`))return;if(this.draft)this.draft=void 0;else if(this.openId!==void 0)this.openThread(void 0);else if(this.active)this.toggle(!1);else return;e.preventDefault();return}let n=this.options.shortcut??`c`;n&&e.key.toLowerCase()===n&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&(e.preventDefault(),this.toggle())}};function Rs(e){e.preventDefault(),e.stopImmediatePropagation()}function zs(e){let t=e;return!!(t&&(t.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)))}function Bs(e){let t=new URL(location.href);if(typeof e==`string`)return e;if(e)return e(t);let n=t.pathname.length>1?t.pathname.replace(/\/+$/,``):t.pathname;return`${t.origin}${n}`}function Vs(e){let t=e.ownerDocument.createElement(`style`);t.textContent=Ps,e.appendChild(t)}var Hs=new WeakSet;function Us(e){if(Hs.has(e))return;Hs.add(e);let t=new CSSStyleSheet;t.replaceSync(Fs),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}function Ws(e,t){return new Ls(e,t)}var Gs=document.currentScript;if(window.VisualComments={create:Ws},Gs&&!(`manual`in Gs.dataset)&&!window.visualComments){let{endpoint:e,auth:t,page:n,toolbar:r,shortcut:i}=Gs.dataset,a=()=>{window.visualComments=Ws({endpoint:e||void 0,auth:t||void 0,page:n||void 0,toolbar:r===void 0?void 0:r!==`false`,shortcut:i===void 0?void 0:i||!1})};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,a,{once:!0}):a()}})();
50
+ opacity: ${c-u*t}`}}var Os=W(`<!> <div class="my-1 border-t border-vc-line"></div> <!>`,1),ks=W(`<!> <!> <div class="my-1 border-t border-vc-line"></div> <!> <!> <!>`,1),As=W(`<div class="shrink-0 border-b border-vc-line px-3.5 py-3"><p>Sign in to see comments and add your own.</p> <button type="button" class="mt-2 h-7 rounded-full bg-vc-comment px-3 font-medium text-white hover:brightness-110">Sign in</button></div>`),js=W(`<span class="absolute top-3 -left-2 size-1.5 rounded-full bg-vc-comment" title="Unread"></span>`),Ms=W(`<p class="mt-1 text-xs text-vc-muted"> </p>`),Ns=W(`<!> <!> <!>`,1),Ps=W(`<div class="absolute top-2.5 right-2 flex items-center"><div><!></div> <button type="button"><!></button></div>`),Fs=W(`<li><button type="button" class="absolute inset-0 rounded-[8px] focus-visible:outline-2 focus-visible:outline-vc-comment"></button> <div><div class="flex h-7 items-center"><!> <!></div> <p class="mt-1.5 truncate text-vc-muted"> </p> <p class="truncate"><span class="font-medium"> </span> <time class="ml-1 text-vc-muted"> </time></p> <p> </p> <!></div> <!></li>`),Is=W(`Every thread is resolved. <button type="button" class="text-vc-comment hover:underline">Show resolved</button>`,1),Ls=W(`<li class="px-3 py-6 text-center text-vc-muted"><!></li>`),Rs=W(`<div role="alert" class="m-2 mt-0 flex shrink-0 items-start gap-2 rounded-[8px] bg-vc-ink px-3 py-2 text-white"><p class="flex-1"> </p> <button type="button" class="text-white/70 hover:text-white" aria-label="Dismiss"><!></button></div>`),zs=W(`<div class="shrink-0 border-b border-vc-line px-2.5 pb-2.5"><label class="flex h-8 items-center gap-2 rounded-[6px] bg-vc-surface px-2.5 text-vc-muted focus-within:ring-1 focus-within:ring-vc-comment"><!> <input type="search" placeholder="Search" aria-label="Search comments" class="min-w-0 flex-1 bg-transparent text-vc-ink outline-none placeholder:text-vc-muted/80"/></label></div> <!> <ol class="min-h-0 flex-1 space-y-1 overflow-y-auto overscroll-contain p-2"></ol> <!>`,1),Bs=W(`<aside data-vc-ui="" aria-label="Comments"><header class="flex h-11 shrink-0 items-center gap-0.5 pr-1.5 pl-3.5"><h2 class="min-w-0 flex-1 truncate font-semibold">Comments</h2> <!> <button type="button" class="vc-tool-light size-7 rounded-full"><!></button> <button type="button" class="vc-tool-light size-7 rounded-full" title="Close comments (C)" aria-label="Close comments"><!></button></header> <!></aside>`);function Vs(e,t){qe(t,!0);let n=Q(t,`class`,3,``),r=Q(t,`style`,3,``),i=Ua(),a=i.store,o=j(()=>i.filters),s=j(()=>i.viewer),c=e=>e.comments.at(-1)?.createdAt??e.createdAt,l=j(()=>a.threads.filter(e=>e.page!==i.page).length),u=j(()=>a.threads.filter(e=>H(o).allPages||e.page===i.page)),d=j(()=>H(u).filter(e=>e.resolvedAt).length),f=j(()=>{let e=H(o).query.trim().toLocaleLowerCase(),t=t=>!e||`#${t.id}`===e||i.titleOf(t).toLocaleLowerCase().includes(e)||t.comments.some(t=>t.body.toLocaleLowerCase().includes(e)||t.author.name.toLocaleLowerCase().includes(e)),n=H(u).filter(e=>(H(o).showResolved||!e.resolvedAt)&&(!H(o).onlyMine||e.comments.some(e=>e.author.sub===H(s)?.sub))&&t(e)),r=e=>i.orderOf(e);return H(o).sort===`place`?n.sort((e,t)=>e.page.localeCompare(t.page)||r(e)-r(t)||e.id-t.id):n.sort((e,t)=>c(t)-c(e))});function p(e){navigator.clipboard?.writeText(i.linkOf(e))}var m=Bs(),g=F(m),_=F(g),v=R(_,2),y=e=>{Ro(e,{label:`Filter and sort`,align:`end`,class:`vc-tool-light size-7 rounded-full`,trigger:e=>{$(e,{name:`filter`})},children:(e,t=h)=>{var n=ks(),r=I(n);{let e=j(()=>H(o).sort===`date`);Ho(r,{get checked(){return H(e)},onselect:()=>{t()(),H(o).sort=`date`},children:(e,t)=>{O(),K(e,G(`Sort by date`))},$$slots:{default:!0}})}var i=R(r,2);{let e=j(()=>H(o).sort===`place`);Ho(i,{get checked(){return H(e)},onselect:()=>{t()(),H(o).sort=`place`},children:(e,t)=>{O(),K(e,G(`Sort by place`))},$$slots:{default:!0}})}var c=R(i,4),u=e=>{Ho(e,{get checked(){return H(o).allPages},onselect:()=>{t()(),H(o).allPages=!H(o).allPages},children:(e,t)=>{O(),K(e,G(`Show every page`))},$$slots:{default:!0}})};J(c,e=>{(H(l)||H(o).allPages)&&e(u)});var d=R(c,2);Ho(d,{get checked(){return H(o).showResolved},onselect:()=>{t()(),H(o).showResolved=!H(o).showResolved},children:(e,t)=>{O(),K(e,G(`Show resolved comments`))},$$slots:{default:!0}});var f=R(d,2),p=e=>{var n=Os(),r=I(n);Ho(r,{get checked(){return H(o).onlyMine},onselect:()=>{t()(),H(o).onlyMine=!H(o).onlyMine},children:(e,t)=>{O(),K(e,G(`Only your threads`))},$$slots:{default:!0}}),Ho(R(r,4),{checked:!1,onselect:()=>{t()(),a.markAllRead()},children:(e,t)=>{O(),K(e,G(`Mark all as read`))},$$slots:{default:!0}}),K(e,n)};J(f,e=>{H(s)&&e(p)}),K(e,n)},$$slots:{trigger:!0,default:!0}})};J(v,e=>{i.panelCollapsed||e(y)});var b=R(v,2),x=F(b);{let e=j(()=>i.panelCollapsed?`chevron-left`:`chevron-right`);$(x,{get name(){return H(e)}})}D(b);var S=R(b,2);$(F(S),{name:`close`}),D(S),D(g);var C=R(g,2),w=e=>{var n=zs(),r=I(n),c=F(r),l=F(c);$(l,{name:`search`,size:15});var u=R(l,2);Oi(u),D(c),D(r);var m=R(r,2),g=e=>{var t=As(),n=R(F(t),2);D(t),U(`click`,n,()=>i.signIn()),K(e,t)};J(m,e=>{!H(s)&&!a.loading&&e(g)});var _=R(m,2);Qr(_,21,()=>H(f),e=>e.id,(e,n)=>{let r=j(()=>H(n).comments[0]),o=j(()=>H(n).comments.length-1),c=j(()=>H(n).id===i.openId);var l=Fs(),u=F(l),d=R(u,2),f=F(d),m=F(f),g=e=>{K(e,js())};J(m,e=>{H(n).unread&&e(g)}),wo(R(m,2),{get user(){return H(r).author},size:28}),D(f);var _=R(f,2),v=L(_),y=R(_,2),b=F(y),x=L(b,!0),S=R(b,2),C=L(S,!0);D(y);var w=R(y,2),ee=L(w,!0),te=R(w,2),ne=e=>{var t=Ms(),n=L(t);z(()=>q(n,`${H(o)??``} ${H(o)===1?`reply`:`replies`}`)),K(e,t)};J(te,e=>{H(o)>0&&e(ne)}),D(d);var re=R(d,2),ie=e=>{var t=Ps(),i=F(t);Ro(F(i),{label:`Thread options`,align:`end`,class:`vc-tool-light size-7 rounded-full`,trigger:e=>{$(e,{name:`more`})},children:(e,t=h)=>{var i=Ns(),o=I(i);Ho(o,{onselect:()=>{t()(),a.markRead(H(n).id,!H(n).unread)},children:(e,t)=>{O();var r=G();z(()=>q(r,H(n).unread?`Mark as read`:`Mark as unread`)),K(e,r)},$$slots:{default:!0}});var c=R(o,2);Ho(c,{onselect:()=>{t()(),p(H(n))},children:(e,t)=>{O(),K(e,G(`Copy link`))},$$slots:{default:!0}});var l=R(c,2),u=e=>{Ho(e,{onselect:()=>{t()(),confirm(`Delete this thread and all its replies?`)&&a.removeThread(H(n).id)},children:(e,t)=>{O(),K(e,G(`Delete thread…`))},$$slots:{default:!0}})};J(l,e=>{H(r).author.sub===H(s).sub&&e(u)}),K(e,i)},$$slots:{trigger:!0,default:!0}}),D(i);var o=R(i,2);$(F(o),{name:`resolve`,size:18}),D(o),D(t),z(e=>{X(i,1,Y([`transition-opacity`,!H(c)&&`opacity-0 group-hover:opacity-100 focus-within:opacity-100 has-[[aria-expanded=true]]:opacity-100`])),X(o,1,Y([`vc-tool-light size-7 rounded-full`,H(n).resolvedAt&&`text-vc-comment`])),Z(o,`aria-pressed`,e),Z(o,`title`,H(n).resolvedAt?`Reopen`:`Resolve`),Z(o,`aria-label`,H(n).resolvedAt?`Reopen #${H(n).id}`:`Resolve #${H(n).id}`)},[()=>!!H(n).resolvedAt]),U(`click`,o,()=>a.resolve(H(n).id,!H(n).resolvedAt)),K(e,t)};J(re,e=>{H(s)&&e(ie)}),D(l),z((e,t,i,a,o)=>{X(l,1,Y([`group relative rounded-[8px] px-3 py-2.5`,H(c)?`bg-vc-comment-soft`:`hover:bg-vc-surface`])),Z(u,`aria-label`,`Show comment #${H(n).id??``} on ${e??``}`),Z(u,`aria-current`,H(c)||void 0),X(d,1,Y([`pointer-events-none relative`,H(n).resolvedAt&&`opacity-55`])),q(v,`#${H(n).id??``} · ${t??``}`),q(x,H(r).author.name),Z(S,`title`,i),q(C,a),X(w,1,Y([`line-clamp-3 break-words whitespace-pre-line`,H(n).unread&&`font-medium`])),q(ee,o)},[()=>i.titleOf(H(n)),()=>i.titleOf(H(n)),()=>Oo(H(r).createdAt),()=>Do(H(r).createdAt,a.now),()=>go(H(r))]),U(`click`,u,()=>t.onselect(H(n))),K(e,l)},e=>{var t=kr(),n=I(t),r=e=>{var t=Ls(),n=F(t),r=e=>{var t=G();z(e=>q(t,`No comments match “${e??``}”.`),[()=>H(o).query.trim()]),K(e,t)},a=j(()=>H(o).query.trim()),s=e=>{K(e,G(`You have not started or replied to any threads.`))},c=e=>{var t=Is();U(`click`,R(I(t)),()=>H(o).showResolved=!0),K(e,t)},l=e=>{var t=G();z(e=>q(t,`No comments yet. Click ${e??``} to add one.`),[()=>i.surfaces.some(e=>e.element)?`a frame`:`anywhere on the page`]),K(e,t)};J(n,e=>{H(a)?e(r):H(o).onlyMine?e(s,1):H(d)&&!H(o).showResolved?e(c,2):e(l,-1)}),D(t),K(e,t)};J(n,e=>{H(s)&&!a.loading&&e(r)}),K(e,t)}),D(_);var v=R(_,2),y=e=>{var t=Rs(),n=F(t),r=L(n,!0),i=R(n,2);$(F(i),{name:`close`,size:14}),D(i),D(t),z(()=>q(r,a.error)),U(`click`,i,()=>a.error=null),K(e,t)};J(v,e=>{a.error&&e(y)}),U(`keydown`,u,e=>{e.key===`Escape`&&(H(o).query=``,e.target.blur())}),Mi(u,()=>H(o).query,e=>H(o).query=e),K(e,n)};J(C,e=>{i.panelCollapsed||e(w)}),D(m),z(()=>{X(m,1,Y([`pointer-events-auto flex min-h-0 flex-col overflow-hidden rounded border border-vc-line bg-white text-[13px] text-vc-ink shadow-[0_1px_3px_rgb(0_0_0/0.12)]`,n()])),wi(m,r()),Z(_,`title`,a.spaceName||void 0),Z(b,`title`,i.panelCollapsed?`Expand comments`:`Collapse comments`),Z(b,`aria-label`,i.panelCollapsed?`Expand comments`:`Collapse comments`),Z(b,`aria-expanded`,!i.panelCollapsed)}),U(`click`,b,()=>i.panelCollapsed=!i.panelCollapsed),U(`click`,S,function(...e){t.onclose?.apply(this,e)}),fi(3,m,()=>Ds,()=>({x:16,duration:160})),K(e,m),Je()}yr([`click`,`keydown`]);var Hs=W(`<li class="flex"><!></li>`),Us=W(`<li class="flex items-center justify-center rounded-full bg-current/15 text-[11px] font-medium"> </li>`),Ws=W(`<ul class="flex items-center gap-1 px-1" aria-label="Here now"><!> <!></ul>`);function Gs(e,t){qe(t,!0);let n=Q(t,`size`,3,24),r=j(()=>Wo(t.vc.participants.filter(e=>e.author.sub!==t.vc.viewer?.sub))),i=j(()=>H(r).length>4?H(r).slice(0,3):H(r)),a=j(()=>H(r).slice(H(i).length));function o(e){let t=e.participants.map(Go).filter(Boolean);return[_o(e.author),...t].join(`
51
+ `)}var s=kr(),c=I(s),l=e=>{var t=Ws(),r=F(t);Qr(r,17,()=>H(i),e=>e.author.sub,(e,t)=>{var r=Hs(),i=F(r);{let e=j(()=>o(H(t))),r=j(()=>H(t).state===`working`?`vc-working`:``);wo(i,{get user(){return H(t).author},get size(){return n()},get title(){return H(e)},get class(){return H(r)}})}D(r),z(e=>Z(r,`aria-label`,e),[()=>o(H(t))]),K(e,r)});var s=R(r,2),c=e=>{var t=Us();let r;var i=L(t);z((e,o)=>{Z(t,`title`,e),Z(t,`aria-label`,o),r=wi(t,``,r,{width:`${n()??``}px`,height:`${n()??``}px`}),q(i,`+${H(a).length??``}`)},[()=>H(a).map(o).join(`
52
+
53
+ `),()=>H(a).map(o).join(`
54
+
55
+ `)]),K(e,t)};J(s,e=>{H(a).length&&e(c)}),D(t),K(e,t)};J(c,e=>{H(r).length&&e(l)}),K(e,s),Je()}var Ks=W(`<!> <!>`,1),qs=W(`<p class="mt-0.5 truncate text-xs text-vc-muted"> </p>`),Js=W(`<div class="flex items-center gap-2 px-3 py-1"><!> <div class="min-w-0 flex-1"><p class="truncate"> </p> <p class="truncate text-xs text-vc-muted"> </p></div> <button type="button" class="shrink-0 rounded-[2px] px-1.5 py-0.5 text-xs text-vc-muted outline-none hover:bg-vc-wash hover:text-vc-ink focus-visible:bg-vc-wash">Remove</button></div>`),Ys=W(`<p class="px-3 pb-1 text-xs text-vc-muted">None yet. An agent asks to join with <code class="font-mono">npx visual-comments connect</code>.</p>`),Xs=W(`<div class="max-w-72 border-b border-vc-line py-1.5"><p class="px-3 pb-1 text-xs text-vc-muted">Agents</p> <!></div>`),Zs=W(`<div class="max-w-72 border-b border-vc-line px-3 py-2"><p class="truncate font-medium"> </p> <!> <!></div> <!> <!>`,1),Qs=W(`<button type="button" part="button"> </button>`),$s=W(`<span><!></span>`),ec={hash:`svelte-11k4s29`,code:`.vc-slot.svelte-11k4s29 {font-family:inherit;font-size:inherit;color:inherit;}.vc-slot-tool {display:inline-flex;height:2rem;align-items:center;gap:0.375rem;border-radius:9999px;color:inherit;outline:none;}.vc-slot-tool:hover,
56
+ .vc-slot-tool[aria-expanded='true'] {background:color-mix(in srgb, currentColor 14%, transparent);}.vc-slot-tool:focus-visible {box-shadow:0 0 0 2px color-mix(in srgb, currentColor 50%, transparent);}`};function tc(e,t){qe(t,!0),mi(e,ec);let n=Q(t,`slot`,3,!1);n()&&Ha(t.vc);let r=j(()=>n()?`vc-slot-tool`:`vc-island-tool`),i=j(()=>!!t.vc.viewer);vn(()=>{H(i)&&t.vc.store.loadAgents()});function a(e){confirm(`Remove ${e.name}? It will no longer see or write comments here.`)&&t.vc.store.removeAgent(e.id)}var o=$s(),s=F(o),c=e=>{var n=Ks(),i=I(n);Gs(i,{get vc(){return t.vc}});var o=R(i,2);{let e=e=>{var n=Ks(),r=I(n),i=e=>{wo(e,{get user(){return t.vc.viewer},size:28})};J(r,e=>{t.vc.viewer&&e(i)}),$(R(r,2),{name:`chevron-down`,size:14}),K(e,n)},n=(e,n=h)=>{var r=Zs(),i=I(r),o=F(i),s=L(o,!0),c=R(o,2),l=e=>{var n=qs(),r=L(n,!0);z(()=>q(r,t.vc.viewer.email)),K(e,n)};J(c,e=>{t.vc.viewer?.email&&e(l)});var u=R(c,2),d=e=>{var n=qs(),r=L(n);z(()=>q(r,`Comments in ${t.vc.store.spaceName??``}`)),K(e,n)};J(u,e=>{t.vc.store.spaceName&&e(d)}),D(i);var f=R(i,2),p=e=>{var n=Xs();Qr(R(F(n),2),17,()=>t.vc.store.agents,e=>e.id,(e,t)=>{var n=Js(),r=F(n);{let e=j(()=>({sub:`agent:${H(t).id}`,name:H(t).name,agent:{addedBy:H(t).addedBy}}));wo(r,{get user(){return H(e)},size:22})}var i=R(r,2),o=F(i),s=L(o,!0),c=L(R(o,2));D(i);var l=R(i,2);D(n),z(()=>{q(s,H(t).name),q(c,`Added by ${H(t).addedBy.name??``}`),Z(l,`aria-label`,`Remove ${H(t).name??``}`)}),U(`click`,l,()=>a(H(t))),K(e,n)},e=>{K(e,Ys())}),D(n),K(e,n)};J(f,e=>{t.vc.store.agents&&e(p)}),Ho(R(f,2),{onselect:()=>{n()(),t.vc.signOut()},children:(e,t)=>{O(),K(e,G(`Sign out`))},$$slots:{default:!0}}),z(()=>q(s,t.vc.viewer?.name)),K(e,r)},i=j(()=>`Account: ${t.vc.viewer.name}`);Ro(o,{get label(){return H(i)},align:`end`,get class(){return`${H(r)??``} pr-2 pl-0.5`},onopen:()=>t.vc.store.loadAgents(),trigger:e,children:n,$$slots:{trigger:!0,default:!0}})}K(e,n)},l=e=>{var n=Qs(),i=L(n,!0);z(()=>{X(n,1,`${H(r)??``} px-3.5 font-medium`,`svelte-11k4s29`),n.disabled=!t.vc.store.viewerKnown,q(i,t.vc.store.viewerKnown?`Sign in`:`Connecting…`)}),U(`click`,n,()=>t.vc.signIn()),K(e,n)};J(s,e=>{t.vc.viewer?e(c):e(l,-1)}),D(o),z(()=>X(o,1,Y([`vc-ui inline-flex items-center`,n()&&`vc-slot`]),`svelte-11k4s29`)),K(e,o),Je()}yr([`click`]);var nc=W(`<div role="alert" class="flex max-w-80 items-start gap-2 rounded-[8px] bg-vc-ink px-3 py-2 text-white shadow-lg"><p class="flex-1"> </p> <button type="button" class="text-white/70 hover:text-white" aria-label="Dismiss"><!></button></div>`),rc=W(`<span class="absolute top-1 right-1 size-2 rounded-full bg-vc-comment"></span>`),ic=W(`<div data-vc-ui="" class="pointer-events-auto absolute bottom-4 left-1/2 flex -translate-x-1/2 flex-col items-center gap-2"><!> <div class="flex items-center gap-0.5 rounded-full bg-vc-island p-1 text-vc-island-ink shadow-[0_2px_10px_rgb(0_0_0/0.2)] backdrop-blur-[5px]"><button type="button" class="vc-island-tool relative" aria-label="Comments"><!> <!></button> <!></div></div>`);function ac(e,t){qe(t,!0);let n=Ua();var r=ic(),i=F(r),a=e=>{var t=nc(),r=F(t),i=L(r,!0),a=R(r,2);$(F(a),{name:`close`,size:14}),D(a),D(t),z(()=>q(i,n.store.error)),U(`click`,a,()=>n.store.error=null),K(e,t)};J(i,e=>{n.store.error&&!n.active&&e(a)});var o=R(i,2),s=F(o),c=F(s);$(c,{name:`comment`});var l=R(c,2),u=e=>{K(e,rc())};J(l,e=>{n.unreadCount&&!n.active&&e(u)}),D(s),tc(R(s,2),{get vc(){return n}}),D(o),D(r),z(e=>{Z(s,`aria-pressed`,n.active),Z(s,`title`,`Comments${e??``}`)},[()=>n.options.shortcut===!1?``:` (${(n.options.shortcut??`c`).toUpperCase()})`]),U(`click`,s,()=>n.toggle()),K(e,r),Je()}yr([`click`]);var oc=W(`<div role="presentation"></div>`),sc=W(`<div class="vc-ui pointer-events-none fixed inset-0 font-vc text-[13px] text-vc-ink"><!> <!> <!> <!> <!></div>`);function cc(e,t){qe(t,!0);let n=Q(t,`vc`,7);Ha(n()),vn(()=>{n().openId!==void 0&&!n().loading&&!n().open&&(n().openId=void 0)});let r=j(()=>n().active?n().surfaces.filter(e=>e.catches):[]);function i(e){return t=>{let r=t=>n().wheel(e,t);return t.addEventListener(`wheel`,r,{passive:!1}),()=>t.removeEventListener(`wheel`,r)}}let a=j(()=>n().panelRect);var o=sc(),s=F(o);Qr(s,17,()=>H(r),e=>e.id,(e,t)=>{var r=oc();let a;hi(r,()=>i(H(t))),z((e,i)=>{X(r,1,Y([`pointer-events-auto absolute`,n().cursor?`cursor-none!`:`vc-comment-cursor`])),a=wi(r,``,a,{left:`${H(t).clip.left??``}px`,top:`${H(t).clip.top??``}px`,width:e,height:i})},[()=>`${Math.max(0,H(t).clip.right-H(t).clip.left)}px`,()=>`${Math.max(0,H(t).clip.bottom-H(t).clip.top)}px`]),U(`pointermove`,r,e=>n().move({x:e.clientX,y:e.clientY,alt:e.altKey})),vr(`pointerleave`,r,()=>n().move(void 0)),U(`click`,r,e=>n().place(H(t),e.clientX,e.clientY,e.altKey)),K(e,r)});var c=R(s,2);ws(c,{});var l=R(c,2),u=e=>{{let t=j(()=>H(a)?`absolute z-20`:n().panelCollapsed?`absolute top-3 right-3 z-20 w-40`:`absolute top-3 right-3 bottom-3 z-20 w-80`),r=j(()=>H(a)?n().panelCollapsed?`left:${Math.max(H(a).left,H(a).right-160)}px;top:${H(a).top}px;width:${Math.min(160,H(a).right-H(a).left)}px;height:46px`:`left:${H(a).left}px;top:${H(a).top}px;width:${H(a).right-H(a).left}px;height:${H(a).bottom-H(a).top}px`:``);Vs(e,{get class(){return H(t)},get style(){return H(r)},onselect:e=>n().focus(e),onclose:()=>n().toggle(!1)})}};J(l,e=>{n().active&&e(u)});var d=R(l,2),f=e=>{ac(e,{})};J(d,e=>{n().showToolbar&&e(f)});var p=R(d,2),m=e=>{var t=kr();Jr(I(t),()=>n().connecting,e=>{eo(e,{get id(){return n().connecting}})}),K(e,t)};J(p,e=>{n().connecting&&e(m)}),D(o),K(e,o),Je()}yr([`pointermove`,`click`]);var lc=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
57
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-vc:var(--vc-font,var(--vc-font-default));--color-vc-ink:var(--vc-ink,#292524);--color-vc-muted:var(--vc-muted,#78716c);--color-vc-wash:var(--vc-wash,#e7e5e4);--color-vc-accent:var(--vc-accent,#57534e);--color-vc-avatar:var(--vc-avatar,#009aaa);--color-vc-comment:var(--vc-comment,#0d99ff);--color-vc-island-ink:var(--vc-island-ink,#fff);--color-vc-island-hover:var(--vc-island-hover,#ffffff24);--color-vc-working:var(--vc-working,var(--vc-comment,#0d99ff))}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{font-family:var(--font-vc);color:var(--color-vc-ink);-webkit-font-smoothing:antialiased;font-size:13px;line-height:1.4}.vc-ui{cursor:auto!important}.vc-ui button,.vc-ui a,.vc-ui [role=menuitem]{cursor:pointer}}@layer components{.vc-tool{border-radius:.125rem;outline:none;justify-content:center;align-items:center;min-width:1.75rem;height:1.75rem;display:inline-flex}.vc-tool:hover{background:var(--color-vc-wash)}.vc-tool:focus-visible{box-shadow:0 0 0 2px var(--color-vc-accent)}.vc-island-tool{min-width:2rem;height:2rem;color:var(--color-vc-island-ink);border-radius:9999px;outline:none;justify-content:center;align-items:center;gap:.375rem;display:inline-flex}.vc-island-tool:hover,.vc-island-tool[aria-expanded=true]{background:var(--color-vc-island-hover)}.vc-island-tool[aria-pressed=true]{background:var(--color-vc-island-ink);color:var(--color-vc-ink)}.vc-island-tool:focus-visible{box-shadow:0 0 0 2px #fff9}.vc-comment-cursor{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 1.5a12.5 12.5 0 1 1 0 25H1.5V14A12.5 12.5 0 0 1 14 1.5z' fill='white' stroke='%231c1917' stroke-width='1.5'/%3E%3Cpath d='M14 9v10M9 14h10' stroke='%231c1917' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 1 27,crosshair}.vc-working{animation:1.6s ease-out infinite vc-working}@keyframes vc-working{0%{box-shadow:0 0 0 0 color-mix(in srgb, var(--color-vc-working) 70%, transparent)}to{box-shadow:0 0 0 9px color-mix(in srgb, var(--color-vc-working) 0%, transparent)}}@media (prefers-reduced-motion:reduce){.vc-working{box-shadow:0 0 0 2px var(--color-vc-working);animation:none}}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-auto{inset:auto}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-2\\.5{top:calc(var(--spacing) * 2.5)}.top-3{top:calc(var(--spacing) * 3)}.right-0\\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.-left-2{left:calc(var(--spacing) * -2)}.left-1\\/2{left:50%}.left-\\[42px\\]{left:42px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.m-0{margin:0}.m-2{margin:calc(var(--spacing) * 2)}.m-auto{margin:auto}.my-1{margin-block:var(--spacing)}.mt-0{margin-top:0}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-\\[3px\\]{margin-top:3px}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.aspect-square{aspect-ratio:1}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-full{width:100%;height:100%}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-11{height:calc(var(--spacing) * 11)}.h-auto{height:auto}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-\\[min\\(70vh\\,560px\\)\\]{max-height:min(70vh,560px)}.min-h-0{min-height:0}.w-4{width:calc(var(--spacing) * 4)}.w-40{width:calc(var(--spacing) * 40)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[296px\\]{width:296px}.w-\\[320px\\]{width:320px}.w-\\[360px\\]{width:360px}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-80{max-width:calc(var(--spacing) * 80)}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[296px\\]{max-width:296px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.min-w-0{min-width:0}.min-w-52{min-width:calc(var(--spacing) * 52)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-none\\!{cursor:none!important}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.self-center{align-self:center}.self-end{align-self:flex-end}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[8px\\]{border-radius:8px}.rounded-\\[12px\\]{border-radius:12px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[18px\\]{border-radius:18px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-vc-comment{border-color:var(--vc-comment,#0d99ff)}.border-vc-comment\\!{border-color:var(--vc-comment,#0d99ff)!important}.border-vc-line,.border-vc-line\\/70{border-color:var(--vc-line,#d6d3d1)}@supports (color:color-mix(in lab, red, red)){.border-vc-line\\/70{border-color:color-mix(in oklab, var(--vc-line,#d6d3d1) 70%, transparent)}}.border-white\\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.border-white\\/10{border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#d9d9d9\\]{background-color:#d9d9d9}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-current\\/15{background-color:currentColor}@supports (color:color-mix(in lab, red, red)){.bg-current\\/15{background-color:color-mix(in oklab, currentcolor 15%, transparent)}}.bg-transparent{background-color:#0000}.bg-vc-agent{background-color:var(--vc-agent,#292524)}.bg-vc-comment{background-color:var(--vc-comment,#0d99ff)}.bg-vc-comment-soft{background-color:var(--vc-comment-soft,#e5f4ff)}.bg-vc-ink{background-color:var(--vc-ink,#292524)}.bg-vc-island{background-color:var(--vc-island,#323232b8)}.bg-vc-surface{background-color:var(--vc-surface,#f5f5f4)}.bg-white{background-color:var(--color-white)}.bg-white\\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab, red, red)){.bg-white\\/85{background-color:color-mix(in oklab, var(--color-white) 85%, transparent)}}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-5{padding:calc(var(--spacing) * 5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-\\[3px\\]{padding-block:3px}.py-\\[5px\\]{padding-block:5px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-1{padding-right:var(--spacing)}.pr-1\\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-\\[3px\\]{padding-right:3px}.pr-\\[5px\\]{padding-right:5px}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-3\\.5{padding-left:calc(var(--spacing) * 3.5)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-vc{font-family:var(--vc-font,var(--vc-font-default))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-red-600{color:var(--color-red-600)}.text-vc-accent{color:var(--vc-accent,#57534e)}.text-vc-comment{color:var(--vc-comment,#0d99ff)}.text-vc-ink{color:var(--vc-ink,#292524)}.text-vc-island-ink{color:var(--vc-island-ink,#fff)}.text-vc-muted{color:var(--vc-muted,#78716c)}.text-vc-working{color:var(--vc-working,var(--vc-comment,#0d99ff))}.text-white{color:var(--color-white)}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_3px_rgb\\(0_0_0\\/0\\.12\\)\\]{--tw-shadow:0 1px 3px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_4px_rgb\\(0_0_0\\/0\\.3\\)\\]{--tw-shadow:0 1px 4px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_6px_rgb\\(0_0_0\\/0\\.16\\)\\]{--tw-shadow:0 1px 6px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_10px_rgb\\(0_0_0\\/0\\.2\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_14px_rgb\\(0_0_0\\/0\\.18\\)\\]{--tw-shadow:0 2px 14px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_24px_rgb\\(0_0_0\\/0\\.22\\)\\]{--tw-shadow:0 4px 24px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_8px_40px_rgb\\(0_0_0\\/0\\.28\\)\\]{--tw-shadow:0 8px 40px var(--tw-shadow-color,#00000047);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-\\[1\\.5px\\]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1.5px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-vc-comment\\/30{--tw-ring-color:var(--vc-comment,#0d99ff)}@supports (color:color-mix(in lab, red, red)){.ring-vc-comment\\/30{--tw-ring-color:color-mix(in oklab, var(--vc-comment,#0d99ff) 30%, transparent)}}.ring-white{--tw-ring-color:var(--color-white)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[5px\\]{--tw-backdrop-blur:blur(5px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[grid-area\\:1\\/1\\]{grid-area:1/1}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-vc-muted\\/70::placeholder{color:var(--vc-muted,#78716c)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-vc-muted\\/70::placeholder{color:color-mix(in oklab, var(--vc-muted,#78716c) 70%, transparent)}}.placeholder\\:text-vc-muted\\/80::placeholder{color:var(--vc-muted,#78716c)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-vc-muted\\/80::placeholder{color:color-mix(in oklab, var(--vc-muted,#78716c) 80%, transparent)}}.backdrop\\:bg-black\\/30::backdrop{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.backdrop\\:bg-black\\/30::backdrop{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.focus-within\\:border-vc-comment:focus-within{border-color:var(--vc-comment,#0d99ff)}.focus-within\\:opacity-100:focus-within{opacity:1}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-vc-comment:focus-within{--tw-ring-color:var(--vc-comment,#0d99ff)}@media (hover:hover){.hover\\:border-vc-line:hover{border-color:var(--vc-line,#d6d3d1)}.hover\\:bg-black\\/80:hover{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.hover\\:bg-vc-surface:hover{background-color:var(--vc-surface,#f5f5f4)}.hover\\:bg-vc-wash:hover{background-color:var(--vc-wash,#e7e5e4)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:text-vc-ink:hover{color:var(--vc-ink,#292524)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus-visible\\:bg-vc-wash:focus-visible{background-color:var(--vc-wash,#e7e5e4)}.focus-visible\\:bg-white\\/10:focus-visible{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:bg-white\\/10:focus-visible{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-vc-comment:focus-visible{outline-color:var(--vc-comment,#0d99ff)}.has-\\[\\[aria-expanded\\=true\\]\\]\\:opacity-100:has([aria-expanded=true]){opacity:1}}:host{--vc-font-default:ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif}@keyframes spin{to{transform:rotate(360deg)}}`,uc=`@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}`,dc=4,fc=class{api;store;#e=N();get options(){return H(this.#e)}set options(e){P(this.#e,e)}#t=N(!1);get active(){return H(this.#t)}set active(e){P(this.#t,e,!0)}#n=N(!1);get panelCollapsed(){return H(this.#n)}set panelCollapsed(e){P(this.#n,e,!0)}#r=N();get openId(){return H(this.#r)}set openId(e){P(this.#r,e,!0)}#i=N();get draft(){return H(this.#i)}set draft(e){P(this.#i,e,!0)}#a=N(Zt({query:``,sort:`date`,showResolved:!1,onlyMine:!1,allPages:!1}));get filters(){return H(this.#a)}set filters(e){P(this.#a,e,!0)}#o=N([]);get surfaces(){return H(this.#o)}set surfaces(e){P(this.#o,e)}#s=N(0);get layout(){return H(this.#s)}set layout(e){P(this.#s,e,!0)}#c=N(``);get page(){return H(this.#c)}set page(e){P(this.#c,e,!0)}#l=N();get panelRect(){return H(this.#l)}set panelRect(e){P(this.#l,e)}#u=N(!1);get hostToggles(){return H(this.#u)}set hostToggles(e){P(this.#u,e,!0)}#d=N();get aim(){return H(this.#d)}set aim(e){P(this.#d,e)}#f=N();get cursor(){return H(this.#f)}set cursor(e){P(this.#f,e)}#p=N();get revealing(){return H(this.#p)}set revealing(e){P(this.#p,e,!0)}#m=N();get connecting(){return H(this.#m)}set connecting(e){P(this.#m,e,!0)}#h=N(!1);get typing(){return H(this.#h)}set typing(e){P(this.#h,e,!0)}#g=N({});get whereabouts(){return H(this.#g)}set whereabouts(e){P(this.#g,e)}doc;host;app;slots=new Map;frames=new Map;cleanup=[];pointer;pressed;measuring=0;aiming=0;animating=0;cursorSheet=new CSSStyleSheet;focusDraftHandler;linked;typingTimer;presenceTimer;constructor(e,t=document){this.options=e,this.doc=t,this.api=new za(e.endpoint??`/_comments`),this.store=new Ba(this.api,e.viewer),this.host=t.createElement(`visual-comments`),this.host.setAttribute(`data-vc-ignore`,``),this.host.style.cssText=`position:fixed;inset:0;z-index:2147483600;pointer-events:none;display:block;`,this.start()}get viewer(){return this.store.viewer}get threads(){return this.store.threads}get unreadCount(){return this.store.unreadCount}get loading(){return this.store.loading}get open(){return this.store.threads.find(e=>e.id===this.openId)}get participants(){return this.store.participants}get connection(){return this.store.connection}get ownPresence(){return{state:this.typing&&this.openId!==void 0?`typing`:`viewing`,page:this.whereabouts.page??(this.page||void 0),surface:this.whereabouts.surface,thread:this.openId}}get pinned(){return this.store.threads.filter(e=>e.page===this.page&&(!e.resolvedAt||this.filters.showResolved||e.id===this.openId))}get showToolbar(){return this.options.toolbar??!this.hostToggles}surface(e){return this.surfaces.find(t=>t.id===e)}titleOf(e){return this.surface(e.surface)?.title||this.options.describe?.(e.surface)?.title||e.title||new URL(e.url).pathname}orderOf(e){return this.options.describe?.(e.surface)?.order??this.surfaces.findIndex(t=>t.id===e.surface)}linkOf(e){return this.options.link?.(e)??`${e.url}#vc=${e.id}`}imageUrl(e){return this.store.imageUrl(e)}ours=e=>e===this.host||this.slots.has(e);configure(e){this.options={...fr(()=>this.options),...e},this.schedule()}toggle(e=!this.active){this.active=e,e||(this.panelCollapsed=!1),this.cursor=void 0,this.aim=void 0,e||(this.draft=void 0,this.openId=void 0),this.updateCursorStyle(),this.updateAim()}openThread(e){e!==this.openId&&this.stopTyping(),this.openId=e;let t=this.open;t?.unread&&this.store.markRead(t.id,!0)}focus(e){if(this.draft=void 0,this.active=!0,this.openThread(e.id),this.revealing=e.id,this.options.show?.(e))return;if(e.page!==this.page){let t=this.linkOf(e);this.options.navigate?this.options.navigate(t,e):location.assign(t);return}let t=this.surface(e.surface);if(t){if(t.element){let{clip:e}=t;(e.right-e.left<80||e.bottom-e.top<80)&&t.element.scrollIntoView({block:`center`,inline:`center`})}else if(!e.anchor){let n=Ea(t,e.x,e.y);Na(t.clip,n.x,n.y)||window.scrollTo({top:e.y-innerHeight/3,behavior:`smooth`})}}}revealElement(e){ta(e),this.revealing=void 0}setPresence(e){let t=fr(()=>this.whereabouts);(t.page!==e.page||t.surface!==e.surface)&&(this.whereabouts={page:e.page,surface:e.surface})}noteTyping(){this.openId!==void 0&&(this.typing=!0,clearTimeout(this.typingTimer),this.typingTimer=setTimeout(()=>this.stopTyping(),5e3))}stopTyping(){clearTimeout(this.typingTimer),this.typing=!1}endConnect(){this.connecting=void 0,mc(`vc-connect`)}signIn(){let e=this.options.auth??`/auth`;if(typeof e==`object`)return e.signIn();let t=`${location.pathname}${location.search}${location.hash}`;location.assign(`${e.replace(/\/$/,``)}/login?${new URLSearchParams({returnTo:t})}`)}signOut(){this.toggle(!1);let e=this.options.auth??`/auth`;if(typeof e==`object`)return e.signOut();let t=this.doc.createElement(`form`);t.method=`POST`,t.action=`${e.replace(/\/$/,``)}/logout`,t.hidden=!0,this.doc.body.appendChild(t),t.submit()}relayout(){this.schedule()}subscribe(e){return bn(()=>{vn(()=>{this.active,this.openId,this.unreadCount,this.viewer,this.store.threads.length,this.loading,this.store.participants,this.store.connection,e(this)})})}destroy(){for(let e of this.cleanup.splice(0))e();for(let e of this.frames.values())e();clearTimeout(this.typingTimer),clearTimeout(this.presenceTimer),this.frames.clear();for(let e of this.slots.values())Hr(e);this.slots.clear(),this.app&&Hr(this.app),this.host.remove(),this.doc.adoptedStyleSheets=this.doc.adoptedStyleSheets.filter(e=>e!==this.cursorSheet)}onFocusDraft(e){this.focusDraftHandler=e}get draftHasContent(){return!!(this.draft?.text.trim()||this.draft?.images)}start(){let e=this.doc,t=e.defaultView,n=this.host.attachShadow({mode:`open`});vc(n),bc(e),e.adoptedStyleSheets=[...e.adoptedStyleSheets,this.cursorSheet],e.documentElement.appendChild(this.host),this.app=Rr(cc,{target:n,props:{vc:this}}),this.cleanup.push(this.store.start());let r=pc(`vc`);r&&/^\d+$/.test(r)&&(this.linked=Number(r),mc(`vc`)),this.connecting=pc(`vc-connect`)||void 0,this.cleanup.push(bn(()=>{vn(()=>{if(this.linked===void 0||this.store.loading)return;let e=this.store.threads.find(e=>e.id===this.linked);(e||this.viewer)&&(this.linked=void 0,e&&(this.filters.showResolved||=!!e.resolvedAt,this.focus(e)))}),vn(()=>{let e=this.ownPresence;clearTimeout(this.presenceTimer),this.presenceTimer=setTimeout(()=>this.store.setPresence(e),150)}),vn(()=>{if(!this.typing)return;let e=setInterval(()=>this.store.setPresence(fr(()=>this.ownPresence),!0),3e3);return()=>clearInterval(e)}),vn(()=>{let t=this.unreadCount>0&&!this.active,n=String(this.active);this.layout;for(let r of e.querySelectorAll(`[data-vc-toggle]`))r.getAttribute(`aria-pressed`)!==n&&r.setAttribute(`aria-pressed`,n),r.hasAttribute(`data-vc-unread`)!==t&&r.toggleAttribute(`data-vc-unread`,t)})}));let i=(e,t,n,r)=>{e.addEventListener(t,n,r),this.cleanup.push(()=>e.removeEventListener(t,n,r))},a={capture:!0};i(t,`pointermove`,e=>this.onPointerMove(e),{capture:!0,passive:!0}),i(t,`pointerdown`,e=>this.onPress(e),a),i(t,`mousedown`,e=>this.onPress(e),a),i(t,`pointerup`,e=>this.onRelease(e),a),i(t,`mouseup`,e=>this.onRelease(e),a),i(t,`click`,e=>this.onClick(e),a);for(let e of[`dblclick`,`auxclick`,`contextmenu`])i(t,e,e=>this.onOtherClick(e),a);i(t,`keydown`,e=>{this.fromUs(e)||this.onEscape(e)},a),i(t,`keydown`,e=>this.onKey(e)),i(t,`keyup`,e=>this.onKey(e)),i(t,`focusin`,e=>{this.fromUs(e)&&e.stopImmediatePropagation()},a);for(let e of[`keydown`,`keyup`,`pointerdown`,`pointerup`,`mousedown`,`mouseup`,`click`,`touchstart`,`touchend`,`focusout`]){let t=e=>{e instanceof KeyboardEvent&&(this.onEscape(e),this.onKey(e)),e.stopPropagation()};this.host.addEventListener(e,t),this.cleanup.push(()=>this.host.removeEventListener(e,t))}i(t,`resize`,()=>this.schedule()),i(t,`hashchange`,()=>{let e=pc(`vc-connect`);e&&(this.connecting=e)}),i(e,`scroll`,()=>this.schedule(),{capture:!0,passive:!0});let o=()=>this.move(void 0);e.documentElement.addEventListener(`pointerleave`,o),this.cleanup.push(()=>e.documentElement.removeEventListener(`pointerleave`,o)),i(t,`blur`,()=>this.move(void 0));let s=e=>{this.active&&e.dataTransfer?.types.includes(`Files`)&&!e.composedPath().includes(this.host)&&e.preventDefault()};i(t,`dragover`,s),i(t,`drop`,s);for(let t of[`transitionrun`,`animationstart`])i(e,t,()=>{this.animating++,this.schedule()},a);for(let t of[`transitionend`,`transitioncancel`,`animationend`,`animationcancel`])i(e,t,()=>{this.animating=Math.max(0,this.animating-1),this.schedule()},a);let c=new MutationObserver(()=>this.schedule());c.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),this.cleanup.push(()=>c.disconnect());let l=setInterval(()=>{this.animating=0,this.schedule()},1e3);this.cleanup.push(()=>clearInterval(l)),this.measure()}watchFrame(e){let t=e.defaultView;if(!t||this.frames.has(e))return;let n=()=>this.schedule(),r=e=>{this.onEscape(e),this.onKey(e)},i=new MutationObserver(n);i.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),e.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t.addEventListener(`resize`,n),t.addEventListener(`keydown`,r),t.addEventListener(`keyup`,r),this.frames.set(e,()=>{i.disconnect(),e.removeEventListener(`scroll`,n,{capture:!0}),t.removeEventListener(`resize`,n),t.removeEventListener(`keydown`,r),t.removeEventListener(`keyup`,r)})}schedule(){this.measuring||=requestAnimationFrame(()=>{this.measuring=0,this.measure(),this.animating&&this.schedule()})}measure(){let e=this.doc;this.surfaces=Ca(e,{ours:this.ours,documentOf:this.options.documentOf}),this.page=_c(this.options.page),this.draft&&!this.surface(this.draft.surface)&&(this.draft=void 0),this.draft?.target&&!this.draft.target.element.isConnected&&!this.draftHasContent&&(this.draft=void 0);let t=new Set(this.surfaces.map(e=>e.doc).filter(t=>!!t&&t!==e));for(let e of t)this.watchFrame(e);for(let[e,n]of this.frames)t.has(e)||(n(),this.frames.delete(e));let n=e.querySelector(`[data-vc-panel]`)?.getBoundingClientRect(),r=n&&n.width>0&&n.height>0?{left:n.left,top:n.top,right:n.right,bottom:n.bottom}:void 0;(r?.left!==this.panelRect?.left||r?.top!==this.panelRect?.top||r?.right!==this.panelRect?.right||r?.bottom!==this.panelRect?.bottom)&&(this.panelRect=r),this.hostToggles=!!e.querySelector(`[data-vc-toggle]`),this.mountSlots(),this.layout++,this.updateAim()}mountSlots(){for(let e of this.doc.querySelectorAll(`[data-vc-account]`)){if(this.slots.has(e)||e.shadowRoot)continue;let t=e.attachShadow({mode:`open`});vc(t);let n=this.doc.createElement(`style`);n.textContent=`:host{color:inherit;font-family:inherit;font-size:inherit}`,t.appendChild(n),this.slots.set(e,Rr(tc,{target:t,props:{vc:this,slot:!0}}))}for(let[e,t]of this.slots)e.isConnected||(Hr(t),this.slots.delete(e))}fromUs(e){return e.composedPath().includes(this.host)}surfaceAt(e,t){return Ta(this.surfaces,this.doc,e,t,this.ours)}move(e){this.pointer=e,this.updateAim()}onPointerMove(e){if(this.active){if(this.fromUs(e))return this.move(void 0);this.move({x:e.clientX,y:e.clientY,alt:e.altKey})}}updateAim(){this.aiming||=requestAnimationFrame(()=>{this.aiming=0;let e=this.pointer,t=this.active&&e?this.surfaceAt(e.x,e.y):void 0,n=t&&e?{x:e.x,y:e.y}:void 0;this.cursor=n,this.aim=t&&e&&!this.draft&&this.openId===void 0?Ra(t,e.x,e.y,e.alt):void 0,this.updateCursorStyle()})}updateCursorStyle(){let e=this.active&&this.cursor?`*, *::before, *::after { cursor: none !important; }`:``;this.cursorSheet.cssRules.length!==+!!e&&this.cursorSheet.replaceSync(e)}onPress(e){if(!this.active||this.fromUs(e))return;this.pressed={x:e.clientX,y:e.clientY};let t=this.surfaceAt(e.clientX,e.clientY);t&&!t.passGestures&&hc(e)}onRelease(e){if(!this.active||this.fromUs(e))return;let t=this.surfaceAt(e.clientX,e.clientY);t&&!t.passGestures&&hc(e)}onOtherClick(e){this.active&&!this.fromUs(e)&&this.surfaceAt(e.clientX,e.clientY)&&hc(e)}onClick(e){if(e.composedPath().some(e=>e instanceof Element&&e.matches(`[data-vc-toggle]`))){this.toggle();return}if(this.fromUs(e))return;if(!this.active){this.openId!==void 0&&this.openThread(void 0);return}let t=this.surfaceAt(e.clientX,e.clientY);if(!t){this.draftHasContent?this.focusDraftHandler?.():this.draft?this.draft=void 0:this.openId!==void 0&&this.openThread(void 0);return}hc(e);let n=this.pressed;this.pressed=void 0,!(n&&Math.hypot(e.clientX-n.x,e.clientY-n.y)>dc)&&this.place(t,e.clientX,e.clientY,e.altKey)}place(e,t,n,r){this.draftHasContent?this.focusDraftHandler?.():this.openId===void 0?(this.draft={...Ra(e,t,n,r),text:``},this.updateAim()):this.openThread(void 0)}wheel(e,t){let n=t.deltaMode===1?16:1,r=t.deltaX*n,i=t.deltaY*n;if(e.doc&&e.doc!==this.doc){let n={x:(t.clientX-e.docOrigin.x)/e.docScale,y:(t.clientY-e.docOrigin.y)/e.docScale},a=na(e.doc.elementFromPoint(n.x,n.y),r/e.docScale,i/e.docScale);if(a){t.preventDefault(),a.scrollBy(r/e.docScale,i/e.docScale);return}}let a=na(e.element?.parentElement??null,r,i);a&&(t.preventDefault(),a.scrollBy(r,i))}onKey(e){if(e.key===`Alt`&&this.pointer){this.pointer={...this.pointer,alt:e.type===`keydown`},this.updateAim();return}if(e.type!==`keydown`||e.defaultPrevented||!this.ownsKey(e))return;let t=this.options.shortcut??`c`;t&&e.key.toLowerCase()===t&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&(e.preventDefault(),this.toggle())}onEscape(e){if(e.type===`keydown`&&e.key===`Escape`&&!e.defaultPrevented&&this.ownsKey(e)&&!(this.host.shadowRoot?.querySelector(`:popover-open`)||this.doc.querySelector(`:popover-open`))){if(this.draft)this.draft=void 0;else if(this.openId!==void 0)this.openThread(void 0);else if(this.active)this.toggle(!1);else return;hc(e)}}ownsKey(e){return!this.host.shadowRoot?.querySelector(`dialog:modal`)&&!gc(e.composedPath()[0])}};function pc(e){return location.hash.slice(1).split(`&`).find(t=>t.startsWith(`${e}=`))?.slice(e.length+1)}function mc(e){let t=location.hash.slice(1).split(`&`),n=t.filter(t=>t&&!t.startsWith(`${e}=`)).join(`&`);n!==t.join(`&`)&&history.replaceState(history.state,``,`${location.pathname}${location.search}${n?`#${n}`:``}`)}function hc(e){e.preventDefault(),e.stopImmediatePropagation()}function gc(e){let t=e;return!!(t&&(t.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)))}function _c(e){let t=new URL(location.href);if(typeof e==`string`)return e;if(e)return e(t);let n=t.pathname.length>1?t.pathname.replace(/\/+$/,``):t.pathname;return`${t.origin}${n}`}function vc(e){let t=e.ownerDocument.createElement(`style`);t.textContent=lc,e.appendChild(t)}var yc=new WeakSet;function bc(e){if(yc.has(e))return;yc.add(e);let t=new CSSStyleSheet;t.replaceSync(uc),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}function xc(e,t){return new fc(e,t)}var Sc=document.currentScript;if(window.VisualComments={create:xc},Sc&&!(`manual`in Sc.dataset)&&!window.visualComments){let{endpoint:e,auth:t,page:n,toolbar:r,shortcut:i}=Sc.dataset,a=()=>{window.visualComments=xc({endpoint:e||void 0,auth:t||void 0,page:n||void 0,toolbar:r===void 0?void 0:r!==`false`,shortcut:i===void 0?void 0:i||!1})};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,a,{once:!0}):a()}})();
51
58
  //# sourceMappingURL=visual-comments.js.map