| 1208 | } |
| 1209 | |
| 1210 | msg(e = t, s = "", i = "", r) { |
| 1211 | const o = t => { |
| 1212 | if (!t) return t; |
| 1213 | if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {"open-url": t} : this.isSurge() ? {url: t} : void 0; |
| 1214 | if ("object" == typeof t) { |
| 1215 | if (this.isLoon()) { |
| 1216 | let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; |
| 1217 | return {openUrl: e, mediaUrl: s} |
| 1218 | } |
| 1219 | if (this.isQuanX()) { |
| 1220 | let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; |
| 1221 | return {"open-url": e, "media-url": s} |
| 1222 | } |
| 1223 | if (this.isSurge()) { |
| 1224 | let e = t.url || t.openUrl || t["open-url"]; |
| 1225 | return {url: e} |
| 1226 | } |
| 1227 | } |
| 1228 | }; |
| 1229 | if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { |
| 1230 | let t = ["", "==============📣系统通知📣=============="]; |
| 1231 | t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) |
| 1232 | } |
| 1233 | } |
| 1234 | |
| 1235 | log(...t) { |
| 1236 | t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) |