@htmlbricks/hb-stylus-notebook 0.61.35 → 0.61.37
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.
- package/main.iife.js +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(function(Oe){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Mr=2,Lr="[",jr="]",Nt={},N=Symbol(),Dr="http://www.w3.org/1999/xhtml",ke=!1;var Re=Array.isArray,Fr=Array.prototype.indexOf,qr=Array.from,Lt=Object.keys,_t=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,Ur=Object.getOwnPropertyDescriptors,Yr=Object.prototype,Br=Array.prototype,Ae=Object.getPrototypeOf,Ce=Object.isExtensible;function Pe(t){for(var e=0;e<t.length;e++)t[e]()}function Hr(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const P=2,te=4,ee=8,Tt=16,K=32,z=64,Ie=128,D=256,jt=512,k=1024,Y=2048,Z=4096,vt=8192,nt=16384,re=32768,Gr=65536,Me=1<<17,Jr=1<<18,pt=1<<19,Vr=1<<20,ne=1<<21,ie=1<<22,it=1<<23,se=Symbol("$state"),Wr=Symbol("legacy props"),Xr=Symbol(""),le=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Kr=3,Le=8;function zr(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Zr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qr(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function tn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function en(t){throw new Error("https://svelte.dev/e/effect_orphan")}function rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function nn(){throw new Error("https://svelte.dev/e/hydration_failed")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ln(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function an(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ae(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let T=!1;function gt(t){T=t}let x;function wt(t){if(t===null)throw ae(),Nt;return x=t}function je(){return wt(yt(x))}function De(t){if(T){if(yt(x)!==null)throw ae(),Nt;x=t}}function Fe(t){return t===this.v}function on(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function un(t){return!on(t,this.v)}let fn=!1,B=null;function Dt(t){B=t}function qe(t,e=!1,r){B={p:B,c:null,e:null,s:t,x:null,l:null}}function Ue(t){var e=B,r=e.e;if(r!==null){e.e=null;for(var n of r)sr(n)}return t!==void 0&&(e.x=t),B=e.p,t??{}}function Ye(){return!0}const cn=new WeakMap;function dn(t){var e=g;if(e===null)return w.f|=it,t;if((e.f&re)===0){if((e.f&Ie)===0)throw!e.parent&&t instanceof Error&&Be(t),t;e.b.error(t)}else oe(t,e)}function oe(t,e){for(;e!==null;){if((e.f&Ie)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&Be(t),t}function Be(t){const e=cn.get(t);e&&(_t(t,"message",{value:e.message}),_t(t,"stack",{value:e.stack}))}let xt=[],ue=[];function He(){var t=xt;xt=[],Pe(t)}function _n(){var t=ue;ue=[],Pe(t)}function hn(t){xt.length===0&&queueMicrotask(He),xt.push(t)}function vn(){xt.length>0&&He(),ue.length>0&&_n()}function pn(){const t=g.b;return t===null&&zr(),t}function fe(t){var e=P|Y,r=w!==null&&(w.f&P)!==0?w:null;return g===null||r!==null&&(r.f&D)!==0?e|=D:g.f|=pt,{ctx:B,deps:null,effects:null,equals:Fe,f:e,fn:t,reactions:null,rv:0,v:N,wv:0,parent:r??g,ac:null}}function gn(t,e){let r=g;r===null&&Zr();var n=r.b,i=void 0,s=ve(N),a=null,o=!w;return Pn(()=>{try{var l=t();a&&Promise.resolve(l).catch(()=>{})}catch(_){l=Promise.reject(_)}var u=()=>l;i=a?.then(u,u)??Promise.resolve(l),a=i;var f=O,d=n.is_pending();o&&(n.update_pending_count(1),d||f.increment());const h=(_,v=void 0)=>{a=null,d||f.activate(),v?v!==le&&(s.f|=it,pe(s,v)):((s.f&it)!==0&&(s.f^=it),pe(s,_)),o&&(n.update_pending_count(-1),d||f.decrement()),We()};if(i.then(h,_=>h(null,_||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(l=>{function u(f){function d(){f===i?l(s):u(i)}f.then(d,d)}u(i)})}function Ge(t){const e=fe(t);return dr(e),e}function Je(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)tt(e[r])}}function wn(t){for(var e=t.parent;e!==null;){if((e.f&P)===0)return e;e=e.parent}return null}function ce(t){var e,r=g;G(wn(t));try{Je(t),e=gr(t)}finally{G(r)}return e}function Ve(t){var e=ce(t);if(t.equals(e)||(t.v=e,t.wv=vr()),!ut){var r=(et||(t.f&D)!==0)&&t.deps!==null?Z:k;M(t,r)}}function mn(t,e,r){const n=fe;if(e.length===0){r(t.map(n));return}var i=O,s=g,a=yn(),o=pn();Promise.all(e.map(l=>gn(l))).then(l=>{i?.activate(),a();try{r([...t.map(n),...l])}catch(u){(s.f&nt)===0&&oe(u,s)}i?.deactivate(),We()}).catch(l=>{o.error(l)})}function yn(){var t=g,e=w,r=B,n=O;return function(){G(t),F(e),Dt(r),n?.activate()}}function We(){G(null),F(null),Dt(null)}const de=new Set;let O=null,Xe=new Set,Ft=[];function Ke(){const t=Ft.shift();Ft.length>0&&queueMicrotask(Ke),t()}let st=[],qt=null,_e=!1,Ut=!1;class lt{current=new Map;#e=new Map;#t=new Set;#r=0;#u=null;#f=!1;#i=[];#l=[];#s=[];#n=[];#a=[];#c=[];#d=[];skipped_effects=new Set;process(e){st=[];for(const i of e)this.#h(i);if(this.#i.length===0&&this.#r===0){this.#_();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#a=[],O=null,Ze(r),Ze(n),O===null?O=this:de.delete(this),this.#u?.resolve()}else this.#o(this.#s),this.#o(this.#n),this.#o(this.#a);for(const i of this.#i)bt(i);for(const i of this.#l)bt(i);this.#i=[],this.#l=[]}#h(e){e.f^=k;for(var r=e.first;r!==null;){var n=r.f,i=(n&(K|z))!==0,s=i&&(n&k)!==0,a=s||(n&vt)!==0||this.skipped_effects.has(r);if(!a&&r.fn!==null){if(i)r.f^=k;else if((n&te)!==0)this.#n.push(r);else if((n&k)===0)if((n&ie)!==0){var o=r.b?.is_pending()?this.#l:this.#i;o.push(r)}else Yt(r)&&((r.f&Tt)!==0&&this.#a.push(r),bt(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#o(e){for(const r of e)((r.f&Y)!==0?this.#c:this.#d).push(r),M(r,k);e.length=0}capture(e,r){this.#e.has(e)||this.#e.set(e,r),this.current.set(e,e.v)}activate(){O=this}deactivate(){O=null;for(const e of Xe)if(Xe.delete(e),e(),O!==null)break}neuter(){this.#f=!0}flush(){st.length>0?ze():this.#_(),O===this&&(this.#r===0&&de.delete(this),this.deactivate())}#_(){if(!this.#f)for(const e of this.#t)e();this.#t.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const e of this.#c)M(e,Y),Ot(e);for(const e of this.#d)M(e,Z),Ot(e);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#u??=Hr()).promise}static ensure(){if(O===null){const e=O=new lt;de.add(O),Ut||lt.enqueue(()=>{O===e&&e.flush()})}return O}static enqueue(e){Ft.length===0&&queueMicrotask(Ke),Ft.unshift(e)}}function he(t){var e=Ut;Ut=!0;try{for(var r;;){if(vn(),st.length===0&&(O?.flush(),st.length===0))return qt=null,r;ze()}}finally{Ut=e}}function ze(){var t=$t;_e=!0;try{var e=0;for(fr(!0);st.length>0;){var r=lt.ensure();if(e++>1e3){var n,i;$n()}r.process(st),Q.clear()}}finally{_e=!1,fr(t),qt=null}}function $n(){try{rn()}catch(t){oe(t,qt)}}let at=null;function Ze(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(nt|vt))===0&&Yt(n)&&(at=[],bt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?or(n):n.fn=null),at?.length>0)){Q.clear();for(const i of at)bt(i);at=[]}}at=null}}function Ot(t){for(var e=qt=t;e.parent!==null;){e=e.parent;var r=e.f;if(_e&&e===g&&(r&Tt)!==0)return;if((r&(z|K))!==0){if((r&k)===0)return;e.f^=k}}st.push(e)}const Q=new Map;function ve(t,e){var r={f:0,v:t,reactions:null,equals:Fe,rv:0,wv:0};return r}function b(t,e){const r=ve(t);return dr(r),r}function bn(t,e=!1,r=!0){const n=ve(t);return e||(n.equals=un),n}function E(t,e,r=!1){w!==null&&(!ft||(w.f&Me)!==0)&&Ye()&&(w.f&(P|Tt|ie|Me))!==0&&!W?.includes(t)&&an();let n=r?mt(e):e;return pe(t,n)}function pe(t,e){if(!t.equals(e)){var r=t.v;ut?Q.set(t,e):Q.set(t,r),t.v=e;var n=lt.ensure();n.capture(t,r),(t.f&P)!==0&&((t.f&Y)!==0&&ce(t),M(t,(t.f&D)===0?k:Z)),t.wv=vr(),Qe(t,Y),g!==null&&(g.f&k)!==0&&(g.f&(K|z))===0&&(q===null?qn([t]):q.push(t))}return e}function En(t,e=1){var r=c(t),n=e===1?r++:r--;return E(t,r),n}function ge(t){E(t,t.v+1)}function Qe(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],a=s.f,o=(a&Y)===0;o&&M(s,e),(a&P)!==0?Qe(s,Z):o&&((a&Tt)!==0&&at!==null&&at.push(s),Ot(s))}}function mt(t){if(typeof t!="object"||t===null||se in t)return t;const e=Ae(t);if(e!==Yr&&e!==Br)return t;var r=new Map,n=Re(t),i=b(0),s=ct,a=o=>{if(ct===s)return o();var l=w,u=ct;F(null),hr(s);var f=o();return F(l),hr(u),f};return n&&r.set("length",b(t.length)),new Proxy(t,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&sn();var f=r.get(l);return f===void 0?f=a(()=>{var d=b(u.value);return r.set(l,d),d}):E(f,u.value,!0),!0},deleteProperty(o,l){var u=r.get(l);if(u===void 0){if(l in o){const f=a(()=>b(N));r.set(l,f),ge(i)}}else E(u,N),ge(i);return!0},get(o,l,u){if(l===se)return t;var f=r.get(l),d=l in o;if(f===void 0&&(!d||ht(o,l)?.writable)&&(f=a(()=>{var _=mt(d?o[l]:N),v=b(_);return v}),r.set(l,f)),f!==void 0){var h=c(f);return h===N?void 0:h}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var f=r.get(l);f&&(u.value=c(f))}else if(u===void 0){var d=r.get(l),h=d?.v;if(d!==void 0&&h!==N)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(o,l){if(l===se)return!0;var u=r.get(l),f=u!==void 0&&u.v!==N||Reflect.has(o,l);if(u!==void 0||g!==null&&(!f||ht(o,l)?.writable)){u===void 0&&(u=a(()=>{var h=f?mt(o[l]):N,_=b(h);return _}),r.set(l,u));var d=c(u);if(d===N)return!1}return f},set(o,l,u,f){var d=r.get(l),h=l in o;if(n&&l==="length")for(var _=u;_<d.v;_+=1){var v=r.get(_+"");v!==void 0?E(v,N):_ in o&&(v=a(()=>b(N)),r.set(_+"",v))}if(d===void 0)(!h||ht(o,l)?.writable)&&(d=a(()=>b(void 0)),E(d,mt(u)),r.set(l,d));else{h=d.v!==N;var m=a(()=>mt(u));E(d,m)}var L=Reflect.getOwnPropertyDescriptor(o,l);if(L?.set&&L.set.call(f,u),!h){if(n&&typeof l=="string"){var C=r.get("length"),S=Number(l);Number.isInteger(S)&&S>=C.v&&E(C,S+1)}ge(i)}return!0},ownKeys(o){c(i);var l=Reflect.ownKeys(o).filter(d=>{var h=r.get(d);return h===void 0||h.v!==N});for(var[u,f]of r)f.v!==N&&!(u in o)&&l.push(u);return l},setPrototypeOf(){ln()}})}var tr,er,rr,nr;function we(){if(tr===void 0){tr=window,er=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;rr=ht(e,"firstChild").get,nr=ht(e,"nextSibling").get,Ce(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ce(r)&&(r.__t=void 0)}}function me(t=""){return document.createTextNode(t)}function kt(t){return rr.call(t)}function yt(t){return nr.call(t)}function ir(t,e){if(!T)return kt(t);var r=kt(x);return r===null&&(r=x.appendChild(me())),wt(r),r}function Sn(t,e){if(!T){var r=kt(t);return r instanceof Comment&&r.data===""?yt(r):r}return x}function J(t,e=1,r=!1){let n=T?x:t;for(var i;e--;)i=n,n=yt(n);if(!T)return n;if(r&&n?.nodeType!==Kr){var s=me();return n===null?i?.after(s):n.before(s),wt(s),s}return wt(n),n}function Nn(t){t.textContent=""}function ye(t){var e=w,r=g;F(null),G(null);try{return t()}finally{F(e),G(r)}}function Tn(t){g===null&&w===null&&en(),w!==null&&(w.f&D)!==0&&g===null&&tn(),ut&&Qr()}function xn(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function V(t,e,r,n=!0){var i=g;i!==null&&(i.f&vt)!==0&&(t|=vt);var s={ctx:B,deps:null,nodes_start:null,nodes_end:null,f:t|Y,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{bt(s),s.f|=re}catch(l){throw tt(s),l}else e!==null&&Ot(s);if(n){var a=s;if(r&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&pt)===0&&(a=a.first),a!==null&&(a.parent=i,i!==null&&xn(a,i),w!==null&&(w.f&P)!==0&&(t&z)===0)){var o=w;(o.effects??=[]).push(a)}}return s}function On(t){const e=V(ee,null,!1);return M(e,k),e.teardown=t,e}function kn(t){Tn();var e=g.f,r=!w&&(e&K)!==0&&(e&re)===0;if(r){var n=B;(n.e??=[]).push(t)}else return sr(t)}function sr(t){return V(te|Vr,t,!1)}function Rn(t){lt.ensure();const e=V(z|pt,t,!0);return()=>{tt(e)}}function An(t){lt.ensure();const e=V(z|pt,t,!0);return(r={})=>new Promise(n=>{r.outro?Dn(e,()=>{tt(e),n(void 0)}):(tt(e),n(void 0))})}function Cn(t){return V(te,t,!1)}function Pn(t){return V(ie|pt,t,!0)}function In(t,e=0){return V(ee|e,t,!0)}function ot(t,e=[],r=[]){mn(e,r,n=>{V(ee,()=>t(...n.map(c)),!0)})}function Mn(t,e=!0){return V(K|pt,t,!0,e)}function lr(t){var e=t.teardown;if(e!==null){const r=ut,n=w;cr(!0),F(null);try{e.call(null)}finally{cr(r),F(n)}}}function ar(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&ye(()=>{i.abort(le)});var n=r.next;(r.f&z)!==0?r.parent=null:tt(r,e),r=n}}function Ln(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&K)===0&&tt(e),e=r}}function tt(t,e=!0){var r=!1;(e||(t.f&Jr)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(jn(t.nodes_start,t.nodes_end),r=!0),ar(t,e&&!r),Bt(t,0),M(t,nt);var n=t.transitions;if(n!==null)for(const s of n)s.stop();lr(t);var i=t.parent;i!==null&&i.first!==null&&or(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function jn(t,e){for(;t!==null;){var r=t===e?null:yt(t);t.remove(),t=r}}function or(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Dn(t,e){var r=[];ur(t,r,!0),Fn(r,()=>{tt(t),e&&e()})}function Fn(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function ur(t,e,r){if((t.f&vt)===0){if(t.f^=vt,t.transitions!==null)for(const a of t.transitions)(a.is_global||r)&&e.push(a);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&Gr)!==0||(n.f&K)!==0;ur(n,e,s?r:!1),n=i}}}let $t=!1;function fr(t){$t=t}let ut=!1;function cr(t){ut=t}let w=null,ft=!1;function F(t){w=t}let g=null;function G(t){g=t}let W=null;function dr(t){w!==null&&(W===null?W=[t]:W.push(t))}let R=null,I=0,q=null;function qn(t){q=t}let _r=1,Rt=0,ct=Rt;function hr(t){ct=t}let et=!1;function vr(){return++_r}function Yt(t){var e=t.f;if((e&Y)!==0)return!0;if((e&Z)!==0){var r=t.deps,n=(e&D)!==0;if(r!==null){var i,s,a=(e&jt)!==0,o=n&&g!==null&&!et,l=r.length;if((a||o)&&(g===null||(g.f&nt)===0)){var u=t,f=u.parent;for(i=0;i<l;i++)s=r[i],(a||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);a&&(u.f^=jt),o&&f!==null&&(f.f&D)===0&&(u.f^=D)}for(i=0;i<l;i++)if(s=r[i],Yt(s)&&Ve(s),s.wv>t.wv)return!0}(!n||g!==null&&!et)&&M(t,k)}return!1}function pr(t,e,r=!0){var n=t.reactions;if(n!==null&&!W?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&P)!==0?pr(s,e,!1):e===s&&(r?M(s,Y):(s.f&k)!==0&&M(s,Z),Ot(s))}}function gr(t){var e=R,r=I,n=q,i=w,s=et,a=W,o=B,l=ft,u=ct,f=t.f;R=null,I=0,q=null,et=(f&D)!==0&&(ft||!$t||w===null),w=(f&(K|z))===0?t:null,W=null,Dt(t.ctx),ft=!1,ct=++Rt,t.ac!==null&&(ye(()=>{t.ac.abort(le)}),t.ac=null);try{t.f|=ne;var d=t.fn,h=d(),_=t.deps;if(R!==null){var v;if(Bt(t,I),_!==null&&I>0)for(_.length=I+R.length,v=0;v<R.length;v++)_[I+v]=R[v];else t.deps=_=R;if(!et||(f&P)!==0&&t.reactions!==null)for(v=I;v<_.length;v++)(_[v].reactions??=[]).push(t)}else _!==null&&I<_.length&&(Bt(t,I),_.length=I);if(Ye()&&q!==null&&!ft&&_!==null&&(t.f&(P|Z|Y))===0)for(v=0;v<q.length;v++)pr(q[v],t);return i!==null&&i!==t&&(Rt++,q!==null&&(n===null?n=q:n.push(...q))),(t.f&it)!==0&&(t.f^=it),h}catch(m){return dn(m)}finally{t.f^=ne,R=e,I=r,q=n,w=i,et=s,W=a,Dt(o),ft=l,ct=u}}function Un(t,e){let r=e.reactions;if(r!==null){var n=Fr.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&P)!==0&&(R===null||!R.includes(e))&&(M(e,Z),(e.f&(D|jt))===0&&(e.f^=jt),Je(e),Bt(e,0))}function Bt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Un(t,r[n])}function bt(t){var e=t.f;if((e&nt)===0){M(t,k);var r=g,n=$t;g=t,$t=!0;try{(e&Tt)!==0?Ln(t):ar(t),lr(t);var i=gr(t);t.teardown=typeof i=="function"?i:null,t.wv=_r;var s;ke&&fn&&(t.f&Y)!==0&&t.deps}finally{$t=n,g=r}}}function c(t){var e=t.f,r=(e&P)!==0;if(w!==null&&!ft){var n=g!==null&&(g.f&nt)!==0;if(!n&&!W?.includes(t)){var i=w.deps;if((w.f&ne)!==0)t.rv<Rt&&(t.rv=Rt,R===null&&i!==null&&i[I]===t?I++:R===null?R=[t]:(!et||!R.includes(t))&&R.push(t));else{(w.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[w]:s.includes(w)||s.push(w)}}}else if(r&&t.deps===null&&t.effects===null){var a=t,o=a.parent;o!==null&&(o.f&D)===0&&(a.f^=D)}if(ut){if(Q.has(t))return Q.get(t);if(r){a=t;var l=a.v;return((a.f&k)===0&&a.reactions!==null||wr(a))&&(l=ce(a)),Q.set(a,l),l}}else r&&(a=t,Yt(a)&&Ve(a));if((t.f&it)!==0)throw t.v;return t.v}function wr(t){if(t.v===N)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Q.has(e)||(e.f&P)!==0&&wr(e))return!0;return!1}const Yn=-7169;function M(t,e){t.f=t.f&Yn|e}const mr=new Set,$e=new Set;function Bn(t,e,r,n={}){function i(s){if(n.capture||At.call(e,s),!s.cancelBubble)return ye(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?hn(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function Ht(t,e,r,n,i){var s={capture:n,passive:i},a=Bn(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&On(()=>{e.removeEventListener(t,a,s)})}function Hn(t){for(var e=0;e<t.length;e++)mr.add(t[e]);for(var r of $e)r(t)}let yr=null;function At(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;yr=t;var a=0,o=yr===t&&t.__root;if(o){var l=i.indexOf(o);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||t.target,s!==e){_t(t,"currentTarget",{configurable:!0,get(){return s||r}});var f=w,d=g;F(null),G(null);try{for(var h,_=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var m=s["__"+n];if(m!=null&&(!s.disabled||t.target===s))if(Re(m)){var[L,...C]=m;L.apply(s,[t,...C])}else m.call(s,t)}catch(S){h?_.push(S):h=S}if(t.cancelBubble||v===e||v===null)break;s=v}if(h){for(let S of _)queueMicrotask(()=>{throw S});throw h}}finally{t.__root=e,delete t.currentTarget,F(f),G(d)}}}function Gn(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function be(t,e){var r=g;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Jn(t,e){var r=(e&Mr)!==0,n,i=!t.startsWith("<!>");return()=>{if(T)return be(x,null),x;n===void 0&&(n=Gn(i?t:"<!>"+t));var s=r||er?document.importNode(n,!0):n.cloneNode(!0);{var a=kt(s),o=s.lastChild;be(a,o)}return s}}function $r(t,e){if(T){g.nodes_end=x,je();return}t!==null&&t.before(e)}const Vn=["touchstart","touchmove"];function Wn(t){return Vn.includes(t)}function br(t,e){return Er(t,e)}function Xn(t,e){we(),e.intro=e.intro??!1;const r=e.target,n=T,i=x;try{for(var s=kt(r);s&&(s.nodeType!==Le||s.data!==Lr);)s=yt(s);if(!s)throw Nt;gt(!0),wt(s),je();const a=Er(t,{...e,anchor:s});if(x===null||x.nodeType!==Le||x.data!==jr)throw ae(),Nt;return gt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Nt&&console.warn("Failed to hydrate: ",a),e.recover===!1&&nn(),we(),Nn(r),gt(!1),br(t,e)}finally{gt(n),wt(i)}}const Et=new Map;function Er(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:a=!0}){we();var o=new Set,l=d=>{for(var h=0;h<d.length;h++){var _=d[h];if(!o.has(_)){o.add(_);var v=Wn(_);e.addEventListener(_,At,{passive:v});var m=Et.get(_);m===void 0?(document.addEventListener(_,At,{passive:v}),Et.set(_,1)):Et.set(_,m+1)}}};l(qr(mr)),$e.add(l);var u=void 0,f=An(()=>{var d=r??e.appendChild(me());return Mn(()=>{if(s){qe({});var h=B;h.c=s}i&&(n.$$events=i),T&&be(d,null),u=t(d,n)||{},T&&(g.nodes_end=x),s&&Ue()}),()=>{for(var h of o){e.removeEventListener(h,At);var _=Et.get(h);--_===0?(document.removeEventListener(h,At),Et.delete(h)):Et.set(h,_)}$e.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return Ee.set(u,f),u}let Ee=new WeakMap;function Kn(t,e){const r=Ee.get(t);return r?(Ee.delete(t),r(e)):Promise.resolve()}function zn(t,e){Cn(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}function Zn(t,e){return t==null?null:String(t)}function Se(t,e,r,n){var i=t.__style;if(T||i!==e){var s=Zn(e);(!T||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}return n}const Qn=Symbol("is custom element"),ti=Symbol("is html");function ei(t,e,r,n){var i=ri(t);T&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Xr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Sr(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function U(t,e,r){var n=w,i=g;let s=T;T&>(!1),F(null),G(null);try{e!=="style"&&(Ne.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Sr(t).includes(e):r&&typeof r=="object")?t[e]=r:ei(t,e,r==null?r:String(r))}finally{F(n),G(i),s&>(!0)}}function ri(t){return t.__attributes??={[Qn]:t.nodeName.includes("-"),[ti]:t.namespaceURI===Dr}}var Ne=new Map;function Sr(t){var e=t.getAttribute("is")||t.nodeName,r=Ne.get(e);if(r)return r;Ne.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=Ur(i);for(var a in n)n[a].set&&r.push(a);i=Ae(i)}return r}function Nr(t,e,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=t[e],o===void 0&&n!==void 0&&(o=a());var l;l=()=>{var h=t[e];return h===void 0?a():(s=!0,h)};var u=!1,f=fe(()=>(u=!1,l())),d=g;return(function(h,_){if(arguments.length>0){const v=_?c(f):h;return E(f,v),u=!0,i!==void 0&&(i=v),h}return ut&&u||(d.f&nt)!==0?f.v:c(f)})}function ni(t){return new ii(t)}class ii{#e;#t;constructor(e){var r=new Map,n=(s,a)=>{var o=bn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...e.props||{},$$events:{}},{get(s,a){return c(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===Wr?!0:(c(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return E(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(e.hydrate?Xn:br)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&he(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||_t(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{Kn(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let Tr;typeof HTMLElement=="function"&&(Tr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),$r(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=si(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Gt(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ni({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Rn(()=>{In(()=>{this.$$r=!0;for(const n of Lt(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Gt(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Gt(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Lt(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Gt(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function si(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function li(t,e,r,n,i,s){let a=class extends Tr{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return Lt(e).map(o=>(e[o].attribute||o).toLowerCase())}};return Lt(e).forEach(o=>{_t(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Gt(o,l,e),this.$$d[o]=l;var u=this.$$c;if(u){var f=ht(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{_t(a.prototype,o,{get(){return this.$$c?.[o]}})}),t.element=a,a}const xr={version:"0.61.
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Nt&&console.warn("Failed to hydrate: ",a),e.recover===!1&&nn(),we(),Nn(r),gt(!1),br(t,e)}finally{gt(n),wt(i)}}const Et=new Map;function Er(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:a=!0}){we();var o=new Set,l=d=>{for(var h=0;h<d.length;h++){var _=d[h];if(!o.has(_)){o.add(_);var v=Wn(_);e.addEventListener(_,At,{passive:v});var m=Et.get(_);m===void 0?(document.addEventListener(_,At,{passive:v}),Et.set(_,1)):Et.set(_,m+1)}}};l(qr(mr)),$e.add(l);var u=void 0,f=An(()=>{var d=r??e.appendChild(me());return Mn(()=>{if(s){qe({});var h=B;h.c=s}i&&(n.$$events=i),T&&be(d,null),u=t(d,n)||{},T&&(g.nodes_end=x),s&&Ue()}),()=>{for(var h of o){e.removeEventListener(h,At);var _=Et.get(h);--_===0?(document.removeEventListener(h,At),Et.delete(h)):Et.set(h,_)}$e.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return Ee.set(u,f),u}let Ee=new WeakMap;function Kn(t,e){const r=Ee.get(t);return r?(Ee.delete(t),r(e)):Promise.resolve()}function zn(t,e){Cn(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}function Zn(t,e){return t==null?null:String(t)}function Se(t,e,r,n){var i=t.__style;if(T||i!==e){var s=Zn(e);(!T||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}return n}const Qn=Symbol("is custom element"),ti=Symbol("is html");function ei(t,e,r,n){var i=ri(t);T&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Xr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Sr(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function U(t,e,r){var n=w,i=g;let s=T;T&>(!1),F(null),G(null);try{e!=="style"&&(Ne.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Sr(t).includes(e):r&&typeof r=="object")?t[e]=r:ei(t,e,r==null?r:String(r))}finally{F(n),G(i),s&>(!0)}}function ri(t){return t.__attributes??={[Qn]:t.nodeName.includes("-"),[ti]:t.namespaceURI===Dr}}var Ne=new Map;function Sr(t){var e=t.getAttribute("is")||t.nodeName,r=Ne.get(e);if(r)return r;Ne.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=Ur(i);for(var a in n)n[a].set&&r.push(a);i=Ae(i)}return r}function Nr(t,e,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=t[e],o===void 0&&n!==void 0&&(o=a());var l;l=()=>{var h=t[e];return h===void 0?a():(s=!0,h)};var u=!1,f=fe(()=>(u=!1,l())),d=g;return(function(h,_){if(arguments.length>0){const v=_?c(f):h;return E(f,v),u=!0,i!==void 0&&(i=v),h}return ut&&u||(d.f&nt)!==0?f.v:c(f)})}function ni(t){return new ii(t)}class ii{#e;#t;constructor(e){var r=new Map,n=(s,a)=>{var o=bn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...e.props||{},$$events:{}},{get(s,a){return c(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===Wr?!0:(c(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return E(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(e.hydrate?Xn:br)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&he(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||_t(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{Kn(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let Tr;typeof HTMLElement=="function"&&(Tr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),$r(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=si(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Gt(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ni({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Rn(()=>{In(()=>{this.$$r=!0;for(const n of Lt(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Gt(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Gt(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Lt(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Gt(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function si(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function li(t,e,r,n,i,s){let a=class extends Tr{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return Lt(e).map(o=>(e[o].attribute||o).toLowerCase())}};return Lt(e).forEach(o=>{_t(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Gt(o,l,e),this.$$d[o]=l;var u=this.$$c;if(u){var f=ht(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{_t(a.prototype,o,{get(){return this.$$c?.[o]}})}),t.element=a,a}const xr={version:"0.61.37"};function ai(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var St={},Te,Or;function oi(){if(Or)return Te;Or=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
|
|
3
3
|
`,u="/",f="*",d="",h="comment",_="declaration";Te=function(m,L){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];L=L||{};var C=1,S=1;function Jt($){var p=$.match(e);p&&(C+=p.length);var A=$.lastIndexOf(l);S=~A?$.length-A:S+$.length}function Vt(){var $={line:C,column:S};return function(p){return p.position=new Wt($),Kt(),p}}function Wt($){this.start=$,this.end={line:C,column:S},this.source=L.source}Wt.prototype.content=m;function Xt($){var p=new Error(L.source+":"+C+":"+S+": "+$);if(p.reason=$,p.filename=L.source,p.line=C,p.column=S,p.source=m,!L.silent)throw p}function dt($){var p=$.exec(m);if(p){var A=p[0];return Jt(A),m=m.slice(A.length),p}}function Kt(){dt(r)}function zt($){var p;for($=$||[];p=Ct();)p!==!1&&$.push(p);return $}function Ct(){var $=Vt();if(!(u!=m.charAt(0)||f!=m.charAt(1))){for(var p=2;d!=m.charAt(p)&&(f!=m.charAt(p)||u!=m.charAt(p+1));)++p;if(p+=2,d===m.charAt(p-1))return Xt("End of comment missing");var A=m.slice(2,p-2);return S+=2,Jt(A),m=m.slice(p),S+=2,$({type:h,comment:A})}}function Pt(){var $=Vt(),p=dt(n);if(p){if(Ct(),!dt(i))return Xt("property missing ':'");var A=dt(s),It=$({type:_,property:v(p[0].replace(t,d)),value:A?v(A[0].replace(t,d)):d});return dt(a),It}}function Zt(){var $=[];zt($);for(var p;p=Pt();)p!==!1&&($.push(p),zt($));return $}return Kt(),Zt()};function v(m){return m?m.replace(o,d):d}return Te}var kr;function ui(){if(kr)return St;kr=1;var t=St&&St.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(St,"__esModule",{value:!0}),St.default=r;var e=t(oi());function r(n,i){var s=null;if(!n||typeof n!="string")return s;var a=(0,e.default)(n),o=typeof i=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,f=l.value;o?i(u,f,l):f&&(s=s||{},s[u]=f)}}),s}return St}var fi=ui();const Rr=ai(fi);Rr.default;function Ar(t){const e=t?.repoName.split("/")?.[1]||t?.repoName;if(!e)throw new Error("wrong componentPath "+t?.repoName);if(!t?.version)throw new Error("wrong version "+t?.version);const r=t?.iifePath||"main.iife.js";if(!document.getElementById(e+"-script"))try{const n=document.createElement("script");if(n.id=e+"-script",n.src=`https://cdn.jsdelivr.net/npm/${t.repoName}@${t.version}/${r}`,t?.local)n.src=`${t.local}`;else if(location.href.includes("localhost:6006")){const i=e.split("-")[0];n.src=`http://localhost:6006/webcomponents/${e.replace(i+"-","")}/${r}`}document.head.appendChild(n)}catch(n){console.warn(n)}}var ci=(t,e)=>e("eraser"),di=(t,e)=>e("select"),_i=(t,e)=>e("draw"),hi=(t,e)=>e(),vi=(t,e)=>e(),pi=(t,e)=>e(),gi=Jn('<div part="controller" id="controller" class="svelte-14wiqdf"><button>clear</button> <button>select</button> <button>draw</button> <button>undo</button> <button>redo</button> <button>save</button> <button>brush</button> <br/>load:<hb-input-file></hb-input-file> insert:<hb-input-file></hb-input-file></div> <div part="paper-container" id="paper-container" style="position:relative" class="svelte-14wiqdf"><hb-stylus-paper></hb-stylus-paper></div>',3);const wi={hash:"svelte-14wiqdf",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;position:absolute;width:100%;height:100%;display:block;display:grid;grid-template-areas:"header" "paper";grid-template-columns:1fr;grid-template-rows:auto 1fr;}#controller.svelte-14wiqdf {grid-area:header;}#paper-container.svelte-14wiqdf {grid-area:paper;background:green;}'};function Cr(t,e){qe(e,!0),zn(t,wi);let r=Nr(e,"id",7,""),n=Nr(e,"load_draw"),i=b("draw");mt({});let s=b(""),a=b(""),o=b(0),l=b(void 0),u=b(!1),f=b(void 0),d=b(void 0),h=b(void 0),_=b(void 0),v=Ge(()=>(c(l)===0||c(l))&&c(l)<c(o)),m=Ge(()=>(c(o)||c(o)===0)&&c(u)&&(!c(l)||c(l)!==-1)&&(!c(_)||c(_)<c(o)&&(!c(l)||c(l)<c(_))));kn(()=>{if(typeof n()=="string"&&n()?.length)try{n(JSON.parse(n()))}catch(y){console.error("error parsing json",y)}}),Ar({repoName:"@htmlbricks/hb-stylus-paper",version:xr.version}),Ar({repoName:"@htmlbricks/hb-input-file",version:xr.version});function L(y,rt){var X="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(y)),j=document.createElement("a");j.setAttribute("href",X),j.setAttribute("download",rt),document.body.appendChild(j),j.click(),j.remove()}function C(y){E(i,y,!0)}function S(){console.log("ch",c(o),c(l)),c(o)>=0&&(!c(l)||c(l)>-1)&&(E(l,c(l)||c(l)===0?c(l)-1:c(o)-1,!0),console.log("undo",c(o),c(l)))}function Jt(){console.log(c(o),c(l)),(c(l)||c(l)===0)&&c(l)<=c(o)&&(En(l),console.log("redo",c(o),c(l)))}function Vt(y){c(u)||E(u,!0),console.log("h",y),E(o,y.index-1),y.start_index&&E(_,y.start_index,!0),E(l,void 0)}function Wt(){E(f,{name:"test",type:"json"},!0)}function Xt(y){const rt=y.value?.name;if(rt){const X=new FileReader;X.readAsDataURL(y.value),X.onload=function(j){try{if(console.log("insert file",j.target,j.target?.result),j.target?.result){const yi=j.target.result.toString().split(";")[0].split("/")[1];E(d,{base64:j.target.result.toString(),type:yi,name:rt},!0)}}catch{console.error("error loading file")}},X.onerror=function(j){console.error("error reading file")}}}function dt(y){console.log("save",y),E(f,void 0),L(y,y?.name+".json")}function Kt(y){if(console.log("file",y),y.value?.name){const rt=new FileReader;rt.readAsText(y.value,"UTF-8"),rt.onload=function(X){if(X?.target?.result?.toString())try{n(JSON.parse(X.target.result.toString()))}catch{console.error("error loading file")}},rt.onerror=function(X){console.error("error reading file")}}}var zt={get id(){return r()},set id(y=""){r(y),he()},get load_draw(){return n()},set load_draw(y){n(y),he()}},Ct=gi(),Pt=Sn(Ct),Zt=ir(Pt);Zt.__click=[ci,C];var $=J(Zt,2);$.__click=[di,C];var p=J($,2);p.__click=[_i,C];var A=J(p,2);A.__click=[hi,S];var It=J(A,2);It.__click=[vi,Jt];var xe=J(It,2);xe.__click=[pi,Wt];var Pr=J(xe,2),Mt=J(Pr,4);U(Mt,"id","loadfile"),Se(Mt,c(a)),U(Mt,"schemaentry",JSON.stringify({label:"ciao",id:"xxxxxxx"}));var Qt=J(Mt,2);U(Qt,"id","insertfile"),Se(Qt,c(a)),U(Qt,"schemaentry",JSON.stringify({label:"ciao"})),De(Pt);var Ir=J(Pt,2),H=ir(Ir);return U(H,"id","stylus-paper"),ot(()=>U(H,"goto",c(l))),Se(H,c(s)),U(H,"background_color","green"),ot(()=>U(H,"mode",c(i))),ot(()=>U(H,"save_as",c(f)?JSON.stringify(c(f)):"")),ot(()=>U(H,"load_draw",n()?JSON.stringify(n()):null)),ot(()=>U(H,"insert_image",c(d)?JSON.stringify(c(d)):null)),ot(()=>U(H,"insert_text",c(h)?JSON.stringify(c(h)):null)),De(Ir),ot(()=>{A.disabled=!c(m),It.disabled=!c(v),xe.disabled=!c(m),Pr.disabled=c(i)!=="draw"}),Ht("setVal",Mt,y=>Kt(y.detail)),Ht("setVal",Qt,y=>Xt(y.detail)),Ht("historyIndex",H,y=>Vt(y.detail)),Ht("save",H,y=>dt(y.detail)),$r(t,Ct),Ue(zt)}Hn(["click"]),customElements.define("hb-stylus-notebook",li(Cr,{id:{},load_draw:{}},[],[],!0)),Oe.Component=Cr,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})})(this["stylus-notebook"]=this["stylus-notebook"]||{});
|
|
4
4
|
//# sourceMappingURL=main.iife.js.map
|
package/manifest.json
CHANGED