mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
94 KiB
JavaScript
1 line
94 KiB
JavaScript
|
3 weeks ago
|
var t;t=function(){const t=[],e=[];function n(){return`${performance.now().toString(36)}-${Math.random().toString(36).substring(2,5)}`}function o(t,e=new Set){if(t&&"object"==typeof t&&!e.has(t)){e.add(t);for(let n in t)o(t[n],e)}return t}setInterval((()=>{let n=new Set(e.splice(0)),o=0;for(let e of n)t[e]&&(t[e](),o++);return o}),25),window.$vupdate=e=>{t[e]()};var r=[];const i=Symbol("isProxy"),s=Symbol("DataID"),a=Symbol("bind"),c=Symbol("root"),l=Symbol("root arg");function u(t,e){t[c]=e,Object.keys(e).forEach((e=>{e in t||(t[e]=l)}))}function f(t){return!(!t||"object"!=typeof t||t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Event||t.t||t.constructor!==Object&&t.constructor!==Array)}function h(t,e){if(!t||!t[i]||!f(e))return e;let n=t[a];if(!e[i]){if(Array.isArray(e)&&Array.isArray(t)){t.length=0;for(let n=0;n<e.length;n++)t.push(e[n]);return t}return Object.keys(t).forEach((n=>{e.hasOwnProperty(n)||delete t[n]})),Object.keys(e).forEach((n=>{t[n]?.[i]?t[n]=h(t[n],e[n]):t[n]=e[n]})),t}if(e[s]===t[s])return e;for(let o in n)if(e[a][o]?.indexOf){const t=e[a][o],r=new Set(t);for(let e of n[o])r.has(e)||(t.push(e),r.add(e))}else e[a][o]=n[o];for(let o in e)o in t&&t[o]?.[i]&&(e[o]=h(t[o],e[o]));return e}let d=!1;const p={console,window,prompt:prompt.bind(window),alert:alert.bind(window),confirm:confirm.bind(window),RegExp,document,Array,Object,Math,Date,JSON,Symbol,Number,eval,isNaN,parseInt,parseFloat,setTimeout:setTimeout.bind(window),setInterval:setInterval.bind(window),clearTimeout:clearTimeout.bind(window),clearInterval:clearInterval.bind(window),encodeURIComponent,btoa:btoa.bind(window),fetch:fetch.bind(window),TextDecoder,history,requestAnimationFrame:requestAnimationFrame.bind(window)};function m(t,e,n){const o=new Proxy(t,{has:(t,e)=>!0,get(o,r,i){let s;return"$data"===r?s=t:"$env"===r?s=e:r in o?s=Reflect.get(o,r,i):r in e?s=e[r]:n&&r in n?s=n[r]:r in p?s=p[r]:r in window&&(s=window[r]),s},set:(t,e,n,o)=>Reflect.set(t,e,n,o)});return o}const w=Object.getPrototypeOf((async function(){})).constructor;function b(t,e){if(t.startsWith("/"))return t;const n=e.substring(0,e.lastIndexOf("/")).split("/").filter((t=>""!==t)),o=t.split("/").filter((t=>""!==t));for(const r of o)if(".."===r)n.length>0&&n.pop();else{if("."===r)continue;n.push(r)}return"/"+n.join("/")}const y={Wrap:function o(p,m=void 0){const w=n();let b=!1;"[object Array]"==={}.toString.call(p)&&(b=!0),m&&u(p,m);const y={},v={get(t,e,n){if(e===s)return w;if(e===i)return!0;if(e===a)return y;const u=Reflect.get(t,e,n);if(u===l)return t[c][e];if("symbol"==typeof e&&d)return u;if("function"==typeof u)return u;let h=-1;if(r.length>0){let t=e;h=r[r.length-1],b&&(t=""),y.hasOwnProperty(t)?-1==y[t].indexOf(h)&&y[t].push(h):y[t]=[h]}if(window.vdev,f(u)&&!u[i]){let r=o(u,void 0);return Reflect.set(t,e,r,n),r}return u},set(n,o,s,a){const u=Reflect.get(n,o,a);if(u===l)return n[c][o]=s,!0;if(u===s)return!0;if(d)return Reflect.set(n,o,s,a);let p=!0;if(Array.isArray(s)&&Array.isArray(u)){d=!0,u.length=0;for(let t=0;t<s.length;t++)u.push(s[t]);d=!1}else u&&u[i]&&f(s)?(s=h(u,s),p=Reflect.set(n,o,s,a)):p=Reflect.set(n,o,s,a);if(p&&0===r.length){let n=o;if(b&&(n=""),y[n]){let o=0;for(window.vdev;o<y[n].length;){let r=y[n][o];t[r]?(o++,window.vdev,e.push(r)):y[n].splice(o,1)}}}return p},deleteProperty(n,o){window.vdev;const i=Reflect.deleteProperty(n,o);if(i&&0===r.length){let n=o;if(b&&(n=""),y[n]){let o=0;for(;o<y[n].length;){let r=y[n][o];t[r]?(o++,e.push(r),window.vdev):y[n].splice(o,1)}}}return i}};return new Proxy(p,v)},Watch:function(e,n,i){let s,a=t.length;r.push(a),"function"==typeof n?t.push((()=>{n(e())})):t.push(e);try{s=e(),i&&i.deep&&o(s)}catch(g){}finally{r.pop()}return"function"==typeof n&&n(s),a},Cancel:function(e){e>=0&&e<t.length&&(t[e]=null)},ForceUpdate:function(){for(let e of t)e&&e()},SetDataRoot:u,DataID:s,GenUniqueID:n,Run:function(t,e,n,o){let r=t.trim();const i=r.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,"").trim();let s;/^(var|let|const|if|for|while|switch|try|throw|class|function|return|debugger)\b/.test(i)||-1!==r.indexOf("\n")&
|