diff --git a/dist/assets/index-Df8PZjR3.js b/dist/assets/index-D-MshEYx.js similarity index 87% rename from dist/assets/index-Df8PZjR3.js rename to dist/assets/index-D-MshEYx.js index 4ff597e..5312bdf 100644 --- a/dist/assets/index-Df8PZjR3.js +++ b/dist/assets/index-D-MshEYx.js @@ -14,4 +14,4 @@ * @vue/runtime-dom v3.4.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const Ll="http://www.w3.org/2000/svg",Al="http://www.w3.org/1998/Math/MathML",Ne=typeof document<"u"?document:null,Ds=Ne&&Ne.createElement("template"),Ol={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Ne.createElementNS(Ll,e):t==="mathml"?Ne.createElementNS(Al,e):n?Ne.createElement(e,{is:n}):Ne.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Ne.createTextNode(e),createComment:e=>Ne.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ne.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Ds.innerHTML=s==="svg"?`${e}`:s==="mathml"?`${e}`:e;const c=Ds.content;if(s==="svg"||s==="mathml"){const a=c.firstChild;for(;a.firstChild;)c.appendChild(a.firstChild);c.removeChild(a)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Be="transition",Et="animation",wt=Symbol("_vtc"),us=(e,{slots:t})=>El(wi,go(e),t);us.displayName="Transition";const _o={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Pl=us.props=le({},Hr,_o),st=(e,t=[])=>{I(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vs=e=>e?I(e)?e.some(t=>t.length>1):e.length>1:!1;function go(e){const t={};for(const A in e)A in _o||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:d=i,appearToClass:f=c,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:x=`${n}-leave-active`,leaveToClass:P=`${n}-leave-to`}=e,j=Ml(r),$=j&&j[0],k=j&&j[1],{onBeforeEnter:U,onEnter:z,onEnterCancelled:R,onLeave:w,onLeaveCancelled:S,onBeforeAppear:p=U,onAppear:_e=z,onAppearCancelled:ce=R}=t,B=(A,Y,ae)=>{De(A,Y?f:c),De(A,Y?d:i),ae&&ae()},G=(A,Y)=>{A._isLeaving=!1,De(A,_),De(A,P),De(A,x),Y&&Y()},Q=A=>(Y,ae)=>{const Qe=A?_e:z,oe=()=>B(Y,A,ae);st(Qe,[Y,oe]),Us(()=>{De(Y,A?a:o),Fe(Y,A?f:c),Vs(Qe)||Ks(Y,s,$,oe)})};return le(t,{onBeforeEnter(A){st(U,[A]),Fe(A,o),Fe(A,i)},onBeforeAppear(A){st(p,[A]),Fe(A,a),Fe(A,d)},onEnter:Q(!1),onAppear:Q(!0),onLeave(A,Y){A._isLeaving=!0;const ae=()=>G(A,Y);Fe(A,_),Fe(A,x),bo(),Us(()=>{A._isLeaving&&(De(A,_),Fe(A,P),Vs(w)||Ks(A,s,k,ae))}),st(w,[A,ae])},onEnterCancelled(A){B(A,!1),st(R,[A])},onAppearCancelled(A){B(A,!0),st(ce,[A])},onLeaveCancelled(A){G(A),st(S,[A])}})}function Ml(e){if(e==null)return null;if(J(e))return[Ln(e.enter),Ln(e.leave)];{const t=Ln(e);return[t,t]}}function Ln(e){return Ro(e)}function Fe(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[wt]||(e[wt]=new Set)).add(t)}function De(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[wt];n&&(n.delete(t),n.size||(e[wt]=void 0))}function Us(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Rl=0;function Ks(e,t,n,s){const r=e._endId=++Rl,o=()=>{r===e._endId&&s()};if(n)return setTimeout(o,n);const{type:i,timeout:c,propCount:a}=mo(e,t);if(!i)return s();const d=i+"end";let f=0;const _=()=>{e.removeEventListener(d,x),o()},x=P=>{P.target===e&&++f>=a&&_()};setTimeout(()=>{f(n[j]||"").split(", "),r=s(`${Be}Delay`),o=s(`${Be}Duration`),i=Ws(r,o),c=s(`${Et}Delay`),a=s(`${Et}Duration`),d=Ws(c,a);let f=null,_=0,x=0;t===Be?i>0&&(f=Be,_=i,x=o.length):t===Et?d>0&&(f=Et,_=d,x=a.length):(_=Math.max(i,d),f=_>0?i>d?Be:Et:null,x=f?f===Be?o.length:a.length:0);const P=f===Be&&/\b(transform|all)(,|$)/.test(s(`${Be}Property`).toString());return{type:f,timeout:_,propCount:x,hasTransform:P}}function Ws(e,t){for(;e.lengthGs(n)+Gs(e[s])))}function Gs(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function bo(){return document.body.offsetHeight}function Il(e,t,n){const s=e[wt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const zs=Symbol("_vod"),$l=Symbol("_vsh"),Fl=Symbol(""),Nl=/(^|;)\s*display\s*:/;function kl(e,t,n){const s=e.style,r=se(n);let o=!1;if(n&&!r){if(t)if(se(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&en(s,c,"")}else for(const i in t)n[i]==null&&en(s,i,"");for(const i in n)i==="display"&&(o=!0),en(s,i,n[i])}else if(r){if(t!==n){const i=s[Fl];i&&(n+=";"+i),s.cssText=n,o=Nl.test(n)}}else t&&e.removeAttribute("style");zs in e&&(e[zs]=o?s.display:"",e[$l]&&(s.display="none"))}const Zs=/\s*!important$/;function en(e,t,n){if(I(n))n.forEach(s=>en(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Hl(e,t);Zs.test(n)?e.setProperty(dt(s),n.replace(Zs,""),"important"):e[s]=n}}const qs=["Webkit","Moz","ms"],An={};function Hl(e,t){const n=An[t];if(n)return n;let s=ut(t);if(s!=="filter"&&s in e)return An[t]=s;s=ur(s);for(let r=0;rOn||(Kl.then(()=>On=0),On=Date.now());function Gl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Ee(zl(s,n.value),t,5,[s])};return n.value=e,n.attached=Wl(),n}function zl(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Zl=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Il(e,s,i):t==="style"?kl(e,n,s):cn(t)?Kn(t)||Vl(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ql(e,t,s,i))?(jl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ys(e,t,s,i,o,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ys(e,t,s,i))};function ql(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&er(t)&&N(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return er(t)&&se(n)?!1:t in e}const yo=new WeakMap,vo=new WeakMap,ln=Symbol("_moveCb"),tr=Symbol("_enterCb"),wo={name:"TransitionGroup",props:le({},Pl,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=fo(),s=kr();let r,o;return Vr(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!tc(r[0].el,n.vnode.el,i))return;r.forEach(Ql),r.forEach(Xl);const c=r.filter(ec);bo(),c.forEach(a=>{const d=a.el,f=d.style;Fe(d,i),f.transform=f.webkitTransform=f.transitionDuration="";const _=d[ln]=x=>{x&&x.target!==d||(!x||/transform$/.test(x.propertyName))&&(d.removeEventListener("transitionend",_),d[ln]=null,De(d,i))};d.addEventListener("transitionend",_)})}),()=>{const i=V(e),c=go(i);let a=i.tag||me;if(r=[],o)for(let d=0;ddelete e.mode;wo.props;const Yl=wo;function Ql(e){const t=e.el;t[ln]&&t[ln](),t[tr]&&t[tr]()}function Xl(e){vo.set(e,e.el.getBoundingClientRect())}function ec(e){const t=yo.get(e),n=vo.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${r}px)`,o.transitionDuration="0s",e}}function tc(e,t,n){const s=e.cloneNode(),r=e[wt];r&&r.forEach(c=>{c.split(/\s+/).forEach(a=>a&&s.classList.remove(a))}),n.split(/\s+/).forEach(c=>c&&s.classList.add(c)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:i}=mo(s);return o.removeChild(s),i}const nc=le({patchProp:Zl},Ol);let nr;function sc(){return nr||(nr=Ji(nc))}const rc=(...e)=>{const t=sc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ic(s);if(!r)return;const o=t._component;!N(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,oc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function oc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ic(e){return se(e)?document.querySelector(e):e}var lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cc=window.device,y={},Vn=[];window.device=y;var kt=window.document.documentElement,ac=window.navigator.userAgent.toLowerCase(),sr=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"];y.macos=function(){return te("mac")};y.ios=function(){return y.iphone()||y.ipod()||y.ipad()};y.iphone=function(){return!y.windows()&&te("iphone")};y.ipod=function(){return te("ipod")};y.ipad=function(){var e=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;return te("ipad")||e};y.android=function(){return!y.windows()&&te("android")};y.androidPhone=function(){return y.android()&&te("mobile")};y.androidTablet=function(){return y.android()&&!te("mobile")};y.blackberry=function(){return te("blackberry")||te("bb10")};y.blackberryPhone=function(){return y.blackberry()&&!te("tablet")};y.blackberryTablet=function(){return y.blackberry()&&te("tablet")};y.windows=function(){return te("windows")};y.windowsPhone=function(){return y.windows()&&te("phone")};y.windowsTablet=function(){return y.windows()&&te("touch")&&!y.windowsPhone()};y.fxos=function(){return(te("(mobile")||te("(tablet"))&&te(" rv:")};y.fxosPhone=function(){return y.fxos()&&te("mobile")};y.fxosTablet=function(){return y.fxos()&&te("tablet")};y.meego=function(){return te("meego")};y.cordova=function(){return window.cordova&&location.protocol==="file:"};y.nodeWebkit=function(){return lc(window.process)==="object"};y.mobile=function(){return y.androidPhone()||y.iphone()||y.ipod()||y.windowsPhone()||y.blackberryPhone()||y.fxosPhone()||y.meego()};y.tablet=function(){return y.ipad()||y.androidTablet()||y.blackberryTablet()||y.windowsTablet()||y.fxosTablet()};y.desktop=function(){return!y.tablet()&&!y.mobile()};y.television=function(){for(var e=0;e1};y.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?fs(screen.orientation.type,"landscape"):y.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?Math.abs(window.orientation)===90:window.innerHeight/window.innerWidth<1};y.noConflict=function(){return window.device=cc,this};function fs(e,t){return e.indexOf(t)!==-1}function te(e){return fs(ac,e)}function xo(e){return kt.className.match(new RegExp(e,"i"))}function ne(e){var t=null;xo(e)||(t=kt.className.replace(/^\s+|\s+$/g,""),kt.className=t+" "+e)}function rr(e){xo(e)&&(kt.className=kt.className.replace(" "+e,""))}y.ios()?y.ipad()?ne("ios ipad tablet"):y.iphone()?ne("ios iphone mobile"):y.ipod()&&ne("ios ipod mobile"):y.macos()?ne("macos desktop"):y.android()?y.androidTablet()?ne("android tablet"):ne("android mobile"):y.blackberry()?y.blackberryTablet()?ne("blackberry tablet"):ne("blackberry mobile"):y.windows()?y.windowsTablet()?ne("windows tablet"):y.windowsPhone()?ne("windows mobile"):ne("windows desktop"):y.fxos()?y.fxosTablet()?ne("fxos tablet"):ne("fxos mobile"):y.meego()?ne("meego mobile"):y.nodeWebkit()?ne("node-webkit"):y.television()?ne("television"):y.desktop()&&ne("desktop");y.cordova()&&ne("cordova");function tn(){y.landscape()?(rr("portrait"),ne("landscape"),or("landscape")):(rr("landscape"),ne("portrait"),or("portrait")),Co()}function or(e){for(var t=0;t',5),vc=[yc],wc={key:0,xmlns:"http://www.w3.org/2000/svg",width:"30px",height:"30px",viewBox:"0 0 16 16",fill:"none"},xc=uo('',2),Cc=[xc],Tc={key:1,height:"30px",width:"30px",version:"1.1",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg","xmlns:sketch":"http://www.bohemiancoding.com/sketch/ns","xmlns:xlink":"http://www.w3.org/1999/xlink"},Ec=W("title",null,null,-1),Sc=W("desc",null,null,-1),Lc=W("defs",null,null,-1),Ac=W("g",{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"},[W("g",{fill:"#FFFFFF",id:"Core",transform:"translate(-215.000000, -257.000000)"},[W("g",{id:"fullscreen",transform:"translate(215.000000, 257.000000)"},[W("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",id:"Shape"})])])],-1),Oc=[Ec,Sc,Lc,Ac],Pc={class:"notifications h-full flex flex-col justify-end"},Mc={class:"flex justify-between"},Rc={class:"flex items-center"},Ic={key:1,class:"notify-pill"},$c={key:2,class:"notify-pill"},Fc={key:3,class:"notify-pill"},Nc={key:4,class:"notify-pill"},kc={class:"font-bold text-xl mt-1"},Hc={class:"text-lg"},jc={__name:"NotificationFeed",setup(e){const t=Ae([]),n=Ae(null),s=Ae(null),r=Ae(!1),o=Ae(!1),i=new URL(window.location.href),c=i.searchParams.get("bearer"),a=i.searchParams.get("debug"),d=i.searchParams.get("gfm")??"from-home-simulator-to-real-racing";Ht(()=>{n.value=document.querySelector(".top")});async function f(R){if(await t.value.push(R),n.value.scrollTo({top:n.value.scrollHeight,behavior:"smooth"}),r.value){s.value.currentTime=0,s.value.play();var w=new SpeechSynthesisUtterance(R.tts);w.pitch=1,w.rate=1,window.speechSynthesis.speak(w)}}function _(){r.value=!r.value,r.value&&s.value.play()}function x(){o.value=!o.value,document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()}let P=0,j="https://corsproxy.io/?"+encodeURIComponent(`https://gateway.gofundme.com/web-gateway/v1/feed/${d}/donations?limit=10`);setInterval(()=>{fetch(j+encodeURIComponent("&t="+Date.now())).then(R=>R.json()).then(R=>{for(P!=0&&R.references.donations.reverse(),k=0;kw.json()).then(w=>console.log(w))}const z=function(R){const w=JSON.parse(R.data);switch(w.metadata.message_type){case"session_welcome":k==0?U(w.payload.session.id):$[k-1].close();break;case"session_reconnect":k++,$[k]=new WebSocket(w.payload.session.reconnect_url),console.log("Reconnecting to "+w.payload.session.reconnect_url);break;case"notification":let S=w.payload.event.notice_type,p={id:w.metadata.message_id,user:w.payload.event.chatter_user_name,text:w.payload.event.message.text??"",type:w.payload.event.notice_type};switch(["sub","resub","sub_gift","community_sub_gift"].includes(S)&&(p.tier=w.payload.event[S].sub_tier/1e3),["sub","resub"].includes(S)&&(p.is_prime=w.payload.event[S].is_prime,p.color="-green-600"),["sub_gift","community_sub_gift"].includes(S)&&(p.user_total=w.payload.event[S].cumulative_total??0,p.color="-orange-600"),w.payload.event.notice_type){case"sub":p.nice_name="Sub",p.tts=`${p.user} subbed at tier ${p.tier}: ${p.text}`;break;case"resub":p.nice_name="ReSub",p.months=w.payload.event[S].cumulative_months,p.tts=`${p.user} resubbed at tier ${p.tier}, total ${p.months} months: ${p.text}`;break;case"sub_gift":p.nice_name="Gift x1",p.recipient=w.payload.event[S].recipient_user_name,p.exclude=!!w.payload.event[S].community_gift_id,p.tts=`${p.user} gifted a tier ${p.tier} sub to ${p.recipient}`;break;case"community_sub_gift":p.type="sub_gift",p.nice_name="Gift x"+w.payload.event[S].total,p.text="Gifted "+w.payload.event[S].total+" subs",p.tts=`${p.user} gifted ${w.payload.event[S].total} subs`;break;case"raid":p.color="-purple-600",p.nice_name="Raid x"+w.payload.event[S].viewer_count,p.raider=w.payload.event[S].user_name,p.tts=`${p.raider} raided with ${w.payload.event[S].viewer_count} viewers`;break}p.exclude||f(p);break}};if($[k].onmessage=z,a){let R=[{metadata:{message_id:"GD60uGl4b-rsculGOvnG3CbfWub8sU0-kLka5QQTklE=",message_type:"notification",message_timestamp:"2024-09-02T16:45:07.795455639Z",subscription_type:"channel.chat.notification",subscription_version:"1"},payload:{subscription:{id:"8bfaa271-dacf-45ad-9252-82961b8e4558",status:"enabled",type:"channel.chat.notification",version:"1",condition:{broadcaster_user_id:"171093413",user_id:"54096715"},transport:{method:"websocket",session_id:"AgoQZGprB1c1S96FME9t0ZuU4hIGY2VsbC1j"},created_at:"2024-09-02T16:42:14.02277498Z",cost:0},event:{broadcaster_user_id:"171093413",broadcaster_user_login:"pablogz205",broadcaster_user_name:"PabloGz205",source_broadcaster_user_id:null,source_broadcaster_user_login:null,source_broadcaster_user_name:null,chatter_user_id:"54492353",chatter_user_login:"keepcalmcallsoul",chatter_user_name:"keepcalmcallsoul",chatter_is_anonymous:!1,color:"#8A2BE2",badges:[{set_id:"subscriber",id:"9",info:"9"}],source_badges:null,system_message:"keepcalmcallsoul subscribed at Tier 1. They've subscribed for 9 months!",message_id:"d6deea58-ce6e-4217-905d-67670369b628",source_message_id:null,message:{text:"",fragments:[{type:"text",text:"what do you think about the mclaren?",cheermote:null,emote:null,mention:null}]},notice_type:"resub",sub:null,resub:{cumulative_months:9,duration_months:9,streak_months:null,sub_tier:"1000",is_prime:!1,is_gift:!1,gifter_is_anonymous:null,gifter_user_id:null,gifter_user_name:null,gifter_user_login:null},sub_gift:null,community_sub_gift:null,gift_paid_upgrade:null,prime_paid_upgrade:null,pay_it_forward:null,raid:null,unraid:null,announcement:null,bits_badge_tier:null,charity_donation:null,shared_chat_sub:null,shared_chat_resub:null,shared_chat_sub_gift:null,shared_chat_community_sub_gift:null,shared_chat_gift_paid_upgrade:null,shared_chat_prime_paid_upgrade:null,shared_chat_pay_it_forward:null,shared_chat_raid:null,shared_chat_announcement:null}}},{metadata:{message_id:"GD60uGl4b-rsculGOvnG3CbfWub8sU0-kLka5QQTklE=",message_type:"notification",message_timestamp:"2024-09-02T16:45:07.795455639Z",subscription_type:"channel.chat.notification",subscription_version:"1"},payload:{subscription:{id:"8bfaa271-dacf-45ad-9252-82961b8e4558",status:"enabled",type:"channel.chat.notification",version:"1",condition:{broadcaster_user_id:"171093413",user_id:"54096715"},transport:{method:"websocket",session_id:"AgoQZGprB1c1S96FME9t0ZuU4hIGY2VsbC1j"},created_at:"2024-09-02T16:42:14.02277498Z",cost:0},event:{broadcaster_user_id:"171093413",broadcaster_user_login:"pablogz205",broadcaster_user_name:"PabloGz205",source_broadcaster_user_id:null,source_broadcaster_user_login:null,source_broadcaster_user_name:null,chatter_user_id:"54492353",chatter_user_login:"keepcalmcallsoul",chatter_user_name:"keepcalmcallsoul",chatter_is_anonymous:!1,color:"#8A2BE2",badges:[{set_id:"subscriber",id:"9",info:"9"}],source_badges:null,system_message:"keepcalmcallsoul subscribed at Tier 1. They've subscribed for 9 months!",message_id:"d6deea58-ce6e-4217-905d-67670369b628",source_message_id:null,message:{text:"poggy doggy",fragments:[{type:"text",text:"what do you think about the mclaren?",cheermote:null,emote:null,mention:null}]},notice_type:"resub",sub:null,resub:{cumulative_months:9,duration_months:9,streak_months:null,sub_tier:"1000",is_prime:!1,is_gift:!1,gifter_is_anonymous:null,gifter_user_id:null,gifter_user_name:null,gifter_user_login:null},sub_gift:null,community_sub_gift:null,gift_paid_upgrade:null,prime_paid_upgrade:null,pay_it_forward:null,raid:null,unraid:null,announcement:null,bits_badge_tier:null,charity_donation:null,shared_chat_sub:null,shared_chat_resub:null,shared_chat_sub_gift:null,shared_chat_community_sub_gift:null,shared_chat_gift_paid_upgrade:null,shared_chat_prime_paid_upgrade:null,shared_chat_pay_it_forward:null,shared_chat_raid:null,shared_chat_announcement:null}}},{metadata:{message_id:"andpZpHdH68c9LktLSFNbxmK2O0HT0430OD61ytoXXA=",message_type:"notification",message_timestamp:"2024-09-02T17:13:31.221692812Z",subscription_type:"channel.chat.notification",subscription_version:"1"},payload:{subscription:{id:"8bfaa271-dacf-45ad-9252-82961b8e4558",status:"enabled",type:"channel.chat.notification",version:"1",condition:{broadcaster_user_id:"171093413",user_id:"54096715"},transport:{method:"websocket",session_id:"AgoQZGprB1c1S96FME9t0ZuU4hIGY2VsbC1j"},created_at:"2024-09-02T16:42:14.02277498Z",cost:0},event:{broadcaster_user_id:"171093413",broadcaster_user_login:"pablogz205",broadcaster_user_name:"PabloGz205",source_broadcaster_user_id:null,source_broadcaster_user_login:null,source_broadcaster_user_name:null,chatter_user_id:"54096715",chatter_user_login:"deleterr",chatter_user_name:"Deleterr",chatter_is_anonymous:!1,color:"#28D74B",badges:[{set_id:"moderator",id:"1",info:""},{set_id:"subscriber",id:"9",info:"9"},{set_id:"sub-gifter",id:"10",info:""}],source_badges:null,system_message:"Deleterr gifted a Tier 1 sub to JmsTV! They have given 11 Gift Subs in the channel!",message_id:"0001ee46-e128-4435-848c-ad24401abe86",source_message_id:null,message:{text:"",fragments:[]},notice_type:"sub_gift",sub:null,resub:null,sub_gift:{duration_months:1,cumulative_total:11,recipient_user_id:"108600558",recipient_user_name:"JmsTV",recipient_user_login:"jmstv",sub_tier:"1000",community_gift_id:null},community_sub_gift:null,gift_paid_upgrade:null,prime_paid_upgrade:null,pay_it_forward:null,raid:null,unraid:null,announcement:null,bits_badge_tier:null,charity_donation:null,shared_chat_sub:null,shared_chat_resub:null,shared_chat_sub_gift:null,shared_chat_community_sub_gift:null,shared_chat_gift_paid_upgrade:null,shared_chat_prime_paid_upgrade:null,shared_chat_pay_it_forward:null,shared_chat_raid:null,shared_chat_announcement:null}}}];setInterval(()=>{for(let w of R)if(!(Math.random()>.25))switch(w.metadata.message_type){case"session_welcome":k==0?U(w.payload.session.id):$[k-1].close();break;case"session_reconnect":k++,$[k]=new WebSocket(w.payload.session.reconnect_url);break;case"notification":let S=w.payload.event.notice_type,p={id:w.metadata.message_id,type:w.payload.event.notice_type,user:w.payload.event.chatter_user_name,text:w.payload.event.message.text??""};switch(["sub","resub","sub_gift","community_sub_gift"].includes(S)&&(p.tier=w.payload.event[S].sub_tier/1e3),["sub","resub"].includes(S)&&(p.is_prime=w.payload.event[S].is_prime,p.color="-green-600"),["sub_gift","community_sub_gift"].includes(S)&&(p.user_total=w.payload.event[S].cumulative_total??0,p.color="-orange-600"),w.payload.event.notice_type){case"sub":p.nice_name="Sub",p.tts=`${p.user} subbed at tier ${p.tier}: ${p.text}`;break;case"resub":p.nice_name="ReSub",p.months=w.payload.event[S].cumulative_months,p.tts=`${p.user} resubbed at tier ${p.tier}, total ${p.months} months: ${p.text}`;break;case"sub_gift":p.nice_name="Gift x1",p.recipient=w.payload.event[S].recipient_user_name,p.exclude=!!w.payload.event[S].community_gift_id,p.tts=`${p.user} gifted a tier ${p.tier} sub to ${p.recipient}`;break;case"community_sub_gift":p.type="sub_gift",p.nice_name="Gift x"+w.payload.event[S].total,p.text="Gifted "+w.payload.event[S].total+" subs",p.tts=`${p.user} gifted ${w.payload.event[S].total} subs`;break;case"raid":p.color="-purple-600",p.nice_name="Raid x"+w.payload.event[S].viewer_count,p.raider=w.payload.event[S].user_name,p.tts=`${p.raider} raided with ${w.payload.event[S].viewer_count} viewers`;break}p.exclude||f(p);break}},3e3)}return(R,w)=>(ue(),pe(me,null,[W("audio",{controls:"",class:"hidden",ref_key:"notifyAudio",ref:s},[fc,ao(" Your browser does not support the audio element. ")],512),W("button",{onClick:_,class:"svg bg-purple-700 hover:bg-purple-800 text-white font-bold p-2 rounded-full absolute z-40 right-[55px] top-[10px] drop-shadow-lg"},[r.value?(ue(),pe("svg",dc,mc)):(ue(),pe("svg",bc,vc))]),W("button",{onClick:x,class:"svg bg-purple-700 hover:bg-purple-800 text-white font-bold rounded-full absolute top-[10px] right-[2px] p-2 cursor-pointer z-40"},[o.value?(ue(),pe("svg",wc,Cc)):(ue(),pe("svg",Tc,Oc))]),W("div",Pc,[re(Yl,{name:"notification",tag:"div"},{default:rs(()=>[(ue(!0),pe(me,null,Ri(t.value,S=>(ue(),pe("div",{key:S.id,class:Mt(["border"+S.color,"bg-slate-800 rounded-lg p-2 mb-3 w-full border-2"])},[W("div",Mc,[W("div",Rc,[S.nice_name?(ue(),pe("div",{key:0,class:Mt(["bg"+S.color,"notify-pill-nobg"])},rt(S.nice_name),3)):pt("",!0),S.tier?(ue(),pe("div",Ic,"Tier "+rt(S.tier),1)):pt("",!0),S.months?(ue(),pe("div",$c,rt(S.months)+" months",1)):pt("",!0),S.is_prime?(ue(),pe("div",Fc,"Prime")):pt("",!0),S.user_total?(ue(),pe("div",Nc,rt(S.user_total)+" total",1)):pt("",!0)])]),W("div",kc,rt(S.raider||S.user),1),W("div",Hc,rt(S.text||(S.type=="sub_gift"?"Gifted to "+S.recipient:"")),1)],2))),128))]),_:1})])],64))}},Bc=["src"],Dc=W("svg",{width:"30px",height:"30px",class:"translate-y-[2px]",viewBox:"0 0 448 512",xmlns:"http://www.w3.org/2000/svg"},[W("path",{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"})],-1),Vc=[Dc],Uc={__name:"ChatFeed",setup(e){const t=Ae(""),n=Ae(null),s=Ae(!1),r=new URL(window.location.href),o=r.searchParams.get("channel")??"pablogz205",i=r.searchParams.get("size")??1,c=r.searchParams.get("font")??1;t.value=`https://www.giambaj.it/twitch/jchat/v2/?channel=${o}&size=${i}&font=${c}`,Ht(()=>{setInterval(()=>{Math.ceil(n.value.scrollTop)+n.value.clientHeight{s.value=!1},1e3)}return(d,f)=>(ue(),pe(me,null,[W("div",{class:"chat-scroll-container",ref_key:"chatScrollContainer",ref:n},[W("iframe",{class:"chat-frame",src:t.value},null,8,Bc)],512),re(us,{name:"slide-fade"},{default:rs(()=>[s.value?(ue(),pe("button",{key:0,onClick:a,class:"svg scroll-to-bottom-button bg-purple-700 hover:bg-purple-800 drop-shadow-lg rounded-full p-1 font-bold"},Vc)):pt("",!0)]),_:1})],64))}},Kc={class:"h-dvh"},Wc={class:"bottom"},Gc={__name:"App",setup(e){const t=Ae(null),n=Ae(null),s=Ae(null);return Ht(()=>{let r=!1,o=0;function i(f){r=!0,y.mobile()?y.landscape()?o=f.touches[0].clientX:o=f.touches[0].clientY:o=f.y}function c(f){y.mobile()?y.landscape()?o=f.touches[0].clientX:o=f.touches[0].clientY:o=f.y,r&&(y.mobile()&&y.landscape()?n.value.style.width=o-s.value.getBoundingClientRect().width/2+"px":n.value.style.height=o-s.value.getBoundingClientRect().height/2+"px",f.preventDefault())}function a(f){r=!1}s.value.addEventListener("mousedown",i),s.value.addEventListener("touchstart",i),t.value.addEventListener("mousemove",c),t.value.addEventListener("touchmove",c),t.value.addEventListener("mouseup",a),t.value.addEventListener("touchend",a),y.mobile()&&y.landscape()?n.value.style.width=window.innerWidth/2+"px":n.value.style.height=window.innerHeight/3+"px";let d=document.querySelector(".chat-scroll-container");d.scrollTop=d.scrollHeight,y.onChangeOrientation(f=>{y.mobile()&&(f==="landscape"?(n.value.scrollTop=n.value.scrollHeight,n.value.style.height="",n.value.style.width=window.innerHeight/2+"px"):(n.value.style.width="",n.value.style.height=window.innerWidth/3+"px"))})}),(r,o)=>(ue(),pe("main",Kc,[W("div",{class:"resizeable-container",ref_key:"containerRef",ref:t},[W("div",{class:"top flex-shrink-0 overflow-y-auto px-3",ref_key:"topRef",ref:n},[re(jc)],512),W("div",{class:"resize",ref_key:"resizeRef",ref:s},null,512),W("div",Wc,[re(Uc)])],512)]))}};rc(Gc).mount("#app"); +**/const Ll="http://www.w3.org/2000/svg",Al="http://www.w3.org/1998/Math/MathML",Ne=typeof document<"u"?document:null,Ds=Ne&&Ne.createElement("template"),Ol={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Ne.createElementNS(Ll,e):t==="mathml"?Ne.createElementNS(Al,e):n?Ne.createElement(e,{is:n}):Ne.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Ne.createTextNode(e),createComment:e=>Ne.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ne.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Ds.innerHTML=s==="svg"?`${e}`:s==="mathml"?`${e}`:e;const c=Ds.content;if(s==="svg"||s==="mathml"){const a=c.firstChild;for(;a.firstChild;)c.appendChild(a.firstChild);c.removeChild(a)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Be="transition",Et="animation",wt=Symbol("_vtc"),us=(e,{slots:t})=>El(wi,go(e),t);us.displayName="Transition";const _o={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Pl=us.props=le({},Hr,_o),st=(e,t=[])=>{I(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vs=e=>e?I(e)?e.some(t=>t.length>1):e.length>1:!1;function go(e){const t={};for(const A in e)A in _o||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:d=i,appearToClass:f=c,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:x=`${n}-leave-active`,leaveToClass:P=`${n}-leave-to`}=e,j=Ml(r),$=j&&j[0],k=j&&j[1],{onBeforeEnter:U,onEnter:z,onEnterCancelled:R,onLeave:w,onLeaveCancelled:S,onBeforeAppear:p=U,onAppear:_e=z,onAppearCancelled:ce=R}=t,B=(A,Y,ae)=>{De(A,Y?f:c),De(A,Y?d:i),ae&&ae()},G=(A,Y)=>{A._isLeaving=!1,De(A,_),De(A,P),De(A,x),Y&&Y()},Q=A=>(Y,ae)=>{const Qe=A?_e:z,oe=()=>B(Y,A,ae);st(Qe,[Y,oe]),Us(()=>{De(Y,A?a:o),Fe(Y,A?f:c),Vs(Qe)||Ks(Y,s,$,oe)})};return le(t,{onBeforeEnter(A){st(U,[A]),Fe(A,o),Fe(A,i)},onBeforeAppear(A){st(p,[A]),Fe(A,a),Fe(A,d)},onEnter:Q(!1),onAppear:Q(!0),onLeave(A,Y){A._isLeaving=!0;const ae=()=>G(A,Y);Fe(A,_),Fe(A,x),bo(),Us(()=>{A._isLeaving&&(De(A,_),Fe(A,P),Vs(w)||Ks(A,s,k,ae))}),st(w,[A,ae])},onEnterCancelled(A){B(A,!1),st(R,[A])},onAppearCancelled(A){B(A,!0),st(ce,[A])},onLeaveCancelled(A){G(A),st(S,[A])}})}function Ml(e){if(e==null)return null;if(J(e))return[Ln(e.enter),Ln(e.leave)];{const t=Ln(e);return[t,t]}}function Ln(e){return Ro(e)}function Fe(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[wt]||(e[wt]=new Set)).add(t)}function De(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[wt];n&&(n.delete(t),n.size||(e[wt]=void 0))}function Us(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Rl=0;function Ks(e,t,n,s){const r=e._endId=++Rl,o=()=>{r===e._endId&&s()};if(n)return setTimeout(o,n);const{type:i,timeout:c,propCount:a}=mo(e,t);if(!i)return s();const d=i+"end";let f=0;const _=()=>{e.removeEventListener(d,x),o()},x=P=>{P.target===e&&++f>=a&&_()};setTimeout(()=>{f(n[j]||"").split(", "),r=s(`${Be}Delay`),o=s(`${Be}Duration`),i=Ws(r,o),c=s(`${Et}Delay`),a=s(`${Et}Duration`),d=Ws(c,a);let f=null,_=0,x=0;t===Be?i>0&&(f=Be,_=i,x=o.length):t===Et?d>0&&(f=Et,_=d,x=a.length):(_=Math.max(i,d),f=_>0?i>d?Be:Et:null,x=f?f===Be?o.length:a.length:0);const P=f===Be&&/\b(transform|all)(,|$)/.test(s(`${Be}Property`).toString());return{type:f,timeout:_,propCount:x,hasTransform:P}}function Ws(e,t){for(;e.lengthGs(n)+Gs(e[s])))}function Gs(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function bo(){return document.body.offsetHeight}function Il(e,t,n){const s=e[wt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const zs=Symbol("_vod"),$l=Symbol("_vsh"),Fl=Symbol(""),Nl=/(^|;)\s*display\s*:/;function kl(e,t,n){const s=e.style,r=se(n);let o=!1;if(n&&!r){if(t)if(se(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&en(s,c,"")}else for(const i in t)n[i]==null&&en(s,i,"");for(const i in n)i==="display"&&(o=!0),en(s,i,n[i])}else if(r){if(t!==n){const i=s[Fl];i&&(n+=";"+i),s.cssText=n,o=Nl.test(n)}}else t&&e.removeAttribute("style");zs in e&&(e[zs]=o?s.display:"",e[$l]&&(s.display="none"))}const Zs=/\s*!important$/;function en(e,t,n){if(I(n))n.forEach(s=>en(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Hl(e,t);Zs.test(n)?e.setProperty(dt(s),n.replace(Zs,""),"important"):e[s]=n}}const qs=["Webkit","Moz","ms"],An={};function Hl(e,t){const n=An[t];if(n)return n;let s=ut(t);if(s!=="filter"&&s in e)return An[t]=s;s=ur(s);for(let r=0;rOn||(Kl.then(()=>On=0),On=Date.now());function Gl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Ee(zl(s,n.value),t,5,[s])};return n.value=e,n.attached=Wl(),n}function zl(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Zl=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Il(e,s,i):t==="style"?kl(e,n,s):cn(t)?Kn(t)||Vl(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ql(e,t,s,i))?(jl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ys(e,t,s,i,o,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ys(e,t,s,i))};function ql(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&er(t)&&N(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return er(t)&&se(n)?!1:t in e}const yo=new WeakMap,vo=new WeakMap,ln=Symbol("_moveCb"),tr=Symbol("_enterCb"),wo={name:"TransitionGroup",props:le({},Pl,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=fo(),s=kr();let r,o;return Vr(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!tc(r[0].el,n.vnode.el,i))return;r.forEach(Ql),r.forEach(Xl);const c=r.filter(ec);bo(),c.forEach(a=>{const d=a.el,f=d.style;Fe(d,i),f.transform=f.webkitTransform=f.transitionDuration="";const _=d[ln]=x=>{x&&x.target!==d||(!x||/transform$/.test(x.propertyName))&&(d.removeEventListener("transitionend",_),d[ln]=null,De(d,i))};d.addEventListener("transitionend",_)})}),()=>{const i=V(e),c=go(i);let a=i.tag||me;if(r=[],o)for(let d=0;ddelete e.mode;wo.props;const Yl=wo;function Ql(e){const t=e.el;t[ln]&&t[ln](),t[tr]&&t[tr]()}function Xl(e){vo.set(e,e.el.getBoundingClientRect())}function ec(e){const t=yo.get(e),n=vo.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${r}px)`,o.transitionDuration="0s",e}}function tc(e,t,n){const s=e.cloneNode(),r=e[wt];r&&r.forEach(c=>{c.split(/\s+/).forEach(a=>a&&s.classList.remove(a))}),n.split(/\s+/).forEach(c=>c&&s.classList.add(c)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:i}=mo(s);return o.removeChild(s),i}const nc=le({patchProp:Zl},Ol);let nr;function sc(){return nr||(nr=Ji(nc))}const rc=(...e)=>{const t=sc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ic(s);if(!r)return;const o=t._component;!N(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,oc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function oc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ic(e){return se(e)?document.querySelector(e):e}var lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cc=window.device,y={},Vn=[];window.device=y;var kt=window.document.documentElement,ac=window.navigator.userAgent.toLowerCase(),sr=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"];y.macos=function(){return te("mac")};y.ios=function(){return y.iphone()||y.ipod()||y.ipad()};y.iphone=function(){return!y.windows()&&te("iphone")};y.ipod=function(){return te("ipod")};y.ipad=function(){var e=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;return te("ipad")||e};y.android=function(){return!y.windows()&&te("android")};y.androidPhone=function(){return y.android()&&te("mobile")};y.androidTablet=function(){return y.android()&&!te("mobile")};y.blackberry=function(){return te("blackberry")||te("bb10")};y.blackberryPhone=function(){return y.blackberry()&&!te("tablet")};y.blackberryTablet=function(){return y.blackberry()&&te("tablet")};y.windows=function(){return te("windows")};y.windowsPhone=function(){return y.windows()&&te("phone")};y.windowsTablet=function(){return y.windows()&&te("touch")&&!y.windowsPhone()};y.fxos=function(){return(te("(mobile")||te("(tablet"))&&te(" rv:")};y.fxosPhone=function(){return y.fxos()&&te("mobile")};y.fxosTablet=function(){return y.fxos()&&te("tablet")};y.meego=function(){return te("meego")};y.cordova=function(){return window.cordova&&location.protocol==="file:"};y.nodeWebkit=function(){return lc(window.process)==="object"};y.mobile=function(){return y.androidPhone()||y.iphone()||y.ipod()||y.windowsPhone()||y.blackberryPhone()||y.fxosPhone()||y.meego()};y.tablet=function(){return y.ipad()||y.androidTablet()||y.blackberryTablet()||y.windowsTablet()||y.fxosTablet()};y.desktop=function(){return!y.tablet()&&!y.mobile()};y.television=function(){for(var e=0;e1};y.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?fs(screen.orientation.type,"landscape"):y.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?Math.abs(window.orientation)===90:window.innerHeight/window.innerWidth<1};y.noConflict=function(){return window.device=cc,this};function fs(e,t){return e.indexOf(t)!==-1}function te(e){return fs(ac,e)}function xo(e){return kt.className.match(new RegExp(e,"i"))}function ne(e){var t=null;xo(e)||(t=kt.className.replace(/^\s+|\s+$/g,""),kt.className=t+" "+e)}function rr(e){xo(e)&&(kt.className=kt.className.replace(" "+e,""))}y.ios()?y.ipad()?ne("ios ipad tablet"):y.iphone()?ne("ios iphone mobile"):y.ipod()&&ne("ios ipod mobile"):y.macos()?ne("macos desktop"):y.android()?y.androidTablet()?ne("android tablet"):ne("android mobile"):y.blackberry()?y.blackberryTablet()?ne("blackberry tablet"):ne("blackberry mobile"):y.windows()?y.windowsTablet()?ne("windows tablet"):y.windowsPhone()?ne("windows mobile"):ne("windows desktop"):y.fxos()?y.fxosTablet()?ne("fxos tablet"):ne("fxos mobile"):y.meego()?ne("meego mobile"):y.nodeWebkit()?ne("node-webkit"):y.television()?ne("television"):y.desktop()&&ne("desktop");y.cordova()&&ne("cordova");function tn(){y.landscape()?(rr("portrait"),ne("landscape"),or("landscape")):(rr("landscape"),ne("portrait"),or("portrait")),Co()}function or(e){for(var t=0;t',5),vc=[yc],wc={key:0,xmlns:"http://www.w3.org/2000/svg",width:"30px",height:"30px",viewBox:"0 0 16 16",fill:"none"},xc=uo('',2),Cc=[xc],Tc={key:1,height:"30px",width:"30px",version:"1.1",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg","xmlns:sketch":"http://www.bohemiancoding.com/sketch/ns","xmlns:xlink":"http://www.w3.org/1999/xlink"},Ec=W("title",null,null,-1),Sc=W("desc",null,null,-1),Lc=W("defs",null,null,-1),Ac=W("g",{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"},[W("g",{fill:"#FFFFFF",id:"Core",transform:"translate(-215.000000, -257.000000)"},[W("g",{id:"fullscreen",transform:"translate(215.000000, 257.000000)"},[W("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",id:"Shape"})])])],-1),Oc=[Ec,Sc,Lc,Ac],Pc={class:"notifications h-full flex flex-col justify-end"},Mc={class:"flex justify-between"},Rc={class:"flex items-center"},Ic={key:1,class:"notify-pill"},$c={key:2,class:"notify-pill"},Fc={key:3,class:"notify-pill"},Nc={key:4,class:"notify-pill"},kc={class:"font-bold text-xl mt-1"},Hc={class:"text-lg"},jc={__name:"NotificationFeed",setup(e){const t=Ae([]),n=Ae(null),s=Ae(null),r=Ae(!1),o=Ae(!1),i=new URL(window.location.href),c=i.searchParams.get("bearer"),a=i.searchParams.get("debug"),d=i.searchParams.get("gfm")??"from-home-simulator-to-real-racing";Ht(()=>{n.value=document.querySelector(".top")});async function f(R){if(await t.value.push(R),n.value.scrollTo({top:n.value.scrollHeight,behavior:"smooth"}),r.value){s.value.currentTime=0,s.value.play();var w=new SpeechSynthesisUtterance(R.tts);w.pitch=1,w.rate=1,window.speechSynthesis.speak(w)}}function _(){r.value=!r.value,r.value&&s.value.play()}function x(){o.value=!o.value,document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()}let P=0,j="https://corsproxy.io/?"+encodeURIComponent(`https://gateway.gofundme.com/web-gateway/v1/feed/${d}/donations?limit=10`);setInterval(()=>{fetch(j+encodeURIComponent("&t="+Date.now())).then(R=>R.json()).then(R=>{for(P!=0&&R.references.donations.reverse(),k=0;kw.json()).then(w=>console.log(w))}const z=function(R){const w=JSON.parse(R.data);switch(w.metadata.message_type){case"session_welcome":k==0?U(w.payload.session.id):$[k-1].close();break;case"session_reconnect":k++,$[k]=new WebSocket(w.payload.session.reconnect_url),console.log("Reconnecting to "+w.payload.session.reconnect_url);break;case"notification":let S=w.payload.event.notice_type,p={id:w.metadata.message_id,user:w.payload.event.chatter_user_name,text:w.payload.event.message.text??"",type:w.payload.event.notice_type};switch(["sub","resub","sub_gift","community_sub_gift"].includes(S)&&(p.tier=w.payload.event[S].sub_tier/1e3),["sub","resub"].includes(S)&&(p.is_prime=w.payload.event[S].is_prime,p.color="-green-600"),["sub_gift","community_sub_gift"].includes(S)&&(p.user_total=w.payload.event[S].cumulative_total??0,p.color="-orange-600"),w.payload.event.notice_type){case"sub":p.nice_name="Sub",p.tts=`${p.user} subbed at tier ${p.tier}: ${p.text}`;break;case"resub":p.nice_name="ReSub",p.months=w.payload.event[S].cumulative_months,p.tts=`${p.user} resubbed at tier ${p.tier}, total ${p.months} months: ${p.text}`;break;case"sub_gift":p.nice_name="Gift x1",p.recipient=w.payload.event[S].recipient_user_name,p.exclude=!!w.payload.event[S].community_gift_id,p.tts=`${p.user} gifted a tier ${p.tier} sub to ${p.recipient}`;break;case"community_sub_gift":p.type="sub_gift",p.nice_name="Gift x"+w.payload.event[S].total,p.text="Gifted "+w.payload.event[S].total+" subs",p.tts=`${p.user} gifted ${w.payload.event[S].total} subs`;break;case"raid":p.color="-purple-600",p.nice_name="Raid x"+w.payload.event[S].viewer_count,p.raider=w.payload.event[S].user_name+" raided with "+w.payload.event[S].viewer_count+" viewers",p.tts=`${p.raider} raided with ${w.payload.event[S].viewer_count} viewers`;break}p.exclude||f(p);break}};if($[k].onmessage=z,a){let R=[{metadata:{message_id:"GD60uGl4b-rsculGOvnG3CbfWub8sU0-kLka5QQTklE=",message_type:"notification",message_timestamp:"2024-09-02T16:45:07.795455639Z",subscription_type:"channel.chat.notification",subscription_version:"1"},payload:{subscription:{id:"8bfaa271-dacf-45ad-9252-82961b8e4558",status:"enabled",type:"channel.chat.notification",version:"1",condition:{broadcaster_user_id:"171093413",user_id:"54096715"},transport:{method:"websocket",session_id:"AgoQZGprB1c1S96FME9t0ZuU4hIGY2VsbC1j"},created_at:"2024-09-02T16:42:14.02277498Z",cost:0},event:{broadcaster_user_id:"171093413",broadcaster_user_login:"pablogz205",broadcaster_user_name:"PabloGz205",source_broadcaster_user_id:null,source_broadcaster_user_login:null,source_broadcaster_user_name:null,chatter_user_id:"54492353",chatter_user_login:"keepcalmcallsoul",chatter_user_name:"keepcalmcallsoul",chatter_is_anonymous:!1,color:"#8A2BE2",badges:[{set_id:"subscriber",id:"9",info:"9"}],source_badges:null,system_message:"keepcalmcallsoul subscribed at Tier 1. They've subscribed for 9 months!",message_id:"d6deea58-ce6e-4217-905d-67670369b628",source_message_id:null,message:{text:"",fragments:[{type:"text",text:"what do you think about the mclaren?",cheermote:null,emote:null,mention:null}]},notice_type:"resub",sub:null,resub:{cumulative_months:9,duration_months:9,streak_months:null,sub_tier:"1000",is_prime:!1,is_gift:!1,gifter_is_anonymous:null,gifter_user_id:null,gifter_user_name:null,gifter_user_login:null},sub_gift:null,community_sub_gift:null,gift_paid_upgrade:null,prime_paid_upgrade:null,pay_it_forward:null,raid:null,unraid:null,announcement:null,bits_badge_tier:null,charity_donation:null,shared_chat_sub:null,shared_chat_resub:null,shared_chat_sub_gift:null,shared_chat_community_sub_gift:null,shared_chat_gift_paid_upgrade:null,shared_chat_prime_paid_upgrade:null,shared_chat_pay_it_forward:null,shared_chat_raid:null,shared_chat_announcement:null}}},{metadata:{message_id:"GD60uGl4b-rsculGOvnG3CbfWub8sU0-kLka5QQTklE=",message_type:"notification",message_timestamp:"2024-09-02T16:45:07.795455639Z",subscription_type:"channel.chat.notification",subscription_version:"1"},payload:{subscription:{id:"8bfaa271-dacf-45ad-9252-82961b8e4558",status:"enabled",type:"channel.chat.notification",version:"1",condition:{broadcaster_user_id:"171093413",user_id:"54096715"},transport:{method:"websocket",session_id:"AgoQZGprB1c1S96FME9t0ZuU4hIGY2VsbC1j"},created_at:"2024-09-02T16:42:14.02277498Z",cost:0},event:{broadcaster_user_id:"171093413",broadcaster_user_login:"pablogz205",broadcaster_user_name:"PabloGz205",source_broadcaster_user_id:null,source_broadcaster_user_login:null,source_broadcaster_user_name:null,chatter_user_id:"54492353",chatter_user_login:"keepcalmcallsoul",chatter_user_name:"keepcalmcallsoul",chatter_is_anonymous:!1,color:"#8A2BE2",badges:[{set_id:"subscriber",id:"9",info:"9"}],source_badges:null,system_message:"keepcalmcallsoul subscribed at Tier 1. They've subscribed for 9 months!",message_id:"d6deea58-ce6e-4217-905d-67670369b628",source_message_id:null,message:{text:"poggy doggy",fragments:[{type:"text",text:"what do you think about the mclaren?",cheermote:null,emote:null,mention:null}]},notice_type:"resub",sub:null,resub:{cumulative_months:9,duration_months:9,streak_months:null,sub_tier:"1000",is_prime:!1,is_gift:!1,gifter_is_anonymous:null,gifter_user_id:null,gifter_user_name:null,gifter_user_login:null},sub_gift:null,community_sub_gift:null,gift_paid_upgrade:null,prime_paid_upgrade:null,pay_it_forward:null,raid:null,unraid:null,announcement:null,bits_badge_tier:null,charity_donation:null,shared_chat_sub:null,shared_chat_resub:null,shared_chat_sub_gift:null,shared_chat_community_sub_gift:null,shared_chat_gift_paid_upgrade:null,shared_chat_prime_paid_upgrade:null,shared_chat_pay_it_forward:null,shared_chat_raid:null,shared_chat_announcement:null}}},{metadata:{message_id:"andpZpHdH68c9LktLSFNbxmK2O0HT0430OD61ytoXXA=",message_type:"notification",message_timestamp:"2024-09-02T17:13:31.221692812Z",subscription_type:"channel.chat.notification",subscription_version:"1"},payload:{subscription:{id:"8bfaa271-dacf-45ad-9252-82961b8e4558",status:"enabled",type:"channel.chat.notification",version:"1",condition:{broadcaster_user_id:"171093413",user_id:"54096715"},transport:{method:"websocket",session_id:"AgoQZGprB1c1S96FME9t0ZuU4hIGY2VsbC1j"},created_at:"2024-09-02T16:42:14.02277498Z",cost:0},event:{broadcaster_user_id:"171093413",broadcaster_user_login:"pablogz205",broadcaster_user_name:"PabloGz205",source_broadcaster_user_id:null,source_broadcaster_user_login:null,source_broadcaster_user_name:null,chatter_user_id:"54096715",chatter_user_login:"deleterr",chatter_user_name:"Deleterr",chatter_is_anonymous:!1,color:"#28D74B",badges:[{set_id:"moderator",id:"1",info:""},{set_id:"subscriber",id:"9",info:"9"},{set_id:"sub-gifter",id:"10",info:""}],source_badges:null,system_message:"Deleterr gifted a Tier 1 sub to JmsTV! They have given 11 Gift Subs in the channel!",message_id:"0001ee46-e128-4435-848c-ad24401abe86",source_message_id:null,message:{text:"",fragments:[]},notice_type:"sub_gift",sub:null,resub:null,sub_gift:{duration_months:1,cumulative_total:11,recipient_user_id:"108600558",recipient_user_name:"JmsTV",recipient_user_login:"jmstv",sub_tier:"1000",community_gift_id:null},community_sub_gift:null,gift_paid_upgrade:null,prime_paid_upgrade:null,pay_it_forward:null,raid:null,unraid:null,announcement:null,bits_badge_tier:null,charity_donation:null,shared_chat_sub:null,shared_chat_resub:null,shared_chat_sub_gift:null,shared_chat_community_sub_gift:null,shared_chat_gift_paid_upgrade:null,shared_chat_prime_paid_upgrade:null,shared_chat_pay_it_forward:null,shared_chat_raid:null,shared_chat_announcement:null}}}];setInterval(()=>{for(let w of R)if(!(Math.random()>.25))switch(w.metadata.message_type){case"session_welcome":k==0?U(w.payload.session.id):$[k-1].close();break;case"session_reconnect":k++,$[k]=new WebSocket(w.payload.session.reconnect_url);break;case"notification":let S=w.payload.event.notice_type,p={id:w.metadata.message_id,type:w.payload.event.notice_type,user:w.payload.event.chatter_user_name,text:w.payload.event.message.text??""};switch(["sub","resub","sub_gift","community_sub_gift"].includes(S)&&(p.tier=w.payload.event[S].sub_tier/1e3),["sub","resub"].includes(S)&&(p.is_prime=w.payload.event[S].is_prime,p.color="-green-600"),["sub_gift","community_sub_gift"].includes(S)&&(p.user_total=w.payload.event[S].cumulative_total??0,p.color="-orange-600"),w.payload.event.notice_type){case"sub":p.nice_name="Sub",p.tts=`${p.user} subbed at tier ${p.tier}: ${p.text}`;break;case"resub":p.nice_name="ReSub",p.months=w.payload.event[S].cumulative_months,p.tts=`${p.user} resubbed at tier ${p.tier}, total ${p.months} months: ${p.text}`;break;case"sub_gift":p.nice_name="Gift x1",p.recipient=w.payload.event[S].recipient_user_name,p.exclude=!!w.payload.event[S].community_gift_id,p.tts=`${p.user} gifted a tier ${p.tier} sub to ${p.recipient}`;break;case"community_sub_gift":p.type="sub_gift",p.nice_name="Gift x"+w.payload.event[S].total,p.text="Gifted "+w.payload.event[S].total+" subs",p.tts=`${p.user} gifted ${w.payload.event[S].total} subs`;break;case"raid":p.color="-purple-600",p.nice_name="Raid x"+w.payload.event[S].viewer_count,p.raider=w.payload.event[S].user_name,p.tts=`${p.raider} raided with ${w.payload.event[S].viewer_count} viewers`;break}p.exclude||f(p);break}},3e3)}return(R,w)=>(ue(),pe(me,null,[W("audio",{controls:"",class:"hidden",ref_key:"notifyAudio",ref:s},[fc,ao(" Your browser does not support the audio element. ")],512),W("button",{onClick:_,class:"svg bg-purple-700 hover:bg-purple-800 text-white font-bold p-2 rounded-full absolute z-40 right-[55px] top-[10px] drop-shadow-lg"},[r.value?(ue(),pe("svg",dc,mc)):(ue(),pe("svg",bc,vc))]),W("button",{onClick:x,class:"svg bg-purple-700 hover:bg-purple-800 text-white font-bold rounded-full absolute top-[10px] right-[2px] p-2 cursor-pointer z-40"},[o.value?(ue(),pe("svg",wc,Cc)):(ue(),pe("svg",Tc,Oc))]),W("div",Pc,[re(Yl,{name:"notification",tag:"div"},{default:rs(()=>[(ue(!0),pe(me,null,Ri(t.value,S=>(ue(),pe("div",{key:S.id,class:Mt(["border"+S.color,"bg-slate-800 rounded-lg p-2 mb-3 w-full border-2"])},[W("div",Mc,[W("div",Rc,[S.nice_name?(ue(),pe("div",{key:0,class:Mt(["bg"+S.color,"notify-pill-nobg"])},rt(S.nice_name),3)):pt("",!0),S.tier?(ue(),pe("div",Ic,"Tier "+rt(S.tier),1)):pt("",!0),S.months?(ue(),pe("div",$c,rt(S.months)+" months",1)):pt("",!0),S.is_prime?(ue(),pe("div",Fc,"Prime")):pt("",!0),S.user_total?(ue(),pe("div",Nc,rt(S.user_total)+" total",1)):pt("",!0)])]),W("div",kc,rt(S.raider||S.user),1),W("div",Hc,rt(S.text||(S.type=="sub_gift"?"Gifted to "+S.recipient:"")),1)],2))),128))]),_:1})])],64))}},Bc=["src"],Dc=W("svg",{width:"30px",height:"30px",class:"translate-y-[2px]",viewBox:"0 0 448 512",xmlns:"http://www.w3.org/2000/svg"},[W("path",{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"})],-1),Vc=[Dc],Uc={__name:"ChatFeed",setup(e){const t=Ae(""),n=Ae(null),s=Ae(!1),r=new URL(window.location.href),o=r.searchParams.get("channel")??"pablogz205",i=r.searchParams.get("size")??1,c=r.searchParams.get("font")??1;t.value=`https://www.giambaj.it/twitch/jchat/v2/?channel=${o}&size=${i}&font=${c}`,Ht(()=>{setInterval(()=>{Math.ceil(n.value.scrollTop)+n.value.clientHeight{s.value=!1},1e3)}return(d,f)=>(ue(),pe(me,null,[W("div",{class:"chat-scroll-container",ref_key:"chatScrollContainer",ref:n},[W("iframe",{class:"chat-frame",src:t.value},null,8,Bc)],512),re(us,{name:"slide-fade"},{default:rs(()=>[s.value?(ue(),pe("button",{key:0,onClick:a,class:"svg scroll-to-bottom-button bg-purple-700 hover:bg-purple-800 drop-shadow-lg rounded-full p-1 font-bold"},Vc)):pt("",!0)]),_:1})],64))}},Kc={class:"h-dvh"},Wc={class:"bottom"},Gc={__name:"App",setup(e){const t=Ae(null),n=Ae(null),s=Ae(null);return Ht(()=>{let r=!1,o=0;function i(f){r=!0,y.mobile()?y.landscape()?o=f.touches[0].clientX:o=f.touches[0].clientY:o=f.y}function c(f){y.mobile()?y.landscape()?o=f.touches[0].clientX:o=f.touches[0].clientY:o=f.y,r&&(y.mobile()&&y.landscape()?n.value.style.width=o-s.value.getBoundingClientRect().width/2+"px":n.value.style.height=o-s.value.getBoundingClientRect().height/2+"px",f.preventDefault())}function a(f){r=!1}s.value.addEventListener("mousedown",i),s.value.addEventListener("touchstart",i),t.value.addEventListener("mousemove",c),t.value.addEventListener("touchmove",c),t.value.addEventListener("mouseup",a),t.value.addEventListener("touchend",a),y.mobile()&&y.landscape()?n.value.style.width=window.innerWidth/2+"px":n.value.style.height=window.innerHeight/3+"px";let d=document.querySelector(".chat-scroll-container");d.scrollTop=d.scrollHeight,y.onChangeOrientation(f=>{y.mobile()&&(f==="landscape"?(n.value.scrollTop=n.value.scrollHeight,n.value.style.height="",n.value.style.width=window.innerHeight/2+"px"):(n.value.style.width="",n.value.style.height=window.innerWidth/3+"px"))})}),(r,o)=>(ue(),pe("main",Kc,[W("div",{class:"resizeable-container",ref_key:"containerRef",ref:t},[W("div",{class:"top flex-shrink-0 overflow-y-auto px-3",ref_key:"topRef",ref:n},[re(jc)],512),W("div",{class:"resize",ref_key:"resizeRef",ref:s},null,512),W("div",Wc,[re(Uc)])],512)]))}};rc(Gc).mount("#app"); diff --git a/dist/index.html b/dist/index.html index b2f9949..f8b9767 100644 --- a/dist/index.html +++ b/dist/index.html @@ -4,7 +4,7 @@ Split Feed for Twitch by Deleter - + diff --git a/src/components/NotificationFeed.vue b/src/components/NotificationFeed.vue index 9cb0b92..4eaf139 100644 --- a/src/components/NotificationFeed.vue +++ b/src/components/NotificationFeed.vue @@ -195,7 +195,7 @@ const processMessages = function (event) { case 'raid': notification.color = '-purple-600'; notification.nice_name = 'Raid x' + message.payload.event[eventType].viewer_count; - notification.raider = message.payload.event[eventType].user_name; + notification.raider = message.payload.event[eventType].user_name + ' raided with ' + message.payload.event[eventType].viewer_count + ' viewers'; notification.tts = `${notification.raider} raided with ${message.payload.event[eventType].viewer_count} viewers`; break; }