Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@titaniumnetwork-dev/ultraviolet

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@titaniumnetwork-dev/ultraviolet - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4-beta

2

dist/uv.config.js

@@ -10,2 +10,2 @@ self.__uv$config = {

sw: '/uv.sw.js',
};
};

@@ -1,1 +0,1 @@

(()=>{"use strict";function e(t,a={},r="/bare/"){if("__uv"in t&&t.__uv instanceof Ultraviolet)return!1;t.document&&t.window&&t.document.querySelectorAll("script[__uv-script]").forEach((e=>e.remove()));const o=!t.window,n="__uv",l="__uv$",i=new Ultraviolet({...a,window:t});"function"==typeof a.construct&&a.construct(i,o?"worker":"window");const{client:s}=i,{HTMLMediaElement:d,HTMLScriptElement:c,HTMLAudioElement:u,HTMLVideoElement:m,HTMLInputElement:h,HTMLEmbedElement:v,HTMLTrackElement:g,HTMLAnchorElement:p,HTMLIFrameElement:b,HTMLAreaElement:_,HTMLLinkElement:f,HTMLBaseElement:y,HTMLFormElement:S,HTMLImageElement:w,HTMLSourceElement:P}=t;s.nativeMethods.defineProperty(t,"__uv",{value:i,enumerable:!1}),i.meta.origin=location.origin,i.location=s.location.emulate((e=>"about:srcdoc"===e?new URL(e):(e.startsWith("blob:")&&(e=e.slice("blob:".length)),new URL(i.sourceUrl(e)))),(e=>i.rewriteUrl(e))),i.cookieStr=t.__uv$cookies||"",i.meta.url=i.location,i.domain=i.meta.url.host,i.blobUrls=new t.Map,i.referrer="",i.cookies=[],i.localStorageObj={},i.sessionStorageObj={};try{i.bare=new URL(r,t.location.href)}catch(e){i.bare=t.parent.__uv.bare}if("about:srcdoc"===i.location.href&&(i.meta=t.parent.__uv.meta),t.EventTarget&&(i.addEventListener=t.EventTarget.prototype.addEventListener,i.removeListener=t.EventTarget.prototype.removeListener,i.dispatchEvent=t.EventTarget.prototype.dispatchEvent),s.nativeMethods.defineProperty(s.storage.storeProto,"__uv$storageObj",{get(){return this===s.storage.sessionStorage?i.sessionStorageObj:this===s.storage.localStorage?i.localStorageObj:void 0},enumerable:!1}),t.localStorage){for(const e in t.localStorage)e.startsWith(l+i.location.origin+"@")&&(i.localStorageObj[e.slice((l+i.location.origin+"@").length)]=t.localStorage.getItem(e));i.lsWrap=s.storage.emulate(s.storage.localStorage,i.localStorageObj)}if(t.sessionStorage){for(const e in t.sessionStorage)e.startsWith(l+i.location.origin+"@")&&(i.sessionStorageObj[e.slice((l+i.location.origin+"@").length)]=t.sessionStorage.getItem(e));i.ssWrap=s.storage.emulate(s.storage.sessionStorage,i.sessionStorageObj)}let k=t.document?s.node.baseURI.get.call(t.document):t.location.href,U=i.sourceUrl(k);if(s.nativeMethods.defineProperty(i.meta,"base",{get:()=>t.document?(s.node.baseURI.get.call(t.document)!==k&&(k=s.node.baseURI.get.call(t.document),U=i.sourceUrl(k)),U):i.meta.url.href}),i.methods={setSource:"__uv$setSource",source:"__uv$source",location:"__uv$location",function:"__uv$function",string:"__uv$string",eval:"__uv$eval",parent:"__uv$parent",top:"__uv$top"},i.filterKeys=[n,i.methods.setSource,i.methods.source,i.methods.location,i.methods.function,i.methods.string,i.methods.eval,i.methods.parent,i.methods.top,"__uv$protocol","__uv$storageObj","__uv$url","__uv$modifiedStyle","__uv$config","__uv$dispatched","Ultraviolet","__uvHook"],s.on("wrap",((e,t)=>{s.nativeMethods.defineProperty(t,"name",s.nativeMethods.getOwnPropertyDescriptor(e,"name")),s.nativeMethods.defineProperty(t,"length",s.nativeMethods.getOwnPropertyDescriptor(e,"length")),s.nativeMethods.defineProperty(t,i.methods.string,{enumerable:!1,value:s.nativeMethods.fnToString.call(e)}),s.nativeMethods.defineProperty(t,i.methods.function,{enumerable:!1,value:e})})),s.fetch.on("request",(e=>{e.data.input=i.rewriteUrl(e.data.input)})),s.fetch.on("requestUrl",(e=>{e.data.value=i.sourceUrl(e.data.value)})),s.fetch.on("responseUrl",(e=>{e.data.value=i.sourceUrl(e.data.value)})),s.xhr.on("open",(e=>{e.data.input=i.rewriteUrl(e.data.input)})),s.xhr.on("responseUrl",(e=>{e.data.value=i.sourceUrl(e.data.value)})),s.workers.on("worker",(e=>{e.data.url=i.rewriteUrl(e.data.url)})),s.workers.on("addModule",(e=>{e.data.url=i.rewriteUrl(e.data.url)})),s.workers.on("importScripts",(e=>{for(const t in e.data.scripts)e.data.scripts[t]=i.rewriteUrl(e.data.scripts[t])})),s.workers.on("postMessage",(e=>{let t=e.data.origin;e.data.origin="*",e.data.message={__data:e.data.message,__origin:i.meta.url.origin,__to:t}})),s.navigator.on("sendBeacon",(e=>{e.data.url=i.rewriteUrl(e.data.url)})),s.document.on("getCookie",(e=>{e.data.value=i.cookieStr})),s.document.on("setCookie",(e=>{Promise.resolve(i.cookie.setCookies(e.data.value,i.db,i.meta)).then((()=>{i.cookie.db().then((e=>{i.cookie.getCookies(e).then((e=>{i.cookieStr=i.cookie.serialize(e,i.meta,!0)}))}))}));const t=i.cookie.setCookie(e.data.value)[0];t.path||(t.path="/"),t.domain||(t.domain=i.meta.url.hostname),i.cookie.validateCookie(t,i.meta,!0)&&(i.cookieStr.length&&(i.cookieStr+="; "),i.cookieStr+=`${t.name}=${t.value}`),e.respondWith(e.data.value)})),s.element.on("setInnerHTML",(e=>{switch(e.that.tagName){case"SCRIPT":e.data.value=i.js.rewrite(e.data.value);break;case"STYLE":e.data.value=i.rewriteCSS(e.data.value);break;default:e.data.value=i.rewriteHtml(e.data.value)}})),s.element.on("getInnerHTML",(e=>{if("SCRIPT"===e.that.tagName)e.data.value=i.js.source(e.data.value);else e.data.value=i.sourceHtml(e.data.value)})),s.element.on("setOuterHTML",(e=>{e.data.value=i.rewriteHtml(e.data.value,{document:"HTML"===e.that.tagName})})),s.element.on("getOuterHTML",(e=>{switch(e.that.tagName){case"HEAD":e.data.value=i.sourceHtml(e.data.value.replace(/<head(.*)>(.*)<\/head>/s,"<op-head$1>$2</op-head>")).replace(/<op-head(.*)>(.*)<\/op-head>/s,"<head$1>$2</head>");break;case"BODY":e.data.value=i.sourceHtml(e.data.value.replace(/<body(.*)>(.*)<\/body>/s,"<op-body$1>$2</op-body>")).replace(/<op-body(.*)>(.*)<\/op-body>/s,"<body$1>$2</body>");break;default:e.data.value=i.sourceHtml(e.data.value,{document:"HTML"===e.that.tagName})}})),s.document.on("write",(e=>{if(!e.data.html.length)return!1;e.data.html=[i.rewriteHtml(e.data.html.join(""))]})),s.document.on("writeln",(e=>{if(!e.data.html.length)return!1;e.data.html=[i.rewriteHtml(e.data.html.join(""))]})),s.element.on("insertAdjacentHTML",(e=>{e.data.html=i.rewriteHtml(e.data.html)})),s.eventSource.on("construct",(e=>{e.data.url=i.rewriteUrl(e.data.url)})),s.eventSource.on("url",(e=>{e.data.url=i.rewriteUrl(e.data.url)})),s.history.on("replaceState",(e=>{e.data.url&&(e.data.url=i.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:i.meta))})),s.history.on("pushState",(e=>{e.data.url&&(e.data.url=i.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:i.meta))})),s.element.on("getAttribute",(e=>{s.element.hasAttribute.call(e.that,i.attributePrefix+"-attr-"+e.data.name)&&e.respondWith(e.target.call(e.that,i.attributePrefix+"-attr-"+e.data.name))})),s.message.on("postMessage",(e=>{let t=e.data.origin,a=i.call;e.that&&(a=e.that.__uv$source.call),e.data.origin="*",e.data.message={__data:e.data.message,__origin:(e.that||e.target).__uv$source.location.origin,__to:t},e.respondWith(a(e.target,o?[e.data.message,e.data.transfer]:[e.data.message,e.data.origin,e.data.transfer],e.that))})),s.message.on("data",(e=>{const{value:t}=e.data;"object"==typeof t&&"__data"in t&&"__origin"in t&&e.respondWith(t.__data)})),s.message.on("origin",(e=>{const t=s.message.messageData.get.call(e.that);"object"==typeof t&&t.__data&&t.__origin&&e.respondWith(t.__origin)})),s.overrideDescriptor(t,"origin",{get:(e,t)=>i.location.origin}),s.node.on("baseURI",(e=>{e.data.value.startsWith(t.location.origin)&&(e.data.value=i.sourceUrl(e.data.value))})),s.element.on("setAttribute",(e=>{if(e.that instanceof d&&"src"===e.data.name&&e.data.value.startsWith("blob:"))return e.target.call(e.that,i.attributePrefix+"-attr-"+e.data.name,e.data.value),void(e.data.value=i.blobUrls.get(e.data.value));i.attrs.isUrl(e.data.name)&&(e.target.call(e.that,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.rewriteUrl(e.data.value)),i.attrs.isStyle(e.data.name)&&(e.target.call(e.that,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.rewriteCSS(e.data.value,{context:"declarationList"})),i.attrs.isHtml(e.data.name)&&(e.target.call(e.that,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.rewriteHtml(e.data.value,{...i.meta,document:!0,injectHead:i.createHtmlInject(i.handlerScript,i.bundleScript,i.configScript,i.cookieStr,t.location.href)})),i.attrs.isSrcset(e.data.name)&&(e.target.call(e.that,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.html.wrapSrcset(e.data.value)),i.attrs.isForbidden(e.data.name)&&(e.data.name=i.attributePrefix+"-attr-"+e.data.name)})),s.element.on("audio",(e=>{e.data.url=i.rewriteUrl(e.data.url)})),s.element.hookProperty([p,_,f,y],"href",{get:(e,t)=>i.sourceUrl(e.call(t)),set:(e,t,[a])=>{s.element.setAttribute.call(t,i.attributePrefix+"-attr-href",a),e.call(t,i.rewriteUrl(a))}}),s.element.hookProperty([c,u,m,d,w,h,v,b,g,P],"src",{get:(e,t)=>i.sourceUrl(e.call(t)),set:(e,t,[a])=>{if(new String(a).toString().trim().startsWith("blob:")&&t instanceof d)return s.element.setAttribute.call(t,i.attributePrefix+"-attr-src",a),e.call(t,i.blobUrls.get(a)||a);s.element.setAttribute.call(t,i.attributePrefix+"-attr-src",a),e.call(t,i.rewriteUrl(a))}}),s.element.hookProperty([S],"action",{get:(e,t)=>i.sourceUrl(e.call(t)),set:(e,t,[a])=>{s.element.setAttribute.call(t,i.attributePrefix+"-attr-action",a),e.call(t,i.rewriteUrl(a))}}),s.element.hookProperty([w],"srcset",{get:(e,t)=>s.element.getAttribute.call(t,i.attributePrefix+"-attr-srcset")||e.call(t),set:(e,t,[a])=>{s.element.setAttribute.call(t,i.attributePrefix+"-attr-srcset",a),e.call(t,i.html.wrapSrcset(a))}}),s.element.hookProperty(c,"integrity",{get:(e,t)=>s.element.getAttribute.call(t,i.attributePrefix+"-attr-integrity"),set:(e,t,[a])=>{s.element.setAttribute.call(t,i.attributePrefix+"-attr-integrity",a)}}),s.element.hookProperty(b,"sandbox",{get:(e,t)=>s.element.getAttribute.call(t,i.attributePrefix+"-attr-sandbox")||e.call(t),set:(e,t,[a])=>{s.element.setAttribute.call(t,i.attributePrefix+"-attr-sandbox",a)}}),s.element.hookProperty(b,"contentWindow",{get:(t,o)=>{const n=t.call(o);try{return n.__uv||e(n,a,r),n}catch(e){return n}}}),s.element.hookProperty(b,"contentDocument",{get:(t,o)=>{const n=t.call(o);try{const t=n.defaultView;return t.__uv||e(t,a,r),n}catch(e){return win}}}),s.element.hookProperty(b,"srcdoc",{get:(e,t)=>s.element.getAttribute.call(t,i.attributePrefix+"-attr-srcdoc")||e.call(t),set:(e,a,[r])=>{e.call(a,i.rewriteHtml(r,{document:!0,injectHead:i.createHtmlInject(i.handlerScript,i.bundleScript,i.configScript,i.cookieStr,t.location.href)}))}}),s.node.on("getTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=i.js.source(e.data.value))})),s.node.on("setTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=i.js.rewrite(e.data.value))})),"serviceWorker"in t.navigator&&delete t.Navigator.prototype.serviceWorker,s.document.on("getDomain",(e=>{e.data.value=i.domain})),s.document.on("setDomain",(e=>{if(!e.data.value.toString().endsWith(i.meta.url.hostname.split(".").slice(-2).join(".")))return e.respondWith("");e.respondWith(i.domain=e.data.value)})),s.document.on("url",(e=>{e.data.value=i.location.href})),s.document.on("documentURI",(e=>{e.data.value=i.location.href})),s.document.on("referrer",(e=>{e.data.value=i.referrer||i.sourceUrl(e.data.value)})),s.document.on("parseFromString",(e=>{if("text/html"!==e.data.type)return!1;e.data.string=i.rewriteHtml(e.data.string,{...i.meta,document:!0})})),s.attribute.on("getValue",(e=>{s.element.hasAttribute.call(e.that.ownerElement,i.attributePrefix+"-attr-"+e.data.name)&&(e.data.value=s.element.getAttribute.call(e.that.ownerElement,i.attributePrefix+"-attr-"+e.data.name))})),s.attribute.on("setValue",(e=>{i.attrs.isUrl(e.data.name)&&(s.element.setAttribute.call(e.that.ownerElement,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.rewriteUrl(e.data.value)),i.attrs.isStyle(e.data.name)&&(s.element.setAttribute.call(e.that.ownerElement,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.rewriteCSS(e.data.value,{context:"declarationList"})),i.attrs.isHtml(e.data.name)&&(s.element.setAttribute.call(e.that.ownerElement,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.rewriteHtml(e.data.value,{...i.meta,document:!0,injectHead:i.createHtmlInject(i.handlerScript,i.bundleScript,i.configScript,i.cookieStr,t.location.href)})),i.attrs.isSrcset(e.data.name)&&(s.element.setAttribute.call(e.that.ownerElement,i.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=i.html.wrapSrcset(e.data.value))})),s.url.on("createObjectURL",(e=>{let a=e.target.call(e.that,e.data.object);if(a.startsWith("blob:"+location.origin)){let r="blob:"+("about:blank"!==i.meta.url.href?i.meta.url.origin:t.parent.__uv.meta.url.origin)+a.slice("blob:".length+location.origin.length);i.blobUrls.set(r,a),e.respondWith(r)}else e.respondWith(a)})),s.url.on("revokeObjectURL",(e=>{if(i.blobUrls.has(e.data.url)){const t=e.data.url;e.data.url=i.blobUrls.get(e.data.url),i.blobUrls.delete(t)}})),s.storage.on("get",(e=>{e.data.name=l+i.meta.url.origin+"@"+e.data.name})),s.storage.on("set",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=l+i.meta.url.origin+"@"+e.data.name})),s.storage.on("delete",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=l+i.meta.url.origin+"@"+e.data.name})),s.storage.on("getItem",(e=>{e.data.name=l+i.meta.url.origin+"@"+e.data.name})),s.storage.on("setItem",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=l+i.meta.url.origin+"@"+e.data.name})),s.storage.on("removeItem",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=l+i.meta.url.origin+"@"+e.data.name})),s.storage.on("clear",(e=>{if(e.that.__uv$storageObj)for(const t of s.nativeMethods.keys.call(null,e.that.__uv$storageObj))delete e.that.__uv$storageObj[t],s.storage.removeItem.call(e.that,l+i.meta.url.origin+"@"+t),e.respondWith()})),s.storage.on("length",(e=>{e.that.__uv$storageObj&&e.respondWith(s.nativeMethods.keys.call(null,e.that.__uv$storageObj).length)})),s.storage.on("key",(e=>{e.that.__uv$storageObj&&e.respondWith(s.nativeMethods.keys.call(null,e.that.__uv$storageObj)[e.data.index]||null)})),s.websocket.on("websocket",(async e=>{let a;try{a=new URL(e.data.url)}catch(e){return}const r={Host:a.host,Origin:i.meta.url.origin,Pragma:"no-cache","Cache-Control":"no-cache",Upgrade:"websocket","User-Agent":t.navigator.userAgent,Connection:"Upgrade"},o=i.cookie.serialize(i.cookies,{url:a},!1);o&&(r.Cookie=o);const n=[...e.data.protocols],l={protocol:a.protocol,host:a.hostname,port:a.port||("wss:"===a.protocol?"443":"80"),path:a.pathname+a.search};n.length&&(r["Sec-WebSocket-Protocol"]=n.join(", ")),e.data.url=("https:"===i.bare.protocol?"wss://":"ws://")+i.bare.host+i.bare.pathname+"v1/",e.data.protocols=["bare",i.encodeProtocol(JSON.stringify({remote:l,headers:r,forward_headers:["accept","accept-encoding","accept-language","sec-websocket-extensions","sec-websocket-key","sec-websocket-version"]}))];const d=new e.target(e.data.url,e.data.protocols);s.nativeMethods.defineProperty(d,"__uv$url",{enumerable:!1,value:a.href}),e.respondWith(d)})),s.websocket.on("url",(e=>{"__uv$url"in e.that&&(e.data.value=e.that.__uv$url)})),s.websocket.on("protocol",(e=>{"__uv$protocol"in e.that&&(e.data.value=e.that.__uv$protocol)})),s.function.on("function",(e=>{e.data.script=i.rewriteJS(e.data.script)})),s.function.on("toString",(e=>{i.methods.string in e.that&&e.respondWith(e.that[i.methods.string])})),s.object.on("getOwnPropertyNames",(e=>{e.data.names=e.data.names.filter((e=>!i.filterKeys.includes(e)))})),s.object.on("getOwnPropertyDescriptors",(e=>{for(const t of i.filterKeys)delete e.data.descriptors[t]})),s.style.on("setProperty",(e=>{s.style.dashedUrlProps.includes(e.data.property)&&(e.data.value=i.rewriteCSS(e.data.value,{context:"value",...i.meta}))})),s.style.on("getPropertyValue",(e=>{s.style.dashedUrlProps.includes(e.data.property)&&e.respondWith(i.sourceCSS(e.target.call(e.that,e.data.property),{context:"value",...i.meta}))})),"CSS2Properties"in t)for(const e of s.style.urlProps)s.overrideDescriptor(t.CSS2Properties.prototype,e,{get:(e,t)=>i.sourceCSS(e.call(t),{context:"value",...i.meta}),set:(e,t,a)=>{e.call(t,i.rewriteCSS(a,{context:"value",...i.meta}))}});else"HTMLElement"in t&&s.overrideDescriptor(t.HTMLElement.prototype,"style",{get:(e,t)=>{const a=e.call(t);if(!a.__uv$modifiedStyle)for(const e of s.style.urlProps)s.nativeMethods.defineProperty(a,e,{enumerable:!0,configurable:!0,get(){const t=s.style.getPropertyValue.call(this,e)||"";return i.sourceCSS(t,{context:"value",...i.meta})},set(t){s.style.setProperty.call(this,s.style.propToDashed[e]||e,i.rewriteCSS(t,{context:"value",...i.meta}))}}),s.nativeMethods.defineProperty(a,"__uv$modifiedStyle",{enumerable:!1,value:!0});return a}});s.style.on("setCssText",(e=>{e.data.value=i.rewriteCSS(e.data.value,{context:"declarationList",...i.meta})})),s.style.on("getCssText",(e=>{e.data.value=i.sourceCSS(e.data.value,{context:"declarationList",...i.meta})})),t.window&&i.addEventListener.call(t,"hashchange",(e=>{if(e.__uv$dispatched)return!1;e.stopImmediatePropagation();const a=t.location.hash;s.history.replaceState.call(t.history,"","",e.oldURL),i.location.hash=a})),s.location.on("hashchange",((e,a,r)=>{if(r.HashChangeEvent&&s.history.replaceState){s.history.replaceState.call(t.history,"","",i.rewriteUrl(a));const o=new r.HashChangeEvent("hashchange",{newURL:a,oldURL:e});s.nativeMethods.defineProperty(o,"__uv$dispatched",{value:!0,enumerable:!1}),i.dispatchEvent.call(t,o)}})),s.fetch.overrideRequest(),s.fetch.overrideUrl(),s.xhr.overrideOpen(),s.xhr.overrideResponseUrl(),s.element.overrideHtml(),s.element.overrideAttribute(),s.element.overrideInsertAdjacentHTML(),s.element.overrideAudio(),s.node.overrideBaseURI(),s.node.overrideTextContent(),s.attribute.overrideNameValue(),s.document.overrideDomain(),s.document.overrideURL(),s.document.overrideDocumentURI(),s.document.overrideWrite(),s.document.overrideReferrer(),s.document.overrideParseFromString(),s.storage.overrideMethods(),s.storage.overrideLength(),s.object.overrideGetPropertyNames(),s.object.overrideGetOwnPropertyDescriptors(),s.history.overridePushState(),s.history.overrideReplaceState(),s.eventSource.overrideConstruct(),s.eventSource.overrideUrl(),s.websocket.overrideWebSocket(),s.websocket.overrideProtocol(),s.websocket.overrideUrl(),s.url.overrideObjectURL(),s.document.overrideCookie(),s.message.overridePostMessage(),s.message.overrideMessageOrigin(),s.message.overrideMessageData(),s.workers.overrideWorker(),s.workers.overrideAddModule(),s.workers.overrideImportScripts(),s.workers.overridePostMessage(),s.style.overrideSetGetProperty(),s.style.overrideCssText(),s.navigator.overrideSendBeacon(),s.function.overrideFunction(),s.function.overrideToString(),s.location.overrideWorkerLocation((e=>new URL(i.sourceUrl(e)))),s.overrideDescriptor(t,"localStorage",{get:(e,a)=>(a||t).__uv.lsWrap}),s.overrideDescriptor(t,"sessionStorage",{get:(e,a)=>(a||t).__uv.ssWrap}),s.override(t,"open",((e,t,a)=>{if(!a.length)return e.apply(t,a);let[r]=a;return r=i.rewriteUrl(r),e.call(t,r)})),i.$wrap=function(e){return"location"===e?i.methods.location:"eval"===e?i.methods.eval:e},i.$get=function(e){return e===t.location?i.location:e===t.eval?i.eval:e===t.parent?t.__uv$parent:e===t.top?t.__uv$top:e},i.eval=s.wrap(t,"eval",((e,t,a)=>{if(!a.length||"string"!=typeof a[0])return e.apply(t,a);let[r]=a;return r=i.rewriteJS(r),e.call(t,r)})),i.call=function(e,t,a){return a?e.apply(a,t):e(...t)},i.call$=function(e,t,a=[]){return e[t].apply(e,a)},s.nativeMethods.defineProperty(t.Object.prototype,n,{get:()=>i,enumerable:!1}),s.nativeMethods.defineProperty(t.Object.prototype,i.methods.setSource,{value:function(e){return s.nativeMethods.isExtensible(this)?(s.nativeMethods.defineProperty(this,i.methods.source,{value:e,writable:!0,enumerable:!1}),this):this},enumerable:!1}),s.nativeMethods.defineProperty(t.Object.prototype,i.methods.source,{value:i,writable:!0,enumerable:!1}),s.nativeMethods.defineProperty(t.Object.prototype,i.methods.location,{configurable:!0,get(){return this===t.document||this===t?i.location:this.location},set(e){this===t.document||this===t?i.location.href=e:this.location=e}}),s.nativeMethods.defineProperty(t.Object.prototype,i.methods.parent,{configurable:!0,get(){const e=this.parent;if(this===t)try{return"__uv"in e?e:this}catch(e){return this}return e},set(e){this.parent=e}}),s.nativeMethods.defineProperty(t.Object.prototype,i.methods.top,{configurable:!0,get(){const e=this.top;if(this===t){if(e===this.parent)return this[i.methods.parent];try{if("__uv"in e)return e;{let t=this;for(;t.parent!==e;)t=t.parent;return"__uv"in t?t:this}}catch(e){return this}}return e},set(e){this.top=e}}),s.nativeMethods.defineProperty(t.Object.prototype,i.methods.eval,{configurable:!0,get(){return this===t?i.eval:this.eval},set(e){this.eval=e}})}self.__uv||e(self,self.__uv$config,self.__uv$config.bare),self.__uvHook=e})();
(()=>{"use strict";const e=globalThis.Ultraviolet;function t(a,r={},o="/bare/"){if("__uv"in a&&a.__uv instanceof e)return!1;a.document&&a.window&&a.document.querySelectorAll("script[__uv-script]").forEach((e=>e.remove()));const n=!a.window,i="__uv",s="__uv$",l=new e({...r,window:a});"function"==typeof r.construct&&r.construct(l,n?"worker":"window");const{client:c}=l,{HTMLMediaElement:d,HTMLScriptElement:u,HTMLAudioElement:h,HTMLVideoElement:m,HTMLInputElement:v,HTMLEmbedElement:p,HTMLTrackElement:g,HTMLAnchorElement:b,HTMLIFrameElement:f,HTMLAreaElement:y,HTMLLinkElement:_,HTMLBaseElement:w,HTMLFormElement:S,HTMLImageElement:k,HTMLSourceElement:P}=a;c.nativeMethods.defineProperty(a,"__uv",{value:l,enumerable:!1}),l.meta.origin=location.origin,l.location=c.location.emulate((e=>"about:srcdoc"===e?new URL(e):(e.startsWith("blob:")&&(e=e.slice("blob:".length)),new URL(l.sourceUrl(e)))),(e=>l.rewriteUrl(e))),l.bareData=a.__uv$bareData,l.cookieStr=a.__uv$cookies||"",l.meta.url=l.location,l.domain=l.meta.url.host,l.blobUrls=new a.Map,l.referrer="",l.cookies=[],l.localStorageObj={},l.sessionStorageObj={};try{l.bare=new URL(o,a.location.href)}catch(e){l.bare=a.parent.__uv.bare}const U=new e.BareClient(l.bare,l.bareData);if("about:srcdoc"===l.location.href&&(l.meta=a.parent.__uv.meta),a.EventTarget&&(l.addEventListener=a.EventTarget.prototype.addEventListener,l.removeListener=a.EventTarget.prototype.removeListener,l.dispatchEvent=a.EventTarget.prototype.dispatchEvent),c.nativeMethods.defineProperty(c.storage.storeProto,"__uv$storageObj",{get(){return this===c.storage.sessionStorage?l.sessionStorageObj:this===c.storage.localStorage?l.localStorageObj:void 0},enumerable:!1}),a.localStorage){for(const e in a.localStorage)e.startsWith(s+l.location.origin+"@")&&(l.localStorageObj[e.slice((s+l.location.origin+"@").length)]=a.localStorage.getItem(e));l.lsWrap=c.storage.emulate(c.storage.localStorage,l.localStorageObj)}if(a.sessionStorage){for(const e in a.sessionStorage)e.startsWith(s+l.location.origin+"@")&&(l.sessionStorageObj[e.slice((s+l.location.origin+"@").length)]=a.sessionStorage.getItem(e));l.ssWrap=c.storage.emulate(c.storage.sessionStorage,l.sessionStorageObj)}let M=a.document?c.node.baseURI.get.call(a.document):a.location.href,x=l.sourceUrl(M);function E(e,t){const a=`on${t}`,r=new WeakMap;Reflect.defineProperty(e,a,{enumerable:!0,configurable:!0,get(){return r.has(this)?r.get(this):null},set(e){return"function"==typeof e&&(r.has(this)&&this.removeEventListener(t,r.get(this)),r.set(this,e),this.addEventListener(t,e)),e}})}c.nativeMethods.defineProperty(l.meta,"base",{get:()=>a.document?(c.node.baseURI.get.call(a.document)!==M&&(M=c.node.baseURI.get.call(a.document),x=l.sourceUrl(M)),x):l.meta.url.href}),l.methods={setSource:"__uv$setSource",source:"__uv$source",location:"__uv$location",function:"__uv$function",string:"__uv$string",eval:"__uv$eval",parent:"__uv$parent",top:"__uv$top"},l.filterKeys=[i,l.methods.setSource,l.methods.source,l.methods.location,l.methods.function,l.methods.string,l.methods.eval,l.methods.parent,l.methods.top,"__uv$protocol","__uv$storageObj","__uv$url","__uv$modifiedStyle","__uv$config","__uv$dispatched","Ultraviolet","__uvHook"],c.on("wrap",((e,t)=>{c.nativeMethods.defineProperty(t,"name",c.nativeMethods.getOwnPropertyDescriptor(e,"name")),c.nativeMethods.defineProperty(t,"length",c.nativeMethods.getOwnPropertyDescriptor(e,"length")),c.nativeMethods.defineProperty(t,l.methods.string,{enumerable:!1,value:c.nativeMethods.fnToString.call(e)}),c.nativeMethods.defineProperty(t,l.methods.function,{enumerable:!1,value:e})})),c.fetch.on("request",(e=>{e.data.input=l.rewriteUrl(e.data.input)})),c.fetch.on("requestUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.fetch.on("responseUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.xhr.on("open",(e=>{e.data.input=l.rewriteUrl(e.data.input)})),c.xhr.on("responseUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.workers.on("worker",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.workers.on("addModule",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.workers.on("importScripts",(e=>{for(const t in e.data.scripts)e.data.scripts[t]=l.rewriteUrl(e.data.scripts[t])})),c.workers.on("postMessage",(e=>{let t=e.data.origin;e.data.origin="*",e.data.message={__data:e.data.message,__origin:l.meta.url.origin,__to:t}})),c.navigator.on("sendBeacon",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.document.on("getCookie",(e=>{e.data.value=l.cookieStr})),c.document.on("setCookie",(e=>{Promise.resolve(l.cookie.setCookies(e.data.value,l.db,l.meta)).then((()=>{l.cookie.db().then((e=>{l.cookie.getCookies(e).then((e=>{l.cookieStr=l.cookie.serialize(e,l.meta,!0)}))}))}));const t=l.cookie.setCookie(e.data.value)[0];t.path||(t.path="/"),t.domain||(t.domain=l.meta.url.hostname),l.cookie.validateCookie(t,l.meta,!0)&&(l.cookieStr.length&&(l.cookieStr+="; "),l.cookieStr+=`${t.name}=${t.value}`),e.respondWith(e.data.value)})),c.element.on("setInnerHTML",(e=>{switch(e.that.tagName){case"SCRIPT":e.data.value=l.js.rewrite(e.data.value);break;case"STYLE":e.data.value=l.rewriteCSS(e.data.value);break;default:e.data.value=l.rewriteHtml(e.data.value)}})),c.element.on("getInnerHTML",(e=>{if("SCRIPT"===e.that.tagName)e.data.value=l.js.source(e.data.value);else e.data.value=l.sourceHtml(e.data.value)})),c.element.on("setOuterHTML",(e=>{e.data.value=l.rewriteHtml(e.data.value,{document:"HTML"===e.that.tagName})})),c.element.on("getOuterHTML",(e=>{switch(e.that.tagName){case"HEAD":e.data.value=l.sourceHtml(e.data.value.replace(/<head(.*)>(.*)<\/head>/s,"<op-head$1>$2</op-head>")).replace(/<op-head(.*)>(.*)<\/op-head>/s,"<head$1>$2</head>");break;case"BODY":e.data.value=l.sourceHtml(e.data.value.replace(/<body(.*)>(.*)<\/body>/s,"<op-body$1>$2</op-body>")).replace(/<op-body(.*)>(.*)<\/op-body>/s,"<body$1>$2</body>");break;default:e.data.value=l.sourceHtml(e.data.value,{document:"HTML"===e.that.tagName})}})),c.document.on("write",(e=>{if(!e.data.html.length)return!1;e.data.html=[l.rewriteHtml(e.data.html.join(""))]})),c.document.on("writeln",(e=>{if(!e.data.html.length)return!1;e.data.html=[l.rewriteHtml(e.data.html.join(""))]})),c.element.on("insertAdjacentHTML",(e=>{e.data.html=l.rewriteHtml(e.data.html)})),c.eventSource.on("construct",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.eventSource.on("url",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.history.on("replaceState",(e=>{e.data.url&&(e.data.url=l.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:l.meta))})),c.history.on("pushState",(e=>{e.data.url&&(e.data.url=l.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:l.meta))})),c.element.on("getAttribute",(e=>{c.element.hasAttribute.call(e.that,l.attributePrefix+"-attr-"+e.data.name)&&e.respondWith(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name))})),c.message.on("postMessage",(e=>{let t=e.data.origin,a=l.call;e.that&&(a=e.that.__uv$source.call),e.data.origin="*",e.data.message={__data:e.data.message,__origin:(e.that||e.target).__uv$source.location.origin,__to:t},e.respondWith(a(e.target,n?[e.data.message,e.data.transfer]:[e.data.message,e.data.origin,e.data.transfer],e.that))})),c.message.on("data",(e=>{const{value:t}=e.data;"object"==typeof t&&"__data"in t&&"__origin"in t&&e.respondWith(t.__data)})),c.message.on("origin",(e=>{const t=c.message.messageData.get.call(e.that);"object"==typeof t&&t.__data&&t.__origin&&e.respondWith(t.__origin)})),c.overrideDescriptor(a,"origin",{get:(e,t)=>l.location.origin}),c.node.on("baseURI",(e=>{e.data.value.startsWith(a.location.origin)&&(e.data.value=l.sourceUrl(e.data.value))})),c.element.on("setAttribute",(e=>{if(e.that instanceof d&&"src"===e.data.name&&e.data.value.startsWith("blob:"))return e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),void(e.data.value=l.blobUrls.get(e.data.value));l.attrs.isUrl(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteUrl(e.data.value)),l.attrs.isStyle(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList"})),l.attrs.isHtml(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteHtml(e.data.value,{...l.meta,document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)})),l.attrs.isSrcset(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.html.wrapSrcset(e.data.value)),l.attrs.isForbidden(e.data.name)&&(e.data.name=l.attributePrefix+"-attr-"+e.data.name)})),c.element.on("audio",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.element.hookProperty([b,y,_,w],"href",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-href",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([u,h,m,d,k,v,p,f,g,P],"src",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{if(new String(a).toString().trim().startsWith("blob:")&&t instanceof d)return c.element.setAttribute.call(t,l.attributePrefix+"-attr-src",a),e.call(t,l.blobUrls.get(a)||a);c.element.setAttribute.call(t,l.attributePrefix+"-attr-src",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([S],"action",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-action",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([k],"srcset",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-srcset")||e.call(t),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-srcset",a),e.call(t,l.html.wrapSrcset(a))}}),c.element.hookProperty(u,"integrity",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-integrity"),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-integrity",a)}}),c.element.hookProperty(f,"sandbox",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-sandbox")||e.call(t),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-sandbox",a)}}),c.element.hookProperty(f,"contentWindow",{get:(e,a)=>{const n=e.call(a);try{return n.__uv||t(n,r,o),n}catch(e){return n}}}),c.element.hookProperty(f,"contentDocument",{get:(e,a)=>{const n=e.call(a);try{const e=n.defaultView;return e.__uv||t(e,r,o),n}catch(e){return win}}}),c.element.hookProperty(f,"srcdoc",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-srcdoc")||e.call(t),set:(e,t,[r])=>{e.call(t,l.rewriteHtml(r,{document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)}))}}),c.node.on("getTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=l.js.source(e.data.value))})),c.node.on("setTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=l.js.rewrite(e.data.value))})),"serviceWorker"in a.navigator&&delete a.Navigator.prototype.serviceWorker,c.document.on("getDomain",(e=>{e.data.value=l.domain})),c.document.on("setDomain",(e=>{if(!e.data.value.toString().endsWith(l.meta.url.hostname.split(".").slice(-2).join(".")))return e.respondWith("");e.respondWith(l.domain=e.data.value)})),c.document.on("url",(e=>{e.data.value=l.location.href})),c.document.on("documentURI",(e=>{e.data.value=l.location.href})),c.document.on("referrer",(e=>{e.data.value=l.referrer||l.sourceUrl(e.data.value)})),c.document.on("parseFromString",(e=>{if("text/html"!==e.data.type)return!1;e.data.string=l.rewriteHtml(e.data.string,{...l.meta,document:!0})})),c.attribute.on("getValue",(e=>{c.element.hasAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name)&&(e.data.value=c.element.getAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name))})),c.attribute.on("setValue",(e=>{l.attrs.isUrl(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteUrl(e.data.value)),l.attrs.isStyle(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList"})),l.attrs.isHtml(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteHtml(e.data.value,{...l.meta,document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)})),l.attrs.isSrcset(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.html.wrapSrcset(e.data.value))})),c.url.on("createObjectURL",(e=>{let t=e.target.call(e.that,e.data.object);if(t.startsWith("blob:"+location.origin)){let r="blob:"+("about:blank"!==l.meta.url.href?l.meta.url.origin:a.parent.__uv.meta.url.origin)+t.slice("blob:".length+location.origin.length);l.blobUrls.set(r,t),e.respondWith(r)}else e.respondWith(t)})),c.url.on("revokeObjectURL",(e=>{if(l.blobUrls.has(e.data.url)){const t=e.data.url;e.data.url=l.blobUrls.get(e.data.url),l.blobUrls.delete(t)}})),c.storage.on("get",(e=>{e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("set",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("delete",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("getItem",(e=>{e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("setItem",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("removeItem",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("clear",(e=>{if(e.that.__uv$storageObj)for(const t of c.nativeMethods.keys.call(null,e.that.__uv$storageObj))delete e.that.__uv$storageObj[t],c.storage.removeItem.call(e.that,s+l.meta.url.origin+"@"+t),e.respondWith()})),c.storage.on("length",(e=>{e.that.__uv$storageObj&&e.respondWith(c.nativeMethods.keys.call(null,e.that.__uv$storageObj).length)})),c.storage.on("key",(e=>{e.that.__uv$storageObj&&e.respondWith(c.nativeMethods.keys.call(null,e.that.__uv$storageObj)[e.data.index]||null)}));const T=["ws:","wss:"];class $ extends EventTarget{#e;#t;#a="blob";#r="";#o="";#n="";async#i(e,t){const a={};Reflect.setPrototypeOf(a,null),a.Origin=l.meta.url.origin,a["User-Agent"]=navigator.userAgent,""!==l.cookieStr&&(a.Cookie=l.cookieStr.toString()),this.#e=await U.createWebSocket(e,a,t),this.#e.binaryType=this.#a,this.#e.addEventListener("message",(e=>{this.dispatchEvent(new MessageEvent("message",e))})),this.#e.addEventListener("open",(async e=>{this.dispatchEvent(new Event("open",e))})),this.#e.addEventListener("error",(e=>{this.dispatchEvent(new ErrorEvent("error",e))})),this.#e.addEventListener("close",(e=>{this.dispatchEvent(new Event("close",e))}));const r=await this.#e.meta;r.headers.has("sec-websocket-protocol")&&(this.#r=r.headers.get("sec-websocket-protocol")),r.headers.has("sec-websocket-extensions")&&(this.#o=r.headers.get("sec-websocket-extensions"));let o=r.rawHeaders["set-cookie"]||[];Array.isArray(o)||(o=[]);for(const e of o)document.cookie=e}get url(){return this.#n}constructor(...e){if(super(),!e.length)throw new DOMException("Failed to construct 'WebSocket': 1 argument required, but only 0 present.");const[t,a]=e;let r;try{r=new URL(t)}catch(e){throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${t}' is invalid.`)}if(!T.includes(r.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${r.protocol}' is not allowed.`);this.#t=this.#i(r,a)}get protocol(){return this.#r}get extensions(){return this.#o}get readyState(){return this.#e?this.#e.readyState:$.CONNECTING}get binaryType(){return this.#a}set binaryType(e){return this.#a=e,this.#e&&(this.#e.binaryType=e),e}send(e){if(!this.#e)throw new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.");this.#e.send(e)}close(e,t){if(void 0!==e&&("number"!=typeof e&&(e=0),1e3!==e&&(e<3e3||e>4999)))throw new DOMException(`Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. ${e} is neither.`);this.#t.then((()=>this.#e.close(e,t)))}}E($.prototype,"close"),E($.prototype,"open"),E($.prototype,"message"),E($.prototype,"error");for(const e of["url","protocol","extensions","readyState","binaryType"]){const t=Object.getOwnPropertyDescriptor(WebSocket.prototype,e),a=Object.getOwnPropertyDescriptor($.prototype,e);a?.get&&t?.get&&c.emit("wrap",a.get,t.get),a?.set&&t?.set&&c.emit("wrap",a.get,t.get)}if(c.emit("wrap",WebSocket.prototype.send,$.prototype.send),c.emit("wrap",WebSocket.prototype.close,$.prototype.close),c.override(a,"WebSocket",((e,t,a)=>new $(...a)),!0),$.prototype.constructor=a.WebSocket,c.function.on("function",(e=>{e.data.script=l.rewriteJS(e.data.script)})),c.function.on("toString",(e=>{l.methods.string in e.that&&e.respondWith(e.that[l.methods.string])})),c.object.on("getOwnPropertyNames",(e=>{e.data.names=e.data.names.filter((e=>!l.filterKeys.includes(e)))})),c.object.on("getOwnPropertyDescriptors",(e=>{for(const t of l.filterKeys)delete e.data.descriptors[t]})),c.style.on("setProperty",(e=>{c.style.dashedUrlProps.includes(e.data.property)&&(e.data.value=l.rewriteCSS(e.data.value,{context:"value",...l.meta}))})),c.style.on("getPropertyValue",(e=>{c.style.dashedUrlProps.includes(e.data.property)&&e.respondWith(l.sourceCSS(e.target.call(e.that,e.data.property),{context:"value",...l.meta}))})),"CSS2Properties"in a)for(const e of c.style.urlProps)c.overrideDescriptor(a.CSS2Properties.prototype,e,{get:(e,t)=>l.sourceCSS(e.call(t),{context:"value",...l.meta}),set:(e,t,a)=>{e.call(t,l.rewriteCSS(a,{context:"value",...l.meta}))}});else"HTMLElement"in a&&c.overrideDescriptor(a.HTMLElement.prototype,"style",{get:(e,t)=>{const a=e.call(t);if(!a.__uv$modifiedStyle)for(const e of c.style.urlProps)c.nativeMethods.defineProperty(a,e,{enumerable:!0,configurable:!0,get(){const t=c.style.getPropertyValue.call(this,e)||"";return l.sourceCSS(t,{context:"value",...l.meta})},set(t){c.style.setProperty.call(this,c.style.propToDashed[e]||e,l.rewriteCSS(t,{context:"value",...l.meta}))}}),c.nativeMethods.defineProperty(a,"__uv$modifiedStyle",{enumerable:!1,value:!0});return a}});c.style.on("setCssText",(e=>{e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList",...l.meta})})),c.style.on("getCssText",(e=>{e.data.value=l.sourceCSS(e.data.value,{context:"declarationList",...l.meta})})),a.window&&l.addEventListener.call(a,"hashchange",(e=>{if(e.__uv$dispatched)return!1;e.stopImmediatePropagation();const t=a.location.hash;c.history.replaceState.call(a.history,"","",e.oldURL),l.location.hash=t})),c.location.on("hashchange",((e,t,r)=>{if(r.HashChangeEvent&&c.history.replaceState){c.history.replaceState.call(a.history,"","",l.rewriteUrl(t));const o=new r.HashChangeEvent("hashchange",{newURL:t,oldURL:e});c.nativeMethods.defineProperty(o,"__uv$dispatched",{value:!0,enumerable:!1}),l.dispatchEvent.call(a,o)}})),c.fetch.overrideRequest(),c.fetch.overrideUrl(),c.xhr.overrideOpen(),c.xhr.overrideResponseUrl(),c.element.overrideHtml(),c.element.overrideAttribute(),c.element.overrideInsertAdjacentHTML(),c.element.overrideAudio(),c.node.overrideBaseURI(),c.node.overrideTextContent(),c.attribute.overrideNameValue(),c.document.overrideDomain(),c.document.overrideURL(),c.document.overrideDocumentURI(),c.document.overrideWrite(),c.document.overrideReferrer(),c.document.overrideParseFromString(),c.storage.overrideMethods(),c.storage.overrideLength(),c.object.overrideGetPropertyNames(),c.object.overrideGetOwnPropertyDescriptors(),c.history.overridePushState(),c.history.overrideReplaceState(),c.eventSource.overrideConstruct(),c.eventSource.overrideUrl(),c.url.overrideObjectURL(),c.document.overrideCookie(),c.message.overridePostMessage(),c.message.overrideMessageOrigin(),c.message.overrideMessageData(),c.workers.overrideWorker(),c.workers.overrideAddModule(),c.workers.overrideImportScripts(),c.workers.overridePostMessage(),c.style.overrideSetGetProperty(),c.style.overrideCssText(),c.navigator.overrideSendBeacon(),c.function.overrideFunction(),c.function.overrideToString(),c.location.overrideWorkerLocation((e=>new URL(l.sourceUrl(e)))),c.overrideDescriptor(a,"localStorage",{get:(e,t)=>(t||a).__uv.lsWrap}),c.overrideDescriptor(a,"sessionStorage",{get:(e,t)=>(t||a).__uv.ssWrap}),c.override(a,"open",((e,t,a)=>{if(!a.length)return e.apply(t,a);let[r]=a;return r=l.rewriteUrl(r),e.call(t,r)})),l.$wrap=function(e){return"location"===e?l.methods.location:"eval"===e?l.methods.eval:e},l.$get=function(e){return e===a.location?l.location:e===a.eval?l.eval:e===a.parent?a.__uv$parent:e===a.top?a.__uv$top:e},l.eval=c.wrap(a,"eval",((e,t,a)=>{if(!a.length||"string"!=typeof a[0])return e.apply(t,a);let[r]=a;return r=l.rewriteJS(r),e.call(t,r)})),l.call=function(e,t,a){return a?e.apply(a,t):e(...t)},l.call$=function(e,t,a=[]){return e[t].apply(e,a)},c.nativeMethods.defineProperty(a.Object.prototype,i,{get:()=>l,enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.setSource,{value:function(e){return c.nativeMethods.isExtensible(this)?(c.nativeMethods.defineProperty(this,l.methods.source,{value:e,writable:!0,enumerable:!1}),this):this},enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.source,{value:l,writable:!0,enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.location,{configurable:!0,get(){return this===a.document||this===a?l.location:this.location},set(e){this===a.document||this===a?l.location.href=e:this.location=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.parent,{configurable:!0,get(){const e=this.parent;if(this===a)try{return"__uv"in e?e:this}catch(e){return this}return e},set(e){this.parent=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.top,{configurable:!0,get(){const e=this.top;if(this===a){if(e===this.parent)return this[l.methods.parent];try{if("__uv"in e)return e;{let t=this;for(;t.parent!==e;)t=t.parent;return"__uv"in t?t:this}}catch(e){return this}}return e},set(e){this.top=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.eval,{configurable:!0,get(){return this===a?l.eval:this.eval},set(e){this.eval=e}})}self.__uv||t(self,self.__uv$config,self.__uv$config.bare),self.__uvHook=t})();

@@ -1,1 +0,1 @@

(()=>{"use strict";class e extends u{constructor(e=__uv$config){super(),e.bare||(e.bare="/bare/"),this.addresses="string"==typeof e.bare?[new URL(e.bare,location)]:e.bare.map((e=>new URL(e,location))),this.headers={csp:["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection"],forward:["accept-encoding","connection","content-length"]},this.method={empty:["GET","HEAD"]},this.statusCode={empty:[204,304]},this.config=e,this.browser=Ultraviolet.Bowser.getParser(self.navigator.userAgent).getBrowserName(),"Firefox"===this.browser&&(this.headers.forward.push("user-agent"),this.headers.forward.push("content-type"))}async fetch({request:e}){if(!e.url.startsWith(location.origin+(this.config.prefix||"/service/")))return fetch(e);try{const n=new Ultraviolet(this.config);"function"==typeof this.config.construct&&this.config.construct(n,"service");const i=await n.cookie.db();n.meta.origin=location.origin,n.meta.base=n.meta.url=new URL(n.sourceUrl(e.url));const o=new r(e,this,n,this.method.empty.includes(e.method.toUpperCase())?null:await e.blob());if("blob:"===n.meta.url.protocol&&(o.blob=!0,o.base=o.url=new URL(o.url.pathname)),e.referrer&&e.referrer.startsWith(location.origin)){const t=new URL(n.sourceUrl(e.referrer));(o.headers.origin||n.meta.url.origin!==t.origin&&"cors"===e.mode)&&(o.headers.origin=t.origin),o.headers.referer=t.href}const a=await n.cookie.getCookies(i)||[],u=n.cookie.serialize(a,n.meta,!1);"Firefox"===this.browser&&"iframe"!==e.destination&&"document"!==e.destination&&o.forward.shift(),u&&(o.headers.cookie=u),o.headers.Host=o.url.host;const h=new s(o,null,null);if(this.emit("request",h),h.intercepted)return h.returnValue;const c=await fetch(o.send);if(500===c.status)return Promise.reject("");const l=new t(o,c,this),d=new s(l,null,null);if(this.emit("beforemod",d),d.intercepted)return d.returnValue;for(const e of this.headers.csp)l.headers[e]&&delete l.headers[e];if(l.headers.location&&(l.headers.location=n.rewriteUrl(l.headers.location)),l.headers["set-cookie"]&&(Promise.resolve(n.cookie.setCookies(l.headers["set-cookie"],i,n.meta)).then((()=>{self.clients.matchAll().then((function(e){e.forEach((function(e){e.postMessage({msg:"updateCookies",url:n.meta.url.href})}))}))})),delete l.headers["set-cookie"]),l.body)switch(e.destination){case"script":case"worker":l.body=`if (!self.__uv && self.importScripts) importScripts('${__uv$config.bundle}', '${__uv$config.config}', '${__uv$config.handler}');\n`,l.body+=n.js.rewrite(await c.text());break;case"style":l.body=n.rewriteCSS(await c.text());break;case"iframe":case"document":(function(e,t=""){return"text/html"===(Ultraviolet.mime.contentType(t||e.pathname)||"text/html").split(";")[0]})(n.meta.url,l.headers["content-type"]||"")&&(l.body=n.rewriteHtml(await c.text(),{document:!0,injectHead:n.createHtmlInject(this.config.handler,this.config.bundle,this.config.config,n.cookie.serialize(a,n.meta,!0),e.referrer)}))}return"text/event-stream"===o.headers.accept&&(l.headers["content-type"]="text/event-stream"),this.emit("response",d),d.intercepted?d.returnValue:new Response(l.body,{headers:l.headers,status:l.status,statusText:l.statusText})}catch(e){return new Response(e.toString(),{status:500})}}getBarerResponse(e){const t={},r=JSON.parse(e.headers.get("x-bare-headers"));for(const e in r)t[e.toLowerCase()]=r[e];return{headers:t,status:+e.headers.get("x-bare-status"),statusText:e.headers.get("x-bare-status-text"),body:this.statusCode.empty.includes(+e.headers.get("x-bare-status"))?null:e.body}}get address(){return this.addresses[Math.floor(Math.random()*this.addresses.length)]}static Ultraviolet=Ultraviolet}self.UVServiceWorker=e;class t{constructor(e,t,r){const{headers:s,status:n,statusText:i,body:o}=e.blob?{status:t.status,statusText:t.statusText,headers:Object.fromEntries([...t.headers.entries()]),body:t.body}:r.getBarerResponse(t);this.request=e,this.raw=t,this.ultraviolet=e.ultraviolet,this.headers=s,this.status=n,this.statusText=i,this.body=o}get url(){return this.request.url}get base(){return this.request.base}set base(e){this.request.base=e}}class r{constructor(e,t,r,s=null){this.ultraviolet=r,this.request=e,this.headers=Object.fromEntries([...e.headers.entries()]),this.method=e.method,this.forward=[...t.headers.forward],this.address=t.address,this.body=s||null,this.redirect=e.redirect,this.credentials="omit",this.mode="cors"===e.mode?e.mode:"same-origin",this.blob=!1}get send(){return new Request(this.blob?"blob:"+location.origin+this.url.pathname:this.address.href+"v1/",{method:this.method,headers:{"x-bare-protocol":this.url.protocol,"x-bare-host":this.url.hostname,"x-bare-path":this.url.pathname+this.url.search,"x-bare-port":this.url.port||("https:"===this.url.protocol?"443":"80"),"x-bare-headers":JSON.stringify(this.headers),"x-bare-forward-headers":JSON.stringify(this.forward)},redirect:this.redirect,credentials:this.credentials,mode:location.origin!==this.address.origin?"cors":this.mode,body:this.body})}get url(){return this.ultraviolet.meta.url}set url(e){this.ultraviolet.meta.url=e}get base(){return this.ultraviolet.meta.base}set base(e){this.ultraviolet.meta.base=e}}class s{#e;#t;constructor(e={},t=null,r=null){this.#e=!1,this.#t=null,this.data=e,this.target=t,this.that=r}get intercepted(){return this.#e}get returnValue(){return this.#t}respondWith(e){this.#t=e,this.#e=!0}}var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var h=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function d(e,t,r,s){var n,i,o,a;if(c(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=s?[r,o]:[o,r]:s?o.unshift(r):o.push(r),(n=l(e))>0&&o.length>n&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=f.bind(s);return n.listener=r,s.wrapFn=n,n}function v(e,t,r){var s=e._events;if(void 0===s)return[];var n=s[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):g(n,n.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),s=0;s<t;++s)r[s]=e[s];return r}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");h=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return l(this)},u.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,n=this._events;if(void 0!==n)s=s&&void 0===n.error;else if(!s)return!1;if(s){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var u=n[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var h=u.length,c=g(u,h);for(r=0;r<h;++r)o(c[r],this,t)}return!0},u.prototype.addListener=function(e,t){return d(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return d(this,e,t,!0)},u.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},u.prototype.removeListener=function(e,t){var r,s,n,i,o;if(c(t),void 0===(s=this._events))return this;if(void 0===(r=s[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,n=i;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(s[e]=r[0]),void 0!==s.removeListener&&this.emit("removeListener",e,o||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,r,s;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,i=Object.keys(r);for(s=0;s<i.length;++s)"removeListener"!==(n=i[s])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this},u.prototype.listeners=function(e){return v(this,e,!0)},u.prototype.rawListeners=function(e){return v(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},u.prototype.listenerCount=m,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}})();
(()=>{"use strict";const e=globalThis.Ultraviolet,t=["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection"],r=["GET","HEAD"];self.UVServiceWorker=class extends l{constructor(t=__uv$config){super(),t.bare||(t.bare="/bare/"),t.prefix||(t.prefix="/service/"),this.addresses="string"==typeof t.bare?[new URL(t.bare,location)]:t.bare.map((e=>new URL(e,location))),this.config=t,this.client=new e.BareClient(new URL(this.config.bare,location.toString())),this.browser=e.Bowser.getParser(self.navigator.userAgent).getBrowserName()}async fetch({request:o}){if(!o.url.startsWith(location.origin+this.config.prefix))return fetch(o);try{const a=new e(this.config);"function"==typeof this.config.construct&&this.config.construct(a,"service");const u=await a.cookie.db();a.meta.origin=location.origin,a.meta.base=a.meta.url=new URL(a.sourceUrl(o.url));const c=new i(o,this,a,r.includes(o.method.toUpperCase())?null:await o.blob());if("blob:"===a.meta.url.protocol&&(c.blob=!0,c.base=c.url=new URL(c.url.pathname)),o.referrer&&o.referrer.startsWith(location.origin)){const e=new URL(a.sourceUrl(o.referrer));(c.headers.origin||a.meta.url.origin!==e.origin&&"cors"===o.mode)&&(c.headers.origin=e.origin),c.headers.referer=e.href}const l=await a.cookie.getCookies(u)||[],h=a.cookie.serialize(l,a.meta,!1);"Firefox"===this.browser&&"iframe"!==o.destination&&"document"!==o.destination&&c.forward.shift(),h&&(c.headers.cookie=h),c.headers.Host=c.url.host;const f=new s(c,null,null);if(this.emit("request",f),f.intercepted)return f.returnValue;const d=await this.client.fetch(c.blob?"blob:"+location.origin+c.url.pathname:c.url,{headers:c.headers,method:c.method,body:c.body,credentials:c.credentials,mode:location.origin!==c.address.origin?"cors":c.mode,redirect:c.redirect});if(500===d.status)return Promise.reject("");const p=new n(c,d),v=new s(p,null,null);if(this.emit("beforemod",v),v.intercepted)return v.returnValue;for(const e of t)p.headers[e]&&delete p.headers[e];if(p.headers.location&&(p.headers.location=a.rewriteUrl(p.headers.location)),p.headers["set-cookie"]&&(Promise.resolve(a.cookie.setCookies(p.headers["set-cookie"],u,a.meta)).then((()=>{self.clients.matchAll().then((function(e){e.forEach((function(e){e.postMessage({msg:"updateCookies",url:a.meta.url.href})}))}))})),delete p.headers["set-cookie"]),p.body)switch(o.destination){case"script":case"worker":p.body=`if (!self.__uv && self.importScripts) importScripts('${__uv$config.bundle}', '${__uv$config.config}', '${__uv$config.handler}');\n`,p.body+=a.js.rewrite(await d.text());break;case"style":p.body=a.rewriteCSS(await d.text());break;case"iframe":case"document":(function(t,r=""){return"text/html"===(e.mime.contentType(r||t.pathname)||"text/html").split(";")[0]})(a.meta.url,p.headers["content-type"]||"")&&(p.body=a.rewriteHtml(await d.text(),{document:!0,injectHead:a.createHtmlInject(this.config.handler,this.config.bundle,this.config.config,this.client.data,a.cookie.serialize(l,a.meta,!0),o.referrer)}))}return"text/event-stream"===c.headers.accept&&(p.headers["content-type"]="text/event-stream"),this.emit("response",v),v.intercepted?v.returnValue:new Response(p.body,{headers:p.headers,status:p.status,statusText:p.statusText})}catch(e){return new Response(e.toString(),{status:500})}}get address(){return this.addresses[Math.floor(Math.random()*this.addresses.length)]}static Ultraviolet=e};class n{constructor(e,t){this.request=e,this.raw=t,this.ultraviolet=e.ultraviolet,this.headers=Object.fromEntries(t.headers.entries()),this.status=t.status,this.statusText=t.statusText,this.body=t.body}get url(){return this.request.url}get base(){return this.request.base}set base(e){this.request.base=e}}class i{constructor(e,t,r,n=null){this.ultraviolet=r,this.request=e,this.headers=Object.fromEntries(e.headers.entries()),this.method=e.method,this.address=t.address,this.body=n||null,this.redirect=e.redirect,this.credentials="omit",this.mode="cors"===e.mode?e.mode:"same-origin",this.blob=!1}get url(){return this.ultraviolet.meta.url}set url(e){this.ultraviolet.meta.url=e}get base(){return this.ultraviolet.meta.base}set base(e){this.ultraviolet.meta.base=e}}class s{#e;#t;constructor(e={},t=null,r=null){this.#e=!1,this.#t=null,this.data=e,this.target=t,this.that=r}get intercepted(){return this.#e}get returnValue(){return this.#t}respondWith(e){this.#t=e,this.#e=!0}}var o,a="object"==typeof Reflect?Reflect:null,u=a&&"function"==typeof a.apply?a.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};o=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function p(e,t,r,n){var i,s,o,a;if(f(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=d(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,a=u,console&&console.warn&&console.warn(a)}return e}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=v.bind(n);return i.listener=r,n.wrapFn=i,i}function g(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):b(i,i.length)}function y(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function b(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");h=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)u(a,this,t);else{var c=a.length,l=b(a,c);for(r=0;r<c;++r)u(l[r],this,t)}return!0},l.prototype.addListener=function(e,t){return p(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return p(this,e,t,!0)},l.prototype.once=function(e,t){return f(t),this.on(e,m(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,m(this,e,t)),this},l.prototype.removeListener=function(e,t){var r,n,i,s,o;if(f(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},l.prototype.listeners=function(e){return g(this,e,!0)},l.prototype.rawListeners=function(e){return g(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},l.prototype.listenerCount=y,l.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]}})();
{
"name": "@titaniumnetwork-dev/ultraviolet",
"version": "1.0.3",
"description": "Proxy",
"main": "lib/index.cjs",
"scripts": {
"build": "cross-env NODE_ENV=production webpack-cli",
"build:dev": "cross-env NODE_ENV=development webpack-cli",
"build:watch": "cross-env NODE_ENV=development webpack-cli --watch"
},
"author": "",
"license": "MIT",
"type": "module",
"dependencies": {
"bowser": "^2.11.0",
"css-tree": "^2.0.4",
"esotope-hammerhead": "^0.6.1",
"idb": "^7.0.0",
"meriyah": "^4.2.0",
"mime-db": "^1.51.0",
"parse5": "^6.0.1",
"set-cookie-parser": "^2.4.8"
},
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.8.0",
"terser-webpack-plugin": "^5.3.6",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"files": [
"dist",
"lib"
]
"name": "@titaniumnetwork-dev/ultraviolet",
"version": "1.0.4-beta",
"description": "Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more!",
"main": "lib/index.cjs",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/titaniumnetwork-dev/Ultraviolet.git"
},
"files": [
"dist",
"lib"
],
"type": "module",
"scripts": {
"build": "cross-env NODE_ENV=production webpack-cli",
"build:dev": "cross-env NODE_ENV=development webpack-cli",
"build:watch": "cross-env NODE_ENV=development webpack-cli --watch"
},
"dependencies": {
"@tomphttp/bare-client": "^1.1.2-beta",
"bowser": "^2.11.0",
"css-tree": "^2.0.4",
"esotope-hammerhead": "^0.6.1",
"idb": "^7.0.0",
"meriyah": "^4.2.0",
"mime-db": "^1.51.0",
"parse5": "^6.0.1",
"set-cookie-parser": "^2.4.8"
},
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.8.0",
"prettier": "^2.7.1",
"terser-webpack-plugin": "^5.3.6",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
}
}

@@ -1,5 +0,7 @@

<p align="center"><img src="https://raw.githubusercontent.com/titaniumnetwork-development/Ultraviolet-Static/main/public/uv.png" height="200"></p>
<p align="center"><img src="https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png" height="200"></p>
<h1 align="center">Ultraviolet</h1>
<a href="https://www.npmjs.com/package/@titaniumnetwork-dev/ultraviolet"><img src="https://img.shields.io/npm/v/@titaniumnetwork-dev/ultraviolet.svg?maxAge=3600" alt="npm version" /></a>
Advanced web proxy used for evading internet censorship or accessing websites in a controlled sandbox.

@@ -13,3 +15,3 @@

Documentation can be found in the [wiki](https://github.com/titaniumnetwork-development/Ultraviolet/wiki).
Documentation can be found in the [wiki](https://github.com/titaniumnetwork-dev/Ultraviolet/wiki).

@@ -20,9 +22,9 @@ ## How do I deploy/run this?

See [Ultraviolet-Node](https://github.com/titaniumnetwork-development/Ultraviolet-Node) for easy instructions to deploy an Ultraviolet website.
See [Ultraviolet-Node](https://github.com/titaniumnetwork-dev/Ultraviolet-Node) for easy instructions to deploy an Ultraviolet website.
An example of REALLY using this (API, copying files, etc) is in [Ultraviolet-Static](https://github.com/titaniumnetwork-development/Ultraviolet-Static). See [scripts/build.js](https://github.com/titaniumnetwork-development/Ultraviolet-Static/blob/main/scripts/build.js).
An example of REALLY using this (API, copying files, etc) is in [Ultraviolet-Static](https://github.com/titaniumnetwork-dev/Ultraviolet-Static). See [scripts/build.js](https://github.com/titaniumnetwork-dev/Ultraviolet-Static/blob/main/scripts/build.js).
## I don't care about building, where are the scripts for my website?!
You can extract the scripts from the NPM package in the [releases section](https://github.com/titaniumnetwork-development/Ultraviolet/releases). All the scripts you would typically look for (`uv.bundle.js`, `uv.handler.js`, `uv.sw.js`, and `uv.config.js`) are found within the `dist` directory.
You can extract the scripts from the NPM package in the [releases section](https://github.com/titaniumnetwork-dev/Ultraviolet/releases). All the scripts you would typically look for (`uv.bundle.js`, `uv.handler.js`, `uv.sw.js`, and `uv.config.js`) are found within the `dist` directory.

@@ -35,6 +37,6 @@ If you cannot open the tar.gz (Chrome OS?), use a [converter](https://cloudconvert.com/tar.gz-to-zip). We can only do so much to make the scripts accessible.

Currently, we don't have an NPM package. As a current solution, you can install from a [GitHub release](https://github.com/titaniumnetwork-development/Ultraviolet/releases). Copy the link to the `.tgz` and install using NPM.
Currently, we don't have an NPM package. As a current solution, you can install from a [GitHub release](https://github.com/titaniumnetwork-dev/Ultraviolet/releases). Copy the link to the `.tgz` and install using NPM.
```sh
$ npm install https://github.com/titaniumnetwork-development/Ultraviolet/releases/download/v1.0.1/ultraviolet-1.0.1.tgz
$ npm install https://github.com/titaniumnetwork-dev/Ultraviolet/releases/download/v1.0.1/ultraviolet-1.0.1.tgz
```

@@ -47,3 +49,3 @@

```sh
$ git clone https://github.com/titaniumnetwork-development/Ultraviolet.git
$ git clone https://github.com/titaniumnetwork-dev/Ultraviolet.git
> Cloning into Ultraviolet...

@@ -50,0 +52,0 @@ $ cd Ultraviolet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc