// ==UserScript== // @name 爱问答助手 // @namespace aiask/askHelper // @version 2.0.6 // @author aiask // @description 全平台问答助手,一键获取整个页面的试题答案,目前支持【超星学习通、知到智慧树、国家开放大学、广东开放大学、江苏开放大学、上海开放大学、云南开放大学、芯位教育、云慕学苑、职教云、川农在线、长江雨课堂(半兼容)、安徽继续教育平台、青书学堂、睿学在线、成教云、京人平台、绎通继教云、学起Plus、云上河开、河南继续教育、四川开放大学、良师在线、继教云、日照专业技术人员继续教育、麦能网、21tb、168网校、云班课、电大中专、learnin、西财在线】,更多平台开发中... // @license MIT // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IArs4c6QAAAHVQTFRFR3BMgICBQD8/QUVHQ0ZIRUhKX2FiQD8/Tk1NP0VJPzs7Pz8/QD4+UE9QQD8/PVlnQD8/M6vj////n5+fN5C60NDQSl9qOXWSZL/qTFNXzOr4QWl8yMjItLS02traOIOnNZzN6OfnlJeZ9/f3PYGgpdrzmdXxgSBJqQAAABB0Uk5TAP5E6vys+7/Q0RhsfPFV/OwFarYAAAEESURBVHjapdHrboMgGIBhUHBaD/sAlTE8VOt2/5c4GlBMRZOl7w8j+kQQ0FaVwbG48IDq+piMPcgkO1bD/8DXvhD4/fb9ePDuGiqa2krV7pO1AxSLYIl2ABoeTLSvYMBi4N0sphOAlVaqg1aTPggmZYYaFvNMBYGQz6G6m2vbhEBvF81MxALFTDpbQQd3ZhvBgxqiFfBEO/CJ7ZxkNPcUbWBwn5DJw4KSsJHcHPCTLLDuQxpLkiMLbAIWJs1wBRVkyAFXT7Sa+AYQjTywNfOD74DNA18I9Ifjpg7Es/3Jj5eKyIEcBgNwhk5L8XMPonMQQcfNhBfRpIfbFbiRskCX5enFyz/07TSN9vGxKwAAAABJRU5ErkJggg== // @match *://*.asklib.com/* // @match *://*.chaoxing.com/* // @match *://*.hlju.edu.cn/* // @match *://lms.ouchn.cn/* // @match *://*.ouchn.cn/* // @match *://xczxzdbf.moodle.qwbx.ouchn.cn/* // @match *://study.ouchn.cn/* // @match *://moodle.syxy.ouchn.cn/* // @match *://moodle.qwbx.ouchn.cn/* // @match *://chatglm.cn/* // @match *://xinghuo.xfyun.cn/* // @match *://*.zhihuishu.com/* // @match *://course.ougd.cn/* // @match *://elearning.bjou.edu.cn/* // @match *://whkpc.hnqtyq.cn:5678/* // @match *://www.51xinwei.com/* // @match *://*.w-ling.cn/* // @match *://*.edu-edu.com/* // @match *://xuexi.jsou.cn/* // @match *://spoc-exam.icve.com.cn/* // @match *://*.icve.com.cn/* // @match *://zice.cnzx.info/* // @match *://any.cnzx.info:81/* // @match *://www.icourse163.org/* // @match *://*.yuketang.cn/* // @match *://*.shou.org.cn/* // @match *://main.ahjxjy.cn/* // @match *://*.chinaedu.net/* // @match *://degree.qingshuxuetang.com/* // @match *://cce.org.uooconline.com/* // @match *://*.courshare.cn/* // @match *://*.cep.webtrn.cn/* // @match *://*.webtrn.cn/* // @match *://*.cj-edu.com/* // @match *://*.ytccr.com/* // @match *://*.exam-cloud.cn/* // @match *://gdrtvu.exam-cloud.cn/* // @match *://*.open.ha.cn/* // @match *://lhycjy.cloudwis.tech/* // @match *://*.sclecb.cn/* // @match *://*.web2.superchutou.com/* // @match *://*.ls365.net/* // @match *://*.jijiaox.com/* // @match *://*.wencaischool.net/* // @match *://sdrz.gxk.yxlearning.com/* // @match *://*.crjxjy.net/* // @match *://*.cjnep.net/* // @match *://*.91huayi.com/* // @match *://teach.ynou.edu.cn/* // @match *://*.edu-edu.com.cn/* // @match *://*.21tb.com/* // @match *://*.168wangxiao.com/* // @match *://*.mynep.com/* // @match *://www.mosoteach.cn/* // @match *://*.aufe.edu.cn/* // @match *://*.learnin.com.cn/* // @match *://*.ouchn.edu.cn/* // @match *://*.swufe-online.com/* // @require https://lib.baomitu.com/vue/3.4.27/vue.global.min.js // @require https://lib.baomitu.com/vue-demi/0.14.6/index.iife.js // @require data:application/javascript,%3Bwindow.Vue%3DVue%3B // @require https://lib.baomitu.com/element-plus/2.8.2/index.full.min.js // @require https://lf9-cdn-tos.bytecdntp.com/cdn/expire-10-y/jquery/3.6.0/jquery.min.js // @require https://lf9-cdn-tos.bytecdntp.com/cdn/expire-10-y/highlight.js/11.4.0/highlight.min.js // @require https://lib.baomitu.com/markdown-it/13.0.1/markdown-it.min.js // @require https://lib.baomitu.com/dompurify/3.1.6/purify.min.js // @require https://lib.baomitu.com/crypto-js/4.2.0/crypto-js.min.js // @resource ElementPlus https://lib.baomitu.com/element-plus/2.8.2/index.min.css // @resource ElementPlusStyle https://lib.baomitu.com/element-plus/2.8.2/index.min.css // @resource ttf https://www.forestpolice.org/ttf/2.0/table.json // @connect 127.0.0.1 // @connect icodef.com // @connect muketool.com // @connect wk66.top // @connect 82.157.105.20 // @connect tikuhai.com // @connect zhihuishu.com // @connect yuketang.cn // @connect greasyfork.org // @connect chaoxing.com // @connect shou.org.cn // @connect jsdelivr.net // @grant GM_addStyle // @grant GM_deleteValue // @grant GM_getResourceText // @grant GM_getValue // @grant GM_info // @grant GM_listValues // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant unsafeWindow // @run-at document-start // @antifeature payment 第三方接口存在付费项 // ==/UserScript== // hello (function (vue, P, I, M, z, B, G) { 'use strict'; var e = Object.defineProperty; let V; const setActivePinia = e => V = e, N = Symbol(); function isPlainObject(e) { return e && "object" == typeof e && "[object Object]" === Object.prototype.toString.call(e) && "function" != typeof e.toJSON; } var R, W; (W = R || (R = {})).direct = "direct", W.patchObject = "patch object", W.patchFunction = "patch function"; const noop = () => {}; function addSubscription(e, t, n, a = noop) { e.push(t); const removeSubscription = () => { const n = e.indexOf(t); n > -1 && (e.splice(n, 1), a()); }; return !n && vue.getCurrentScope() && vue.onScopeDispose(removeSubscription), removeSubscription; } function triggerSubscriptions(e, ...t) { e.slice().forEach((e => { e(...t); })); } const fallbackRunWithContext = e => e(), Q = Symbol(), J = Symbol(); function mergeReactiveObjects(e, t) { e instanceof Map && t instanceof Map ? t.forEach(((t, n) => e.set(n, t))) : e instanceof Set && t instanceof Set && t.forEach(e.add, e); for (const n in t) { if (!t.hasOwnProperty(n)) continue; const a = t[n], s = e[n]; isPlainObject(s) && isPlainObject(a) && e.hasOwnProperty(n) && !vue.isRef(a) && !vue.isReactive(a) ? e[n] = mergeReactiveObjects(s, a) : e[n] = a; } return e; } const X = Symbol(); const {assign: Y} = Object; function createSetupStore(e, a, s = {}, o, p, h) { let m; const f = Y({ actions: {} }, s), y = { deep: !0 }; let g, w, v, b = [], k = []; const x = o.state.value[e]; let _; function $patch(t) { let n; g = w = !1, "function" == typeof t ? (t(o.state.value[e]), n = { type: R.patchFunction, storeId: e, events: v }) : (mergeReactiveObjects(o.state.value[e], t), n = { type: R.patchObject, payload: t, storeId: e, events: v }); const a = _ = Symbol(); vue.nextTick().then((() => { _ === a && (g = !0); })), w = !0, triggerSubscriptions(b, n, o.state.value[e]); } h || x || (o.state.value[e] = {}), vue.ref({}); const q = h ? function() { const {state: e} = s, t = e ? e() : {}; this.$patch((e => { Y(e, t); })); } : noop; const action = (t, n = "") => { if (Q in t) return t[J] = n, t; const wrappedAction = function() { setActivePinia(o); const n = Array.from(arguments), a = [], s = []; let i; triggerSubscriptions(k, { args: n, name: wrappedAction[J], store: T, after: function(e) { a.push(e); }, onError: function(e) { s.push(e); } }); try { i = t.apply(this && this.$id === e ? this : T, n); } catch (r) { throw triggerSubscriptions(s, r), r; } return i instanceof Promise ? i.then((e => (triggerSubscriptions(a, e), e))).catch((e => (triggerSubscriptions(s, e), Promise.reject(e)))) : (triggerSubscriptions(a, i), i); }; return wrappedAction[Q] = !0, wrappedAction[J] = n, wrappedAction; }, C = { _p: o, $id: e, $onAction: addSubscription.bind(null, k), $patch: $patch, $reset: q, $subscribe(t, n = {}) { const a = addSubscription(b, t, n.detached, (() => s())), s = m.run((() => vue.watch((() => o.state.value[e]), (a => { ("sync" === n.flush ? w : g) && t({ storeId: e, type: R.direct, events: v }, a); }), Y({}, y, n)))); return a; }, $dispose: function() { m.stop(), b = [], k = [], o._s.delete(e); } }, T = vue.reactive(C); o._s.set(e, T); const A = (o._a && o._a.runWithContext || fallbackRunWithContext)((() => o._e.run((() => (m = vue.effectScope()).run((() => a({ action: action }))))))); for (const t in A) { const n = A[t]; if (vue.isRef(n) && (!vue.isRef(U = n) || !U.effect) || vue.isReactive(n)) h || (!x || isPlainObject(S = n) && S.hasOwnProperty(X) || (vue.isRef(n) ? n.value = x[t] : mergeReactiveObjects(n, x[t])), o.state.value[e][t] = n); else if ("function" == typeof n) { const e = action(n, t); A[t] = e, f.actions[t] = n; } } var S, U; return Y(T, A), Y(vue.toRaw(T), A), Object.defineProperty(T, "$state", { get: () => o.state.value[e], set: e => { $patch((t => { Y(t, e); })); } }), o._p.forEach((e => { Y(T, m.run((() => e({ store: T, app: o._a, pinia: o, options: f })))); })), x && h && s.hydrate && s.hydrate(T.$state, x), g = !0, w = !0, T; } function defineStore(e, t, n) { let i, r; const l = "function" == typeof t; function useStore(e, n) { const c = vue.hasInjectionContext(); (e = e || (c ? vue.inject(N, null) : null)) && setActivePinia(e), (e = V)._s.has(i) || (l ? createSetupStore(i, t, r, e) : function(e, t, n) { const {state: s, actions: o, getters: i} = t, r = n.state.value[e]; createSetupStore(e, (function() { r || (n.state.value[e] = s ? s() : {}); const t = vue.toRefs(n.state.value[e]); return Y(t, o, Object.keys(i || {}).reduce(((t, s) => (t[s] = vue.markRaw(vue.computed((() => { setActivePinia(n); const t = n._s.get(e); return i[s].call(t, t); }))), t)), {})); }), t, n, 0, !0); }(i, r, e)); return e._s.get(i); } return "string" == typeof e ? (i = e, r = l ? n : t) : (r = e, i = e.id), useStore.$id = i, useStore; } var Z = (() => "undefined" != typeof GM_deleteValue ? GM_deleteValue : void 0)(), K = (() => "undefined" != typeof GM_getResourceText ? GM_getResourceText : void 0)(), ee = (() => "undefined" != typeof GM_getValue ? GM_getValue : void 0)(), te = (() => "undefined" != typeof GM_info ? GM_info : void 0)(), ne = (() => "undefined" != typeof GM_listValues ? GM_listValues : void 0)(), ae = (() => "undefined" != typeof GM_setValue ? GM_setValue : void 0)(), se = (() => "undefined" != typeof GM_xmlhttpRequest ? GM_xmlhttpRequest : void 0)(), oe = (() => "undefined" != typeof unsafeWindow ? unsafeWindow : void 0)(); const ie = "AiAsk_"; class Cache { static set(e, t, n = 0) { e = ie + e; const a = { value: t, expire: n > 0 ? Date.now() + 1e3 * n : 0 }; return ae(e, a), ee(e); } static get(e, t = null) { const n = ee(e = ie + e); return n && n.expire && n.expire < Date.now() ? (Z(e), t) : n ? n.value : t; } static match(e) { return e = ie + e, ne().filter((t => t.startsWith(e))); } static matchGet(e) { const t = ie + e; let n = ne().filter((e => e.startsWith(t))).map((e => { const t = ee(e, { value: null, expire: 0 }).value; return t && (t.key = e.replace(ie, "")), t; })).filter((e => null !== e)); return n.sort(((e, t) => (t.createTime || 0) - (e.createTime || 0))), n; } static remove(e) { Z(ie + e); } static clear() { ne().filter((e => e.startsWith(ie))).forEach(Z); } static matchRemove(e) { e = ie + e, ne().filter((t => t.startsWith(e))).forEach(Z); } } function getDefaultExportFromCjs(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var re, le, ce = { exports: {} }, ue = { exports: {} }; re = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", le = { rotl: function(e, t) { return e << t | e >>> 32 - t; }, rotr: function(e, t) { return e << 32 - t | e >>> t; }, endian: function(e) { if (e.constructor == Number) return 16711935 & le.rotl(e, 8) | 4278255360 & le.rotl(e, 24); for (var t = 0; t < e.length; t++) e[t] = le.endian(e[t]); return e; }, randomBytes: function(e) { for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random())); return t; }, bytesToWords: function(e) { for (var t = [], n = 0, a = 0; n < e.length; n++, a += 8) t[a >>> 5] |= e[n] << 24 - a % 32; return t; }, wordsToBytes: function(e) { for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>> 24 - n % 32 & 255); return t; }, bytesToHex: function(e) { for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(16)), t.push((15 & e[n]).toString(16)); return t.join(""); }, hexToBytes: function(e) { for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(n, 2), 16)); return t; }, bytesToBase64: function(e) { for (var t = [], n = 0; n < e.length; n += 3) for (var a = e[n] << 16 | e[n + 1] << 8 | e[n + 2], s = 0; s < 4; s++) 8 * n + 6 * s <= 8 * e.length ? t.push(re.charAt(a >>> 6 * (3 - s) & 63)) : t.push("="); return t.join(""); }, base64ToBytes: function(e) { e = e.replace(/[^A-Z0-9+\/]/gi, ""); for (var t = [], n = 0, a = 0; n < e.length; a = ++n % 4) 0 != a && t.push((re.indexOf(e.charAt(n - 1)) & Math.pow(2, -2 * a + 8) - 1) << 2 * a | re.indexOf(e.charAt(n)) >>> 6 - 2 * a); return t; } }, ue.exports = le; var pe, he, de, me, fe, ye = ue.exports, ge = { utf8: { stringToBytes: function(e) { return ge.bin.stringToBytes(unescape(encodeURIComponent(e))); }, bytesToString: function(e) { return decodeURIComponent(escape(ge.bin.bytesToString(e))); } }, bin: { stringToBytes: function(e) { for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n)); return t; }, bytesToString: function(e) { for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[n])); return t.join(""); } } }, we = ge, isBuffer_1 = function(e) { return null != e && (isBuffer(e) || function(e) { return "function" == typeof e.readFloatLE && "function" == typeof e.slice && isBuffer(e.slice(0, 0)); }(e) || !!e._isBuffer); }; function isBuffer(e) { return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e); } pe = ye, he = we.utf8, de = isBuffer_1, me = we.bin, (fe = function(e, t) { e.constructor == String ? e = t && "binary" === t.encoding ? me.stringToBytes(e) : he.stringToBytes(e) : de(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || e.constructor === Uint8Array || (e = e.toString()); for (var n = pe.bytesToWords(e), a = 8 * e.length, s = 1732584193, o = -271733879, i = -1732584194, r = 271733878, l = 0; l < n.length; l++) n[l] = 16711935 & (n[l] << 8 | n[l] >>> 24) | 4278255360 & (n[l] << 24 | n[l] >>> 8); n[a >>> 5] |= 128 << a % 32, n[14 + (a + 64 >>> 9 << 4)] = a; var c = fe._ff, u = fe._gg, p = fe._hh, h = fe._ii; for (l = 0; l < n.length; l += 16) { var d = s, m = o, f = i, y = r; s = c(s, o, i, r, n[l + 0], 7, -680876936), r = c(r, s, o, i, n[l + 1], 12, -389564586), i = c(i, r, s, o, n[l + 2], 17, 606105819), o = c(o, i, r, s, n[l + 3], 22, -1044525330), s = c(s, o, i, r, n[l + 4], 7, -176418897), r = c(r, s, o, i, n[l + 5], 12, 1200080426), i = c(i, r, s, o, n[l + 6], 17, -1473231341), o = c(o, i, r, s, n[l + 7], 22, -45705983), s = c(s, o, i, r, n[l + 8], 7, 1770035416), r = c(r, s, o, i, n[l + 9], 12, -1958414417), i = c(i, r, s, o, n[l + 10], 17, -42063), o = c(o, i, r, s, n[l + 11], 22, -1990404162), s = c(s, o, i, r, n[l + 12], 7, 1804603682), r = c(r, s, o, i, n[l + 13], 12, -40341101), i = c(i, r, s, o, n[l + 14], 17, -1502002290), s = u(s, o = c(o, i, r, s, n[l + 15], 22, 1236535329), i, r, n[l + 1], 5, -165796510), r = u(r, s, o, i, n[l + 6], 9, -1069501632), i = u(i, r, s, o, n[l + 11], 14, 643717713), o = u(o, i, r, s, n[l + 0], 20, -373897302), s = u(s, o, i, r, n[l + 5], 5, -701558691), r = u(r, s, o, i, n[l + 10], 9, 38016083), i = u(i, r, s, o, n[l + 15], 14, -660478335), o = u(o, i, r, s, n[l + 4], 20, -405537848), s = u(s, o, i, r, n[l + 9], 5, 568446438), r = u(r, s, o, i, n[l + 14], 9, -1019803690), i = u(i, r, s, o, n[l + 3], 14, -187363961), o = u(o, i, r, s, n[l + 8], 20, 1163531501), s = u(s, o, i, r, n[l + 13], 5, -1444681467), r = u(r, s, o, i, n[l + 2], 9, -51403784), i = u(i, r, s, o, n[l + 7], 14, 1735328473), s = p(s, o = u(o, i, r, s, n[l + 12], 20, -1926607734), i, r, n[l + 5], 4, -378558), r = p(r, s, o, i, n[l + 8], 11, -2022574463), i = p(i, r, s, o, n[l + 11], 16, 1839030562), o = p(o, i, r, s, n[l + 14], 23, -35309556), s = p(s, o, i, r, n[l + 1], 4, -1530992060), r = p(r, s, o, i, n[l + 4], 11, 1272893353), i = p(i, r, s, o, n[l + 7], 16, -155497632), o = p(o, i, r, s, n[l + 10], 23, -1094730640), s = p(s, o, i, r, n[l + 13], 4, 681279174), r = p(r, s, o, i, n[l + 0], 11, -358537222), i = p(i, r, s, o, n[l + 3], 16, -722521979), o = p(o, i, r, s, n[l + 6], 23, 76029189), s = p(s, o, i, r, n[l + 9], 4, -640364487), r = p(r, s, o, i, n[l + 12], 11, -421815835), i = p(i, r, s, o, n[l + 15], 16, 530742520), s = h(s, o = p(o, i, r, s, n[l + 2], 23, -995338651), i, r, n[l + 0], 6, -198630844), r = h(r, s, o, i, n[l + 7], 10, 1126891415), i = h(i, r, s, o, n[l + 14], 15, -1416354905), o = h(o, i, r, s, n[l + 5], 21, -57434055), s = h(s, o, i, r, n[l + 12], 6, 1700485571), r = h(r, s, o, i, n[l + 3], 10, -1894986606), i = h(i, r, s, o, n[l + 10], 15, -1051523), o = h(o, i, r, s, n[l + 1], 21, -2054922799), s = h(s, o, i, r, n[l + 8], 6, 1873313359), r = h(r, s, o, i, n[l + 15], 10, -30611744), i = h(i, r, s, o, n[l + 6], 15, -1560198380), o = h(o, i, r, s, n[l + 13], 21, 1309151649), s = h(s, o, i, r, n[l + 4], 6, -145523070), r = h(r, s, o, i, n[l + 11], 10, -1120210379), i = h(i, r, s, o, n[l + 2], 15, 718787259), o = h(o, i, r, s, n[l + 9], 21, -343485551), s = s + d >>> 0, o = o + m >>> 0, i = i + f >>> 0, r = r + y >>> 0; } return pe.endian([ s, o, i, r ]); })._ff = function(e, t, n, a, s, o, i) { var r = e + (t & n | ~t & a) + (s >>> 0) + i; return (r << o | r >>> 32 - o) + t; }, fe._gg = function(e, t, n, a, s, o, i) { var r = e + (t & a | n & ~a) + (s >>> 0) + i; return (r << o | r >>> 32 - o) + t; }, fe._hh = function(e, t, n, a, s, o, i) { var r = e + (t ^ n ^ a) + (s >>> 0) + i; return (r << o | r >>> 32 - o) + t; }, fe._ii = function(e, t, n, a, s, o, i) { var r = e + (n ^ (t | ~a)) + (s >>> 0) + i; return (r << o | r >>> 32 - o) + t; }, fe._blocksize = 16, fe._digestsize = 16, ce.exports = function(e, t) { if (null == e) throw new Error("Illegal argument " + e); var n = pe.wordsToBytes(fe(e, t)); return t && t.asBytes ? n : t && t.asString ? me.bytesToString(n) : pe.bytesToHex(n); }; const ve = getDefaultExportFromCjs(ce.exports), be = [ { type: "hook", name: "\u4e91\u5e55\u5b66\u82d1hook", match: location.host.includes("w-ling.cn"), main: e => { oe.mainClass = M("#app")[0].__vue__.$route.path; let t = new MutationObserver((async e => { oe.mainClass !== M("#app")[0].__vue__.$route.path && (oe.mainClass = M("#app")[0].__vue__.$route.path, "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 !== M(".selectDan").length; })), vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "\u4e91\u5e55\u5b66\u82d1\u6536\u5f55", match: () => location.host.includes("w-ling.cn") && location.href.includes("practiceRecord"), question: { html: ".selectDan >div >div", question: ".title", options: ".selectItem label .tagbq", type: ".question-box .tag", workType: "yunmuxueyuan", pageType: "yunmuxueyuan" }, init: async () => { await waitUntil((function() { return isExist(".selectDan >div >div"); })); }, answerHook: e => { const t = M(e.html).parent().find("h3").text().split("\u3001")[1]; e.question = e.question.replace(/^\d+\u3001/, ""), e.question = e.question.replace(/\(\d+\u5206\)$/, ""); let n = M(e.html).find(".anaylize > span:eq(0)").text().replace("\u4f5c\u7b54\u6b63\u786e\uff1a", ""); switch ("" === n && (n = M(e.html).find(".falsanaly > span:eq(1)").text().replace("\u6b63\u786e\u7b54\u6848\uff1a", "")), t) { case "\u5355\u9009\u9898": case "\u591a\u9009\u9898": let t = n.split(""); if (e.answer = t.map((t => e.options[t.charCodeAt(0) - 65])), 0 === e.answer.length) return; e.answer.length > 1 ? e.type = "1" : e.type = "0"; break; case "\u5224\u65ad\u9898": e.type = "3", "T" == n && (e.answer = [ "\u6b63\u786e" ]), "F" == n && (e.answer = [ "\u9519\u8bef" ]); break; case "\u586b\u7a7a\u9898": e.answer = M(e.html).find(".riganswer > span").first().nextAll("span").map(((e, t) => removeHtml(M(t).text()))).get(), e.type = "2"; } return e; } }, { type: "ask", name: "\u4e91\u5e55\u5b66\u82d1", tips: "\u4e91\u5e55\u5b66\u82d1\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u5f85\u9002\u914d", match: () => location.host.includes("w-ling.cn") && (location.href.includes("practicePaper") || location.href.includes("examIndex")), question: { html: ".selectDan >div >div", question: ".title", options: ".selectItem label .tagbq", type: ".question-box .tag", workType: "yunmuxueyuan", pageType: "yunmuxueyuan" }, init: async () => { await waitUntil((function() { return 0 !== M(".selectDan >div >div").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { e.question = e.question.replace(/^\d+\u3001/, ""), e.question = e.question.replace(/\(\d+\u5206\)$/, ""); switch (M(e.html).parent().find("h4").text().split("\u3001")[1]) { case "\u5355\u9009\u9898": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.type = "3", e.$options = M(e.html).find(".selectItem label"), e.options = e.$options.map(((e, t) => removeHtml(M(t).text()))).get(), e.$options; break; case "\u586b\u7a7a\u9898": e.type = "2"; } return e; }, setAnswer: e => { switch (e.type) { case "3": break; case "2": return M(e.html).find(".tiankong input").each(((t, n) => { let a = M(n).parent()[0].__vue__; M(n).val(e.answer[t]); const s = new Event("input"); n.dispatchEvent(s), a.$emit("change", e.answer[t]); })), !1; } return !0; }, finish: e => {} } ]; class Answer { constructor() {} static score(e, t) { let n = Cache.get("api_" + e, { score: 0 }); n.score += t, Cache.set("api_" + e, n, 600); } static async getAllAnswers(e) { const t = [ this.getAnswer3(e), this.getAnswer1(e) ]; return Promise.all(t); } static async getAnswers(e) { const t = [ this.getAnswer3(e) ]; return Promise.all(t); } static async getAnswersFree(e) { const t = [ this.getMainAnswer(e), this.getAnswer1(e) ]; return Promise.all(t); } static async getAnswer1(e) { let t = function() { let e = Array.from({ length: 4 }, (() => Math.floor(255 * Math.random()))).join("."); return { "X-Forwarded-For": e, "X-Real-IP": e }; }(); return new Promise((n => { request("http://cx.icodef.com/wyn-nb?v=4", "POST", { question: e.question }, t).then((e => { let t = e[1]; try { e = JSON.parse(e[0].responseText); } catch (s) { n({ form: "\u514d\u8d39\u9898\u5e93", answer: null, error: s, duration: t }); } let a = ""; if (1 === e.code) { let t = e.data.replace(/javascript:void\(0\);/g, "").trim().replace(/\n/g, ""); [ "\u53db\u9006", "\u516c\u4f17\u53f7", "\u674e\u6052\u96c5", "\u4e00\u4e4b" ].every((e => !t.includes(e))) && (a = t.split("#")); } n({ form: "\u514d\u8d39\u9898\u5e93", answer: a, duration: t }); })).catch((e => { "timeout" === e && this.score("icodef", -1), n({ form: "\u514d\u8d39\u9898\u5e93", answer: "", msg: e, duration: 5e3 }); })); })); } static async getAnswer2(e) { return new Promise((t => { [ 0, 1, 2 ].includes(parseInt(e.type)) ? request("https://api.muketool.com/cx/v2/query", "POST", { question: e.question, type: parseInt(e.type) }, {}).then((e => { let n = e[1]; e = JSON.parse(e[0].responseText), t({ form: "muketool", answer: 1 === e.code ? e.data.split("#") : "", duration: n }); })).catch((e => { "timeout" === e && this.score("muketool", -1), t({ form: "muketool", answer: "" }); })) : t({ form: "muketool", answer: "", duration: "\u4e0d\u652f\u6301\u7684\u9898\u578b" }); })); } static async getAnswer3(e) { const t = { "Content-Type": "application/json", referer: location.href, v: mt.version }, n = { question: e.question, options: e.options.map((e => e)), type: e.type, questionData: e.html.innerHTML, workType: e.workType, key: gt.key ?? "" }; return new Promise((e => { request("https://api.tikuhai.com/search", "POST", n, t).then((t => { let n = t[1]; 200 === (t = JSON.parse(t[0].responseText)).code ? e({ form: "\u4ed8\u8d39\u9898\u5e93", answer: t.data.answer, duration: n, msg: t.msg }) : e({ form: "\u4ed8\u8d39\u9898\u5e93", answer: "", duration: n, msg: t.msg }); })).catch((t => { "timeout" === t && this.score("tikuhai", -1), e({ form: "\u4ed8\u8d39\u9898\u5e93", answer: "", error: t, duration: 10, msg: "\u8bf7\u6c42\u5931\u8d25" }); })); })); } static getTimestamp() { return Math.floor((new Date).getTime() / 1e3); } static cacheAnswer(e) { const t = { type: e.type, question: e.question, options: e.options, answer: e.answer }, n = questionHash(t.type, t.question, t.options); t.createTime = this.getTimestamp(), Cache.set("ques1_" + n, t); } static async getCacheAnswer(e) { const t = questionHash(e.type, e.question, e.options); let n = Cache.get("ques1_" + t); return n ? { form: "\u672c\u5730\u7f13\u5b58", answer: n.answer, duration: 10 } : { form: "\u672c\u5730\u7f13\u5b58", answer: "", duration: 10, msg: "\u672a\u627e\u5230\u7f13\u5b58" }; } static getMainAnswer(e) { const t = { type: e.type, question: e.question, options: e.options.map((e => e)), html: e.html.innerHTML, workType: e.workType, pageType: e.pageType }, n = env("http://127.0.0.1:9966/api/search", "https://aiask.wk66.top/api/search"); return new Promise((e => { requestApi(n, "POST", t, {}).then((t => { let n = t[1]; 200 === (t = JSON.parse(t[0].responseText)).code ? e({ form: "\u7231\u95ee\u7b54\u9898\u5e93", answer: t.data.answer, duration: n, msg: t.msg }) : e({ form: "\u7231\u95ee\u7b54\u9898\u5e93", answer: "", duration: n, msg: t.msg }); })).catch((t => { e({ form: "\u7231\u95ee\u7b54\u9898\u5e93", answer: "", error: t, duration: 10, msg: "\u8bf7\u6c42\u5931\u8d25" }); })); })); } static async syncQuestionList(e) { return new Promise((t => { requestApi(env("http://127.0.0.1:9966/api/sync", "https://aiask.wk66.top/api/sync"), "POST", e, {}).then((e => { e[0].responseText, t(e[0].responseText); })).catch((e => { t(e); })); })); } static async syncPaper(e) { return new Promise((t => { requestApi(env("http://127.0.0.1:9966/api/syncPaper", "https://aiask.wk66.top/api/syncPaper"), "POST", e, {}).then((e => { e[0].responseText, t(e[0].responseText); })).catch((e => { t(e); })); })); } } const defaultSetAnswer = async (e, t, n, a) => { var s; switch (e) { case "xx": for (let s = 0; s < n.$options.length; s++) if (t.includes(s)) { if (a.ischecked && a.ischecked(n.$options.eq(s))) continue; n.$options.eq(s).click(), await sleep(Math.floor(300 * Math.random() + 200)); } else a.ischecked && a.ischecked(n.$options.eq(s)) && (n.$options.eq(s).click(), await sleep(Math.floor(300 * Math.random() + 200))); break; case "pd": let e = t; 0 == n.options.length ? n.$options.each(((t, n) => { isTrue(e) && isTrue(removeHtml(M(n).html())) && M(n).click(), isFalse(e) && isFalse(removeHtml(M(n).html())) && M(n).click(); })) : n.$options.each(((t, a) => { isTrue(e) && isTrue(n.options[t]) && M(a).click(), isFalse(e) && isFalse(n.options[t]) && M(a).click(); })); break; case "jd": M(n.html).find("textarea").each((function(e) { oe.UE.getEditor(M(this).attr("name")).ready((function() { this.setContent(t[e].replace(/\u7b2c.\u7a7a:/g, "")); })); })), null == (s = M(n.html).find(".savebtndiv>a")) || s.click(); } }, ApiAnswerMatch = (e, t) => { const n = getAskStore(); let a, s = 0, o = !0, i = t.type, r = t.html, l = [], c = [ "", l, t, n.rule ]; switch (t.$options && "function" == typeof t.$options && (t.$options = t.$options()), i) { case "0": case "1": for (let a = 0; a < e.length; a++) { let n = e[a].answer; "" == n && (n = []); let s = matchAnswer(n, t.options); e[a].match = s; } if (l = e.filter((e => e.match.length > 0)), 0 === l.length) return { res: e, haveAnswer: !1 }; if (l.length > 1) { if (!l.every((e => e.match.length === l[0].match.length))) { let e = l[0]; for (let t = 1; t < l.length; t++) l[t].match.length > e.match.length && (e = l[t]); l = [ e ]; } } let n = l[0].match; c[0] = "xx", c[1] = n; break; case "3": if (l = e.map((e => { let t = e.answer; return "object" == typeof t && (t = t[0]), isTrue(t) ? e.answer = "\u6b63\u786e" : isFalse(t) ? e.answer = "\u9519\u8bef" : e.answer = "", e; })), l = e.filter((e => "" !== e.answer)), 0 === l.length) return { res: e, haveAnswer: !1 }; c[0] = "pd", c[1] = l[0].answer; break; case "2": case "9": case "4": case "5": case "6": case "7": if (s = M(r).find("textarea").length, 0 === s && (s = t.$options.length), l = e.filter((e => e.answer.length > 0)), 0 === l.length) return { res: e, haveAnswer: !1 }; if (a = l[0].answer, "string" == typeof a && (a = [ a ]), 0 !== s && (l = l.filter((e => ("string" == typeof e.answer ? 1 : e.answer.length) === s)), 0 === l.length)) return { res: e, haveAnswer: !1 }; c[0] = "jd", c[1] = a; break; case "14": if (s = t.$options.length, l = e.filter((e => e.answer.length > 0 && e.answer.length === s)), 0 === l.length) return { res: e, haveAnswer: !1 }; if (a = l[0].answer, l = l.filter((e => ("string" == typeof e.answer ? 1 : e.answer.length) === s)), 0 === l.length) return { res: e, haveAnswer: !1 }; c[0] = "wxtk", c[1] = a; break; case "11": if (l = e.filter((e => "object" == typeof e.answer)), 0 === l.length) return { res: e, haveAnswer: !1 }; a = l[0].answer, c[0] = "lx", c[1] = a; break; default: return { res: e, haveAnswer: !1 }; } return n.rule.setAnswerHook && "function" == typeof n.rule.setAnswerHook && n.rule.setAnswerHook({ type: i, answer: c[1], html: t.html, ques: t }), n.rule.setAnswer && "function" == typeof n.rule.setAnswer && (o = n.rule.setAnswer({ type: i, answer: c[1], html: r, ques: t, rule: n.rule })), o && defaultSetAnswer(c[0], c[1], t, n.rule), { res: e, form: l ? l[0] : [], haveAnswer: !0 }; }, ke = class _Paper { static getPaper(e) { return Cache.get(`${_Paper.prefix}_${e}`); } static setPaper(e, t) { if (!e || !t) return; const n = _Paper.getPaper(e) || { chapter: [] }; t.chapter && t.chapter.forEach((e => { const t = n.chapter.find((t => t.hash === e.hash)); t ? (e.question.forEach((e => { const n = t.question.findIndex((t => t.hash === e.hash)); -1 !== n ? t.question[n] = e : t.question.push(e); })), Object.keys(e).forEach((n => { "question" !== n && (t[n] = e[n]); }))) : n.chapter.push(e); })), Object.keys(t).forEach((e => { "chapter" !== e && (n[e] = t[e]); })), Cache.set(`${_Paper.prefix}_${e}`, n), Answer.syncPaper(n); } static hasChapter(e, t) { const n = _Paper.getPaper(e); return !(!n || !n.chapter) && n.chapter.some((e => e.hash === t)); } }; var xe; ((t, n, a) => { n in t ? e(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a; })(ke, "symbol" != typeof (xe = "prefix") ? xe + "" : xe, "paper_"); let _e = ke; var qe = { parse: function(e) { var t = qe._bin, n = new Uint8Array(e), a = 0; t.readFixed(n, a), a += 4; var s = t.readUshort(n, a); a += 2, t.readUshort(n, a), a += 2, t.readUshort(n, a), a += 2, t.readUshort(n, a), a += 2; for (var o = [ "cmap", "head", "hhea", "maxp", "hmtx", "name", "OS/2", "post", "loca", "glyf", "kern", "CFF ", "GPOS", "GSUB", "SVG " ], i = { _data: n }, r = {}, l = 0; l < s; l++) { var c = t.readASCII(n, a, 4); a += 4, t.readUint(n, a), a += 4; var u = t.readUint(n, a); a += 4; var p = t.readUint(n, a); a += 4, r[c] = { offset: u, length: p }; } for (l = 0; l < o.length; l++) { var h = o[l]; r[h] && (i[h.trim()] = qe[h.trim()].parse(n, r[h].offset, r[h].length, i)); } return i; }, _tabOffset: function(e, t) { for (var n = qe._bin, a = n.readUshort(e, 4), s = 12, o = 0; o < a; o++) { var i = n.readASCII(e, s, 4); s += 4, n.readUint(e, s), s += 4; var r = n.readUint(e, s); if (s += 4, n.readUint(e, s), s += 4, i == t) return r; } return 0; } }; qe._bin = { readFixed: function(e, t) { return (e[t] << 8 | e[t + 1]) + (e[t + 2] << 8 | e[t + 3]) / 65540; }, readF2dot14: function(e, t) { return qe._bin.readShort(e, t) / 16384; }, readInt: function(e, t) { var n = qe._bin.t.uint8; return n[0] = e[t + 3], n[1] = e[t + 2], n[2] = e[t + 1], n[3] = e[t], qe._bin.t.int32[0]; }, readInt8: function(e, t) { return qe._bin.t.uint8[0] = e[t], qe._bin.t.int8[0]; }, readShort: function(e, t) { var n = qe._bin.t.uint8; return n[1] = e[t], n[0] = e[t + 1], qe._bin.t.int16[0]; }, readUshort: function(e, t) { return e[t] << 8 | e[t + 1]; }, readUshorts: function(e, t, n) { for (var a = [], s = 0; s < n; s++) a.push(qe._bin.readUshort(e, t + 2 * s)); return a; }, readUint: function(e, t) { var n = qe._bin.t.uint8; return n[3] = e[t], n[2] = e[t + 1], n[1] = e[t + 2], n[0] = e[t + 3], qe._bin.t.uint32[0]; }, readUint64: function(e, t) { return 4294967296 * qe._bin.readUint(e, t) + qe._bin.readUint(e, t + 4); }, readASCII: function(e, t, n) { for (var a = "", s = 0; s < n; s++) a += String.fromCharCode(e[t + s]); return a; }, readUnicode: function(e, t, n) { for (var a = "", s = 0; s < n; s++) { var o = e[t++] << 8 | e[t++]; a += String.fromCharCode(o); } return a; }, _tdec: window.TextDecoder ? new window.TextDecoder : null, readUTF8: function(e, t, n) { var a = qe._bin._tdec; return a && 0 == t && n == e.length ? a.decode(e) : qe._bin.readASCII(e, t, n); }, readBytes: function(e, t, n) { for (var a = [], s = 0; s < n; s++) a.push(e[t + s]); return a; }, readASCIIArray: function(e, t, n) { for (var a = [], s = 0; s < n; s++) a.push(String.fromCharCode(e[t + s])); return a; } }, qe._bin.t = { buff: new ArrayBuffer(8) }, qe._bin.t.int8 = new Int8Array(qe._bin.t.buff), qe._bin.t.uint8 = new Uint8Array(qe._bin.t.buff), qe._bin.t.int16 = new Int16Array(qe._bin.t.buff), qe._bin.t.uint16 = new Uint16Array(qe._bin.t.buff), qe._bin.t.int32 = new Int32Array(qe._bin.t.buff), qe._bin.t.uint32 = new Uint32Array(qe._bin.t.buff), qe._lctf = {}, qe._lctf.parse = function(e, t, n, a, s) { var o = qe._bin, i = {}, r = t; o.readFixed(e, t), t += 4; var l = o.readUshort(e, t); t += 2; var c = o.readUshort(e, t); t += 2; var u = o.readUshort(e, t); return t += 2, i.scriptList = qe._lctf.readScriptList(e, r + l), i.featureList = qe._lctf.readFeatureList(e, r + c), i.lookupList = qe._lctf.readLookupList(e, r + u, s), i; }, qe._lctf.readLookupList = function(e, t, n) { var a = qe._bin, s = t, o = [], i = a.readUshort(e, t); t += 2; for (var r = 0; r < i; r++) { var l = a.readUshort(e, t); t += 2; var c = qe._lctf.readLookupTable(e, s + l, n); o.push(c); } return o; }, qe._lctf.readLookupTable = function(e, t, n) { var a = qe._bin, s = t, o = { tabs: [] }; o.ltype = a.readUshort(e, t), t += 2, o.flag = a.readUshort(e, t), t += 2; var i = a.readUshort(e, t); t += 2; for (var r = 0; r < i; r++) { var l = a.readUshort(e, t); t += 2; var c = n(e, o.ltype, s + l); o.tabs.push(c); } return o; }, qe._lctf.numOfOnes = function(e) { for (var t = 0, n = 0; n < 32; n++) e >>> n & 1 && t++; return t; }, qe._lctf.readClassDef = function(e, t) { var n = qe._bin, a = [], s = n.readUshort(e, t); if (t += 2, 1 == s) { var o = n.readUshort(e, t); t += 2; var i = n.readUshort(e, t); t += 2; for (var r = 0; r < i; r++) a.push(o + r), a.push(o + r), a.push(n.readUshort(e, t)), t += 2; } if (2 == s) { var l = n.readUshort(e, t); t += 2; for (r = 0; r < l; r++) a.push(n.readUshort(e, t)), t += 2, a.push(n.readUshort(e, t)), t += 2, a.push(n.readUshort(e, t)), t += 2; } return a; }, qe._lctf.getInterval = function(e, t) { for (var n = 0; n < e.length; n += 3) { var a = e[n], s = e[n + 1]; if (e[n + 2], a <= t && t <= s) return n; } return -1; }, qe._lctf.readValueRecord = function(e, t, n) { var a = qe._bin, s = []; return s.push(1 & n ? a.readShort(e, t) : 0), t += 1 & n ? 2 : 0, s.push(2 & n ? a.readShort(e, t) : 0), t += 2 & n ? 2 : 0, s.push(4 & n ? a.readShort(e, t) : 0), t += 4 & n ? 2 : 0, s.push(8 & n ? a.readShort(e, t) : 0), t += 8 & n ? 2 : 0, s; }, qe._lctf.readCoverage = function(e, t) { var n = qe._bin, a = {}; a.fmt = n.readUshort(e, t), t += 2; var s = n.readUshort(e, t); return t += 2, 1 == a.fmt && (a.tab = n.readUshorts(e, t, s)), 2 == a.fmt && (a.tab = n.readUshorts(e, t, 3 * s)), a; }, qe._lctf.coverageIndex = function(e, t) { var n = e.tab; if (1 == e.fmt) return n.indexOf(t); if (2 == e.fmt) { var a = qe._lctf.getInterval(n, t); if (-1 != a) return n[a + 2] + (t - n[a]); } return -1; }, qe._lctf.readFeatureList = function(e, t) { var n = qe._bin, a = t, s = [], o = n.readUshort(e, t); t += 2; for (var i = 0; i < o; i++) { var r = n.readASCII(e, t, 4); t += 4; var l = n.readUshort(e, t); t += 2, s.push({ tag: r.trim(), tab: qe._lctf.readFeatureTable(e, a + l) }); } return s; }, qe._lctf.readFeatureTable = function(e, t) { var n = qe._bin; n.readUshort(e, t), t += 2; var a = n.readUshort(e, t); t += 2; for (var s = [], o = 0; o < a; o++) s.push(n.readUshort(e, t + 2 * o)); return s; }, qe._lctf.readScriptList = function(e, t) { var n = qe._bin, a = t, s = {}, o = n.readUshort(e, t); t += 2; for (var i = 0; i < o; i++) { var r = n.readASCII(e, t, 4); t += 4; var l = n.readUshort(e, t); t += 2, s[r.trim()] = qe._lctf.readScriptTable(e, a + l); } return s; }, qe._lctf.readScriptTable = function(e, t) { var n = qe._bin, a = t, s = {}, o = n.readUshort(e, t); t += 2, s.default = qe._lctf.readLangSysTable(e, a + o); var i = n.readUshort(e, t); t += 2; for (var r = 0; r < i; r++) { var l = n.readASCII(e, t, 4); t += 4; var c = n.readUshort(e, t); t += 2, s[l.trim()] = qe._lctf.readLangSysTable(e, a + c); } return s; }, qe._lctf.readLangSysTable = function(e, t) { var n = qe._bin, a = {}; n.readUshort(e, t), t += 2, a.reqFeature = n.readUshort(e, t), t += 2; var s = n.readUshort(e, t); return t += 2, a.features = n.readUshorts(e, t, s), a; }, qe.CFF = {}, qe.CFF.parse = function(e, t, n) { var a = qe._bin; (e = new Uint8Array(e.buffer, t, n))[t = 0], e[++t], e[++t], e[++t], t++; var s = []; t = qe.CFF.readIndex(e, t, s); for (var o = [], i = 0; i < s.length - 1; i++) o.push(a.readASCII(e, t + s[i], s[i + 1] - s[i])); t += s[s.length - 1]; var r = []; t = qe.CFF.readIndex(e, t, r); var l = []; for (i = 0; i < r.length - 1; i++) l.push(qe.CFF.readDict(e, t + r[i], t + r[i + 1])); t += r[r.length - 1]; var c = l[0], u = []; t = qe.CFF.readIndex(e, t, u); var p = []; for (i = 0; i < u.length - 1; i++) p.push(a.readASCII(e, t + u[i], u[i + 1] - u[i])); if (t += u[u.length - 1], qe.CFF.readSubrs(e, t, c), c.CharStrings) { t = c.CharStrings; u = []; t = qe.CFF.readIndex(e, t, u); var h = []; for (i = 0; i < u.length - 1; i++) h.push(a.readBytes(e, t + u[i], u[i + 1] - u[i])); c.CharStrings = h; } c.Encoding && (c.Encoding = qe.CFF.readEncoding(e, c.Encoding, c.CharStrings.length)), c.charset && (c.charset = qe.CFF.readCharset(e, c.charset, c.CharStrings.length)), c.Private && (t = c.Private[1], c.Private = qe.CFF.readDict(e, t, t + c.Private[0]), c.Private.Subrs && qe.CFF.readSubrs(e, t + c.Private.Subrs, c.Private)); var d = {}; for (var m in c) -1 != [ "FamilyName", "FullName", "Notice", "version", "Copyright" ].indexOf(m) ? d[m] = p[c[m] - 426 + 35] : d[m] = c[m]; return d; }, qe.CFF.readSubrs = function(e, t, n) { var a = qe._bin, s = []; t = qe.CFF.readIndex(e, t, s); var o, i = s.length; o = i < 1240 ? 107 : i < 33900 ? 1131 : 32768, n.Bias = o, n.Subrs = []; for (var r = 0; r < s.length - 1; r++) n.Subrs.push(a.readBytes(e, t + s[r], s[r + 1] - s[r])); }, qe.CFF.tableSE = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 0, 111, 112, 113, 114, 0, 115, 116, 117, 118, 119, 120, 121, 122, 0, 123, 0, 124, 125, 126, 127, 128, 129, 130, 131, 0, 132, 133, 0, 134, 135, 136, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 0, 139, 0, 0, 0, 0, 140, 141, 142, 143, 0, 0, 0, 0, 0, 144, 0, 0, 0, 145, 0, 0, 146, 147, 148, 149, 0, 0, 0, 0 ], qe.CFF.glyphByUnicode = function(e, t) { for (var n = 0; n < e.charset.length; n++) if (e.charset[n] == t) return n; return -1; }, qe.CFF.glyphBySE = function(e, t) { return t < 0 || t > 255 ? -1 : qe.CFF.glyphByUnicode(e, qe.CFF.tableSE[t]); }, qe.CFF.readEncoding = function(e, t, n) { qe._bin; var a = [ ".notdef" ], s = e[t]; if (t++, 0 != s) throw "error: unknown encoding format: " + s; var o = e[t]; t++; for (var i = 0; i < o; i++) a.push(e[t + i]); return a; }, qe.CFF.readCharset = function(e, t, n) { var a = qe._bin, s = [ ".notdef" ], o = e[t]; if (t++, 0 == o) for (var i = 0; i < n; i++) { var r = a.readUshort(e, t); t += 2, s.push(r); } else { if (1 != o && 2 != o) throw "error: format: " + o; for (;s.length < n; ) { r = a.readUshort(e, t); t += 2; var l = 0; 1 == o ? (l = e[t], t++) : (l = a.readUshort(e, t), t += 2); for (i = 0; i <= l; i++) s.push(r), r++; } } return s; }, qe.CFF.readIndex = function(e, t, n) { var a = qe._bin, s = a.readUshort(e, t), o = e[t += 2]; if (t++, 1 == o) for (var i = 0; i < s + 1; i++) n.push(e[t + i]); else if (2 == o) for (i = 0; i < s + 1; i++) n.push(a.readUshort(e, t + 2 * i)); else if (3 == o) for (i = 0; i < s + 1; i++) n.push(16777215 & a.readUint(e, t + 3 * i - 1)); else if (0 != s) throw "unsupported offset size: " + o + ", count: " + s; return (t += (s + 1) * o) - 1; }, qe.CFF.getCharString = function(e, t, n) { var a = qe._bin, s = e[t], o = e[t + 1]; e[t + 2], e[t + 3], e[t + 4]; var i = 1, r = null, l = null; s <= 20 && (r = s, i = 1), 12 == s && (r = 100 * s + o, i = 2), 21 <= s && s <= 27 && (r = s, i = 1), 28 == s && (l = a.readShort(e, t + 1), i = 3), 29 <= s && s <= 31 && (r = s, i = 1), 32 <= s && s <= 246 && (l = s - 139, i = 1), 247 <= s && s <= 250 && (l = 256 * (s - 247) + o + 108, i = 2), 251 <= s && s <= 254 && (l = 256 * -(s - 251) - o - 108, i = 2), 255 == s && (l = a.readInt(e, t + 1) / 65535, i = 5), n.val = null != l ? l : "o" + r, n.size = i; }, qe.CFF.readCharString = function(e, t, n) { for (var a = t + n, s = qe._bin, o = []; t < a; ) { var i = e[t], r = e[t + 1]; e[t + 2], e[t + 3], e[t + 4]; var l = 1, c = null, u = null; i <= 20 && (c = i, l = 1), 12 == i && (c = 100 * i + r, l = 2), 19 != i && 20 != i || (c = i, l = 2), 21 <= i && i <= 27 && (c = i, l = 1), 28 == i && (u = s.readShort(e, t + 1), l = 3), 29 <= i && i <= 31 && (c = i, l = 1), 32 <= i && i <= 246 && (u = i - 139, l = 1), 247 <= i && i <= 250 && (u = 256 * (i - 247) + r + 108, l = 2), 251 <= i && i <= 254 && (u = 256 * -(i - 251) - r - 108, l = 2), 255 == i && (u = s.readInt(e, t + 1) / 65535, l = 5), o.push(null != u ? u : "o" + c), t += l; } return o; }, qe.CFF.readDict = function(e, t, n) { for (var a = qe._bin, s = {}, o = []; t < n; ) { var i = e[t], r = e[t + 1]; e[t + 2], e[t + 3], e[t + 4]; var l = 1, c = null, u = null; if (28 == i && (u = a.readShort(e, t + 1), l = 3), 29 == i && (u = a.readInt(e, t + 1), l = 5), 32 <= i && i <= 246 && (u = i - 139, l = 1), 247 <= i && i <= 250 && (u = 256 * (i - 247) + r + 108, l = 2), 251 <= i && i <= 254 && (u = 256 * -(i - 251) - r - 108, l = 2), 255 == i) throw u = a.readInt(e, t + 1) / 65535, l = 5, "unknown number"; if (30 == i) { var p = []; for (l = 1; ;) { var h = e[t + l]; l++; var d = h >> 4, m = 15 & h; if (15 != d && p.push(d), 15 != m && p.push(m), 15 == m) break; } for (var f = "", y = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ".", "e", "e-", "reserved", "-", "endOfNumber" ], g = 0; g < p.length; g++) f += y[p[g]]; u = parseFloat(f); } if (i <= 21) if (c = [ "version", "Notice", "FullName", "FamilyName", "Weight", "FontBBox", "BlueValues", "OtherBlues", "FamilyBlues", "FamilyOtherBlues", "StdHW", "StdVW", "escape", "UniqueID", "XUID", "charset", "Encoding", "CharStrings", "Private", "Subrs", "defaultWidthX", "nominalWidthX" ][i], l = 1, 12 == i) c = [ "Copyright", "isFixedPitch", "ItalicAngle", "UnderlinePosition", "UnderlineThickness", "PaintType", "CharstringType", "FontMatrix", "StrokeWidth", "BlueScale", "BlueShift", "BlueFuzz", "StemSnapH", "StemSnapV", "ForceBold", 0, 0, "LanguageGroup", "ExpansionFactor", "initialRandomSeed", "SyntheticBase", "PostScript", "BaseFontName", "BaseFontBlend", 0, 0, 0, 0, 0, 0, "ROS", "CIDFontVersion", "CIDFontRevision", "CIDFontType", "CIDCount", "UIDBase", "FDArray", "FDSelect", "FontName" ][r], l = 2; null != c ? (s[c] = 1 == o.length ? o[0] : o, o = []) : o.push(u), t += l; } return s; }, qe.cmap = {}, qe.cmap.parse = function(e, t, n) { e = new Uint8Array(e.buffer, t, n), t = 0; var a = qe._bin, s = {}; a.readUshort(e, t), t += 2; var o = a.readUshort(e, t); t += 2; var i = []; s.tables = []; for (var r = 0; r < o; r++) { var l = a.readUshort(e, t); t += 2; var c = a.readUshort(e, t); t += 2; var u = a.readUint(e, t); t += 4; var p = "p" + l + "e" + c, h = i.indexOf(u); if (-1 == h) { var d; h = s.tables.length, i.push(u); var m = a.readUshort(e, u); 0 == m ? d = qe.cmap.parse0(e, u) : 4 == m ? d = qe.cmap.parse4(e, u) : 6 == m ? d = qe.cmap.parse6(e, u) : 12 == m ? d = qe.cmap.parse12(e, u) : console.log("unknown format: " + m, l, c, u), s.tables.push(d); } if (null != s[p]) throw "multiple tables for one platform+encoding"; s[p] = h; } return s; }, qe.cmap.parse0 = function(e, t) { var n = qe._bin, a = {}; a.format = n.readUshort(e, t), t += 2; var s = n.readUshort(e, t); t += 2, n.readUshort(e, t), t += 2, a.map = []; for (var o = 0; o < s - 6; o++) a.map.push(e[t + o]); return a; }, qe.cmap.parse4 = function(e, t) { var n = qe._bin, a = t, s = {}; s.format = n.readUshort(e, t), t += 2; var o = n.readUshort(e, t); t += 2, n.readUshort(e, t), t += 2; var i = n.readUshort(e, t); t += 2; var r = i / 2; s.searchRange = n.readUshort(e, t), t += 2, s.entrySelector = n.readUshort(e, t), t += 2, s.rangeShift = n.readUshort(e, t), t += 2, s.endCount = n.readUshorts(e, t, r), t += 2 * r, t += 2, s.startCount = n.readUshorts(e, t, r), t += 2 * r, s.idDelta = []; for (var l = 0; l < r; l++) s.idDelta.push(n.readShort(e, t)), t += 2; for (s.idRangeOffset = n.readUshorts(e, t, r), t += 2 * r, s.glyphIdArray = []; t < a + o; ) s.glyphIdArray.push(n.readUshort(e, t)), t += 2; return s; }, qe.cmap.parse6 = function(e, t) { var n = qe._bin, a = {}; a.format = n.readUshort(e, t), t += 2, n.readUshort(e, t), t += 2, n.readUshort(e, t), t += 2, a.firstCode = n.readUshort(e, t), t += 2; var s = n.readUshort(e, t); t += 2, a.glyphIdArray = []; for (var o = 0; o < s; o++) a.glyphIdArray.push(n.readUshort(e, t)), t += 2; return a; }, qe.cmap.parse12 = function(e, t) { var n = qe._bin, a = {}; a.format = n.readUshort(e, t), t += 2, t += 2, n.readUint(e, t), t += 4, n.readUint(e, t), t += 4; var s = n.readUint(e, t); t += 4, a.groups = []; for (var o = 0; o < s; o++) { var i = t + 12 * o, r = n.readUint(e, i + 0), l = n.readUint(e, i + 4), c = n.readUint(e, i + 8); a.groups.push([ r, l, c ]); } return a; }, qe.glyf = {}, qe.glyf.parse = function(e, t, n, a) { for (var s = [], o = 0; o < a.maxp.numGlyphs; o++) s.push(null); return s; }, qe.glyf._parseGlyf = function(e, t) { var n = qe._bin, a = e._data, s = qe._tabOffset(a, "glyf") + e.loca[t]; if (e.loca[t] == e.loca[t + 1]) return null; var o = {}; if (o.noc = n.readShort(a, s), s += 2, o.xMin = n.readShort(a, s), s += 2, o.yMin = n.readShort(a, s), s += 2, o.xMax = n.readShort(a, s), s += 2, o.yMax = n.readShort(a, s), s += 2, o.xMin >= o.xMax || o.yMin >= o.yMax) return null; if (o.noc > 0) { o.endPts = []; for (var i = 0; i < o.noc; i++) o.endPts.push(n.readUshort(a, s)), s += 2; var r = n.readUshort(a, s); if (s += 2, a.length - s < r) return null; o.instructions = n.readBytes(a, s, r), s += r; var l = o.endPts[o.noc - 1] + 1; o.flags = []; for (i = 0; i < l; i++) { var c = a[s]; if (s++, o.flags.push(c), 8 & c) { var u = a[s]; s++; for (var p = 0; p < u; p++) o.flags.push(c), i++; } } o.xs = []; for (i = 0; i < l; i++) { var h = !!(2 & o.flags[i]), d = !!(16 & o.flags[i]); h ? (o.xs.push(d ? a[s] : -a[s]), s++) : d ? o.xs.push(0) : (o.xs.push(n.readShort(a, s)), s += 2); } o.ys = []; for (i = 0; i < l; i++) { h = !!(4 & o.flags[i]), d = !!(32 & o.flags[i]); h ? (o.ys.push(d ? a[s] : -a[s]), s++) : d ? o.ys.push(0) : (o.ys.push(n.readShort(a, s)), s += 2); } var m = 0, f = 0; for (i = 0; i < l; i++) m += o.xs[i], f += o.ys[i], o.xs[i] = m, o.ys[i] = f; } else { var y; o.parts = []; do { y = n.readUshort(a, s), s += 2; var g = { m: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 }, p1: -1, p2: -1 }; if (o.parts.push(g), g.glyphIndex = n.readUshort(a, s), s += 2, 1 & y) { var w = n.readShort(a, s); s += 2; var v = n.readShort(a, s); s += 2; } else { w = n.readInt8(a, s); s++; v = n.readInt8(a, s); s++; } 2 & y ? (g.m.tx = w, g.m.ty = v) : (g.p1 = w, g.p2 = v), 8 & y ? (g.m.a = g.m.d = n.readF2dot14(a, s), s += 2) : 64 & y ? (g.m.a = n.readF2dot14(a, s), s += 2, g.m.d = n.readF2dot14(a, s), s += 2) : 128 & y && (g.m.a = n.readF2dot14(a, s), s += 2, g.m.b = n.readF2dot14(a, s), s += 2, g.m.c = n.readF2dot14(a, s), s += 2, g.m.d = n.readF2dot14(a, s), s += 2); } while (32 & y); if (256 & y) { var b = n.readUshort(a, s); s += 2, o.instr = []; for (i = 0; i < b; i++) o.instr.push(a[s]), s++; } } return o; }, qe.GPOS = {}, qe.GPOS.parse = function(e, t, n, a) { return qe._lctf.parse(e, t, n, a, qe.GPOS.subt); }, qe.GPOS.subt = function(e, t, n) { if (2 != t) return null; var a = qe._bin, s = n, o = {}; o.format = a.readUshort(e, n), n += 2; var i = a.readUshort(e, n); n += 2, o.coverage = qe._lctf.readCoverage(e, i + s), o.valFmt1 = a.readUshort(e, n), n += 2, o.valFmt2 = a.readUshort(e, n), n += 2; var r = qe._lctf.numOfOnes(o.valFmt1), l = qe._lctf.numOfOnes(o.valFmt2); if (1 == o.format) { o.pairsets = []; var c = a.readUshort(e, n); n += 2; for (var u = 0; u < c; u++) { var p = a.readUshort(e, n); n += 2, p += s; var h = a.readUshort(e, p); p += 2; for (var d = [], m = 0; m < h; m++) { var f = a.readUshort(e, p); p += 2, 0 != o.valFmt1 && (k = qe._lctf.readValueRecord(e, p, o.valFmt1), p += 2 * r), 0 != o.valFmt2 && (x = qe._lctf.readValueRecord(e, p, o.valFmt2), p += 2 * l), d.push({ gid2: f, val1: k, val2: x }); } o.pairsets.push(d); } } if (2 == o.format) { var y = a.readUshort(e, n); n += 2; var g = a.readUshort(e, n); n += 2; var w = a.readUshort(e, n); n += 2; var v = a.readUshort(e, n); n += 2, o.classDef1 = qe._lctf.readClassDef(e, s + y), o.classDef2 = qe._lctf.readClassDef(e, s + g), o.matrix = []; for (u = 0; u < w; u++) { var b = []; for (m = 0; m < v; m++) { var k = null, x = null; 0 != o.valFmt1 && (k = qe._lctf.readValueRecord(e, n, o.valFmt1), n += 2 * r), 0 != o.valFmt2 && (x = qe._lctf.readValueRecord(e, n, o.valFmt2), n += 2 * l), b.push({ val1: k, val2: x }); } o.matrix.push(b); } } return o; }, qe.GSUB = {}, qe.GSUB.parse = function(e, t, n, a) { return qe._lctf.parse(e, t, n, a, qe.GSUB.subt); }, qe.GSUB.subt = function(e, t, n) { var a = qe._bin, s = n, o = {}; if (1 != t && 4 != t && 5 != t) return null; o.fmt = a.readUshort(e, n), n += 2; var i = a.readUshort(e, n); if (n += 2, o.coverage = qe._lctf.readCoverage(e, i + s), 1 == t) { if (1 == o.fmt) o.delta = a.readShort(e, n), n += 2; else if (2 == o.fmt) { var r = a.readUshort(e, n); n += 2, o.newg = a.readUshorts(e, n, r), n += 2 * o.newg.length; } } else if (4 == t) { o.vals = []; r = a.readUshort(e, n); n += 2; for (var l = 0; l < r; l++) { var c = a.readUshort(e, n); n += 2, o.vals.push(qe.GSUB.readLigatureSet(e, s + c)); } } else if (5 == t) if (2 == o.fmt) { var u = a.readUshort(e, n); n += 2, o.cDef = qe._lctf.readClassDef(e, s + u), o.scset = []; var p = a.readUshort(e, n); n += 2; for (l = 0; l < p; l++) { var h = a.readUshort(e, n); n += 2, o.scset.push(0 == h ? null : qe.GSUB.readSubClassSet(e, s + h)); } } else console.log("unknown table format", o.fmt); return o; }, qe.GSUB.readSubClassSet = function(e, t) { var n = qe._bin.readUshort, a = t, s = [], o = n(e, t); t += 2; for (var i = 0; i < o; i++) { var r = n(e, t); t += 2, s.push(qe.GSUB.readSubClassRule(e, a + r)); } return s; }, qe.GSUB.readSubClassRule = function(e, t) { var n = qe._bin.readUshort, a = {}, s = n(e, t), o = n(e, t += 2); t += 2, a.input = []; for (var i = 0; i < s - 1; i++) a.input.push(n(e, t)), t += 2; return a.substLookupRecords = qe.GSUB.readSubstLookupRecords(e, t, o), a; }, qe.GSUB.readSubstLookupRecords = function(e, t, n) { for (var a = qe._bin.readUshort, s = [], o = 0; o < n; o++) s.push(a(e, t), a(e, t + 2)), t += 4; return s; }, qe.GSUB.readChainSubClassSet = function(e, t) { var n = qe._bin, a = t, s = [], o = n.readUshort(e, t); t += 2; for (var i = 0; i < o; i++) { var r = n.readUshort(e, t); t += 2, s.push(qe.GSUB.readChainSubClassRule(e, a + r)); } return s; }, qe.GSUB.readChainSubClassRule = function(e, t) { for (var n = qe._bin, a = {}, s = [ "backtrack", "input", "lookahead" ], o = 0; o < s.length; o++) { var i = n.readUshort(e, t); t += 2, 1 == o && i--, a[s[o]] = n.readUshorts(e, t, i), t += 2 * a[s[o]].length; } i = n.readUshort(e, t); return t += 2, a.subst = n.readUshorts(e, t, 2 * i), t += 2 * a.subst.length, a; }, qe.GSUB.readLigatureSet = function(e, t) { var n = qe._bin, a = t, s = [], o = n.readUshort(e, t); t += 2; for (var i = 0; i < o; i++) { var r = n.readUshort(e, t); t += 2, s.push(qe.GSUB.readLigature(e, a + r)); } return s; }, qe.GSUB.readLigature = function(e, t) { var n = qe._bin, a = { chain: [] }; a.nglyph = n.readUshort(e, t), t += 2; var s = n.readUshort(e, t); t += 2; for (var o = 0; o < s - 1; o++) a.chain.push(n.readUshort(e, t)), t += 2; return a; }, qe.head = {}, qe.head.parse = function(e, t, n) { var a = qe._bin, s = {}; return a.readFixed(e, t), t += 4, s.fontRevision = a.readFixed(e, t), t += 4, a.readUint(e, t), t += 4, a.readUint(e, t), t += 4, s.flags = a.readUshort(e, t), t += 2, s.unitsPerEm = a.readUshort(e, t), t += 2, s.created = a.readUint64(e, t), t += 8, s.modified = a.readUint64(e, t), t += 8, s.xMin = a.readShort(e, t), t += 2, s.yMin = a.readShort(e, t), t += 2, s.xMax = a.readShort(e, t), t += 2, s.yMax = a.readShort(e, t), t += 2, s.macStyle = a.readUshort(e, t), t += 2, s.lowestRecPPEM = a.readUshort(e, t), t += 2, s.fontDirectionHint = a.readShort(e, t), t += 2, s.indexToLocFormat = a.readShort(e, t), t += 2, s.glyphDataFormat = a.readShort(e, t), t += 2, s; }, qe.hhea = {}, qe.hhea.parse = function(e, t, n) { var a = qe._bin, s = {}; return a.readFixed(e, t), t += 4, s.ascender = a.readShort(e, t), t += 2, s.descender = a.readShort(e, t), t += 2, s.lineGap = a.readShort(e, t), t += 2, s.advanceWidthMax = a.readUshort(e, t), t += 2, s.minLeftSideBearing = a.readShort(e, t), t += 2, s.minRightSideBearing = a.readShort(e, t), t += 2, s.xMaxExtent = a.readShort(e, t), t += 2, s.caretSlopeRise = a.readShort(e, t), t += 2, s.caretSlopeRun = a.readShort(e, t), t += 2, s.caretOffset = a.readShort(e, t), t += 2, t += 8, s.metricDataFormat = a.readShort(e, t), t += 2, s.numberOfHMetrics = a.readUshort(e, t), t += 2, s; }, qe.hmtx = {}, qe.hmtx.parse = function(e, t, n, a) { for (var s = qe._bin, o = { aWidth: [], lsBearing: [] }, i = 0, r = 0, l = 0; l < a.maxp.numGlyphs; l++) l < a.hhea.numberOfHMetrics && (i = s.readUshort(e, t), t += 2, r = s.readShort(e, t), t += 2), o.aWidth.push(i), o.lsBearing.push(r); return o; }, qe.kern = {}, qe.kern.parse = function(e, t, n, a) { var s = qe._bin, o = s.readUshort(e, t); if (t += 2, 1 == o) return qe.kern.parseV1(e, t - 2, n, a); var i = s.readUshort(e, t); t += 2; for (var r = { glyph1: [], rval: [] }, l = 0; l < i; l++) { t += 2; n = s.readUshort(e, t); t += 2; var c = s.readUshort(e, t); t += 2; var u = c >>> 8; if (0 != (u &= 15)) throw "unknown kern table format: " + u; t = qe.kern.readFormat0(e, t, r); } return r; }, qe.kern.parseV1 = function(e, t, n, a) { var s = qe._bin; s.readFixed(e, t), t += 4; var o = s.readUint(e, t); t += 4; for (var i = { glyph1: [], rval: [] }, r = 0; r < o; r++) { s.readUint(e, t), t += 4; var l = s.readUshort(e, t); t += 2, s.readUshort(e, t), t += 2; var c = l >>> 8; if (0 != (c &= 15)) throw "unknown kern table format: " + c; t = qe.kern.readFormat0(e, t, i); } return i; }, qe.kern.readFormat0 = function(e, t, n) { var a = qe._bin, s = -1, o = a.readUshort(e, t); t += 2, a.readUshort(e, t), t += 2, a.readUshort(e, t), t += 2, a.readUshort(e, t), t += 2; for (var i = 0; i < o; i++) { var r = a.readUshort(e, t); t += 2; var l = a.readUshort(e, t); t += 2; var c = a.readShort(e, t); t += 2, r != s && (n.glyph1.push(r), n.rval.push({ glyph2: [], vals: [] })); var u = n.rval[n.rval.length - 1]; u.glyph2.push(l), u.vals.push(c), s = r; } return t; }, qe.loca = {}, qe.loca.parse = function(e, t, n, a) { var s = qe._bin, o = [], i = a.head.indexToLocFormat, r = a.maxp.numGlyphs + 1; if (0 == i) for (var l = 0; l < r; l++) o.push(s.readUshort(e, t + (l << 1)) << 1); if (1 == i) for (l = 0; l < r; l++) o.push(s.readUint(e, t + (l << 2))); return o; }, qe.maxp = {}, qe.maxp.parse = function(e, t, n) { var a = qe._bin, s = {}, o = a.readUint(e, t); return t += 4, s.numGlyphs = a.readUshort(e, t), t += 2, 65536 == o && (s.maxPoints = a.readUshort(e, t), t += 2, s.maxContours = a.readUshort(e, t), t += 2, s.maxCompositePoints = a.readUshort(e, t), t += 2, s.maxCompositeContours = a.readUshort(e, t), t += 2, s.maxZones = a.readUshort(e, t), t += 2, s.maxTwilightPoints = a.readUshort(e, t), t += 2, s.maxStorage = a.readUshort(e, t), t += 2, s.maxFunctionDefs = a.readUshort(e, t), t += 2, s.maxInstructionDefs = a.readUshort(e, t), t += 2, s.maxStackElements = a.readUshort(e, t), t += 2, s.maxSizeOfInstructions = a.readUshort(e, t), t += 2, s.maxComponentElements = a.readUshort(e, t), t += 2, s.maxComponentDepth = a.readUshort(e, t), t += 2), s; }, qe.name = {}, qe.name.parse = function(e, t, n) { var a = qe._bin, s = {}; a.readUshort(e, t), t += 2; var o = a.readUshort(e, t); t += 2, a.readUshort(e, t); for (var i, r = t += 2, l = 0; l < o; l++) { var c = a.readUshort(e, t); t += 2; var u = a.readUshort(e, t); t += 2; var p = a.readUshort(e, t); t += 2; var h = a.readUshort(e, t); t += 2; n = a.readUshort(e, t); t += 2; var d = a.readUshort(e, t); t += 2; var m = "p" + c; null == s[m] && (s[m] = {}); var f, y = [ "copyright", "fontFamily", "fontSubfamily", "ID", "fullName", "version", "postScriptName", "trademark", "manufacturer", "designer", "description", "urlVendor", "urlDesigner", "licence", "licenceURL", "---", "typoFamilyName", "typoSubfamilyName", "compatibleFull", "sampleText", "postScriptCID", "wwsFamilyName", "wwsSubfamilyName", "lightPalette", "darkPalette" ][h], g = r + 12 * o + d; if (0 == c) f = a.readUnicode(e, g, n / 2); else if (3 == c && 0 == u) f = a.readUnicode(e, g, n / 2); else if (0 == u) f = a.readASCII(e, g, n); else if (1 == u) f = a.readUnicode(e, g, n / 2); else if (3 == u) f = a.readUnicode(e, g, n / 2); else { if (1 != c) throw "unknown encoding " + u + ", platformID: " + c; f = a.readASCII(e, g, n), console.log("reading unknown MAC encoding " + u + " as ASCII"); } s[m][y] = f, s[m]._lang = p; } for (var w in s) if (null != s[w].postScriptName && 1033 == s[w]._lang) return s[w]; for (var w in s) if (null != s[w].postScriptName && 3084 == s[w]._lang) return s[w]; for (var w in s) if (null != s[w].postScriptName) return s[w]; for (var w in s) { i = w; break; } return console.log("returning name table with languageID " + s[i]._lang), s[i]; }, qe["OS/2"] = {}, qe["OS/2"].parse = function(e, t, n) { var a = qe._bin.readUshort(e, t); t += 2; var s = {}; if (0 == a) qe["OS/2"].version0(e, t, s); else if (1 == a) qe["OS/2"].version1(e, t, s); else if (2 == a || 3 == a || 4 == a) qe["OS/2"].version2(e, t, s); else { if (5 != a) throw "unknown OS/2 table version: " + a; qe["OS/2"].version5(e, t, s); } return s; }, qe["OS/2"].version0 = function(e, t, n) { var a = qe._bin; return n.xAvgCharWidth = a.readShort(e, t), t += 2, n.usWeightClass = a.readUshort(e, t), t += 2, n.usWidthClass = a.readUshort(e, t), t += 2, n.fsType = a.readUshort(e, t), t += 2, n.ySubscriptXSize = a.readShort(e, t), t += 2, n.ySubscriptYSize = a.readShort(e, t), t += 2, n.ySubscriptXOffset = a.readShort(e, t), t += 2, n.ySubscriptYOffset = a.readShort(e, t), t += 2, n.ySuperscriptXSize = a.readShort(e, t), t += 2, n.ySuperscriptYSize = a.readShort(e, t), t += 2, n.ySuperscriptXOffset = a.readShort(e, t), t += 2, n.ySuperscriptYOffset = a.readShort(e, t), t += 2, n.yStrikeoutSize = a.readShort(e, t), t += 2, n.yStrikeoutPosition = a.readShort(e, t), t += 2, n.sFamilyClass = a.readShort(e, t), t += 2, n.panose = a.readBytes(e, t, 10), t += 10, n.ulUnicodeRange1 = a.readUint(e, t), t += 4, n.ulUnicodeRange2 = a.readUint(e, t), t += 4, n.ulUnicodeRange3 = a.readUint(e, t), t += 4, n.ulUnicodeRange4 = a.readUint(e, t), t += 4, n.achVendID = [ a.readInt8(e, t), a.readInt8(e, t + 1), a.readInt8(e, t + 2), a.readInt8(e, t + 3) ], t += 4, n.fsSelection = a.readUshort(e, t), t += 2, n.usFirstCharIndex = a.readUshort(e, t), t += 2, n.usLastCharIndex = a.readUshort(e, t), t += 2, n.sTypoAscender = a.readShort(e, t), t += 2, n.sTypoDescender = a.readShort(e, t), t += 2, n.sTypoLineGap = a.readShort(e, t), t += 2, n.usWinAscent = a.readUshort(e, t), t += 2, n.usWinDescent = a.readUshort(e, t), t += 2; }, qe["OS/2"].version1 = function(e, t, n) { var a = qe._bin; return t = qe["OS/2"].version0(e, t, n), n.ulCodePageRange1 = a.readUint(e, t), t += 4, n.ulCodePageRange2 = a.readUint(e, t), t += 4; }, qe["OS/2"].version2 = function(e, t, n) { var a = qe._bin; return t = qe["OS/2"].version1(e, t, n), n.sxHeight = a.readShort(e, t), t += 2, n.sCapHeight = a.readShort(e, t), t += 2, n.usDefault = a.readUshort(e, t), t += 2, n.usBreak = a.readUshort(e, t), t += 2, n.usMaxContext = a.readUshort(e, t), t += 2; }, qe["OS/2"].version5 = function(e, t, n) { var a = qe._bin; return t = qe["OS/2"].version2(e, t, n), n.usLowerOpticalPointSize = a.readUshort(e, t), t += 2, n.usUpperOpticalPointSize = a.readUshort(e, t), t += 2; }, qe.post = {}, qe.post.parse = function(e, t, n) { var a = qe._bin, s = {}; return s.version = a.readFixed(e, t), t += 4, s.italicAngle = a.readFixed(e, t), t += 4, s.underlinePosition = a.readShort(e, t), t += 2, s.underlineThickness = a.readShort(e, t), t += 2, s; }, qe.SVG = {}, qe.SVG.parse = function(e, t, n) { var a = qe._bin, s = { entries: [] }, o = t; a.readUshort(e, t), t += 2; var i = a.readUint(e, t); t += 4, a.readUint(e, t), t += 4, t = i + o; var r = a.readUshort(e, t); t += 2; for (var l = 0; l < r; l++) { var c = a.readUshort(e, t); t += 2; var u = a.readUshort(e, t); t += 2; var p = a.readUint(e, t); t += 4; var h = a.readUint(e, t); t += 4; for (var d = new Uint8Array(e.buffer, o + p + i, h), m = a.readUTF8(d, 0, d.length), f = c; f <= u; f++) s.entries[f] = m; } return s; }, qe.SVG.toPath = function(e) { var t = { cmds: [], crds: [] }; if (null == e) return t; for (var n = (new DOMParser).parseFromString(e, "image/svg+xml").firstChild; "svg" != n.tagName; ) n = n.nextSibling; var a = n.getAttribute("viewBox"); a = a ? a.trim().split(" ").map(parseFloat) : [ 0, 0, 1e3, 1e3 ], qe.SVG._toPath(n.children, t); for (var s = 0; s < t.crds.length; s += 2) { var o = t.crds[s], i = t.crds[s + 1]; o -= a[0], i = -(i -= a[1]), t.crds[s] = o, t.crds[s + 1] = i; } return t; }, qe.SVG._toPath = function(e, t, n) { for (var a = 0; a < e.length; a++) { var s = e[a], o = s.tagName, i = s.getAttribute("fill"); if (null == i && (i = n), "g" == o) qe.SVG._toPath(s.children, t, i); else if ("path" == o) { t.cmds.push(i || "#000000"); var r = s.getAttribute("d"), l = qe.SVG._tokens(r); qe.SVG._toksToPath(l, t), t.cmds.push("X"); } else "defs" == o || console.log(o, s); } }, qe.SVG._tokens = function(e) { for (var t = [], n = 0, a = !1, s = ""; n < e.length; ) { var o = e.charCodeAt(n), i = e.charAt(n); n++; var r = 48 <= o && o <= 57 || "." == i || "-" == i; a ? "-" == i ? (t.push(parseFloat(s)), s = i) : r ? s += i : (t.push(parseFloat(s)), "," != i && " " != i && t.push(i), a = !1) : r ? (s = i, a = !0) : "," != i && " " != i && t.push(i); } return a && t.push(parseFloat(s)), t; }, qe.SVG._toksToPath = function(e, t) { for (var n = 0, a = 0, s = 0, o = 0, i = 0, r = { M: 2, L: 2, H: 1, V: 1, S: 4, C: 6 }, l = t.cmds, c = t.crds; n < e.length; ) { var u = e[n]; if (n++, "z" == u) l.push("Z"), a = o, s = i; else for (var p = u.toUpperCase(), h = r[p], d = qe.SVG._reps(e, n, h), m = 0; m < d; m++) { var f = 0, y = 0; if (u != p && (f = a, y = s), "M" == p) a = f + e[n++], s = y + e[n++], l.push("M"), c.push(a, s), o = a, i = s; else if ("L" == p) a = f + e[n++], s = y + e[n++], l.push("L"), c.push(a, s); else if ("H" == p) a = f + e[n++], l.push("L"), c.push(a, s); else if ("V" == p) s = y + e[n++], l.push("L"), c.push(a, s); else if ("C" == p) { var g = f + e[n++], w = y + e[n++], v = f + e[n++], b = y + e[n++], k = f + e[n++], x = y + e[n++]; l.push("C"), c.push(g, w, v, b, k, x), a = k, s = x; } else if ("S" == p) { var _ = Math.max(c.length - 4, 0); g = a + a - c[_], w = s + s - c[_ + 1], v = f + e[n++], b = y + e[n++], k = f + e[n++], x = y + e[n++]; l.push("C"), c.push(g, w, v, b, k, x), a = k, s = x; } else console.log("Unknown SVG command " + u); } } }, qe.SVG._reps = function(e, t, n) { for (var a = t; a < e.length && "string" != typeof e[a]; ) a += n; return (a - t) / n; }, null == qe && (qe = {}), null == qe.U && (qe.U = {}), qe.U.codeToGlyph = function(e, t) { var n = e.cmap, a = -1; if (null != n.p0e4 ? a = n.p0e4 : null != n.p3e1 ? a = n.p3e1 : null != n.p1e0 && (a = n.p1e0), -1 == a) throw "no familiar platform and encoding!"; var s = n.tables[a]; if (0 == s.format) return t >= s.map.length ? 0 : s.map[t]; if (4 == s.format) { for (var o = -1, i = 0; i < s.endCount.length; i++) if (t <= s.endCount[i]) { o = i; break; } if (-1 == o) return 0; if (s.startCount[o] > t) return 0; return 65535 & (0 != s.idRangeOffset[o] ? s.glyphIdArray[t - s.startCount[o] + (s.idRangeOffset[o] >> 1) - (s.idRangeOffset.length - o)] : t + s.idDelta[o]); } if (12 == s.format) { if (t > s.groups[s.groups.length - 1][1]) return 0; for (i = 0; i < s.groups.length; i++) { var r = s.groups[i]; if (r[0] <= t && t <= r[1]) return r[2] + (t - r[0]); } return 0; } throw "unknown cmap table format " + s.format; }, qe.U.glyphToPath = function(e, t) { var n = { cmds: [], crds: [] }; if (e.SVG && e.SVG.entries[t]) { var a = e.SVG.entries[t]; return null == a ? n : ("string" == typeof a && (a = qe.SVG.toPath(a), e.SVG.entries[t] = a), a); } if (e.CFF) { var s = { x: 0, y: 0, stack: [], nStems: 0, haveWidth: !1, width: e.CFF.Private ? e.CFF.Private.defaultWidthX : 0, open: !1 }; qe.U._drawCFF(e.CFF.CharStrings[t], s, e.CFF, n); } else e.glyf && qe.U._drawGlyf(t, e, n); return n; }, qe.U._drawGlyf = function(e, t, n) { var a = t.glyf[e]; null == a && (a = t.glyf[e] = qe.glyf._parseGlyf(t, e)), null != a && (a.noc > -1 ? qe.U._simpleGlyph(a, n) : qe.U._compoGlyph(a, t, n)); }, qe.U._simpleGlyph = function(e, t) { for (var n = 0; n < e.noc; n++) { for (var a = 0 == n ? 0 : e.endPts[n - 1] + 1, s = e.endPts[n], o = a; o <= s; o++) { var i = o == a ? s : o - 1, r = o == s ? a : o + 1, l = 1 & e.flags[o], c = 1 & e.flags[i], u = 1 & e.flags[r], p = e.xs[o], h = e.ys[o]; if (o == a) if (l) { if (!c) { qe.U.P.moveTo(t, p, h); continue; } qe.U.P.moveTo(t, e.xs[i], e.ys[i]); } else c ? qe.U.P.moveTo(t, e.xs[i], e.ys[i]) : qe.U.P.moveTo(t, (e.xs[i] + p) / 2, (e.ys[i] + h) / 2); l ? c && qe.U.P.lineTo(t, p, h) : u ? qe.U.P.qcurveTo(t, p, h, e.xs[r], e.ys[r]) : qe.U.P.qcurveTo(t, p, h, (p + e.xs[r]) / 2, (h + e.ys[r]) / 2); } qe.U.P.closePath(t); } }, qe.U._compoGlyph = function(e, t, n) { for (var a = 0; a < e.parts.length; a++) { var s = { cmds: [], crds: [] }, o = e.parts[a]; qe.U._drawGlyf(o.glyphIndex, t, s); for (var i = o.m, r = 0; r < s.crds.length; r += 2) { var l = s.crds[r], c = s.crds[r + 1]; n.crds.push(l * i.a + c * i.b + i.tx), n.crds.push(l * i.c + c * i.d + i.ty); } for (r = 0; r < s.cmds.length; r++) n.cmds.push(s.cmds[r]); } }, qe.U._getGlyphClass = function(e, t) { var n = qe._lctf.getInterval(t, e); return -1 == n ? 0 : t[n + 2]; }, qe.U.getPairAdjustment = function(e, t, n) { if (e.GPOS) { for (var a = null, s = 0; s < e.GPOS.featureList.length; s++) { var o = e.GPOS.featureList[s]; if ("kern" == o.tag) for (var i = 0; i < o.tab.length; i++) 2 == e.GPOS.lookupList[o.tab[i]].ltype && (a = e.GPOS.lookupList[o.tab[i]]); } if (a) for (s = 0; s < a.tabs.length; s++) { var r = a.tabs[s], l = qe._lctf.coverageIndex(r.coverage, t); if (-1 != l) { if (1 == r.format) { var c = r.pairsets[l]; for (i = 0; i < c.length; i++) c[i].gid2 == n && (h = c[i]); if (null == h) continue; } else if (2 == r.format) var u = qe.U._getGlyphClass(t, r.classDef1), p = qe.U._getGlyphClass(n, r.classDef2), h = r.matrix[u][p]; return h.val1[2]; } } } if (e.kern) { var d = e.kern.glyph1.indexOf(t); if (-1 != d) { var m = e.kern.rval[d].glyph2.indexOf(n); if (-1 != m) return e.kern.rval[d].vals[m]; } } return 0; }, qe.U.stringToGlyphs = function(e, t) { for (var n = [], a = 0; a < t.length; a++) { var s = t.codePointAt(a); s > 65535 && a++, n.push(qe.U.codeToGlyph(e, s)); } var o = e.GSUB; if (null == o) return n; for (var i = o.lookupList, r = o.featureList, l = '\n\t" ,.:;!?() \u060c', c = "\u0622\u0623\u0624\u0625\u0627\u0629\u062f\u0630\u0631\u0632\u0648\u0671\u0672\u0673\u0675\u0676\u0677\u0688\u0689\u068a\u068b\u068c\u068d\u068e\u068f\u0690\u0691\u0692\u0693\u0694\u0695\u0696\u0697\u0698\u0699\u06c0\u06c3\u06c4\u06c5\u06c6\u06c7\u06c8\u06c9\u06ca\u06cb\u06cd\u06cf\u06d2\u06d3\u06d5\u06ee\u06ef\u0710\u0715\u0716\u0717\u0718\u0719\u071e\u0728\u072a\u072c\u072f\u074d\u0759\u075a\u075b\u076b\u076c\u0771\u0773\u0774\u0778\u0779\u0840\u0846\u0847\u0849\u0854\u0867\u0869\u086a\u08aa\u08ab\u08ac\u08ae\u08b1\u08b2\u08b9\u0ac5\u0ac7\u0ac9\u0aca\u0ace\u0acf\u0ad0\u0ad1\u0ad2\u0add\u0ae1\u0ae4\u0aef\u0b81\u0b83\u0b84\u0b85\u0b89\u0b8c\u0b8e\u0b8f\u0b91\u0ba9\u0baa\u0bab\u0bac", u = 0; u < n.length; u++) { var p = n[u], h = 0 == u || -1 != l.indexOf(t[u - 1]), d = u == n.length - 1 || -1 != l.indexOf(t[u + 1]); h || -1 == c.indexOf(t[u - 1]) || (h = !0), d || -1 == c.indexOf(t[u]) || (d = !0), d || -1 == "\ua872\u0acd\u0ad7".indexOf(t[u + 1]) || (d = !0), h || -1 == "\ua872\u0acd\u0ad7".indexOf(t[u]) || (h = !0); var m = null; m = h ? d ? "isol" : "init" : d ? "fina" : "medi"; for (var f = 0; f < r.length; f++) if (r[f].tag == m) for (var y = 0; y < r[f].tab.length; y++) { 1 == (b = i[r[f].tab[y]]).ltype && qe.U._applyType1(n, u, b); } } var g = [ "rlig", "liga", "mset" ]; for (u = 0; u < n.length; u++) { p = n[u]; var w = Math.min(3, n.length - u - 1); for (f = 0; f < r.length; f++) { var v = r[f]; if (-1 != g.indexOf(v.tag)) for (y = 0; y < v.tab.length; y++) for (var b = i[v.tab[y]], k = 0; k < b.tabs.length; k++) if (null != b.tabs[k]) { var x = qe._lctf.coverageIndex(b.tabs[k].coverage, p); if (-1 != x) if (4 == b.ltype) for (var _ = b.tabs[k].vals[x], q = 0; q < _.length; q++) { var C = _[q], T = C.chain.length; if (!(T > w)) { for (var A = !0, S = 0; S < T; S++) C.chain[S] != n[u + (1 + S)] && (A = !1); if (A) { n[u] = C.nglyph; for (S = 0; S < T; S++) n[u + S + 1] = -1; } } } else if (5 == b.ltype) { var U = b.tabs[k]; if (2 != U.fmt) continue; var H = qe._lctf.getInterval(U.cDef, p), F = U.cDef[H + 2], E = U.scset[F]; for (a = 0; a < E.length; a++) { var j = E[a], $ = j.input; if (!($.length > w)) { for (A = !0, S = 0; S < $.length; S++) { var L = qe._lctf.getInterval(U.cDef, n[u + 1 + S]); if (-1 == H && U.cDef[L + 2] != $[S]) { A = !1; break; } } if (A) { var P = j.substLookupRecords; for (q = 0; q < P.length; q += 2) P[q], P[q + 1]; } } } } } } } return n; }, qe.U._applyType1 = function(e, t, n) { for (var a = e[t], s = 0; s < n.tabs.length; s++) { var o = n.tabs[s], i = qe._lctf.coverageIndex(o.coverage, a); -1 != i && (1 == o.fmt ? e[t] = e[t] + o.delta : e[t] = o.newg[i]); } }, qe.U.glyphsToPath = function(e, t, n) { for (var a = { cmds: [], crds: [] }, s = 0, o = 0; o < t.length; o++) { var i = t[o]; if (-1 != i) { for (var r = o < t.length - 1 && -1 != t[o + 1] ? t[o + 1] : 0, l = qe.U.glyphToPath(e, i), c = 0; c < l.crds.length; c += 2) a.crds.push(l.crds[c] + s), a.crds.push(l.crds[c + 1]); n && a.cmds.push(n); for (c = 0; c < l.cmds.length; c++) a.cmds.push(l.cmds[c]); n && a.cmds.push("X"), s += e.hmtx.aWidth[i], o < t.length - 1 && (s += qe.U.getPairAdjustment(e, i, r)); } } return a; }, qe.U.pathToSVG = function(e, t) { null == t && (t = 5); for (var n = [], a = 0, s = { M: 2, L: 2, Q: 4, C: 6 }, o = 0; o < e.cmds.length; o++) { var i = e.cmds[o], r = a + (s[i] ? s[i] : 0); for (n.push(i); a < r; ) { var l = e.crds[a++]; n.push(parseFloat(l.toFixed(t)) + (a == r ? "" : " ")); } } return n.join(""); }, qe.U.pathToContext = function(e, t) { for (var n = 0, a = e.crds, s = 0; s < e.cmds.length; s++) { var o = e.cmds[s]; "M" == o ? (t.moveTo(a[n], a[n + 1]), n += 2) : "L" == o ? (t.lineTo(a[n], a[n + 1]), n += 2) : "C" == o ? (t.bezierCurveTo(a[n], a[n + 1], a[n + 2], a[n + 3], a[n + 4], a[n + 5]), n += 6) : "Q" == o ? (t.quadraticCurveTo(a[n], a[n + 1], a[n + 2], a[n + 3]), n += 4) : "#" == o.charAt(0) ? (t.beginPath(), t.fillStyle = o) : "Z" == o ? t.closePath() : "X" == o && t.fill(); } }, qe.U.P = {}, qe.U.P.moveTo = function(e, t, n) { e.cmds.push("M"), e.crds.push(t, n); }, qe.U.P.lineTo = function(e, t, n) { e.cmds.push("L"), e.crds.push(t, n); }, qe.U.P.curveTo = function(e, t, n, a, s, o, i) { e.cmds.push("C"), e.crds.push(t, n, a, s, o, i); }, qe.U.P.qcurveTo = function(e, t, n, a, s) { e.cmds.push("Q"), e.crds.push(t, n, a, s); }, qe.U.P.closePath = function(e) { e.cmds.push("Z"); }, qe.U._drawCFF = function(e, t, n, a) { for (var s = t.stack, o = t.nStems, i = t.haveWidth, r = t.width, l = t.open, c = 0, u = t.x, p = t.y, h = 0, d = 0, m = 0, f = 0, y = 0, g = 0, w = 0, v = 0, b = 0, k = 0, x = { val: 0, size: 0 }; c < e.length; ) { qe.CFF.getCharString(e, c, x); var _ = x.val; if (c += x.size, "o1" == _ || "o18" == _) s.length % 2 != 0 && !i && (r = s.shift() + n.Private.nominalWidthX), o += s.length >> 1, s.length = 0, i = !0; else if ("o3" == _ || "o23" == _) { s.length % 2 != 0 && !i && (r = s.shift() + n.Private.nominalWidthX), o += s.length >> 1, s.length = 0, i = !0; } else if ("o4" == _) s.length > 1 && !i && (r = s.shift() + n.Private.nominalWidthX, i = !0), l && qe.U.P.closePath(a), p += s.pop(), qe.U.P.moveTo(a, u, p), l = !0; else if ("o5" == _) for (;s.length > 0; ) u += s.shift(), p += s.shift(), qe.U.P.lineTo(a, u, p); else if ("o6" == _ || "o7" == _) for (var q = s.length, C = "o6" == _, T = 0; T < q; T++) { var A = s.shift(); C ? u += A : p += A, C = !C, qe.U.P.lineTo(a, u, p); } else if ("o8" == _ || "o24" == _) { q = s.length; for (var S = 0; S + 6 <= q; ) h = u + s.shift(), d = p + s.shift(), m = h + s.shift(), f = d + s.shift(), u = m + s.shift(), p = f + s.shift(), qe.U.P.curveTo(a, h, d, m, f, u, p), S += 6; "o24" == _ && (u += s.shift(), p += s.shift(), qe.U.P.lineTo(a, u, p)); } else { if ("o11" == _) break; if ("o1234" == _ || "o1235" == _ || "o1236" == _ || "o1237" == _) "o1234" == _ && (d = p, m = (h = u + s.shift()) + s.shift(), k = f = d + s.shift(), g = f, v = p, u = (w = (y = (b = m + s.shift()) + s.shift()) + s.shift()) + s.shift(), qe.U.P.curveTo(a, h, d, m, f, b, k), qe.U.P.curveTo(a, y, g, w, v, u, p)), "o1235" == _ && (h = u + s.shift(), d = p + s.shift(), m = h + s.shift(), f = d + s.shift(), b = m + s.shift(), k = f + s.shift(), y = b + s.shift(), g = k + s.shift(), w = y + s.shift(), v = g + s.shift(), u = w + s.shift(), p = v + s.shift(), s.shift(), qe.U.P.curveTo(a, h, d, m, f, b, k), qe.U.P.curveTo(a, y, g, w, v, u, p)), "o1236" == _ && (h = u + s.shift(), d = p + s.shift(), m = h + s.shift(), k = f = d + s.shift(), g = f, w = (y = (b = m + s.shift()) + s.shift()) + s.shift(), v = g + s.shift(), u = w + s.shift(), qe.U.P.curveTo(a, h, d, m, f, b, k), qe.U.P.curveTo(a, y, g, w, v, u, p)), "o1237" == _ && (h = u + s.shift(), d = p + s.shift(), m = h + s.shift(), f = d + s.shift(), b = m + s.shift(), k = f + s.shift(), y = b + s.shift(), g = k + s.shift(), w = y + s.shift(), v = g + s.shift(), Math.abs(w - u) > Math.abs(v - p) ? u = w + s.shift() : p = v + s.shift(), qe.U.P.curveTo(a, h, d, m, f, b, k), qe.U.P.curveTo(a, y, g, w, v, u, p)); else if ("o14" == _) { if (s.length > 0 && !i && (r = s.shift() + n.nominalWidthX, i = !0), 4 == s.length) { var U = s.shift(), H = s.shift(), F = s.shift(), E = s.shift(), j = qe.CFF.glyphBySE(n, F), $ = qe.CFF.glyphBySE(n, E); qe.U._drawCFF(n.CharStrings[j], t, n, a), t.x = U, t.y = H, qe.U._drawCFF(n.CharStrings[$], t, n, a); } l && (qe.U.P.closePath(a), l = !1); } else if ("o19" == _ || "o20" == _) { s.length % 2 != 0 && !i && (r = s.shift() + n.Private.nominalWidthX), o += s.length >> 1, s.length = 0, i = !0, c += o + 7 >> 3; } else if ("o21" == _) s.length > 2 && !i && (r = s.shift() + n.Private.nominalWidthX, i = !0), p += s.pop(), u += s.pop(), l && qe.U.P.closePath(a), qe.U.P.moveTo(a, u, p), l = !0; else if ("o22" == _) s.length > 1 && !i && (r = s.shift() + n.Private.nominalWidthX, i = !0), u += s.pop(), l && qe.U.P.closePath(a), qe.U.P.moveTo(a, u, p), l = !0; else if ("o25" == _) { for (;s.length > 6; ) u += s.shift(), p += s.shift(), qe.U.P.lineTo(a, u, p); h = u + s.shift(), d = p + s.shift(), m = h + s.shift(), f = d + s.shift(), u = m + s.shift(), p = f + s.shift(), qe.U.P.curveTo(a, h, d, m, f, u, p); } else if ("o26" == _) for (s.length % 2 && (u += s.shift()); s.length > 0; ) h = u, d = p + s.shift(), u = m = h + s.shift(), p = (f = d + s.shift()) + s.shift(), qe.U.P.curveTo(a, h, d, m, f, u, p); else if ("o27" == _) for (s.length % 2 && (p += s.shift()); s.length > 0; ) d = p, m = (h = u + s.shift()) + s.shift(), f = d + s.shift(), u = m + s.shift(), p = f, qe.U.P.curveTo(a, h, d, m, f, u, p); else if ("o10" == _ || "o29" == _) { var L = "o10" == _ ? n.Private : n; if (0 == s.length) console.log("error: empty stack"); else { var P = s.pop(), I = L.Subrs[P + L.Bias]; t.x = u, t.y = p, t.nStems = o, t.haveWidth = i, t.width = r, t.open = l, qe.U._drawCFF(I, t, n, a), u = t.x, p = t.y, o = t.nStems, i = t.haveWidth, r = t.width, l = t.open; } } else if ("o30" == _ || "o31" == _) { var O = s.length, D = (S = 0, "o31" == _); for (S += O - (q = -3 & O); S < q; ) D ? (d = p, m = (h = u + s.shift()) + s.shift(), p = (f = d + s.shift()) + s.shift(), q - S == 5 ? (u = m + s.shift(), S++) : u = m, D = !1) : (h = u, d = p + s.shift(), m = h + s.shift(), f = d + s.shift(), u = m + s.shift(), q - S == 5 ? (p = f + s.shift(), S++) : p = f, D = !0), qe.U.P.curveTo(a, h, d, m, f, u, p), S += 4; } else { if ("o" == (_ + "").charAt(0)) throw console.log("Unknown operation: " + _, e), _; s.push(_); } } } t.x = u, t.y = p, t.nStems = o, t.haveWidth = i, t.width = r, t.open = l; }; const Ce = getDefaultExportFromCjs(qe), decode = async () => { var e; const t = oe.document.querySelectorAll("style"); let n = null; if (t.forEach((e => { var t; -1 !== (null == (t = e.textContent) ? void 0 : t.indexOf("font-cxsecret")) && (n = e); })), !n) return !0; const a = null == (e = n.textContent) ? void 0 : e.match(/base64,([\w\W]+?)'/); if (!a) return; const s = base64ToUint8Array(a[1]), o = Ce.parse(s); let i = function(e) { try { return JSON.parse(K(e)); } catch (t) { return null; } }("ttf") || await ttfDownload1("https://cdn.jsdelivr.net/gh/chengbianruan/staticfile/c.json"); if (!i) return !1; let r = {}; for (let l = 19968; l < 40870; l++) { let e = Ce.U.codeToGlyph(o, l); e && (e = Ce.U.glyphToPath(o, e), e = somd5(JSON.stringify(e)).slice(24), r[l] = i[e]); } return oe.document.querySelectorAll(".font-cxsecret").forEach((e => { let t = e.innerHTML; Object.keys(r).forEach((e => { const n = new RegExp(String.fromCharCode(e), "g"); t = t.replace(n, String.fromCharCode(r[e])); })), e.innerHTML = t, e.classList.remove("font-cxsecret"); })), !0; }, base64ToUint8Array = e => { const t = atob(e), n = new Uint8Array(t.length); for (let a = 0; a < t.length; a++) n[a] = t.charCodeAt(a); return n; }, Te = [ { type: "save", name: "\u5b66\u4e60\u901a\u8003\u8bd5\u65b0\u7248\u6536\u5f55", match: () => location.href.includes("work/view") || location.href.includes("test/reVersionPaperMarkContentNew"), question: { html: ".questionLi", question: "h3.mark_name", options: "ul.mark_letter.colorDeep > li", type: ".colorShallow", workType: "zj", pageType: "cx" }, answerHook: e => { let t = removeHtml(M(e.html).find('span[class="colorShallow"]').html()); if ("" === t) return null; let n = t.match(/^\((.+?)\)/); if (null === n) return null; e.type = n[1].split(",")[0], e.question = titleClean(e.question.split(t)[1].trim()).trim(), e.options = removeStartChar(e.options); const a = M(e.html).find(".mark_score>.totalScore>i").text(), s = t.match(/(\d+(\.\d+)?)/); let o, i = M(e.html).find(".marking_dui").length > 0 || a == ((null == s ? void 0 : s[0]) || 0); switch (e.type) { case "\u5355\u9009\u9898": case "\u591a\u9009\u9898": e.type = "\u5355\u9009\u9898" === e.type ? "0" : "1", e.answer = M(e.html).find(".mark_answer>div>span.colorGreen:eq(0)").text().replace("\u6b63\u786e\u7b54\u6848:", "").trim().split("").map((t => e.options[t.charCodeAt(0) - 65])), e.answer = e.answer.filter((e => "" !== e)), 0 === e.answer.length && i && (e.answer = M(e.html).find(".mark_answer>div>span.colorDeep:eq(0)").text().replace("\u6211\u7684\u7b54\u6848:", "").trim().split("").map((t => e.options[t.charCodeAt(0) - 65])), e.answer = e.answer.filter((e => "" !== e))); break; case "\u5224\u65ad\u9898": if (e.type = "3", e.options = [], e.answer = judgeAnswer(M(e.html).find(".mark_answer>div>span.colorGreen:eq(0)").text().replace("\u6b63\u786e\u7b54\u6848", "")), e.answer, 0 === e.answer.length) { if (o = removeHtml(M(e.html).find(".mark_answer>div>span.colorDeep:eq(0)").html()), e.answer = judgeAnswer(o), 0 === e.answer.length) return null; i || (e.answer = "\u6b63\u786e" === e.answer[0] ? [ "\u9519\u8bef" ] : [ "\u6b63\u786e" ]); } break; case "\u7b80\u7b54\u9898": if (e.type = "4", e.answer = removeHtml(M(e.html).find(".mark_answer>div>.colorGreen:eq(0)").html()).replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), e.answer.length < 10) return null; e.answer = [ e.answer ]; break; case "\u540d\u8bcd\u89e3\u91ca": if (e.type = "5", e.answer = removeHtml(M(e.html).find(".mark_answer>div>.colorGreen:eq(0)").html()).replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), e.answer.length < 10) return null; e.answer = [ e.answer ]; break; case "\u8ba1\u7b97\u9898": if (e.type = "7", e.answer = removeHtml(M(e.html).find(".mark_answer>div>.colorGreen:eq(0)").html()).replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), e.answer.length < 10) return null; e.answer = [ e.answer ]; break; case "\u8bba\u8ff0\u9898": if (e.type = "6", e.answer = removeHtml(M(e.html).find(".mark_answer>div>.colorGreen:eq(0)").html()).replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), e.answer.length < 10) return null; e.answer = [ e.answer ]; break; case "\u586b\u7a7a\u9898": e.type = "2", e.answer = M(e.html).find(".mark_answer>div>.colorGreen:eq(0)>dd").map(((e, t) => removeHtml(M(t).html()).replace(`(${e + 1})`, "").trim())).get(); break; default: return null; } return e; }, paper: async e => { const t = { platform: "cx" }, n = M("#courseId").val(), a = (oe.document.body.innerHTML.match(/(?:examId|relationId)=(\d+)/) || [])[1] || "", s = `https://mobilelearn.chaoxing.com/v2/apis/class/getClassDetail?courseId=${n}&classId=${M("#classId").val()}`; await request(s, "GET").then((e => { const n = JSON.parse(e[0].responseText).data.course.data[0]; t.name = n.name, t.info = {}, t.info.imageurl = n.imageurl; })), t.hash = n, t.info = {}, t.chapter = [ { hash: `${a}`, name: M(".mark_title").text().trim(), question: e } ], _e.setPaper(t.hash, t); } }, { type: "hook", name: "hook", match: location.href.includes("work/selectWorkQuestionYiPiYue") && location.href.includes("mooc2=0"), main: e => { location.href.includes("mooc2=0") ? oe.location.href = location.href.replace("mooc2=0", "mooc2=1") : oe.location.href = location.href + "&mooc2=1"; } }, { type: "save", name: "\u5b66\u4e60\u901a\u4f5c\u4e1a\u6536\u5f55\u65b0", match: () => location.href.includes("work/selectWorkQuestionYiPiYue") && location.href.includes("mooc2=1"), question: { html: ".TiMu", question: ".Zy_TItle .clearfix", options: "ul.Zy_ulTop li", type: ".newZy_TItle", workType: "zj", pageType: "cx" }, answerHook: e => { e.type = M(e.html).find(".newZy_TItle").text().replace(/\u3010|\u3011/g, "").trim(); let t, n = M(e.html).find(".marking_dui").length > 0; switch (removeHtml(M(e.html).find(".Py_addpy:eq(0)").html()), e.question = titleClean(e.question).trim(), e.type) { case "\u5355\u9009\u9898": case "\u591a\u9009\u9898": e.type = "\u5355\u9009\u9898" === e.type ? "0" : "1", e.options = M(e.html).find("ul.Zy_ulTop li").map(((e, t) => { let n = M(t).find("i.fl").text().trim(), a = removeHtml(M(t).html()); return "" === n ? a.trim() : a.split(n)[1].trim(); })).get(), e.answer = M(e.html).find(".correctAnswer >.fl.answerCon").text().trim().split("").map((t => e.options[t.charCodeAt(0) - 65])), 0 === e.answer.length && n && (e.answer = M(e.html).find(".myAnswer > .fl.answerCon").text().trim().split("").map((t => e.options[t.charCodeAt(0) - 65]))); break; case "\u5224\u65ad\u9898": if (e.type = "3", e.answer = M(e.html).find(".correctAnswer > .fl.answerCon").text().trim().split("").map((e => e.includes("\u6b63\u786e") || e.includes("\u5bf9") || e.includes("\u221a") ? "\u6b63\u786e" : e.includes("\u9519\u8bef") || e.includes("\u9519") || e.includes("\xd7") ? "\u9519\u8bef" : null)).filter((e => null !== e)), 0 === e.answer.length) { t = removeHtml(M(e.html).find(".fl.answerCon").html()); let [n, a] = [ ".marking_dui", ".marking_cuo" ].map((t => M(e.html).find(t).length)); if (n + a === 0) return null; if (t.includes("\u6b63\u786e") || t.includes("\u5bf9") || t.includes("\u221a")) e.answer = [ "\u6b63\u786e" ]; else { if (!(t.includes("\u9519\u8bef") || t.includes("\u9519") || t.includes("\xd7"))) return null; e.answer = [ "\u9519\u8bef" ]; } 0 === n && 0 !== a && (e.answer = "\u6b63\u786e" === e.answer[0] ? "\u9519\u8bef" : "\u6b63\u786e"); } break; case "\u586b\u7a7a\u9898": e.type = "2", e.answer = M(e.html).find(".correctAnswerBx>.correctAnswer>p:not(.clear)").map(((e, t) => removeHtml(M(t).html()).replace(`(${e + 1})`, "").trim())).get().filter((e => "" !== e)), 0 == e.answer.length && (e.answer = M(e.html).find(".myAllAnswerBx>.myAnswerBx>.myAnswer").map(((e, t) => removeHtml(M(t).html()).replace(/\u7b2c[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\u7a7a\uff1a/, "").trim())).get(), e.answer.length !== M(e.html).find(".marking_dui").length && (e.answer = [])); break; case "\u5206\u5f55\u9898": if (e.type = "9", e.answer = M(e.html).find(".correctAnswerBx>.correctAnswer>p:not(.clear)").map(((e, t) => removeHtml(M(t).html()))).get().filter((e => "" !== e)), e.answer.length != M(e.html).find(".CorrectOrNot").length) { if (M(e.html).find(".marking_cuo").length > 0) return null; if (e.answer = M(e.html).find(".myAnswerBx>.myAnswer>p:not(.clear)").map(((e, t) => removeHtml(M(t).html()))).get().filter((e => "" !== e)), e.answer.length != M(e.html).find(".CorrectOrNot").length) return null; } e.answer; break; case "\u8fde\u7ebf\u9898": e.type = "11"; let a = M(e.html).find("ul.firstUlList>li:not(.groupTitile)").map(((e, t) => { let n = M(t).clone(); return n.find(".fl").remove(), removeHtml(n.html()); })).get(), s = M(e.html).find("ul.secondUlList>li:not(.groupTitile)").map(((e, t) => { let n = M(t).clone(); return n.find(".fl").remove(), removeHtml(n.html()); })).get(); t = M(e.html).find(".correctAnswer >.fl.answerCon >.collectAnswer").map(((e, t) => removeHtml(M(t).text()))).get(), e.options = [ a, s ]; let o = {}; t.forEach((e => { let [t, n] = e.split("-"); t.charCodeAt(0) >= 65 ? t = (t.charCodeAt(0) - 65).toString() : /^\d+$/.test(t) && (t = (parseInt(t) - 1).toString()), n.charCodeAt(0) >= 65 ? n = (n.charCodeAt(0) - 65).toString() : /^\d+$/.test(n) && (n = (parseInt(n) - 1).toString()), o[a[t]] = s[n]; })), e.answer = o, e.answer; break; default: return e.type, null; } return e; }, paper: async e => { const t = { platform: "cx" }, n = oe.courseId, a = oe.jobid, s = `https://mobilelearn.chaoxing.com/v2/apis/class/getClassDetail?courseId=${n}&classId=${oe.classId}`; await request(s, "GET").then((e => { const n = JSON.parse(e[0].responseText).data.course.data[0]; t.name = n.name, t.info = {}, t.info.imageurl = n.imageurl; })), t.hash = n, t.info = {}, t.chapter = [ { hash: `${a}`, name: M(".ceyan_name>h3").text().trim(), question: e } ], _e.setPaper(t.hash, t); } }, { type: "ask", name: "\u5b66\u4e60\u901a\u65b0\u7248\u4f5c\u4e1a", match: /\/mooc2\/work\/dowork/i.test(location.pathname), question: { html: ".questionLi", question: "h3", options: "ul:eq(0) li .after, .answer_p", type: "input[name^=answertype]:eq(0)", workType: "zy", pageType: "cx" }, questionHook: e => { const t = removeHtml(M(e.html).find(".colorShallow").html()); return e.question = titleClean(e.question.split(t)[1].trim()).trim(), e.$options = M(e.html).find(".answerBg"), e; }, setAnswerHook: e => { qc(e.html), qc1(e.html); } }, { type: "ask", name: "\u5b66\u4e60\u901a\u65b0\u7248\u8003\u8bd5", match: /exam\/preview/i.test(location.pathname) || /exam\/test\/reVersionTestStartNew/i.test(location.pathname), question: { html: ".questionLi", question: "h3", options: "ul:eq(0) li .after, .answer_p", type: "input[name^=type]:not([name=type])", workType: "ks", pageType: "cx" }, questionHook: e => { const t = removeHtml(M(e.html).find(".colorShallow").html()); return e.question = titleClean(e.question.split(t)[1].trim()).trim(), e.$options = M(e.html).find(".answerBg"), e; }, setAnswerHook: e => { qc(e.html), qc1(e.html); }, next: () => { M('.nextDiv .jb_btn:contains("\u4e0b\u4e00\u9898")').click(); } }, { type: "ask", name: "\u5b66\u4e60\u901a\u65e7\u7248\u4f5c\u4e1a", match: /work\/doHomeWorkNew/i.test(location.pathname) && 0 == location.href.includes("mooc2=1"), init: async () => { if (!(await decode())) return msg("\u9875\u9762\u89e3\u5bc6\u5931\u8d25\uff0c\u65e0\u6cd5\u7b54\u9898\uff0c\u8bf7\u5c1d\u8bd5\u5207\u6362\u7f51\u7edc\u6216\u53cd\u9988\u7ed9\u4f5c\u8005\u5427", "error"), !1; }, question: { html: ".TiMu", question: ".clearfix.fontLabel", options: "ul:eq(0) li .after", type: "input[name^=answertype]:eq(0), .answer_p", workType: "zy", pageType: "cx" }, questionHook: e => { switch (e.question = titleClean(e.question).trim(), e.$options = M(e.html).find(".fl.before"), e.type) { case "3": e.options = M(e.html).find("ul:eq(0) li").map(((e, t) => M(t).find(".ri").length > 0 ? "\u6b63\u786e" : M(t).find(".wr").length > 0 ? "\u9519\u8bef" : isTrue(M(t).attr("aria-label") || "") ? "\u6b63\u786e" : isFalse(M(t).attr("aria-label") || "") ? "\u9519\u8bef" : void 0)).get(), e.options = [], e.$options = M(e.html).find("ul>li"); break; case "11": let t = M(e.html).find("ul.firstUlList>li:not(.groupTitile)").map(((e, t) => { let n = M(t).clone(); return n.find(".fl").remove(), removeHtml(n.html()); })).get(), n = M(e.html).find("ul.secondUlList>li:not(.groupTitile)").map(((e, t) => { let n = M(t).clone(); return n.find(".fl").remove(), removeHtml(n.html()); })).get(); e.options = [ t, n ], e.$options = M(e.html).find("ul.thirdUlList>li:not(.groupTitile)"); } return e; }, setAnswerHook: e => { qc(e.html), qc1(e.html); }, setAnswer: e => { switch (e.type) { case "11": return e.ques.$options.each(((t, n) => { let a = e.ques.options[0], s = e.ques.options[1], o = e.answer[a[t]], i = s.indexOf(o); o = String.fromCharCode(i + 65), M(n).find("select>option").each(((e, t) => { M(t).val(), M(t).val() == o && M(t).prop("selected", !0); })); })), e.answer, !1; case "3": let t = e.answer; return e.ques.$options.each(((e, n) => { isTrue(t) && isTrue(removeHtml(M(n).html())) && M(n).find("input").click(), isFalse(t) && isFalse(removeHtml(M(n).html())) && M(n).find("input").click(); })), !1; default: return !0; } } }, { type: "ask", name: "\u5b66\u4e60\u901a\u65b0\u7248\u7ae0\u8282", match: /work\/doHomeWorkNew/i.test(location.pathname) && location.href.includes("mooc2=1"), init: async () => { if (!(await decode())) return msg("\u9875\u9762\u89e3\u5bc6\u5931\u8d25\uff0c\u65e0\u6cd5\u7b54\u9898\uff0c\u8bf7\u5c1d\u8bd5\u5207\u6362\u7f51\u7edc\u6216\u53cd\u9988\u7ed9\u4f5c\u8005\u5427", "error"), !1; }, question: { html: ".TiMu", question: ".clearfix.fontLabel", options: "ul:eq(0) li .after, .answer_p", type: "input[name^=answertype]:eq(0)", workType: "zj", pageType: "cx" }, questionHook: e => { switch (e.question = titleClean(e.question).trim(), e.type) { case "3": e.options = M(e.html).find("ul:eq(0) li").map(((e, t) => "true" === M(t).find(".num_option").attr("data") ? "\u6b63\u786e" : "false" === M(t).find(".num_option").attr("data") ? "\u9519\u8bef" : void 0)).get(), e.options = []; break; case "11": let t = M(e.html).find("ul.firstUlList>li:not(.groupTitile)").map(((e, t) => { let n = M(t).clone(); return n.find(".fl").remove(), removeHtml(n.html()); })).get(), n = M(e.html).find("ul.secondUlList>li:not(.groupTitile)").map(((e, t) => { let n = M(t).clone(); return n.find(".fl").remove(), removeHtml(n.html()); })).get(); e.options = [ t, n ], e.$options = M(e.html).find("ul.thirdUlList>li:not(.groupTitile)"); break; default: e.type; } return e; }, setAnswerHook: e => { qc(e.html), qc1(e.html); }, setAnswer: e => (e.ques.options, "11" !== e.type || (e.ques.$options.each(((t, n) => { let a = e.ques.options[0], s = e.ques.options[1], o = e.answer[a[t]], i = s.indexOf(o); o = String.fromCharCode(i + 65), oe.$(n).find(".dept_select").chosen().val(o).trigger("chosen:updated"); })), e.answer, !1)) } ], Ae = [ { type: "ask", name: "\u667a\u6167\u6811\u7ae0\u8282", tips: "\u667a\u6167\u6811\u5fc5\u987b\u5f00\u81ea\u52a8\u8df3\u8f6c\uff0c\u5426\u5219\u7b54\u6848\u53ef\u80fd\u65e0\u6cd5\u4fdd\u5b58\u5bfc\u81f4\u4f4e\u5206\uff01", match: location.href.includes("zhihuishu.com") && !location.href.includes("checkHomework") && location.host.includes("zhihuishu") && ("/stuExamWeb.html" === location.pathname || location.href.includes("/webExamList/dohomework/") || location.href.includes("/webExamList/doexamination/")), question: { html: ".examPaper_box > div:eq(1) >div:not(.examPaper_partTit)", question: ".subject_describe.dynamic-fonts:eq(0) div:eq(0)", options: ".subject_node .nodeLab .label.clearfix .node_detail", type: ".subject_type span:first-child", workType: "zhs", pageType: "zhs" }, init: async () => { await waitUntil((function() { return !M(".yidun_popup").hasClass("yidun_popup--light") && oe.zhsques; })); }, next: () => { M(".switch-btn-box button:eq(1)").click(); }, questionHook: (e, t) => { const n = oe.zhsques.examBase.workExamParts.map((e => e.questionDtos)).flat()[t]; return e.type = typeConvert(n.questionType.name), e.question = removeHtml(n.name), e.options = n.questionOptions ? n.questionOptions.map((e => removeHtml(e.content))) : [], "3" == e.type && (e.options = []), e; } }, { type: "save", name: "\u667a\u6167\u6811\u4f5c\u4e1a\u6536\u5f55", match: location.href.includes("zhihuishu.com") && location.href.includes("checkHomework") && location.host.includes("zhihuishu") && ("/stuExamWeb.html" === location.pathname || location.href.includes("/webExamList/checkHomework/")), question: { html: ".questionType", question: ".subject_describe", options: ".examquestions-answer", type: ".newZy_TItle", workType: "zhs", pageType: "zhs" }, init: async () => { await waitUntil((function() { return M(".questionType").length > 0 && oe.zhsques && oe.zhsimgAnswer; })); }, answerHook: e => { let t = M(e.html).find(".examPaper_subject").attr("data-questionid"); const n = oe.zhsimgAnswer; let a = oe.zhsques.examBase.workExamParts.map((e => e.questionDtos)).flat().find((e => e.id == t)); return a.answer = n[a.id], e.question = removeHtml(a.name), e.type = typeConvert(a.questionType.name), e.options = a.questionOptions.map((e => removeHtml(e.content))), e.answer = a.answer.split("").map((t => e.options[t.charCodeAt(0) - 65])), "3" == e.type && (e.options = [], e.answer = isTrue(e.answer[0]) ? [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? [ "\u9519\u8bef" ] : []), e; } } ], Se = [ { type: "hook", name: "\u82af\u4f4d\u6559\u80b2hook", match: "www.51xinwei.com" === location.host, main: e => { oe.mainClass = M(".el-main > div:eq(0)").attr("class"); let t = new MutationObserver((async e => { oe.mainClass !== M(".el-main > div:eq(0)").attr("class") && (oe.mainClass = M(".el-main > div:eq(0)").attr("class"), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 === M(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); for (let n of e) "attributes" === n.type && "class" === n.attributeName && n.target.textContent && (n.target.textContent.includes("\u4e0b\u4e00\u9898") || n.target.textContent.includes("\u4e0a\u4e00\u9898")) && (t.disconnect(), vuePageChange$1()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u82af\u4f4d\u6559\u80b2\u4f5c\u4e1a", tips: "\u82af\u4f4d\u6559\u80b2\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u5f85\u9002\u914d", match: () => "www.51xinwei.com" === location.host && /student\/#\/courseInfo\/[A-Za-z0-9]+\/homework/i.test(location.href), question: { html: ".content-area > div.content", question: ".content", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "xinwei", pageType: "xinwei" }, init: async () => { await waitUntil((function() { return 0 !== M(".question-box").length; })); }, next: () => { M('.toggle-box > button:contains("\u4e0b\u4e00\u9898")').click(); }, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { switch (M(e.html).find(".question-box .tag").text()) { case "\u5355\u9009": e.type = "0"; break; case "\u591a\u9009": e.type = "1"; break; case "\u5224\u65ad": e.type = "3"; } return e; } }, { type: "save", name: "\u82af\u4f4d\u6559\u80b2", match: () => "www.51xinwei.com" === location.host && location.href.includes("/homeworkDetailPage"), question: { html: ".question-content-body", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "xinwei", pageType: "xinwei" }, init: async () => { await waitUntil((function() { return 0 !== M(".question-content-body").length; })); }, answerHook: e => { const t = M(e.html).find(".question-box .tag").text(); let n = M(e.html).find(".answer-area > span:eq(1)").text(); switch (t) { case "\u5355\u9009": case "\u591a\u9009": let a = n.split(","); if (e.answer = a.map((t => e.options[t.charCodeAt(0) - 65])), 0 === e.answer.length) return; e.type = "\u5355\u9009" === t ? "0" : "1"; break; case "\u5224\u65ad": e.type = "3", "T" == n && (e.answer = [ "\u6b63\u786e" ]), "F" == n && (e.answer = [ "\u9519\u8bef" ]); } return e; } } ], Ue = [ { type: "hook", name: "\u667a\u666e\u6e05\u8a00token\u83b7\u53d6", match: /chatglm.cn\/main\//i.test(location.href), main: e => { const t = e.app, n = document.cookie.split(";"); let a = ""; n.forEach((e => { /chatglm_refresh_token/i.test(e) && (a = e.split("=")[1]); })), a && (t.app.gpt.forEach((e => { "GLM" === e.name && (e.key = a); })), t.setConfig(t.app), msg("\u667a\u666e\u6e05\u8a00token\u83b7\u53d6\u6210\u529f")); } }, { type: "hook", name: "\u8baf\u98de\u661f\u706btoken\u83b7\u53d6", match: /xinghuo.xfyun.cn\/desk/i.test(location.href), main: e => { const t = e.app, n = document.cookie.split(";"); let a = ""; n.forEach((e => { /ssoSessionId/i.test(e) && (a = e.split("=")[1]); })), a && (t.app.gpt.forEach((e => { "spark" === e.name && (e.key = a); })), t.setConfig(t.app), msg("\u8baf\u98de\u661f\u706btoken\u83b7\u53d6\u6210\u529f")); } } ], He = { single_selection: "\u5355\u9009\u9898", multiple_selection: "\u591a\u9009\u9898", true_or_false: "\u5224\u65ad\u9898", fill_in_blank: "\u586b\u7a7a\u9898", short_answer: "\u7b80\u7b54\u9898", text: "\u6587\u672c", analysis: "\u7efc\u5408\u9898", matching: "\u5339\u914d\u9898", random: "\u968f\u673a\u9898", cloze: "\u5b8c\u5f62\u586b\u7a7a\u9898" }, Fe = [ { type: "hook", name: "\u56fd\u5f00hook", match: location.host.includes("ouchn.cn"), main: e => { oe.mainClass = getUrl(); let t = new MutationObserver((async e => { oe.mainClass !== getUrl() && (oe.mainClass = getUrl(), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 !== M(".selectDan").length; })), vuePageChange$1(), t.disconnect()); })); M("body").length >= 1 && t.observe(M("body")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "\u56fd\u5f00\u7b54\u6848\u6536\u5f55\u65e7", match: /\/exam\/([0-9]+)\/subjects#\/submission\/([0-9]+)/i.test(location.href), question: { html: "li.subject", question: ".summary-title .subject-description", options: ".subject-options li .option-content", type: ".subject-point > span:eq(0)", workType: "guokai", pageType: "guokai" }, init: async () => { await waitUntil((function() { return M(".loading-gif").hasClass("ng-hide"); })); }, answerHook: e => { const t = oe.angular.element(e.html).scope().subject; if ("text" === t.type) return; let n = !1; const a = parseFloat(t.point), s = parseFloat(t.score), o = 0 !== a && a === s; let i = M(`
${e.answer}
`), !1; } return !0; } }, { type: "save", name: "\u804c\u6559\u4e91\u6536\u5f55", match: () => location.href.includes("examrecord_recordDetail.action"), question: { html: ".q_content", question: ".divQuestionTitle", options: ".questionOptions>div.q_option_readonly", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== M(".q_content").length; })); }, answerHook: e => { const t = M(e.html).find(".exam.icon_examright").length, n = M(e.html).find("input[name='quesId']:not([id='']").attr("id"), a = M(`input#qId${n}`).attr("qtype"), s = M(e.html).find("span[name^='questionIndex']").text().trim() + "\u3001", o = M(e.html).find(".q_score").text().trim(); switch (e.question = e.question.replace(s, "").replace(o, "").trim(), e.options = M(e.html).find(".questionOptions>div.q_option_readonly").map(((e, t) => { let n = M(t).find("span[name='optionIndexName']").text().trim(); return removeHtml(M(t).html()).replace(n, "").trim(); })).get(), a) { case "\u5355\u9879\u9009\u62e9\u9898": case "\u5355\u9009\u9898": case "singlechoice": e.type = "0"; break; case "\u591a\u9879\u9009\u62e9\u9898": case "\u591a\u9009\u9898": case "multichoice": e.type = "1"; break; case "\u5224\u65ad\u9898": case "bijudgement": e.type = "3"; break; case "fillblank": case "\u586b\u7a7a\u9898": e.type = "2"; const t = M(e.html).find(".answerOption>span:eq(0)").clone(); t.find(".exam_answers").remove(), e.question = titleClean(removeHtml(t.html())).replace(/\uff08.*?\u5206\uff09/g, "").trim(); break; case "cloze": case "\u5b8c\u5f62\u586b\u7a7a": e.type = "14", e.options = M(e.html).find(".questionOptions>.exam_cloze_choice").map(((e, t) => [ M(t).find(".optionContent").map(((e, t) => removeHtml(M(t).html()))).get() ])).get(), e.answer = M(e.html).find(".exam_rightAnswer .answer_table .one_answer>span").map(((t, n) => { const a = M(n).text().trim(); return e.options[t][a.charCodeAt(0) - 65]; })).get(); break; case "textarea": e.type = "4", e.options = [], e.answer = removeHtml(M(e.html).find(".exam_rightAnswer .has_standard_answer").html()); } switch (e.type) { case "0": case "1": if (e.answer = M(e.html).find('.exam_rightAnswer .exam_answers_tit>span[name="rightAnswer"]').text().trim().split("").map((t => e.options[t.charCodeAt(0) - 65])), e.answer, 0 == e.answer.length) { if (0 == t) return; e.answer = M(e.html).find('.exam_stu_answer span[name="stuAnswer"]').text().trim().split("").map((t => e.options[t.charCodeAt(0) - 65])); } break; case "2": e.answer = 0 == t ? M(e.html).find(".exam_rightAnswer span.fillblank_answer").map(((e, t) => removeHtml(M(t).html()))).get() : M(e.html).find(".exam_stu_answer span.fillblank_answer").map(((e, t) => removeHtml(M(t).html()))).get(), e.answer; break; case "3": e.options = []; let n = M(e.html).find('.exam_stu_answer span[name="stuAnswer"]').text().trim(); [ "\u6b63\u786e", "\u9519\u8bef" ].includes(n) && (e.answer = t ? [ n ] : [ "\u6b63\u786e" === n ? "\u9519\u8bef" : "\u6b63\u786e" ]); } return e; } }, { type: "save", name: "\u667a\u6167\u804c\u6559\u6536\u5f55", match: () => "zjy2.icve.com.cn" === location.host && (location.href.includes("/spocviewsJob") || location.href.includes("/viewExam")), question: { html: ".subjectDet", question: ".seeTitle .htmlP.ql-editor", options: ".optionList .htmlP.ql-editor", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== M(".subjectDet").length; })); }, answerHook: e => { const t = M(e.html).find(".xvhao").text().trim(); e.type = typeConvert(t.match(/\u3010(.*)\u3011/)[1].trim().replace("\u586b\u7a7a\u9898(\u5ba2\u89c2)", "\u586b\u7a7a\u9898")); let n = M(e.html).find(".answer").text().trim(); switch (e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.type) { case "2": e.options = [], e.answer = M(e.html).find(".answer>span").map(((e, t) => removeHtml(M(t).html()))).get(); break; case "3": e.options = M(e.html).find(".optionList>div").map(((e, t) => removeHtml(M(t).html()))).get(), e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.answer = judgeAnswer(e.answer[0]), e.options = []; break; case "11": const t = M(e.html).find(".optionList .matching>.htmlP.ql-editor").map(((e, t) => removeHtml(M(t).html()))).get(), a = M(e.html).find(".optionList>.text .htmlP.ql-editor").map(((e, t) => removeHtml(M(t).html()))).get(); e.options = [ t, a ]; let s = {}; n = M(e.html).find(".answer>span").map(((e, n) => { let [o, i] = M(n).text().trim().split("."); o.charCodeAt(0) >= 65 ? o = (o.charCodeAt(0) - 65).toString() : /^\d+$/.test(o) && (o = (parseInt(o) - 1).toString()), i.charCodeAt(0) >= 65 ? i = (i.charCodeAt(0) - 65).toString() : /^\d+$/.test(i) && (i = (parseInt(i) - 1).toString()), s[t[o]] = a[i]; })), e.answer = s; } return e; } }, { type: "ask", name: "\u667a\u6167\u804c\u6559+\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u95ee\u9898\u8f83\u591a\uff0c\u9047\u5230\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.href.includes("coursePreview/jobTest") || location.href.includes("spockeepTest") || location.href.includes("spocjobTest"), question: { html: ".subjectDet", question: ".ql-editor", options: ".optionList .ql-editor", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== M(".subjectDet").length; })); }, next: () => {}, ischecked: e => e.parent().parent().parent().hasClass("is-checked"), questionHook: e => { const t = M(e.html).find(".title.titleTwo").text().trim(); if (e.type = typeConvert(t.match(/\u3010(.*)\u3011/)[1].trim().replace("\u586b\u7a7a\u9898(\u5ba2\u89c2)", "\u586b\u7a7a\u9898")), "3" === e.type) e.options = [], e.$options = M(e.html).find(".optionList>div label"); return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u667a\u6167\u804c\u6559+\u6536\u5f55", match: () => "zyk.icve.com.cn" === location.host && (location.href.includes("/coursePreview/viewJob1") || location.href.includes("/viewExam")), question: { html: ".subjectDet", question: ".seeTitle>span:eq(1)", options: ".optionList>div", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== M(".subjectDet").length; })); }, answerHook: e => { e.options = removeStartChar(e.options); const t = M(e.html).find(".xvhao").text().trim(); e.type = typeConvert(t.match(/\u3010(.*)\u3011/)[1].trim().replace("\u586b\u7a7a\u9898(\u5ba2\u89c2)", "\u586b\u7a7a\u9898")); let n = M(e.html).find(".answer").text().trim(); switch (e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.type) { case "2": e.options = [], e.answer = M(e.html).find(".answer>span").map(((e, t) => removeHtml(M(t).html()))).get(); break; case "3": e.options = M(e.html).find(".optionList>div").map(((e, t) => removeHtml(M(t).html()))).get(), e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.answer = judgeAnswer(e.answer[0]), e.options = []; } return e; } } ], Le = [ { type: "ask", name: "\u5ddd\u519c\u5728\u7ebf\u7b54\u9898", tips: "\u5ddd\u519c\u5728\u7ebf\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => ("any.cnzx.info:81" === location.host || "zice.cnzx.info" === location.host) && location.href.includes("KaoShi/ShiTiYe.aspx"), question: { html: "li.question", question: ".wenti >p.stem", options: ".wenti > ol > li", type: ".question_head > span:eq(0)", workType: "cnzx", pageType: "cnzx" }, init: async () => {}, ischecked: e => e.find("input").prop("checked"), questionHook: e => (e.$options = M(e.html).find(".wenti > ol > li input"), 0 !== e.options.length && (e.type = "radio" === e.$options.eq(0).attr("type") ? "0" : "1", 2 === e.options.length && e.options.includes("\u6b63\u786e") && e.options.includes("\u9519\u8bef") && (e.type = "3", e.options = [])), e), setAnswer: e => "3" !== e.type || (M(e.html).find(".wenti > ol > li").each(((t, n) => { isTrue(e.answer) && isTrue(removeHtml(M(n).html())) && e.ques.$options.eq(t).click(), isFalse(e.answer) && isFalse(removeHtml(M(n).html())) && e.ques.$options.eq(t).click(); })), !1), finish: e => { M("li.paginationjs-next.J-paginationjs-next").click(); } }, { type: "save", name: "\u6536\u5f55", match: () => "zice.cnzx.info" === location.host && location.href.includes("ZaiXianLianXi.aspx"), question: { html: ".ShiTi>.ShiTiMiaoShu", question: ".ShiTiMiaoShu", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "cnzx", pageType: "cnzx" }, init: async () => {}, answerHook: e => { M(e.html).text(), e.question = removeHtml(titleClean(removeHtml(M(e.html).html()))); let t = M("ul.TiXing>li.DangQianTiXing:eq(0)>a").text(), n = [], a = M(e.html).next(); switch (e.options = removeStartChar(a.find("ul li").map(((e, t) => (M(t).hasClass("DaAn1") && n.push(e), titleClean(removeHtml(M(t).html()))))).get()), e.answer = n.map((t => e.options[t])), t) { case "\u5355\u9009\u9898": case "\u8bcd\u6c47\u4e0e\u7ed3\u6784": case "\u4ea4\u9645\u7528\u8bed": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.type = "3", e.options = [], e.answer = isTrue(e.answer[0]) ? [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? [ "\u9519\u8bef" ] : []; } return e; } } ], yktDecode = (e, t, n) => { let a = /(.+?)<\/span>/g, s = n.match(a); return s && s.forEach((s => { a = /(.+?)<\/span>/; let o = a.exec(s); if (o && o.length > 1) { let a = o[1].split("").map((n => e[t[n]])).join(""); n = n.replace(o[0], a); } })), n; }, ttfDownload = async e => new Promise((t => { se({ method: "GET", url: e, responseType: "arraybuffer", onload: function(e) { let n = {}; const a = Ce.parse(e.response); for (let t = 19968; t <= 40960; t++) { let e = String.fromCharCode(t), s = Ce.U.codeToGlyph(a, t); const o = Ce.U.glyphToPath(a, s); let i = somd5(JSON.stringify(o)); n[e] = i; } t(n); }, onerror: function(e) { t({}); } }); })), Pe = [ { type: "hook", name: "hook", match: location.host.includes("yuketang.cn"), main: e => { oe.mainClass = M("#app")[0].__vue__.$route.name, oe.mainClass; let t = new MutationObserver((async e => { oe.mainClass !== M("#app")[0].__vue__.$route.name && (oe.mainClass = M("#app")[0].__vue__.$route.name, vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u96e8\u8bfe\u5802\u8003\u8bd5", tips: "\u96e8\u8bfe\u5802\u6682\u65f6\u672a\u5f00\u53d1\u5b8c\uff0c\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad", match: () => location.host.includes("yuketang.cn") && location.href.includes("/exam/"), question: { html: ".exercise-item", question: ".content", options: ".el-checkbox__label,.el-radio__label", type: ".question-box .tag", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 !== M(".exercise-item").length; })); }, next: () => {}, ischecked: e => e.parent().hasClass("is-checked"), questionHook: e => { const t = e.html.__vue__.item; e.type = typeConvert(t.TypeText), e.question = titleClean(removeHtml(t.Body)).trim(); const n = {}; switch (t.Options && t.Options.forEach((e => { n[e.key] = removeHtml(e.value); })), e.options = t.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(e.value))), e.type) { case "0": case "1": break; case "2": case "3": e.options = []; } return e; }, setAnswer: e => "3" !== e.type || (e.ques.$options.get().forEach((t => { isFalse(e.answer) && M(t).find(".el-icon-close").length > 0 && t.click(), isTrue(e.answer) && M(t).find(".el-icon-check").length > 0 && t.click(); })), !1), finish: e => {} }, { type: "ask", name: "\u96e8\u8bfe\u5802\u4f5c\u4e1a", tips: "\u96e8\u8bfe\u5802\u4ec5\u517c\u5bb9\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005\u3002\u96e8\u8bfe\u5802\u4f5c\u4e1a\u8bf7\u52a1\u5fc5\u5f00\u542f\u81ea\u52a8\u5207\u6362\uff0c\u5426\u5219\u65e0\u6cd5\u81ea\u52a8\u7b54\u9898\u6216\u5bfc\u81f4\u7b54\u9898\u9519\u4e71", match: () => location.host.includes("yuketang.cn") && location.href.includes("cloud/student/exercise"), question: { html: ".subject-item.J_order", question: ".content", options: ".el-radio__label", type: ".question-box .tag", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 == M(".el-icon-loading").length && M(".container-problem").length > 0 && M(".container-problem")[0].__vue__ && M(".container-problem")[0].__vue__.exerciseList; })); const e = M(".container-problem")[0].__vue__.exerciseList; e ? (msg("\u6b63\u5728\u4e0b\u8f7d\u5b57\u4f53\u5305\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85"), oe.ttfTable = await ttfDownload(e.font), oe.ttf2Table = await ttfDownload1("https://cdn.jsdelivr.net/gh/chengbianruan/st\xe5aticfile/1.json"), oe.ttf2Table ? oe.problems = e.problems : msg("\u89e3\u5bc6\u5b57\u4f53\u5305\u4e0b\u8f7d\u5931\u8d25")) : msg("\u672a\u627e\u5230\u9898\u76ee"); }, toquestion: e => { M(`.aside-body ul>li:eq(${e}) .subject-item`).click(); }, next: () => { M('.el-button.el-button--text:contains("\u4e0b\u4e00\u9898")').click(); }, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { if (M(".el-button.el-button--info.is-disabled.is-plain").length > 0) return; const n = oe.problems[t], a = oe.ttfTable, s = oe.ttf2Table, o = n.content; n.user, e.question = titleClean(removeHtml(yktDecode(s, a, o.Body))).trim(), e.type = typeConvert(o.TypeText), e.$options = () => M(".item-body ul>li>label"); const i = {}; switch (o.Options && (o.Options.map((e => { i[e.key] = removeHtml(yktDecode(s, a, e.value)); })), e.options = o.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(yktDecode(s, a, e.value))))), e.type) { case "0": case "1": break; case "2": e.question = removeHtml(e.question.replace(/\[\u586b\u7a7a\d\]/g, "")); break; case "3": e.options = []; break; default: e.type; } return e; }, setAnswerHook: e => {}, setAnswer: e => "3" !== e.type || (M(".item-body ul>li").get().forEach((t => { isFalse(e.answer) && M(t).find('use[*|href="#icon--tiankongticuowu"]').length > 0 && M(t).find("label").click(), isTrue(e.answer) && M(t).find('use[*|href="#icon--tiankongtizhengque"]').length > 0 && M(t).find("label").click(); })), !1), finish: e => {} }, { type: "save", name: "\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("yuketang.cn") && location.href.includes("/result/"), question: { html: ".subject-item > .result_item", question: "h4.clearfix.exam-font", options: "ul.list-unstyled li", type: ".item-type", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return M(".subject-item").length > 0; })); }, answerHook: (e, t) => { const n = e.html.__vue__.item; e.type = typeConvert(n.TypeText); const a = {}; switch (n.Options && (n.Options.forEach((e => { a[e.key] = removeHtml(e.value); })), e.options = n.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(e.value)))), e.question = titleClean(removeHtml(n.Body)).trim(), e.type) { case "0": case "1": "string" == typeof n.Answer ? e.answer = n.Answer.split("").map((e => a[e])) : "object" == typeof n.Answer && (e.answer = n.Answer.map((e => a[e]))); break; case "2": n.Blanks, e.answer = n.Blanks.map((e => removeHtml(e.Answers[0]))); break; case "3": e.options = [], isTrue(n.Answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(n.Answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; } return e; } }, { type: "save", name: "\u96e8\u8bfe\u5802\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("yuketang.cn") && location.href.includes("cloud/student/exercise"), question: { html: ".subject-item.J_order", question: "h4.clearfix.exam-font", options: "ul.list-unstyled li", type: ".item-type", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 == M(".el-icon-loading").length && M(".container-problem").length > 0 && M(".container-problem")[0].__vue__ && M(".container-problem")[0].__vue__.exerciseList; })), await waitUntil((function() { return 0 != M(".el-button.el-button--info.is-disabled.is-plain").length; })); const e = M(".container-problem")[0].__vue__.exerciseList; e ? (msg("\u6b63\u5728\u4e0b\u8f7d\u5b57\u4f53\u5305\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85"), oe.ttfTable = await ttfDownload(e.font), oe.ttf2Table = await ttfDownload1("https://cdn.jsdelivr.net/gh/chengbianruan/st\xe5aticfile/1.json"), oe.ttf2Table ? (oe.problems = e.problems, M(".container-problem")[0].__vue__.exerciseList) : msg("\u89e3\u5bc6\u5b57\u4f53\u5305\u4e0b\u8f7d\u5931\u8d25")) : msg("\u672a\u627e\u5230\u9898\u76ee"); }, answerHook: (e, t) => { const n = oe.problems[t], a = oe.ttfTable, s = oe.ttf2Table, o = n.content, i = n.user; e.question = titleClean(removeHtml(yktDecode(s, a, o.Body))).trim(), e.type = typeConvert(o.TypeText); const r = {}; switch (o.Options && (o.Options.map((e => { r[e.key] = removeHtml(yktDecode(s, a, e.value)); })), e.options = o.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(yktDecode(s, a, e.value))))), e.type) { case "0": case "1": "string" == typeof i.answer ? e.answer = i.answer.split("").map((e => r[e])) : "object" == typeof i.answer && (e.answer = i.answer.map((e => r[e]))); break; case "2": e.question = removeHtml(e.question.replace(/\[\u586b\u7a7a\d\]/g, "")), e.answer = o.Blanks.map((e => removeHtml(e[0]))), e.answer = e.answer.filter((e => "undefined" !== e)), e.answer.length != o.blank_count && (e.answer, e.answer = [], i.answers, e.answer = Object.values(i.answers).map((e => removeHtml(e[0])))); break; case "3": e.options = [], isTrue(i.answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(i.answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; } return e; } } ], Ie = [ { type: "ask", name: "\u5b89\u5fbd\u7ee7\u7eed\u6559\u80b2\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u5355\u9009\u3001\u591a\u9009\u3001\u5224\u65ad\u9898\u578b\uff0c\u5176\u4ed6\u9898\u578b\u6682\u4e0d\u652f\u6301", match: () => "main.ahjxjy.cn" === location.host && (location.href.includes("study/html/content/studying/?courseOpenId=") || location.href.includes("study/html/content/sxsk/?courseOpenId=") || location.href.includes("study/html/content/tkOnline/?courseOpenId=")), question: { html: ".e-q-body>.e-q", question: ".ErichText", options: "ul>li>.ErichText", type: ".question-box .tag", workType: "ahjxjy", pageType: "ahjxjy" }, init: async () => { if (await waitUntil((function() { return isExist(".e-q-body>.e-q") && isExist(".e-item"); })), !isExist(".photo-time") && !isExist(".btn_save")) return !1; }, ischecked: e => e.parent().hasClass("checked"), questionHook: e => { var t; const n = M(e.html).parent().parent(); switch (e.type = n ? null == (t = n.attr("id")) ? void 0 : t.trim() : "", e.type) { case "2": e.type = "1"; break; case "1": e.type = "0"; break; case "3": e.type = "3", e.$options = M(e.html).find("ul>li"); break; case "5": e.type = "4"; break; default: e.type, e.type = "8"; } return e; }, setAnswer: e => "4" !== e.type || (M(e.html).find(".answer-input").val(e.answer[0]), !1), finish: e => {} }, { type: "save", name: "\u5b89\u5fbd\u7ee7\u7eed\u6559\u80b2\u6536\u5f55", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u5355\u9009\u3001\u591a\u9009\u3001\u5224\u65ad\u9898\u578b\uff0c\u5176\u4ed6\u9898\u578b\u6682\u4e0d\u652f\u6301", match: () => "main.ahjxjy.cn" === location.host && (location.href.includes("study/html/content/studying/?courseOpenId=") || location.href.includes("study/html/content/sxsk/?courseOpenId=") || location.href.includes("study/html/content/tkOnline/?courseOpenId=")), question: { html: ".e-q-body>.e-q", question: ".ErichText", options: "ul>li>.ErichText", type: ".question-box .tag", workType: "ahjxjy", pageType: "ahjxjy" }, init: async () => { if (await waitUntil((function() { return isExist(".e-save"), isExist(".e-q-body>.e-q") && isExist(".w_e-q-panel"); })), !isExist(".e-quest-review")) return !1; }, answerHook: e => { var t; const n = M(e.html).parent().parent(); e.type = n ? null == (t = n.attr("id")) ? void 0 : t.trim() : "", e.$options = M(e.html).find("ul>li"); let a = M(e.html).find("ul>li.checked").map(((e, t) => removeHtml(M(t).find(".ErichText").html()))).get(); const s = M(e.html).find(".e-q-right").length > 0; e.answer = a.filter((e => "" !== e)); let o = M(e.html).find(".e-ans-ref .e-ans-r").map(((e, t) => removeHtml(M(t).html()))).get(); 1 === o.length && o[0].length > 1 && (o = o[0].split("\u3001")); let i = o.map((t => { let n = t.charCodeAt() - 65; return e.options[n]; })).filter((e => "" !== e && void 0 !== e)); switch (e.type) { case "2": e.type = "1"; break; case "1": e.type = "0"; break; case "3": e.type = "3", e.answer = M(e.html).find("ul>li.checked").map(((e, t) => removeHtml(M(t).html()))).get(), e.options = [], isTrue(e.answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; break; case "5": e.type = "4", i = [ removeHtml(M(e.html).find(".e-ans-ref>.e-ans-r").html()) ], e.options = []; break; case "11": e.type = "19"; const t = M(e.html).find("form").map(((e, t) => ({ type: "0", question: removeHtml(M(t).find(".e-q-q .ErichText").html()), options: M(t).find("ul li .ErichText").map(((e, t) => removeHtml(M(t).html()))).get() }))).get(); i = i.length > 0 ? judgeAnswer(i[0]) : [], e.options = t; default: return void e.type; } if (i.length > 0) return e.answer = i, e; if (!s && "3" === e.type && e.answer.length > 0) e.answer = isTrue(e.answer[0]) ? [ "\u9519\u8bef" ] : isFalse(e.answer[0]) ? [ "\u6b63\u786e" ] : []; else if (!s) return; return e; }, paper: e => { const t = oe.online, n = { platform: "ahjxjy" }; n.hash = t.courseOpenId, n.name = oe.localStorage.courseNmae, n.info = {}, n.chapter = [ { hash: `${t.cell.id}`, name: t.cell.title, question: e } ], _e.setPaper(n.hash, n); } } ], Oe = [ { type: "save", name: "\u9752\u4e66\u4f5c\u4e1a\u7b54\u9898\u6536\u5f55", match: () => "degree.qingshuxuetang.com" === location.host && (location.href.includes("Student/ExercisePaper?courseId=") || location.href.includes("Student/ViewQuiz?quizId=")), question: { html: ".paper-container > .question-detail-container", question: ".question-detail-description", options: ".question-detail-options .question-detail-option .option-description-preview", type: ".question-detail-type-desc", workType: "qingshu", pageType: "qingshu" }, init: async () => { await waitUntil((function() { return isExist(".question-detail-container") && oe.qsques; })); }, answerHook: (e, t) => { const n = oe.qsques[t]; switch (e.question = removeHtml(n.description), e.options = n.options ? n.options.map((e => removeHtml(e.description))) : [], e.type = typeConvert(n.typeDesc), e.answer = n.solution.split("").map((t => e.options[t.charCodeAt(0) - 65])), e.type) { case "3": e.options = [], e.answer = isTrue(e.answer[0]) ? [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? [ "\u9519\u8bef" ] : [ "" ]; break; case "15": e.options = [], e.answer = [], n.subQuestions.forEach((t => { let n = t.options ? t.options.map((e => removeHtml(e.description))) : [], a = t.solution.split("").map((e => n[e.charCodeAt(0) - 65])); e.answer.push(a), e.options.push(n); })); } return e; } }, { type: "ask", name: "\u9752\u4e66\u5b66\u5802\u4f5c\u4e1a\u7b54\u9898", tips: "\u9752\u4e66\u5b66\u5802\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u7b49\u9898\u578b\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "degree.qingshuxuetang.com" === location.host && (location.href.includes("/Student/ExercisePaper") || location.href.includes("Student/ExamPaper") || location.href.includes("Student/ViewQuiz")), question: { html: ".paper-container > .question-detail-container", question: ".question-detail-description", options: ".question-detail-options .question-detail-option .option-description", type: ".question-detail-type-desc", workType: "qingshu", pageType: "qingshu" }, init: async () => { await waitUntil((function() { return isExist(".question-detail-container") && oe.qsques; })); }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), toquestion: e => { M(`.group_item:eq(${e})`), M(`.group_item:eq(${e})`).click(); }, questionHook: (e, t) => { const n = oe.qsques[t]; if (e.question = removeHtml(n.description), e.options = n.options ? n.options.map((e => removeHtml(e.description))) : [], e.type = typeConvert(n.typeDesc), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} } ], De = [ { type: "save", name: "\u4f18\u8bfe\u5728\u7ebf\u6536\u5f55", match: () => "cce.org.uooconline.com" === location.host && (location.href.includes("/exam/paper") || location.href.includes("/exam/")), question: { html: ".queContainer", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "uooc", pageType: "uooc" }, init: async () => { await waitUntil((function() { return 0 !== M(".queContainer").length; })); }, answerHook: e => { const t = oe.angular.element(e.html).scope().question; if (e.type = typeConvert(t.type_text), e.question = t.question, e.options = t.options_app.map((e => e.value)), e.answer = t.answer.map((e => t.options[e])), "3" === e.type) e.options = [], e.answer = judgeAnswer(e.answer[0]); return e; } } ], Me = [ { type: "ask", name: "\u4eac\u4eba\u5e73\u53f0\u7b54\u9898", tips: "\u4eac\u4eba\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("cj-edu.com") && (location.href.includes("/Examination") || location.href.includes("/ExamInfo")), question: { html: ".el-main>.all_subject>div.el-row", question: "div.stem", options: "ul li > label > span.el-radio__label > div:nth-child(2),ul li > label > span.el-checkbox__label > div:nth-child(2)", type: ".question-box .tag", workType: "cjedu", pageType: "cjedu" }, init: async () => { await waitUntil((function() { return 0 !== M(".el-main>.all_subject>div.el-row").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { switch (M(e.html).prevAll("h1").first().text().trim()) { case "\u5355\u9009\u9898": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.$options = M(e.html).find("ul li>label"), e.options = [], e.type = "3"; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u4eac\u4eba\u5e73\u53f0\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("cj-edu.com") && location.href.includes("/ViewAnswerSheet"), question: { html: ".el-main>.all_subject>div.el-row", question: "p.stem", options: "ul li > label > span.el-radio__label > div:nth-child(2),ul li > label > span.el-checkbox__label > div:nth-child(2)", type: ".question-box .tag", workType: "cjedu", pageType: "cjedu" }, init: async () => { await waitUntil((function() { return 0 !== M(".el-main>.all_subject>div.el-row").length; })); }, answerHook: e => { let t = M(e.html).find(".seeStudentAnswer>p.answer").text().replace("\u53c2\u8003\u7b54\u6848\uff1a", "").trim(), n = M(e.html).prevAll("h1").first().text().trim(); switch (e.options.length > 0 && (e.answer = t.split(",").map((t => e.options[t.charCodeAt(0) - 65]))), n) { case "\u5355\u9009\u9898": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.options = [], e.answer = judgeAnswer(t), e.type = "3"; } return e; } } ], ze = [ { type: "hook", name: "hook", match: location.host.includes("ytccr.com"), main: e => { const getHash = () => getUrl(); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7ece\u901a\u7ee7\u6559\u4e91\u7b54\u9898", tips: "\u7ece\u901a\u7ee7\u6559\u4e91\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad", match: () => location.host.includes("ytccr.com") && location.href.includes("learning-work") && location.href.includes("type=3"), question: { html: ".border-item", question: ".title.qa-title", options: ".opts-list .opt-title-cnt", type: ".question-box .tag", workType: "ytccr", pageType: "ytccr" }, init: async () => { await waitUntil((function() { return 0 !== M(".border-item").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { if (e.type = typeConvert(M(e.html).find(".qtype").text().trim()), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u7ece\u901a\u7ee7\u6559\u4e91\u6536\u5f55", match: () => location.host.includes("ytccr.com") && location.href.includes("learning-work") && location.href.includes("type=5"), question: { html: ".border-item", question: ".title.qa-title", options: ".opts-list .opt-title-cnt", type: ".question-box .tag", workType: "ytccr", pageType: "ytccr" }, init: async () => { await waitUntil((function() { return 0 !== M(".border-item").length; })); }, answerHook: e => { e.type = typeConvert(M(e.html).find(".qtype").text().trim()); let t = M(e.html).find(".u-text-success,.u-text-danger").text().split("\uff0c")[0].trim(); if (t = t.match(/[A-Z]+$/)[0].trim(), e.answer = t.split("").map((t => e.options[t.charCodeAt(0) - 65])), 0 === e.answer.length) return e; if ("3" === e.type) e.options = [], e.answer = judgeAnswer(e.answer[0]); return e; } } ], Be = [ { type: "ask", name: "\u5b66\u8d77\u8003\u8bd5", tips: "\u5b66\u8d77\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("chinaedu.net") && location.href.includes("oxer/page/ots/examIndex.html"), question: { html: ".queItemClass", question: "dt > div.din:eq(1)", options: "dd > div", type: ".question-box .tag", workType: "xueqi", pageType: "xueqi" }, init: async () => { await waitUntil((function() { return isExist(".queItemClass"); })), oe.document.onkeydown = null, oe.oncontextmenu = null; }, next: () => {}, ischecked: e => e.parent().hasClass("cur"), questionHook: e => { let t = M(e.html).parent().find("div .fb:eq(0)").text().split("\u3001")[1]; if (t.includes("\u5224\u65ad") && (t = "\u5224\u65ad\u9898"), e.type = typeMatch(t), "3" === e.type) e.options = [], e.$options = M(e.html).find("input"); return e; }, setAnswer: e => { if ("3" === e.type) { let t = e.answer; return e.ques.$options.each(((e, n) => { isTrue(t) && isTrue(removeHtml(M(n).val())) && M(n).click(), isFalse(t) && isFalse(removeHtml(M(n).val())) && M(n).click(); })), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u5b66\u671f\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("chinaedu.net") && location.href.includes("OTS-UniverDetail.html"), question: { html: ".dl_list", question: "dt > div.fl:eq(1)", options: "dd > var", type: ".question-box .tag", workType: "xueqi", pageType: "xueqi" }, init: async () => { await waitUntil((function() { return isExist(".dl_list"); })); }, answerHook: e => { var t, n, a, s, o; const i = M(e.html).attr("queid"), r = e.html._ms_context_.el.questions.find((e => e.id === i)); r.questionTypeName.includes("\u5224\u65ad") && (r.questionTypeName = "\u5224\u65ad\u9898"), e.type = typeMatch(r.questionTypeName), e.question = removeHtml(r.stem), console.log(r), e.options = (null == (n = null == (t = r.answerArea) ? void 0 : t.optionList) ? void 0 : n.sort(((e, t) => e.sequence - t.sequence)).map((e => removeHtml(e.content)))) || []; let l = r.answer.ans || (null == (a = r.answer.ansL) ? void 0 : a.join("")) || null; if (l) e.answer = l.split("").map((t => e.options[t.charCodeAt(0) - 65])); else { const t = (null == (o = null == (s = r.answerArea) ? void 0 : s.optionList) ? void 0 : o.filter((e => e.isTrue)).map((e => removeHtml(e.content)))) || []; if (0 === r.answerScore) return; e.answer = t; } return "3" === e.type && (e.options = [], e.answer = judgeAnswer(l)), e; }, paper: e => { const t = M(".dl_list:eq(0)")[0]._ms_context_.loop.category, n = M(".dl_list:eq(0)")[0]._ms_context_.oAnswerDetailInfo, a = { platform: "xueqi" }; a.hash = t.code, a.name = t.value, a.info = {}, a.chapter = [ { hash: `${n.arrangementid}`, name: n.arrangementname, question: e } ], _e.setPaper(a.hash, a); } } ], Ge = [ { type: "hook", name: "hook", match: "gdrtvu.exam-cloud.cn" === location.host, main: e => { unsafeWindow.mainClass = getUrl(); let t = new MutationObserver((async e => { unsafeWindow.mainClass !== getUrl() && (unsafeWindow.mainClass = getUrl(), vuePageChange(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7b54\u9898", tips: "\u516c\u544a", match: () => location.host.includes("exam-cloud.cn") && location.href.includes("oe-web/online-exam/exam"), question: { html: ".question-container", question: ".question-body:first", options: ".option .question-options", type: ".question-header .container", workType: "guangkai", pageType: "guangkai" }, init: async () => { await waitUntil((function() { return isExist(".question-container"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { let t = M(".list .current-question").parent().parent().find(".title").text(); if (console.log(t), t = t.split("\u3001")[1], t = t.replace(/\(.*\)/, "").trim(), console.log(t), e.type = typeConvert(t), "8" == e.type ? e.type = typeMatch(t) : e.type, "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => { M(".next .qm-primary-button").length && M(".next .qm-primary-button")[0].click(); } } ], Ve = [ { type: "hook", name: "hook", match: location.host.includes("open.ha.cn"), main: e => { const getHash = () => M(".stuHomeworkVersionId.active").attr("id"); oe.mainClass = getHash(); let t = new MutationObserver((async e => { getHash(), oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M(".homeworkBody").length >= 1 && t.observe(M(".homeworkBody")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u4e91\u4e0a\u6cb3\u5f00\u7b54\u9898", tips: "\u4e91\u4e0a\u6cb3\u5f00\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("open.ha.cn") && location.href.includes("/homework/showHomeworkByStatus") && location.href.includes("checked=false"), question: { html: ".layui-colla-content > .insert", question: ".window-title", options: ".option-title", type: ".question-box .tag", workType: "openha", pageType: "openha" }, init: async () => { await waitUntil((function() { return isExist(".layui-colla-content > .insert"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => (e.options = e.$options.map(((t, n) => { let a = M(n).find(".numberCover").text().trim(); return removeHtml(e.$options.eq(t).html()).replace(a, "").trim(); })).get(), e.type = typeConvert(M(e.html).find(".questionDiv>.float-l:eq(1)").text().trim()), e.$options = M(e.html).find(".option-title .numberCover"), e), setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u4e91\u4e0a\u6cb3\u5f00\u6536\u5f55", match: () => location.host.includes("open.ha.cn") && location.href.includes("/homework/showHomeworkByStatus") && location.href.includes("checked=true"), question: { html: ".layui-colla-content > .insert", question: ".window-title", options: ".option-title", type: ".question-box .tag", workType: "openha", pageType: "openha" }, init: async () => { await waitUntil((function() { return isExist(".layui-colla-content > .insert"); })); }, answerHook: e => { let t = []; const n = 0 == M(e.html).find(".option-title.error2").length; if (e.options = e.$options.map(((n, a) => { let s = M(a).find(".numberCover").text().trim(), o = removeHtml(e.$options.eq(n).html()).replace(s, "").trim(); return M(a).hasClass("answer-title") && t.push(o), o; })).get(), e.type = typeConvert(M(e.html).find(".questionDiv>.float-l:eq(1)").text().trim()), n) return e.answer = t, M(e.html).find(".option-title.error2"), e; }, paper: e => { const t = oe.homework, n = { platform: "openha" }; n.hash = t.courseId, n.name = t.courseName, n.info = {}, n.chapter = [ { hash: `${t.homeworkId}`, name: t.title, question: e } ], _e.setPaper(n.hash, n); } } ], Ne = [ { type: "hook", name: "hook", match: "lhycjy.cloudwis.tech" === location.host || "hnlg.crjxjy.net" === location.host, main: e => { const getHash = () => (M(".item.changeless-box.active").attr("data-id"), M(".item.changeless-box.active").attr("data-id")); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 === M(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); M(".exam-content").length >= 1 && t.observe(M(".exam-content")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => location.href.includes("uc/task/startTask"), question: { html: ".carousel-inner>.item.changeless-box.active", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".carousel-inner>.item.changeless-box"); })), !isExist("#finish")) return !1; }, next: () => { M(".next-slide").click(); }, ischecked: e => e.find(".checked").length > 0, questionHook: e => (e.type = typeConvert(M(e.html).attr("data-name") || ""), e.$options = M(e.html).find(".ic-options__wrap label"), e.question = e.question.replace(/^\(\d+\)/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e), setAnswer: e => !0, finish: e => {} }, { type: "ask", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u8003\u8bd5\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => location.href.includes("uc/exam/record/startExamination"), question: { html: ".trunk-box", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".trunk-box") && isExist(".ic-ac-checkbox-ol"); })), await waitUntil((function() { return window.scrollTo(0, document.body.scrollHeight), M(".ic-ac-checkbox-ol li").length == M(".trunk-box").length; })), !isExist("#submit-btn")) return !1; }, next: () => { M(".next-slide").click(); }, ischecked: e => e.find(".checked").length > 0, questionHook: e => { const t = M(e.html).attr("data-type"); switch (console.log(t), t) { case "1": e.type = "0"; break; case "2": e.type = "1"; break; case "3": e.type = "3", e.options = []; } return e.question = e.question.replace(/^\d+\u3001/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e.question = e.question.replace(/\[\S+\]$/, "").trim(), e.$options = M(e.html).find(".ic-options__wrap label"), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u6536\u5f55", match: () => "lhycjy.cloudwis.tech" === location.host && location.href.includes("uc/task/startTask"), question: { html: ".carousel-inner>.item.changeless-box", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".carousel-inner>.item.changeless-box") && isExist(".slide-tihao"); })), await waitUntil((function() { return M(".slide-tihao").length, M(".carousel-inner>.item.changeless-box").length, M(".slide-tihao").eq(-1), M(".slide-tihao").eq(-1)[0].click(), M(".slide-tihao").length == M(".carousel-inner>.item.changeless-box").length; })), isExist("#finish")) return !1; }, next: () => {}, answerHook: e => { const t = M(e.html).find(".analysis-box .fs20.c-primary.vam").text().trim().split(""); return e.type = typeConvert(M(e.html).attr("data-name") || ""), e.answer = t.map((t => e.options[t.charCodeAt(0) - 65])), e.question = e.question.replace(/^\(\d+\)/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e; } }, { type: "save", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u8003\u8bd5\u6536\u5f55", match: () => location.href.includes("uc/exam/record/startExamination"), question: { html: ".trunk-box.answer-question", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".trunk-box") && isExist(".ic-ac-correct"); })), await waitUntil((function() { return window.scrollTo(0, document.body.scrollHeight), M(".ic-ac-correct,.ic-ac-error").length == M(".trunk-box").length; })), isExist("#submit-btn")) return !1; }, next: () => { M(".next-slide").click(); }, answerHook: e => { const t = M(e.html).attr("data-type"); console.log(t); const n = M(e.html).find(".ic-options__wrap label").filter(((e, t) => M(t).find(".checked").length > 0)).map(((e, t) => removeHtml(M(t).html()))).get(); switch (e.answer = n.map((t => e.options[t.charCodeAt(0) - 65])), e.question = e.question.replace(/^\d+\u3001/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e.question = e.question.replace(/\[\S+\]$/, "").trim(), t) { case "1": e.type = "0"; break; case "2": e.type = "1"; break; case "3": e.type = "3", e.options = [], e.answer = judgeAnswer(e.answer[0]); } return e; } } ], Re = [ { type: "hook", name: "hook", match: location.host.includes("sclecb.cn"), main: e => { const getHash = () => getUrl(); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u56db\u5ddd\u5f00\u653e\u5927\u5b66\u7b54\u9898", tips: "\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "study.sclecb.cn" === location.host && /testpaper\/[0-9]+\/show/i.test(location.href), question: { html: ".testpaper-question.js-testpaper-question", question: ".testpaper-question-stem", options: ".testpaper-question-choices li", type: ".question-box .tag", workType: "sclecb", pageType: "sclecb" }, init: async () => { await waitUntil((function() { return isExist(".testpaper-question.js-testpaper-question"); })); }, next: () => {}, ischecked: e => e.hasClass("checked"), questionHook: e => { switch (e.options = removeStartChar(e.options), e.$options = M(e.html).find(".testpaper-question-choice-inputs > label > input"), e.type = typeConvert(M(e.html).parent().parent().find(".panel-heading>strong").text().trim()), e.type, e.type) { case "0": case "1": break; case "3": e.$options = M(e.html).find(".radio-inline"); } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "ask", name: "\u56db\u5ddd\u5f00\u653e\u5927\u5b66\u7b54\u9898\u65e7", tips: "\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("sclecb.cn") && /student\/course\/study\/[0-9a-zA-Z]+\/test\/redo/i.test(location.href), question: { html: ".questiono-item", question: ".clearfix.questiono-header h6", options: ".common_test_option .processing_img", type: ".question-box .tag", workType: "sclecb", pageType: "sclecb" }, init: async () => { await waitUntil((function() { return isExist(".questiono-item"); })); }, next: () => {}, ischecked: e => e.hasClass("checked"), questionHook: e => { const t = M(e.html).parent().parent().find("div:eq(0)").text().trim(); switch (!0) { case t.includes("\u5355\u9009\u9898"): e.type = "0"; break; case t.includes("\u591a\u9009\u9898"): e.type = "1"; break; case t.includes("\u5224\u65ad\u9898"): e.type = "3", e.options = [], e.$options = M(e.html).find(".common_test_option > label"); break; default: return; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u56db\u5ddd\u5f00\u653e\u5927\u5b66\u6536\u5f55", match: () => "study.sclecb.cn" === location.host && (/task\/[0-9]+\/activity_show/i.test(location.href) || /result\/[0-9]+\/show/i.test(location.href)), question: { html: ".testpaper-question.js-testpaper-question", question: ".testpaper-question-stem", options: ".testpaper-question-choices li", type: ".question-box .tag", workType: "sclecb", pageType: "sclecb" }, init: async () => { await waitUntil((function() { return isExist(".testpaper-question.js-testpaper-question"); })); }, answerHook: (e, t) => { let n = []; e.options = e.$options.map(((e, t) => { const a = removeHtml(M(t).clone().find(".testpaper-question-choice-index").remove().end().html()); return M(t).hasClass("testpaper-question-choice-right") && n.push(a), a; })).get(), e.answer = n, e.type = typeConvert(M(".js-panel-card>span").eq(t).prevAll("p").first().text().trim()); const a = M(".js-panel-card>span").eq(t).hasClass("bg-success"); switch (e.type) { case "0": case "1": break; case "3": let t = ""; t = M(e.html).find(".testpaper-question-result").text().replace("\u4f60\u7684\u7b54\u6848\u662f", "").trim(), e.answer = judgeAnswer(t); } if (!a && e.answer.length > 0 && "3" == e.type) e.answer = "\u6b63\u786e" == e.answer[0] ? [ "\u9519\u8bef" ] : "\u9519\u8bef" == e.answer[0] ? [ "\u6b63\u786e" ] : []; else if (!a) return; return e; } } ], We = [ { type: "hook", name: "hook", match: location.host.includes("superchutou.com"), main: e => { const getHash = () => getUrl(); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M("#root").length >= 1 && t.observe(M("#root")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u51fa\u5934\u7cfb\u7edf\u7b54\u9898", tips: "\u672c\u8003\u8bd5\u4ec5\u9002\u914d\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("superchutou.com") && location.href.includes("onlineclass/exam/"), question: { html: "[class^='single_excer_item']", question: "[class^='title_content'] > [class^='title_content_text']:eq(1)", options: "[class^='options_content'] label", type: ".question-box .tag", workType: "chutou", pageType: "chutou" }, init: async () => { await waitUntil((function() { return isExist("[class^='single_excer_item']"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { let t = M(e.html).find("[class^='title_content'] > span:eq(1)").text(); if (t = t.replace(/\u3010|\u3011/g, "").trim(), e.type = typeConvert(t), e.options = removeStartChar(e.options), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} } ], Qe = [ { type: "ask", name: "\u826f\u5e08\u5728\u7ebf\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u9002\u914d\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("ls365.net") && (location.href.includes("student/examing.aspx") || location.href.includes("Student/myhomework.aspx")), question: { html: ".exam_question", question: ".exam_question_title", options: ".question_select .select_detail", type: ".exam_question_title strong", workType: "ls365", pageType: "ls365" }, init: async () => { await waitUntil((function() { return isExist(".exam_question"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { let t = M(e.html).find(".exam_question_title").clone(); t.find(".question_number").remove(), t.find("strong").remove(), t.find(".exam_feed_back").remove(), e.question = removeHtml(t.html()); let n = M(e.html).find(".exam_question_title strong").text(); return n = n.replace(/\[|\]/g, "").trim(), e.type = typeConvert(n), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u826f\u5e08\u5728\u7ebf\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("ls365.net") && location.href.includes("User/Student/ViewPaper.aspx"), question: { html: "[name^='anchor_']", question: ".title-img-ctr", options: ".pold .phtml", type: ".QuestionsType", workType: "ls365", pageType: "ls365" }, init: async () => { await waitUntil((function() { return isExist("[name^='anchor_']"); })); }, answerHook: e => { let t = M(e.html).find(".QuestionsType").text(); t = t.replace(/\[|\]/g, "").trim(), e.type = typeConvert(t); let n = M(e.html).find(".my-work-answer>p").filter(((e, t) => t.innerText.includes("\u53c2\u8003\u7b54\u6848"))).map(((e, t) => M(t).find(".two").text())).get(); if (0 !== n.length) return e.answer = n[0].split("").map((t => e.options[t.charCodeAt(0) - 65])), e; } }, { type: "save", name: "\u826f\u5e08\u5728\u7ebf\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("ls365.net") && location.href.includes("Student/myhomework_after.aspx"), question: { html: "[name^='anchor_']", question: ".my-work-nav>.col-md-10", options: ".pold .phtml", type: ".QuestionsType", workType: "ls365", pageType: "ls365" }, init: async () => { await waitUntil((function() { return isExist("[name^='anchor_']"); })); }, answerHook: e => { let t = M(e.html).find(".my-work-nav>div:eq(0)>span:eq(0)").text(); t = t.replace(/\[|\]/g, "").trim(), e.type = typeConvert(t); let n = M(e.html).find(".my-work-answer>p").filter(((e, t) => t.innerText.includes("\u53c2\u8003\u7b54\u6848"))).map(((e, t) => M(t).find(".two").text())).get(); if (0 !== n.length) return e.answer = n[0].split("").map((t => e.options[t.charCodeAt(0) - 65])), e; } } ], Je = [ { type: "hook", name: "hook", match: location.host.includes("jijiaox.com"), main: e => { oe.mainClass = M("#app")[0].__vue__.$route.path; let t = new MutationObserver((async e => { oe.mainClass !== M("#app")[0].__vue__.$route.path && (oe.mainClass = M("#app")[0].__vue__.$route.path, vuePageChange(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7ee7\u6559\u4e91\u8003\u8bd5\u7b54\u9898", tips: "\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u7b80\u7b54\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("jijiaox.com") && (location.href.includes("/mg/studentindexexam/") || !location.href.includes("examrec")), question: { html: ".question>div", question: ".topic-title", options: ".ml_2 label", type: ".question-box .tag", workType: "jijiaox", pageType: "jijiaox" }, init: async () => { await waitUntil((function() { return isExist(".question>div"); })); }, next: () => {}, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { const n = M(".page")[0].__vue__.$data.testInfo.studentPraxisList[t]; switch (e.options = n.options ? n.options : [], "string" == typeof e.options && (e.options = []), e.question = removeHtml(n.title), n.type) { case "single": e.type = "0"; break; case "muti": e.type = "1"; break; case "charge": e.type = "3"; break; case "text": e.type = "4"; break; default: console.log(n.type, "\u672a\u77e5\u7c7b\u578b"); } return e; }, setAnswer: e => "4" !== e.type || (M(e.html).find(".editor")[0].__vue__.editor.txt.html(e.answer[0]), !1), finish: e => {} }, { type: "save", name: "\u7ee7\u6559\u4e91\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("jijiaox.com") && location.href.includes("/mg/studentindexexam/examrec/"), question: { html: ".question>div", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "jijiaox", pageType: "jijiaox" }, init: async () => { await waitUntil((function() { return isExist(".question>div"); })); }, answerHook: (e, t) => { const n = M(".page")[0].__vue__.$data.testInfo.studentPraxisList[t], a = n.answer; switch (e.options = n.options ? n.options : [], "string" == typeof e.options && (e.options = []), e.question = removeHtml(n.title), n.type) { case "single": e.type = "0"; break; case "muti": e.type = "1"; break; case "charge": e.type = "3", e.answer = "1" == a ? [ "\u6b63\u786e" ] : "-1" == a ? [ "\u9519\u8bef" ] : []; break; case "text": e.type = "4", e.answer = [ removeHtml(a) ]; break; default: console.log(n.type, "\u672a\u77e5\u7c7b\u578b"); } switch (e.type) { case "0": case "1": console.log("________", a), e.answer = "string" == typeof a ? a.split("").map((t => e.options[t.charCodeAt(0) - 65])) : a.map((t => (console.log(t), e.options[t.charCodeAt(0) - 65]))); } return console.log(e), e; } } ], Xe = [ { type: "hook", name: "hook", match: location.host.includes("wencaischool.net") && M("#app").length, main: e => { oe.mainClass = M("#app")[0].__vue__.$route.path; let t = new MutationObserver((async e => { oe.mainClass !== M("#app")[0].__vue__.$route.path && (oe.mainClass = M("#app")[0].__vue__.$route.path, vuePageChange(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); const n = document.createElement("style"); n.type = "text/css", n.innerHTML = "* {\n font-size: 13px !important;\n }", document.head.appendChild(n); } }, { type: "ask", name: "\u67e0\u6aac\u6587\u624d\u8003\u8bd5\u7b54\u9898", tips: "\u6b64\u5e73\u53f0\u7b54\u9898\u95f4\u9694\u5c3d\u91cf3s\u5de6\u53f3\uff0c\u5426\u5219\u53ef\u80fd\u9009\u4e0d\u4e0a\u7b54\u6848\uff0c\u4e0d\u652f\u6301\u7684\u9898\u578b\u8bf7\u8054\u7cfb\u4f5c\u8005\u9002\u914d", match: () => location.host.includes("wencaischool.net") && location.href.includes("/separation/exam/index.html"), question: { html: ".tmList", question: ".tmTitleTxt", options: ".perRad .opCont", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => { await waitUntil((function() { return isExist(".tmList") && M("#onlineExamArea")[0].__vue__._data.itemsList.length > 0; })); }, next: () => {}, ischecked: e => e[0].checked, questionHook: e => { let t = M(e.html).find(".tmc.tm").attr("ttype"); return e.type = typeConvert({ 1: "\u586b\u7a7a\u9898", 2: "\u7b80\u7b54\u9898", 3: "\u5355\u9009\u9898", 4: "\u591a\u9009\u9898", 5: "\u9605\u8bfb\u7406\u89e3", 12: "\u5b8c\u5f62\u586b\u7a7a" }[t]), e.$options = M(e.html).find(".perRad input"), e; }, setAnswer: e => { switch (e.type) { case "4": return M(e.html).find("textarea").focus(), document.execCommand("selectAll"), document.execCommand("insertText", !1, e.answer[0]), !1; case "2": M(e.html).find(".ansbox.inputAnswer input").each((async (t, n) => { n.focus(), document.execCommand("selectAll"); let a = e.answer[t]; document.execCommand("insertText", !1, a), await sleep(1e3); })); } return !0; }, finish: e => {} }, { type: "save", name: "\u67e0\u6aac\u6587\u624d\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("wencaischool.net") && location.href.includes("/separation/exam/index.html"), question: { html: ".tmList", question: ".tmTitleTxt", options: ".perRad .opCont", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => { await waitUntil((function() { return isExist(".tmList") && M("#onlineExamArea")[0].__vue__._data.itemsList.length > 0; })); }, answerHook: (e, t) => { const n = M("#onlineExamArea")[0].__vue__._data.itemsList[t]; e.question = removeHtml(n.itemName), e.options = n.optionNodes.map((e => removeHtml(e.optionContent))); e.type = typeConvert({ 1: "\u586b\u7a7a\u9898", 2: "\u7b80\u7b54\u9898", 3: "\u5355\u9009\u9898", 4: "\u591a\u9009\u9898", 5: "\u9605\u8bfb\u7406\u89e3", 12: "\u5b8c\u5f62\u586b\u7a7a" }[n.itemType]); let a = n.itemAnswer[0].optionContent; switch (e.type) { case "0": case "1": e.answer = a.split("").map((t => e.options[t.charCodeAt(0) - 65])); break; case "4": e.answer = removeHtml(a); break; case "2": e.answer = n.itemAnswer.map((e => removeHtml(e.optionContent))); } return e; } }, { type: "ask", name: "\u67e0\u6aac\u6587\u624d\u4f5c\u4e1a\u7b54\u9898", tips: "\u67e0\u6aac\u6587\u624d\u4f5c\u4e1a\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u586b\u7a7a\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u8054\u7cfb\u4f5c\u8005\u9002\u914d", match: () => location.host.includes("wencaischool.net") && location.href.includes("/exam/portal/exam.jsp"), question: { html: "table[id^='tblItem_'][islabel='0']", question: "table>tbody>tr:eq(0)>td:eq(0)", options: "table>tbody>tr:eq(1)>td:eq(0) table>tbody>tr>td>label", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => { await waitUntil((function() { return isExist("table[id^='tblItem_'][islabel=0]"); })), M(".aah_wrapper>div").css("z-index", 9999); }, next: () => {}, ischecked: e => e[0].checked, questionHook: e => { let t = removeHtml(M(e.html).parent().parent().prevAll("tr").filter((function() { return M(this).find("table[islabel='1']").length > 0; })).first().html()); if (e.type = typeMatch(t), "8" == e.type && t.includes("\u9009\u62e9\u9898") && (e.type = "0"), "3" === e.type) e.options = []; return e; }, setAnswer: e => { if ("2" === e.type) { const t = M(e.html).find("table>tbody>tr:eq(0)>td:eq(0)>input"); t.length == e.answer.length && t.each((async (t, n) => { n.value = "", n.focus(), document.execCommand("selectAll"); let a = e.answer[t]; document.execCommand("insertText", !1, a), await sleep(1e3); })); } return !0; }, finish: e => {} }, { type: "save", name: "\u67e0\u6aac\u6587\u624d\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("wencaischool.net") && location.href.includes("/openlearning/exam/portal/view_answer.jsp"), question: { html: "tr[id^='trScore_']", question: "table>tbody>tr:eq(0)>td:eq(0)", options: "table>tbody>tr:eq(1)>td:eq(0) table>tbody>tr>td>label", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => {}, answerHook: (e, t) => { const n = removeHtml(M(e.html).prevAll("tr:not([id])").first().html()); switch (e.type = typeMatch(n), "8" == e.type && n.includes("\u9009\u62e9\u9898") && (e.type = "0"), e.type) { case "0": case "1": case "3": const t = M(e.html).find("table>tbody>tr:eq(1)>td:eq(0)>div[style='color:darkred;font-size:10pt']").text().split("\u7b54\u6848\uff1a")[1].split("]")[0]; e.answer = t.split("").map((t => e.options[t.charCodeAt(0) - 65])), "3" == e.type && (e.options = [], e.answer = judgeAnswer(e.answer[0])); break; case "2": const n = M(e.html).find("table>tbody>tr:eq(0)>td:eq(0)").clone(); n.find("input").remove(), e.answer = n.find("nobr").map(((e, t) => { const n = removeHtml(M(t).html()); return /\[\u53c2\u8003\u7b54\u6848\uff1a(.+?)\]/.exec(n)[1]; })).get(), n.find("nobr").remove(), n.find("font").remove(), e.question = removeHtml(n.html()); } return e; } } ], Ye = [ { type: "hook", name: "hook", match: "www.xxxx.com" === location.host, main: e => { const getHash = () => M(".el-main > div:eq(0)").attr("class"); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 === M(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); for (let n of e) "attributes" === n.type && "class" === n.attributeName && n.target.textContent && (n.target.textContent.includes("\u4e0b\u4e00\u9898") || n.target.textContent.includes("\u4e0a\u4e00\u9898")) && (t.disconnect(), vuePageChange$1()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("yxlearning.com") && location.href.includes("exam/start?myExamRecordId"), question: { html: ".subject>.mb20.sub", question: ".ls1.lh30.text-f666", options: "ul.options>li.cursor-p", type: ".question-box .tag", workType: "yxlearning", pageType: "yxlearning" }, init: async () => { if (await waitUntil((function() { return isExist(".mb20.sub"); })), !oe.yxques) return !1; }, answerHook: (e, t) => { const n = []; oe.yxques.questionStemRPS.forEach(((e, t) => { e.listPaperQuestionRP.forEach(((e, t) => { n.push(e); })); })); const a = n[t]; e.question = titleClean(removeHtml(a.questionName)); const s = a.type, o = []; switch (e.options = removeStartChar(a.paperOptionRPS.map((e => removeHtml(e.context)))), a.paperOptionRPS.forEach(((t, n) => { 1 == t.standardAnswer && o.push(e.options[n]); })), e.answer = o, s) { case 1: e.type = "3", e.options = [], e.answer = judgeAnswer(e.answer[0]); break; case 2: e.type = "0"; break; case 3: e.type = "1"; } return e; } }, { type: "ask", name: "\u65e5\u7167\u4e13\u4e1a\u6280\u672f\u4eba\u5458\u7b54\u9898", tips: "\u672c\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => location.host.includes("yxlearning.com") && location.href.includes("exam/start?myExamRecordId"), question: { html: ".mb20.sub", question: ".ls1.lh30.text-f666", options: ".cursor-p", type: ".question-box .tag", workType: "yxlearning", pageType: "yxlearning" }, init: async () => { await waitUntil((function() { return isExist(".mb20.sub"); })); }, next: () => {}, ischecked: e => e.hasClass("active"), questionHook: e => { if (e.options = removeStartChar(M(e.html).find("ul>li").map(((e, t) => removeHtml(M(t).html()))).get()), e.$options = M(e.html).find("ul>li"), e.type = typeConvert(M(e.html).parent().prevAll(".title").first().find("[du-html='questionStemName']").text().trim()), "3" === e.type) e.options = [], e.$options = M(e.html).find("ul>li"); return e; }, setAnswer: e => !0, finish: e => {} } ], Ze = [ { type: "ask", name: "\u9ea6\u80fd\u7f51\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u517c\u5bb9\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u53ef\u80fd\u5b58\u5728bug\uff0c\u8bf7\u81ea\u884c\u68c0\u67e5", match: () => location.href.includes("lms/web/onlineexam/exambegin"), question: { html: ".ptypediv>.sdiv", question: ".namediv", options: ".itemdiv > .optiondiv", type: ".question-box .tag", workType: "cjnep", pageType: "cjnep" }, init: async () => { await waitUntil((function() { return isExist(".sdiv"); })); }, next: () => { M('.btndiv > span:contains("\u4e0b\u4e00\u9898")').click(); }, toquestion: e => { M(`.controldiv > a:eq(${e})`), M(".controldiv > a:eq(61)").click(), M(`.controldiv > a:eq(${e})`)[0].click(); }, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { e.question = e.question.replace(/^\u7b2c\d+\s\u9898[\uff1a:]?/, "").trim(), e.options = removeStartChar(e.options); let t = M(e.html).parent().find(".pnamediv").text(); if (e.type = typeMatch(t), e.$options = M(e.html).find(".ansdiv input"), "3" === e.type) e.options = []; return e; }, setAnswer: e => { switch (e.type) { case "3": let t = e.answer; return M(e.html).find(".ansdiv input").each(((e, n) => { isTrue(t) && "1" == M(n).val() && M(n).click(), isFalse(t) && "0" == M(n).val() && M(n).click(); })), !1; case "2": case "4": return M(e.html).find(".ansdiv textarea").val(e.answer.join(";")), M(e.html).find(".ansdiv textarea").trigger("input"), M(e.html).find(".ansdiv textarea").trigger("keydown"), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u9ea6\u80fd\u7f51\u7b54\u9898\u6536\u5f55", match: () => location.href.includes("lms/web/exam/examshow"), question: { html: ".ptypediv>.sdiv", question: ".namediv", options: ".itemdiv > .optiondiv", type: ".question-box .tag", workType: "cjnep", pageType: "cjnep" }, init: async () => { await waitUntil((function() { return isExist(".sdiv"); })); }, answerHook: e => { e.question = e.question.replace(/^\u7b2c\d+\s\u9898[\uff1a:]?/, "").trim(), e.options = removeStartChar(e.options); let t = M(e.html).find(".ansdiv input[name^='aquestion']:checked").closest(".item-span").text(); t = t.replace(/\s|\./g, "").trim(), e.answer = t.split("").map((t => e.options[t.charCodeAt() - 65])); let n = M(e.html).parent().find(".pnamediv").text(); e.type = typeMatch(n); let a = ""; try { a = M(e.html).find(".ansdiv").contents().filter((function() { return 3 === this.nodeType && this.nodeValue.trim().startsWith("\u7b54\u6848\uff1a"); })).get(0).nodeValue.trim().substring(3).trim(), a = removeHtml(a); } catch (s) {} switch (e.type) { case "2": e.answer = a.split(";"); break; case "3": a = M(M(e.html).find(".ansdiv").html().split("\u6b63\u786e\u7b54\u6848\uff1a")[1]).find("input[name^='aquestion']:checked").closest("span").text(), e.answer = judgeAnswer(a); break; case "4": a.length > 0 && (e.answer = [ a ]), e.options = []; } return e; } } ], Ke = [ { type: "hook", name: "hook", match: location.host.includes("91huayi.com"), main: e => { const getHash = () => M(".dd_01").attr("questionid"); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 === M(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); M(".box").length >= 1 && t.observe(M(".box")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u534e\u533b\u7f51\u7b54\u9898", tips: "\u76ee\u524d\u4ec5\u652f\u6301\u9009\u9879\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("91huayi.com") && location.href.includes("/ExamInterface/ComputerExamIndex"), question: { html: "#exampage", question: ".dd_01", options: ".dd_02", type: ".big_type", workType: "huayi", pageType: "huayi" }, init: async () => {}, next: () => { var e; null == (e = M("#btnNext")) || e.click(); }, ischecked: e => e.prop("checked"), questionHook: e => { const t = M(e.html).find(".dd_01").clone(); return t.find(".dd_01_red").remove(), e.question = removeHtml(t.html()), e.options = removeStartChar(e.options), e.type = typeMatch(M(e.html).find(".big_type").text()), e.$options = M(e.html).find("dd.q-content input"), e; }, setAnswer: e => { switch (console.log(e), e.type) { case "0": case "1": return e.ques.$options.each(((t, n) => { if (e.answer.includes(t)) { if (e.rule.ischecked && e.rule.ischecked(M(n))) return; n.click(); } else e.rule.ischecked && e.rule.ischecked(M(n)) && n.click(); })), !1; } return !0; }, finish: e => {} } ], et = [ { type: "ask", name: "\u4e91\u5357\u5f00\u653e\u5927\u5b66\u7b54\u9898", tips: "\u4e91\u5f00\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.href.includes("hw/student/studentStartHomework.action") && location.host.includes("teach.ynou.edu.cn"), question: { html: ".e_juan02biaoti", question: ".qcontent > p:first", options: ".signDefault>.label", type: ".question-box .tag", workType: "ynou", pageType: "ynou" }, init: async () => { await waitUntil((function() { return 0 !== M(".e_juan02biaoti").length; })), M("body").css("text-align", "left"); }, next: () => {}, ischecked: e => (e.find("input").is(":checked"), e.find("input").is(":checked")), questionHook: e => { e.options = []; const t = M(e.html).find(".e_juan02daan").clone(); t.find(".clear").nextAll().remove(); const n = removeHtml(t.html()), a = n.split(/[A][\u3001\.\uff0e]/)[0].trim(); null !== a && (e.question = a), e.question = a, e.question = a; const s = n.match(/(?:[A-G](?:[\u3001.]|\s)?\s?.*?)(?=\s*[A-G](?:[\u3001.]|\s)?|\s*$)/gs); if (null !== s) { const t = removeOptionsStartChar(s.map((e => e.trim()))); !1 !== t && (e.options = t); } const o = M(e.html).find(".signDefault").attr("answer_control"); return "radio" === o && e.options.length > 1 && (e.type = "0"), "checkbox" === o && e.options.length > 1 && (e.type = "1"), "radio" === o && 0 === e.options.length && (e.type = "3"), e; }, setAnswer: e => { if (console.log(e), "3" === e.type) { let t = e.answer; return e.ques.$options.each(((e, n) => { isTrue(t) && isTrue(removeHtml(M(n).html())) && M(n).click(), isFalse(t) && isFalse(removeHtml(M(n).html())) && M(n).click(); })), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.href.includes("/hw/student/studentViewHomework.action") && location.host.includes("teach.ynou.edu.cn"), question: { html: ".e_juan02biaoti", question: ".qcontent > p:first", options: ".signDefault>.label", type: ".question-box .tag", workType: "ynou", pageType: "ynou" }, init: async () => { await waitUntil((function() { return 0 !== M(".e_juan02biaoti").length; })), M("body").css("text-align", "left"); }, answerHook: e => { e.options = []; const t = M(e.html).find(".e_juan02daan").clone(); t.find(".clear").nextAll().remove(); const n = removeHtml(t.html()), a = n.split(/[A][\u3001\.\uff0e]/)[0].trim(); if (null === a) return null; e.question = a; const s = n.match(/(?:[A-G](?:[\u3001.]|\s)?\s?.*?)(?=\s*[A-G](?:[\u3001.]|\s)?|\s*$)/gs); if (null !== s) { const t = removeOptionsStartChar(s.map((e => e.trim()))); if (0 == t) return null; e.options = t; } const o = M(e.html).find(".signDefault").attr("answer_control"); "radio" === o && e.options.length > 1 && (e.type = "0"), "checkbox" === o && e.options.length > 1 && (e.type = "1"), "radio" === o && 0 === e.options.length && (e.type = "3"); const i = M(e.html).find(".right_answer>font").text(); switch (e.type) { case "0": case "1": e.answer = i.split("").map((t => e.options[t.charCodeAt(0) - 65])); break; case "3": e.answer = isTrue(i) ? "\u6b63\u786e" : isFalse(i) ? "\u9519\u8bef" : ""; } return e; } } ], tt = [ { type: "hook", name: "hook", match: location.host.includes("21tb.com"), main: e => { const getHash = () => M("#examIngEmsRightPanel").attr("class"); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M("#examIngEmsRightPanel").length >= 1 && t.observe(M("#examIngEmsRightPanel")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "21tb\u7b54\u9898", tips: "21tb\u5e73\u53f0\u7b54\u9898\uff0c\u76ee\u524d\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u9898", match: () => location.host.includes("21tb.com") && location.href.includes("exercise/newExercise.fullExerciseTemp.do"), question: { html: ".paper-content > .question-panel-middle", question: ".question-stem>.name", options: "ul.question-options>li>label", type: ".question-box .tag", workType: "21tb", pageType: "21tb" }, init: async () => { if (M(".view-paper-content").length > 0) return !1; }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), questionHook: e => { e.question = titleClean(e.question), e.question = e.question.replace(/\uff08\d+\u5206\uff09$/, "").trim(), e.options = e.options.map((e => e.replace(/^[A-Z]\s*\.\s*/, ""))), e.options = removeStartChar(e.options); const t = M(e.html).attr("class") || ""; switch (console.log(t), !0) { case t.includes("SINGLE"): e.type = "0"; break; case t.includes("MULTIPLE"): e.type = "1"; break; case t.includes("JUDGMENT"): e.type = "3", e.options = []; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "21tb\u6536\u5f55", match: () => location.host.includes("21tb.com") && location.href.includes("exercise/newExercise.fullExerciseTemp.do"), question: { html: "form > .question-panel-middle", question: ".question-stem>.name", options: "ul.question-options>li>label", type: ".question-box .tag", workType: "21tb", pageType: "21tb" }, init: async () => { if (console.log(M(".view-paper-content").length), 0 == M(".view-paper-content").length) return !1; }, answerHook: e => { e.question = titleClean(e.question), e.question = e.question.replace(/\uff08\d+\u5206\uff09$/, "").trim(), e.options = e.options.map((e => e.replace(/^[A-Z]\s*\.\s*/, ""))), e.options = removeStartChar(e.options); const t = M(e.html).attr("questtype") || "", n = M(e.html).find(".true-answer").text().split("\uff1a")[1].trim(); switch (!0) { case t.includes("SINGLE"): e.type = "0", e.answer = n.split(", ").map((t => e.options[t.charCodeAt(0) - 65])); break; case t.includes("MULTIPLE"): e.type = "1", e.answer = n.split(", ").map((t => e.options[t.charCodeAt(0) - 65])); break; case t.includes("JUDGMENT"): e.type = "3", e.options = [], e.answer = judgeAnswer(n); } return console.log(e), e; } }, { type: "ask", name: "21tb\u8003\u8bd5\u7b54\u9898", tips: "21tb\u5e73\u53f0\u7b54\u9898\uff0c\u76ee\u524d\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u9898", match: () => location.host.includes("21tb.com") && location.href.includes("ems/html/examCenter/fullExamTemp.do"), question: { html: ".paper-content > .question-panel-middle", question: ".question-stem", options: "ul.question-options>li>label", type: ".question-box .tag", workType: "21tb", pageType: "21tb" }, init: async () => { if (M(".view-paper-content").length > 0) return !1; }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), questionHook: e => { const t = M(e.html).find(".question-stem").clone(); t.find(".num").remove(), e.question = titleClean(removeHtml(t.html())).replace(/^\./, ""), e.question = e.question.replace(/\uff08\d+\u5206\uff09$/, "").trim(), e.options = e.options.map((e => e.replace(/^[A-Z]\s*\.\s*/, ""))), e.options = removeStartChar(e.options); const n = M(e.html).attr("class") || ""; switch (console.log(n), !0) { case n.includes("SINGLE"): e.type = "0"; break; case n.includes("MULTIPLE"): e.type = "1"; break; case n.includes("JUDGMENT"): e.type = "3", e.options = []; } return e; }, setAnswer: e => !0, finish: e => {} } ], nt = [ { type: "hook", name: "hook", match: location.host.includes("168wangxiao.com"), main: e => { const getHash = () => (M(".question-submit-btn").text(), M(".question-submit-btn").text()); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 === M(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && (M("#app")[0], t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 })); } }, { type: "ask", name: "168\u7f51\u6821\u7b54\u9898", tips: "168\u7f51\u6821\u76ee\u524d\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u586b\u7a7a\u3001\u7b80\u7b54\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("168wangxiao.com") && location.href.includes("/web/learningCenter/details/"), question: { html: ".question-item-container", question: ".title-content", options: ".options .opt-content", type: ".type", workType: "168wx", pageType: "168wx" }, init: async () => (await waitUntil((function() { return 0 !== M(".question-item-container").length; })), !M(".question-submit-btn").text().includes("\u91cd\u65b0\u7b54\u9898")), next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { const t = M(e.html).find(".type").text(); return e.type = typeMatch(t), e; }, setAnswer: e => "4" !== e.type || (M(e.html).find(".ql-editor"), M(e.html).find(".ql-editor")[0].innerHTML = e.answer[0], !1), finish: e => {} }, { type: "save", name: "168\u7f51\u6821\u7b54\u9898", match: () => location.host.includes("168wangxiao.com") && location.href.includes("/web/learningCenter/details/"), question: { html: ".question-item-container", question: ".title-content", options: ".options .opt-content", type: ".type", workType: "168wx", pageType: "168wx" }, init: async () => (await waitUntil((function() { return 0 !== M(".question-item-container").length; })), M(".question-submit-btn").text().includes("\u91cd\u65b0\u7b54\u9898")), answerHook: e => { const t = M(e.html).find(".type").text(); switch (e.type = typeMatch(t), e.answer = M(e.html).find(".options .opt-content.is-correct-answer").map(((e, t) => removeHtml(M(t).html()))).get(), e.type) { case "2": e.options = [], e.answer = M(e.html).find(".analyze-container>.answer>.text-container>p").map(((e, t) => removeHtml(M(t).html()))).get(); break; case "3": e.options = [], e.answer = [ judgeAnswer(e.answer[0]) ]; break; case "4": e.options = [], e.answer = M(e.html).find(".analyze-container>.answer>.text-container").map(((e, t) => removeHtml(M(t).html()))).get(); } return e; } } ], at = [ { type: "ask", name: "\u9ea6\u80fd\u7f51\u7b54\u9898", tips: "\u9ea6\u80fd\u7f51\u7b54\u9898\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("mynep.com") && location.href.includes("my-exam/exambegin"), question: { html: ".et_test", question: ".et_title", options: "ul>.et_answer>label", type: ".question-box .tag", workType: "mynep", pageType: "mynep" }, init: async () => {}, toquestion: e => { oe.select_num(e + 1); }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), questionHook: e => { e.question = e.question.replace(/\u7b2c\d+\u9898\uff1a/, ""), e.options = removeStartChar(e.options); switch (M(e.html).find('input[id^="question-num-isdone"]').attr("question_num_type_id")) { case "1": e.type = "0"; break; case "2": e.type = "1"; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("mynep.com") && location.href.includes("web/my-exam/examshow"), question: { html: ".et_test", question: ".et_title", options: "ul>.et_answer>label", type: ".question-box .tag", workType: "mynep", pageType: "mynep" }, init: async () => {}, answerHook: e => { const t = M(e.html).find(".et_title").clone(); t.find(".exam-btn").remove(), t.find("div").remove(), e.question = removeHtml(t.html()).replace(/\u7b2c\d+\u9898\uff1a/, "").trim(), e.options = []; const n = []; M(e.html).find(".et_answer>.et_answer>.et_answer>label").map(((t, a) => { e.options.push(removeHtml(M(a).html()).trim()), M(a).parent().find("input").prop("checked") && n.push(t); })).get(), e.options = removeStartChar(e.options), e.answer = n.map((t => e.options[t])); switch (M(e.html).find('input[id^="question-num-isdone"]').attr("question_num_type_id")) { case "1": e.type = "0"; break; case "2": e.type = "1"; break; default: return !1; } return e; } } ], st = [ { type: "ask", name: "\u4e91\u73ed\u8bfe\u7b54\u9898", tips: "\u4e91\u73ed\u8bfe\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "www.mosoteach.cn" === location.host && location.href.includes("/web/index.php?c=interaction_quiz&m=reply"), question: { html: ".topic-item", question: ".t-subject", options: ".t-option.t-item label", type: ".t-type", workType: "mosoteach", pageType: "mosoteach" }, init: async () => { await waitUntil((function() { var e; return 0 !== (null == (e = M("#app")[0]) ? void 0 : e.__vue__.$data.topics.length); })); }, next: () => {}, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { const n = M("#app")[0].__vue__.$data.topics[t]; e.question = titleClean(removeHtml(n.subject)); const a = n.options; switch (a.sort(((e, t) => e.item_no - t.item_no)), e.options = a.map((e => removeHtml(e.content))), n.type) { case "SINGLE": e.type = "0"; break; case "MULTI": e.type = "1"; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => "www.mosoteach.cn" === location.host && location.href.includes("/web/index.php?c=interaction_quiz&m=person_quiz_result"), question: { html: ".topic-list > .topic-item", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "mosoteach", pageType: "mosoteach" }, init: async () => { await waitUntil((function() { var e; return 0 !== (null == (e = M("#app")[0]) ? void 0 : e.__vue__.$data.topics.length); })); }, answerHook: (e, t) => { const n = M("#app")[0].__vue__.$data.topics[t]; e.question = titleClean(removeHtml(n.subject)); const a = n.options; switch (a.sort(((e, t) => e.item_no - t.item_no)), e.options = a.map((e => removeHtml(e.content))), e.answer = n.answers.map((t => e.options[t])), n.type) { case "SINGLE": e.type = "0"; break; case "MULTI": e.type = "1"; break; default: return null; } return e; } } ], ot = [ { type: "hook", name: "hook", match: "www.learnin.com.cn" === location.host, main: e => { const getHash = () => { try { return M(".page-student-course-topic-do-container")[0].__vue__.$data.topic.studentTopic.id; } catch (e) { return ""; } }; oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "learnin\u6536\u5f55", match: () => "www.learnin.com.cn" === location.host && location.href.includes("/user/#/user/student/course/") && 0 == M("button:contains('\u63d0\u4ea4\u4f5c\u4e1a')").length, question: { html: ".store-question-item-container", question: ".question-title", options: ".question-info>.question-option-list>.option-item", type: ".item-question-header>.header-left", workType: "learnin", pageType: "learnin" }, init: async () => { await waitUntil((function() { return isExist(".store-question-item-container"); })); }, answerHook: (e, t) => { const n = M(".page-student-course-topic-do-container")[0].__vue__.$data.topic.topicItems[0].childList, a = n[t]; switch (n[t], a.questionTypeCode) { case "judgment": e.type = "3"; break; case "single": e.type = "0"; break; case "multiple": e.type = "1"; break; default: return e; } e.question = titleClean(removeHtml(a.questionTitle)); let s = [], o = []; return a.optionList.forEach((e => { const t = removeHtml(e.content); e.isAnswer && o.push(t), s.push(t); })), e.options = s, e.answer = o, "3" == e.type && (e.options = [], e.answer = judgeAnswer(o[0])), e; } }, { type: "ask", name: "learnin\u7b54\u9898", tips: "learnin\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "www.learnin.com.cn" === location.host && location.href.includes("/user/#/user/student/course/") && 1 == M("button:contains('\u63d0\u4ea4\u4f5c\u4e1a')").length, question: { html: ".store-question-item-container", question: ".question-title", options: ".question-info>.question-option-list>.option-item>.option-index", type: ".item-question-header>.header-left", workType: "learnin", pageType: "learnin" }, init: async () => { await waitUntil((function() { return isExist(".store-question-item-container"); })); }, next: () => {}, ischecked: e => e.hasClass("active"), questionHook: (e, t) => { const n = M(".page-student-course-topic-do-container")[0].__vue__.$data.topic.topicItems[0].childList, a = n[t]; switch (n[t], a.questionTypeCode) { case "judgment": e.type = "3"; break; case "single": e.type = "0"; break; case "multiple": e.type = "1"; break; default: return e; } e.question = titleClean(removeHtml(a.questionTitle)); let s = []; return a.optionList.forEach((e => { const t = removeHtml(e.content); s.push(t); })), e.options = s, "3" == e.type && (e.options = []), e; }, setAnswer: e => !0, finish: e => {} } ], it = [ { type: "hook", name: "hook", match: location.host.includes("ouchn.edu.cn"), main: e => { const getHash = () => getUrl(); oe.mainClass = getHash(); let t = new MutationObserver((async e => { oe.mainClass !== getHash() && (oe.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); M("#app").length >= 1 && t.observe(M("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7535\u5927\u7b54\u9898", tips: "\u7535\u5927\u76ee\u524d\u4ec5\u652f\u6301\u5355\u9009\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("ouchn.edu.cn") && location.href.includes("learningPlatform/#/myExamDetails/examQuestion"), question: { html: ".everyQuest", question: ".topicTitle", options: ".optionList .topicTitle", type: ".question-box .tag", workType: "ouchn", pageType: "ouchn" }, init: async () => { await waitUntil((function() { return isExist(".everyQuest"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => (e.type = "0", e), setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u7535\u5927\u6536\u5f55", match: () => location.host.includes("ouchn.edu.cn") && location.href.includes("learningPlatform/#/myExamDetails/testPaper"), question: { html: ".everyQuest", question: ".topicTitle", options: ".optionList .topicTitle", type: ".question-box .tag", workType: "ouchn", pageType: "ouchn" }, init: async () => { await waitUntil((function() { return isExist(".everyQuest"); })); }, answerHook: e => { const t = M(e.html).find('.rightAndWrong>span:contains("\u6b63\u786e\u7b54\u6848")').text().replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), n = e.options; let a = []; return t.split("").forEach((e => { a.push(n[e.charCodeAt(0) - 65]); })), 1 == a.length ? e.type = "0" : e.type = "1", e.answer = a, e; } } ], rt = [ { type: "hook", name: "mooc", match: "www.icourse163.org" === location.host, main: e => { oe.mainClass = M("#courseLearn-inner-box > div:eq(0)").attr("class"); let t = new MutationObserver((async e => { oe.mainClass !== M("#courseLearn-inner-box > div:eq(0)").attr("class") && (oe.mainClass = M("#courseLearn-inner-box > div:eq(0)").attr("class"), "homework-detail-container" === oe.mainClass && await waitUntil((function() { return 0 === M(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); M("#courseLearn-inner-box").length >= 1 && t.observe(M("#courseLearn-inner-box")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "mooc\u7b54\u9898", tips: "\u4e2d\u56fd\u5927\u5b66MOOC\u9650\u5236\u7b54\u9898\u901f\u5ea6\uff0c\u8bf7\u4e0d\u8981\u8fc7\u5feb", match: () => "www.icourse163.org" === location.host && location.href.includes("#/learn/quiz?id="), question: { html: ".u-questionItem", question: ".f-richEditorText", options: "ul.choices>li>input", type: ".qaCate.j-qacate.f-fl", workType: "mooc", pageType: "mooc" }, init: async () => { await waitUntil((function() { return M(".u-questionItem").length, 0 !== M(".u-questionItem").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: (e, t) => { M(e.html).find(".qaCate.j-qacate.f-fl > span:eq(0)").attr("class"); const n = oe.learnUtilQuestionList[t]; switch (e.question = removeHtml(n.title), e.options = n.options.map((e => removeHtml(e.content))), n.type) { case 1: e.type = "0"; break; case 2: e.type = "1"; break; case 3: e.type = "2"; break; case 4: e.type = "3", e.options = []; break; default: n.type, e.type = "8"; } return e; }, setAnswer: e => { switch (e.type) { case "2": return M(e.html).find(".u-baseinputui>textarea").each(((t, n) => { M(n).val(e.answer[t]), M(n).focus(), M(n).blur(); })), !1; case "3": let t = e.answer; M(e.html).find("ul.choices>li").each(((e, n) => { isTrue(t) && M(n).find(".u-icon-correct").length > 0 && M(n).find("input").click(), isFalse(t) && M(n).find(".u-icon-wrong").length > 0 && M(n).find("input").click(); })); } return !0; }, finish: e => {} }, { type: "save", name: "\u4e2d\u56fd\u5927\u5b66mooc\u6536\u5f55", match: () => "www.icourse163.org" === location.host && location.href.includes("#/learn/quizscore?id="), question: { html: ".u-questionItem", question: ".f-richEditorText", options: "ul.choices li>input", type: ".qaCate.j-qacate.f-fl", workType: "mooc", pageType: "mooc" }, init: async () => { await waitUntil((function() { return M(".u-questionItem").length, 0 !== M(".u-questionItem").length; })); }, answerHook: (e, t) => { const n = oe.learnUtilQuestionList[t]; e.question = removeHtml(n.title); let a = [], s = []; switch (n.options.forEach((e => { a.push(removeHtml(e.content)), e.answer && s.push(removeHtml(e.content)); })), e.options = a, e.answer = s, n.type) { case 1: e.type = "0"; break; case 2: e.type = "1"; break; case 3: e.type = "2", e.answer = [ n.stdAnswer ]; break; case 4: e.type = "3", e.options = []; break; default: n.type; } return e; } } ], lt = [ { type: "ask", name: "\u7b54\u9898", tips: "\u516c\u544a", match: () => location.host.includes("swufe-online.com") && location.href.includes("learnspace/course/test/coursewareTest_intoRedoTestPage.action"), question: { html: ".bank_test > .test_item", question: ".test_item_tit", options: ".test_item_theme>ul>li>label, .test_item_theme>label", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => { await waitUntil((function() { return isExist(".bank_test > .test_item"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { if (e.type = typeMatch(M(e.html).prevAll(".test_item_type").first().text()), e.question = e.question.replace(/^[.*?]\s*/, "").replace(/^\u3010.*?\u3011\s*/, "").replace(/\s*\uff08\d+\.\d+\u5206\uff09$/, "").replace(/^\d+\./, "").trim().replace(/^\d+\uff0e/, "").trim().replace(/^\d+ ./, "").trim(), e.options = removeStartChar(e.options), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u897f\u8d22\u5728\u7ebf\u9636\u6bb5\u6d4b\u9a8c\u6536\u5f55", match: () => location.host.includes("swufe-online.com") && location.href.includes("learnspace/course/test/coursewareTest_intoTestAnswerPage.action"), question: { html: ".bank_test > .test_item", question: ".test_item_tit", options: ".test_item_theme>ul>li>.zdh_op_con", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => {}, answerHook: e => { e.type = typeMatch(M(e.html).prevAll(".test_item_type").first().text()), e.question = e.question.replace(/^[.*?]\s*/, "").replace(/^\u3010.*?\u3011\s*/, "").replace(/\s*\uff08\d+\.\d+\u5206\uff09$/, "").replace(/^\d+\./, "").trim().replace(/^\d+\uff0e/, "").trim().replace(/^\d+ ./, "").trim(), e.options = removeStartChar(e.options); const t = M(e.html).find(".test_item_key_tit").text().replace("\u53c2\u8003\u7b54\u6848\uff1a", "").trim(); switch (e.type) { case "0": case "1": e.answer = t.split("").map((t => { let n = t.charCodeAt() - 65; return e.options[n]; })); break; case "3": e.answer = judgeAnswer(t), e.options = []; } return e; } }, { type: "ask", name: "\u897f\u8d22\u5728\u7ebf\u7efc\u5408\u7ec3\u4e60\u7b54\u9898", tips: "\u897f\u8d22\u5728\u7ebf\u6536\u5f55\u8bf7\u91cd\u65b0\u70b9\u51fb\u9898\u578b\u5207\u6362\u89e6\u53d1", match: () => location.host.includes("swufe-online.com") && location.href.includes("/learnspace/userDefine/t_test.jsp?courseId="), question: { html: ".timu_title", question: ".timu_title", options: ".test_item_theme>ul>li", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => { if (await waitUntil((function() { return isExist(".timu_title"); })), !document.body.innerHTML.includes("\u63d0\u4ea4\u7b54\u9898\u540e\u663e\u793a")) return !1; M(".layui-tab-title>li").on("click", (function() { vuePageChange$1(); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: (e, t) => { const n = M(e.html).attr("id"); return e.type = typeMatch(M(".layui-this").text()), e.question = removeHtml(M(e.html).html()), e.options = M(`#${n}`).map((function() { let t = [], n = M(this).next(), a = []; for (;n.length && n.hasClass("question-item-opt"); ) a.push(removeHtml(n[0].outerHTML)), t.push(n), n = n.next(); return e.$options = M(t.map((e => e[0]))).find("label"), a; })).get(), e.options = removeStartChar(e.options), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u897f\u8d22\u5728\u7ebf\u7efc\u5408\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("swufe-online.com") && location.href.includes("/learnspace/userDefine/t_test.jsp?courseId="), question: { html: ".timu_title", question: ".timu_title", options: ".test_item_theme>ul>li", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => { if (await waitUntil((function() { return isExist(".timu_title"); })), document.body.innerHTML.includes("\u63d0\u4ea4\u7b54\u9898\u540e\u663e\u793a")) return !1; M(".layui-tab-title>li").on("click", (function() { vuePageChange$1(); })); }, answerHook: e => { const t = M(e.html).attr("id"); switch (e.type = typeMatch(M(".layui-this").text()), e.question = removeHtml(M(e.html).html()), e.options = M(`#${t}`).map((function() { let t = [], n = M(this).next(), a = []; for (;n.length && n.hasClass("question-item-opt"); ) a.push(removeHtml(n[0].outerHTML)), t.push(n), n = n.next(); return e.$options = M(t.map((e => e[0]))).find("label"), a; })).get(), e.options = removeStartChar(e.options), e.type) { case "0": case "1": const n = M(`#${t}`).nextAll(".ans").first().find("span:eq(0)").text(); e.answer = n.trim().split("").map((t => { let n = t.charCodeAt() - 65; return e.options[n]; })); break; case "3": e.answer = judgeAnswer(M(`#${t}`).nextAll(".ans").first().find("span:eq(0)").text().trim()), e.options = []; break; case "7": case "4": e.answer = removeHtml(M(`#${t}`).nextAll(".ans").first().html()).replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), e.options = []; break; default: e.type; } return e; } } ], ct = Object.freeze(Object.defineProperty({ __proto__: null, a21tb: tt, ahjxjy: Ie, chaoxing: Te, chatglm: Ue, chengjiaoyun: Ee, chutou: We, cjedu: Me, cjnep: Ze, cloudwis: Ne, cnzx: Le, gkks: Ge, guokai: Fe, huayi: Ke, jijiaox: Je, jsou: je, learnin: ot, ls365: Qe, mooc: rt, mosoteach: st, mynep: at, openha: Ve, ouchn: it, qingshu: Oe, sclecb: Re, swufe: lt, uooc: De, wencai: Xe, wx168: nt, xinwei: Se, xueqi: Be, ykt: Pe, ynou: et, ytccr: ze, yunmuxueyuan: be, yxlearning: Ye, zhihuishu: Ae, zhijiaoyun: $e }, Symbol.toStringTag, { value: "Module" })), ut = []; for (const Bn in ct) ut.push(...ct[Bn]); const parseRule = async e => { await waitUntil((() => void 0 !== oe[dt + "app"])); const t = e.filter((e => "function" == typeof e.match ? e.match() : e.match)), n = getAppStore(), a = { app: n, ask: getAskStore() }; if (!t.length) return n.app.alert = "\u5f53\u524d\u6ca1\u6709\u4efb\u52a1", console.log("\u6ca1\u6709\u5339\u914d\u5230\u89c4\u5219", "error"), void addLog("\u6ca1\u6709\u5339\u914d\u5230\u89c4\u5219", "error"); for (const s of t) { if (console.log(`\u5339\u914d\u5230\u89c4\u5219\uff1a${s.name}`, "success"), addLog(`\u5339\u914d\u5230\u89c4\u5219\uff1a${s.name}`, "success"), s.init) { let e = await s.init(); if ("boolean" == typeof e && !1 === e) continue; } n.alert = `\u5f53\u524d\u4efb\u52a1:${s.name}`, "hook" === s.type && s.main(a), "ask" === s.type && askParser(s, a), "save" === s.type && saveParser(s, a); } }, saveParser = (e, t) => { const n = t.app, a = t.ask; a.rule = e, e.tips && (a.tips = e.tips); const s = questionSaveParser(e.question, e.answerHook || null).filter((e => null != e && 0 !== e.answer.length && "" !== e.answer && "8" != e.type)); if (a.saveQuestionData = s, s.forEach((e => { 0 !== e.answer.length && Answer.cacheAnswer(e); })), e.paper && "function" == typeof e.paper) try { e.paper(s); } catch (i) { addLog("\u6574\u5377\u7f13\u5b58\u5f02\u5e38", "error"); } const o = { questionList: s, pageType: e.question.pageType }; n.setPage("question"), s.length && Answer.syncQuestionList(o), n.app.alert = `\u9898\u5e93\u6536\u5f55\u5b8c\u6210\uff0c\u5171\u7f13\u5b58${s.length}\u9053\u9898\u76ee`, msg(`\u9898\u5e93\u6536\u5f55\u5b8c\u6210\uff0c\u5171\u7f13\u5b58${s.length}\u9053\u9898\u76ee`, "success"), e.next && e.next(); }, askParser = (e, t) => { const n = t.app, a = t.ask; a.rule = e, e.tips && (a.tips = e.tips), n.app.showFloat = !n.app.hideFloat, n.setPage("ask"), a.clearQuestion(); questionParser(e.question, e.questionHook || null).forEach((e => { a.addQuestion(e); })), a.autoAnswer && a.toggleStart(); }, questionSaveParser = (e, t) => { "function" == typeof e.html && (e.html = e.html()); return M(e.html).map(((n, a) => { const s = removeHtml(M(a).find(e.question).html()), o = M(a).find(e.options).map(((e, t) => removeHtml(M(t).html()))).get(), i = M(a).find(e.type).val(), r = M(a)[0]; let l = { question: titleClean(s ?? ""), options: o, $options: M(a).find(e.options), $answer: M(a).find(e.answer), answer: [], type: i, html: r }; try { t && (l = t(l, n)); } catch (c) { console.log("\u6536\u5f55hook\u62a5\u9519", c); } return null == l || null == l ? null : { question: l.question, options: l.options, answer: l.answer, type: l.type, hash: questionHash(l.type, l.question, l.options) }; })).get(); }, questionParser = (e, t) => { "function" == typeof e.html && (e.html = e.html()); return M(e.html).map(((n, a) => { const s = removeHtml(M(a).find(e.question).html()), o = M(a).find(e.options).map(((e, t) => removeHtml(M(t).html()))).get(), i = M(a).find(e.type).val(), r = e.workType, l = M(a)[0]; let c = { question: titleClean(s ?? ""), options: o, $options: M(a).find(e.options), type: i, html: l, workType: r, pageType: e.pageType }; return t && (c = t(c, n)), c; })).get(); }; function getAppStore() { return oe[dt + "app"]; } function getAskStore() { return oe[dt + "ask"]; } function request(e, t, n = void 0, a = void 0, s = 5e3) { "GET" === t && n && (e += `?${new URLSearchParams(n).toString()}`), "POST" === t && (a = { ...a }); const o = { "User-Agent": oe.navigator.userAgent, "Content-Type": "application/json", referer: location.href, ...a }; return new Promise(((a, i) => { const r = Date.now(); se({ method: t, url: e, headers: o, data: "GET" !== t ? JSON.stringify(n) : void 0, timeout: s, onload: function(e) { const t = Date.now(); a([ e, t - r ]); }, ontimeout: () => i(new Error("\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6")), onerror: e => { i(e); } }); })); } function requestApi(e, t, n = void 0, a = void 0, s = 5e3) { return new Promise((async (o, i) => { let r; { const e = function(e) { const t = Object.keys(e).sort(), n = t.map((t => { let n = e[t]; return Array.isArray(n) && 0 === n.length || "object" == typeof n && 0 === Object.keys(n).length ? null : ((Array.isArray(n) || "object" == typeof n) && (n = JSON.stringify(n)), `${t}=${n}`); })), a = n.filter((e => null !== e)); return ve(a.join("&")); }(n); a = { ...a, aka: e }, r = await encrypt(JSON.stringify(n), e); } const l = { "User-Agent": oe.navigator.userAgent, "Content-Type": "application/json", referer: location.href, v: mt.script.version, ...a }, c = Date.now(); se({ method: t, url: e, headers: l, data: JSON.stringify({ data: r }), timeout: s, onload: function(e) { const t = Date.now(); o([ e, t - c ]); }, ontimeout: () => i(new Error("\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6")), onerror: e => { i(e); } }); })); } function requestFetch(e, t, n = void 0, a = void 0, s = 5e3) { const o = { "User-Agent": oe.navigator.userAgent, "Content-Type": "text/plain;charset=UTF-8", ...a }; return new Promise(((n, a) => { fetch(e, { method: t, headers: o, body: void 0 }).then((e => n(e.text()))).catch((function(e) { a(e); })); })); } const vuePageChange$1 = async () => { if (oe.vuePageChangeLock) return; oe.vuePageChangeLock = !0; const e = getAppStore(), t = getAskStore(); t.questionInx = 0, e.app.showFloat = !1, e.setPage("home"), t.clearQuestion(), await parseRule(ut), oe.vuePageChangeLock = !1; }, addLog = (e, t = "info") => { const n = getAppStore(), a = (new Date).toLocaleString(); try { n.addLog({ time: a, type: t, content: e }); } catch (s) { console.log(e); } }, updateCheck1 = () => { const e = getAppStore(); let t; try { t = e.script.updateURL.match(/scripts\/(\d+)/)[1]; } catch { t = ft; } let n = `https://greasyfork.org/zh-CN/scripts/${t}.json`; return new Promise(((e, a) => { requestFetch(n, "GET", {}, {}).then((e => { (e = JSON.parse(e)).version > mt.script.version ? msg(`\u68c0\u6d4b\u5230\u65b0\u7248\u672c${e.version},\u8bf7\u53ca\u65f6\u66f4\u65b0")).replace(/<\/xmp>/g, ""); let a = (e = P.sanitize(e, { ALLOWED_TAGS: [ "img", "br", "sub", "sup" ], ALLOWED_ATTR: [ "src", "href" ], ALLOW_DATA_ATTR: !1, KEEP_CONTENT: !0 })).match(/
${G.highlight(t, {
language: n,
ignoreIllegals: !0
}).value}
`;
} catch (a) {}
return `${e.utils.escapeHtml(t)}
`;
},
html: !0,
breaks: !0,
linkify: !0
}), t = e.renderer.rules.link_open || ((e, t, n, a, s) => s.renderToken(e, t, n));
return e.renderer.rules.link_open = (e, n, a, s, o) => {
const i = e[n].attrIndex("target");
return i < 0 ? (e[n].attrPush([ "target", "_blank" ]), e[n].attrPush([ "rel", "noopener noreferrer" ])) : e[n].attrs[i][1] = "_blank",
t(e, n, a, s, o);
}, e.render(this.questionList[this.questionInx].aiMsg);
}
}
}), Tt = vue.createElementVNode("div", {
class: "aah_bomHet50"
}, [ vue.createElementVNode("span", {
class: "dq"
}, [ vue.createElementVNode("i"), vue.createTextVNode("\u5f53\u524d\u9898\u76ee") ]), vue.createElementVNode("span", {
class: "yp"
}, [ vue.createElementVNode("i"), vue.createTextVNode("\u5df2\u4f5c\u7b54") ]), vue.createElementVNode("span", {
class: "wp"
}, [ vue.createElementVNode("i"), vue.createTextVNode("\u65e0\u7b54\u6848") ]), vue.createElementVNode("span", {
class: "zp"
}, [ vue.createElementVNode("i"), vue.createTextVNode("\u672a\u4f5c\u7b54") ]) ], -1), At = [ "innerHTML" ], St = [ "innerHTML" ], Ut = {
key: 0
}, Ht = {
style: {
width: "100%"
}
}, Ft = [ "innerHTML" ], Et = [ "value" ], jt = {
key: 1,
style: {
color: "green"
}
}, $t = {
key: 2,
style: {
color: "red"
}
}, Lt = {
key: 0
}, Pt = {
key: 1
}, It = [ "innerHTML" ], Ot = {
key: 0
}, Dt = [ "innerHTML" ], Mt = vue.defineComponent({
__name: "Ask",
setup(e) {
const t = Ct(), n = vt(), getOptionIndex = e => String.fromCharCode(65 + e), formatTooltip = e => `\u7b54\u9898\u95f4\u9694\uff1a${e}ms`;
vue.watch(n.app, (e => {
n.setConfig(e);
}));
const watchAutoNext = () => {
Cache.set("autoNext", t.autoNext);
}, watchSkipFinish = () => {
Cache.set("skipFinish", t.skipFinish);
}, watchAutoAnswer = () => {
Cache.set("autoAnswer", t.autoAnswer);
}, watchFreeFirst = () => {
Cache.set("freeFirst", t.freeFirst);
}, watchRandomAnswer = () => {
Cache.set("randomAnswer", t.randomAnswer);
}, watchDelay = () => {
Cache.set("delay", t.delay);
};
return (e, a) => {
const s = vue.resolveComponent("el-alert"), o = vue.resolveComponent("el-button"), i = vue.resolveComponent("el-col"), r = vue.resolveComponent("el-checkbox"), l = vue.resolveComponent("el-input"), c = vue.resolveComponent("el-form-item"), u = vue.resolveComponent("el-slider"), p = vue.resolveComponent("el-form"), h = vue.resolveComponent("el-tag"), d = vue.resolveComponent("el-divider"), m = vue.resolveComponent("el-row"), f = vue.resolveComponent("el-empty"), y = vue.resolveDirective("loading");
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createVNode(s, {
style: {
"margin-bottom": "10px"
},
title: vue.unref(t).tips,
type: "info",
closable: !1
}, null, 8, [ "title" ]), vue.createVNode(m, null, {
default: vue.withCtx((() => [ vue.unref(t).current ? (vue.openBlock(), vue.createBlock(i, {
key: 0,
span: 12
}, {
default: vue.withCtx((() => [ vue.createVNode(o, {
onClick: a[0] || (a[0] = e => vue.unref(t).start ? vue.unref(t).pause() : vue.unref(t).toggleStart()),
size: "small",
class: "aah_btn",
type: "primary",
plain: ""
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(vue.unref(t).start ? "\u6682\u505c\u7b54\u9898" : "\u5f00\u59cb\u7b54\u9898"), 1) ])),
_: 1
}) ])),
_: 1
})) : vue.createCommentVNode("", !0), vue.unref(t).current ? (vue.openBlock(), vue.createBlock(i, {
key: 1,
span: 12
}, {
default: vue.withCtx((() => [ vue.createVNode(o, {
onClick: a[1] || (a[1] = e => vue.unref(t).restart()),
size: "small",
class: "aah_btn",
type: "primary",
plain: ""
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u91cd\u65b0\u7b54\u9898") ])),
_: 1
}) ])),
_: 1
})) : vue.createCommentVNode("", !0), vue.unref(t).current ? (vue.openBlock(), vue.createBlock(i, {
key: 2,
span: 24
}, {
default: vue.withCtx((() => [ Tt ])),
_: 1
})) : vue.createCommentVNode("", !0), vue.unref(t).current ? (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, {
key: 3
}, vue.renderList(vue.unref(t).questionList, ((e, n) => (vue.openBlock(), vue.createBlock(i, {
span: 3
}, {
default: vue.withCtx((() => [ (vue.openBlock(), vue.createBlock(o, {
class: vue.normalizeClass(n == vue.unref(t).questionInx ? "aah_active" : ""),
style: {
width: "30px",
"margin-bottom": "4px"
},
key: n,
onClick: e => vue.unref(t).toQuestion(n),
size: "small",
type: 1 == e.status ? "primary" : 2 == e.status ? "danger" : "",
plain: ""
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(n + 1), 1) ])),
_: 2
}, 1032, [ "class", "onClick", "type" ])) ])),
_: 2
}, 1024)))), 256)) : vue.createCommentVNode("", !0), vue.createVNode(i, {
span: 24
}, {
default: vue.withCtx((() => [ vue.createVNode(p, {
"label-width": "auto"
}, {
default: vue.withCtx((() => [ vue.createVNode(r, {
onChange: watchSkipFinish,
modelValue: vue.unref(t).skipFinish,
"onUpdate:modelValue": a[2] || (a[2] = e => vue.unref(t).skipFinish = e),
label: "\u8df3\u8fc7\u5df2\u4f5c\u7b54"
}, null, 8, [ "modelValue" ]), vue.createVNode(r, {
onChange: watchAutoAnswer,
modelValue: vue.unref(t).autoAnswer,
"onUpdate:modelValue": a[3] || (a[3] = e => vue.unref(t).autoAnswer = e),
label: "\u81ea\u52a8\u7b54\u9898"
}, null, 8, [ "modelValue" ]), vue.createVNode(r, {
onChange: watchAutoNext,
modelValue: vue.unref(t).autoNext,
"onUpdate:modelValue": a[4] || (a[4] = e => vue.unref(t).autoNext = e),
label: "\u81ea\u52a8\u8df3\u8f6c"
}, null, 8, [ "modelValue" ]), vue.createVNode(r, {
onChange: watchFreeFirst,
modelValue: vue.unref(t).freeFirst,
"onUpdate:modelValue": a[5] || (a[5] = e => vue.unref(t).freeFirst = e),
label: "\u514d\u8d39\u9898\u5e93\u4f18\u5148"
}, null, 8, [ "modelValue" ]), vue.createVNode(r, {
onChange: watchRandomAnswer,
modelValue: vue.unref(t).randomAnswer,
"onUpdate:modelValue": a[6] || (a[6] = e => vue.unref(t).randomAnswer = e),
label: "\u65e0\u7b54\u6848\u968f\u673a\u7b54\u9898"
}, null, 8, [ "modelValue" ]), vue.createVNode(c, {
label: "\u79d8\u94a5"
}, {
default: vue.withCtx((() => [ vue.createVNode(l, {
class: "aah_password",
placeholder: "\u8bf7\u8f93\u5165\u4f60\u8d2d\u4e70\u7684\u79d8\u94a5\uff08\u975e\u5fc5\u586b\uff09",
modelValue: vue.unref(n).app.key,
"onUpdate:modelValue": a[7] || (a[7] = e => vue.unref(n).app.key = e),
"show-password": ""
}, null, 8, [ "modelValue" ]) ])),
_: 1
}), vue.createVNode(c, {
label: "\u95f4\u9694"
}, {
default: vue.withCtx((() => [ vue.createVNode(u, {
onChange: watchDelay,
modelValue: vue.unref(t).delay,
"onUpdate:modelValue": a[8] || (a[8] = e => vue.unref(t).delay = e),
max: 5e3,
min: 100,
"format-tooltip": formatTooltip
}, null, 8, [ "modelValue" ]) ])),
_: 1
}) ])),
_: 1
}) ])),
_: 1
}), vue.unref(t).formMap ? (vue.openBlock(), vue.createBlock(i, {
key: 4,
span: 24
}, {
default: vue.withCtx((() => [ (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t).formMap, ((e, t) => (vue.openBlock(), vue.createBlock(h, {
key: t,
style: {
"margin-right": "10px"
}
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(t) + ":" + vue.toDisplayString(e) + " \u6b21", 1) ])),
_: 2
}, 1024)))), 128)) ])),
_: 1
})) : vue.createCommentVNode("", !0), vue.unref(t).current ? (vue.openBlock(), vue.createBlock(d, {
key: 5
}, {
default: vue.withCtx((() => [ vue.createVNode(o, {
onClick: a[9] || (a[9] = e => vue.unref(t).reAnswer(vue.unref(t).questionInx)),
style: {
color: "red",
"font-size": "10px"
},
link: ""
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u91cd\u7b54") ])),
_: 1
}), vue.createVNode(d, {
direction: "vertical"
}), vue.createVNode(o, {
onClick: a[10] || (a[10] = e => vue.unref(t).aiAnswer(vue.unref(t).questionInx)),
style: {
color: "red",
"font-size": "10px"
},
link: ""
}, {
default: vue.withCtx((() => [ vue.createTextVNode("AI\u7b54\u9898") ])),
_: 1
}) ])),
_: 1
})) : vue.createCommentVNode("", !0), vue.unref(t).current ? (vue.openBlock(), vue.createBlock(i, {
key: 6,
span: 24
}, {
default: vue.withCtx((() => [ vue.createElementVNode("div", {
class: "aah_title",
innerHTML: "[" + vue.unref(typeConvert)(vue.unref(t).current.type ?? "", !1) + "]" + vue.unref(t).current.question
}, null, 8, At), (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t).current.options, ((e, n) => (vue.openBlock(), vue.createElementBlock("p", {
style: vue.normalizeStyle(vue.unref(t).current.form && vue.unref(t).current.form.match && vue.unref(t).current.form.match.includes(n) ? "color:green;" : ""),
class: "aah_options",
innerHTML: getOptionIndex(n) + ". " + e
}, null, 12, St)))), 256)), "24" == vue.unref(t).current.type ? (vue.openBlock(), vue.createElementBlock("p", Ut, [ vue.createElementVNode("table", Ht, [ (vue.openBlock(!0),
vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t).current.match, ((e, n) => (vue.openBlock(), vue.createElementBlock("tr", null, [ vue.createElementVNode("td", {
innerHTML: e
}, null, 8, Ft), vue.createElementVNode("td", null, [ vue.createElementVNode("select", null, [ (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t).current.selects[n], (e => (vue.openBlock(),
vue.createElementBlock("option", {
value: e.value
}, vue.toDisplayString(e.text), 9, Et)))), 256)) ]) ]) ])))), 256)) ]) ])) : vue.createCommentVNode("", !0), vue.unref(t).current.form ? (vue.openBlock(),
vue.createElementBlock("p", jt, " \u91c7\u7528\u3010" + vue.toDisplayString(vue.unref(t).current.form.form) + "\u3011\u7684\u7b54\u6848 ", 1)) : vue.createCommentVNode("", !0), "8" == vue.unref(t).current.type || null == vue.unref(t).current.type || "" == vue.unref(t).current.type ? (vue.openBlock(),
vue.createElementBlock("p", $t, " \u5f53\u524d\u9898\u578b\u6682\u4e0d\u652f\u6301\uff0c\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005\u5427 ")) : vue.createCommentVNode("", !0) ])),
_: 1
})) : vue.createCommentVNode("", !0), vue.unref(t).current ? vue.withDirectives((vue.openBlock(), vue.createBlock(i, {
key: 7,
span: 24,
"element-loading-text": "\u6b63\u5728\u641c\u7d22\u4e2d"
}, {
default: vue.withCtx((() => [ (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t).current.answer, (e => (vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(d, null, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(`${e.form}(${e.duration}ms)`), 1) ])),
_: 2
}, 1024), "object" == typeof e.answer ? (vue.openBlock(), vue.createElementBlock("div", Lt, [ (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(e.answer, (e => (vue.openBlock(),
vue.createElementBlock("p", null, [ vue.createVNode(l, {
value: e,
readonly: "",
style: {
width: "100%"
}
}, null, 8, [ "value" ]) ])))), 256)) ])) : (vue.openBlock(), vue.createElementBlock("div", Pt, [ vue.createElementVNode("div", {
innerHTML: e.answer ? e.answer : e.msg ?? "\u6682\u65e0\u7b54\u6848"
}, null, 8, It) ])) ])))), 256)), vue.unref(t).current.aiMsg ? (vue.openBlock(), vue.createElementBlock("div", Ot, [ vue.createVNode(d, null, {
default: vue.withCtx((() => [ vue.createTextVNode("AI\u56de\u7b54(\u4ec5\u4f9b\u53c2\u8003)") ])),
_: 1
}), vue.createElementVNode("div", {
innerHTML: vue.unref(t).currentAiMd
}, null, 8, Dt) ])) : vue.createCommentVNode("", !0) ])),
_: 1
})), [ [ y, vue.unref(t).loading ] ]) : vue.createCommentVNode("", !0) ])),
_: 1
}), vue.unref(t).current ? vue.createCommentVNode("", !0) : (vue.openBlock(), vue.createBlock(f, {
key: 0,
description: "\u6682\u65e0\u9898\u76ee\u6570\u636e"
})) ], 64);
};
}
}), zt = vue.createElementVNode("br", null, null, -1), Bt = vue.createElementVNode("br", null, null, -1), Gt = vue.createElementVNode("p", {
style: {
color: "red"
}
}, "\u4e14\u5e76\u975e\u6240\u6709\u7f51\u7ad9\u90fd\u652f\u6301\uff0c\u9700\u8981\u4f5c\u8005\u9002\u914d\uff0c\u82e5\u60a8\u7684\u5e73\u53f0\u4e0d\u652f\u6301\u53ef\u4ee5\u53cd\u9988\u7ed9\u4f5c\u8005", -1), Vt = vue.createElementVNode("div", {
class: "el-upload__text"
}, [ vue.createTextVNode(" \u62d6\u62fd\u5907\u4efd\u6587\u4ef6\u6216 "), vue.createElementVNode("em", null, "\u70b9\u51fb\u4e0a\u4f20"), vue.createTextVNode("\u6062\u590d\u5907\u4efd ") ], -1), Nt = {
style: {
"margin-top": "20px",
"margin-bottom": "20px"
}
}, Rt = [ "innerHTML" ], Wt = [ "innerHTML" ], Qt = [ "innerHTML" ], Jt = vue.defineComponent({
__name: "Question",
setup(e) {
const t = vue.ref(0);
let a;
window.addEventListener("keydown", (e => {
"`" === e.key && t.value++;
}));
try {
a = mt.script.updateURL.match(/scripts\/(\d+)/)[1];
} catch (r) {
a = ft;
}
const s = `https://greasyfork.org/zh-CN/scripts/${a}`, o = Ct(), i = Cache.match("ques1_"), clearCache = () => {
Cache.matchRemove("ques1_"), msg("\u6e05\u9664\u6210\u529f", "success");
}, exportHtml = async e => {
const t = e.map(((e, t) => {
return `\n \u7231\u95ee\u7b54\u52a9\u624b
\n${t + 1}\u3001[${typeConvert(e.type, !1)}]${e.question}
\n${n = e.options,
"object" != typeof n ? "" : n.map(((e, t) => String.fromCharCode(65 + t) + "." + e)).join("
")}
\u7b54\u6848\uff1a${answerFormat(e.answer)}
\n \n `; var n; })).join("