@konemono/nostr-share-component 0.2.4 → 0.2.5
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/dist/nostr-share-component.es.js +481 -481
- package/dist/nostr-share-component.js +11 -11
- package/dist/nostr-share-component.umd.js +11 -11
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var NostrShare=function(p){"use strict";var In=Object.defineProperty;var vr=p=>{throw TypeError(p)};var Dn=(p,w,k)=>w in p?In(p,w,{enumerable:!0,configurable:!0,writable:!0,value:k}):p[w]=k;var P=(p,w,k)=>Dn(p,typeof w!="symbol"?w+"":w,k),dr=(p,w,k)=>w.has(p)||vr("Cannot "+k);var O=(p,w,k)=>(dr(p,w,"read from private field"),k?k.call(p):w.get(p)),$e=(p,w,k)=>w.has(p)?vr("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(p):w.set(p,k),xe=(p,w,k,zt)=>(dr(p,w,"write to private field"),zt?zt.call(p,k):w.set(p,k),k);var J,L;const w="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(w);const k=1,zt=2,hr=16,_r=8,gr=1,pr=2,ye="[",Zt="[!",Qt="]",gt={},br=Symbol(),mr=["touchstart","touchmove"];function $r(t){return mr.includes(t)}const we=!1;var Ee=Array.isArray,te=Array.from,Ct=Object.keys,Nt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,xr=Object.getOwnPropertyDescriptors,yr=Object.getPrototypeOf;function wr(t){for(var e=0;e<t.length;e++)t[e]()}const j=2,ke=4,Ot=8,ee=16,q=32,st=64,re=128,it=256,Rt=512,R=1024,X=2048,pt=4096,H=8192,at=16384,Er=32768,ne=65536,kr=1<<19,Se=1<<20,Sr=Symbol("$state"),Te=Symbol("legacy props"),Tr=Symbol("");function ze(t){return t===this.v}function zr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!zr(t,this.v)}function Nr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ar(){throw new Error("https://svelte.dev/e/hydration_failed")}function Or(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ir(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ce=!1;function It(t,e){var r={f:0,v:t,reactions:null,equals:ze,version:0};return r}function Dr(t){return Mr(It(t))}function le(t,e=!1){const r=It(t);return e||(r.equals=Cr),r}function Mr(t){return y!==null&&y.f&j&&(B===null?Gr([t]):B.push(t)),t}function Dt(t,e){return y!==null&&Wr()&&y.f&(j|ee)&&(B===null||!B.includes(t))&&Ir(),Ne(t,e)}function Ne(t,e){return t.equals(e)||(t.v=e,t.version=Je(),Ae(t,X),g!==null&&g.f&R&&!(g.f&q)&&(T!==null&&T.includes(t)?(W(g,X),Gt(g)):tt===null?Kr([t]):tt.push(t))),e}function Ae(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,l=0;l<n;l++){var o=r[l],s=o.f;s&X||(W(o,e),s&(R|it)&&(s&j?Ae(o,pt):Gt(o)))}}function oe(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let b=!1;function Y(t){b=t}let m;function V(t){if(t===null)throw oe(),gt;return m=t}function bt(){return V(Z(m))}function mt(t){if(b){if(Z(m)!==null)throw oe(),gt;m=t}}function se(){for(var t=0,e=m;;){if(e.nodeType===8){var r=e.data;if(r===Qt){if(t===0)return e;t-=1}else(r===ye||r===Zt)&&(t+=1)}var n=Z(e);e.remove(),e=n}}var Oe,Re,Ie;function ie(){if(Oe===void 0){Oe=window;var t=Element.prototype,e=Node.prototype;Re=At(e,"firstChild").get,Ie=At(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Mt(t=""){return document.createTextNode(t)}function G(t){return Re.call(t)}function Z(t){return Ie.call(t)}function Lt(t,e){if(!b)return G(t);var r=G(m);return r===null&&(r=m.appendChild(Mt())),V(r),r}function De(t,e){if(!b){var r=G(t);return r instanceof Comment&&r.data===""?Z(r):r}return m}function jt(t,e=1,r=!1){let n=b?m:t;for(var l;e--;)l=n,n=Z(n);if(!b)return n;var o=n==null?void 0:n.nodeType;if(r&&o!==3){var s=Mt();return n===null?l==null||l.after(s):n.before(s),V(s),s}return V(n),n}function Me(t){t.textContent=""}function ae(t){var e=j|X;g===null?e|=it:g.f|=Se;var r=y!==null&&y.f&j?y:null;const n={children:null,ctx:F,deps:null,equals:ze,f:e,fn:t,reactions:null,v:null,version:0,parent:r??g};return r!==null&&(r.children??(r.children=[])).push(n),n}function Le(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&j?ue(n):K(n)}}}function Lr(t){for(var e=t.parent;e!==null;){if(!(e.f&j))return e;e=e.parent}return null}function je(t){var e,r=g;Q(Lr(t));try{Le(t),e=Xe(t)}finally{Q(r)}return e}function Fe(t){var e=je(t),r=(lt||t.f&it)&&t.deps!==null?pt:R;W(t,r),t.equals(e)||(t.v=e,t.version=Je())}function ue(t){Le(t),Et(t,0),W(t,at),t.v=t.children=t.deps=t.ctx=t.reactions=null}function jr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ut(t,e,r,n=!0){var l=(t&st)!==0,o=g,s={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|X,first:null,fn:e,last:null,next:null,parent:l?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ct;try{Ke(!0),Yt(s),s.f|=Er}catch(_){throw K(s),_}finally{Ke(i)}}else e!==null&&Gt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&Se)===0;if(!u&&!l&&n&&(o!==null&&jr(s,o),y!==null&&y.f&j)){var f=y;(f.children??(f.children=[])).push(s)}return s}function Fr(t){const e=ut(st,t,!0);return()=>{K(e)}}function Pr(t){const e=ut(st,t,!0);return(r={})=>new Promise(n=>{r.outro?Pt(e,()=>{K(e),n(void 0)}):(K(e),n(void 0))})}function qr(t){return ut(ke,t,!1)}function Hr(t){return ut(Ot,t,!0)}function Ft(t){return ce(t)}function ce(t,e=0){return ut(Ot|ee|e,t,!0)}function $t(t,e=!0){return ut(Ot|q,t,!0,e)}function Pe(t){var e=t.teardown;if(e!==null){const r=y;vt(null);try{e.call(null)}finally{vt(r)}}}function qe(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)ue(e[r])}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;K(r,e),r=n}}function Vr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&q||K(e),e=r}}function K(t,e=!0){var r=!1;if((e||t.f&kr)&&t.nodes_start!==null){for(var n=t.nodes_start,l=t.nodes_end;n!==null;){var o=n===l?null:Z(n);n.remove(),n=o}r=!0}He(t,e&&!r),qe(t),Et(t,0),W(t,at);var s=t.transitions;if(s!==null)for(const u of s)u.stop();Pe(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Ve(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 Pt(t,e){var r=[];fe(t,r,!0),Be(r,()=>{K(t),e&&e()})}function Be(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var l of t)l.out(n)}else e()}function fe(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var l=n.next,o=(n.f&ne)!==0||(n.f&q)!==0;fe(n,e,o?r:!1),n=l}}}function qt(t){Ue(t,!0)}function Ue(t,e){if(t.f&H){wt(t)&&Yt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,l=(r.f&ne)!==0||(r.f&q)!==0;Ue(r,l?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let Ht=!1,ve=[];function Ye(){Ht=!1;const t=ve.slice();ve=[],wr(t)}function Br(t){Ht||(Ht=!0,queueMicrotask(Ye)),ve.push(t)}function Ur(){Ht&&Ye()}const Ge=0,Yr=1;let Vt=!1,Bt=Ge,xt=!1,yt=null,ct=!1;function Ke(t){ct=t}let nt=[],ft=0,Mn=[],y=null;function vt(t){y=t}let g=null;function Q(t){g=t}let B=null;function Gr(t){B=t}let T=null,I=0,tt=null;function Kr(t){tt=t}let We=1,lt=!1,F=null;function Je(){return++We}function Wr(){return!Ce}function wt(t){var s,i;var e=t.f;if(e&X)return!0;if(e&pt){var r=t.deps,n=(e&it)!==0;if(r!==null){var l;if(e&Rt){for(l=0;l<r.length;l++)((s=r[l]).reactions??(s.reactions=[])).push(t);t.f^=Rt}for(l=0;l<r.length;l++){var o=r[l];if(wt(o)&&Fe(o),n&&g!==null&&!lt&&!((i=o==null?void 0:o.reactions)!=null&&i.includes(t))&&(o.reactions??(o.reactions=[])).push(t),o.version>t.version)return!0}}(!n||g!==null&&!lt)&&W(t,R)}return!1}function Jr(t,e){for(var r=e;r!==null;){if(r.f&re)try{r.fn(t);return}catch{r.f^=re}r=r.parent}throw Vt=!1,t}function Xr(t){return(t.f&at)===0&&(t.parent===null||(t.parent.f&re)===0)}function Ut(t,e,r,n){if(Vt){if(r===null&&(Vt=!1),Xr(e))throw t;return}r!==null&&(Vt=!0);{Jr(t,e);return}}function Xe(t){var c;var e=T,r=I,n=tt,l=y,o=lt,s=B,i=F,u=t.f;T=null,I=0,tt=null,y=u&(q|st)?null:t,lt=!ct&&(u&it)!==0,B=null,F=t.ctx;try{var f=(0,t.fn)(),_=t.deps;if(T!==null){var a;if(Et(t,I),_!==null&&I>0)for(_.length=I+T.length,a=0;a<T.length;a++)_[I+a]=T[a];else t.deps=_=T;if(!lt)for(a=I;a<_.length;a++)((c=_[a]).reactions??(c.reactions=[])).push(t)}else _!==null&&I<_.length&&(Et(t,I),_.length=I);return f}finally{T=e,I=r,tt=n,y=l,lt=o,B=s,F=i}}function Zr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var l=r.length-1;l===0?r=e.reactions=null:(r[n]=r[l],r.pop())}}r===null&&e.f&j&&(T===null||!T.includes(e))&&(W(e,pt),e.f&(it|Rt)||(e.f^=Rt),Et(e,0))}function Et(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Zr(t,r[n])}function Yt(t){var e=t.f;if(!(e&at)){W(t,R);var r=g,n=F;g=t;try{e&ee?Vr(t):He(t),qe(t),Pe(t);var l=Xe(t);t.teardown=typeof l=="function"?l:null,t.version=We}catch(o){Ut(o,t,r,n||t.ctx)}finally{g=r}}}function Ze(){if(ft>1e3){ft=0;try{Nr()}catch(t){if(yt!==null)Ut(t,yt,null);else throw t}}ft++}function Qe(t){var e=t.length;if(e!==0){Ze();var r=ct;ct=!0;try{for(var n=0;n<e;n++){var l=t[n];l.f&R||(l.f^=R);var o=[];tr(l,o),Qr(o)}}finally{ct=r}}}function Qr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(at|H)))try{wt(n)&&(Yt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ve(n):n.fn=null))}catch(l){Ut(l,n,null,n.ctx)}}}function tn(){if(xt=!1,ft>1001)return;const t=nt;nt=[],Qe(t),xt||(ft=0,yt=null)}function Gt(t){Bt===Ge&&(xt||(xt=!0,queueMicrotask(tn))),yt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(st|q)){if(!(r&R))return;e.f^=R}}nt.push(e)}function tr(t,e){var r=t.first,n=[];t:for(;r!==null;){var l=r.f,o=(l&q)!==0,s=o&&(l&R)!==0,i=r.next;if(!s&&!(l&H))if(l&Ot){if(o)r.f^=R;else try{wt(r)&&Yt(r)}catch(a){Ut(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else l&ke&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var f=a.next;if(f!==null){r=f;continue t}a=a.parent}}r=i}for(var _=0;_<n.length;_++)u=n[_],e.push(u),tr(u,e)}function N(t){var e=Bt,r=nt;try{Ze();const l=[];Bt=Yr,nt=l,xt=!1,Qe(r);var n=t==null?void 0:t();return Ur(),(nt.length>0||l.length>0)&&N(),ft=0,yt=null,n}finally{Bt=e,nt=r}}function D(t){var _;var e=t.f,r=(e&j)!==0;if(r&&e&at){var n=je(t);return ue(t),n}if(y!==null){B!==null&&B.includes(t)&&Rr();var l=y.deps;T===null&&l!==null&&l[I]===t?I++:T===null?T=[t]:T.push(t),tt!==null&&g!==null&&g.f&R&&!(g.f&q)&&tt.includes(t)&&(W(g,X),Gt(g))}else if(r&&t.deps===null)for(var o=t,s=o.parent,i=o;s!==null;)if(s.f&j){var u=s;i=u,s=u.parent}else{var f=s;(_=f.deriveds)!=null&&_.includes(i)||(f.deriveds??(f.deriveds=[])).push(i);break}return r&&(o=t,wt(o)&&Fe(o)),t.v}function en(t){const e=y;try{return y=null,t()}finally{y=e}}const rn=~(X|pt|R);function W(t,e){t.f=t.f&rn|e}function Kt(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null}}function Wt(t){const e=F;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=g,n=y;e.e=null;try{for(var l=0;l<s.length;l++){var o=s[l];Q(o.effect),vt(o.reaction),qr(o.fn)}}finally{Q(r),vt(n)}}F=e.p,e.m=!0}return t||{}}const er=new Set,de=new Set;function rr(t){for(var e=0;e<t.length;e++)er.add(t[e]);for(var r of de)r(t)}function Jt(t){var h;var e=this,r=e.ownerDocument,n=t.type,l=((h=t.composedPath)==null?void 0:h.call(t))||[],o=l[0]||t.target,s=0,i=t.__root;if(i){var u=l.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=l.indexOf(e);if(f===-1)return;u<=f&&(s=u)}if(o=l[s]||t.target,o!==e){Nt(t,"currentTarget",{configurable:!0,get(){return o||r}});var _=y,a=g;vt(null),Q(null);try{for(var c,v=[];o!==null;){var d=o.assignedSlot||o.parentNode||o.host||null;try{var $=o["__"+n];if($!==void 0&&!o.disabled)if(Ee($)){var[C,...z]=$;C.apply(o,[t,...z])}else $.call(o,t)}catch(x){c?v.push(x):c=x}if(t.cancelBubble||d===e||d===null)break;o=d}if(c){for(let x of v)queueMicrotask(()=>{throw x});throw c}}finally{t.__root=e,delete t.currentTarget,vt(_),Q(a)}}}function nr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function dt(t,e){var r=g;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function kt(t,e){var r=(e&gr)!==0,n=(e&pr)!==0,l,o=!t.startsWith("<!>");return()=>{if(b)return dt(m,null),m;l===void 0&&(l=nr(o?t:"<!>"+t),r||(l=G(l)));var s=n?document.importNode(l,!0):l.cloneNode(!0);if(r){var i=G(s),u=s.lastChild;dt(i,u)}else dt(s,s);return s}}function nn(t,e,r="svg"){var n=!t.startsWith("<!>"),l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(b)return dt(m,null),m;if(!o){var s=nr(l),i=G(s);o=G(i)}var u=o.cloneNode(!0);return dt(u,u),u}}function ot(t,e){if(b){g.nodes_end=m,bt();return}t!==null&&t.before(e)}function ln(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function lr(t,e){return or(t,e)}function on(t,e){ie(),e.intro=e.intro??!1;const r=e.target,n=b,l=m;try{for(var o=G(r);o&&(o.nodeType!==8||o.data!==ye);)o=Z(o);if(!o)throw gt;Y(!0),V(o),bt();const s=or(t,{...e,anchor:o});if(m===null||m.nodeType!==8||m.data!==Qt)throw oe(),gt;return Y(!1),s}catch(s){if(s===gt)return e.recover===!1&&Ar(),ie(),Me(r),Y(!1),lr(t,e);throw s}finally{Y(n),V(l)}}const ht=new Map;function or(t,{target:e,anchor:r,props:n={},events:l,context:o,intro:s=!0}){ie();var i=new Set,u=a=>{for(var c=0;c<a.length;c++){var v=a[c];if(!i.has(v)){i.add(v);var d=$r(v);e.addEventListener(v,Jt,{passive:d});var $=ht.get(v);$===void 0?(document.addEventListener(v,Jt,{passive:d}),ht.set(v,1)):ht.set(v,$+1)}}};u(te(er)),de.add(u);var f=void 0,_=Pr(()=>{var a=r??e.appendChild(Mt());return $t(()=>{if(o){Kt({});var c=F;c.c=o}l&&(n.$$events=l),b&&dt(a,null),f=t(a,n)||{},b&&(g.nodes_end=m),o&&Wt()}),()=>{var d;for(var c of i){e.removeEventListener(c,Jt);var v=ht.get(c);--v===0?(document.removeEventListener(c,Jt),ht.delete(c)):ht.set(c,v)}de.delete(u),a!==r&&((d=a.parentNode)==null||d.removeChild(a))}});return he.set(f,_),f}let he=new WeakMap;function sn(t,e){const r=he.get(t);return r?(he.delete(t),r(e)):Promise.resolve()}function _e(t,e,r=!1){b&&bt();var n=t,l=null,o=null,s=br,i=r?ne:0,u=!1;const f=(a,c=!0)=>{u=!0,_(c,a)},_=(a,c)=>{if(s===(s=a))return;let v=!1;if(b){const d=n.data===Zt;!!s===d&&(n=se(),V(n),Y(!1),v=!0)}s?(l?qt(l):c&&(l=$t(()=>c(n))),o&&Pt(o,()=>{o=null})):(o?qt(o):c&&(o=$t(()=>c(n))),l&&Pt(l,()=>{l=null})),v&&Y(!0)};ce(()=>{u=!1,e(f),u||_(null,null)},i),b&&(n=m)}function an(t,e){return e}function un(t,e,r,n){for(var l=[],o=e.length,s=0;s<o;s++)fe(e[s].e,l,!0);var i=o>0&&l.length===0&&r!==null;if(i){var u=r.parentNode;Me(u),u.append(r),n.clear(),et(t,e[0].prev,e[o-1].next)}Be(l,()=>{for(var f=0;f<o;f++){var _=e[f];i||(n.delete(_.k),et(t,_.prev,_.next)),K(_.e,!i)}})}function cn(t,e,r,n,l,o=null){var s=t,i={flags:e,items:new Map,first:null};{var u=t;s=b?V(G(u)):u.appendChild(Mt())}b&&bt();var f=null,_=!1;ce(()=>{var a=r(),c=Ee(a)?a:a==null?[]:te(a),v=c.length;if(_&&v===0)return;_=v===0;let d=!1;if(b){var $=s.data===Zt;$!==(v===0)&&(s=se(),V(s),Y(!1),d=!0)}if(b){for(var C=null,z,h=0;h<v;h++){if(m.nodeType===8&&m.data===Qt){s=m,d=!0,Y(!1);break}var x=c[h],U=n(x,h);z=sr(m,i,C,null,x,U,h,l,e),i.items.set(U,z),C=z}v>0&&V(se())}if(!b){var E=y;fn(c,i,s,l,e,(E.f&H)!==0,n)}o!==null&&(v===0?f?qt(f):f=$t(()=>o(s)):f!==null&&Pt(f,()=>{f=null})),d&&Y(!0)}),b&&(s=m)}function fn(t,e,r,n,l,o,s,i){var u=t.length,f=e.items,_=e.first,a=_,c,v=null,d=[],$=[],C,z,h,x;for(x=0;x<u;x+=1){if(C=t[x],z=s(C,x),h=f.get(z),h===void 0){var U=a?a.e.nodes_start:r;v=sr(U,e,v,v===null?e.first:v.next,C,z,x,n,l),f.set(z,v),d=[],$=[],a=v.next;continue}if(vn(h,C,x),h.e.f&H&&qt(h.e),h!==a){if(c!==void 0&&c.has(h)){if(d.length<$.length){var E=$[0],S;v=E.prev;var rt=d[0],Tt=d[d.length-1];for(S=0;S<d.length;S+=1)ir(d[S],E,r);for(S=0;S<$.length;S+=1)c.delete($[S]);et(e,rt.prev,Tt.next),et(e,v,rt),et(e,Tt,E),a=E,v=Tt,x-=1,d=[],$=[]}else c.delete(h),ir(h,a,r),et(e,h.prev,h.next),et(e,h,v===null?e.first:v.next),et(e,v,h),v=h;continue}for(d=[],$=[];a!==null&&a.k!==z;)(o||!(a.e.f&H))&&(c??(c=new Set)).add(a),$.push(a),a=a.next;if(a===null)continue;h=a}d.push(h),v=h,a=h.next}if(a!==null||c!==void 0){for(var A=c===void 0?[]:te(c);a!==null;)(o||!(a.e.f&H))&&A.push(a),a=a.next;var _t=A.length;if(_t>0){var Rn=u===0?r:null;un(e,A,Rn,f)}}g.first=e.first&&e.first.e,g.last=v&&v.e}function vn(t,e,r,n){Ne(t.v,e),t.i=r}function sr(t,e,r,n,l,o,s,i,u,f){var _=(u&k)!==0,a=(u&hr)===0,c=_?a?le(l):It(l):l,v=u&zt?It(s):s,d={i:v,v:c,k:o,a:null,e:null,prev:r,next:n};try{return d.e=$t(()=>i(t,c,v),b),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function ir(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,l=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==n;){var s=Z(o);l.before(o),o=s}}function et(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function dn(t,e,r,n,l){var i;b&&bt();var o=(i=e.$$slots)==null?void 0:i[r],s=!1;o===!0&&(o=e.children,s=!0),o===void 0?l!==null&&l(t):o(t,s?()=>n:n)}function ge(t,e){Br(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const l=document.createElement("style");l.id=e.hash,l.textContent=e.code,n.appendChild(l)}})}function St(t,e,r,n){var l=t.__attributes??(t.__attributes={});b&&(l[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||l[e]!==(l[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[Tr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ar=new Map;function hn(t){var e=ar.get(t.nodeName);if(e)return e;ar.set(t.nodeName,e=[]);for(var r,n=t,l=Element.prototype;l!==n;){r=xr(n);for(var o in r)r[o].set&&e.push(o);n=yr(n)}return e}function ur(t,e){var r=t.__className,n=_n(e);b&&t.className===n?t.__className=n:(r!==n||b&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function _n(t){return t??""}function gn(t){for(var e=g,r=g;e!==null&&!(e.f&(q|st));)e=e.parent;try{return Q(e),t()}finally{Q(r)}}function M(t,e,r,n){var U;var l=!Ce,o=(r&_r)!==0,s=!1,i;i=t[e];var u=Sr in t||Te in t,f=((U=At(t,e))==null?void 0:U.set)??(u&&o&&e in t?E=>t[e]=E:void 0),_=n,a=!0,c=!1,v=()=>(c=!0,a&&(a=!1,_=n),_);i===void 0&&n!==void 0&&(f&&l&&Or(),i=v(),f&&f(i));var d;if(d=()=>{var E=t[e];return E===void 0?v():(a=!0,c=!1,E)},f){var $=t.$$legacy;return function(E,S){return arguments.length>0?((!S||$||s)&&f(S?d():E),E):d()}}var C=!1,z=!1,h=le(i),x=gn(()=>ae(()=>{var E=d(),S=D(h);return C?(C=!1,z=!0,S):(z=!1,h.v=E)}));return function(E,S){if(arguments.length>0){const rt=S?D(x):E;return x.equals(rt)||(C=!0,Dt(h,rt),c&&_!==void 0&&(_=rt),en(()=>D(x))),E}return D(x)}}function pn(t){return new bn(t)}class bn{constructor(e){$e(this,J);$e(this,L);var o;var r=new Map,n=(s,i)=>{var u=le(i);return r.set(s,u),u};const l=new Proxy({...e.props||{},$$events:{}},{get(s,i){return D(r.get(i)??n(i,Reflect.get(s,i)))},has(s,i){return i===Te?!0:(D(r.get(i)??n(i,Reflect.get(s,i))),Reflect.has(s,i))},set(s,i,u){return Dt(r.get(i)??n(i,u),u),Reflect.set(s,i,u)}});xe(this,L,(e.hydrate?on:lr)(e.component,{target:e.target,anchor:e.anchor,props:l,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((o=e==null?void 0:e.props)!=null&&o.$$host)||e.sync===!1)&&N(),xe(this,J,l.$$events);for(const s of Object.keys(O(this,L)))s==="$set"||s==="$destroy"||s==="$on"||Nt(this,s,{get(){return O(this,L)[s]},set(i){O(this,L)[s]=i},enumerable:!0});O(this,L).$set=s=>{Object.assign(l,s)},O(this,L).$destroy=()=>{sn(O(this,L))}}$set(e){O(this,L).$set(e)}$on(e,r){O(this,J)[e]=O(this,J)[e]||[];const n=(...l)=>r.call(this,...l);return O(this,J)[e].push(n),()=>{O(this,J)[e]=O(this,J)[e].filter(l=>l!==n)}}$destroy(){O(this,L).$destroy()}}J=new WeakMap,L=new WeakMap;let cr;typeof HTMLElement=="function"&&(cr=class extends HTMLElement{constructor(e,r,n){super();P(this,"$$ctor");P(this,"$$s");P(this,"$$c");P(this,"$$cn",!1);P(this,"$$d",{});P(this,"$$r",!1);P(this,"$$p_d",{});P(this,"$$l",{});P(this,"$$l_u",new Map);P(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const l=this.$$c.$on(e,r);this.$$l_u.set(r,l)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const l=this.$$l_u.get(r);l&&(l(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(l){return o=>{const s=document.createElement("slot");l!=="default"&&(s.name=l),ot(o,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=mn(this);for(const l of this.$$s)l in n&&(l==="default"&&!this.$$d.children?(this.$$d.children=e(l),r.default=!0):r[l]=e(l));for(const l of this.attributes){const o=this.$$g_p(l.name);o in this.$$d||(this.$$d[o]=Xt(o,l.value,this.$$p_d,"toProp"))}for(const l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=pn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Fr(()=>{Hr(()=>{var l;this.$$r=!0;for(const o of Ct(this.$$c)){if(!((l=this.$$p_d[o])!=null&&l.reflect))continue;this.$$d[o]=this.$$c[o];const s=Xt(o,this.$$d[o],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,s)}this.$$r=!1})});for(const l in this.$$l)for(const o of this.$$l[l]){const s=this.$$c.$on(l,o);this.$$l_u.set(o,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var l;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xt(e,n,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ct(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Xt(t,e,r,n){var o;const l=(o=r[t])==null?void 0:o.type;if(e=l==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(l){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(l){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function mn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function pe(t,e,r,n,l,o){let s=class extends cr{constructor(){super(t,r,l),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Ct(e).forEach(i=>{Nt(s.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Xt(i,u,e),this.$$d[i]=u;var f=this.$$c;if(f){var _=(a=At(f,i))==null?void 0:a.get;_?f[i]=u:f.$set({[i]:u})}}})}),n.forEach(i=>{Nt(s.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=s,s}const $n=[{name:"nostter",url:"https://nostter.app/post?text={text}&url={url}&title={title}",icon:"https://nostter.app/favicon.ico"},{name:"lumilumi",url:"https://lumilumi.app/post?url={url}&text={text}&title={title}",icon:"https://lumilumi.app/favicon.ico"}];var xn=t=>t.stopPropagation(),yn=(t,e,r)=>e(D(r).url),wn=kt('<button class="item svelte-13vsz3z"><img> </button>'),En=kt('<div class="overlay svelte-13vsz3z"><div class="inner svelte-13vsz3z"><button class="close-button svelte-13vsz3z" aria-label="Close">✖</button> <h2 class="title svelte-13vsz3z">Share</h2> <div class="list svelte-13vsz3z"></div></div></div>');const kn={hash:"svelte-13vsz3z",code:`
|
|
1
|
+
var NostrShare=function(g){"use strict";var In=Object.defineProperty;var vr=g=>{throw TypeError(g)};var Dn=(g,x,k)=>x in g?In(g,x,{enumerable:!0,configurable:!0,writable:!0,value:k}):g[x]=k;var P=(g,x,k)=>Dn(g,typeof x!="symbol"?x+"":x,k),dr=(g,x,k)=>x.has(g)||vr("Cannot "+k);var O=(g,x,k)=>(dr(g,x,"read from private field"),k?k.call(g):x.get(g)),$e=(g,x,k)=>x.has(g)?vr("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(g):x.set(g,k),ye=(g,x,k,St)=>(dr(g,x,"write to private field"),St?St.call(g,k):x.set(g,k),k);var J,L;const x="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(x);const k=1,St=2,hr=16,_r=8,pr=1,gr=2,we="[",Zt="[!",Qt="]",gt={},br=Symbol(),mr=["touchstart","touchmove"];function $r(t){return mr.includes(t)}const xe=!1;var Ee=Array.isArray,te=Array.from,Ct=Object.keys,Nt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,wr=Object.getPrototypeOf;function xr(t){for(var e=0;e<t.length;e++)t[e]()}const j=2,ke=4,Ot=8,ee=16,q=32,ot=64,re=128,it=256,Rt=512,R=1024,X=2048,bt=4096,H=8192,at=16384,Er=32768,ne=65536,kr=1<<19,Te=1<<20,Tr=Symbol("$state"),ze=Symbol("legacy props"),zr=Symbol("");function Se(t){return t===this.v}function Sr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!Sr(t,this.v)}function Nr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ar(){throw new Error("https://svelte.dev/e/hydration_failed")}function Or(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ir(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ce=!1;function It(t,e){var r={f:0,v:t,reactions:null,equals:Se,version:0};return r}function Dr(t){return Mr(It(t))}function se(t,e=!1){const r=It(t);return e||(r.equals=Cr),r}function Mr(t){return w!==null&&w.f&j&&(B===null?Gr([t]):B.push(t)),t}function Dt(t,e){return w!==null&&Wr()&&w.f&(j|ee)&&(B===null||!B.includes(t))&&Ir(),Ne(t,e)}function Ne(t,e){return t.equals(e)||(t.v=e,t.version=Je(),Ae(t,X),p!==null&&p.f&R&&!(p.f&q)&&(z!==null&&z.includes(t)?(W(p,X),Gt(p)):tt===null?Kr([t]):tt.push(t))),e}function Ae(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,s=0;s<n;s++){var l=r[s],o=l.f;o&X||(W(l,e),o&(R|it)&&(o&j?Ae(l,bt):Gt(l)))}}function le(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let b=!1;function Y(t){b=t}let m;function V(t){if(t===null)throw le(),gt;return m=t}function mt(){return V(Z(m))}function $t(t){if(b){if(Z(m)!==null)throw le(),gt;m=t}}function oe(){for(var t=0,e=m;;){if(e.nodeType===8){var r=e.data;if(r===Qt){if(t===0)return e;t-=1}else(r===we||r===Zt)&&(t+=1)}var n=Z(e);e.remove(),e=n}}var Oe,Re,Ie;function ie(){if(Oe===void 0){Oe=window;var t=Element.prototype,e=Node.prototype;Re=At(e,"firstChild").get,Ie=At(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Mt(t=""){return document.createTextNode(t)}function G(t){return Re.call(t)}function Z(t){return Ie.call(t)}function Lt(t,e){if(!b)return G(t);var r=G(m);return r===null&&(r=m.appendChild(Mt())),V(r),r}function De(t,e){if(!b){var r=G(t);return r instanceof Comment&&r.data===""?Z(r):r}return m}function jt(t,e=1,r=!1){let n=b?m:t;for(var s;e--;)s=n,n=Z(n);if(!b)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var o=Mt();return n===null?s==null||s.after(o):n.before(o),V(o),o}return V(n),n}function Me(t){t.textContent=""}function ae(t){var e=j|X;p===null?e|=it:p.f|=Te;var r=w!==null&&w.f&j?w:null;const n={children:null,ctx:F,deps:null,equals:Se,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Le(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&j?ue(n):K(n)}}}function Lr(t){for(var e=t.parent;e!==null;){if(!(e.f&j))return e;e=e.parent}return null}function je(t){var e,r=p;Q(Lr(t));try{Le(t),e=Xe(t)}finally{Q(r)}return e}function Fe(t){var e=je(t),r=(st||t.f&it)&&t.deps!==null?bt:R;W(t,r),t.equals(e)||(t.v=e,t.version=Je())}function ue(t){Le(t),kt(t,0),W(t,at),t.v=t.children=t.deps=t.ctx=t.reactions=null}function jr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ut(t,e,r,n=!0){var s=(t&ot)!==0,l=p,o={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|X,first:null,fn:e,last:null,next:null,parent:s?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ct;try{Ke(!0),Yt(o),o.f|=Er}catch(_){throw K(o),_}finally{Ke(i)}}else e!==null&&Gt(o);var u=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Te)===0;if(!u&&!s&&n&&(l!==null&&jr(o,l),w!==null&&w.f&j)){var f=w;(f.children??(f.children=[])).push(o)}return o}function Fr(t){const e=ut(ot,t,!0);return()=>{K(e)}}function Pr(t){const e=ut(ot,t,!0);return(r={})=>new Promise(n=>{r.outro?Pt(e,()=>{K(e),n(void 0)}):(K(e),n(void 0))})}function qr(t){return ut(ke,t,!1)}function Hr(t){return ut(Ot,t,!0)}function Ft(t){return ce(t)}function ce(t,e=0){return ut(Ot|ee|e,t,!0)}function yt(t,e=!0){return ut(Ot|q,t,!0,e)}function Pe(t){var e=t.teardown;if(e!==null){const r=w;vt(null);try{e.call(null)}finally{vt(r)}}}function qe(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)ue(e[r])}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;K(r,e),r=n}}function Vr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&q||K(e),e=r}}function K(t,e=!0){var r=!1;if((e||t.f&kr)&&t.nodes_start!==null){for(var n=t.nodes_start,s=t.nodes_end;n!==null;){var l=n===s?null:Z(n);n.remove(),n=l}r=!0}He(t,e&&!r),qe(t),kt(t,0),W(t,at);var o=t.transitions;if(o!==null)for(const u of o)u.stop();Pe(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Ve(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 Pt(t,e){var r=[];fe(t,r,!0),Be(r,()=>{K(t),e&&e()})}function Be(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var s of t)s.out(n)}else e()}function fe(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var s=n.next,l=(n.f&ne)!==0||(n.f&q)!==0;fe(n,e,l?r:!1),n=s}}}function qt(t){Ue(t,!0)}function Ue(t,e){if(t.f&H){Et(t)&&Yt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,s=(r.f&ne)!==0||(r.f&q)!==0;Ue(r,s?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let Ht=!1,ve=[];function Ye(){Ht=!1;const t=ve.slice();ve=[],xr(t)}function Br(t){Ht||(Ht=!0,queueMicrotask(Ye)),ve.push(t)}function Ur(){Ht&&Ye()}const Ge=0,Yr=1;let Vt=!1,Bt=Ge,wt=!1,xt=null,ct=!1;function Ke(t){ct=t}let nt=[],ft=0,Mn=[],w=null;function vt(t){w=t}let p=null;function Q(t){p=t}let B=null;function Gr(t){B=t}let z=null,I=0,tt=null;function Kr(t){tt=t}let We=1,st=!1,F=null;function Je(){return++We}function Wr(){return!Ce}function Et(t){var o,i;var e=t.f;if(e&X)return!0;if(e&bt){var r=t.deps,n=(e&it)!==0;if(r!==null){var s;if(e&Rt){for(s=0;s<r.length;s++)((o=r[s]).reactions??(o.reactions=[])).push(t);t.f^=Rt}for(s=0;s<r.length;s++){var l=r[s];if(Et(l)&&Fe(l),n&&p!==null&&!st&&!((i=l==null?void 0:l.reactions)!=null&&i.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||p!==null&&!st)&&W(t,R)}return!1}function Jr(t,e){for(var r=e;r!==null;){if(r.f&re)try{r.fn(t);return}catch{r.f^=re}r=r.parent}throw Vt=!1,t}function Xr(t){return(t.f&at)===0&&(t.parent===null||(t.parent.f&re)===0)}function Ut(t,e,r,n){if(Vt){if(r===null&&(Vt=!1),Xr(e))throw t;return}r!==null&&(Vt=!0);{Jr(t,e);return}}function Xe(t){var c;var e=z,r=I,n=tt,s=w,l=st,o=B,i=F,u=t.f;z=null,I=0,tt=null,w=u&(q|ot)?null:t,st=!ct&&(u&it)!==0,B=null,F=t.ctx;try{var f=(0,t.fn)(),_=t.deps;if(z!==null){var a;if(kt(t,I),_!==null&&I>0)for(_.length=I+z.length,a=0;a<z.length;a++)_[I+a]=z[a];else t.deps=_=z;if(!st)for(a=I;a<_.length;a++)((c=_[a]).reactions??(c.reactions=[])).push(t)}else _!==null&&I<_.length&&(kt(t,I),_.length=I);return f}finally{z=e,I=r,tt=n,w=s,st=l,B=o,F=i}}function Zr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var s=r.length-1;s===0?r=e.reactions=null:(r[n]=r[s],r.pop())}}r===null&&e.f&j&&(z===null||!z.includes(e))&&(W(e,bt),e.f&(it|Rt)||(e.f^=Rt),kt(e,0))}function kt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Zr(t,r[n])}function Yt(t){var e=t.f;if(!(e&at)){W(t,R);var r=p,n=F;p=t;try{e&ee?Vr(t):He(t),qe(t),Pe(t);var s=Xe(t);t.teardown=typeof s=="function"?s:null,t.version=We}catch(l){Ut(l,t,r,n||t.ctx)}finally{p=r}}}function Ze(){if(ft>1e3){ft=0;try{Nr()}catch(t){if(xt!==null)Ut(t,xt,null);else throw t}}ft++}function Qe(t){var e=t.length;if(e!==0){Ze();var r=ct;ct=!0;try{for(var n=0;n<e;n++){var s=t[n];s.f&R||(s.f^=R);var l=[];tr(s,l),Qr(l)}}finally{ct=r}}}function Qr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(at|H)))try{Et(n)&&(Yt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ve(n):n.fn=null))}catch(s){Ut(s,n,null,n.ctx)}}}function tn(){if(wt=!1,ft>1001)return;const t=nt;nt=[],Qe(t),wt||(ft=0,xt=null)}function Gt(t){Bt===Ge&&(wt||(wt=!0,queueMicrotask(tn))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(ot|q)){if(!(r&R))return;e.f^=R}}nt.push(e)}function tr(t,e){var r=t.first,n=[];t:for(;r!==null;){var s=r.f,l=(s&q)!==0,o=l&&(s&R)!==0,i=r.next;if(!o&&!(s&H))if(s&Ot){if(l)r.f^=R;else try{Et(r)&&Yt(r)}catch(a){Ut(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else s&ke&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var f=a.next;if(f!==null){r=f;continue t}a=a.parent}}r=i}for(var _=0;_<n.length;_++)u=n[_],e.push(u),tr(u,e)}function N(t){var e=Bt,r=nt;try{Ze();const s=[];Bt=Yr,nt=s,wt=!1,Qe(r);var n=t==null?void 0:t();return Ur(),(nt.length>0||s.length>0)&&N(),ft=0,xt=null,n}finally{Bt=e,nt=r}}function D(t){var _;var e=t.f,r=(e&j)!==0;if(r&&e&at){var n=je(t);return ue(t),n}if(w!==null){B!==null&&B.includes(t)&&Rr();var s=w.deps;z===null&&s!==null&&s[I]===t?I++:z===null?z=[t]:z.push(t),tt!==null&&p!==null&&p.f&R&&!(p.f&q)&&tt.includes(t)&&(W(p,X),Gt(p))}else if(r&&t.deps===null)for(var l=t,o=l.parent,i=l;o!==null;)if(o.f&j){var u=o;i=u,o=u.parent}else{var f=o;(_=f.deriveds)!=null&&_.includes(i)||(f.deriveds??(f.deriveds=[])).push(i);break}return r&&(l=t,Et(l)&&Fe(l)),t.v}function en(t){const e=w;try{return w=null,t()}finally{w=e}}const rn=~(X|bt|R);function W(t,e){t.f=t.f&rn|e}function Kt(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null}}function Wt(t){const e=F;if(e!==null){t!==void 0&&(e.x=t);const o=e.e;if(o!==null){var r=p,n=w;e.e=null;try{for(var s=0;s<o.length;s++){var l=o[s];Q(l.effect),vt(l.reaction),qr(l.fn)}}finally{Q(r),vt(n)}}F=e.p,e.m=!0}return t||{}}const er=new Set,de=new Set;function rr(t){for(var e=0;e<t.length;e++)er.add(t[e]);for(var r of de)r(t)}function Jt(t){var h;var e=this,r=e.ownerDocument,n=t.type,s=((h=t.composedPath)==null?void 0:h.call(t))||[],l=s[0]||t.target,o=0,i=t.__root;if(i){var u=s.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=s.indexOf(e);if(f===-1)return;u<=f&&(o=u)}if(l=s[o]||t.target,l!==e){Nt(t,"currentTarget",{configurable:!0,get(){return l||r}});var _=w,a=p;vt(null),Q(null);try{for(var c,v=[];l!==null;){var d=l.assignedSlot||l.parentNode||l.host||null;try{var $=l["__"+n];if($!==void 0&&!l.disabled)if(Ee($)){var[C,...S]=$;C.apply(l,[t,...S])}else $.call(l,t)}catch(y){c?v.push(y):c=y}if(t.cancelBubble||d===e||d===null)break;l=d}if(c){for(let y of v)queueMicrotask(()=>{throw y});throw c}}finally{t.__root=e,delete t.currentTarget,vt(_),Q(a)}}}function nr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function dt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Tt(t,e){var r=(e&pr)!==0,n=(e&gr)!==0,s,l=!t.startsWith("<!>");return()=>{if(b)return dt(m,null),m;s===void 0&&(s=nr(l?t:"<!>"+t),r||(s=G(s)));var o=n?document.importNode(s,!0):s.cloneNode(!0);if(r){var i=G(o),u=o.lastChild;dt(i,u)}else dt(o,o);return o}}function nn(t,e,r="svg"){var n=!t.startsWith("<!>"),s=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if(b)return dt(m,null),m;if(!l){var o=nr(s),i=G(o);l=G(i)}var u=l.cloneNode(!0);return dt(u,u),u}}function lt(t,e){if(b){p.nodes_end=m,mt();return}t!==null&&t.before(e)}function sn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function sr(t,e){return lr(t,e)}function ln(t,e){ie(),e.intro=e.intro??!1;const r=e.target,n=b,s=m;try{for(var l=G(r);l&&(l.nodeType!==8||l.data!==we);)l=Z(l);if(!l)throw gt;Y(!0),V(l),mt();const o=lr(t,{...e,anchor:l});if(m===null||m.nodeType!==8||m.data!==Qt)throw le(),gt;return Y(!1),o}catch(o){if(o===gt)return e.recover===!1&&Ar(),ie(),Me(r),Y(!1),sr(t,e);throw o}finally{Y(n),V(s)}}const ht=new Map;function lr(t,{target:e,anchor:r,props:n={},events:s,context:l,intro:o=!0}){ie();var i=new Set,u=a=>{for(var c=0;c<a.length;c++){var v=a[c];if(!i.has(v)){i.add(v);var d=$r(v);e.addEventListener(v,Jt,{passive:d});var $=ht.get(v);$===void 0?(document.addEventListener(v,Jt,{passive:d}),ht.set(v,1)):ht.set(v,$+1)}}};u(te(er)),de.add(u);var f=void 0,_=Pr(()=>{var a=r??e.appendChild(Mt());return yt(()=>{if(l){Kt({});var c=F;c.c=l}s&&(n.$$events=s),b&&dt(a,null),f=t(a,n)||{},b&&(p.nodes_end=m),l&&Wt()}),()=>{var d;for(var c of i){e.removeEventListener(c,Jt);var v=ht.get(c);--v===0?(document.removeEventListener(c,Jt),ht.delete(c)):ht.set(c,v)}de.delete(u),a!==r&&((d=a.parentNode)==null||d.removeChild(a))}});return he.set(f,_),f}let he=new WeakMap;function on(t,e){const r=he.get(t);return r?(he.delete(t),r(e)):Promise.resolve()}function _e(t,e,r=!1){b&&mt();var n=t,s=null,l=null,o=br,i=r?ne:0,u=!1;const f=(a,c=!0)=>{u=!0,_(c,a)},_=(a,c)=>{if(o===(o=a))return;let v=!1;if(b){const d=n.data===Zt;!!o===d&&(n=oe(),V(n),Y(!1),v=!0)}o?(s?qt(s):c&&(s=yt(()=>c(n))),l&&Pt(l,()=>{l=null})):(l?qt(l):c&&(l=yt(()=>c(n))),s&&Pt(s,()=>{s=null})),v&&Y(!0)};ce(()=>{u=!1,e(f),u||_(null,null)},i),b&&(n=m)}function an(t,e){return e}function un(t,e,r,n){for(var s=[],l=e.length,o=0;o<l;o++)fe(e[o].e,s,!0);var i=l>0&&s.length===0&&r!==null;if(i){var u=r.parentNode;Me(u),u.append(r),n.clear(),et(t,e[0].prev,e[l-1].next)}Be(s,()=>{for(var f=0;f<l;f++){var _=e[f];i||(n.delete(_.k),et(t,_.prev,_.next)),K(_.e,!i)}})}function cn(t,e,r,n,s,l=null){var o=t,i={flags:e,items:new Map,first:null};{var u=t;o=b?V(G(u)):u.appendChild(Mt())}b&&mt();var f=null,_=!1;ce(()=>{var a=r(),c=Ee(a)?a:a==null?[]:te(a),v=c.length;if(_&&v===0)return;_=v===0;let d=!1;if(b){var $=o.data===Zt;$!==(v===0)&&(o=oe(),V(o),Y(!1),d=!0)}if(b){for(var C=null,S,h=0;h<v;h++){if(m.nodeType===8&&m.data===Qt){o=m,d=!0,Y(!1);break}var y=c[h],U=n(y,h);S=or(m,i,C,null,y,U,h,s,e),i.items.set(U,S),C=S}v>0&&V(oe())}if(!b){var E=w;fn(c,i,o,s,e,(E.f&H)!==0,n)}l!==null&&(v===0?f?qt(f):f=yt(()=>l(o)):f!==null&&Pt(f,()=>{f=null})),d&&Y(!0)}),b&&(o=m)}function fn(t,e,r,n,s,l,o,i){var u=t.length,f=e.items,_=e.first,a=_,c,v=null,d=[],$=[],C,S,h,y;for(y=0;y<u;y+=1){if(C=t[y],S=o(C,y),h=f.get(S),h===void 0){var U=a?a.e.nodes_start:r;v=or(U,e,v,v===null?e.first:v.next,C,S,y,n,s),f.set(S,v),d=[],$=[],a=v.next;continue}if(vn(h,C,y),h.e.f&H&&qt(h.e),h!==a){if(c!==void 0&&c.has(h)){if(d.length<$.length){var E=$[0],T;v=E.prev;var rt=d[0],zt=d[d.length-1];for(T=0;T<d.length;T+=1)ir(d[T],E,r);for(T=0;T<$.length;T+=1)c.delete($[T]);et(e,rt.prev,zt.next),et(e,v,rt),et(e,zt,E),a=E,v=zt,y-=1,d=[],$=[]}else c.delete(h),ir(h,a,r),et(e,h.prev,h.next),et(e,h,v===null?e.first:v.next),et(e,v,h),v=h;continue}for(d=[],$=[];a!==null&&a.k!==S;)(l||!(a.e.f&H))&&(c??(c=new Set)).add(a),$.push(a),a=a.next;if(a===null)continue;h=a}d.push(h),v=h,a=h.next}if(a!==null||c!==void 0){for(var A=c===void 0?[]:te(c);a!==null;)(l||!(a.e.f&H))&&A.push(a),a=a.next;var pt=A.length;if(pt>0){var Rn=u===0?r:null;un(e,A,Rn,f)}}p.first=e.first&&e.first.e,p.last=v&&v.e}function vn(t,e,r,n){Ne(t.v,e),t.i=r}function or(t,e,r,n,s,l,o,i,u,f){var _=(u&k)!==0,a=(u&hr)===0,c=_?a?se(s):It(s):s,v=u&St?It(o):o,d={i:v,v:c,k:l,a:null,e:null,prev:r,next:n};try{return d.e=yt(()=>i(t,c,v),b),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function ir(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,s=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var o=Z(l);s.before(l),l=o}}function et(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function dn(t,e,r,n,s){var i;b&&mt();var l=(i=e.$$slots)==null?void 0:i[r],o=!1;l===!0&&(l=e.children,o=!0),l===void 0?s!==null&&s(t):l(t,o?()=>n:n)}function pe(t,e){Br(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const s=document.createElement("style");s.id=e.hash,s.textContent=e.code,n.appendChild(s)}})}function _t(t,e,r,n){var s=t.__attributes??(t.__attributes={});b&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[zr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ar=new Map;function hn(t){var e=ar.get(t.nodeName);if(e)return e;ar.set(t.nodeName,e=[]);for(var r,n=t,s=Element.prototype;s!==n;){r=yr(n);for(var l in r)r[l].set&&e.push(l);n=wr(n)}return e}function ur(t,e){var r=t.__className,n=_n(e);b&&t.className===n?t.__className=n:(r!==n||b&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function _n(t){return t??""}function pn(t){for(var e=p,r=p;e!==null&&!(e.f&(q|ot));)e=e.parent;try{return Q(e),t()}finally{Q(r)}}function M(t,e,r,n){var U;var s=!Ce,l=(r&_r)!==0,o=!1,i;i=t[e];var u=Tr in t||ze in t,f=((U=At(t,e))==null?void 0:U.set)??(u&&l&&e in t?E=>t[e]=E:void 0),_=n,a=!0,c=!1,v=()=>(c=!0,a&&(a=!1,_=n),_);i===void 0&&n!==void 0&&(f&&s&&Or(),i=v(),f&&f(i));var d;if(d=()=>{var E=t[e];return E===void 0?v():(a=!0,c=!1,E)},f){var $=t.$$legacy;return function(E,T){return arguments.length>0?((!T||$||o)&&f(T?d():E),E):d()}}var C=!1,S=!1,h=se(i),y=pn(()=>ae(()=>{var E=d(),T=D(h);return C?(C=!1,S=!0,T):(S=!1,h.v=E)}));return function(E,T){if(arguments.length>0){const rt=T?D(y):E;return y.equals(rt)||(C=!0,Dt(h,rt),c&&_!==void 0&&(_=rt),en(()=>D(y))),E}return D(y)}}function gn(t){return new bn(t)}class bn{constructor(e){$e(this,J);$e(this,L);var l;var r=new Map,n=(o,i)=>{var u=se(i);return r.set(o,u),u};const s=new Proxy({...e.props||{},$$events:{}},{get(o,i){return D(r.get(i)??n(i,Reflect.get(o,i)))},has(o,i){return i===ze?!0:(D(r.get(i)??n(i,Reflect.get(o,i))),Reflect.has(o,i))},set(o,i,u){return Dt(r.get(i)??n(i,u),u),Reflect.set(o,i,u)}});ye(this,L,(e.hydrate?ln:sr)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&N(),ye(this,J,s.$$events);for(const o of Object.keys(O(this,L)))o==="$set"||o==="$destroy"||o==="$on"||Nt(this,o,{get(){return O(this,L)[o]},set(i){O(this,L)[o]=i},enumerable:!0});O(this,L).$set=o=>{Object.assign(s,o)},O(this,L).$destroy=()=>{on(O(this,L))}}$set(e){O(this,L).$set(e)}$on(e,r){O(this,J)[e]=O(this,J)[e]||[];const n=(...s)=>r.call(this,...s);return O(this,J)[e].push(n),()=>{O(this,J)[e]=O(this,J)[e].filter(s=>s!==n)}}$destroy(){O(this,L).$destroy()}}J=new WeakMap,L=new WeakMap;let cr;typeof HTMLElement=="function"&&(cr=class extends HTMLElement{constructor(e,r,n){super();P(this,"$$ctor");P(this,"$$s");P(this,"$$c");P(this,"$$cn",!1);P(this,"$$d",{});P(this,"$$r",!1);P(this,"$$p_d",{});P(this,"$$l",{});P(this,"$$l_u",new Map);P(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const s=this.$$c.$on(e,r);this.$$l_u.set(r,s)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const s=this.$$l_u.get(r);s&&(s(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(s){return l=>{const o=document.createElement("slot");s!=="default"&&(o.name=s),lt(l,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=mn(this);for(const s of this.$$s)s in n&&(s==="default"&&!this.$$d.children?(this.$$d.children=e(s),r.default=!0):r[s]=e(s));for(const s of this.attributes){const l=this.$$g_p(s.name);l in this.$$d||(this.$$d[l]=Xt(l,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=gn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Fr(()=>{Hr(()=>{var s;this.$$r=!0;for(const l of Ct(this.$$c)){if(!((s=this.$$p_d[l])!=null&&s.reflect))continue;this.$$d[l]=this.$$c[l];const o=Xt(l,this.$$d[l],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,o)}this.$$r=!1})});for(const s in this.$$l)for(const l of this.$$l[s]){const o=this.$$c.$on(s,l);this.$$l_u.set(l,o)}this.$$l={}}}attributeChangedCallback(e,r,n){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xt(e,n,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ct(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Xt(t,e,r,n){var l;const s=(l=r[t])==null?void 0:l.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(s){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(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function mn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ge(t,e,r,n,s,l){let o=class extends cr{constructor(){super(t,r,s),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Ct(e).forEach(i=>{Nt(o.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Xt(i,u,e),this.$$d[i]=u;var f=this.$$c;if(f){var _=(a=At(f,i))==null?void 0:a.get;_?f[i]=u:f.$set({[i]:u})}}})}),n.forEach(i=>{Nt(o.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=o,o}const $n=[{name:"nostter",url:"https://nostter.app/post?text={text}&url={url}&title={title}",icon:"https://nostter.app/favicon.ico"},{name:"lumilumi",url:"https://lumilumi.app/post?url={url}&text={text}&title={title}",icon:"https://lumilumi.app/favicon.ico"}];var yn=t=>t.stopPropagation(),wn=(t,e,r)=>e(D(r).url),xn=Tt('<button class="item svelte-13vsz3z"><img> </button>'),En=Tt('<div class="overlay svelte-13vsz3z"><div class="inner svelte-13vsz3z"><button class="close-button svelte-13vsz3z" aria-label="Close">✖</button> <h2 class="title svelte-13vsz3z">Share</h2> <div class="list svelte-13vsz3z"></div></div></div>');const kn={hash:"svelte-13vsz3z",code:`
|
|
2
2
|
/* オーバーレイ背景 */.overlay.svelte-13vsz3z {position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.3); /* 少し濃い背景 */display:flex;justify-content:center;align-items:center;}
|
|
3
3
|
|
|
4
4
|
/* ダイアログ本体 */.inner.svelte-13vsz3z {display:flex;flex-direction:column;position:relative;background-color:var(--bg-color);padding:1.5rem;border-radius:12px; /* 柔らかい角丸 */box-shadow:0 8px 16px rgba(0, 0, 0, 0.2);width:90%;max-width:400px;gap:1rem; /* スペーシング */}
|
|
@@ -11,7 +11,7 @@ var NostrShare=function(p){"use strict";var In=Object.defineProperty;var vr=p=>{
|
|
|
11
11
|
box-shadow 0.2s ease;}.item.svelte-13vsz3z:hover {background-color:var(--button2-hover-color); /* グレー200 */box-shadow:0 2px 6px rgba(0, 0, 0, 0.1);}.item.svelte-13vsz3z:active {background-color:var(--button2-active-color); /* グレー300 */}
|
|
12
12
|
|
|
13
13
|
/* バツボタン */.close-button.svelte-13vsz3z {position:absolute;right:12px;top:12px;width:36px;height:36px;display:flex;justify-content:center;align-items:center;background-color:var(--button2-bg-color); /* グレー200 */border:none;border-radius:50%;font-size:1.25rem;color:var(--button2-text-color); /* グレー700 */cursor:pointer;transition:background-color 0.2s ease,
|
|
14
|
-
transform 0.1s ease;}.close-button.svelte-13vsz3z:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-13vsz3z:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}`};function be(t,e){Kt(e,!0),
|
|
14
|
+
transform 0.1s ease;}.close-button.svelte-13vsz3z:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-13vsz3z:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}`};function be(t,e){Kt(e,!0),pe(t,kn);let r=M(e,"url",7,""),n=M(e,"text",7,""),s=M(e,"shareTitle",7,""),l=M(e,"handleClose",7);const o=a=>{r()===""&&n()===""&&s()===""&&(r(window.location.href),s(document.title));const c=a.replace("{url}",encodeURIComponent(r())).replace("{title}",encodeURIComponent(s())).replace("{text}",encodeURIComponent(n()));console.log(c),window.open(c,"_blank","noreferrer"),l()()};var i=En();i.__click=function(...a){var c;(c=l())==null||c.apply(this,a)};var u=Lt(i);u.__click=[yn];var f=Lt(u);f.__click=function(...a){var c;(c=l())==null||c.apply(this,a)};var _=jt(f,4);return cn(_,21,()=>$n,an,(a,c)=>{var v=xn();v.__click=[wn,o,c];var d=Lt(v);_t(d,"width",24);var $=jt(d);$t(v),Ft(()=>{_t(d,"src",D(c).icon),_t(d,"alt",D(c).name),sn($,` ${D(c).name??""}`)}),lt(a,v)}),$t(_),$t(u),$t(i),lt(t,i),Wt({get url(){return r()},set url(a=""){r(a),N()},get text(){return n()},set text(a=""){n(a),N()},get shareTitle(){return s()},set shareTitle(a=""){s(a),N()},get handleClose(){return l()},set handleClose(a){l(a),N()}})}rr(["click"]),customElements.define("nostr-share-dialog",ge(be,{url:{},text:{},shareTitle:{},handleClose:{}},[],[],!0));var Tn=nn(`<svg class="nostr-icon svelte-givlj7" version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" xml:space="preserve"><g><path class="st0 svelte-givlj7" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2
|
|
15
15
|
c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8
|
|
16
16
|
c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5
|
|
17
17
|
c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"></path><circle class="st1 svelte-givlj7" cx="137.9" cy="99" r="12.1"></circle><path class="st1 svelte-givlj7" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5
|
|
@@ -26,19 +26,19 @@ var NostrShare=function(p){"use strict";var In=Object.defineProperty;var vr=p=>{
|
|
|
26
26
|
c-8.3-3.3-8.6-9.2-8.6-11.2c-0.4-23.1-34.5-25.9-64.5-20.1c-32.8,6.2,0.4,53.3,0.4,116v8.4c-0.1,3.1-2.5,5.6-5.6,5.6H57.7
|
|
27
27
|
c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5
|
|
28
28
|
c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99
|
|
29
|
-
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const
|
|
30
|
-
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function me(t,e){Kt(e,!0),
|
|
29
|
+
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const zn={hash:"svelte-givlj7",code:`
|
|
30
|
+
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function me(t,e){Kt(e,!0),pe(t,zn);let r=M(e,"size",7,28);var n=Tn();return Ft(()=>_t(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),lt(t,n),Wt({get size(){return r()},set size(s=28){r(s),N()}})}ge(me,{size:{}},[],[],!0);const Sn=(t,e)=>{Dt(e,!0)};var Cn=Tt("<span>Nostr</span>"),Nn=Tt("<!> <!>",1),An=Tt("<button><!></button> <!>",1);const On={hash:"svelte-1swpyup",code:`:host {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
31
31
|
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
32
32
|
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
33
33
|
}
|
|
34
|
-
/* デフォルトのスタイルを無効にする?*/button.svelte-
|
|
34
|
+
/* デフォルトのスタイルを無効にする?*/button.svelte-1swpyup {background:none;border:none;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;}
|
|
35
35
|
|
|
36
|
-
/* ボタン全体の基本スタイル
|
|
37
|
-
|
|
36
|
+
/* ボタン全体の基本スタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup,
|
|
37
|
+
[data-nostr-share="nostr-share-mini"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;border:1px solid var(--button1-border-color);cursor:pointer;transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--icon-size);height:var(--icon-size);margin:auto;padding:4px;border-radius:50%;border:none;background-color:transparent;}
|
|
38
38
|
|
|
39
|
-
/* ボタンスタイル
|
|
39
|
+
/* ボタンスタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup {padding:6px 16px;margin:4px;font-weight:bold;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-button"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-button"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
40
40
|
|
|
41
|
-
/* テキスト用スタイル */.nostrShare-text.svelte-
|
|
41
|
+
/* テキスト用スタイル */.nostrShare-text.svelte-1swpyup {margin-left:8px;font-size:medium;color:var(--button2-text-color);}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* グレー */box-shadow:0 0 6px rgba(0, 0, 0, 0.1);transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:active {background-color:#d1d5db;transform:scale(0.95);transition:all 0.2s ease-in-out;}
|
|
42
42
|
|
|
43
|
-
/* miniスタイル
|
|
44
|
-
/* テキスト用スタイル */.nostrShare-text-mini.svelte-
|
|
43
|
+
/* miniスタイル */[data-nostr-share="nostr-share-mini"].svelte-1swpyup {padding:2px 6px;margin:2px;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
44
|
+
/* テキスト用スタイル */.nostrShare-text-mini.svelte-1swpyup {margin-left:4px;font-size:small;font-weight:bold;color:var(--button2-text-color);}`};function fr(t,e){Kt(e,!0),pe(t,On);let r=M(e,"data-url",7),n=M(e,"data-text",7),s=M(e,"data-title",7),l=M(e,"data-type",7,"default"),o=M(e,"icon-size",7,28),i=M(e,"class",7),u=M(e,"data-style",7),f=Dr(!1);const _=()=>{Dt(f,!1)},a=typeof o()=="string"?parseInt(o(),10):o();let c=ae(()=>u()?"":l()==="icon"?"nostr-share-icon":l()==="mini"?"nostr-share-mini":"nostr-share-button");var v=An(),d=De(v);d.__click=[Sn,f];var $=Lt(d);dn($,e,"default",{},h=>{var y=Nn(),U=De(y);{var E=A=>{me(A,{size:24})},T=A=>{var pt=ae(()=>l()==="icon"?a:28);me(A,{get size(){return D(pt)}})};_e(U,A=>{l()==="mini"?A(E):A(T,!1)})}var rt=jt(U,2);{var zt=A=>{var pt=Cn();Ft(()=>ur(pt,`${(l()==="mini"?"nostrShare-text-mini":"nostrShare-text")??""} svelte-1swpyup`)),lt(A,pt)};_e(rt,A=>{l()!=="icon"&&A(zt)})}lt(h,y)}),$t(d);var C=jt(d,2);{var S=h=>{be(h,{handleClose:_,get url(){return r()},get text(){return n()},get shareTitle(){return s()}})};_e(C,h=>{D(f)&&h(S)})}return Ft(()=>{ur(d,`${i()??""} svelte-1swpyup`),_t(d,"data-nostr-share",D(c)),_t(d,"style",u()||"")}),lt(t,v),Wt({get"data-url"(){return r()},set"data-url"(h){r(h),N()},get"data-text"(){return n()},set"data-text"(h){n(h),N()},get"data-title"(){return s()},set"data-title"(h){s(h),N()},get"data-type"(){return l()},set"data-type"(h="default"){l(h),N()},get"icon-size"(){return o()},set"icon-size"(h=28){o(h),N()},get class(){return i()},set class(h){i(h),N()},get"data-style"(){return u()},set"data-style"(h){u(h),N()}})}return rr(["click"]),customElements.define("nostr-share",ge(fr,{"data-url":{},"data-text":{},"data-title":{},"data-type":{},"icon-size":{},class:{},"data-style":{}},["default"],[],!0)),g.Dialog=be,g.NostrShare=fr,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),g}({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(g,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(g=typeof globalThis<"u"?globalThis:g||self,b(g.NostrShare={}))})(this,function(g){"use strict";var In=Object.defineProperty;var vr=g=>{throw TypeError(g)};var Dn=(g,b,k)=>b in g?In(g,b,{enumerable:!0,configurable:!0,writable:!0,value:k}):g[b]=k;var P=(g,b,k)=>Dn(g,typeof b!="symbol"?b+"":b,k),dr=(g,b,k)=>b.has(g)||vr("Cannot "+k);var O=(g,b,k)=>(dr(g,b,"read from private field"),k?k.call(g):b.get(g)),$e=(g,b,k)=>b.has(g)?vr("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(g):b.set(g,k),xe=(g,b,k,zt)=>(dr(g,b,"write to private field"),zt?zt.call(g,k):b.set(g,k),k);var J,L;const b="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(b);const k=1,zt=2,hr=16,_r=8,pr=1,gr=2,ye="[",Zt="[!",Qt="]",pt={},br=Symbol(),mr=["touchstart","touchmove"];function $r(t){return mr.includes(t)}const we=!1;var Ee=Array.isArray,te=Array.from,Ct=Object.keys,Nt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,xr=Object.getOwnPropertyDescriptors,yr=Object.getPrototypeOf;function wr(t){for(var e=0;e<t.length;e++)t[e]()}const j=2,ke=4,Ot=8,ee=16,q=32,st=64,re=128,it=256,Rt=512,R=1024,X=2048,gt=4096,H=8192,at=16384,Er=32768,ne=65536,kr=1<<19,Se=1<<20,Sr=Symbol("$state"),Te=Symbol("legacy props"),Tr=Symbol("");function ze(t){return t===this.v}function zr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!zr(t,this.v)}function Nr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ar(){throw new Error("https://svelte.dev/e/hydration_failed")}function Or(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ir(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ce=!1;function It(t,e){var r={f:0,v:t,reactions:null,equals:ze,version:0};return r}function Dr(t){return Mr(It(t))}function le(t,e=!1){const r=It(t);return e||(r.equals=Cr),r}function Mr(t){return w!==null&&w.f&j&&(B===null?Gr([t]):B.push(t)),t}function Dt(t,e){return w!==null&&Wr()&&w.f&(j|ee)&&(B===null||!B.includes(t))&&Ir(),Ne(t,e)}function Ne(t,e){return t.equals(e)||(t.v=e,t.version=Je(),Ae(t,X),p!==null&&p.f&R&&!(p.f&q)&&(T!==null&&T.includes(t)?(W(p,X),Gt(p)):tt===null?Kr([t]):tt.push(t))),e}function Ae(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,l=0;l<n;l++){var o=r[l],s=o.f;s&X||(W(o,e),s&(R|it)&&(s&j?Ae(o,gt):Gt(o)))}}function oe(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let m=!1;function Y(t){m=t}let $;function V(t){if(t===null)throw oe(),pt;return $=t}function bt(){return V(Z($))}function mt(t){if(m){if(Z($)!==null)throw oe(),pt;$=t}}function se(){for(var t=0,e=$;;){if(e.nodeType===8){var r=e.data;if(r===Qt){if(t===0)return e;t-=1}else(r===ye||r===Zt)&&(t+=1)}var n=Z(e);e.remove(),e=n}}var Oe,Re,Ie;function ie(){if(Oe===void 0){Oe=window;var t=Element.prototype,e=Node.prototype;Re=At(e,"firstChild").get,Ie=At(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Mt(t=""){return document.createTextNode(t)}function G(t){return Re.call(t)}function Z(t){return Ie.call(t)}function Lt(t,e){if(!m)return G(t);var r=G($);return r===null&&(r=$.appendChild(Mt())),V(r),r}function De(t,e){if(!m){var r=G(t);return r instanceof Comment&&r.data===""?Z(r):r}return $}function jt(t,e=1,r=!1){let n=m?$:t;for(var l;e--;)l=n,n=Z(n);if(!m)return n;var o=n==null?void 0:n.nodeType;if(r&&o!==3){var s=Mt();return n===null?l==null||l.after(s):n.before(s),V(s),s}return V(n),n}function Me(t){t.textContent=""}function ae(t){var e=j|X;p===null?e|=it:p.f|=Se;var r=w!==null&&w.f&j?w:null;const n={children:null,ctx:F,deps:null,equals:ze,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Le(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&j?ue(n):K(n)}}}function Lr(t){for(var e=t.parent;e!==null;){if(!(e.f&j))return e;e=e.parent}return null}function je(t){var e,r=p;Q(Lr(t));try{Le(t),e=Xe(t)}finally{Q(r)}return e}function Fe(t){var e=je(t),r=(lt||t.f&it)&&t.deps!==null?gt:R;W(t,r),t.equals(e)||(t.v=e,t.version=Je())}function ue(t){Le(t),Et(t,0),W(t,at),t.v=t.children=t.deps=t.ctx=t.reactions=null}function jr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ut(t,e,r,n=!0){var l=(t&st)!==0,o=p,s={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|X,first:null,fn:e,last:null,next:null,parent:l?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ct;try{Ke(!0),Yt(s),s.f|=Er}catch(_){throw K(s),_}finally{Ke(i)}}else e!==null&&Gt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&Se)===0;if(!u&&!l&&n&&(o!==null&&jr(s,o),w!==null&&w.f&j)){var f=w;(f.children??(f.children=[])).push(s)}return s}function Fr(t){const e=ut(st,t,!0);return()=>{K(e)}}function Pr(t){const e=ut(st,t,!0);return(r={})=>new Promise(n=>{r.outro?Pt(e,()=>{K(e),n(void 0)}):(K(e),n(void 0))})}function qr(t){return ut(ke,t,!1)}function Hr(t){return ut(Ot,t,!0)}function Ft(t){return ce(t)}function ce(t,e=0){return ut(Ot|ee|e,t,!0)}function $t(t,e=!0){return ut(Ot|q,t,!0,e)}function Pe(t){var e=t.teardown;if(e!==null){const r=w;vt(null);try{e.call(null)}finally{vt(r)}}}function qe(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)ue(e[r])}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;K(r,e),r=n}}function Vr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&q||K(e),e=r}}function K(t,e=!0){var r=!1;if((e||t.f&kr)&&t.nodes_start!==null){for(var n=t.nodes_start,l=t.nodes_end;n!==null;){var o=n===l?null:Z(n);n.remove(),n=o}r=!0}He(t,e&&!r),qe(t),Et(t,0),W(t,at);var s=t.transitions;if(s!==null)for(const u of s)u.stop();Pe(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Ve(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 Pt(t,e){var r=[];fe(t,r,!0),Be(r,()=>{K(t),e&&e()})}function Be(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var l of t)l.out(n)}else e()}function fe(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var l=n.next,o=(n.f&ne)!==0||(n.f&q)!==0;fe(n,e,o?r:!1),n=l}}}function qt(t){Ue(t,!0)}function Ue(t,e){if(t.f&H){wt(t)&&Yt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,l=(r.f&ne)!==0||(r.f&q)!==0;Ue(r,l?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let Ht=!1,ve=[];function Ye(){Ht=!1;const t=ve.slice();ve=[],wr(t)}function Br(t){Ht||(Ht=!0,queueMicrotask(Ye)),ve.push(t)}function Ur(){Ht&&Ye()}const Ge=0,Yr=1;let Vt=!1,Bt=Ge,xt=!1,yt=null,ct=!1;function Ke(t){ct=t}let nt=[],ft=0,Mn=[],w=null;function vt(t){w=t}let p=null;function Q(t){p=t}let B=null;function Gr(t){B=t}let T=null,I=0,tt=null;function Kr(t){tt=t}let We=1,lt=!1,F=null;function Je(){return++We}function Wr(){return!Ce}function wt(t){var s,i;var e=t.f;if(e&X)return!0;if(e>){var r=t.deps,n=(e&it)!==0;if(r!==null){var l;if(e&Rt){for(l=0;l<r.length;l++)((s=r[l]).reactions??(s.reactions=[])).push(t);t.f^=Rt}for(l=0;l<r.length;l++){var o=r[l];if(wt(o)&&Fe(o),n&&p!==null&&!lt&&!((i=o==null?void 0:o.reactions)!=null&&i.includes(t))&&(o.reactions??(o.reactions=[])).push(t),o.version>t.version)return!0}}(!n||p!==null&&!lt)&&W(t,R)}return!1}function Jr(t,e){for(var r=e;r!==null;){if(r.f&re)try{r.fn(t);return}catch{r.f^=re}r=r.parent}throw Vt=!1,t}function Xr(t){return(t.f&at)===0&&(t.parent===null||(t.parent.f&re)===0)}function Ut(t,e,r,n){if(Vt){if(r===null&&(Vt=!1),Xr(e))throw t;return}r!==null&&(Vt=!0);{Jr(t,e);return}}function Xe(t){var c;var e=T,r=I,n=tt,l=w,o=lt,s=B,i=F,u=t.f;T=null,I=0,tt=null,w=u&(q|st)?null:t,lt=!ct&&(u&it)!==0,B=null,F=t.ctx;try{var f=(0,t.fn)(),_=t.deps;if(T!==null){var a;if(Et(t,I),_!==null&&I>0)for(_.length=I+T.length,a=0;a<T.length;a++)_[I+a]=T[a];else t.deps=_=T;if(!lt)for(a=I;a<_.length;a++)((c=_[a]).reactions??(c.reactions=[])).push(t)}else _!==null&&I<_.length&&(Et(t,I),_.length=I);return f}finally{T=e,I=r,tt=n,w=l,lt=o,B=s,F=i}}function Zr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var l=r.length-1;l===0?r=e.reactions=null:(r[n]=r[l],r.pop())}}r===null&&e.f&j&&(T===null||!T.includes(e))&&(W(e,gt),e.f&(it|Rt)||(e.f^=Rt),Et(e,0))}function Et(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Zr(t,r[n])}function Yt(t){var e=t.f;if(!(e&at)){W(t,R);var r=p,n=F;p=t;try{e&ee?Vr(t):He(t),qe(t),Pe(t);var l=Xe(t);t.teardown=typeof l=="function"?l:null,t.version=We}catch(o){Ut(o,t,r,n||t.ctx)}finally{p=r}}}function Ze(){if(ft>1e3){ft=0;try{Nr()}catch(t){if(yt!==null)Ut(t,yt,null);else throw t}}ft++}function Qe(t){var e=t.length;if(e!==0){Ze();var r=ct;ct=!0;try{for(var n=0;n<e;n++){var l=t[n];l.f&R||(l.f^=R);var o=[];tr(l,o),Qr(o)}}finally{ct=r}}}function Qr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(at|H)))try{wt(n)&&(Yt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ve(n):n.fn=null))}catch(l){Ut(l,n,null,n.ctx)}}}function tn(){if(xt=!1,ft>1001)return;const t=nt;nt=[],Qe(t),xt||(ft=0,yt=null)}function Gt(t){Bt===Ge&&(xt||(xt=!0,queueMicrotask(tn))),yt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(st|q)){if(!(r&R))return;e.f^=R}}nt.push(e)}function tr(t,e){var r=t.first,n=[];t:for(;r!==null;){var l=r.f,o=(l&q)!==0,s=o&&(l&R)!==0,i=r.next;if(!s&&!(l&H))if(l&Ot){if(o)r.f^=R;else try{wt(r)&&Yt(r)}catch(a){Ut(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else l&ke&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var f=a.next;if(f!==null){r=f;continue t}a=a.parent}}r=i}for(var _=0;_<n.length;_++)u=n[_],e.push(u),tr(u,e)}function N(t){var e=Bt,r=nt;try{Ze();const l=[];Bt=Yr,nt=l,xt=!1,Qe(r);var n=t==null?void 0:t();return Ur(),(nt.length>0||l.length>0)&&N(),ft=0,yt=null,n}finally{Bt=e,nt=r}}function D(t){var _;var e=t.f,r=(e&j)!==0;if(r&&e&at){var n=je(t);return ue(t),n}if(w!==null){B!==null&&B.includes(t)&&Rr();var l=w.deps;T===null&&l!==null&&l[I]===t?I++:T===null?T=[t]:T.push(t),tt!==null&&p!==null&&p.f&R&&!(p.f&q)&&tt.includes(t)&&(W(p,X),Gt(p))}else if(r&&t.deps===null)for(var o=t,s=o.parent,i=o;s!==null;)if(s.f&j){var u=s;i=u,s=u.parent}else{var f=s;(_=f.deriveds)!=null&&_.includes(i)||(f.deriveds??(f.deriveds=[])).push(i);break}return r&&(o=t,wt(o)&&Fe(o)),t.v}function en(t){const e=w;try{return w=null,t()}finally{w=e}}const rn=~(X|gt|R);function W(t,e){t.f=t.f&rn|e}function Kt(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null}}function Wt(t){const e=F;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=p,n=w;e.e=null;try{for(var l=0;l<s.length;l++){var o=s[l];Q(o.effect),vt(o.reaction),qr(o.fn)}}finally{Q(r),vt(n)}}F=e.p,e.m=!0}return t||{}}const er=new Set,de=new Set;function rr(t){for(var e=0;e<t.length;e++)er.add(t[e]);for(var r of de)r(t)}function Jt(t){var h;var e=this,r=e.ownerDocument,n=t.type,l=((h=t.composedPath)==null?void 0:h.call(t))||[],o=l[0]||t.target,s=0,i=t.__root;if(i){var u=l.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=l.indexOf(e);if(f===-1)return;u<=f&&(s=u)}if(o=l[s]||t.target,o!==e){Nt(t,"currentTarget",{configurable:!0,get(){return o||r}});var _=w,a=p;vt(null),Q(null);try{for(var c,v=[];o!==null;){var d=o.assignedSlot||o.parentNode||o.host||null;try{var x=o["__"+n];if(x!==void 0&&!o.disabled)if(Ee(x)){var[C,...z]=x;C.apply(o,[t,...z])}else x.call(o,t)}catch(y){c?v.push(y):c=y}if(t.cancelBubble||d===e||d===null)break;o=d}if(c){for(let y of v)queueMicrotask(()=>{throw y});throw c}}finally{t.__root=e,delete t.currentTarget,vt(_),Q(a)}}}function nr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function dt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function kt(t,e){var r=(e&pr)!==0,n=(e&gr)!==0,l,o=!t.startsWith("<!>");return()=>{if(m)return dt($,null),$;l===void 0&&(l=nr(o?t:"<!>"+t),r||(l=G(l)));var s=n?document.importNode(l,!0):l.cloneNode(!0);if(r){var i=G(s),u=s.lastChild;dt(i,u)}else dt(s,s);return s}}function nn(t,e,r="svg"){var n=!t.startsWith("<!>"),l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(m)return dt($,null),$;if(!o){var s=nr(l),i=G(s);o=G(i)}var u=o.cloneNode(!0);return dt(u,u),u}}function ot(t,e){if(m){p.nodes_end=$,bt();return}t!==null&&t.before(e)}function ln(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function lr(t,e){return or(t,e)}function on(t,e){ie(),e.intro=e.intro??!1;const r=e.target,n=m,l=$;try{for(var o=G(r);o&&(o.nodeType!==8||o.data!==ye);)o=Z(o);if(!o)throw pt;Y(!0),V(o),bt();const s=or(t,{...e,anchor:o});if($===null||$.nodeType!==8||$.data!==Qt)throw oe(),pt;return Y(!1),s}catch(s){if(s===pt)return e.recover===!1&&Ar(),ie(),Me(r),Y(!1),lr(t,e);throw s}finally{Y(n),V(l)}}const ht=new Map;function or(t,{target:e,anchor:r,props:n={},events:l,context:o,intro:s=!0}){ie();var i=new Set,u=a=>{for(var c=0;c<a.length;c++){var v=a[c];if(!i.has(v)){i.add(v);var d=$r(v);e.addEventListener(v,Jt,{passive:d});var x=ht.get(v);x===void 0?(document.addEventListener(v,Jt,{passive:d}),ht.set(v,1)):ht.set(v,x+1)}}};u(te(er)),de.add(u);var f=void 0,_=Pr(()=>{var a=r??e.appendChild(Mt());return $t(()=>{if(o){Kt({});var c=F;c.c=o}l&&(n.$$events=l),m&&dt(a,null),f=t(a,n)||{},m&&(p.nodes_end=$),o&&Wt()}),()=>{var d;for(var c of i){e.removeEventListener(c,Jt);var v=ht.get(c);--v===0?(document.removeEventListener(c,Jt),ht.delete(c)):ht.set(c,v)}de.delete(u),a!==r&&((d=a.parentNode)==null||d.removeChild(a))}});return he.set(f,_),f}let he=new WeakMap;function sn(t,e){const r=he.get(t);return r?(he.delete(t),r(e)):Promise.resolve()}function _e(t,e,r=!1){m&&bt();var n=t,l=null,o=null,s=br,i=r?ne:0,u=!1;const f=(a,c=!0)=>{u=!0,_(c,a)},_=(a,c)=>{if(s===(s=a))return;let v=!1;if(m){const d=n.data===Zt;!!s===d&&(n=se(),V(n),Y(!1),v=!0)}s?(l?qt(l):c&&(l=$t(()=>c(n))),o&&Pt(o,()=>{o=null})):(o?qt(o):c&&(o=$t(()=>c(n))),l&&Pt(l,()=>{l=null})),v&&Y(!0)};ce(()=>{u=!1,e(f),u||_(null,null)},i),m&&(n=$)}function an(t,e){return e}function un(t,e,r,n){for(var l=[],o=e.length,s=0;s<o;s++)fe(e[s].e,l,!0);var i=o>0&&l.length===0&&r!==null;if(i){var u=r.parentNode;Me(u),u.append(r),n.clear(),et(t,e[0].prev,e[o-1].next)}Be(l,()=>{for(var f=0;f<o;f++){var _=e[f];i||(n.delete(_.k),et(t,_.prev,_.next)),K(_.e,!i)}})}function cn(t,e,r,n,l,o=null){var s=t,i={flags:e,items:new Map,first:null};{var u=t;s=m?V(G(u)):u.appendChild(Mt())}m&&bt();var f=null,_=!1;ce(()=>{var a=r(),c=Ee(a)?a:a==null?[]:te(a),v=c.length;if(_&&v===0)return;_=v===0;let d=!1;if(m){var x=s.data===Zt;x!==(v===0)&&(s=se(),V(s),Y(!1),d=!0)}if(m){for(var C=null,z,h=0;h<v;h++){if($.nodeType===8&&$.data===Qt){s=$,d=!0,Y(!1);break}var y=c[h],U=n(y,h);z=sr($,i,C,null,y,U,h,l,e),i.items.set(U,z),C=z}v>0&&V(se())}if(!m){var E=w;fn(c,i,s,l,e,(E.f&H)!==0,n)}o!==null&&(v===0?f?qt(f):f=$t(()=>o(s)):f!==null&&Pt(f,()=>{f=null})),d&&Y(!0)}),m&&(s=$)}function fn(t,e,r,n,l,o,s,i){var u=t.length,f=e.items,_=e.first,a=_,c,v=null,d=[],x=[],C,z,h,y;for(y=0;y<u;y+=1){if(C=t[y],z=s(C,y),h=f.get(z),h===void 0){var U=a?a.e.nodes_start:r;v=sr(U,e,v,v===null?e.first:v.next,C,z,y,n,l),f.set(z,v),d=[],x=[],a=v.next;continue}if(vn(h,C,y),h.e.f&H&&qt(h.e),h!==a){if(c!==void 0&&c.has(h)){if(d.length<x.length){var E=x[0],S;v=E.prev;var rt=d[0],Tt=d[d.length-1];for(S=0;S<d.length;S+=1)ir(d[S],E,r);for(S=0;S<x.length;S+=1)c.delete(x[S]);et(e,rt.prev,Tt.next),et(e,v,rt),et(e,Tt,E),a=E,v=Tt,y-=1,d=[],x=[]}else c.delete(h),ir(h,a,r),et(e,h.prev,h.next),et(e,h,v===null?e.first:v.next),et(e,v,h),v=h;continue}for(d=[],x=[];a!==null&&a.k!==z;)(o||!(a.e.f&H))&&(c??(c=new Set)).add(a),x.push(a),a=a.next;if(a===null)continue;h=a}d.push(h),v=h,a=h.next}if(a!==null||c!==void 0){for(var A=c===void 0?[]:te(c);a!==null;)(o||!(a.e.f&H))&&A.push(a),a=a.next;var _t=A.length;if(_t>0){var Rn=u===0?r:null;un(e,A,Rn,f)}}p.first=e.first&&e.first.e,p.last=v&&v.e}function vn(t,e,r,n){Ne(t.v,e),t.i=r}function sr(t,e,r,n,l,o,s,i,u,f){var _=(u&k)!==0,a=(u&hr)===0,c=_?a?le(l):It(l):l,v=u&zt?It(s):s,d={i:v,v:c,k:o,a:null,e:null,prev:r,next:n};try{return d.e=$t(()=>i(t,c,v),m),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function ir(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,l=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==n;){var s=Z(o);l.before(o),o=s}}function et(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function dn(t,e,r,n,l){var i;m&&bt();var o=(i=e.$$slots)==null?void 0:i[r],s=!1;o===!0&&(o=e.children,s=!0),o===void 0?l!==null&&l(t):o(t,s?()=>n:n)}function pe(t,e){Br(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const l=document.createElement("style");l.id=e.hash,l.textContent=e.code,n.appendChild(l)}})}function St(t,e,r,n){var l=t.__attributes??(t.__attributes={});m&&(l[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||l[e]!==(l[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[Tr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ar=new Map;function hn(t){var e=ar.get(t.nodeName);if(e)return e;ar.set(t.nodeName,e=[]);for(var r,n=t,l=Element.prototype;l!==n;){r=xr(n);for(var o in r)r[o].set&&e.push(o);n=yr(n)}return e}function ur(t,e){var r=t.__className,n=_n(e);m&&t.className===n?t.__className=n:(r!==n||m&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function _n(t){return t??""}function pn(t){for(var e=p,r=p;e!==null&&!(e.f&(q|st));)e=e.parent;try{return Q(e),t()}finally{Q(r)}}function M(t,e,r,n){var U;var l=!Ce,o=(r&_r)!==0,s=!1,i;i=t[e];var u=Sr in t||Te in t,f=((U=At(t,e))==null?void 0:U.set)??(u&&o&&e in t?E=>t[e]=E:void 0),_=n,a=!0,c=!1,v=()=>(c=!0,a&&(a=!1,_=n),_);i===void 0&&n!==void 0&&(f&&l&&Or(),i=v(),f&&f(i));var d;if(d=()=>{var E=t[e];return E===void 0?v():(a=!0,c=!1,E)},f){var x=t.$$legacy;return function(E,S){return arguments.length>0?((!S||x||s)&&f(S?d():E),E):d()}}var C=!1,z=!1,h=le(i),y=pn(()=>ae(()=>{var E=d(),S=D(h);return C?(C=!1,z=!0,S):(z=!1,h.v=E)}));return function(E,S){if(arguments.length>0){const rt=S?D(y):E;return y.equals(rt)||(C=!0,Dt(h,rt),c&&_!==void 0&&(_=rt),en(()=>D(y))),E}return D(y)}}function gn(t){return new bn(t)}class bn{constructor(e){$e(this,J);$e(this,L);var o;var r=new Map,n=(s,i)=>{var u=le(i);return r.set(s,u),u};const l=new Proxy({...e.props||{},$$events:{}},{get(s,i){return D(r.get(i)??n(i,Reflect.get(s,i)))},has(s,i){return i===Te?!0:(D(r.get(i)??n(i,Reflect.get(s,i))),Reflect.has(s,i))},set(s,i,u){return Dt(r.get(i)??n(i,u),u),Reflect.set(s,i,u)}});xe(this,L,(e.hydrate?on:lr)(e.component,{target:e.target,anchor:e.anchor,props:l,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((o=e==null?void 0:e.props)!=null&&o.$$host)||e.sync===!1)&&N(),xe(this,J,l.$$events);for(const s of Object.keys(O(this,L)))s==="$set"||s==="$destroy"||s==="$on"||Nt(this,s,{get(){return O(this,L)[s]},set(i){O(this,L)[s]=i},enumerable:!0});O(this,L).$set=s=>{Object.assign(l,s)},O(this,L).$destroy=()=>{sn(O(this,L))}}$set(e){O(this,L).$set(e)}$on(e,r){O(this,J)[e]=O(this,J)[e]||[];const n=(...l)=>r.call(this,...l);return O(this,J)[e].push(n),()=>{O(this,J)[e]=O(this,J)[e].filter(l=>l!==n)}}$destroy(){O(this,L).$destroy()}}J=new WeakMap,L=new WeakMap;let cr;typeof HTMLElement=="function"&&(cr=class extends HTMLElement{constructor(e,r,n){super();P(this,"$$ctor");P(this,"$$s");P(this,"$$c");P(this,"$$cn",!1);P(this,"$$d",{});P(this,"$$r",!1);P(this,"$$p_d",{});P(this,"$$l",{});P(this,"$$l_u",new Map);P(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const l=this.$$c.$on(e,r);this.$$l_u.set(r,l)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const l=this.$$l_u.get(r);l&&(l(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(l){return o=>{const s=document.createElement("slot");l!=="default"&&(s.name=l),ot(o,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=mn(this);for(const l of this.$$s)l in n&&(l==="default"&&!this.$$d.children?(this.$$d.children=e(l),r.default=!0):r[l]=e(l));for(const l of this.attributes){const o=this.$$g_p(l.name);o in this.$$d||(this.$$d[o]=Xt(o,l.value,this.$$p_d,"toProp"))}for(const l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=gn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Fr(()=>{Hr(()=>{var l;this.$$r=!0;for(const o of Ct(this.$$c)){if(!((l=this.$$p_d[o])!=null&&l.reflect))continue;this.$$d[o]=this.$$c[o];const s=Xt(o,this.$$d[o],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,s)}this.$$r=!1})});for(const l in this.$$l)for(const o of this.$$l[l]){const s=this.$$c.$on(l,o);this.$$l_u.set(o,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var l;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xt(e,n,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ct(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Xt(t,e,r,n){var o;const l=(o=r[t])==null?void 0:o.type;if(e=l==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(l){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(l){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function mn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ge(t,e,r,n,l,o){let s=class extends cr{constructor(){super(t,r,l),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Ct(e).forEach(i=>{Nt(s.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Xt(i,u,e),this.$$d[i]=u;var f=this.$$c;if(f){var _=(a=At(f,i))==null?void 0:a.get;_?f[i]=u:f.$set({[i]:u})}}})}),n.forEach(i=>{Nt(s.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=s,s}const $n=[{name:"nostter",url:"https://nostter.app/post?text={text}&url={url}&title={title}",icon:"https://nostter.app/favicon.ico"},{name:"lumilumi",url:"https://lumilumi.app/post?url={url}&text={text}&title={title}",icon:"https://lumilumi.app/favicon.ico"}];var xn=t=>t.stopPropagation(),yn=(t,e,r)=>e(D(r).url),wn=kt('<button class="item svelte-13vsz3z"><img> </button>'),En=kt('<div class="overlay svelte-13vsz3z"><div class="inner svelte-13vsz3z"><button class="close-button svelte-13vsz3z" aria-label="Close">✖</button> <h2 class="title svelte-13vsz3z">Share</h2> <div class="list svelte-13vsz3z"></div></div></div>');const kn={hash:"svelte-13vsz3z",code:`
|
|
1
|
+
(function(g,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(g=typeof globalThis<"u"?globalThis:g||self,b(g.NostrShare={}))})(this,function(g){"use strict";var In=Object.defineProperty;var vr=g=>{throw TypeError(g)};var Dn=(g,b,k)=>b in g?In(g,b,{enumerable:!0,configurable:!0,writable:!0,value:k}):g[b]=k;var P=(g,b,k)=>Dn(g,typeof b!="symbol"?b+"":b,k),dr=(g,b,k)=>b.has(g)||vr("Cannot "+k);var O=(g,b,k)=>(dr(g,b,"read from private field"),k?k.call(g):b.get(g)),$e=(g,b,k)=>b.has(g)?vr("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(g):b.set(g,k),ye=(g,b,k,St)=>(dr(g,b,"write to private field"),St?St.call(g,k):b.set(g,k),k);var J,L;const b="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(b);const k=1,St=2,hr=16,_r=8,pr=1,gr=2,we="[",Zt="[!",Qt="]",gt={},br=Symbol(),mr=["touchstart","touchmove"];function $r(t){return mr.includes(t)}const xe=!1;var Ee=Array.isArray,te=Array.from,Ct=Object.keys,Nt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,wr=Object.getPrototypeOf;function xr(t){for(var e=0;e<t.length;e++)t[e]()}const j=2,ke=4,Ot=8,ee=16,q=32,ot=64,re=128,it=256,Rt=512,R=1024,X=2048,bt=4096,H=8192,at=16384,Er=32768,ne=65536,kr=1<<19,Te=1<<20,Tr=Symbol("$state"),ze=Symbol("legacy props"),zr=Symbol("");function Se(t){return t===this.v}function Sr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!Sr(t,this.v)}function Nr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ar(){throw new Error("https://svelte.dev/e/hydration_failed")}function Or(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ir(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ce=!1;function It(t,e){var r={f:0,v:t,reactions:null,equals:Se,version:0};return r}function Dr(t){return Mr(It(t))}function se(t,e=!1){const r=It(t);return e||(r.equals=Cr),r}function Mr(t){return x!==null&&x.f&j&&(B===null?Gr([t]):B.push(t)),t}function Dt(t,e){return x!==null&&Wr()&&x.f&(j|ee)&&(B===null||!B.includes(t))&&Ir(),Ne(t,e)}function Ne(t,e){return t.equals(e)||(t.v=e,t.version=Je(),Ae(t,X),p!==null&&p.f&R&&!(p.f&q)&&(z!==null&&z.includes(t)?(W(p,X),Gt(p)):tt===null?Kr([t]):tt.push(t))),e}function Ae(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,s=0;s<n;s++){var l=r[s],o=l.f;o&X||(W(l,e),o&(R|it)&&(o&j?Ae(l,bt):Gt(l)))}}function le(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let m=!1;function Y(t){m=t}let $;function V(t){if(t===null)throw le(),gt;return $=t}function mt(){return V(Z($))}function $t(t){if(m){if(Z($)!==null)throw le(),gt;$=t}}function oe(){for(var t=0,e=$;;){if(e.nodeType===8){var r=e.data;if(r===Qt){if(t===0)return e;t-=1}else(r===we||r===Zt)&&(t+=1)}var n=Z(e);e.remove(),e=n}}var Oe,Re,Ie;function ie(){if(Oe===void 0){Oe=window;var t=Element.prototype,e=Node.prototype;Re=At(e,"firstChild").get,Ie=At(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Mt(t=""){return document.createTextNode(t)}function G(t){return Re.call(t)}function Z(t){return Ie.call(t)}function Lt(t,e){if(!m)return G(t);var r=G($);return r===null&&(r=$.appendChild(Mt())),V(r),r}function De(t,e){if(!m){var r=G(t);return r instanceof Comment&&r.data===""?Z(r):r}return $}function jt(t,e=1,r=!1){let n=m?$:t;for(var s;e--;)s=n,n=Z(n);if(!m)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var o=Mt();return n===null?s==null||s.after(o):n.before(o),V(o),o}return V(n),n}function Me(t){t.textContent=""}function ae(t){var e=j|X;p===null?e|=it:p.f|=Te;var r=x!==null&&x.f&j?x:null;const n={children:null,ctx:F,deps:null,equals:Se,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Le(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&j?ue(n):K(n)}}}function Lr(t){for(var e=t.parent;e!==null;){if(!(e.f&j))return e;e=e.parent}return null}function je(t){var e,r=p;Q(Lr(t));try{Le(t),e=Xe(t)}finally{Q(r)}return e}function Fe(t){var e=je(t),r=(st||t.f&it)&&t.deps!==null?bt:R;W(t,r),t.equals(e)||(t.v=e,t.version=Je())}function ue(t){Le(t),kt(t,0),W(t,at),t.v=t.children=t.deps=t.ctx=t.reactions=null}function jr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ut(t,e,r,n=!0){var s=(t&ot)!==0,l=p,o={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|X,first:null,fn:e,last:null,next:null,parent:s?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ct;try{Ke(!0),Yt(o),o.f|=Er}catch(_){throw K(o),_}finally{Ke(i)}}else e!==null&&Gt(o);var u=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Te)===0;if(!u&&!s&&n&&(l!==null&&jr(o,l),x!==null&&x.f&j)){var f=x;(f.children??(f.children=[])).push(o)}return o}function Fr(t){const e=ut(ot,t,!0);return()=>{K(e)}}function Pr(t){const e=ut(ot,t,!0);return(r={})=>new Promise(n=>{r.outro?Pt(e,()=>{K(e),n(void 0)}):(K(e),n(void 0))})}function qr(t){return ut(ke,t,!1)}function Hr(t){return ut(Ot,t,!0)}function Ft(t){return ce(t)}function ce(t,e=0){return ut(Ot|ee|e,t,!0)}function yt(t,e=!0){return ut(Ot|q,t,!0,e)}function Pe(t){var e=t.teardown;if(e!==null){const r=x;vt(null);try{e.call(null)}finally{vt(r)}}}function qe(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)ue(e[r])}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;K(r,e),r=n}}function Vr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&q||K(e),e=r}}function K(t,e=!0){var r=!1;if((e||t.f&kr)&&t.nodes_start!==null){for(var n=t.nodes_start,s=t.nodes_end;n!==null;){var l=n===s?null:Z(n);n.remove(),n=l}r=!0}He(t,e&&!r),qe(t),kt(t,0),W(t,at);var o=t.transitions;if(o!==null)for(const u of o)u.stop();Pe(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Ve(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 Pt(t,e){var r=[];fe(t,r,!0),Be(r,()=>{K(t),e&&e()})}function Be(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var s of t)s.out(n)}else e()}function fe(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var s=n.next,l=(n.f&ne)!==0||(n.f&q)!==0;fe(n,e,l?r:!1),n=s}}}function qt(t){Ue(t,!0)}function Ue(t,e){if(t.f&H){Et(t)&&Yt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,s=(r.f&ne)!==0||(r.f&q)!==0;Ue(r,s?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let Ht=!1,ve=[];function Ye(){Ht=!1;const t=ve.slice();ve=[],xr(t)}function Br(t){Ht||(Ht=!0,queueMicrotask(Ye)),ve.push(t)}function Ur(){Ht&&Ye()}const Ge=0,Yr=1;let Vt=!1,Bt=Ge,wt=!1,xt=null,ct=!1;function Ke(t){ct=t}let nt=[],ft=0,Mn=[],x=null;function vt(t){x=t}let p=null;function Q(t){p=t}let B=null;function Gr(t){B=t}let z=null,I=0,tt=null;function Kr(t){tt=t}let We=1,st=!1,F=null;function Je(){return++We}function Wr(){return!Ce}function Et(t){var o,i;var e=t.f;if(e&X)return!0;if(e&bt){var r=t.deps,n=(e&it)!==0;if(r!==null){var s;if(e&Rt){for(s=0;s<r.length;s++)((o=r[s]).reactions??(o.reactions=[])).push(t);t.f^=Rt}for(s=0;s<r.length;s++){var l=r[s];if(Et(l)&&Fe(l),n&&p!==null&&!st&&!((i=l==null?void 0:l.reactions)!=null&&i.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||p!==null&&!st)&&W(t,R)}return!1}function Jr(t,e){for(var r=e;r!==null;){if(r.f&re)try{r.fn(t);return}catch{r.f^=re}r=r.parent}throw Vt=!1,t}function Xr(t){return(t.f&at)===0&&(t.parent===null||(t.parent.f&re)===0)}function Ut(t,e,r,n){if(Vt){if(r===null&&(Vt=!1),Xr(e))throw t;return}r!==null&&(Vt=!0);{Jr(t,e);return}}function Xe(t){var c;var e=z,r=I,n=tt,s=x,l=st,o=B,i=F,u=t.f;z=null,I=0,tt=null,x=u&(q|ot)?null:t,st=!ct&&(u&it)!==0,B=null,F=t.ctx;try{var f=(0,t.fn)(),_=t.deps;if(z!==null){var a;if(kt(t,I),_!==null&&I>0)for(_.length=I+z.length,a=0;a<z.length;a++)_[I+a]=z[a];else t.deps=_=z;if(!st)for(a=I;a<_.length;a++)((c=_[a]).reactions??(c.reactions=[])).push(t)}else _!==null&&I<_.length&&(kt(t,I),_.length=I);return f}finally{z=e,I=r,tt=n,x=s,st=l,B=o,F=i}}function Zr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var s=r.length-1;s===0?r=e.reactions=null:(r[n]=r[s],r.pop())}}r===null&&e.f&j&&(z===null||!z.includes(e))&&(W(e,bt),e.f&(it|Rt)||(e.f^=Rt),kt(e,0))}function kt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Zr(t,r[n])}function Yt(t){var e=t.f;if(!(e&at)){W(t,R);var r=p,n=F;p=t;try{e&ee?Vr(t):He(t),qe(t),Pe(t);var s=Xe(t);t.teardown=typeof s=="function"?s:null,t.version=We}catch(l){Ut(l,t,r,n||t.ctx)}finally{p=r}}}function Ze(){if(ft>1e3){ft=0;try{Nr()}catch(t){if(xt!==null)Ut(t,xt,null);else throw t}}ft++}function Qe(t){var e=t.length;if(e!==0){Ze();var r=ct;ct=!0;try{for(var n=0;n<e;n++){var s=t[n];s.f&R||(s.f^=R);var l=[];tr(s,l),Qr(l)}}finally{ct=r}}}function Qr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(at|H)))try{Et(n)&&(Yt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ve(n):n.fn=null))}catch(s){Ut(s,n,null,n.ctx)}}}function tn(){if(wt=!1,ft>1001)return;const t=nt;nt=[],Qe(t),wt||(ft=0,xt=null)}function Gt(t){Bt===Ge&&(wt||(wt=!0,queueMicrotask(tn))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(ot|q)){if(!(r&R))return;e.f^=R}}nt.push(e)}function tr(t,e){var r=t.first,n=[];t:for(;r!==null;){var s=r.f,l=(s&q)!==0,o=l&&(s&R)!==0,i=r.next;if(!o&&!(s&H))if(s&Ot){if(l)r.f^=R;else try{Et(r)&&Yt(r)}catch(a){Ut(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else s&ke&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var f=a.next;if(f!==null){r=f;continue t}a=a.parent}}r=i}for(var _=0;_<n.length;_++)u=n[_],e.push(u),tr(u,e)}function N(t){var e=Bt,r=nt;try{Ze();const s=[];Bt=Yr,nt=s,wt=!1,Qe(r);var n=t==null?void 0:t();return Ur(),(nt.length>0||s.length>0)&&N(),ft=0,xt=null,n}finally{Bt=e,nt=r}}function D(t){var _;var e=t.f,r=(e&j)!==0;if(r&&e&at){var n=je(t);return ue(t),n}if(x!==null){B!==null&&B.includes(t)&&Rr();var s=x.deps;z===null&&s!==null&&s[I]===t?I++:z===null?z=[t]:z.push(t),tt!==null&&p!==null&&p.f&R&&!(p.f&q)&&tt.includes(t)&&(W(p,X),Gt(p))}else if(r&&t.deps===null)for(var l=t,o=l.parent,i=l;o!==null;)if(o.f&j){var u=o;i=u,o=u.parent}else{var f=o;(_=f.deriveds)!=null&&_.includes(i)||(f.deriveds??(f.deriveds=[])).push(i);break}return r&&(l=t,Et(l)&&Fe(l)),t.v}function en(t){const e=x;try{return x=null,t()}finally{x=e}}const rn=~(X|bt|R);function W(t,e){t.f=t.f&rn|e}function Kt(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null}}function Wt(t){const e=F;if(e!==null){t!==void 0&&(e.x=t);const o=e.e;if(o!==null){var r=p,n=x;e.e=null;try{for(var s=0;s<o.length;s++){var l=o[s];Q(l.effect),vt(l.reaction),qr(l.fn)}}finally{Q(r),vt(n)}}F=e.p,e.m=!0}return t||{}}const er=new Set,de=new Set;function rr(t){for(var e=0;e<t.length;e++)er.add(t[e]);for(var r of de)r(t)}function Jt(t){var h;var e=this,r=e.ownerDocument,n=t.type,s=((h=t.composedPath)==null?void 0:h.call(t))||[],l=s[0]||t.target,o=0,i=t.__root;if(i){var u=s.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=s.indexOf(e);if(f===-1)return;u<=f&&(o=u)}if(l=s[o]||t.target,l!==e){Nt(t,"currentTarget",{configurable:!0,get(){return l||r}});var _=x,a=p;vt(null),Q(null);try{for(var c,v=[];l!==null;){var d=l.assignedSlot||l.parentNode||l.host||null;try{var y=l["__"+n];if(y!==void 0&&!l.disabled)if(Ee(y)){var[C,...S]=y;C.apply(l,[t,...S])}else y.call(l,t)}catch(w){c?v.push(w):c=w}if(t.cancelBubble||d===e||d===null)break;l=d}if(c){for(let w of v)queueMicrotask(()=>{throw w});throw c}}finally{t.__root=e,delete t.currentTarget,vt(_),Q(a)}}}function nr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function dt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Tt(t,e){var r=(e&pr)!==0,n=(e&gr)!==0,s,l=!t.startsWith("<!>");return()=>{if(m)return dt($,null),$;s===void 0&&(s=nr(l?t:"<!>"+t),r||(s=G(s)));var o=n?document.importNode(s,!0):s.cloneNode(!0);if(r){var i=G(o),u=o.lastChild;dt(i,u)}else dt(o,o);return o}}function nn(t,e,r="svg"){var n=!t.startsWith("<!>"),s=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if(m)return dt($,null),$;if(!l){var o=nr(s),i=G(o);l=G(i)}var u=l.cloneNode(!0);return dt(u,u),u}}function lt(t,e){if(m){p.nodes_end=$,mt();return}t!==null&&t.before(e)}function sn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function sr(t,e){return lr(t,e)}function ln(t,e){ie(),e.intro=e.intro??!1;const r=e.target,n=m,s=$;try{for(var l=G(r);l&&(l.nodeType!==8||l.data!==we);)l=Z(l);if(!l)throw gt;Y(!0),V(l),mt();const o=lr(t,{...e,anchor:l});if($===null||$.nodeType!==8||$.data!==Qt)throw le(),gt;return Y(!1),o}catch(o){if(o===gt)return e.recover===!1&&Ar(),ie(),Me(r),Y(!1),sr(t,e);throw o}finally{Y(n),V(s)}}const ht=new Map;function lr(t,{target:e,anchor:r,props:n={},events:s,context:l,intro:o=!0}){ie();var i=new Set,u=a=>{for(var c=0;c<a.length;c++){var v=a[c];if(!i.has(v)){i.add(v);var d=$r(v);e.addEventListener(v,Jt,{passive:d});var y=ht.get(v);y===void 0?(document.addEventListener(v,Jt,{passive:d}),ht.set(v,1)):ht.set(v,y+1)}}};u(te(er)),de.add(u);var f=void 0,_=Pr(()=>{var a=r??e.appendChild(Mt());return yt(()=>{if(l){Kt({});var c=F;c.c=l}s&&(n.$$events=s),m&&dt(a,null),f=t(a,n)||{},m&&(p.nodes_end=$),l&&Wt()}),()=>{var d;for(var c of i){e.removeEventListener(c,Jt);var v=ht.get(c);--v===0?(document.removeEventListener(c,Jt),ht.delete(c)):ht.set(c,v)}de.delete(u),a!==r&&((d=a.parentNode)==null||d.removeChild(a))}});return he.set(f,_),f}let he=new WeakMap;function on(t,e){const r=he.get(t);return r?(he.delete(t),r(e)):Promise.resolve()}function _e(t,e,r=!1){m&&mt();var n=t,s=null,l=null,o=br,i=r?ne:0,u=!1;const f=(a,c=!0)=>{u=!0,_(c,a)},_=(a,c)=>{if(o===(o=a))return;let v=!1;if(m){const d=n.data===Zt;!!o===d&&(n=oe(),V(n),Y(!1),v=!0)}o?(s?qt(s):c&&(s=yt(()=>c(n))),l&&Pt(l,()=>{l=null})):(l?qt(l):c&&(l=yt(()=>c(n))),s&&Pt(s,()=>{s=null})),v&&Y(!0)};ce(()=>{u=!1,e(f),u||_(null,null)},i),m&&(n=$)}function an(t,e){return e}function un(t,e,r,n){for(var s=[],l=e.length,o=0;o<l;o++)fe(e[o].e,s,!0);var i=l>0&&s.length===0&&r!==null;if(i){var u=r.parentNode;Me(u),u.append(r),n.clear(),et(t,e[0].prev,e[l-1].next)}Be(s,()=>{for(var f=0;f<l;f++){var _=e[f];i||(n.delete(_.k),et(t,_.prev,_.next)),K(_.e,!i)}})}function cn(t,e,r,n,s,l=null){var o=t,i={flags:e,items:new Map,first:null};{var u=t;o=m?V(G(u)):u.appendChild(Mt())}m&&mt();var f=null,_=!1;ce(()=>{var a=r(),c=Ee(a)?a:a==null?[]:te(a),v=c.length;if(_&&v===0)return;_=v===0;let d=!1;if(m){var y=o.data===Zt;y!==(v===0)&&(o=oe(),V(o),Y(!1),d=!0)}if(m){for(var C=null,S,h=0;h<v;h++){if($.nodeType===8&&$.data===Qt){o=$,d=!0,Y(!1);break}var w=c[h],U=n(w,h);S=or($,i,C,null,w,U,h,s,e),i.items.set(U,S),C=S}v>0&&V(oe())}if(!m){var E=x;fn(c,i,o,s,e,(E.f&H)!==0,n)}l!==null&&(v===0?f?qt(f):f=yt(()=>l(o)):f!==null&&Pt(f,()=>{f=null})),d&&Y(!0)}),m&&(o=$)}function fn(t,e,r,n,s,l,o,i){var u=t.length,f=e.items,_=e.first,a=_,c,v=null,d=[],y=[],C,S,h,w;for(w=0;w<u;w+=1){if(C=t[w],S=o(C,w),h=f.get(S),h===void 0){var U=a?a.e.nodes_start:r;v=or(U,e,v,v===null?e.first:v.next,C,S,w,n,s),f.set(S,v),d=[],y=[],a=v.next;continue}if(vn(h,C,w),h.e.f&H&&qt(h.e),h!==a){if(c!==void 0&&c.has(h)){if(d.length<y.length){var E=y[0],T;v=E.prev;var rt=d[0],zt=d[d.length-1];for(T=0;T<d.length;T+=1)ir(d[T],E,r);for(T=0;T<y.length;T+=1)c.delete(y[T]);et(e,rt.prev,zt.next),et(e,v,rt),et(e,zt,E),a=E,v=zt,w-=1,d=[],y=[]}else c.delete(h),ir(h,a,r),et(e,h.prev,h.next),et(e,h,v===null?e.first:v.next),et(e,v,h),v=h;continue}for(d=[],y=[];a!==null&&a.k!==S;)(l||!(a.e.f&H))&&(c??(c=new Set)).add(a),y.push(a),a=a.next;if(a===null)continue;h=a}d.push(h),v=h,a=h.next}if(a!==null||c!==void 0){for(var A=c===void 0?[]:te(c);a!==null;)(l||!(a.e.f&H))&&A.push(a),a=a.next;var pt=A.length;if(pt>0){var Rn=u===0?r:null;un(e,A,Rn,f)}}p.first=e.first&&e.first.e,p.last=v&&v.e}function vn(t,e,r,n){Ne(t.v,e),t.i=r}function or(t,e,r,n,s,l,o,i,u,f){var _=(u&k)!==0,a=(u&hr)===0,c=_?a?se(s):It(s):s,v=u&St?It(o):o,d={i:v,v:c,k:l,a:null,e:null,prev:r,next:n};try{return d.e=yt(()=>i(t,c,v),m),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function ir(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,s=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var o=Z(l);s.before(l),l=o}}function et(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function dn(t,e,r,n,s){var i;m&&mt();var l=(i=e.$$slots)==null?void 0:i[r],o=!1;l===!0&&(l=e.children,o=!0),l===void 0?s!==null&&s(t):l(t,o?()=>n:n)}function pe(t,e){Br(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const s=document.createElement("style");s.id=e.hash,s.textContent=e.code,n.appendChild(s)}})}function _t(t,e,r,n){var s=t.__attributes??(t.__attributes={});m&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[zr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ar=new Map;function hn(t){var e=ar.get(t.nodeName);if(e)return e;ar.set(t.nodeName,e=[]);for(var r,n=t,s=Element.prototype;s!==n;){r=yr(n);for(var l in r)r[l].set&&e.push(l);n=wr(n)}return e}function ur(t,e){var r=t.__className,n=_n(e);m&&t.className===n?t.__className=n:(r!==n||m&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function _n(t){return t??""}function pn(t){for(var e=p,r=p;e!==null&&!(e.f&(q|ot));)e=e.parent;try{return Q(e),t()}finally{Q(r)}}function M(t,e,r,n){var U;var s=!Ce,l=(r&_r)!==0,o=!1,i;i=t[e];var u=Tr in t||ze in t,f=((U=At(t,e))==null?void 0:U.set)??(u&&l&&e in t?E=>t[e]=E:void 0),_=n,a=!0,c=!1,v=()=>(c=!0,a&&(a=!1,_=n),_);i===void 0&&n!==void 0&&(f&&s&&Or(),i=v(),f&&f(i));var d;if(d=()=>{var E=t[e];return E===void 0?v():(a=!0,c=!1,E)},f){var y=t.$$legacy;return function(E,T){return arguments.length>0?((!T||y||o)&&f(T?d():E),E):d()}}var C=!1,S=!1,h=se(i),w=pn(()=>ae(()=>{var E=d(),T=D(h);return C?(C=!1,S=!0,T):(S=!1,h.v=E)}));return function(E,T){if(arguments.length>0){const rt=T?D(w):E;return w.equals(rt)||(C=!0,Dt(h,rt),c&&_!==void 0&&(_=rt),en(()=>D(w))),E}return D(w)}}function gn(t){return new bn(t)}class bn{constructor(e){$e(this,J);$e(this,L);var l;var r=new Map,n=(o,i)=>{var u=se(i);return r.set(o,u),u};const s=new Proxy({...e.props||{},$$events:{}},{get(o,i){return D(r.get(i)??n(i,Reflect.get(o,i)))},has(o,i){return i===ze?!0:(D(r.get(i)??n(i,Reflect.get(o,i))),Reflect.has(o,i))},set(o,i,u){return Dt(r.get(i)??n(i,u),u),Reflect.set(o,i,u)}});ye(this,L,(e.hydrate?ln:sr)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&N(),ye(this,J,s.$$events);for(const o of Object.keys(O(this,L)))o==="$set"||o==="$destroy"||o==="$on"||Nt(this,o,{get(){return O(this,L)[o]},set(i){O(this,L)[o]=i},enumerable:!0});O(this,L).$set=o=>{Object.assign(s,o)},O(this,L).$destroy=()=>{on(O(this,L))}}$set(e){O(this,L).$set(e)}$on(e,r){O(this,J)[e]=O(this,J)[e]||[];const n=(...s)=>r.call(this,...s);return O(this,J)[e].push(n),()=>{O(this,J)[e]=O(this,J)[e].filter(s=>s!==n)}}$destroy(){O(this,L).$destroy()}}J=new WeakMap,L=new WeakMap;let cr;typeof HTMLElement=="function"&&(cr=class extends HTMLElement{constructor(e,r,n){super();P(this,"$$ctor");P(this,"$$s");P(this,"$$c");P(this,"$$cn",!1);P(this,"$$d",{});P(this,"$$r",!1);P(this,"$$p_d",{});P(this,"$$l",{});P(this,"$$l_u",new Map);P(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const s=this.$$c.$on(e,r);this.$$l_u.set(r,s)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const s=this.$$l_u.get(r);s&&(s(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(s){return l=>{const o=document.createElement("slot");s!=="default"&&(o.name=s),lt(l,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=mn(this);for(const s of this.$$s)s in n&&(s==="default"&&!this.$$d.children?(this.$$d.children=e(s),r.default=!0):r[s]=e(s));for(const s of this.attributes){const l=this.$$g_p(s.name);l in this.$$d||(this.$$d[l]=Xt(l,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=gn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Fr(()=>{Hr(()=>{var s;this.$$r=!0;for(const l of Ct(this.$$c)){if(!((s=this.$$p_d[l])!=null&&s.reflect))continue;this.$$d[l]=this.$$c[l];const o=Xt(l,this.$$d[l],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,o)}this.$$r=!1})});for(const s in this.$$l)for(const l of this.$$l[s]){const o=this.$$c.$on(s,l);this.$$l_u.set(l,o)}this.$$l={}}}attributeChangedCallback(e,r,n){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xt(e,n,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ct(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Xt(t,e,r,n){var l;const s=(l=r[t])==null?void 0:l.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(s){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(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function mn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ge(t,e,r,n,s,l){let o=class extends cr{constructor(){super(t,r,s),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Ct(e).forEach(i=>{Nt(o.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Xt(i,u,e),this.$$d[i]=u;var f=this.$$c;if(f){var _=(a=At(f,i))==null?void 0:a.get;_?f[i]=u:f.$set({[i]:u})}}})}),n.forEach(i=>{Nt(o.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=o,o}const $n=[{name:"nostter",url:"https://nostter.app/post?text={text}&url={url}&title={title}",icon:"https://nostter.app/favicon.ico"},{name:"lumilumi",url:"https://lumilumi.app/post?url={url}&text={text}&title={title}",icon:"https://lumilumi.app/favicon.ico"}];var yn=t=>t.stopPropagation(),wn=(t,e,r)=>e(D(r).url),xn=Tt('<button class="item svelte-13vsz3z"><img> </button>'),En=Tt('<div class="overlay svelte-13vsz3z"><div class="inner svelte-13vsz3z"><button class="close-button svelte-13vsz3z" aria-label="Close">✖</button> <h2 class="title svelte-13vsz3z">Share</h2> <div class="list svelte-13vsz3z"></div></div></div>');const kn={hash:"svelte-13vsz3z",code:`
|
|
2
2
|
/* オーバーレイ背景 */.overlay.svelte-13vsz3z {position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.3); /* 少し濃い背景 */display:flex;justify-content:center;align-items:center;}
|
|
3
3
|
|
|
4
4
|
/* ダイアログ本体 */.inner.svelte-13vsz3z {display:flex;flex-direction:column;position:relative;background-color:var(--bg-color);padding:1.5rem;border-radius:12px; /* 柔らかい角丸 */box-shadow:0 8px 16px rgba(0, 0, 0, 0.2);width:90%;max-width:400px;gap:1rem; /* スペーシング */}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
box-shadow 0.2s ease;}.item.svelte-13vsz3z:hover {background-color:var(--button2-hover-color); /* グレー200 */box-shadow:0 2px 6px rgba(0, 0, 0, 0.1);}.item.svelte-13vsz3z:active {background-color:var(--button2-active-color); /* グレー300 */}
|
|
12
12
|
|
|
13
13
|
/* バツボタン */.close-button.svelte-13vsz3z {position:absolute;right:12px;top:12px;width:36px;height:36px;display:flex;justify-content:center;align-items:center;background-color:var(--button2-bg-color); /* グレー200 */border:none;border-radius:50%;font-size:1.25rem;color:var(--button2-text-color); /* グレー700 */cursor:pointer;transition:background-color 0.2s ease,
|
|
14
|
-
transform 0.1s ease;}.close-button.svelte-13vsz3z:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-13vsz3z:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}`};function be(t,e){Kt(e,!0),pe(t,kn);let r=M(e,"url",7,""),n=M(e,"text",7,""),
|
|
14
|
+
transform 0.1s ease;}.close-button.svelte-13vsz3z:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-13vsz3z:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}`};function be(t,e){Kt(e,!0),pe(t,kn);let r=M(e,"url",7,""),n=M(e,"text",7,""),s=M(e,"shareTitle",7,""),l=M(e,"handleClose",7);const o=a=>{r()===""&&n()===""&&s()===""&&(r(window.location.href),s(document.title));const c=a.replace("{url}",encodeURIComponent(r())).replace("{title}",encodeURIComponent(s())).replace("{text}",encodeURIComponent(n()));console.log(c),window.open(c,"_blank","noreferrer"),l()()};var i=En();i.__click=function(...a){var c;(c=l())==null||c.apply(this,a)};var u=Lt(i);u.__click=[yn];var f=Lt(u);f.__click=function(...a){var c;(c=l())==null||c.apply(this,a)};var _=jt(f,4);return cn(_,21,()=>$n,an,(a,c)=>{var v=xn();v.__click=[wn,o,c];var d=Lt(v);_t(d,"width",24);var y=jt(d);$t(v),Ft(()=>{_t(d,"src",D(c).icon),_t(d,"alt",D(c).name),sn(y,` ${D(c).name??""}`)}),lt(a,v)}),$t(_),$t(u),$t(i),lt(t,i),Wt({get url(){return r()},set url(a=""){r(a),N()},get text(){return n()},set text(a=""){n(a),N()},get shareTitle(){return s()},set shareTitle(a=""){s(a),N()},get handleClose(){return l()},set handleClose(a){l(a),N()}})}rr(["click"]),customElements.define("nostr-share-dialog",ge(be,{url:{},text:{},shareTitle:{},handleClose:{}},[],[],!0));var Tn=nn(`<svg class="nostr-icon svelte-givlj7" version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" xml:space="preserve"><g><path class="st0 svelte-givlj7" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2
|
|
15
15
|
c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8
|
|
16
16
|
c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5
|
|
17
17
|
c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"></path><circle class="st1 svelte-givlj7" cx="137.9" cy="99" r="12.1"></circle><path class="st1 svelte-givlj7" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
c-8.3-3.3-8.6-9.2-8.6-11.2c-0.4-23.1-34.5-25.9-64.5-20.1c-32.8,6.2,0.4,53.3,0.4,116v8.4c-0.1,3.1-2.5,5.6-5.6,5.6H57.7
|
|
27
27
|
c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5
|
|
28
28
|
c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99
|
|
29
|
-
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const
|
|
30
|
-
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function me(t,e){Kt(e,!0),pe(t,
|
|
29
|
+
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const zn={hash:"svelte-givlj7",code:`
|
|
30
|
+
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function me(t,e){Kt(e,!0),pe(t,zn);let r=M(e,"size",7,28);var n=Tn();return Ft(()=>_t(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),lt(t,n),Wt({get size(){return r()},set size(s=28){r(s),N()}})}ge(me,{size:{}},[],[],!0);const Sn=(t,e)=>{Dt(e,!0)};var Cn=Tt("<span>Nostr</span>"),Nn=Tt("<!> <!>",1),An=Tt("<button><!></button> <!>",1);const On={hash:"svelte-1swpyup",code:`:host {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
31
31
|
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
32
32
|
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
33
33
|
}
|
|
34
|
-
/* デフォルトのスタイルを無効にする?*/button.svelte-
|
|
34
|
+
/* デフォルトのスタイルを無効にする?*/button.svelte-1swpyup {background:none;border:none;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;}
|
|
35
35
|
|
|
36
|
-
/* ボタン全体の基本スタイル
|
|
37
|
-
|
|
36
|
+
/* ボタン全体の基本スタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup,
|
|
37
|
+
[data-nostr-share="nostr-share-mini"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;border:1px solid var(--button1-border-color);cursor:pointer;transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--icon-size);height:var(--icon-size);margin:auto;padding:4px;border-radius:50%;border:none;background-color:transparent;}
|
|
38
38
|
|
|
39
|
-
/* ボタンスタイル
|
|
39
|
+
/* ボタンスタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup {padding:6px 16px;margin:4px;font-weight:bold;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-button"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-button"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
40
40
|
|
|
41
|
-
/* テキスト用スタイル */.nostrShare-text.svelte-
|
|
41
|
+
/* テキスト用スタイル */.nostrShare-text.svelte-1swpyup {margin-left:8px;font-size:medium;color:var(--button2-text-color);}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* グレー */box-shadow:0 0 6px rgba(0, 0, 0, 0.1);transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:active {background-color:#d1d5db;transform:scale(0.95);transition:all 0.2s ease-in-out;}
|
|
42
42
|
|
|
43
|
-
/* miniスタイル
|
|
44
|
-
/* テキスト用スタイル */.nostrShare-text-mini.svelte-
|
|
43
|
+
/* miniスタイル */[data-nostr-share="nostr-share-mini"].svelte-1swpyup {padding:2px 6px;margin:2px;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
44
|
+
/* テキスト用スタイル */.nostrShare-text-mini.svelte-1swpyup {margin-left:4px;font-size:small;font-weight:bold;color:var(--button2-text-color);}`};function fr(t,e){Kt(e,!0),pe(t,On);let r=M(e,"data-url",7),n=M(e,"data-text",7),s=M(e,"data-title",7),l=M(e,"data-type",7,"default"),o=M(e,"icon-size",7,28),i=M(e,"class",7),u=M(e,"data-style",7),f=Dr(!1);const _=()=>{Dt(f,!1)},a=typeof o()=="string"?parseInt(o(),10):o();let c=ae(()=>u()?"":l()==="icon"?"nostr-share-icon":l()==="mini"?"nostr-share-mini":"nostr-share-button");var v=An(),d=De(v);d.__click=[Sn,f];var y=Lt(d);dn(y,e,"default",{},h=>{var w=Nn(),U=De(w);{var E=A=>{me(A,{size:24})},T=A=>{var pt=ae(()=>l()==="icon"?a:28);me(A,{get size(){return D(pt)}})};_e(U,A=>{l()==="mini"?A(E):A(T,!1)})}var rt=jt(U,2);{var zt=A=>{var pt=Cn();Ft(()=>ur(pt,`${(l()==="mini"?"nostrShare-text-mini":"nostrShare-text")??""} svelte-1swpyup`)),lt(A,pt)};_e(rt,A=>{l()!=="icon"&&A(zt)})}lt(h,w)}),$t(d);var C=jt(d,2);{var S=h=>{be(h,{handleClose:_,get url(){return r()},get text(){return n()},get shareTitle(){return s()}})};_e(C,h=>{D(f)&&h(S)})}return Ft(()=>{ur(d,`${i()??""} svelte-1swpyup`),_t(d,"data-nostr-share",D(c)),_t(d,"style",u()||"")}),lt(t,v),Wt({get"data-url"(){return r()},set"data-url"(h){r(h),N()},get"data-text"(){return n()},set"data-text"(h){n(h),N()},get"data-title"(){return s()},set"data-title"(h){s(h),N()},get"data-type"(){return l()},set"data-type"(h="default"){l(h),N()},get"icon-size"(){return o()},set"icon-size"(h=28){o(h),N()},get class(){return i()},set class(h){i(h),N()},get"data-style"(){return u()},set"data-style"(h){u(h),N()}})}rr(["click"]),customElements.define("nostr-share",ge(fr,{"data-url":{},"data-text":{},"data-title":{},"data-type":{},"icon-size":{},class:{},"data-style":{}},["default"],[],!0)),g.Dialog=be,g.NostrShare=fr,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|