3 lines
64 KiB
JavaScript
3 lines
64 KiB
JavaScript
!function(){function e(e,t){function r(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ee(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function t(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function r(e){return"string"==typeof e?e.replace(/(^\s+)|(\s+$)/g,""):e}function o(e){var t={};if(!e)return t;for(var r=0,o=Fe;r<o.length;r++){var n=o[r],i=n.name,s=n.flag;e.indexOf(s)>-1&&(t[i]=!0)}return t}function n(e){if(!e)return null;for(var t="",r=0,o=Fe;r<o.length;r++){var n=o[r],i=n.name,s=n.flag;e[i]&&(t+=s)}return t||null}function i(e){return"null"===e?"":e.replace(Le,function(e,t){return t?"s*":""})}function s(e){return e?He.test(e)?e.replace(He,"https://"):"http://"+e:"null"}function a(e,t){if(!t)return!0;var r=d(t),o=!r.host;if(o)return!0;var n=d(e),i=m(e);if(r.host===n.host&&r.protocol===n.protocol)return!0;var s=i?i.destResourceInfo:n;if(!s)return!1;var a=!r.protocol||r.protocol===s.protocol,c=!s.port&&!r.port||s.port&&s.port.toString()===r.port;return a&&!!c&&s.hostname===r.hostname}function c(e){var t=d(e);return t.protocol=t.protocol&&t.protocol.toLowerCase(),t.host=t.host&&t.host.toLowerCase(),f(t)}function p(e){return null===e&&/iPad|iPhone/i.test(window.navigator.userAgent)?"":String(e).replace(/[\n\t]/g,"")}function l(e,t){var r=[t.sessionId];t.windowId&&r.push(t.windowId);var o=[r.join(Ae)];t.resourceType&&o.push(t.resourceType),t.charset&&o.push(t.charset.toLowerCase()),"number"==typeof t.credentials&&o.push(t.credentials.toString()),t.reqOrigin&&o.push(encodeURIComponent(i(t.reqOrigin)));var n=o.join(je),s=t.proxyProtocol||"http:";return"".concat(s,"//").concat(t.proxyHostname,":").concat(t.proxyPort,"/").concat(n,"/").concat(c(e))}function h(e){return"file:"===e.protocol?"null":f({protocol:e.protocol,host:e.host,hostname:e.hostname,port:String(e.port||"")})}function u(e){var t=e.split(je),r=t[0],n=t[1],i=t.slice(2);if(!r)return null;var a=r.split(Ae),c=a[0],p=a[1],l={sessionId:c,resourceType:n||null};if(p&&(l.windowId=p),n&&i.length){var h=o(n);h.isScript||h.isServiceWorker?l.charset=i[0]:h.isWebSocket?l.reqOrigin=decodeURIComponent(s(i[0])):h.isIframe&&i[0]?l.reqOrigin=decodeURIComponent(s(i[0])):h.isAjax&&(l.credentials=parseInt(i[0],10),2===i.length&&(l.reqOrigin=decodeURIComponent(s(i[1]))))}return l}function m(e){var t=d(e);if(!t.partAfterHost)return null;var r=t.partAfterHost.match(De);if(!r)return null;var o=u(r[1]);if(!o)return null;var n=r[2],i=n.replace(/#[\S\s]*$/,"");if(!b(i)&&!Me.test(n))return null;var s;return b(i)?s=We:(n=T(n),s=d(n)),{destUrl:n,destResourceInfo:s,partAfterHost:t.partAfterHost,proxy:{hostname:t.hostname||"",port:t.port||""},sessionId:o.sessionId,resourceType:o.resourceType,charset:o.charset,reqOrigin:o.reqOrigin,windowId:o.windowId,credentials:o.credentials}}function d(e){if(e=S(e),!e)return{};var t=e.match(Pe);return t?{protocol:t[1],auth:t[2],host:t[3],hostname:t[4],port:t[5],partAfterHost:t[6]}:{}}function y(e){e=r(e||"");var t=Re.test(e);if(t)return!1;var o=e.match(Te);return!o||Me.test(o[0])}function g(e,t,r){if(void 0===r&&(r=!1),r)return v(g,e,t);if(t=t||l,y(e)){var o=t(e),n=m(o);return n?f(n.destResourceInfo):e}return e}function f(e){if(!("file:"===e.protocol||"about:"===e.protocol||e.host||e.hostname&&e.port))return e.partAfterHost||"";var t=e.protocol||"";return"about:"!==e.protocol&&(t+="//"),e.auth&&(t+=e.auth+"@"),e.host?t+=e.host:e.hostname&&(t+=e.hostname,e.port&&(t+=":"+e.port)),e.partAfterHost&&(t+=e.partAfterHost),t}function v(e,r){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];for(var i=r.split(","),s=[],a=0,c=i;a<c.length;a++){var p=c[a],l=p.replace(/ +/g," ").trim().split(" "),h=l[0],u=l[1];if(h){var m=e.apply(void 0,t([h],o,!1));s.push(m+(u?" ".concat(u):""))}}return s.join(",")}function w(e,t){return void 0===t&&(t=""),e.match(xe)||t.match(xe)?e.replace(/^(file:)?\/+(\/\/\/.*$)/i,"$1$2").replace(/^(file:)?\/*([A-Za-z]):/i,"$1///$2:"):e.replace(/^(https?:)?\/+(\/\/.*$)/i,"$1$2")}function S(e){return w(p(e))}function O(e,t){if(!P(t))return t;var r=Ge.test(e),o=Ge.test(t);return r&&!o?t+="/":e&&!r&&o&&(t=t.replace(Ge,"")),t}function b(e){return Ie.indexOf(e)!==-1}function E(e){var t=parseInt(e,10);return t>0&&t<=65535}function P(e){var t=d(e);return"file:"===t.protocol||"about:"===t.protocol||!!t.hostname&&(!t.port||E(t.port))}function T(e){var t=d(e),r="https:"===t.protocol&&t.port===ke||"http:"===t.protocol&&t.port===_e;return r?(t.host=t.hostname,t.port="",f(t)):e}function D(e,t,r){if(r&&e[t]){var o=e[t].toString();r.toString=function(){return o}}e[t]=r}function x(e,t,r){var o=r.getter,n=r.setter,i=r.value,s=rt.objectGetOwnPropertyDescriptor(e,t);if((o||n)&&i)throw new Error("Cannot both specify accessors and a value or writable attribute.");if(s)return i?(rt.objectHasOwnProperty.call(s,"writable")||(s.writable=!!s.set,delete s.get,delete s.set),s.value=i):(rt.objectHasOwnProperty.call(s,"writable")&&(delete s.value,delete s.writable),null!==o&&D(s,"get",o),null!==n&&D(s,"set",n)),s}function L(e,t,r){if(e){var o=x(e,t,r);o?rt.objectDefineProperty(e,t,o):L(rt.objectGetPrototypeOf(e),t,r)}}function H(e,t){var r=rt.objectGetOwnPropertyDescriptor(e,"name");r&&(r.value=t,rt.objectDefineProperty(e,"name",r))}function M(e,t){rt.objectDefineProperty(e,qe.nativeStrRepresentation,{value:rt.Function.prototype.toString.call(t),configurable:!0})}function R(e,t){H(e,t.name),M(e,t)}function j(e){return!rt.objectHasOwnProperty.call(e,qe.nativeStrRepresentation)}function A(e,t,r){var o=e[t];j(o)&&(R(r,o),e[t]=r)}function G(e,t,r,o){void 0===o&&(o=!1);var n=e[t].prototype;A(e,t,r),r.prototype=n,o&&(n.constructor=r)}function C(e){var t={exports:{}};return e(t,t.exports),t.exports}function N(e){return"function"==typeof e}function I(e){return ot?e&&"object"==typeof e?rt.objectToString.call(rt.objectGetPrototypeOf(e)):"":rt.objectToString.call(e)}function _(e){var t=null;try{t=rt.contentDocumentGetter.call(e).location.href}catch(r){t=null}var o=rt.getAttribute.call(e,"src"+Be.storedAttrPostfix)||rt.getAttribute.call(e,"src")||rt.iframeSrcGetter.call(e),n=t&&ie(t)&&wt(t),i=o&&ie(o)&&wt(o);return{documentLocation:n?n.destUrl:t,srcLocation:i?i.destUrl:o}}function k(e){try{return e.frameElement}catch(t){return null}}function W(e){if(e.documentElement)return e;if(e.ownerDocument&&e.ownerDocument.defaultView)return e.ownerDocument;var t=X(e)&&rt.nodeParentNodeGetter.call(e);return t?W(t):document}function F(e){for(var t=rt.nodeParentNodeGetter.call(e);t&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t=rt.nodeParentNodeGetter.call(t);return t&&t[ct]}function q(e,t){var r=t||document;if(!r.documentElement)return!1;if(r.documentElement.contains(e))return!0;var o=F(e);return!!o&&q(o)}function B(e){var t=_(e),r=t.srcLocation,o=t.documentLocation;if(null===o)return!1;if(rt.contentWindowGetter.call(e)[qe.documentWasCleaned])return!0;var n=ie(o);return!n&&!rt.getAttribute.call(e,"src")||(!r||!ie(r))&&!n}function U(e){return!!(rt.Headers&&e instanceof rt.Headers)||e&&"[object Headers]"===I(e)}function V(e){return!!(rt.Request&&e instanceof rt.Request)||e&&"[object Request]"===I(e)}function X(e){return e&&e.nodeType===at}function $(){if(mt)return mt;var e=k(Xe.global);return e&&B(e)?ut.get().referer:Xe.global.location.toString()}function z(e){mt=e}function Q(e,t){return t&&(t=K(t)),ut.get().disableCrossDomain||a(e,t)}function K(e,t){var r=p(e);if(r&&0===r.indexOf("//")){var o=Y().protocol;r=o+w(r,o)}else r=w(r);return Xe.isInWorker?"blob:"!==self.location.protocol?new rt.URL(r,dt()).href:String(e):lt.resolve(r,t||document)}function J(e){var t=lt.getResolverElement(document),r=d(e).port;rt.anchorHrefSetter.call(t,dt());var o=rt.anchorHostnameGetter.call(t),n=rt.anchorPathnameGetter.call(t);return"/"!==n.charAt(0)&&(n="/"+n),{protocol:rt.anchorProtocolGetter.call(t),port:r?rt.anchorPortGetter.call(t):"",hostname:o,host:r?rt.anchorHostGetter.call(t):o,pathname:n,hash:t.hash,search:rt.anchorSearchGetter.call(t)}}function Z(e){var t=new rt.URL(e);return{protocol:t.protocol,port:t.port,hostname:t.hostname,host:t.host,pathname:t.pathname,hash:t.hash,search:t.search}}function Y(){var e=dt();return Xe.isInWorker?Z(e):J(e)}function ee(){return h(Y())}function te(e){return e.isScript||e.isServiceWorker?self.document&&document[qe.documentCharset]||null:null}function re(e){return ut.get().crossDomainProxyPort===e?location.port.toString():ut.get().crossDomainProxyPort}function oe(e){return d(e)}function ne(e){var t=vt(e);return yt.test(t)}function ie(e){return y(e)}function se(e){return b(e)}function ae(e){return n(e)}function ce(e){var t=wt(e);return t?t.destUrl:e}function pe(e,t,r){if(void 0===r&&(r=!1),r)return String(e);var o=!Q($(),e),n={resourceType:ae({isAjax:!0}),credentials:t};return o&&(n.proxyPort=ut.get().crossDomainProxyPort,n.reqOrigin=ee()),ft(e,n)}function le(e){return e.indexOf(Pt)>-1}function he(e){return e.replace(Pt,"")}function ue(e){var t=String(e).toLowerCase();return t===Et.wwwAuthenticate||t===Et.proxyAuthenticate}function me(e){return Tt+e}function de(e){return e.indexOf(Tt)>-1}function ye(e){return e.replace(Tt,"")}function ge(e){var t=String(e).toLowerCase();return t===Et.authorization||t===Et.proxyAuthorization}function fe(e){switch(e=String(e).toLowerCase()){case"omit":return be.omit;case"same-origin":return be.sameOrigin;case"include":return be.include;default:return be.unknown}}function ve(e){e.stopImmediatePropagation?e.stopImmediatePropagation():e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0}function we(e){return e.protocol===jt.protocol&&e.host===jt.host&&e.partAfterHost.startsWith(jt.scope)}function Se(){var e=new Promise(function(t,r){rt.windowAddEventListener.call(self,"message",function o(n){var i=n.data;if(i.cmd===Mt){var s=void 0!==self[Rt.swScopeHeaderValue],a=s?self[Rt.swScopeHeaderValue]:i.currentScope,c=i.optsScope;if(c){if(!c.startsWith(a)){self.registration.unregister();var p="The path of the provided scope ('".concat(i.optsScope,"') is not under the max ")+"scope allowed (".concat(s?"set by Service-Worker-Allowed: ":"","'")+"".concat(a,"'). Adjust the scope, move the Service Worker script, ")+"or use the Service-Worker-Allowed HTTP header to allow the scope.";return n.ports[0].postMessage({error:p}),void r(new Error(p))}}else c=a;n.ports[0].postMessage({}),jt.protocol=i.protocol,jt.host=i.host,jt.scope=c,rt.windowRemoveEventListener.call(self,"message",o),ve(n),e=null,t()}})});self.addEventListener("install",function(t){return t.waitUntil(e)}),rt.windowAddEventListener.call(self,"fetch",function(e){var t=e.request,r=rt.requestUrlGetter.call(t),o=wt(r),n=!o;if(!n){var i="document"===t.destination||"iframe"===t.destination;if(i){if(we(o.destResourceInfo))return}else{var s=rt.requestReferrerGetter.call(t),a=wt(s);if(a&&we(a.destResourceInfo))return}}e.respondWith(rt.fetch.call(self,t)),ve(e)})}function Oe(){}var be,Ee=function(e,t){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},Pe=/^\s*([\w-]+?:)?(?:\/\/(?:([^/]+)@)?(([^/%?;#: ]*)(?::(\d+))?))?(.*?)\s*$/,Te=/^([\w-]+?:)(\/\/|[^\\/]|$)/,De=/^\/([^/]+?)\/([\S\s]+)$/,xe=/^file:/i,Le=/^http(s)?:\/\//,He=/^s\*/,Me=/^(?:https?|file):/i,Re=/^#/,je="!",Ae="*",Ge=/\/$/,Ce="about:blank",Ne="about:error",Ie=[Ce,Ne],_e="80",ke="443";!function(e){e[e.include=0]="include",e[e.sameOrigin=1]="sameOrigin",e[e.omit=2]="omit",e[e.unknown=3]="unknown"}(be||(be={}));var We={protocol:"about:",host:"",hostname:"",port:"",partAfterHost:""},Fe=[{name:"isIframe",flag:"i"},{name:"isForm",flag:"f"},{name:"isScript",flag:"s"},{name:"isEventSource",flag:"e"},{name:"isHtmlImport",flag:"h"},{name:"isWebSocket",flag:"w"},{name:"isServiceWorker",flag:"c"},{name:"isAjax",flag:"a"},{name:"isObject",flag:"o"}],qe={processDomMethodName:"hammerhead|process-dom-method",processedContext:"hammerhead|processed-context",documentWasCleaned:"hammerhead|document-was-cleaned",documentCharset:"hammerhead|document-charset",iframeNativeMethods:"hammerhead|iframe-native-methods",hammerhead:"%hammerhead%",selection:"hammerhead|selection",shadowUIElement:"hammerhead|shadow-ui-element",forceProxySrcForImage:"hammerhead|image|force-proxy-src-flag",skipNextLoadEventForImage:"hammerhead|image|skip-next-load-event-flag",cachedImage:"hammerhead|image|cached-image",sandboxIsReattached:"hammerhead|sandbox-is-reattached",nativeStrRepresentation:"hammerhead|native-string-representation",currentBaseUrl:"hammerhead|current-base-url"},Be={storedAttrPostfix:"-hammerhead-stored-value",hoverPseudoClass:"data-hammerhead-hovered",focusPseudoClass:"data-hammerhead-focused",uploadInfoHiddenInputName:"hammerhead|upload-info-hidden-input-name"},Ue="undefined"==typeof window&&"object"==typeof self,Ve=Ue?self:window,Xe={isInWorker:Ue,global:Ve,isServiceWorker:Ue&&!Ve.XMLHttpRequest},$e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ze=C(function(e){!function(t,r,o){e.exports?e.exports=o():t[r]=o()}($e,"bowser",function(){function e(e){function t(t){var r=e.match(t);return r&&r.length>1&&r[1]||""}function r(t){var r=e.match(t);return r&&r.length>1&&r[2]||""}var o=t(/(ipod|iphone|ipad)/i).toLowerCase(),n=/like android/i.test(e),i=!n&&/android/i.test(e),a=/nexus\s*[0-6]\s*/i.test(e),c=!a&&/nexus\s*[0-9]+/i.test(e),p=/CrOS/.test(e),l=/silk/i.test(e),h=/sailfish/i.test(e),u=/tizen/i.test(e),m=/(web|hpw)os/i.test(e),d=/windows phone/i.test(e);/SamsungBrowser/i.test(e);var y,g=!d&&/windows/i.test(e),f=!o&&!l&&/macintosh/i.test(e),v=!i&&!h&&!u&&!m&&/linux/i.test(e),w=t(/edge\/(\d+(\.\d+)?)/i),S=t(/version\/(\d+(\.\d+)?)/i),O=/tablet/i.test(e),b=!O&&/[^-]mobi/i.test(e),E=/xbox/i.test(e);/opera/i.test(e)?y={name:"Opera",opera:s,version:S||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr|opios/i.test(e)?y={name:"Opera",opera:s,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||S}:/SamsungBrowser/i.test(e)?y={name:"Samsung Internet for Android",samsungBrowser:s,version:S||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(e)?y={name:"Opera Coast",coast:s,version:S||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?y={name:"Yandex Browser",yandexbrowser:s,version:S||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?y={name:"UC Browser",ucbrowser:s,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?y={name:"Maxthon",maxthon:s,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?y={name:"Epiphany",epiphany:s,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?y={name:"Puffin",puffin:s,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?y={name:"Sleipnir",sleipnir:s,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?y={name:"K-Meleon",kMeleon:s,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:d?(y={name:"Windows Phone",windowsphone:s},w?(y.msedge=s,y.version=w):(y.msie=s,y.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?y={name:"Internet Explorer",msie:s,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:p?y={name:"Chrome",chromeos:s,chromeBook:s,chrome:s,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(e)?y={name:"Microsoft Edge",msedge:s,version:w}:/vivaldi/i.test(e)?y={name:"Vivaldi",vivaldi:s,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||S}:h?y={name:"Sailfish",sailfish:s,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?y={name:"SeaMonkey",seamonkey:s,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(y={name:"Firefox",firefox:s,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(y.firefoxos=s)):l?y={name:"Amazon Silk",silk:s,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?y={name:"PhantomJS",phantom:s,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?y={name:"SlimerJS",slimer:s,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?y={name:"BlackBerry",blackberry:s,version:S||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:m?(y={name:"WebOS",webos:s,version:S||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(y.touchpad=s)):/bada/i.test(e)?y={name:"Bada",bada:s,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:u?y={name:"Tizen",tizen:s,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||S}:/qupzilla/i.test(e)?y={name:"QupZilla",qupzilla:s,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||S}:/chromium/i.test(e)?y={name:"Chromium",chromium:s,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||S}:/chrome|crios|crmo/i.test(e)?y={name:"Chrome",chrome:s,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?y={name:"Android",version:S}:/safari|applewebkit/i.test(e)?(y={name:"Safari",safari:s},S&&(y.version=S)):o?(y={name:"iphone"==o?"iPhone":"ipad"==o?"iPad":"iPod"},S&&(y.version=S)):y=/googlebot/i.test(e)?{name:"Googlebot",googlebot:s,version:t(/googlebot\/(\d+(\.\d+))/i)||S}:{name:t(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!y.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(y.name=y.name||"Blink",y.blink=s):(y.name=y.name||"Webkit",y.webkit=s),!y.version&&S&&(y.version=S)):!y.opera&&/gecko\//i.test(e)&&(y.name=y.name||"Gecko",y.gecko=s,y.version=y.version||t(/gecko\/(\d+(\.\d+)?)/i)),y.windowsphone||y.msedge||!i&&!y.silk?y.windowsphone||y.msedge||!o?f?y.mac=s:E?y.xbox=s:g?y.windows=s:v&&(y.linux=s):(y[o]=s,y.ios=s):y.android=s;var P="";y.windowsphone?P=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):o?(P=t(/os (\d+([_\s]\d+)*) like mac os x/i),P=P.replace(/[_\s]/g,".")):i?P=t(/android[ \/-](\d+(\.\d+)*)/i):y.webos?P=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):y.blackberry?P=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):y.bada?P=t(/bada\/(\d+(\.\d+)*)/i):y.tizen&&(P=t(/tizen[\/\s](\d+(\.\d+)*)/i)),P&&(y.osversion=P);var T=P.split(".")[0];return O||c||"ipad"==o||i&&(3==T||T>=4&&!b)||y.silk?y.tablet=s:(b||"iphone"==o||"ipod"==o||i||a||y.blackberry||y.webos||y.bada)&&(y.mobile=s),y.msedge||y.msie&&y.version>=10||y.yandexbrowser&&y.version>=15||y.vivaldi&&y.version>=1||y.chrome&&y.version>=20||y.samsungBrowser&&y.version>=4||y.firefox&&y.version>=20||y.safari&&y.version>=6||y.opera&&y.version>=10||y.ios&&y.osversion&&y.osversion.split(".")[0]>=6||y.blackberry&&y.version>=10.1||y.chromium&&y.version>=20?y.a=s:y.msie&&y.version<10||y.chrome&&y.version<20||y.firefox&&y.version<20||y.safari&&y.version<6||y.opera&&y.version<10||y.ios&&y.osversion&&y.osversion.split(".")[0]<6||y.chromium&&y.version<20?y.c=s:y.x=s,y}function t(e){return e.split(".").length}function r(e,t){var r,o=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r++)o.push(t(e[r]));return o}function o(e){for(var o=Math.max(t(e[0]),t(e[1])),n=r(e,function(e){var n=o-t(e);return e+=new Array(n+1).join(".0"),r(e.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});--o>=0;){if(n[0][o]>n[1][o])return 1;if(n[0][o]!==n[1][o])return-1;if(0===o)return 0}}function n(t,r,n){var i=a;"string"==typeof r&&(n=r,r=void 0),void 0===r&&(r=!1),n&&(i=e(n));var s=""+i.version;for(var c in t)if(t.hasOwnProperty(c)&&i[c]){if("string"!=typeof t[c])throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(t));return o([s,t[c]])<0}return r}function i(e,t,r){return!n(e,t,r)}var s=!0,a=e("undefined"!=typeof navigator?navigator.userAgent||"":"");return a.test=function(e){for(var t=0;t<e.length;++t){var r=e[t];if("string"==typeof r&&r in a)return!0}return!1},a.isUnsupportedBrowser=n,a.compareVersions=o,a.check=i,a._detect=e,a})}),Qe=navigator.userAgent.toLowerCase(),Ke=ze._detect(Qe),Je=Qe.match(/applewebkit\/(\d+(:?\.\d+)*)/);ze.compareVersions,!!Ke.mac,!!Ke.android,!!Ke.ios,!!Ke.mobile,!!Ke.tablet,parseInt(Ke.version,10),Ke.version,Je&&Je[1]||"";var Ze=!(!Ke.msie&&!Ke.msedge);!!Ke.firefox,!!Ke.msedge,!!Ke.chrome;var Ye=!!Ke.safari;!(!Ke.webkit&&!Ke.blink),/electron/g.test(Qe);var et=/\[native code]/,tt=function(){function e(e,t){t=t||Xe.global,this.refreshWindowMeths(t,Xe.isInWorker),this.refreshWorkerMeths(t),Xe.isInWorker||(this.refreshDocumentMeths(e,t),this.refreshElementMeths(e,t))}return e._getDocumentPropOwnerName=function(e,t){return e.hasOwnProperty(t)?"Document":"HTMLDocument"},e.prototype.getStoragesPropsOwner=function(e){return this.isStoragePropsLocatedInProto?e.Window.prototype:e},e.prototype.refreshWorkerMeths=function(e){this.importScripts=e.importScripts},e.prototype.refreshDocumentMeths=function(t,r){t=t||document,r=r||window;var o=r.Document.prototype;this.createDocumentFragment=o.createDocumentFragment,this.createElement=o.createElement,this.createElementNS=o.createElementNS,this.createTextNode=o.createTextNode,this.documentOpenPropOwnerName=e._getDocumentPropOwnerName(o,"open"),this.documentClosePropOwnerName=e._getDocumentPropOwnerName(o,"close"),this.documentWritePropOwnerName=e._getDocumentPropOwnerName(o,"write"),this.documentWriteLnPropOwnerName=e._getDocumentPropOwnerName(o,"writeln"),this.documentOpen=r[this.documentOpenPropOwnerName].prototype.open,this.documentClose=r[this.documentClosePropOwnerName].prototype.close,this.documentWrite=r[this.documentWritePropOwnerName].prototype.write,this.documentWriteLn=r[this.documentWriteLnPropOwnerName].prototype.writeln,this.elementFromPoint=o.elementFromPoint,this.caretRangeFromPoint=o.caretRangeFromPoint,this.caretPositionFromPoint=o.caretPositionFromPoint,this.getElementById=o.getElementById,this.getElementsByClassName=o.getElementsByClassName,this.getElementsByName=o.getElementsByName,this.getElementsByTagName=o.getElementsByTagName,this.querySelector=o.querySelector,this.querySelectorAll=o.querySelectorAll,this.createHTMLDocument=r.DOMImplementation.prototype.createHTMLDocument,t.registerElement&&(this.registerElement=o.registerElement),r.EventTarget||(this.documentAddEventListener=o.addEventListener,this.documentRemoveEventListener=o.removeEventListener),this.documentCreateEvent=o.createEvent,this.documentCreateTouch=o.createTouch,this.documentCreateTouchList=o.createTouchList,this.documentCookiePropOwnerName=e._getDocumentPropOwnerName(o,"cookie");var n=r.Object.getOwnPropertyDescriptor(r[this.documentCookiePropOwnerName].prototype,"cookie");if(!this.isNativeCode(n.get)||!this.isNativeCode(n.get.toString))try{var i=r.parent["%hammerhead%"].nativeMethods;n.get=i.documentCookieGetter,n.set=i.documentCookieSetter}catch(s){}this.documentReferrerGetter=r.Object.getOwnPropertyDescriptor(o,"referrer").get,this.documentStyleSheetsGetter=r.Object.getOwnPropertyDescriptor(o,"styleSheets").get,this.documentActiveElementGetter=r.Object.getOwnPropertyDescriptor(o,"activeElement").get,this.documentCookieGetter=n.get,this.documentCookieSetter=n.set;var a=r.Object.getOwnPropertyDescriptor(o,"documentURI");a&&(this.documentDocumentURIGetter=a.get);var c=r.Object.getOwnPropertyDescriptor(o,"title");this.documentTitleGetter=c.get,this.documentTitleSetter=c.set},e.prototype.refreshElementMeths=function(e,t){var r=this;t=t||window;var o=function(t){return r.createElement.call(e||document,t)},n=o("div"),i=function(t){return r.createTextNode.call(e||document,t)},s=i("text");if(this.appendChild=t.Node.prototype.appendChild,this.append=t.Element.prototype.append,this.prepend=t.Element.prototype.prepend,this.after=t.Element.prototype.after,this.attachShadow=t.Element.prototype.attachShadow,this.replaceChild=n.replaceChild,this.cloneNode=n.cloneNode,this.elementGetElementsByClassName=n.getElementsByClassName,this.elementGetElementsByTagName=n.getElementsByTagName,this.elementQuerySelector=n.querySelector,this.elementQuerySelectorAll=n.querySelectorAll,this.getAttribute=n.getAttribute,this.getAttributeNS=n.getAttributeNS,this.getAttributeNode=n.getAttributeNode,this.getAttributeNodeNS=n.getAttributeNodeNS,this.insertBefore=n.insertBefore,this.insertCell=o("tr").insertCell,this.insertTableRow=o("table").insertRow,this.insertTBodyRow=o("tbody").insertRow,this.removeAttribute=n.removeAttribute,this.removeAttributeNS=n.removeAttributeNS,this.removeAttributeNode=n.removeAttributeNode,this.removeChild=t.Node.prototype.removeChild,this.remove=t.Element.prototype.remove,this.elementReplaceWith=t.Element.prototype.replaceWith,this.setAttribute=n.setAttribute,this.setAttributeNS=n.setAttributeNS,this.hasAttribute=n.hasAttribute,this.hasAttributeNS=n.hasAttributeNS,this.hasAttributes=n.hasAttributes,this.anchorToString=t.HTMLAnchorElement.prototype.toString,this.matches=n.matches||n.msMatchesSelector,this.closest=n.closest,this.insertAdjacentMethodsOwner=t.Element.prototype.hasOwnProperty("insertAdjacentElement")?t.Element.prototype:t.HTMLElement.prototype,this.insertAdjacentElement=this.insertAdjacentMethodsOwner.insertAdjacentElement,this.insertAdjacentHTML=this.insertAdjacentMethodsOwner.insertAdjacentHTML,this.insertAdjacentText=this.insertAdjacentMethodsOwner.insertAdjacentText,this.appendData=s.appendData,!this.isNativeCode(this.elementGetElementsByTagName))try{var a=t.parent["%hammerhead%"].nativeMethods;this.elementGetElementsByTagName=a.elementGetElementsByTagName}catch(c){}t.EventTarget?(this.addEventListener=t.EventTarget.prototype.addEventListener,this.removeEventListener=t.EventTarget.prototype.removeEventListener,this.dispatchEvent=t.EventTarget.prototype.dispatchEvent):(this.addEventListener=n.addEventListener,this.removeEventListener=n.removeEventListener,this.dispatchEvent=n.dispatchEvent),this.blur=n.blur,this.click=n.click,this.focus=n.focus,this.select=window.TextRange?o("body").createTextRange().select:null,this.setSelectionRange=o("input").setSelectionRange,this.textAreaSetSelectionRange=o("textarea").setSelectionRange,this.svgFocus=t.SVGElement?t.SVGElement.prototype.focus:this.focus,this.svgBlur=t.SVGElement?t.SVGElement.prototype.blur:this.blur,this.htmlElementStylePropOwnerName=t.Element.prototype.hasOwnProperty("style")?"Element":"HTMLElement";var p=t.Object.getOwnPropertyDescriptor(t[this.htmlElementStylePropOwnerName].prototype,"style");this.htmlElementStyleGetter=p.get,p.set&&(this.htmlElementStyleSetter=p.set);var l=t.Object.getOwnPropertyDescriptor(t.CSSStyleDeclaration.prototype,"cssText");this.styleCssTextGetter=l.get,this.styleCssTextSetter=l.set},e.prototype._refreshGettersAndSetters=function(e,t){void 0===t&&(t=!1),e=e||window;var r=e.constructor.prototype;this.isEventPropsLocatedInProto=r.hasOwnProperty("onerror");var o=this.isEventPropsLocatedInProto?r:e,n=e.Object.getOwnPropertyDescriptor(o,"onbeforeunload"),i=e.Object.getOwnPropertyDescriptor(o,"onunload"),s=e.Object.getOwnPropertyDescriptor(o,"onpagehide"),a=e.Object.getOwnPropertyDescriptor(o,"onmessage"),c=e.Object.getOwnPropertyDescriptor(o,"onerror"),p=e.Object.getOwnPropertyDescriptor(o,"onhashchange");this.winOnBeforeUnloadSetter=n&&n.set,this.winOnUnloadSetter=i&&i.set,this.winOnPageHideSetter=s&&s.set,this.winOnMessageSetter=a&&a.set,this.winOnErrorSetter=c&&c.set,this.winOnHashChangeSetter=p&&p.set;var l=e.Object.getOwnPropertyDescriptor(o,"onunhandledrejection");if(l&&(this.winOnUnhandledRejectionSetter=l.set),e.WebSocket){var h=e.Object.getOwnPropertyDescriptor(e.WebSocket.prototype,"url");h&&h.get&&h.configurable&&(this.webSocketUrlGetter=h.get)}this.messageEventOriginGetter=e.Object.getOwnPropertyDescriptor(e.MessageEvent.prototype,"origin").get,e.PerformanceNavigationTiming&&(this.performanceEntryNameGetter=e.Object.getOwnPropertyDescriptor(e.PerformanceEntry.prototype,"name").get);var u=e.Object.getOwnPropertyDescriptor(e.MessageEvent.prototype,"data");if(u&&(this.messageEventDataGetter=u.get),e.fetch&&(this.responseStatusGetter=e.Object.getOwnPropertyDescriptor(e.Response.prototype,"status").get,this.responseTypeGetter=e.Object.getOwnPropertyDescriptor(e.Response.prototype,"type").get,this.responseUrlGetter=e.Object.getOwnPropertyDescriptor(e.Response.prototype,"url").get,this.requestUrlGetter=e.Object.getOwnPropertyDescriptor(e.Request.prototype,"url").get,this.requestReferrerGetter=e.Object.getOwnPropertyDescriptor(e.Request.prototype,"referrer").get),e.XMLHttpRequest){var m=e.Object.getOwnPropertyDescriptor(e.XMLHttpRequest.prototype,"responseURL");m&&(this.xhrResponseURLGetter=m.get)}if(e.Window){this.isStoragePropsLocatedInProto=e.Window.prototype.hasOwnProperty("localStorage");var d=this.getStoragesPropsOwner(e);this.winLocalStorageGetter=e.Object.getOwnPropertyDescriptor(d,"localStorage").get,this.winSessionStorageGetter=e.Object.getOwnPropertyDescriptor(d,"sessionStorage").get}if(!t){this.storageGetItem=e.Storage.prototype.getItem,this.storageSetItem=e.Storage.prototype.setItem,this.storageRemoveItem=e.Storage.prototype.removeItem,this.storageClear=e.Storage.prototype.clear,this.storageKey=e.Storage.prototype.key,this.storageLengthGetter=e.Object.getOwnPropertyDescriptor(e.Storage.prototype,"length");var y=e.Object.getOwnPropertyDescriptor(e.HTMLObjectElement.prototype,"data"),g=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"type"),f=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"value"),v=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"disabled"),w=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"required"),S=e.Object.getOwnPropertyDescriptor(e.HTMLTextAreaElement.prototype,"value"),O=e.Object.getOwnPropertyDescriptor(e.HTMLImageElement.prototype,"src"),b=e.Object.getOwnPropertyDescriptor(e.HTMLImageElement.prototype,"srcset"),E=e.Object.getOwnPropertyDescriptor(e.HTMLScriptElement.prototype,"src"),P=e.Object.getOwnPropertyDescriptor(e.HTMLScriptElement.prototype,"integrity"),T=e.Object.getOwnPropertyDescriptor(e.HTMLEmbedElement.prototype,"src"),D=e.Object.getOwnPropertyDescriptor(e.HTMLSourceElement.prototype,"src"),x=e.Object.getOwnPropertyDescriptor(e.HTMLMediaElement.prototype,"src"),L=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"src"),H=e.Object.getOwnPropertyDescriptor(e.HTMLFrameElement.prototype,"src"),M=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"src"),R=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"href"),j=e.Object.getOwnPropertyDescriptor(e.HTMLLinkElement.prototype,"href"),A=e.Object.getOwnPropertyDescriptor(e.HTMLLinkElement.prototype,"integrity"),G=e.Object.getOwnPropertyDescriptor(e.HTMLLinkElement.prototype,"rel"),C=e.Object.getOwnPropertyDescriptor(e.HTMLLinkElement.prototype,"as"),N=e.Object.getOwnPropertyDescriptor(e.HTMLAreaElement.prototype,"href"),I=e.Object.getOwnPropertyDescriptor(e.HTMLBaseElement.prototype,"href"),_=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"host"),k=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"hostname"),W=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"pathname"),F=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"port"),q=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"protocol"),B=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"search"),U=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"target"),V=e.Object.getOwnPropertyDescriptor(e.HTMLFormElement.prototype,"target"),X=e.Object.getOwnPropertyDescriptor(e.HTMLAreaElement.prototype,"target"),$=e.Object.getOwnPropertyDescriptor(e.HTMLBaseElement.prototype,"target"),z=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"formTarget"),Q=e.Object.getOwnPropertyDescriptor(e.HTMLButtonElement.prototype,"formTarget"),K=e.Object.getOwnPropertyDescriptor(e.SVGImageElement.prototype,"href"),J=e.Object.getOwnPropertyDescriptor(e.SVGAnimatedString.prototype,"animVal"),Z=e.Object.getOwnPropertyDescriptor(e.SVGAnimatedString.prototype,"baseVal"),Y=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"autocomplete"),ee=e.Object.getOwnPropertyDescriptor(e.HTMLFormElement.prototype,"action"),te=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"formAction"),re=e.Object.getOwnPropertyDescriptor(e.HTMLButtonElement.prototype,"formAction"),oe=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"textContent"),ne=e.Object.getOwnPropertyDescriptor(e.HTMLElement.prototype,"innerText"),ie=e.Object.getOwnPropertyDescriptor(e.HTMLScriptElement.prototype,"text"),se=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"text"),ae=e.Object.getOwnPropertyDescriptor(e.HTMLTitleElement.prototype,"text"),ce=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"sandbox"),pe=e.Object.getOwnPropertyDescriptor(e.HTMLMetaElement.prototype,"httpEquiv"),le=e.Object.getOwnPropertyDescriptor(e,"origin");
|
|
le&&(this.windowOriginGetter=le.get,this.windowOriginSetter=le.set),v&&(this.inputDisabledSetter=v.set,this.inputDisabledGetter=v.get),this.elementHTMLPropOwnerName=e.Element.prototype.hasOwnProperty("innerHTML")?"Element":"HTMLElement";var he=e.Object.getOwnPropertyDescriptor(e[this.elementHTMLPropOwnerName].prototype,"innerHTML"),ue=e.Object.getOwnPropertyDescriptor(e[this.elementHTMLPropOwnerName].prototype,"outerHTML");this.objectDataSetter=y.set,this.inputTypeSetter=g.set,this.inputValueSetter=f.set,this.inputRequiredSetter=w.set,this.textAreaValueSetter=S.set,this.imageSrcSetter=O.set,this.scriptSrcSetter=E.set,this.embedSrcSetter=T.set,this.sourceSrcSetter=D.set,this.mediaSrcSetter=x.set,this.inputSrcSetter=L.set,this.frameSrcSetter=H.set,this.iframeSrcSetter=M.set,this.anchorHrefSetter=R.set,this.linkHrefSetter=j.set,this.linkRelSetter=G.set,this.linkAsSetter=C&&C.set,this.areaHrefSetter=N.set,this.baseHrefSetter=I.set,this.anchorHostSetter=_.set,this.anchorHostnameSetter=k.set,this.anchorPathnameSetter=W.set,this.anchorPortSetter=F.set,this.anchorProtocolSetter=q.set,this.anchorSearchSetter=B.set,this.anchorTargetSetter=U.set,this.formTargetSetter=V.set,this.areaTargetSetter=X.set,this.baseTargetSetter=$.set,this.inputFormTargetSetter=z.set,this.buttonFormTargetSetter=Q.set,this.svgAnimStrBaseValSetter=Z.set,this.inputAutocompleteSetter=Y.set,this.formActionSetter=ee.set,this.inputFormActionSetter=te.set,this.buttonFormActionSetter=re.set,this.iframeSandboxSetter=ce.set,this.metaHttpEquivSetter=pe.set,this.htmlElementOnloadSetter=e.Object.getOwnPropertyDescriptor(e.HTMLElement.prototype,"onload").set,this.nodeTextContentSetter=oe.set,this.htmlElementInnerTextSetter=ne.set,this.scriptTextSetter=ie.set,this.anchorTextSetter=se.set,this.elementInnerHTMLSetter=he.set,this.elementOuterHTMLSetter=ue.set,P&&A&&(this.scriptIntegritySetter=P.set,this.linkIntegritySetter=A.set),this.titleElementTextSetter=ae.set,this.elementClassListPropOwnerName=e.Element.prototype.hasOwnProperty("classList")?"Element":"HTMLElement",this.elementClassListGetter=e.Object.getOwnPropertyDescriptor(e[this.elementClassListPropOwnerName].prototype,"classList").get,this.htmlCollectionLengthGetter=e.Object.getOwnPropertyDescriptor(e.HTMLCollection.prototype,"length").get,this.nodeListLengthGetter=e.Object.getOwnPropertyDescriptor(e.NodeList.prototype,"length").get,this.elementChildElementCountGetter=e.Object.getOwnPropertyDescriptor(e.Element.prototype,"childElementCount").get,this.inputFilesGetter=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"files").get,this.styleSheetHrefGetter=e.Object.getOwnPropertyDescriptor(e.StyleSheet.prototype,"href").get,this.objectDataGetter=y.get,this.inputTypeGetter=g.get,this.inputValueGetter=f.get,this.inputRequiredGetter=w.get,this.textAreaValueGetter=S.get,this.imageSrcGetter=O.get,this.scriptSrcGetter=E.get,this.embedSrcGetter=T.get,this.sourceSrcGetter=D.get,this.mediaSrcGetter=x.get,this.inputSrcGetter=L.get,this.frameSrcGetter=H.get,this.iframeSrcGetter=M.get,this.anchorHrefGetter=R.get,this.linkHrefGetter=j.get,this.linkRelGetter=G.get,this.areaHrefGetter=N.get,this.baseHrefGetter=I.get,this.anchorHostGetter=_.get,this.anchorHostnameGetter=k.get,this.anchorPathnameGetter=W.get,this.anchorPortGetter=F.get,this.anchorProtocolGetter=q.get,this.anchorSearchGetter=B.get,this.anchorTargetGetter=U.get,this.formTargetGetter=V.get,this.areaTargetGetter=X.get,this.baseTargetGetter=$.get,this.inputFormTargetGetter=z.get,this.buttonFormTargetGetter=Q.get,this.svgImageHrefGetter=K.get,this.svgAnimStrAnimValGetter=J.get,this.svgAnimStrBaseValGetter=Z.get,this.inputAutocompleteGetter=Y.get,this.formActionGetter=ee.get,this.inputFormActionGetter=te.get,this.buttonFormActionGetter=re.get,this.iframeSandboxGetter=ce.get,this.metaHttpEquivGetter=pe.get,this.contentWindowGetter=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"contentWindow").get,this.contentDocumentGetter=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"contentDocument").get,this.frameContentWindowGetter=e.Object.getOwnPropertyDescriptor(e.HTMLFrameElement.prototype,"contentWindow").get,this.nodeTextContentGetter=oe.get,this.htmlElementInnerTextGetter=ne.get,this.scriptTextGetter=ie.get,this.anchorTextGetter=se.get,this.elementInnerHTMLGetter=he.get,this.elementOuterHTMLGetter=ue.get,this.nodeFirstChildGetter=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"firstChild").get,this.nodeLastChildGetter=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"lastChild").get,this.nodeNextSiblingGetter=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"nextSibling").get,this.nodePrevSiblingGetter=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"previousSibling").get,this.nodeParentNodeGetter=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"parentNode").get,this.nodeChildNodesGetter=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"childNodes").get,this.elementFirstElementChildGetter=e.Object.getOwnPropertyDescriptor(e.Element.prototype,"firstElementChild").get,this.elementLastElementChildGetter=e.Object.getOwnPropertyDescriptor(e.Element.prototype,"lastElementChild").get,this.elementNextElementSiblingGetter=e.Object.getOwnPropertyDescriptor(e.Element.prototype,"nextElementSibling").get,this.elementPrevElementSiblingGetter=e.Object.getOwnPropertyDescriptor(e.Element.prototype,"previousElementSibling").get,P&&A&&(this.scriptIntegrityGetter=P.get,this.linkIntegrityGetter=A.get);var me=e.Element.prototype.hasOwnProperty("children")?e.Element.prototype:e.HTMLElement.prototype;this.elementChildrenGetter=e.Object.getOwnPropertyDescriptor(me,"children").get;var de=e.Object.getOwnPropertyDescriptor(e.HTMLAnchorElement.prototype,"origin");de&&(this.anchorOriginGetter=de.get);var ye=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"srcdoc");ye&&(this.iframeSrcdocGetter=ye.get,this.iframeSrcdocSetter=ye.set);var ge=e.Object.getOwnPropertyDescriptor(e.CSSStyleSheet.prototype,"href");ge&&(this.cssStyleSheetHrefGetter=ge.get);var fe=e.Object.getOwnPropertyDescriptor(e.Node.prototype,"baseURI");fe&&(this.nodeBaseURIGetter=fe.get),this.elementAttributesPropOwnerName=e.Element.prototype.hasOwnProperty("attributes")?"Element":"Node",this.elementAttributesGetter=e.Object.getOwnPropertyDescriptor(e[this.elementAttributesPropOwnerName].prototype,"attributes").get;var ve=e.Object.getOwnPropertyDescriptor(e.HTMLHtmlElement.prototype,"manifest");ve&&(this.htmlManifestGetter=ve.get,this.htmlManifestSetter=ve.set),ye&&(this.imageSrcsetSetter=b.set,this.imageSrcsetGetter=b.get),this.titleElementTextGetter=ae.get,this.mutationRecordNextSiblingGetter=e.Object.getOwnPropertyDescriptor(e.MutationRecord.prototype,"nextSibling").get,this.mutationRecordPrevSiblingGetter=e.Object.getOwnPropertyDescriptor(e.MutationRecord.prototype,"previousSibling").get}},e.prototype.refreshWindowMeths=function(e,t){void 0===t&&(t=!1),e=e||window;var r=e.constructor.prototype;if(this.eval=e.eval,this.formSubmit=e.HTMLFormElement&&e.HTMLFormElement.prototype.submit,this.documentFragmentQuerySelector=e.DocumentFragment&&e.DocumentFragment.prototype.querySelector,this.documentFragmentQuerySelectorAll=e.DocumentFragment&&e.DocumentFragment.prototype.querySelectorAll,this.preventDefault=e.Event.prototype.preventDefault,this.historyPushState=e.history&&e.history.pushState,this.historyReplaceState=e.history&&e.history.replaceState,this.postMessage=e.postMessage||r.postMessage,this.windowOpen=e.open||r.open,this.setTimeout=e.setTimeout||r.setTimeout,this.setInterval=e.setInterval||r.setInterval,this.clearTimeout=e.clearTimeout||r.clearTimeout,this.clearInterval=e.clearInterval||r.clearInterval,this.registerProtocolHandler=e.navigator.registerProtocolHandler,this.sendBeacon=e.Navigator&&e.Navigator.prototype.sendBeacon,e.XMLHttpRequest){var o=(e.EventTarget||e.XMLHttpRequest).prototype;this.xhrAbort=e.XMLHttpRequest.prototype.abort,this.xhrOpen=e.XMLHttpRequest.prototype.open,this.xhrSend=e.XMLHttpRequest.prototype.send,this.xhrAddEventListener=o.addEventListener,this.xhrRemoveEventListener=o.removeEventListener,this.xhrDispatchEvent=o.dispatchEvent,this.xhrGetResponseHeader=e.XMLHttpRequest.prototype.getResponseHeader,this.xhrGetAllResponseHeaders=e.XMLHttpRequest.prototype.getAllResponseHeaders,this.xhrSetRequestHeader=e.XMLHttpRequest.prototype.setRequestHeader,this.xhrOverrideMimeType=e.XMLHttpRequest.prototype.overrideMimeType}try{this.registerServiceWorker=e.navigator.serviceWorker.register,this.getRegistrationServiceWorker=e.navigator.serviceWorker.getRegistration}catch(n){this.registerServiceWorker=null,this.getRegistrationServiceWorker=null}this.createContextualFragment=e.Range&&e.Range.prototype.createContextualFragment;var i=e.performance;if(i){var s=e.performance.now||e.Performance.prototype.now;this.performanceNow=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.apply(i,e)}}if(this.fetch=e.fetch,this.Request=e.Request,e.Headers&&(this.Headers=e.Headers,this.headersSet=e.Headers.prototype.set,this.headersGet=e.Headers.prototype.get,this.headersDelete=e.Headers.prototype["delete"],this.headersEntries=e.Headers.prototype.entries,this.headersForEach=e.Headers.prototype.forEach,this.headersValues=e.Headers.prototype.values),this.windowAddEventListener=e.addEventListener||r.addEventListener,this.windowRemoveEventListener=e.removeEventListener||r.removeEventListener,this.windowDispatchEvent=e.dispatchEvent,this.WindowPointerEvent=e.PointerEvent||r.PointerEvent,this.WindowMSPointerEvent=e.MSPointerEvent||r.MSPointerEvent,this.WindowTouch=e.Touch||r.Touch,this.WindowTouchEvent=e.TouchEvent||r.TouchEvent,this.WindowKeyboardEvent=e.KeyboardEvent||r.KeyboardEvent,this.WindowFocusEvent=e.FocusEvent||r.FocusEvent,this.WindowTextEvent=e.TextEvent||r.TextEvent,this.WindowInputEvent=e.InputEvent||r.InputEvent,this.WindowMouseEvent=e.MouseEvent||r.MouseEvent,this.eventTargetGetter=e.Object.getOwnPropertyDescriptor(e.Event.prototype,"target").get,this.canvasContextDrawImage=e.CanvasRenderingContext2D&&e.CanvasRenderingContext2D.prototype.drawImage,this.formDataAppend=e.FormData&&e.FormData.prototype.append,this.date=e.Date,this.dateNow=e.Date.now,this.math=e.Math,this.mathRandom=e.Math.random,this.objectToString=e.Object.prototype.toString,this.objectAssign=e.Object.assign,this.objectKeys=e.Object.keys,this.objectDefineProperty=e.Object.defineProperty,this.objectDefineProperties=e.Object.defineProperties,this.objectCreate=e.Object.create,this.objectIsExtensible=e.Object.isExtensible,this.objectIsFrozen=e.Object.isFrozen,this.objectGetOwnPropertyDescriptor=e.Object.getOwnPropertyDescriptor,this.objectHasOwnProperty=e.Object.hasOwnProperty,this.objectGetOwnPropertyNames=e.Object.getOwnPropertyNames,this.objectGetPrototypeOf=e.Object.getPrototypeOf,this.objectSetPrototypeOf=e.Object.setPrototypeOf,this.objectGetOwnPropertySymbols=e.Object.getOwnPropertySymbols,this.arraySlice=e.Array.prototype.slice,this.arrayConcat=e.Array.prototype.concat,this.arrayFilter=e.Array.prototype.filter,this.arrayFind=e.Array.prototype.find,this.arrayMap=e.Array.prototype.map,this.arrayJoin=e.Array.prototype.join,this.arraySplice=e.Array.prototype.splice,this.arrayUnshift=e.Array.prototype.unshift,this.arrayForEach=e.Array.prototype.forEach,this.arrayIndexOf=e.Array.prototype.indexOf,this.arraySome=e.Array.prototype.some,this.arrayEvery=e.Array.prototype.every,this.arrayReverse=e.Array.prototype.reverse,this.arrayReduce=e.Array.prototype.reduce,this.arrayFrom=e.Array.from,this.isArray=e.Array.isArray,this.DOMParserParseFromString=e.DOMParser&&e.DOMParser.prototype.parseFromString,this.arrayBufferIsView=e.ArrayBuffer.prototype.constructor.isView,!t){this.tokenListAdd=e.DOMTokenList.prototype.add,this.tokenListRemove=e.DOMTokenList.prototype.remove,this.tokenListReplace=e.DOMTokenList.prototype.replace,this.tokenListSupports=e.DOMTokenList.prototype.supports,this.tokenListToggle=e.DOMTokenList.prototype.toggle,this.tokenListContains=e.DOMTokenList.prototype.contains;var a=e.Object.getOwnPropertyDescriptor(e.DOMTokenList.prototype,"value");a&&(this.tokenListValueSetter=a.set),this.styleGetPropertyValue=e.CSSStyleDeclaration.prototype.getPropertyValue,this.styleSetProperty=e.CSSStyleDeclaration.prototype.setProperty,this.styleRemoveProperty=e.CSSStyleDeclaration.prototype.removeProperty,this.styleInsertRule=e.CSSStyleSheet.prototype.insertRule,this.scrollTo=e.scrollTo}e.Promise&&(this.promiseThen=e.Promise.prototype.then,this.promiseReject=e.Promise.reject),this.console=e.console,this.console&&(this.consoleMeths={log:e.console.log,warn:e.console.warn,error:e.console.error,info:e.console.info}),this.crypto=e.crypto||e.msCrypto,this.cryptoGetRandomValues=this.crypto&&this.crypto.getRandomValues,this.refreshClasses(e),this._refreshGettersAndSetters(e,t)},e.prototype.refreshClasses=function(e){this.windowClass=e.Window,this.documentClass=e.Document,this.locationClass=e.Location,this.elementClass=e.Element,this.svgElementClass=e.SVGElement,this.Worker=e.Worker,this.MessageChannel=e.MessageChannel,this.Array=e.Array,this.ArrayBuffer=e.ArrayBuffer,this.Uint8Array=e.Uint8Array,this.Uint16Array=e.Uint16Array,this.Uint32Array=e.Uint32Array,this.DataView=e.DataView,this.Blob=e.Blob,this.XMLHttpRequest=e.XMLHttpRequest,this.Image=e.Image,this.Function=e.Function,this.functionToString=e.Function.prototype.toString,this.functionBind=e.Function.prototype.bind,this.Error=e.Error,this.FontFace=e.FontFace,this.StorageEvent=e.StorageEvent,this.MutationObserver=e.MutationObserver,this.EventSource=e.EventSource,this.Proxy=e.Proxy,this.WebSocket=e.WebSocket,this.HTMLCollection=e.HTMLCollection,this.NodeList=e.NodeList,this.Node=e.Node,this.URL=e.URL,this.DataTransfer=e.DataTransfer,this.DataTransferItemList=e.DataTransferItemList,this.DataTransferItem=e.DataTransferItem,this.FileList=e.FileList,e.File&&N(e.File)&&(this.File=e.File)},e.prototype.refreshElectronMeths=function(e){return(!this.createScript||!j(e.createScript))&&(this.createScript=e.createScript,this.runInDebugContext=e.runInDebugContext,this.runInContext=e.runInContext,this.runInNewContext=e.runInNewContext,this.runInThisContext=e.runInThisContext,!0)},e._ensureDocumentMethodRestore=function(e,t,r,o){t[r]=o,e[r]!==t[r]&&(e[r]=o)},e.prototype.restoreDocumentMeths=function(t,r){var o=t.Document.prototype;e._ensureDocumentMethodRestore(r,o,"createDocumentFragment",this.createDocumentFragment),e._ensureDocumentMethodRestore(r,o,"createElement",this.createElement),e._ensureDocumentMethodRestore(r,o,"createElementNS",this.createElementNS),e._ensureDocumentMethodRestore(r,o,"elementFromPoint",this.elementFromPoint),e._ensureDocumentMethodRestore(r,o,"caretRangeFromPoint",this.caretRangeFromPoint),e._ensureDocumentMethodRestore(r,o,"caretPositionFromPoint",this.caretPositionFromPoint),e._ensureDocumentMethodRestore(r,o,"getElementById",this.getElementById),e._ensureDocumentMethodRestore(r,o,"getElementsByClassName",this.getElementsByClassName),e._ensureDocumentMethodRestore(r,o,"getElementsByName",this.getElementsByName),e._ensureDocumentMethodRestore(r,o,"getElementsByTagName",this.getElementsByTagName),e._ensureDocumentMethodRestore(r,o,"querySelector",this.querySelector),e._ensureDocumentMethodRestore(r,o,"querySelectorAll",this.querySelectorAll),t.EventTarget||(e._ensureDocumentMethodRestore(r,o,"addEventListener",this.documentAddEventListener),e._ensureDocumentMethodRestore(r,o,"removeEventListener",this.documentRemoveEventListener)),e._ensureDocumentMethodRestore(r,o,"createEvent",this.documentCreateEvent),e._ensureDocumentMethodRestore(r,o,"createTouch",this.documentCreateTouch),e._ensureDocumentMethodRestore(r,o,"createTouchList",this.documentCreateTouchList),e._ensureDocumentMethodRestore(r,t[this.documentOpenPropOwnerName].prototype,"open",this.documentOpen),e._ensureDocumentMethodRestore(r,t[this.documentClosePropOwnerName].prototype,"close",this.documentClose),e._ensureDocumentMethodRestore(r,t[this.documentWritePropOwnerName].prototype,"write",this.documentWrite),e._ensureDocumentMethodRestore(r,t[this.documentWriteLnPropOwnerName].prototype,"writeln",this.documentWriteLn)},e.prototype.refreshIfNecessary=function(e,t){var r=this,o=function(e){try{return e()}catch(t){return!0}},n=o(function(){return!e.createElement||j(document.createElement)}),i=o(function(){var t=r.createElement.call(e,"div");return j(t.getAttribute)}),s=o(function(){return r.setTimeout.call(t,function(){},0),j(t.XMLHttpRequest.prototype.open)});n&&this.refreshDocumentMeths(e,t),i&&this.refreshElementMeths(e,t),s&&this.refreshWindowMeths(t)},e.prototype.isNativeCode=function(e){return et.test(this.functionToString.call(e))},e}(),rt=new tt,ot=!1;if(rt.createElement){var nt=rt.createElement.call(document,"form"),it=rt.getElementsByName.call(document,"");rt.formActionGetter.call(nt)===window.location.toString(),ot=rt.objectToString.call(window)===rt.objectToString.call(Window.prototype),!!rt.objectGetOwnPropertyDescriptor.call(window.Object,NamedNodeMap.prototype,"getNamedItem"),rt.objectGetPrototypeOf.call(window.Object,it)===rt.HTMLCollection.prototype}var st="undefined"==typeof window;st?"":I(window),st?"":I(rt.createElement.call(document,"td"));var at=st?-1:Node.ELEMENT_NODE,ct="hammerhead|element|shadow-root-parent",pt="hammerhead|document-url-resolver",lt={_createResolver:function(e){var t=rt.createHTMLDocument.call(e.implementation,"title"),r=rt.createElement.call(t,"a"),o=rt.createElement.call(t,"base");return rt.appendChild.call(t.body,r),rt.appendChild.call(t.head,o),t},_getResolver:function(e){return e[pt]||rt.objectDefineProperty(e,pt,{value:this._createResolver(e),writable:!0}),e[pt]},_isNestedIframeWithoutSrc:function(e){if(!e||!e.parent||e.parent===e||e.parent.parent===e.parent)return!1;var t=k(window);return!!t&&B(t)},init:function(e){this.updateBase(dt(),e)},getResolverElement:function(e){return rt.nodeFirstChildGetter.call(this._getResolver(e).body)},resolve:function(e,t){var r=this.getResolverElement(t),o=null;if(null===e)rt.removeAttribute.call(r,"href");else{rt.anchorHrefSetter.call(r,e),o=rt.anchorHrefGetter.call(r);var n=e&&(!o||"/"===o.charAt(0))&&this._isNestedIframeWithoutSrc(t.defaultView);if(n)return this.resolve(e,window.parent.document)}return O(e,o)},updateBase:function(e,t){if(!this.proxyless){var r=this._getResolver(t),o=rt.elementGetElementsByTagName.call(r.head,"base")[0];e=e||dt();var n=d(e),i="file:"!==n.protocol&&"about:"!==n.protocol&&!n.host,s=/^\/\//.test(e)&&!!n.host;if(i||s){var a=dt();this.updateBase(a,t),e=this.resolve(e,t)}rt.setAttribute.call(o,"href",e)}},getBaseUrl:function(e){var t=rt.elementGetElementsByTagName.call(this._getResolver(e).head,"base")[0];return rt.getAttribute.call(t,"href")},changeUrlPart:function(e,t,r,o){var n=this.getResolverElement(o);return rt.anchorHrefSetter.call(n,e),t.call(n,r),rt.anchorHrefGetter.call(n)},dispose:function(e){e[pt]=null},get proxyless(){return this._proxyless},set proxyless(e){this._proxyless=e}},ht=function(){function e(){this._settings={isFirstPageLoad:!0,sessionId:"",forceProxySrcForImage:!1,crossDomainProxyPort:"",referer:"",serviceMsgUrl:"",transportWorkerUrl:"",iframeTaskScriptTemplate:"",cookie:"",allowMultipleWindows:!1,isRecordMode:!1,windowId:"",proxyless:!1,disableCrossDomain:!1}}return e.prototype.set=function(e){this._settings=e},e.prototype.get=function(){return this._settings},e}(),ut=new ht,mt=null,dt=function(){var e=$(),t=m(e);return t?t.destUrl:e},yt=/^wss?:/i,gt=function(){for(var e=Xe.isInWorker?{location:oe(self.location.origin),parent:null}:window,t=e.location;!t.hostname&&(Xe.isInWorker||e!==e.top);)e=e.parent,t=e.location;return{hostname:t.hostname,port:t.port.toString(),protocol:t.protocol}}(),ft=function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),t.isUrlsSet)return t.isUrlsSet=!1,v(ft,String(e),t,r);if(r)return String(e);e=p(e);var n=t&&t.resourceType,i=o(n);if(!i.isWebSocket&&!ie(e)&&!se(e))return e;var s=K(e,t&&t.doc);if(i.isWebSocket&&!ne(s)||!P(s))return e;var a=t&&t.proxyHostname||gt.hostname,c=t&&t.proxyPort||gt.port,h=t&&t.proxyProtocol||gt.protocol,u=i.isWebSocket?h.replace("http","ws"):h,y=t&&t.sessionId||ut.get().sessionId,g=t&&t.windowId||ut.get().windowId,w=t&&t.credentials,S=t&&t.charset,O=t&&t.reqOrigin,b=re(c),E=m(s),T=!!E&&E.proxy.hostname===a&&(E.proxy.port===c||E.proxy.port===b);if(T){if(n&&E.resourceType===n)return s;var D=f(E.destResourceInfo);return ft(D,{proxyProtocol:u,proxyHostname:a,proxyPort:c,sessionId:y,resourceType:n,charset:S,reqOrigin:O,credentials:w})}var x=d(s);if(!x.protocol)return e;if(S=S||te(i),x.protocol===h&&x.hostname===a&&x.port===c){var L=Y();x.protocol=L.protocol,x.host=L.host,x.hostname=L.hostname,x.port=L.port||"",s=f(x)}return i.isWebSocket&&(x.protocol=x.protocol.replace("ws","http"),s=f(x),O=O||ee()),i.isIframe&&c===ut.get().crossDomainProxyPort&&(O=O||ee()),l(s,{proxyProtocol:u,proxyHostname:a,proxyPort:c,sessionId:y,resourceType:n,charset:S,reqOrigin:O,windowId:g,credentials:w})},vt=function(e,t){return void 0===t&&(t=!1),g(e,ft,t)},wt=function(e){return m(e)},St=function(){function e(){this.eventsListeners=rt.objectCreate(null)}return e.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var o=this.eventsListeners[e];if(o)for(var n=0;o[n];){if(Ze)try{o[n].toString()}catch(i){rt.arraySplice.call(o,n,1);continue}o[n++].apply(this,t)}},e.prototype.off=function(e,t){var r=this.eventsListeners[e];r&&(this.eventsListeners[e]=rt.arrayFilter.call(r,function(e){return e!==t}))},e.prototype.on=function(e,t){return this.eventsListeners[e]=this.eventsListeners[e]||[],this.eventsListeners[e].indexOf(t)===-1&&this.eventsListeners[e].push(t),t},e}(),Ot=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.window=null,e.nativeMethods=rt,e.document=null,e.proxyless=!1,e}return e(r,t),r.prototype.isDeactivated=function(){try{if(this.document.body,this.window[qe.hammerhead]){var e=k(this.window);return!!e&&!q(e,W(e))}}catch(t){}return!0},r.prototype.attach=function(e,t){this.window=e,this.document=t||e.document,this.proxyless=!!ut.get().proxyless},r}(St),bt=function(t){function r(e){var r=t.call(this)||this;return r._waitHammerheadSettings=e,e&&e.then(function(){r._waitHammerheadSettings=null}),r}return e(r,t),r.prototype.gettingSettingInProgress=function(){return!!this._waitHammerheadSettings},r.prototype.delayUntilGetSettings=function(e){return this._waitHammerheadSettings.then(e)},r}(Ot),Et={authorization:"authorization",wwwAuthenticate:"www-authenticate",proxyAuthorization:"proxy-authorization",proxyAuthenticate:"proxy-authenticate",host:"host",referer:"referer",origin:"origin",contentLength:"content-length",cookie:"cookie",setCookie:"set-cookie",ifModifiedSince:"if-modified-since",ifNoneMatch:"if-none-match",contentType:"content-type",location:"location",xFrameOptions:"x-frame-options",sourceMap:"sourcemap",referrerPolicy:"referrer-policy",refresh:"refresh",link:"link",cacheControl:"cache-control",pragma:"pragma",eTag:"etag",contentDisposition:"content-disposition",accept:"accept",contentEncoding:"content-encoding",expires:"expires",trailer:"trailer",transferEncoding:"transfer-encoding",serviceWorkerAllowed:"service-worker-allowed",accessControlAllowOrigin:"access-control-allow-origin",accessControlAllowCredentials:"access-control-allow-credentials",contentSecurityPolicy:"content-security-policy",contentSecurityPolicyReportOnly:"content-security-policy-report-only",xContentSecurityPolicy:"x-content-security-policy",xContentSecurityPolicyReportOnly:"x-content-security-policy-report-only",xWebkitCsp:"x-webkit-csp",isApiRequest:"is-api-request",userAgent:"user-agent"},Pt="~~~TestCafe added this prefix to hide the authentication dialog box~~~",Tt="~~~TestCafe added this prefix to control the authorization flow~~~",Dt=["UNSENT","OPENED","HEADERS_RECEIVED","LOADING","DONE"],xt=function(t){function r(e,r){var o=t.call(this,r)||this;return o._cookieSandbox=e,o.XHR_COMPLETED_EVENT="hammerhead|event|xhr-completed",o.XHR_ERROR_EVENT="hammerhead|event|xhr-error",o.BEFORE_XHR_SEND_EVENT="hammerhead|event|before-xhr-send",o}return e(r,t),r.setRequestOptions=function(e,t,o){r.REQUESTS_OPTIONS.set(e,{withCredentials:t,openArgs:o,headers:[]})},r.createNativeXHR=function(){var e=new rt.XMLHttpRequest;return e.open=rt.xhrOpen,e.abort=rt.xhrAbort,e.send=rt.xhrSend,e.addEventListener=rt.xhrAddEventListener||rt.addEventListener,e.removeEventListener=rt.xhrRemoveEventListener||rt.removeEventListener,e.setRequestHeader=rt.xhrSetRequestHeader,e.getResponseHeader=rt.xhrGetResponseHeader,e.getAllResponseHeaders=rt.xhrGetAllResponseHeaders,e.overrideMimeType=rt.xhrOverrideMimeType,e.dispatchEvent=rt.xhrDispatchEvent||rt.dispatchEvent,e},r.openNativeXhr=function(e,t,r){e.open("POST",t,r),e.setRequestHeader(Et.cacheControl,"no-cache, no-store, must-revalidate")},r._reopenXhr=function(e,t,r){var o=t.openArgs[1],n=e.withCredentials;t.withCredentials=n,t.openArgs[1]=pe(o,n?be.include:be.sameOrigin,r),rt.xhrOpen.apply(e,t.openArgs),t.openArgs[1]=o;for(var i=0,s=t.headers;i<s.length;i++){var a=s[i];rt.xhrSetRequestHeader.apply(e,a)}},r.prototype.attach=function(e){t.prototype.attach.call(this,e);for(var o=this,n=e.XMLHttpRequest.prototype,i=function(){var e=rt.xhrRemoveEventListener||rt.removeEventListener;o.emit(o.XHR_COMPLETED_EVENT,{xhr:this}),e.call(this,"loadend",i)},s=function(){if(!(this.readyState<this.HEADERS_RECEIVED)){var e=rt.xhrRemoveEventListener||rt.removeEventListener;o._cookieSandbox.syncCookie(),e.call(this,"readystatechange",s)}},a=function(){var e=rt.xhrAddEventListener||rt.addEventListener,t=new rt.XMLHttpRequest;return e.call(t,"loadend",i),e.call(t,"readystatechange",s),t},c=0,p=Dt;c<p.length;c++){var l=p[c];rt.objectDefineProperty(a,l,rt.objectGetOwnPropertyDescriptor(rt.XMLHttpRequest,l))}G(e,"XMLHttpRequest",a),rt.objectDefineProperty(n,"constructor",{value:a}),A(n,"abort",function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return o.gettingSettingInProgress()?void o.delayUntilGetSettings(function(){return e.abort.apply(e,t)}):(rt.xhrAbort.apply(this,t),void o.emit(o.XHR_ERROR_EVENT,{err:new Error("XHR aborted"),xhr:this}))}),A(n,"open",function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t[1];return ft(i,{},o.proxyless)===i?(r.setRequestOptions(this,this.withCredentials,t),void rt.xhrOpen.apply(this,t)):o.gettingSettingInProgress()?void o.delayUntilGetSettings(function(){return e.open.apply(e,t)}):(i="string"==typeof i?i:String(i),t[1]=pe(i,this.withCredentials?be.include:be.sameOrigin,o.proxyless),rt.xhrOpen.apply(this,t),t[1]=i,void r.setRequestOptions(this,this.withCredentials,t))}),A(n,"send",function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(o.gettingSettingInProgress())return void o.delayUntilGetSettings(function(){return e.send.apply(e,t)});var a=r.REQUESTS_OPTIONS.get(this);a&&a.withCredentials!==this.withCredentials&&r._reopenXhr(this,a,o.proxyless),o.emit(o.BEFORE_XHR_SEND_EVENT,{xhr:this}),rt.xhrSend.apply(this,t),this.readyState===this.DONE&&i.call(this),s.call(this)}),A(n,"setRequestHeader",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];ge(e[0])&&(e[1]=me(e[1])),rt.xhrSetRequestHeader.apply(this,e);var o=r.REQUESTS_OPTIONS.get(this);o&&o.headers.push([String(e[0]),String(e[1])])}),rt.xhrResponseURLGetter&&L(e.XMLHttpRequest.prototype,"responseURL",{getter:function(){var e=rt.xhrResponseURLGetter.call(this);return o.proxyless?e:ce(e)}}),A(n,"getResponseHeader",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=rt.xhrGetResponseHeader.apply(this,e);return r&&ue(e[0])&&(r=he(r)),r}),A(n,"getAllResponseHeaders",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=rt.xhrGetAllResponseHeaders.apply(this,e);le(r);)r=he(r);return r})},r.REQUESTS_OPTIONS=new WeakMap,r}(bt),Lt=fe(rt.Request&&new rt.Request(location.toString()).credentials),Ht=function(t){function r(e,r){var o=t.call(this,r)||this;return o.cookieSandbox=e,o.FETCH_REQUEST_SENT_EVENT="hammerhead|event|fetch-request-sent-event",o}return e(r,t),r._removeAuthHeadersPrefix=function(e,t){return ge(e)?ye(t):ue(e)?he(t):t},r._processInit=function(e){var t=e.headers;if(!t)return e;U(t)||(t=t?new rt.Headers(t):new rt.Headers,e.headers=t);var r=rt.headersGet.call(t,Et.authorization),o=rt.headersGet.call(t,Et.proxyAuthorization);return null===r||de(r)||rt.headersSet.call(t,Et.authorization,me(r)),null===o||de(o)||rt.headersSet.call(t,Et.proxyAuthorization,me(o)),e},r._processArguments=function(e,t){var o=e[0],n=e[1],i="string"==typeof o,s=fe(n&&n.credentials);if(V(o))s!==be.unknown&&(e[0]=pe(o.url,s)),n&&n.headers&&"worker"!==o.destination&&(e[1]=r._processInit(n));else{var a=i?o:String(o),c=s===be.unknown?Lt:s;e[0]=pe(a,c,t),e[1]=r._processInit(n||{})}},r._processHeaderEntry=function(e,t){if(void 0===t&&(t=!1),e.done)return e;var o=r._removeAuthHeadersPrefix(e.value[0],e.value[1]);return t?e.value=o:e.value[1]=o,e},r._entriesWrapper=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=rt.headersEntries.apply(this,e),n=o.next;return o.next=function(){return r._processHeaderEntry(n.call(o))},o},r._valuesWrapper=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=rt.headersEntries.apply(this,e),n=o.next;return o.next=function(){return r._processHeaderEntry(n.call(o),!0)},o},r.prototype.attach=function(e){if(t.prototype.attach.call(this,e,e.document),rt.fetch){var o=this;this.proxyless||(G(e,"Request",function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r._processArguments(t,o.proxyless),e.Headers.prototype.entries=e.Headers.prototype[Symbol.iterator]=rt.headersEntries;var i=1===t.length?new rt.Request(t[0]):new rt.Request(t[0],t[1]);return e.Headers.prototype.entries=e.Headers.prototype[Symbol.iterator]=r._entriesWrapper,i}),L(e.Request.prototype,"url",{getter:function(){var e=rt.requestUrlGetter.call(this);return o.proxyless?e:ce(e)}}),L(e.Request.prototype,"referrer",{getter:function(){var e=rt.requestReferrerGetter.call(this);return o.proxyless?e:ce(e)}}),L(e.Response.prototype,"url",{getter:function(){var e=rt.responseUrlGetter.call(this);return o.proxyless?e:ce(e)}}),A(e.Headers.prototype,"entries",r._entriesWrapper),A(e.Headers.prototype,Symbol.iterator,r._entriesWrapper),A(e.Headers.prototype,"values",r._valuesWrapper),A(e.Headers.prototype,"forEach",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=e[0];return N(o)&&(e[0]=function(e,t,n){e=r._removeAuthHeadersPrefix(t,e),o.call(this,e,t,n)}),rt.headersForEach.apply(this,e)}),A(e.Headers.prototype,"get",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=rt.headersGet.apply(this,e);return o&&r._removeAuthHeadersPrefix(e[0],o)}),A(e.Headers.prototype,"set",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ge(e[0])&&(e[1]=me(e[1])),rt.headersSet.apply(this,e)})),A(e,"fetch",function(){for(var t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!o.proxyless&&o.gettingSettingInProgress())return o.delayUntilGetSettings(function(){return t.fetch.apply(t,n)});if(!n.length&&!Ye)return rt.fetch.apply(this,n);if(o.proxyless){var s=rt.fetch.apply(this,n);return o.emit(o.FETCH_REQUEST_SENT_EVENT,s),s}try{r._processArguments(n,o.proxyless)}catch(a){return rt.promiseReject.call(o.window.Promise,a)}e.Headers.prototype.entries=e.Headers.prototype[Symbol.iterator]=rt.headersEntries;var c=rt.fetch.apply(this,n);return e.Headers.prototype.entries=e.Headers.prototype[Symbol.iterator]=r._entriesWrapper,o.emit(o.FETCH_REQUEST_SENT_EVENT,c),rt.promiseThen.call(c,function(e){return o.cookieSandbox.syncCookie(),e})})}},r}(bt);!(!rt.WindowPointerEvent&&!rt.WindowMSPointerEvent);var Mt="hammerhead|set-service-worker-settings",Rt={getLocation:"__get$Loc",setLocation:"__set$Loc",getProperty:"__get$",setProperty:"__set$",callMethod:"__call$",
|
|
processScript:"__proc$Script",processHtml:"__proc$Html",getEval:"__get$Eval",getPostMessage:"__get$PostMessage",getProxyUrl:"__get$ProxyUrl",restArray:"__rest$Array",arrayFrom:"__arrayFrom$",restObject:"__rest$Object",swScopeHeaderValue:"__swScopeHeaderValue",getWorkerSettings:"__getWorkerSettings$"},jt={protocol:"",host:"",scope:""},At=function(){function e(){var t=m(location.toString()),r={syncCookie:Oe};t?e._setProxySettings(t.sessionId,t.windowId):this._getBlobSettings(),this.fetch=new Ht(r),this.fetch.attach(self),e._overrideImportScripts(),Xe.isServiceWorker?Se():(this.xhr=new xt(r),this.xhr.attach(self))}return e._setProxySettings=function(e,t){var r=ut.get();r.sessionId=e,r.windowId=t,ut.set(r)},e._overrideImportScripts=function(){A(self,"importScripts",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0;r<e.length;r++)e[r]=ft(e[r],{resourceType:ae({isScript:!0})});return rt.importScripts.apply(self,e)})},e.prototype._getBlobSettings=function(){var t=self[Rt.getWorkerSettings]();e._setProxySettings(t.sessionId,t.windowId),z(t.origin)},e}(),Gt=new At;return Gt}(); |