beautify everything

This commit is contained in:
vel 2022-01-30 15:55:15 -08:00
parent 0a56c12270
commit 11b73b13ea
Signed by: velvox
GPG Key ID: 1C8200C1D689CEF5
23 changed files with 21812 additions and 237 deletions

View File

@ -116,8 +116,8 @@
function getDeepMatches(object, pred, excludeKeys) { function getDeepMatches(object, pred, excludeKeys) {
const keys = typeof object === 'object' && object ? Object.keys(object) : []; const keys = typeof object === 'object' && object ? Object.keys(object) : [];
return keys.length return keys.length ?
? keys keys
.filter((key) => !excludeKeys.includes(key)) .filter((key) => !excludeKeys.includes(key))
.reduce((r, key) => { .reduce((r, key) => {
const target = object[key]; const target = object[key];
@ -127,8 +127,8 @@
} else { } else {
return [...r, ...getDeepMatches(target, pred, excludeKeys)] return [...r, ...getDeepMatches(target, pred, excludeKeys)]
} }
}, [] ) }, []) :
: [] []
} }
const importPath = /*@__PURE__*/ JSON.parse('"../background.js"'); const importPath = /*@__PURE__*/ JSON.parse('"../background.js"');

View File

@ -1,7 +1,63 @@
import { t } from './index-6137f488.js'; import {
import { s, m } from './storage-a8ac7bd3.js'; t
import { n } from './connectRuntime-a699491c.js'; } from './index-6137f488.js';
import {
s,
m
} from './storage-a8ac7bd3.js';
import {
n
} from './connectRuntime-a699491c.js';
class o extends t{constructor(){super(),this.fetch=async(t,e)=>{const s=Math.random().toString();return this.port.postMessage({nonce:s,path:t,body:e}),new Promise((t=>{const e=a=>{a.meta.nonce===s&&(this.port.onMessage.removeListener(e),t(a));};this.port.onMessage.addListener(e);}))},this.extensionId=s.runtime.id,this.port=this.connectToBackground(),this.port.onMessage.addListener(this.onMessage),window.addEventListener("message",(async t=>{var e,a,o;if(t.source!==window||(null===(e=t.data)||void 0===e?void 0:e.id)!==this.extensionId||"response"===(null===(a=t.data)||void 0===a?void 0:a.type))return;let n;switch(null===(o=t.data)||void 0===o?void 0:o.type){case"fetch":n=await this.fetch(t.data.data[0],t.data.data[1]);break;case"storage.get":{const[e,a]=t.data.data.split(".");n=await m[e].get(a);break}case"storage.set":{const[e,a]=t.data.data[0].split(".");n=await m[e].set(a,t.data.data[1]);break}}window.postMessage({id:this.extensionId,nonce:t.data.nonce,type:"response",data:n});}));}connectToBackground(){return n()}async onMessage(t){window.postMessage(t);}} class o extends t {
constructor() {
super(), this.fetch = async (t, e) => {
const s = Math.random().toString();
return this.port.postMessage({
nonce: s,
path: t,
body: e
}), new Promise((t => {
const e = a => {
a.meta.nonce === s && (this.port.onMessage.removeListener(e), t(a));
};
this.port.onMessage.addListener(e);
}))
}, this.extensionId = s.runtime.id, this.port = this.connectToBackground(), this.port.onMessage.addListener(this.onMessage), window.addEventListener("message", (async t => {
var e, a, o;
if (t.source !== window || (null === (e = t.data) || void 0 === e ? void 0 : e.id) !== this.extensionId || "response" === (null === (a = t.data) || void 0 === a ? void 0 : a.type)) return;
let n;
switch (null === (o = t.data) || void 0 === o ? void 0 : o.type) {
case "fetch":
n = await this.fetch(t.data.data[0], t.data.data[1]);
break;
case "storage.get": {
const [e, a] = t.data.data.split(".");
n = await m[e].get(a);
break
}
case "storage.set": {
const [e, a] = t.data.data[0].split(".");
n = await m[e].set(a, t.data.data[1]);
break
}
}
window.postMessage({
id: this.extensionId,
nonce: t.data.nonce,
type: "response",
data: n
});
}));
}
connectToBackground() {
return n()
}
async onMessage(t) {
window.postMessage(t);
}
}
export { o }; export {
o
};

View File

@ -1,5 +1,52 @@
import { t } from './index-6137f488.js'; import {
t
} from './index-6137f488.js';
class e extends t{constructor(){super(),this.fetch=async(t,e)=>this.sendToContentScript("fetch",[t,e]),this.extensionId=function(){var t;const e=null===(t=document.getElementById("XQpBuigyZWZGIjvE"))||void 0===t?void 0:t.getAttribute("XQpBuigyZWZGIjvE");if(!e)throw new Error("Could not resolve extension ID from injected script");return e}(),window.addEventListener("message",(t=>{var e,n;t.source===window&&(null===(e=t.data)||void 0===e?void 0:e.id)===this.extensionId&&"event"===(null===(n=t.data)||void 0===n?void 0:n.type)&&this.onMessage(t.data.data);}));}async onMessage(t){}async getStorage(t){return await this.sendToContentScript("storage.get",t)}async getLiveStorageValue(t,e=(t=>t)){const n={value:e(await this.getStorage(t))},o=window.setInterval((async()=>{n.value=e(await this.getStorage(t));}),1e3);return n.interval=o,n}async setStorage(t,e){return this.sendToContentScript("storage.set",[t,e])}async sendToContentScript(t,e){const n=Math.random().toString();return window.postMessage({id:this.extensionId,nonce:n,type:t,data:e}),new Promise((t=>{const e=o=>{var s,a,i;o.source===window&&(null===(s=o.data)||void 0===s?void 0:s.id)===this.extensionId&&(null===(a=o.data)||void 0===a?void 0:a.nonce)===n&&"response"===(null===(i=o.data)||void 0===i?void 0:i.type)&&(t(o.data.data),window.removeEventListener("message",e));};window.addEventListener("message",e);}))}} class e extends t {
constructor() {
super(), this.fetch = async (t, e) => this.sendToContentScript("fetch", [t, e]), this.extensionId = function() {
var t;
const e = null === (t = document.getElementById("XQpBuigyZWZGIjvE")) || void 0 === t ? void 0 : t.getAttribute("XQpBuigyZWZGIjvE");
if (!e) throw new Error("Could not resolve extension ID from injected script");
return e
}(), window.addEventListener("message", (t => {
var e, n;
t.source === window && (null === (e = t.data) || void 0 === e ? void 0 : e.id) === this.extensionId && "event" === (null === (n = t.data) || void 0 === n ? void 0 : n.type) && this.onMessage(t.data.data);
}));
}
async onMessage(t) {}
async getStorage(t) {
return await this.sendToContentScript("storage.get", t)
}
async getLiveStorageValue(t, e = (t => t)) {
const n = {
value: e(await this.getStorage(t))
},
o = window.setInterval((async () => {
n.value = e(await this.getStorage(t));
}), 1e3);
return n.interval = o, n
}
async setStorage(t, e) {
return this.sendToContentScript("storage.set", [t, e])
}
async sendToContentScript(t, e) {
const n = Math.random().toString();
return window.postMessage({
id: this.extensionId,
nonce: n,
type: t,
data: e
}), new Promise((t => {
const e = o => {
var s, a, i;
o.source === window && (null === (s = o.data) || void 0 === s ? void 0 : s.id) === this.extensionId && (null === (a = o.data) || void 0 === a ? void 0 : a.nonce) === n && "response" === (null === (i = o.data) || void 0 === i ? void 0 : i.type) && (t(o.data.data), window.removeEventListener("message", e));
};
window.addEventListener("message", e);
}))
}
}
export { e }; export {
e
};

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,36 @@
import { s } from './storage-a8ac7bd3.js'; import {
s
} from './storage-a8ac7bd3.js';
const n=n=>{let s$1;const t=()=>{s$1=s.runtime.connect(n),s$1.onDisconnect.addListener((()=>{t();}));};function o(e){return {addListener:n=>s$1[e].addListener(n),removeListener:n=>s$1[e].removeListener(n),hasListener:n=>s$1[e].hasListener(n),hasListeners:()=>s$1[e].hasListeners()}}t();const r={name:(null==n?void 0:n.name)||"",disconnect:()=>s$1.disconnect(),onDisconnect:o("onDisconnect"),onMessage:o("onMessage"),postMessage:e=>s$1.postMessage(e)};return Object.defineProperty(r,"name",{get:()=>s$1.name}),r}; const n = n => {
let s$1;
const t = () => {
s$1 = s.runtime.connect(n), s$1.onDisconnect.addListener((() => {
t();
}));
};
export { n }; function o(e) {
return {
addListener: n => s$1[e].addListener(n),
removeListener: n => s$1[e].removeListener(n),
hasListener: n => s$1[e].hasListener(n),
hasListeners: () => s$1[e].hasListeners()
}
}
t();
const r = {
name: (null == n ? void 0 : n.name) || "",
disconnect: () => s$1.disconnect(),
onDisconnect: o("onDisconnect"),
onMessage: o("onMessage"),
postMessage: e => s$1.postMessage(e)
};
return Object.defineProperty(r, "name", {
get: () => s$1.name
}), r
};
export {
n
};

View File

@ -1,7 +1,16 @@
import '../../index-6137f488.js'; import '../../index-6137f488.js';
import '../../storage-a8ac7bd3.js'; import '../../storage-a8ac7bd3.js';
import '../../connectRuntime-a699491c.js'; import '../../connectRuntime-a699491c.js';
import { o } from '../../background.content-5f02aba1.js'; import {
import { e } from '../../when_ready.util-91474a6b.js'; o
} from '../../background.content-5f02aba1.js';
import {
e
} from '../../when_ready.util-91474a6b.js';
e((async()=>{var n;const e=new o,o$1=null===(n=document.getElementById("jwt-response"))||void 0===n?void 0:n.textContent;o$1&&e.fetch("/auth/finish-link",o$1);})); e((async () => {
var n;
const e = new o,
o$1 = null === (n = document.getElementById("jwt-response")) || void 0 === n ? void 0 : n.textContent;
o$1 && e.fetch("/auth/finish-link", o$1);
}));

View File

@ -1,7 +1,11 @@
import '../../index-6137f488.js'; import '../../index-6137f488.js';
import '../../storage-a8ac7bd3.js'; import '../../storage-a8ac7bd3.js';
import '../../connectRuntime-a699491c.js'; import '../../connectRuntime-a699491c.js';
import { o } from '../../background.content-5f02aba1.js'; import {
import { t } from '../../inject_script.util-a32f14cf.js'; o
} from '../../background.content-5f02aba1.js';
import {
t
} from '../../inject_script.util-a32f14cf.js';
new o, t("content/twitch/inject.js"); new o, t("content/twitch/inject.js");

View File

@ -1,5 +1,200 @@
import '../../index-6137f488.js'; import '../../index-6137f488.js';
import { e } from '../../background.injected-3cca8ca2.js'; import {
import { s } from '../../router.interface-6cdbc015.js'; e
} from '../../background.injected-3cca8ca2.js';
import {
s
} from '../../router.interface-6cdbc015.js';
!async function(e){async function a(e){if(Array.isArray(e))for(const t of e)await n(t);return e}async function n(a){var n,i,r;try{switch(a.extensions.operationName){case"FollowingLive_CurrentUser":{const n=a.data,i=await e.fetch("/youtube/get-stream");s(i)&&i.body&&(n.currentUser.followedLiveUsers.edges.push(function({title:e,viewersCount:t,profileImageURL:a,previewImageURL:n}){return {__typename:"FollowedLiveUserEdge",cursor:"LTE=",node:{__typename:"User",id:"40934651",displayName:"ludwig",login:"ludwig",profileImageURL:a,stream:{broadcaster:{id:"40934651",primaryColorHex:"00FFE2",__typename:"User",channel:{id:"40934651",self:{isAuthorized:!0,__typename:"ChannelSelfEdge"},__typename:"Channel"}},id:"-1",previewImageURL:n,game:{id:"-1",name:"YouTube",displayName:"YouTube",boxArtURL:"https://i.postimg.cc/NjQvCPh2/image.png",__typename:"Game"},restriction:null,tags:[],title:e,type:"live",viewersCount:t,__typename:"Stream"}}}}(i.body)),n.currentUser.followedLiveUsers.edges.sort(((e,t)=>t.node.stream.viewersCount-e.node.stream.viewersCount)));break}case"PersonalSections":{const n=a.data.personalSections.find((e=>"FOLLOWED_SECTION"===e.type));if(n){const a=await e.fetch("/youtube/get-stream");s(a)&&a.body&&(n.items.push(function({title:e,viewersCount:t,profileImageURL:a,previewImageURL:n}){return {trackingID:"1bb8ab4b-aed2-4f25-a750-c295d57e6a95",promotionsCampaignID:"",user:{id:"40934651",login:"ludwig",displayName:"ludwig",profileImageURL:a,primaryColorHex:"00FFE2",broadcastSettings:{id:"40934651",title:e,__typename:"BroadcastSettings"},channel:{id:"40934651",creatorAnniversaries:{id:"40934651",isAnniversary:!1,__typename:"CreatorAnniversaries"},__typename:"Channel"},__typename:"User"},label:"NONE",content:{id:"-1",previewImageURL:n,broadcaster:{id:"40934651",broadcastSettings:{id:"40934651",title:e,__typename:"BroadcastSettings"},__typename:"User"},viewersCount:t,self:{canWatch:!0,isRestricted:!1,restrictionType:null,__typename:"StreamSelfConnection"},game:{id:"-1",displayName:"YouTube",name:"YouTube",__typename:"Game"},type:"live",__typename:"Stream"},__typename:"PersonalSectionChannel"}}(a.body)),n.items.sort(((e,t)=>(t.content.viewersCount||0)-(e.content.viewersCount||0))));}break}case"StreamMetadata":{const n=a.data;if("40934651"===n.user.id){const a=await e.fetch("/youtube/get-stream");s(a)&&a.body&&(n.user.lastBroadcast.id="-1",n.user.lastBroadcast.title=a.body.title,n.user.stream={id:"-1",type:"live",createdAt:(new Date).toJSON(),viewersCount:a.body.viewersCount,game:{id:"-1",name:"YouTube",__typename:"Game"},__typename:"Stream"});}break}default:{const o=a.data;if("40934651"===(null===(n=o.user)||void 0===n?void 0:n.id)&&(null===(r=null===(i=o.user)||void 0===i?void 0:i.lastBroadcast)||void 0===r?void 0:r.title)){const a=await e.fetch("/youtube/get-stream");s(a)&&a.body&&(o.user.lastBroadcast.title=a.body.title);}}}}catch(e){}}const i=window.fetch.bind(window);window.fetch=async function(e,t){const n=await i(e,t);try{let t;if(t="string"==typeof e?e:e.url,!t.includes("gql.twitch.tv/gql"))return n;const i=n.text.bind(n),r=n.json.bind(n);n.text=async function(){const e=await i();try{const t=JSON.parse(e);return await a(t),JSON.stringify(t)}catch(t){return e}},n.json=async function(){const e=await r();try{return await a(e),e}catch(t){return e}};}catch(e){return n}return n};}(new e); !async function(e) {
async function a(e) {
if (Array.isArray(e))
for (const t of e) await n(t);
return e
}
async function n(a) {
var n, i, r;
try {
switch (a.extensions.operationName) {
case "FollowingLive_CurrentUser": {
const n = a.data,
i = await e.fetch("/youtube/get-stream");
s(i) && i.body && (n.currentUser.followedLiveUsers.edges.push(function({
title: e,
viewersCount: t,
profileImageURL: a,
previewImageURL: n
}) {
return {
__typename: "FollowedLiveUserEdge",
cursor: "LTE=",
node: {
__typename: "User",
id: "40934651",
displayName: "ludwig",
login: "ludwig",
profileImageURL: a,
stream: {
broadcaster: {
id: "40934651",
primaryColorHex: "00FFE2",
__typename: "User",
channel: {
id: "40934651",
self: {
isAuthorized: !0,
__typename: "ChannelSelfEdge"
},
__typename: "Channel"
}
},
id: "-1",
previewImageURL: n,
game: {
id: "-1",
name: "YouTube",
displayName: "YouTube",
boxArtURL: "https://i.postimg.cc/NjQvCPh2/image.png",
__typename: "Game"
},
restriction: null,
tags: [],
title: e,
type: "live",
viewersCount: t,
__typename: "Stream"
}
}
}
}(i.body)), n.currentUser.followedLiveUsers.edges.sort(((e, t) => t.node.stream.viewersCount - e.node.stream.viewersCount)));
break
}
case "PersonalSections": {
const n = a.data.personalSections.find((e => "FOLLOWED_SECTION" === e.type));
if (n) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (n.items.push(function({
title: e,
viewersCount: t,
profileImageURL: a,
previewImageURL: n
}) {
return {
trackingID: "1bb8ab4b-aed2-4f25-a750-c295d57e6a95",
promotionsCampaignID: "",
user: {
id: "40934651",
login: "ludwig",
displayName: "ludwig",
profileImageURL: a,
primaryColorHex: "00FFE2",
broadcastSettings: {
id: "40934651",
title: e,
__typename: "BroadcastSettings"
},
channel: {
id: "40934651",
creatorAnniversaries: {
id: "40934651",
isAnniversary: !1,
__typename: "CreatorAnniversaries"
},
__typename: "Channel"
},
__typename: "User"
},
label: "NONE",
content: {
id: "-1",
previewImageURL: n,
broadcaster: {
id: "40934651",
broadcastSettings: {
id: "40934651",
title: e,
__typename: "BroadcastSettings"
},
__typename: "User"
},
viewersCount: t,
self: {
canWatch: !0,
isRestricted: !1,
restrictionType: null,
__typename: "StreamSelfConnection"
},
game: {
id: "-1",
displayName: "YouTube",
name: "YouTube",
__typename: "Game"
},
type: "live",
__typename: "Stream"
},
__typename: "PersonalSectionChannel"
}
}(a.body)), n.items.sort(((e, t) => (t.content.viewersCount || 0) - (e.content.viewersCount || 0))));
}
break
}
case "StreamMetadata": {
const n = a.data;
if ("40934651" === n.user.id) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (n.user.lastBroadcast.id = "-1", n.user.lastBroadcast.title = a.body.title, n.user.stream = {
id: "-1",
type: "live",
createdAt: (new Date).toJSON(),
viewersCount: a.body.viewersCount,
game: {
id: "-1",
name: "YouTube",
__typename: "Game"
},
__typename: "Stream"
});
}
break
}
default: {
const o = a.data;
if ("40934651" === (null === (n = o.user) || void 0 === n ? void 0 : n.id) && (null === (r = null === (i = o.user) || void 0 === i ? void 0 : i.lastBroadcast) || void 0 === r ? void 0 : r.title)) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (o.user.lastBroadcast.title = a.body.title);
}
}
}
} catch (e) {}
}
const i = window.fetch.bind(window);
window.fetch = async function(e, t) {
const n = await i(e, t);
try {
let t;
if (t = "string" == typeof e ? e : e.url, !t.includes("gql.twitch.tv/gql")) return n;
const i = n.text.bind(n),
r = n.json.bind(n);
n.text = async function() {
const e = await i();
try {
const t = JSON.parse(e);
return await a(t), JSON.stringify(t)
} catch (t) {
return e
}
}, n.json = async function() {
const e = await r();
try {
return await a(e), e
} catch (t) {
return e
}
};
} catch (e) {
return n
}
return n
};
}(new e);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,64 @@
async function e(e){const t=await async function(e,t){const o=t.cookies.SAPISID||t.cookies["__Secure-3PAPISID"];if(!o)return {success:!1,code:400,message:"Missing cookie"};const n=new URL(t.href).origin,a=Math.floor(Date.now()/1e3),s=await async function(e){const t=await crypto.subtle.digest("SHA-1",(new TextEncoder).encode(e));return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}(`${a} ${o} ${n}`),c={"x-origin":n,authorization:`SAPISIDHASH ${a}_${s}`,"x-goog-authuser":t.authUser,cookie:Object.entries(t.cookies).map((([e,t])=>`${e}=${t}`)).join(";")};t.pageId&&(c["x-goog-pageid"]=t.pageId);const i=await fetch(`https://www.youtube.com${e}?key=${t.key}`,{method:"POST",headers:c,body:JSON.stringify({context:t.context})});return {success:!0,data:await i.json()}}("/youtubei/v1/account/account_menu",e);if(!t.success)return t;const o=t.data;try{const e=o.actions[0].openPopupAction.popup.multiPageMenuRenderer,t=e.header.activeAccountHeaderRenderer,n=e.sections[0].multiPageMenuSectionRenderer.items[0].compactLinkRenderer.navigationEndpoint.browseEndpoint.browseId.trim().replace(/\n/g,""),a=o.responseContext.mainAppWebResponseContext.datasyncId.split("||")[0];return /^UC.{22}$/.test(n)?{success:!0,data:{id:n,googleUserId:a,profile:t.accountPhoto.thumbnails[0].url,username:t.accountName.simpleText}}:{success:!1,code:400,message:"Failed to authenticate"}}catch(e){return {success:!1,code:400,message:"Failed to authenticate"}}} async function e(e) {
const t = await async function(e, t) {
const o = t.cookies.SAPISID || t.cookies["__Secure-3PAPISID"];
if (!o) return {
success: !1,
code: 400,
message: "Missing cookie"
};
const n = new URL(t.href).origin,
a = Math.floor(Date.now() / 1e3),
s = await async function(e) {
const t = await crypto.subtle.digest("SHA-1", (new TextEncoder).encode(e));
return Array.from(new Uint8Array(t)).map((e => e.toString(16).padStart(2, "0"))).join("")
}(`${a} ${o} ${n}`), c = {
"x-origin": n,
authorization: `SAPISIDHASH ${a}_${s}`,
"x-goog-authuser": t.authUser,
cookie: Object.entries(t.cookies).map((([e, t]) => `${e}=${t}`)).join(";")
};
t.pageId && (c["x-goog-pageid"] = t.pageId);
const i = await fetch(`https://www.youtube.com${e}?key=${t.key}`, {
method: "POST",
headers: c,
body: JSON.stringify({
context: t.context
})
});
return {
success: !0,
data: await i.json()
}
}("/youtubei/v1/account/account_menu", e);
if (!t.success) return t;
const o = t.data;
try {
const e = o.actions[0].openPopupAction.popup.multiPageMenuRenderer,
t = e.header.activeAccountHeaderRenderer,
n = e.sections[0].multiPageMenuSectionRenderer.items[0].compactLinkRenderer.navigationEndpoint.browseEndpoint.browseId.trim().replace(/\n/g, ""),
a = o.responseContext.mainAppWebResponseContext.datasyncId.split("||")[0];
return /^UC.{22}$/.test(n) ? {
success: !0,
data: {
id: n,
googleUserId: a,
profile: t.accountPhoto.thumbnails[0].url,
username: t.accountName.simpleText
}
} : {
success: !1,
code: 400,
message: "Failed to authenticate"
}
} catch (e) {
return {
success: !1,
code: 400,
message: "Failed to authenticate"
}
}
}
export { e }; export {
e
};

View File

@ -1,3 +1,25 @@
function n(){let n=function(){var n,e;const t=document.querySelector("ytd-page-manager");return null===(e=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.playerResponse)||void 0===e?void 0:e.videoDetails}();return n||(n=function(){const n=new URLSearchParams(window.location.hash.substring(1)).get("rVuDVKjClhIQSUGR");if(n)try{return JSON.parse(n)}catch(n){return}}(),n||void 0)}function e(e=!0){const t=n();return t?"UCrPseYLGpNygVi34QpGNqpA"===t.channelId&&t.isLiveContent:e} function n() {
let n = function() {
var n, e;
const t = document.querySelector("ytd-page-manager");
return null === (e = null === (n = null == t ? void 0 : t.data) || void 0 === n ? void 0 : n.playerResponse) || void 0 === e ? void 0 : e.videoDetails
}();
return n || (n = function() {
const n = new URLSearchParams(window.location.hash.substring(1)).get("rVuDVKjClhIQSUGR");
if (n) try {
return JSON.parse(n)
} catch (n) {
return
}
}(), n || void 0)
}
export { e, n }; function e(e = !0) {
const t = n();
return t ? "UCrPseYLGpNygVi34QpGNqpA" === t.channelId && t.isLiveContent : e
}
export {
e,
n
};

View File

@ -1,3 +1,113 @@
var e={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1;}function s(e,t,r,s,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new o(r,s||e,i),f=n?n+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t];}function c(){this._events=new r,this._eventsCount=0;}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},c.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return [];if(r.fn)return [r.fn];for(var o=0,s=r.length,i=new Array(s);o<s;o++)i[o]=r[o].fn;return i},c.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,o,s,i){var c=n?n+e:e;if(!this._events[c])return !1;var f,a,u=this._events[c],v=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),v){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,s),!0;case 6:return u.fn.call(u.context,t,r,o,s,i),!0}for(a=1,f=new Array(v-1);a<v;a++)f[a-1]=arguments[a];u.fn.apply(u.context,f);}else {var p,l=u.length;for(a=0;a<l;a++)switch(u[a].once&&this.removeListener(e,u[a].fn,void 0,!0),v){case 1:u[a].fn.call(u[a].context);break;case 2:u[a].fn.call(u[a].context,t);break;case 3:u[a].fn.call(u[a].context,t,r);break;case 4:u[a].fn.call(u[a].context,t,r,o);break;default:if(!f)for(p=1,f=new Array(v-1);p<v;p++)f[p-1]=arguments[p];u[a].fn.apply(u[a].context,f);}}return !0},c.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,r,o){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return i(this,s),this;var c=this._events[s];if(c.fn)c.fn!==t||o&&!c.once||r&&c.context!==r||i(this,s);else {for(var f=0,a=[],u=c.length;f<u;f++)(c[f].fn!==t||o&&!c[f].once||r&&c[f].context!==r)&&a.push(c[f]);a.length?this._events[s]=1===a.length?a[0]:a:i(this,s);}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c;}(e);var t=e.exports; var e = {
exports: {}
};
! function(e) {
var t = Object.prototype.hasOwnProperty,
n = "~";
export { e, t }; function r() {}
function o(e, t, n) {
this.fn = e, this.context = t, this.once = n || !1;
}
function s(e, t, r, s, i) {
if ("function" != typeof r) throw new TypeError("The listener must be a function");
var c = new o(r, s || e, i),
f = n ? n + t : t;
return e._events[f] ? e._events[f].fn ? e._events[f] = [e._events[f], c] : e._events[f].push(c) : (e._events[f] = c, e._eventsCount++), e
}
function i(e, t) {
0 == --e._eventsCount ? e._events = new r : delete e._events[t];
}
function c() {
this._events = new r, this._eventsCount = 0;
}
Object.create && (r.prototype = Object.create(null), (new r).__proto__ || (n = !1)), c.prototype.eventNames = function() {
var e, r, o = [];
if (0 === this._eventsCount) return o;
for (r in e = this._events) t.call(e, r) && o.push(n ? r.slice(1) : r);
return Object.getOwnPropertySymbols ? o.concat(Object.getOwnPropertySymbols(e)) : o
}, c.prototype.listeners = function(e) {
var t = n ? n + e : e,
r = this._events[t];
if (!r) return [];
if (r.fn) return [r.fn];
for (var o = 0, s = r.length, i = new Array(s); o < s; o++) i[o] = r[o].fn;
return i
}, c.prototype.listenerCount = function(e) {
var t = n ? n + e : e,
r = this._events[t];
return r ? r.fn ? 1 : r.length : 0
}, c.prototype.emit = function(e, t, r, o, s, i) {
var c = n ? n + e : e;
if (!this._events[c]) return !1;
var f, a, u = this._events[c],
v = arguments.length;
if (u.fn) {
switch (u.once && this.removeListener(e, u.fn, void 0, !0), v) {
case 1:
return u.fn.call(u.context), !0;
case 2:
return u.fn.call(u.context, t), !0;
case 3:
return u.fn.call(u.context, t, r), !0;
case 4:
return u.fn.call(u.context, t, r, o), !0;
case 5:
return u.fn.call(u.context, t, r, o, s), !0;
case 6:
return u.fn.call(u.context, t, r, o, s, i), !0
}
for (a = 1, f = new Array(v - 1); a < v; a++) f[a - 1] = arguments[a];
u.fn.apply(u.context, f);
} else {
var p, l = u.length;
for (a = 0; a < l; a++) switch (u[a].once && this.removeListener(e, u[a].fn, void 0, !0), v) {
case 1:
u[a].fn.call(u[a].context);
break;
case 2:
u[a].fn.call(u[a].context, t);
break;
case 3:
u[a].fn.call(u[a].context, t, r);
break;
case 4:
u[a].fn.call(u[a].context, t, r, o);
break;
default:
if (!f)
for (p = 1, f = new Array(v - 1); p < v; p++) f[p - 1] = arguments[p];
u[a].fn.apply(u[a].context, f);
}
}
return !0
}, c.prototype.on = function(e, t, n) {
return s(this, e, t, n, !1)
}, c.prototype.once = function(e, t, n) {
return s(this, e, t, n, !0)
}, c.prototype.removeListener = function(e, t, r, o) {
var s = n ? n + e : e;
if (!this._events[s]) return this;
if (!t) return i(this, s), this;
var c = this._events[s];
if (c.fn) c.fn !== t || o && !c.once || r && c.context !== r || i(this, s);
else {
for (var f = 0, a = [], u = c.length; f < u; f++)(c[f].fn !== t || o && !c[f].once || r && c[f].context !== r) && a.push(c[f]);
a.length ? this._events[s] = 1 === a.length ? a[0] : a : i(this, s);
}
return this
}, c.prototype.removeAllListeners = function(e) {
var t;
return e ? (t = n ? n + e : e, this._events[t] && i(this, t)) : (this._events = new r, this._eventsCount = 0), this
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = n, c.EventEmitter = c, e.exports = c;
}(e);
var t = e.exports;
export {
e,
t
};

View File

@ -1,5 +1,13 @@
import { s } from './storage-a8ac7bd3.js'; import {
s
} from './storage-a8ac7bd3.js';
function t(t){const n=document.head||document.documentElement,i=document.createElement("script");i.type="module",i.id="XQpBuigyZWZGIjvE",i.setAttribute("XQpBuigyZWZGIjvE",s.runtime.id),i.src=s.runtime.getURL(t),n.prepend(i);} function t(t) {
const n = document.head || document.documentElement,
i = document.createElement("script");
i.type = "module", i.id = "XQpBuigyZWZGIjvE", i.setAttribute("XQpBuigyZWZGIjvE", s.runtime.id), i.src = s.runtime.getURL(t), n.prepend(i);
}
export { t }; export {
t
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,10 @@
var n;!function(n){n[n.Success=200]="Success",n[n.NotFound=404]="NotFound",n[n.BadRequest=400]="BadRequest",n[n.Unauthorized=401]="Unauthorized",n[n.Unknown=500]="Unknown";}(n||(n={}));const s=n=>n.meta.isSuccess; var n;
! function(n) {
n[n.Success = 200] = "Success", n[n.NotFound = 404] = "NotFound", n[n.BadRequest = 400] = "BadRequest", n[n.Unauthorized = 401] = "Unauthorized", n[n.Unknown = 500] = "Unknown";
}(n || (n = {}));
const s = n => n.meta.isSuccess;
export { n, s }; export {
n,
s
};

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,13 @@
function e(e,t){void 0===t&&(t={});var d=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===d&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e));}} function e(e, t) {
void 0 === t && (t = {});
var d = t.insertAt;
if (e && "undefined" != typeof document) {
var n = document.head || document.getElementsByTagName("head")[0],
s = document.createElement("style");
s.type = "text/css", "top" === d && n.firstChild ? n.insertBefore(s, n.firstChild) : n.appendChild(s), s.styleSheet ? s.styleSheet.cssText = e : s.appendChild(document.createTextNode(e));
}
}
export { e }; export {
e
};

View File

@ -1,3 +1,7 @@
function e(e){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e();} function e(e) {
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded", e) : e();
}
export { e }; export {
e
};