(()=>{var Oy=Object.create;var xo=Object.defineProperty;var Py=Object.getOwnPropertyDescriptor;var Dy=Object.getOwnPropertyNames;var Uy=Object.getPrototypeOf,My=Object.prototype.hasOwnProperty;var D=(t,e)=>()=>(t&&(e=t(t=0)),e);var Q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Fy=(t,e)=>{for(var r in e)xo(t,r,{get:e[r],enumerable:!0})},Vy=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Dy(e))!My.call(t,i)&&i!==r&&xo(t,i,{get:()=>e[i],enumerable:!(n=Py(e,i))||n.enumerable});return t};var Ky=(t,e,r)=>(r=t!=null?Oy(Uy(t)):{},Vy(e||!t||!t.__esModule?xo(r,"default",{value:t,enumerable:!0}):r,t));function li(t,e){return function(){return t.apply(e,arguments)}}var wo=D(()=>{"use strict"});function Hy(t){return t!==null&&!ui(t)&&t.constructor!==null&&!ui(t.constructor)&&Ft(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}function qy(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&hf(t.buffer),e}function ci(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),vn(t))for(n=0,i=t.length;n0;)if(i=r[n],e===i.toLowerCase())return i;return null}function Eo(){let{caseless:t}=yf(this)&&this||{},e={},r=(n,i)=>{let a=t&&mf(e,i)||i;ba(e[a])&&ba(n)?e[a]=Eo(e[a],n):ba(n)?e[a]=Eo({},n):vn(n)?e[a]=n.slice():e[a]=n};for(let n=0,i=arguments.length;n{"use strict";wo();({toString:$y}=Object.prototype),{getPrototypeOf:Io}=Object,xa=(t=>e=>{let r=$y.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ar=t=>(t=t.toLowerCase(),e=>xa(e)===t),wa=t=>e=>typeof e===t,{isArray:vn}=Array,ui=wa("undefined");hf=ar("ArrayBuffer");Gy=wa("string"),Ft=wa("function"),pf=wa("number"),Sa=t=>t!==null&&typeof t=="object",Wy=t=>t===!0||t===!1,ba=t=>{if(xa(t)!=="object")return!1;let e=Io(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},zy=ar("Date"),jy=ar("File"),Yy=ar("Blob"),Xy=ar("FileList"),Zy=t=>Sa(t)&&Ft(t.pipe),Jy=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ft(t.append)&&((e=xa(t))==="formdata"||e==="object"&&Ft(t.toString)&&t.toString()==="[object FormData]"))},Qy=ar("URLSearchParams"),ev=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");gf=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),yf=t=>!ui(t)&&t!==gf;tv=(t,e,r,{allOwnKeys:n}={})=>(ci(e,(i,a)=>{r&&Ft(i)?t[a]=li(i,r):t[a]=i},{allOwnKeys:n}),t),rv=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),nv=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},iv=(t,e,r,n)=>{let i,a,s,o={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),a=i.length;a-- >0;)s=i[a],(!n||n(s,t,e))&&!o[s]&&(e[s]=t[s],o[s]=!0);t=r!==!1&&Io(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},av=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},sv=t=>{if(!t)return null;if(vn(t))return t;let e=t.length;if(!pf(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ov=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Io(Uint8Array)),lv=(t,e)=>{let n=(t&&t[Symbol.iterator]).call(t),i;for(;(i=n.next())&&!i.done;){let a=i.value;e.call(t,a[0],a[1])}},uv=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},cv=ar("HTMLFormElement"),fv=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ff=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),dv=ar("RegExp"),vf=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};ci(r,(i,a)=>{let s;(s=e(i,a,t))!==!1&&(n[a]=s||i)}),Object.defineProperties(t,n)},hv=t=>{vf(t,(e,r)=>{if(Ft(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(Ft(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},pv=(t,e)=>{let r={},n=i=>{i.forEach(a=>{r[a]=!0})};return vn(t)?n(t):n(String(t).split(e)),r},mv=()=>{},gv=(t,e)=>(t=+t,Number.isFinite(t)?t:e),So="abcdefghijklmnopqrstuvwxyz",df="0123456789",Cf={DIGIT:df,ALPHA:So,ALPHA_DIGIT:So+So.toUpperCase()+df},yv=(t=16,e=Cf.ALPHA_DIGIT)=>{let r="",{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};Cv=t=>{let e=new Array(10),r=(n,i)=>{if(Sa(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;let a=vn(n)?[]:{};return ci(n,(s,o)=>{let l=r(s,i+1);!ui(l)&&(a[o]=l)}),e[i]=void 0,a}}return n};return r(t,0)},bv=ar("AsyncFunction"),xv=t=>t&&(Sa(t)||Ft(t))&&Ft(t.then)&&Ft(t.catch),R={isArray:vn,isArrayBuffer:hf,isBuffer:Hy,isFormData:Jy,isArrayBufferView:qy,isString:Gy,isNumber:pf,isBoolean:Wy,isObject:Sa,isPlainObject:ba,isUndefined:ui,isDate:zy,isFile:jy,isBlob:Yy,isRegExp:dv,isFunction:Ft,isStream:Zy,isURLSearchParams:Qy,isTypedArray:ov,isFileList:Xy,forEach:ci,merge:Eo,extend:tv,trim:ev,stripBOM:rv,inherits:nv,toFlatObject:iv,kindOf:xa,kindOfTest:ar,endsWith:av,toArray:sv,forEachEntry:lv,matchAll:uv,isHTMLForm:cv,hasOwnProperty:ff,hasOwnProp:ff,reduceDescriptors:vf,freezeMethods:hv,toObjectSet:pv,toCamelCase:fv,noop:mv,toFiniteNumber:gv,findKey:mf,global:gf,isContextDefined:yf,ALPHABET:Cf,generateString:yv,isSpecCompliantForm:vv,toJSONObject:Cv,isAsyncFn:bv,isThenable:xv}});function Cn(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}var bf,xf,ue,Cr=D(()=>{"use strict";et();R.inherits(Cn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});bf=Cn.prototype,xf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{xf[t]={value:t}});Object.defineProperties(Cn,xf);Object.defineProperty(bf,"isAxiosError",{value:!0});Cn.from=(t,e,r,n,i,a)=>{let s=Object.create(bf);return R.toFlatObject(t,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Cn.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,a&&Object.assign(s,a),s};ue=Cn});var Ea,Ao=D(()=>{Ea=null});function To(t){return R.isPlainObject(t)||R.isArray(t)}function Sf(t){return R.endsWith(t,"[]")?t.slice(0,-2):t}function wf(t,e,r){return t?t.concat(e).map(function(i,a){return i=Sf(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function wv(t){return R.isArray(t)&&!t.some(To)}function Ev(t,e,r){if(!R.isObject(t))throw new TypeError("target must be an object");e=e||new(Ea||FormData),r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!R.isUndefined(g[m])});let n=r.metaTokens,i=r.visitor||c,a=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(R.isDate(h))return h.toISOString();if(!l&&R.isBlob(h))throw new ue("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(h)||R.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,g){let b=h;if(h&&!g&&typeof h=="object"){if(R.endsWith(m,"{}"))m=n?m:m.slice(0,-2),h=JSON.stringify(h);else if(R.isArray(h)&&wv(h)||(R.isFileList(h)||R.endsWith(m,"[]"))&&(b=R.toArray(h)))return m=Sf(m),b.forEach(function(w,T){!(R.isUndefined(w)||w===null)&&e.append(s===!0?wf([m],T,a):s===null?m:m+"[]",u(w))}),!1}return To(h)?!0:(e.append(wf(g,m,a),u(h)),!1)}let f=[],d=Object.assign(Sv,{defaultVisitor:c,convertValue:u,isVisitable:To});function p(h,m){if(!R.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),R.forEach(h,function(b,I){(!(R.isUndefined(b)||b===null)&&i.call(e,b,R.isString(I)?I.trim():I,m,d))===!0&&p(b,m?m.concat(I):[I])}),f.pop()}}if(!R.isObject(t))throw new TypeError("data must be an object");return p(t),e}var Sv,kr,fi=D(()=>{"use strict";et();Cr();Ao();Sv=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});kr=Ev});function Ef(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function If(t,e){this._pairs=[],t&&kr(t,this,e)}var Af,Ia,Ro=D(()=>{"use strict";fi();Af=If.prototype;Af.append=function(e,r){this._pairs.push([e,r])};Af.toString=function(e){let r=e?function(n){return e.call(this,n,Ef)}:Ef;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};Ia=If});function Iv(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function di(t,e,r){if(!e)return t;let n=r&&r.encode||Iv,i=r&&r.serialize,a;if(i?a=i(e,r):a=R.isURLSearchParams(e)?e.toString():new Ia(e,r).toString(n),a){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}var _o=D(()=>{"use strict";et();Ro()});var Bo,No,Tf=D(()=>{"use strict";et();Bo=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){R.forEach(this.handlers,function(n){n!==null&&e(n)})}},No=Bo});var Aa,ko=D(()=>{"use strict";Aa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var Rf,_f=D(()=>{"use strict";Ro();Rf=typeof URLSearchParams<"u"?URLSearchParams:Ia});var Bf,Nf=D(()=>{"use strict";Bf=typeof FormData<"u"?FormData:null});var kf,Lf=D(()=>{"use strict";kf=typeof Blob<"u"?Blob:null});var Of,Pf=D(()=>{_f();Nf();Lf();Of={isBrowser:!0,classes:{URLSearchParams:Rf,FormData:Bf,Blob:kf},protocols:["http","https","file","blob","url","data"]}});var Lo={};Fy(Lo,{hasBrowserEnv:()=>Df,hasStandardBrowserEnv:()=>Av,hasStandardBrowserWebWorkerEnv:()=>Tv});var Df,Av,Tv,Uf=D(()=>{Df=typeof window<"u"&&typeof document<"u",Av=(t=>Df&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Tv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")()});var bt,bn=D(()=>{Pf();Uf();bt={...Lo,...Of}});function Oo(t,e){return kr(t,new bt.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return bt.isNode&&R.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}var Mf=D(()=>{"use strict";et();fi();bn()});function Rv(t){return R.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _v(t){let e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n=r.length;return s=!s&&R.isArray(i)?i.length:s,l?(R.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o):((!i[s]||!R.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],a)&&R.isArray(i[s])&&(i[s]=_v(i[s])),!o)}if(R.isFormData(t)&&R.isFunction(t.entries)){let r={};return R.forEachEntry(t,(n,i)=>{e(Rv(n),i,r,0)}),r}return null}var Ta,Po=D(()=>{"use strict";et();Ta=Bv});function Nv(t,e,r){if(R.isString(t))try{return(e||JSON.parse)(t),R.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Do,xn,Ra=D(()=>{"use strict";et();Cr();ko();fi();Mf();bn();Po();Do={transitional:Aa,adapter:["xhr","http"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=R.isObject(e);if(a&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return i&&i?JSON.stringify(Ta(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Oo(e,this.formSerializer).toString();if((o=R.isFileList(e))||n.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return kr(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),Nv(e)):e}],transformResponse:[function(e){let r=this.transitional||Do.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&R.isString(e)&&(n&&!this.responseType||i)){let s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ue.from(o,ue.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bt.classes.FormData,Blob:bt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],t=>{Do.headers[t]={}});xn=Do});var kv,Ff,Vf=D(()=>{"use strict";et();kv=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ff=t=>{let e={},r,n,i;return t&&t.split(` `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&kv[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e}});function hi(t){return t&&String(t).trim().toLowerCase()}function _a(t){return t===!1||t==null?t:R.isArray(t)?t.map(_a):String(t)}function Lv(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}function Uo(t,e,r,n,i){if(R.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!R.isString(e)){if(R.isString(n))return e.indexOf(n)!==-1;if(R.isRegExp(n))return n.test(e)}}function Pv(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Dv(t,e){let r=R.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,a,s){return this[n].call(this,e,i,a,s)},configurable:!0})})}var Kf,Ov,wn,xt,en=D(()=>{"use strict";et();Vf();Kf=Symbol("internals");Ov=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());wn=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function a(o,l,u){let c=hi(l);if(!c)throw new Error("header name must be a non-empty string");let f=R.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=_a(o))}let s=(o,l)=>R.forEach(o,(u,c)=>a(u,c,l));return R.isPlainObject(e)||e instanceof this.constructor?s(e,r):R.isString(e)&&(e=e.trim())&&!Ov(e)?s(Ff(e),r):e!=null&&a(r,e,n),this}get(e,r){if(e=hi(e),e){let n=R.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return Lv(i);if(R.isFunction(r))return r.call(this,i,n);if(R.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=hi(e),e){let n=R.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Uo(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function a(s){if(s=hi(s),s){let o=R.findKey(n,s);o&&(!r||Uo(n,n[o],o,r))&&(delete n[o],i=!0)}}return R.isArray(e)?e.forEach(a):a(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let a=r[n];(!e||Uo(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){let r=this,n={};return R.forEach(this,(i,a)=>{let s=R.findKey(n,a);if(s){r[s]=_a(i),delete r[a];return}let o=e?Pv(a):String(a).trim();o!==a&&delete r[a],r[o]=_a(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return R.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&R.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[Kf]=this[Kf]={accessors:{}}).accessors,i=this.prototype;function a(s){let o=hi(s);n[o]||(Dv(i,s),n[o]=!0)}return R.isArray(e)?e.forEach(a):a(e),this}};wn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(wn.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});R.freezeMethods(wn);xt=wn});function pi(t,e){let r=this||xn,n=e||r,i=xt.from(n.headers),a=n.data;return R.forEach(t,function(o){a=o.call(r,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}var $f=D(()=>{"use strict";et();Ra();en()});function mi(t){return!!(t&&t.__CANCEL__)}var Mo=D(()=>{"use strict"});function Hf(t,e,r){ue.call(this,t??"canceled",ue.ERR_CANCELED,e,r),this.name="CanceledError"}var Lr,gi=D(()=>{"use strict";Cr();et();R.inherits(Hf,ue,{__CANCEL__:!0});Lr=Hf});function Fo(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new ue("Request failed with status code "+r.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}var qf=D(()=>{"use strict";Cr()});var Gf,Wf=D(()=>{et();bn();Gf=bt.hasStandardBrowserEnv?{write(t,e,r,n,i,a){let s=[t+"="+encodeURIComponent(e)];R.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),R.isString(n)&&s.push("path="+n),R.isString(i)&&s.push("domain="+i),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}}});function Vo(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}var zf=D(()=>{"use strict"});function Ko(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}var jf=D(()=>{"use strict"});function yi(t,e){return t&&!Vo(e)?Ko(t,e):e}var $o=D(()=>{"use strict";zf();jf()});var Yf,Xf=D(()=>{"use strict";et();bn();Yf=bt.hasStandardBrowserEnv?function(){let e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(a){let s=a;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){let o=R.isString(s)?i(s):s;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}()});function Ho(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var Zf=D(()=>{"use strict"});function Uv(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,a=0,s;return e=e!==void 0?e:1e3,function(l){let u=Date.now(),c=n[a];s||(s=u),r[i]=l,n[i]=u;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-s{"use strict";Jf=Uv});function e0(t,e){let r=0,n=Jf(50,250);return i=>{let a=i.loaded,s=i.lengthComputable?i.total:void 0,o=a-r,l=n(o),u=a<=s;r=a;let c={loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:i};c[e?"download":"upload"]=!0,t(c)}}var Mv,t0,r0=D(()=>{"use strict";et();qf();Wf();_o();$o();Xf();ko();Cr();gi();Zf();bn();en();Qf();Mv=typeof XMLHttpRequest<"u",t0=Mv&&function(t){return new Promise(function(r,n){let i=t.data,a=xt.from(t.headers).normalize(),{responseType:s,withXSRFToken:o}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let c;if(R.isFormData(i)){if(bt.hasStandardBrowserEnv||bt.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((c=a.getContentType())!==!1){let[m,...g]=c?c.split(";").map(b=>b.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...g].join("; "))}}let f=new XMLHttpRequest;if(t.auth){let m=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+g))}let d=yi(t.baseURL,t.url);f.open(t.method.toUpperCase(),di(d,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function p(){if(!f)return;let m=xt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:m,config:t,request:f};Fo(function(w){r(w),u()},function(w){n(w),u()},b),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new ue("Request aborted",ue.ECONNABORTED,t,f)),f=null)},f.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let g=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",b=t.transitional||Aa;t.timeoutErrorMessage&&(g=t.timeoutErrorMessage),n(new ue(g,b.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,t,f)),f=null},bt.hasStandardBrowserEnv&&(o&&R.isFunction(o)&&(o=o(t)),o||o!==!1&&Yf(d))){let m=t.xsrfHeaderName&&t.xsrfCookieName&&Gf.read(t.xsrfCookieName);m&&a.set(t.xsrfHeaderName,m)}i===void 0&&a.setContentType(null),"setRequestHeader"in f&&R.forEach(a.toJSON(),function(g,b){f.setRequestHeader(b,g)}),R.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),s&&s!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",e0(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",e0(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{f&&(n(!m||m.type?new Lr(null,t,f):m),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));let h=Ho(d);if(h&&bt.protocols.indexOf(h)===-1){n(new ue("Unsupported protocol "+h+":",ue.ERR_BAD_REQUEST,t));return}f.send(i||null)})}});var qo,n0,Fv,Ba,Go=D(()=>{et();Ao();r0();Cr();qo={http:Ea,xhr:t0};R.forEach(qo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});n0=t=>`- ${t}`,Fv=t=>R.isFunction(t)||t===null||t===!1,Ba={getAdapter:t=>{t=R.isArray(t)?t:[t];let{length:e}=t,r,n,i={};for(let a=0;a`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build")),s=e?a.length>1?`since : `+a.map(n0).join(` `):" "+n0(a[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:qo}});function Wo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lr(null,t)}function Na(t){return Wo(t),t.headers=xt.from(t.headers),t.data=pi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ba.getAdapter(t.adapter||xn.adapter)(t).then(function(n){return Wo(t),n.data=pi.call(t,t.transformResponse,n),n.headers=xt.from(n.headers),n},function(n){return mi(n)||(Wo(t),n&&n.response&&(n.response.data=pi.call(t,t.transformResponse,n.response),n.response.headers=xt.from(n.response.headers))),Promise.reject(n)})}var i0=D(()=>{"use strict";$f();Mo();Ra();gi();en();Go()});function br(t,e){e=e||{};let r={};function n(u,c,f){return R.isPlainObject(u)&&R.isPlainObject(c)?R.merge.call({caseless:f},u,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(u,c,f){if(R.isUndefined(c)){if(!R.isUndefined(u))return n(void 0,u,f)}else return n(u,c,f)}function a(u,c){if(!R.isUndefined(c))return n(void 0,c)}function s(u,c){if(R.isUndefined(c)){if(!R.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function o(u,c,f){if(f in e)return n(u,c);if(f in t)return n(void 0,u)}let l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(u,c)=>i(a0(u),a0(c),!0)};return R.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=l[c]||i,d=f(t[c],e[c],c);R.isUndefined(d)&&f!==o||(r[c]=d)}),r}var a0,zo=D(()=>{"use strict";et();en();a0=t=>t instanceof xt?t.toJSON():t});var ka,jo=D(()=>{ka="1.6.2"});function Vv(t,e,r){if(typeof t!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let a=n[i],s=e[a];if(s){let o=t[a],l=o===void 0||s(o,a,t);if(l!==!0)throw new ue("option "+a+" must be "+l,ue.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ue("Unknown option "+a,ue.ERR_BAD_OPTION)}}var Yo,s0,La,o0=D(()=>{"use strict";jo();Cr();Yo={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Yo[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});s0={};Yo.transitional=function(e,r,n){function i(a,s){return"[Axios v"+ka+"] Transitional option '"+a+"'"+s+(n?". "+n:"")}return(a,s,o)=>{if(e===!1)throw new ue(i(s," has been removed"+(r?" in "+r:"")),ue.ERR_DEPRECATED);return r&&!s0[s]&&(s0[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,s,o):!0}};La={assertOptions:Vv,validators:Yo}});var Or,Sn,vi,l0=D(()=>{"use strict";et();_o();Tf();i0();zo();$o();o0();en();Or=La.validators,Sn=class{constructor(e){this.defaults=e,this.interceptors={request:new No,response:new No}}request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=br(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&La.assertOptions(n,{silentJSONParsing:Or.transitional(Or.boolean),forcedJSONParsing:Or.transitional(Or.boolean),clarifyTimeoutError:Or.transitional(Or.boolean)},!1),i!=null&&(R.isFunction(i)?r.paramsSerializer={serialize:i}:La.assertOptions(i,{encode:Or.function,serialize:Or.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=a&&R.merge(a.common,a[r.method]);a&&R.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),r.headers=xt.concat(s,a);let o=[],l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});let u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!l){let h=[Na.bind(this),void 0];for(h.unshift.apply(h,o),h.push.apply(h,u),d=h.length,c=Promise.resolve(r);f{"use strict";gi();Ci=class{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a,s=new Promise(o=>{n.subscribe(o),a=o}).then(i);return s.cancel=function(){n.unsubscribe(a)},s},e(function(a,s,o){n.reason||(n.reason=new Lr(a,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new Ci(function(i){e=i}),cancel:e}}},u0=Ci});function Xo(t){return function(r){return t.apply(null,r)}}var f0=D(()=>{"use strict"});function Zo(t){return R.isObject(t)&&t.isAxiosError===!0}var d0=D(()=>{"use strict";et()});var Jo,h0,p0=D(()=>{Jo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Jo).forEach(([t,e])=>{Jo[e]=t});h0=Jo});function m0(t){let e=new vi(t),r=li(vi.prototype.request,e);return R.extend(r,vi.prototype,e,{allOwnKeys:!0}),R.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return m0(br(t,i))},r}var tt,En,g0=D(()=>{"use strict";et();wo();l0();zo();Ra();Po();gi();c0();Mo();jo();fi();Cr();f0();d0();en();Go();p0();tt=m0(xn);tt.Axios=vi;tt.CanceledError=Lr;tt.CancelToken=u0;tt.isCancel=mi;tt.VERSION=ka;tt.toFormData=kr;tt.AxiosError=ue;tt.Cancel=tt.CanceledError;tt.all=function(e){return Promise.all(e)};tt.spread=Xo;tt.isAxiosError=Zo;tt.mergeConfig=br;tt.AxiosHeaders=xt;tt.formToJSON=t=>Ta(R.isHTMLForm(t)?new FormData(t):t);tt.getAdapter=Ba.getAdapter;tt.HttpStatusCode=h0;tt.default=tt;En=tt});var a_,s_,o_,l_,u_,c_,f_,d_,h_,p_,m_,g_,y_,v_,C_,b_,y0=D(()=>{g0();({Axios:a_,AxiosError:s_,CanceledError:o_,isCancel:l_,CancelToken:u_,VERSION:c_,all:f_,Cancel:d_,isAxiosError:h_,spread:p_,toFormData:m_,AxiosHeaders:g_,HttpStatusCode:y_,formToJSON:v_,getAdapter:C_,mergeConfig:b_}=En)});var Qo,te,bi=D(()=>{Qo=class{constructor(e=!1){this.debugMode=e}setDebugMode(e){this.debugMode=e}log(e,...r){this.debugMode&&console.log(`[LOG] ${e}`,...r)}debug(e,...r){this.debugMode&&console.log(`[DEBUG] ${e}`,...r)}info(e,...r){this.debugMode&&console.info(`[INFO] ${e}`,...r)}warn(e,...r){this.debugMode&&console.warn(`[WARN] ${e}`,...r)}error(e,...r){this.debugMode&&console.error(`[ERROR] ${e}`,...r)}},te=new Qo(!1)});function v0(t){Oa={...Oa,...t},te.setDebugMode(Oa?.debug===!0)}function Nt(){return Oa}var Oa,In=D(()=>{bi();Oa={api:{},collector:{},dataCapture:{autoCapture:!1,consoleListener:!0,sessionReplay:{enabled:!1}},debug:!1}});var Pr,ht,Dr=D(()=>{Pr=class{constructor(){this.errors=[]}static getInstance(){return Pr.instance||(Pr.instance=new Pr),Pr.instance}addError(e,r){this.errors.push({message:e,error:r})}getErrors(){return this.errors}},ht=Pr.getInstance()});function el(){if(!Pa&&(Pa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pa))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pa(Kv)}var Pa,Kv,C0=D(()=>{Kv=new Uint8Array(16)});function b0(t,e=0){return(pt[t[e+0]]+pt[t[e+1]]+pt[t[e+2]]+pt[t[e+3]]+"-"+pt[t[e+4]]+pt[t[e+5]]+"-"+pt[t[e+6]]+pt[t[e+7]]+"-"+pt[t[e+8]]+pt[t[e+9]]+"-"+pt[t[e+10]]+pt[t[e+11]]+pt[t[e+12]]+pt[t[e+13]]+pt[t[e+14]]+pt[t[e+15]]).toLowerCase()}var pt,x0=D(()=>{pt=[];for(let t=0;t<256;++t)pt.push((t+256).toString(16).slice(1))});var $v,tl,w0=D(()=>{$v=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tl={randomUUID:$v}});function Hv(t,e,r){if(tl.randomUUID&&!e&&!t)return tl.randomUUID();t=t||{};let n=t.random||(t.rng||el)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return b0(n)}var An,S0=D(()=>{w0();C0();x0();An=Hv});var E0=D(()=>{S0()});var rl,qv,xi,nl=D(()=>{E0();Dr();rl=class{constructor(e=30){this.requestId=An();this.ttlInMinutes=e}clearSession(){localStorage.removeItem("session")}initializeSession(){try{let e=localStorage.getItem("session");if(e){let{sessionId:i,requestId:a,timestamp:s,identity:o}=JSON.parse(e),l=new Date().getTime();if(l-ss.id!==e),this.identities.push(i);let a=this.getSession();a.identity=this.identity,a.identities=this.identities,localStorage.setItem("session",JSON.stringify(a))}getIdentity(){return this.identity?this.identity:null}getIdentities(){return this.identities?this.identities:null}},qv=new rl,xi=qv});function I0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");il(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function A0(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]{il=function(t,e){return il=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},il(t,e)};wi=function(){return wi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0){var n=t[r].toLowerCase();n!==t[r]?e+=" ".concat(n):e+=t[r]}else e+=t[r].toUpperCase();return e}function Gv(t,e){return function(r,n){return Object.prototype.hasOwnProperty.call(r,n)}(t,e)?t[e]:void 0}function m1(t,e){var r=[];return function(n,i){var a=5,s=(d=n,p=Ii([],d,!0),{current:function(){return p[0]},postpone:function(){var m=p.shift();m!==void 0&&p.push(m)},exclude:function(){p.shift()}}),o=(u=100,c=3e3,f=0,function(){return Math.random()*Math.min(c,u*Math.pow(2,f++))}),l=s.current(),u,c,f,d,p;if(l===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var h=function(m,g){return i(m).catch(function(b){if(g+1>=a)throw b;(function(T){if(!(T instanceof Error))return!1;var B=T.message;return B===sl||B===ll})(b)?s.exclude():s.postpone();var I,w=s.current();if(w===void 0)throw b;return(I=o(),new Promise(function(T){return setTimeout(T,I)})).then(function(){return h(w,g+1)})})};return h(l,0)}(t,function(n){var i=new Date,a=function(o){return r.push({url:n,startedAt:i,finishedAt:new Date,error:o})},s=e(n);return s.then(function(){return a()},a),s}).then(function(n){return[n,r]})}function y1(t){var e;t.scriptUrlPattern;var r=t.token,n=t.apiKey,i=n===void 0?r:n,a=A0(t,["scriptUrlPattern","token","apiKey"]),s=(e=Gv(t,"scriptUrlPattern"))!==null&&e!==void 0?e:_0,o=function(){var c=[],f=function(){c.push({time:new Date,state:document.visibilityState})},d=function(p,h,m,g){return p.addEventListener(h,m,g),function(){return p.removeEventListener(h,m,g)}}(document,"visibilitychange",f);return f(),[c,d]}(),l=o[0],u=o[1];return Promise.resolve().then(function(){if(!i||typeof i!="string")throw new Error(ol);var c=function(f,d){return(Array.isArray(f)?f:[f]).map(function(p){return function(h,m){var g=encodeURIComponent;return h.replace(/<[^<>]+>/g,function(b){return b===""?"3":b===""?g(m):b===""?g(p1):b})}(String(p),d)})}(s,i);return m1(c,v1)}).catch(function(c){throw u(),function(f){return f instanceof Error&&f.message===ll?new Error(ul):f}(c)}).then(function(c){var f=c[0],d=c[1];return u(),f.load(wi(wi({},a),{ldi:{attempts:d,visibilityStates:l}}))})}function v1(t){return function(e,r,n,i){var a,s=document,o="securitypolicyviolation",l=function(c){var f=new URL(e,location.href),d=c.blockedURI;d!==f.href&&d!==f.protocol.slice(0,-1)&&d!==f.origin||(a=c,u())};s.addEventListener(o,l);var u=function(){return s.removeEventListener(o,l)};return i?.then(u,u),Promise.resolve().then(r).then(function(c){return u(),c},function(c){return new Promise(function(f){return setTimeout(f)}).then(function(){if(u(),a)return n(a);throw c})})}(t,function(){return function(e){return new Promise(function(r,n){var i=document.createElement("script"),a=function(){var o;return(o=i.parentNode)===null||o===void 0?void 0:o.removeChild(i)},s=document.head||document.getElementsByTagName("head")[0];i.onload=function(){a(),r()},i.onerror=function(){a(),n(new Error(ul))},i.async=!0,i.src=e,s.appendChild(i)})}(t)},function(){throw new Error(sl)}).then(C1)}function C1(){var t=window,e="__fpjs_p_l_b",r=t[e];if(function(n,i){var a,s=(a=Object.getOwnPropertyDescriptor)===null||a===void 0?void 0:a.call(Object,n,i);s?.configurable?delete n[i]:s&&!s.writable||(n[i]=void 0)}(t,e),typeof r?.load!="function")throw new Error(ll);return r}var Wv,zv,jv,Yv,Xv,Zv,sl,Jv,Qv,e1,t1,r1,n1,i1,ol,T0,R0,a1,s1,o1,l1,u1,c1,f1,d1,h1,p1,ll,_0,g1,ul,B0,N0=D(()=>{al();Wv={default:"endpoint"},zv={default:"tlsEndpoint"},jv="Client timeout",Yv="Network connection error",Xv="Network request aborted",Zv="Response cannot be parsed",sl="Blocked by CSP",Jv="The endpoint parameter is not a valid URL",Qv=Tn("WrongRegion"),e1=Tn("SubscriptionNotActive"),t1=Tn("UnsupportedVersion"),r1=Tn("InstallationMethodRestricted"),n1=Tn("HostnameRestricted"),i1=Tn("IntegrationFailed"),ol="API key required",T0="API key not found",R0="API key expired",a1="Request cannot be parsed",s1="Request failed",o1="Request failed to process",l1="Too many requests, rate limit exceeded",u1="Not available for this origin",c1="Not available with restricted header",f1=ol,d1=T0,h1=R0,p1="3.8.6",ll="9319";_0="https://fpnpmcdn.net/v//loader_v.js",g1=_0,ul="Failed to load the JS script of the agent";B0={load:y1,defaultScriptUrlPattern:g1,ERROR_SCRIPT_LOAD_FAIL:ul,ERROR_API_KEY_EXPIRED:R0,ERROR_API_KEY_INVALID:T0,ERROR_API_KEY_MISSING:ol,ERROR_BAD_REQUEST_FORMAT:a1,ERROR_BAD_RESPONSE_FORMAT:Zv,ERROR_CLIENT_TIMEOUT:jv,ERROR_CSP_BLOCK:sl,ERROR_FORBIDDEN_ENDPOINT:n1,ERROR_FORBIDDEN_HEADER:c1,ERROR_FORBIDDEN_ORIGIN:u1,ERROR_GENERAL_SERVER_FAILURE:s1,ERROR_INSTALLATION_METHOD_RESTRICTED:r1,ERROR_INTEGRATION_FAILURE:i1,ERROR_INVALID_ENDPOINT:Jv,ERROR_NETWORK_ABORT:Xv,ERROR_NETWORK_CONNECTION:Yv,ERROR_RATE_LIMIT:l1,ERROR_SERVER_TIMEOUT:o1,ERROR_SUBSCRIPTION_NOT_ACTIVE:e1,ERROR_TOKEN_EXPIRED:h1,ERROR_TOKEN_INVALID:d1,ERROR_TOKEN_MISSING:f1,ERROR_UNSUPPORTED_VERSION:t1,ERROR_WRONG_REGION:Qv,defaultEndpoint:Wv,defaultTlsEndpoint:zv}});function wr(t,e,r,n){return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(c){a(c)}}function o(u){try{l(n.throw(u))}catch(c){a(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof r?c:new r(function(f){f(c)})).then(s,o)}l((n=n.apply(t,e||[])).next())})}function Sr(t,e){var r,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){s=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=i+r?(i=s,[4,Ri(0)]):[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return++a,[3,1];case 4:return[2,n]}})})}function Ti(t){t.then(void 0,function(){})}function Ur(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]+e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]+e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]+e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]+e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function Vt(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]*e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]*e[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=t[3]*e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]*e[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[2]*e[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[3]*e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function Rn(t,e){return(e%=64)===32?[t[1],t[0]]:e<32?[t[0]<>>32-e,t[1]<>>32-e]:(e-=32,[t[1]<>>32-e,t[0]<>>32-e])}function Dt(t,e){return(e%=64)===0?t:e<32?[t[0]<>>32-e,t[1]<>>1]),t=He(t=Vt(t,[4283543511,3981806797]),[0,t[0]>>>1]),t=He(t=Vt(t,[3301882366,444984403]),[0,t[0]>>>1])}function b1(t,e){e=e||0;var r,n=(t=t||"").length%16,i=t.length-n,a=[0,e],s=[0,e],o=[0,0],l=[0,0],u=[2277735313,289559509],c=[1291169091,658871167];for(r=0;r>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function cl(t){return parseInt(t)}function Yt(t){return parseFloat(t)}function xr(t,e){return typeof t=="number"&&isNaN(t)?e:t}function Xt(t){return t.reduce(function(e,r){return e+(r?1:0)},0)}function W0(t,e){if(e===void 0&&(e=1),Math.abs(e)>=1)return Math.round(t/e)*e;var r=1/e;return Math.round(t*r)/r}function P0(t){return t&&typeof t=="object"&&"message"in t?t:{message:t}}function x1(t){return typeof t!="function"}function w1(t,e,r){var n=Object.keys(t).filter(function(a){return!function(s,o){for(var l=0,u=s.length;l=4}function S1(){var t=window,e=navigator;return Xt(["msWriteProfilerMark"in t,"MSStream"in t,"msLaunchUri"in e,"msSaveBlob"in e])>=3&&!z0()}function yl(){var t=window,e=navigator;return Xt(["webkitPersistentStorage"in e,"webkitTemporaryStorage"in e,e.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in t,"BatteryManager"in t,"webkitMediaStream"in t,"webkitSpeechGrammar"in t])>=5}function Ai(){var t=window,e=navigator;return Xt(["ApplePayError"in t,"CSSPrimitiveValue"in t,"Counter"in t,e.vendor.indexOf("Apple")===0,"getStorageUpdates"in e,"WebKitMediaKeys"in t])>=4}function vl(){var t=window;return Xt(["safari"in t,!("DeviceMotionEvent"in t),!("ongestureend"in t),!("standalone"in navigator)])>=3}function E1(){var t,e,r=window;return Xt(["buildID"in navigator,"MozAppearance"in((e=(t=document.documentElement)===null||t===void 0?void 0:t.style)!==null&&e!==void 0?e:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function I1(){var t=document;return t.fullscreenElement||t.msFullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||null}function j0(){var t=yl(),e=E1();if(!t&&!e)return!1;var r=window;return Xt(["onorientationchange"in r,"orientation"in r,t&&!("SharedWorker"in r),e&&/android/i.test(navigator.appVersion)])>=2}function D0(t){var e=new Error(t);return e.name=t,e}function U0(t,e,r){var n,i,a;return r===void 0&&(r=50),wr(this,void 0,void 0,function(){var s,o;return Sr(this,function(l){switch(l.label){case 0:s=document,l.label=1;case 1:return s.body?[3,3]:[4,Ri(r)];case 2:return l.sent(),[3,1];case 3:o=s.createElement("iframe"),l.label=4;case 4:return l.trys.push([4,,10,11]),[4,new Promise(function(u,c){var f=!1,d=function(){f=!0,u()};o.onload=d,o.onerror=function(m){f=!0,c(m)};var p=o.style;p.setProperty("display","block","important"),p.position="absolute",p.top="0",p.left="0",p.visibility="hidden",e&&"srcdoc"in o?o.srcdoc=e:o.src="about:blank",s.body.appendChild(o);var h=function(){var m,g;f||(((g=(m=o.contentWindow)===null||m===void 0?void 0:m.document)===null||g===void 0?void 0:g.readyState)==="complete"?d():setTimeout(h,10))};h()})];case 5:l.sent(),l.label=6;case 6:return!((i=(n=o.contentWindow)===null||n===void 0?void 0:n.document)===null||i===void 0)&&i.body?[3,8]:[4,Ri(r)];case 7:return l.sent(),[3,6];case 8:return[4,t(o,o.contentWindow)];case 9:return[2,l.sent()];case 10:return(a=o.parentNode)===null||a===void 0||a.removeChild(o),[7];case 11:return[2]}})})}function A1(t){for(var e=function(u){for(var c,f,d="Unexpected syntax '".concat(u,"'"),p=/^\s*([a-z-]*)(.*)$/i.exec(u),h=p[1]||void 0,m={},g=/([.:#][\w-]+|\[.+?\])/gi,b=function(B,N){m[B]=m[B]||[],m[B].push(N)};;){var I=g.exec(p[2]);if(!I)break;var w=I[0];switch(w[0]){case".":b("class",w.slice(1));break;case"#":b("id",w.slice(1));break;case"[":var T=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(w);if(!T)throw new Error(d);b(T[1],(f=(c=T[4])!==null&&c!==void 0?c:T[5])!==null&&f!==void 0?f:"");break;default:throw new Error(d)}}return[h,m]}(t),r=e[0],n=e[1],i=document.createElement(r??"div"),a=0,s=Object.keys(n);a{gl=function(){return gl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r.6*c.length})).sort(),[2,a]}var l})})},fontPreferences:function(){return function(t,e){return e===void 0&&(e=4e3),U0(function(r,n){var i=n.document,a=i.body,s=a.style;s.width="".concat(e,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",yl()?a.style.zoom="".concat(1/n.devicePixelRatio):Ai()&&(a.style.zoom="reset");var o=i.createElement("div");return o.textContent=q0([],Array(e/20<<0),!0).map(function(){return"word"}).join(" "),a.appendChild(o),t(i,a)},'')}(function(t,e){for(var r={},n={},i=0,a=Object.keys(ml);i=3}())return-1;var r=new e(1,5e3,44100),n=r.createOscillator();n.type="triangle",n.frequency.value=1e4;var i=r.createDynamicsCompressor();i.threshold.value=-50,i.knee.value=40,i.ratio.value=12,i.attack.value=0,i.release.value=.25,n.connect(i),i.connect(r.destination),n.start(0);var a=function(u){var c=3,f=500,d=500,p=5e3,h=function(){};return[new Promise(function(m,g){var b=!1,I=0,w=0;u.oncomplete=function(N){return m(N.renderedBuffer)};var T=function(){setTimeout(function(){return g(D0("timeout"))},Math.min(d,w+p-Date.now()))},B=function(){try{var N=u.startRendering();switch(G0(N)&&Ti(N),u.state){case"running":w=Date.now(),b&&T();break;case"suspended":document.hidden||I++,b&&I>=c?g(D0("suspended")):setTimeout(B,f)}}catch(H){g(H)}};B(),h=function(){b||(b=!0,w>0&&T())}}),h]}(r),s=a[0],o=a[1],l=s.then(function(u){return function(c){for(var f=0,d=0;d=3||r.push(e.languages);else if(typeof e.languages=="string"){var i=e.languages;i&&r.push(i.split(","))}return r},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return xr(Yt(navigator.deviceMemory),void 0)},screenResolution:function(){var t=screen,e=function(n){return xr(cl(n),null)},r=[e(t.width),e(t.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return xr(cl(navigator.hardwareConcurrency),void 0)},timezone:function(){var t,e=(t=window.Intl)===null||t===void 0?void 0:t.DateTimeFormat;if(e){var r=new e().resolvedOptions().timeZone;if(r)return r}var n,i=(n=new Date().getFullYear(),-Math.max(Yt(new Date(n,0,1).getTimezoneOffset()),Yt(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(i>=0?"+":"").concat(Math.abs(i))},sessionStorage:function(){try{return!!window.sessionStorage}catch{return!0}},localStorage:function(){try{return!!window.localStorage}catch{return!0}},indexedDB:function(){if(!z0()&&!S1())try{return!!window.indexedDB}catch{return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var t=navigator.platform;return t==="MacIntel"&&Ai()&&!vl()?function(){if(navigator.platform==="iPad")return!0;var e=screen,r=e.width/e.height;return Xt(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,r>.65&&r<1.53])>=2}()?"iPad":"iPhone":t},plugins:function(){var t=navigator.plugins;if(t){for(var e=[],r=0;r{In();N0();J0();bi();Dr();Mr=class{static async get(){try{let e=await Mr.getVisitorIdPro(),r=await Mr.getVisitorIdV3(),n=r?.visitorId||null,i=r?.components||void 0;return te.info(`Fp: v3=${n}, pro=${e}`),{visitorIdPro:e,visitorIdV3:n}}catch(e){return te.error("Could not get fp",e),{visitorIdPro:null,visitorIdV3:null}}}static async getVisitorIdPro(){try{let e=Nt().collector?.fingerprint?.fingerprintPro;if(e?.key&&e?.enabled)return(await(await B0.load({apiKey:e?.key})).get()).visitorId||null}catch(e){ht.addError("Could not get Fingerprint PRO ID",e)}return null}static async getVisitorIdV3(){try{return await(await Z0.load()).get()}catch(e){ht.addError("Could not get Fingerprint V3 ID",e)}return{visitorId:null,components:void 0}}}});var Cl,ed,td=D(()=>{Dr();Cl=class{static async get(){try{let e=navigator?.languages||[],r=navigator?.language||e[0]||"";return e.length===0&&!r?(ht.addError("No language information available",new Error("Browser language detection failed")),null):{supported:e,preferred:r}}catch(e){return ht.addError("Language detection failed",e instanceof Error?e:new Error(String(e))),null}}},ed=Cl});var bl,rd,nd=D(()=>{Dr();bl=class{static async get(){try{let e=window.performance;if(!e)return null;let r=e.getEntriesByType("navigation")[0];return r?{pageLoad:r.loadEventEnd-r.startTime,domReady:r.domContentLoadedEventEnd-r.startTime,dns:r.domainLookupEnd-r.domainLookupStart,tcp:r.connectEnd-r.connectStart,ttfb:r.responseStart-r.requestStart}:null}catch(e){return ht.addError("Performance inspection failed",e),null}}},rd=bl});var kt,xl=D(()=>{kt=class{static sleep(e){return new Promise(r=>setTimeout(r,e))}static isConstantLike(e){return typeof e=="string"&&!e.match(/[^A-Z0-9_x]/)}static getConstantsFromPrototype(e){return Object.keys(e.__proto__).filter(kt.isConstantLike)}static recur(e,r=new WeakSet,n=!1){if(r.has(e))return{};try{r.add(e)}catch{}var i=n?[]:{};for(var a in e)try{let s;if(a==="enabledPlugin"||typeof e[a]=="function")continue;Array.isArray(e[a])?typeof e[a][0]=="object"?(s=kt.recur(e[a],r,!0),i[a]=s.length?s:e[a]):i[a]=e[a]:typeof e[a]=="object"?(s=kt.recur(e[a],r),Object.keys(s).length&&(i[a]=s)):n?i.push(e[a]):i[a]=e[a]}catch{}return i}static isValidUrlOrPath(e){try{if(!e)return!1;if(e.startsWith("/"))return!0;if(e.startsWith("http://")||e.startsWith("https://"))return new URL(e),!0}catch{return!1}return!1}static onRedirectPage(e){if(!kt.isValidUrlOrPath(e))return!1;var r=e===window.location.pathname;if(!r)try{r=new URL(e,window.location.origin).href===window.location.href}catch{}return r}}});var _i,id=D(()=>{xl();_i=class{static async get(){let e=await kt.recur(window.screen),r=await kt.recur(window.visualViewport),n=["innerWidth","innerHeight","outerWidth","outerHeight","screenX","screenY","screenLeft","screenTop"],i={};n.forEach(l=>{if(l in window)try{i[l]=window[l]}catch{i[l]="error"}else i[l]=null});let a=window.screen.width,s=window.screen.height,o=window.devicePixelRatio;return i.widthRaw=a,i.heightRaw=s,i.width=Math.floor(o*a),i.height=Math.floor(o*s),{...e,...r,...i}}}});var Bi,ad=D(()=>{Bi=class{static async get(){return new Promise(e=>{let r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date().getTimezoneOffset()/60;e({timezone:r,offset_hours:n})})}}});var P1,Ua,wl=D(()=>{P1="0.2.68/466f33bf",Ua=P1});var ie=Q((nB,sd)=>{sd.exports={options:{usePureJavaScript:!1}}});var ud=Q((iB,ld)=>{var Sl={};ld.exports=Sl;var od={};Sl.encode=function(t,e,r){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(t instanceof Uint8Array))n=D1(t,e);else{var i=0,a=e.length,s=e.charAt(0),o=[0];for(i=0;i0;)o.push(u%a),u=u/a|0}for(i=0;t[i]===0&&i=0;--i)n+=e[o[i]]}if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join(`\r `)}return n};Sl.decode=function(t,e){if(typeof t!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var r=od[e];if(!r){r=od[e]=[];for(var n=0;n>=8;for(;u>0;)s.push(u&255),u>>=8}for(var c=0;t[c]===a&&c0;)a.push(o%n),o=o/n|0}var l="";for(r=0;t.at(r)===0&&r=0;--r)l+=e[a[r]];return l}});var xe=Q((aB,hd)=>{var cd=ie(),fd=ud(),E=hd.exports=cd.util=cd.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){E.nextTick=process.nextTick,typeof setImmediate=="function"?E.setImmediate=setImmediate:E.setImmediate=E.nextTick;return}if(typeof setImmediate=="function"){E.setImmediate=function(){return setImmediate.apply(void 0,arguments)},E.nextTick=function(o){return setImmediate(o)};return}if(E.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(l){if(l.source===window&&l.data===t){l.stopPropagation();var u=e.slice();e.length=0,u.forEach(function(c){c()})}};var s=o,t="forge.setImmediate",e=[];E.setImmediate=function(l){e.push(l),e.length===1&&window.postMessage(t,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),n=!0,i=document.createElement("div"),e=[];new MutationObserver(function(){var l=e.slice();e.length=0,l.forEach(function(u){u()})}).observe(i,{attributes:!0});var a=E.setImmediate;E.setImmediate=function(l){Date.now()-r>15?(r=Date.now(),a(l)):(e.push(l),e.length===1&&i.setAttribute("a",n=!n))}}E.nextTick=E.setImmediate})();E.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;E.globalScope=function(){return E.isNodejs?global:typeof self>"u"?window:self}();E.isArray=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};E.isArrayBuffer=function(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer};E.isArrayBufferView=function(t){return t&&E.isArrayBuffer(t.buffer)&&t.byteLength!==void 0};function Ni(t){if(!(t===8||t===16||t===24||t===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}E.ByteBuffer=El;function El(t){if(this.data="",this.read=0,typeof t=="string")this.data=t;else if(E.isArrayBuffer(t)||E.isArrayBufferView(t))if(typeof Buffer<"u"&&t instanceof Buffer)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var r=0;rU1&&(this.data.substr(0,1),this._constructedStringLength=0)};E.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};E.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};E.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))};E.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)e&1&&(r+=t),e>>>=1,e>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this};E.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this};E.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(E.encodeUtf8(t))};E.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};E.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};E.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};E.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255))};E.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))};E.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))};E.ByteStringBuffer.prototype.putInt=function(t,e){Ni(e);var r="";do e-=8,r+=String.fromCharCode(t>>e&255);while(e>0);return this.putBytes(r)};E.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e};E.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e};E.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):t===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};E.ByteStringBuffer.prototype.bytes=function(t){return typeof t>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+t)};E.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)};E.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this};E.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};E.ByteStringBuffer.prototype.copy=function(){var t=E.createBuffer(this.data);return t.read=this.read,t};E.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};E.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};E.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this};E.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this};E.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this};E.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this};E.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this};E.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this};E.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this};E.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this};E.DataBuffer.prototype.putInt=function(t,e){Ni(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,t>>e&255);while(e>0);return this};E.DataBuffer.prototype.putSignedInt=function(t,e){return Ni(e),this.accommodate(e/8),t<0&&(t+=2<0);return e};E.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e};E.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):t===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};E.DataBuffer.prototype.bytes=function(t){return typeof t>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+t)};E.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)};E.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this};E.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};E.DataBuffer.prototype.copy=function(){return new E.DataBuffer(this)};E.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};E.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};E.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this};E.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)e&1&&(r+=t),e>>>=1,e>0&&(t+=t);return r};E.xorBytes=function(t,e,r){for(var n="",i="",a="",s=0,o=0;r>0;--r,++s)i=t.charCodeAt(s)^e.charCodeAt(s),o>=10&&(n+=a,a="",o=0),a+=String.fromCharCode(i),++o;return n+=a,n};E.hexToBytes=function(t){var e="",r=0;for(t.length&!0&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255)};var Fr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Vr=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],dd="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";E.encode64=function(t,e){for(var r="",n="",i,a,s,o=0;o>2),r+=Fr.charAt((i&3)<<4|a>>4),isNaN(a)?r+="==":(r+=Fr.charAt((a&15)<<2|s>>6),r+=isNaN(s)?"=":Fr.charAt(s&63)),e&&r.length>e&&(n+=r.substr(0,e)+`\r `,r=r.substr(e));return n+=r,n};E.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",r,n,i,a,s=0;s>4),i!==64&&(e+=String.fromCharCode((n&15)<<4|i>>2),a!==64&&(e+=String.fromCharCode((i&3)<<6|a)));return e};E.encodeUtf8=function(t){return unescape(encodeURIComponent(t))};E.decodeUtf8=function(t){return decodeURIComponent(escape(t))};E.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:fd.encode,decode:fd.decode}};E.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)};E.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length)),r=r||0;for(var i=r,a=0;a>2),r+=Fr.charAt((i&3)<<4|a>>4),isNaN(a)?r+="==":(r+=Fr.charAt((a&15)<<2|s>>6),r+=isNaN(s)?"=":Fr.charAt(s&63)),e&&r.length>e&&(n+=r.substr(0,e)+`\r `,r=r.substr(e));return n+=r,n};E.binary.base64.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(Math.ceil(t.length/4)*3)),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var i,a,s,o,l=0,u=r;l>4,s!==64&&(n[u++]=(a&15)<<4|s>>2,o!==64&&(n[u++]=(s&3)<<6|o));return e?u-r:n.subarray(0,u)};E.binary.base58.encode=function(t,e){return E.binary.baseN.encode(t,dd,e)};E.binary.base58.decode=function(t,e){return E.binary.baseN.decode(t,dd,e)};E.text={utf8:{},utf16:{}};E.text.utf8.encode=function(t,e,r){t=E.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length)),r=r||0;for(var i=r,a=0;a"u"&&(r=["web","flash"]);var i,a=!1,s=null;for(var o in r){i=r[o];try{if(i==="flash"||i==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");n=t.apply(this,e),a=i==="flash"}(i==="web"||i==="both")&&(e[0]=localStorage,n=t.apply(this,e),a=!0)}catch(l){s=l}if(a)break}if(!a)throw s;return n};E.setItem=function(t,e,r,n,i){Ma(F1,arguments,i)};E.getItem=function(t,e,r,n){return Ma(V1,arguments,n)};E.removeItem=function(t,e,r,n){Ma(K1,arguments,n)};E.clearItems=function(t,e,r){Ma($1,arguments,r)};E.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0};E.format=function(t){for(var e=/%./g,r,n,i=0,a=[],s=0;r=e.exec(t);){n=t.substring(s,e.lastIndex-2),n.length>0&&a.push(n),s=e.lastIndex;var o=r[0][1];switch(o){case"s":case"o":i");break;case"%":a.push("%");break;default:a.push("<%"+o+"?>")}}return a.push(t.substring(s)),a.join("")};E.formatNumber=function(t,e,r,n){var i=t,a=isNaN(e=Math.abs(e))?2:e,s=r===void 0?",":r,o=n===void 0?".":n,l=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",c=u.length>3?u.length%3:0;return l+(c?u.substr(0,c)+o:"")+u.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+o)+(a?s+Math.abs(i-u).toFixed(a).slice(2):"")};E.formatSize=function(t){return t>=1073741824?t=E.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?t=E.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?t=E.formatNumber(t/1024,0)+" KiB":t=E.formatNumber(t,0)+" bytes",t};E.bytesFromIP=function(t){return t.indexOf(".")!==-1?E.bytesFromIPv4(t):t.indexOf(":")!==-1?E.bytesFromIPv6(t):null};E.bytesFromIPv4=function(t){if(t=t.split("."),t.length!==4)return null;for(var e=E.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1))}e.push(a)}if(r.length>0){var l=r[n];l.end-l.start>0&&(e.splice(l.start,l.end-l.start+1,""),l.start===0&&e.unshift(""),l.end===7&&e.push(""))}return e.join(":")};E.estimateCores=function(t,e){if(typeof t=="function"&&(e=t,t={}),t=t||{},"cores"in E&&!t.update)return e(null,E.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return E.cores=navigator.hardwareConcurrency,e(null,E.cores);if(typeof Worker>"u")return E.cores=1,e(null,E.cores);if(typeof Blob>"u")return E.cores=2,e(null,E.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(s){for(var o=Date.now(),l=o+4;Date.now()p.st&&c.stc.st&&p.st{var lt=ie();xe();pd.exports=lt.cipher=lt.cipher||{};lt.cipher.algorithms=lt.cipher.algorithms||{};lt.cipher.createCipher=function(t,e){var r=t;if(typeof r=="string"&&(r=lt.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new lt.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})};lt.cipher.createDecipher=function(t,e){var r=t;if(typeof r=="string"&&(r=lt.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new lt.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})};lt.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),lt.cipher.algorithms[t]=e};lt.cipher.getAlgorithm=function(t){return t=t.toUpperCase(),t in lt.cipher.algorithms?lt.cipher.algorithms[t]:null};var Tl=lt.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};Tl.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=lt.util.createBuffer(),this.output=t.output||lt.util.createBuffer(),this.mode.start(e)};Tl.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};Tl.prototype.finish=function(t){t&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return t(this.blockSize,r,!1)},this.mode.unpad=function(r){return t(this.blockSize,r,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var _l=Q((oB,md)=>{var ut=ie();xe();ut.cipher=ut.cipher||{};var ce=md.exports=ut.cipher.modes=ut.cipher.modes||{};ce.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ce.ecb.prototype.start=function(t){};ce.ecb.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return n>this.blockSize<<2?!1:(t.truncate(n),!0)};ce.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ce.cbc.prototype.start=function(t){if(t.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in t)this._iv=Va(t.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};ce.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return n>this.blockSize<<2?!1:(t.truncate(n),!0)};ce.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=ut.util.createBuffer(),this._partialBytes=0};ce.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=Va(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ce.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i0)t.read-=this.blockSize;else for(var i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ce.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i0)t.read-=this.blockSize;else for(var i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ce.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=ut.util.createBuffer(),this._partialBytes=0};ce.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=Va(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ce.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(t.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i0)t.read-=this.blockSize;else for(var i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ce.ofb.prototype.decrypt=ce.ofb.prototype.encrypt;ce.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=ut.util.createBuffer(),this._partialBytes=0};ce.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=Va(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ce.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}Ka(this._inBlock)};ce.ctr.prototype.decrypt=ce.ctr.prototype.encrypt;ce.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=ut.util.createBuffer(),this._partialBytes=0,this._R=3774873600};ce.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e=ut.util.createBuffer(t.iv);this._cipherLength=0;var r;if("additionalData"in t?r=ut.util.createBuffer(t.additionalData):r=ut.util.createBuffer(),"tagLength"in t?this._tagLength=t.tagLength:this._tagLength=128,this._tag=null,t.decrypt&&(this._tag=ut.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=e.length();if(n===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(Rl(n*8)))}this._inBlock=this._j0.slice(0),Ka(this._inBlock),this._partialBytes=0,r=ut.util.createBuffer(r),this._aDataLength=Rl(r.length()*8);var i=r.length()%this.blockSize;for(i&&r.fillWithByte(0,this.blockSize-i),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};ce.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear();for(var i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Ka(this._inBlock)};ce.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Ka(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)e[n]=t[n]>>>1|(t[n-1]&1)<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)};ce.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=r/8|0,i=t[n]>>>(7-r%8)*4&15,a=this._m[r][i];e[0]^=a[0],e[1]^=a[1],e[2]^=a[2],e[3]^=a[3]}return e};ce.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)};ce.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,i=16*r,a=new Array(i),s=0;s>>1,i=new Array(r);i[n]=t.slice(0);for(var a=n>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a4){var r=t;t=ut.util.createBuffer();for(var n=0;n{var ke=ie();Fa();_l();xe();Cd.exports=ke.aes=ke.aes||{};ke.aes.startEncrypting=function(t,e,r,n){var i=$a({key:t,output:r,decrypt:!1,mode:n});return i.start(e),i};ke.aes.createEncryptionCipher=function(t,e){return $a({key:t,output:null,decrypt:!1,mode:e})};ke.aes.startDecrypting=function(t,e,r,n){var i=$a({key:t,output:r,decrypt:!0,mode:n});return i.start(e),i};ke.aes.createDecryptionCipher=function(t,e){return $a({key:t,output:null,decrypt:!0,mode:e})};ke.aes.Algorithm=function(t,e){kl||yd();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:function(n,i){return Nl(r._w,n,i,!1)},decrypt:function(n,i){return Nl(r._w,n,i,!0)}}}),r._init=!1};ke.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e=t.key,r;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=ke.util.createBuffer(e);else if(ke.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){r=e,e=ke.util.createBuffer();for(var n=0;n>>2;for(var n=0;n>8^o&255^99,St[r]=o,Bl[o]=r,l=t[o],i=t[r],a=t[i],s=t[a],u=l<<24^o<<16^o<<8^(o^l),c=(i^a^s)<<24^(r^s)<<16^(r^a^s)<<8^(r^i^s);for(var f=0;f<4;++f)tn[f][r]=u,Zt[f][o]=c,u=u<<24|u>>>8,c=c<<24|c>>>8;r===0?r=n=1:(r=i^t[t[t[i^s]]],n^=t[t[n]])}}function vd(t,e){for(var r=t.slice(0),n,i=1,a=r.length,s=a+6+1,o=Nn*s,l=a;l>>16&255]<<24^St[n>>>8&255]<<16^St[n&255]<<8^St[n>>>24]^gd[i]<<24,i++):a>6&&l%a===4&&(n=St[n>>>24]<<24^St[n>>>16&255]<<16^St[n>>>8&255]<<8^St[n&255]),r[l]=r[l-a]^n;if(e){var u,c=Zt[0],f=Zt[1],d=Zt[2],p=Zt[3],h=r.slice(0);o=r.length;for(var l=0,m=o-Nn;l>>24]]^f[St[u>>>16&255]]^d[St[u>>>8&255]]^p[St[u&255]];r=h}return r}function Nl(t,e,r,n){var i=t.length/4-1,a,s,o,l,u;n?(a=Zt[0],s=Zt[1],o=Zt[2],l=Zt[3],u=Bl):(a=tn[0],s=tn[1],o=tn[2],l=tn[3],u=St);var c,f,d,p,h,m,g;c=e[0]^t[0],f=e[n?3:1]^t[1],d=e[2]^t[2],p=e[n?1:3]^t[3];for(var b=3,I=1;I>>24]^s[f>>>16&255]^o[d>>>8&255]^l[p&255]^t[++b],m=a[f>>>24]^s[d>>>16&255]^o[p>>>8&255]^l[c&255]^t[++b],g=a[d>>>24]^s[p>>>16&255]^o[c>>>8&255]^l[f&255]^t[++b],p=a[p>>>24]^s[c>>>16&255]^o[f>>>8&255]^l[d&255]^t[++b],c=h,f=m,d=g;r[0]=u[c>>>24]<<24^u[f>>>16&255]<<16^u[d>>>8&255]<<8^u[p&255]^t[++b],r[n?3:1]=u[f>>>24]<<24^u[d>>>16&255]<<16^u[p>>>8&255]<<8^u[c&255]^t[++b],r[2]=u[d>>>24]<<24^u[p>>>16&255]<<16^u[c>>>8&255]<<8^u[f&255]^t[++b],r[n?1:3]=u[p>>>24]<<24^u[c>>>16&255]<<16^u[f>>>8&255]<<8^u[d&255]^t[++b]}function $a(t){t=t||{};var e=(t.mode||"CBC").toUpperCase(),r="AES-"+e,n;t.decrypt?n=ke.cipher.createDecipher(r,t.key):n=ke.cipher.createCipher(r,t.key);var i=n.start;return n.start=function(a,s){var o=null;s instanceof ke.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=a,i.call(n,s)},n}});var $r=Q((uB,bd)=>{var ki=ie();ki.pki=ki.pki||{};var Ll=bd.exports=ki.pki.oids=ki.oids=ki.oids||{};function O(t,e){Ll[t]=e,Ll[e]=t}function Ie(t,e){Ll[t]=e}O("1.2.840.113549.1.1.1","rsaEncryption");O("1.2.840.113549.1.1.4","md5WithRSAEncryption");O("1.2.840.113549.1.1.5","sha1WithRSAEncryption");O("1.2.840.113549.1.1.7","RSAES-OAEP");O("1.2.840.113549.1.1.8","mgf1");O("1.2.840.113549.1.1.9","pSpecified");O("1.2.840.113549.1.1.10","RSASSA-PSS");O("1.2.840.113549.1.1.11","sha256WithRSAEncryption");O("1.2.840.113549.1.1.12","sha384WithRSAEncryption");O("1.2.840.113549.1.1.13","sha512WithRSAEncryption");O("1.3.101.112","EdDSA25519");O("1.2.840.10040.4.3","dsa-with-sha1");O("1.3.14.3.2.7","desCBC");O("1.3.14.3.2.26","sha1");O("1.3.14.3.2.29","sha1WithRSASignature");O("2.16.840.1.101.3.4.2.1","sha256");O("2.16.840.1.101.3.4.2.2","sha384");O("2.16.840.1.101.3.4.2.3","sha512");O("2.16.840.1.101.3.4.2.4","sha224");O("2.16.840.1.101.3.4.2.5","sha512-224");O("2.16.840.1.101.3.4.2.6","sha512-256");O("1.2.840.113549.2.2","md2");O("1.2.840.113549.2.5","md5");O("1.2.840.113549.1.7.1","data");O("1.2.840.113549.1.7.2","signedData");O("1.2.840.113549.1.7.3","envelopedData");O("1.2.840.113549.1.7.4","signedAndEnvelopedData");O("1.2.840.113549.1.7.5","digestedData");O("1.2.840.113549.1.7.6","encryptedData");O("1.2.840.113549.1.9.1","emailAddress");O("1.2.840.113549.1.9.2","unstructuredName");O("1.2.840.113549.1.9.3","contentType");O("1.2.840.113549.1.9.4","messageDigest");O("1.2.840.113549.1.9.5","signingTime");O("1.2.840.113549.1.9.6","counterSignature");O("1.2.840.113549.1.9.7","challengePassword");O("1.2.840.113549.1.9.8","unstructuredAddress");O("1.2.840.113549.1.9.14","extensionRequest");O("1.2.840.113549.1.9.20","friendlyName");O("1.2.840.113549.1.9.21","localKeyId");O("1.2.840.113549.1.9.22.1","x509Certificate");O("1.2.840.113549.1.12.10.1.1","keyBag");O("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");O("1.2.840.113549.1.12.10.1.3","certBag");O("1.2.840.113549.1.12.10.1.4","crlBag");O("1.2.840.113549.1.12.10.1.5","secretBag");O("1.2.840.113549.1.12.10.1.6","safeContentsBag");O("1.2.840.113549.1.5.13","pkcs5PBES2");O("1.2.840.113549.1.5.12","pkcs5PBKDF2");O("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");O("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");O("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");O("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");O("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");O("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");O("1.2.840.113549.2.7","hmacWithSHA1");O("1.2.840.113549.2.8","hmacWithSHA224");O("1.2.840.113549.2.9","hmacWithSHA256");O("1.2.840.113549.2.10","hmacWithSHA384");O("1.2.840.113549.2.11","hmacWithSHA512");O("1.2.840.113549.3.7","des-EDE3-CBC");O("2.16.840.1.101.3.4.1.2","aes128-CBC");O("2.16.840.1.101.3.4.1.22","aes192-CBC");O("2.16.840.1.101.3.4.1.42","aes256-CBC");O("2.5.4.3","commonName");O("2.5.4.4","surname");O("2.5.4.5","serialNumber");O("2.5.4.6","countryName");O("2.5.4.7","localityName");O("2.5.4.8","stateOrProvinceName");O("2.5.4.9","streetAddress");O("2.5.4.10","organizationName");O("2.5.4.11","organizationalUnitName");O("2.5.4.12","title");O("2.5.4.13","description");O("2.5.4.15","businessCategory");O("2.5.4.17","postalCode");O("2.5.4.42","givenName");O("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");O("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");O("2.16.840.1.113730.1.1","nsCertType");O("2.16.840.1.113730.1.13","nsComment");Ie("2.5.29.1","authorityKeyIdentifier");Ie("2.5.29.2","keyAttributes");Ie("2.5.29.3","certificatePolicies");Ie("2.5.29.4","keyUsageRestriction");Ie("2.5.29.5","policyMapping");Ie("2.5.29.6","subtreesConstraint");Ie("2.5.29.7","subjectAltName");Ie("2.5.29.8","issuerAltName");Ie("2.5.29.9","subjectDirectoryAttributes");Ie("2.5.29.10","basicConstraints");Ie("2.5.29.11","nameConstraints");Ie("2.5.29.12","policyConstraints");Ie("2.5.29.13","basicConstraints");O("2.5.29.14","subjectKeyIdentifier");O("2.5.29.15","keyUsage");Ie("2.5.29.16","privateKeyUsagePeriod");O("2.5.29.17","subjectAltName");O("2.5.29.18","issuerAltName");O("2.5.29.19","basicConstraints");Ie("2.5.29.20","cRLNumber");Ie("2.5.29.21","cRLReason");Ie("2.5.29.22","expirationDate");Ie("2.5.29.23","instructionCode");Ie("2.5.29.24","invalidityDate");Ie("2.5.29.25","cRLDistributionPoints");Ie("2.5.29.26","issuingDistributionPoint");Ie("2.5.29.27","deltaCRLIndicator");Ie("2.5.29.28","issuingDistributionPoint");Ie("2.5.29.29","certificateIssuer");Ie("2.5.29.30","nameConstraints");O("2.5.29.31","cRLDistributionPoints");O("2.5.29.32","certificatePolicies");Ie("2.5.29.33","policyMappings");Ie("2.5.29.34","policyConstraints");O("2.5.29.35","authorityKeyIdentifier");Ie("2.5.29.36","policyConstraints");O("2.5.29.37","extKeyUsage");Ie("2.5.29.46","freshestCRL");Ie("2.5.29.54","inhibitAnyPolicy");O("1.3.6.1.4.1.11129.2.4.2","timestampList");O("1.3.6.1.5.5.7.1.1","authorityInfoAccess");O("1.3.6.1.5.5.7.3.1","serverAuth");O("1.3.6.1.5.5.7.3.2","clientAuth");O("1.3.6.1.5.5.7.3.3","codeSigning");O("1.3.6.1.5.5.7.3.4","emailProtection");O("1.3.6.1.5.5.7.3.8","timeStamping")});var Jt=Q((cB,wd)=>{var Pe=ie();xe();$r();var F=wd.exports=Pe.asn1=Pe.asn1||{};F.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};F.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};F.create=function(t,e,r,n,i){if(Pe.util.isArray(n)){for(var a=[],s=0;se){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}var H1=function(t,e){var r=t.getByte();if(e--,r!==128){var n,i=r&128;if(!i)n=r;else{var a=r&127;Li(t,e,a),n=t.getInt(a<<3)}if(n<0)throw new Error("Negative length: "+n);return n}};F.fromDer=function(t,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),typeof t=="string"&&(t=Pe.util.createBuffer(t));var r=t.length(),n=Ha(t,t.length(),0,e);if(e.parseAllBytes&&t.length()!==0){var i=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw i.byteCount=r,i.remaining=t.length(),i}return n};function Ha(t,e,r,n){var i;Li(t,e,2);var a=t.getByte();e--;var s=a&192,o=a&31;i=t.length();var l=H1(t,e);if(e-=i-t.length(),l!==void 0&&l>e){if(n.strict){var u=new Error("Too few bytes to read ASN.1 value.");throw u.available=t.length(),u.remaining=e,u.requested=l,u}l=e}var c,f,d=(a&32)===32;if(d)if(c=[],l===void 0)for(;;){if(Li(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}i=t.length(),c.push(Ha(t,e,r+1,n)),e-=i-t.length()}else for(;l>0;)i=t.length(),c.push(Ha(t,l,r+1,n)),e-=i-t.length(),l-=i-t.length();if(c===void 0&&s===F.Class.UNIVERSAL&&o===F.Type.BITSTRING&&(f=t.bytes(l)),c===void 0&&n.decodeBitStrings&&s===F.Class.UNIVERSAL&&o===F.Type.BITSTRING&&l>1){var p=t.read,h=e,m=0;if(o===F.Type.BITSTRING&&(Li(t,e,1),m=t.getByte(),e--),m===0)try{i=t.length();var g={strict:!0,decodeBitStrings:!0},b=Ha(t,e,r+1,g),I=i-t.length();e-=I,o==F.Type.BITSTRING&&I++;var w=b.tagClass;I===l&&(w===F.Class.UNIVERSAL||w===F.Class.CONTEXT_SPECIFIC)&&(c=[b])}catch{}c===void 0&&(t.read=p,e=h)}if(c===void 0){if(l===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");l=e}if(o===F.Type.BMPSTRING)for(c="";l>0;l-=2)Li(t,e,2),c+=String.fromCharCode(t.getInt16()),e-=2;else c=t.getBytes(l),e-=l}var T=f===void 0?null:{bitStringContents:f};return F.create(s,o,d,c,T)}F.toDer=function(t){var e=Pe.util.createBuffer(),r=t.tagClass|t.type,n=Pe.util.createBuffer(),i=!1;if("bitStringContents"in t&&(i=!0,t.original&&(i=F.equals(t,t.original))),i)n.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:n.putByte(0);for(var a=0;a1&&(t.value.charCodeAt(0)===0&&!(t.value.charCodeAt(1)&128)||t.value.charCodeAt(0)===255&&(t.value.charCodeAt(1)&128)===128)?n.putBytes(t.value.substr(1)):n.putBytes(t.value);if(e.putByte(r),n.length()<=127)e.putByte(n.length()&127);else{var s=n.length(),o="";do o+=String.fromCharCode(s&255),s=s>>>8;while(s>0);e.putByte(o.length|128);for(var a=o.length-1;a>=0;--a)e.putByte(o.charCodeAt(a))}return e.putBuffer(n),e};F.oidToDer=function(t){var e=t.split("."),r=Pe.util.createBuffer();r.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var n,i,a,s,o=2;o>>7,n||(s|=128),i.push(s),n=!1;while(a>0);for(var l=i.length-1;l>=0;--l)r.putByte(i[l])}return r};F.derToOid=function(t){var e;typeof t=="string"&&(t=Pe.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var n=0;t.length()>0;)r=t.getByte(),n=n<<7,r&128?n+=r&127:(e+="."+(n+r),n=0);return e};F.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),a=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),o=0;if(t.length>11){var l=t.charAt(10),u=10;l!=="+"&&l!=="-"&&(o=parseInt(t.substr(10,2),10),u+=2)}if(e.setUTCFullYear(r,n,i),e.setUTCHours(a,s,o,0),u&&(l=t.charAt(u),l==="+"||l==="-")){var c=parseInt(t.substr(u+1,2),10),f=parseInt(t.substr(u+4,2),10),d=c*60+f;d*=6e4,l==="+"?e.setTime(+e-d):e.setTime(+e+d)}return e};F.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),l=0,u=0,c=!1;t.charAt(t.length-1)==="Z"&&(c=!0);var f=t.length-5,d=t.charAt(f);if(d==="+"||d==="-"){var p=parseInt(t.substr(f+1,2),10),h=parseInt(t.substr(f+4,2),10);u=p*60+h,u*=6e4,d==="+"&&(u*=-1),c=!0}return t.charAt(14)==="."&&(l=parseFloat(t.substr(14),10)*1e3),c?(e.setUTCFullYear(r,n,i),e.setUTCHours(a,s,o,l),e.setTime(+e+u)):(e.setFullYear(r,n,i),e.setHours(a,s,o,l)),e};F.dateToUtcTime=function(t){if(typeof t=="string")return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r};F.derToInteger=function(t){typeof t=="string"&&(t=Pe.util.createBuffer(t));var e=t.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)};F.validate=function(t,e,r,n){var i=!1;if((t.tagClass===e.tagClass||typeof e.tagClass>"u")&&(t.type===e.type||typeof e.type>"u"))if(t.constructed===e.constructed||typeof e.constructed>"u"){if(i=!0,e.value&&Pe.util.isArray(e.value))for(var a=0,s=0;i&&s0&&(n+=` `);for(var i="",a=0;a1?n+="0x"+Pe.util.bytesToHex(t.value.slice(1)):n+="(none)",t.value.length>0){var u=t.value.charCodeAt(0);u==1?n+=" (1 unused bit shown)":u>1&&(n+=" ("+u+" unused bits shown)")}}else if(t.type===F.Type.OCTETSTRING)xd.test(t.value)||(n+="("+t.value+") "),n+="0x"+Pe.util.bytesToHex(t.value);else if(t.type===F.Type.UTF8)try{n+=Pe.util.decodeUtf8(t.value)}catch(c){if(c.message==="URI malformed")n+="0x"+Pe.util.bytesToHex(t.value)+" (malformed UTF8)";else throw c}else t.type===F.Type.PRINTABLESTRING||t.type===F.Type.IA5String?n+=t.value:xd.test(t.value)?n+="0x"+Pe.util.bytesToHex(t.value):t.value.length===0?n+="[null]":n+=t.value}return n}});var sr=Q((fB,Sd)=>{var qa=ie();Sd.exports=qa.md=qa.md||{};qa.md.algorithms=qa.md.algorithms||{}});var Ln=Q((dB,Ed)=>{var Er=ie();sr();xe();var q1=Ed.exports=Er.hmac=Er.hmac||{};q1.create=function(){var t=null,e=null,r=null,n=null,i={};return i.start=function(a,s){if(a!==null)if(typeof a=="string")if(a=a.toLowerCase(),a in Er.md.algorithms)e=Er.md.algorithms[a].create();else throw new Error('Unknown hash algorithm "'+a+'"');else e=a;if(s===null)s=t;else{if(typeof s=="string")s=Er.util.createBuffer(s);else if(Er.util.isArray(s)){var o=s;s=Er.util.createBuffer();for(var l=0;le.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=Er.util.createBuffer(),n=Er.util.createBuffer(),u=s.length();for(var l=0;l{var or=ie();sr();xe();var Ad=Rd.exports=or.md5=or.md5||{};or.md.md5=or.md.algorithms.md5=Ad;Ad.create=function(){Td||G1();var t=null,e=or.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,a=0;a>>0,s>>>0];for(var o=n.fullMessageLength.length-1;o>=0;--o)n.fullMessageLength[o]+=s[1],s[1]=s[0]+(n.fullMessageLength[o]/4294967296>>>0),n.fullMessageLength[o]=n.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return e.putBytes(i),Id(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var i=or.util.createBuffer();i.putBytes(e.bytes());var a=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,s=a&n.blockLength-1;i.putBytes(Ol.substr(0,n.blockLength-s));for(var o,l=0,u=n.fullMessageLength.length-1;u>=0;--u)o=n.fullMessageLength[u]*8+l,l=o/4294967296>>>0,i.putInt32Le(o>>>0);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};Id(c,r,i);var f=or.util.createBuffer();return f.putInt32Le(c.h0),f.putInt32Le(c.h1),f.putInt32Le(c.h2),f.putInt32Le(c.h3),f},n};var Ol=null,Ga=null,Oi=null,On=null,Td=!1;function G1(){Ol=String.fromCharCode(128),Ol+=or.util.fillString(String.fromCharCode(0),64),Ga=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],Oi=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],On=new Array(64);for(var t=0;t<64;++t)On[t]=Math.floor(Math.abs(Math.sin(t+1))*4294967296);Td=!0}function Id(t,e,r){for(var n,i,a,s,o,l,u,c,f=r.length();f>=64;){for(i=t.h0,a=t.h1,s=t.h2,o=t.h3,c=0;c<16;++c)e[c]=r.getInt32Le(),l=o^a&(s^o),n=i+l+On[c]+e[c],u=Oi[c],i=o,o=s,s=a,a+=n<>>32-u;for(;c<32;++c)l=s^o&(a^s),n=i+l+On[c]+e[Ga[c]],u=Oi[c],i=o,o=s,s=a,a+=n<>>32-u;for(;c<48;++c)l=a^s^o,n=i+l+On[c]+e[Ga[c]],u=Oi[c],i=o,o=s,s=a,a+=n<>>32-u;for(;c<64;++c)l=s^(a|~o),n=i+l+On[c]+e[Ga[c]],u=Oi[c],i=o,o=s,s=a,a+=n<>>32-u;t.h0=t.h0+i|0,t.h1=t.h1+a|0,t.h2=t.h2+s|0,t.h3=t.h3+o|0,f-=64}}});var rn=Q((pB,Bd)=>{var ja=ie();xe();var _d=Bd.exports=ja.pem=ja.pem||{};_d.encode=function(t,e){e=e||{};var r="-----BEGIN "+t.type+`-----\r `,n;if(t.procType&&(n={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]},r+=za(n)),t.contentDomain&&(n={name:"Content-Domain",values:[t.contentDomain]},r+=za(n)),t.dekInfo&&(n={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&n.values.push(t.dekInfo.parameters),r+=za(n)),t.headers)for(var i=0;i65&&s!==-1){var o=e[s];o===","?(++s,e=e.substr(0,s)+`\r `+e.substr(s)):e=e.substr(0,s)+`\r `+o+e.substr(s+1),a=i-s-1,s=-1,++i}else(e[i]===" "||e[i]===" "||e[i]===",")&&(s=i);return e}function W1(t){return t.replace(/^\s+/,"")}});var Pi=Q((mB,kd)=>{var qe=ie();Fa();_l();xe();kd.exports=qe.des=qe.des||{};qe.des.startEncrypting=function(t,e,r,n){var i=Ya({key:t,output:r,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return i.start(e),i};qe.des.createEncryptionCipher=function(t,e){return Ya({key:t,output:null,decrypt:!1,mode:e})};qe.des.startDecrypting=function(t,e,r,n){var i=Ya({key:t,output:r,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return i.start(e),i};qe.des.createDecryptionCipher=function(t,e){return Ya({key:t,output:null,decrypt:!0,mode:e})};qe.des.Algorithm=function(t,e){var r=this;r.name=t,r.mode=new e({blockSize:8,cipher:{encrypt:function(n,i){return Nd(r._keys,n,i,!1)},decrypt:function(n,i){return Nd(r._keys,n,i,!0)}}}),r._init=!1};qe.des.Algorithm.prototype.initialize=function(t){if(!this._init){var e=qe.util.createBuffer(t.key);if(this.name.indexOf("3DES")===0&&e.length()!==24)throw new Error("Invalid Triple-DES key size: "+e.length()*8);this._keys=tC(e),this._init=!0}};lr("DES-ECB",qe.cipher.modes.ecb);lr("DES-CBC",qe.cipher.modes.cbc);lr("DES-CFB",qe.cipher.modes.cfb);lr("DES-OFB",qe.cipher.modes.ofb);lr("DES-CTR",qe.cipher.modes.ctr);lr("3DES-ECB",qe.cipher.modes.ecb);lr("3DES-CBC",qe.cipher.modes.cbc);lr("3DES-CFB",qe.cipher.modes.cfb);lr("3DES-OFB",qe.cipher.modes.ofb);lr("3DES-CTR",qe.cipher.modes.ctr);function lr(t,e){var r=function(){return new qe.des.Algorithm(t,e)};qe.cipher.registerAlgorithm(t,r)}var z1=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],j1=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],Y1=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],X1=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],Z1=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],J1=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],Q1=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],eC=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function tC(t){for(var e=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],h=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],m=t.length()>8?3:1,g=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],I=0,w,T=0;T>>4^N)&252645135,N^=w,B^=w<<4,w=(N>>>-16^B)&65535,B^=w,N^=w<<-16,w=(B>>>2^N)&858993459,N^=w,B^=w<<2,w=(N>>>-16^B)&65535,B^=w,N^=w<<-16,w=(B>>>1^N)&1431655765,N^=w,B^=w<<1,w=(N>>>8^B)&16711935,B^=w,N^=w<<8,w=(B>>>1^N)&1431655765,N^=w,B^=w<<1,w=B<<8|N>>>20&240,B=N<<24|N<<8&16711680|N>>>8&65280|N>>>24&240,N=w;for(var H=0;H>>26,N=N<<2|N>>>26):(B=B<<1|B>>>27,N=N<<1|N>>>27),B&=-15,N&=-15;var q=e[B>>>28]|r[B>>>24&15]|n[B>>>20&15]|i[B>>>16&15]|a[B>>>12&15]|s[B>>>8&15]|o[B>>>4&15],j=l[N>>>28]|u[N>>>24&15]|c[N>>>20&15]|f[N>>>16&15]|d[N>>>12&15]|p[N>>>8&15]|h[N>>>4&15];w=(j>>>16^q)&65535,g[I++]=q^w,g[I++]=j^w<<16}}return g}function Nd(t,e,r,n){var i=t.length===32?3:9,a;i===3?a=n?[30,-2,-2]:[0,32,2]:a=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var s,o=e[0],l=e[1];s=(o>>>4^l)&252645135,l^=s,o^=s<<4,s=(o>>>16^l)&65535,l^=s,o^=s<<16,s=(l>>>2^o)&858993459,o^=s,l^=s<<2,s=(l>>>8^o)&16711935,o^=s,l^=s<<8,s=(o>>>1^l)&1431655765,l^=s,o^=s<<1,o=o<<1|o>>>31,l=l<<1|l>>>31;for(var u=0;u>>4|l<<28)^t[d+1];s=o,o=l,l=s^(j1[p>>>24&63]|X1[p>>>16&63]|J1[p>>>8&63]|eC[p&63]|z1[h>>>24&63]|Y1[h>>>16&63]|Z1[h>>>8&63]|Q1[h&63])}s=o,o=l,l=s}o=o>>>1|o<<31,l=l>>>1|l<<31,s=(o>>>1^l)&1431655765,l^=s,o^=s<<1,s=(l>>>8^o)&16711935,o^=s,l^=s<<8,s=(l>>>2^o)&858993459,o^=s,l^=s<<2,s=(o>>>16^l)&65535,l^=s,o^=s<<16,s=(o>>>4^l)&252645135,l^=s,o^=s<<4,r[0]=o,r[1]=l}function Ya(t){t=t||{};var e=(t.mode||"CBC").toUpperCase(),r="DES-"+e,n;t.decrypt?n=qe.cipher.createDecipher(r,t.key):n=qe.cipher.createCipher(r,t.key);var i=n.start;return n.start=function(a,s){var o=null;s instanceof qe.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=a,i.call(n,s)},n}});var Xa=Q(()=>{});var Za=Q((vB,Ld)=>{var Et=ie();Ln();sr();xe();var rC=Et.pkcs5=Et.pkcs5||{},Ir;Et.util.isNodejs&&!Et.options.usePureJavaScript&&(Ir=Xa());Ld.exports=Et.pbkdf2=rC.pbkdf2=function(t,e,r,n,i,a){if(typeof i=="function"&&(a=i,i=null),Et.util.isNodejs&&!Et.options.usePureJavaScript&&Ir.pbkdf2&&(i===null||typeof i!="object")&&(Ir.pbkdf2Sync.length>4||!i||i==="sha1"))return typeof i!="string"&&(i="sha1"),t=Buffer.from(t,"binary"),e=Buffer.from(e,"binary"),a?Ir.pbkdf2Sync.length===4?Ir.pbkdf2(t,e,r,n,function(w,T){if(w)return a(w);a(null,T.toString("binary"))}):Ir.pbkdf2(t,e,r,n,i,function(w,T){if(w)return a(w);a(null,T.toString("binary"))}):Ir.pbkdf2Sync.length===4?Ir.pbkdf2Sync(t,e,r,n).toString("binary"):Ir.pbkdf2Sync(t,e,r,n,i).toString("binary");if((typeof i>"u"||i===null)&&(i="sha1"),typeof i=="string"){if(!(i in Et.md.algorithms))throw new Error("Unknown hash algorithm: "+i);i=Et.md[i].create()}var s=i.digestLength;if(n>4294967295*s){var o=new Error("Derived key is too long.");if(a)return a(o);throw o}var l=Math.ceil(n/s),u=n-(l-1)*s,c=Et.hmac.create();c.start(i,t);var f="",d,p,h;if(!a){for(var m=1;m<=l;++m){c.start(null,null),c.update(e),c.update(Et.util.int32ToBytes(m)),d=h=c.digest().getBytes();for(var g=2;g<=r;++g)c.start(null,null),c.update(h),p=c.digest().getBytes(),d=Et.util.xorBytes(d,p,s),h=p;f+=ml)return a(null,f);c.start(null,null),c.update(e),c.update(Et.util.int32ToBytes(m)),d=h=c.digest().getBytes(),g=2,I()}function I(){if(g<=r)return c.start(null,null),c.update(h),p=c.digest().getBytes(),d=Et.util.xorBytes(d,p,s),h=p,++g,Et.util.setImmediate(I);f+=m{var ur=ie();sr();xe();var Pd=Md.exports=ur.sha256=ur.sha256||{};ur.md.sha256=ur.md.algorithms.sha256=Pd;Pd.create=function(){Dd||nC();var t=null,e=ur.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,a=0;a>>0,s>>>0];for(var o=n.fullMessageLength.length-1;o>=0;--o)n.fullMessageLength[o]+=s[1],s[1]=s[0]+(n.fullMessageLength[o]/4294967296>>>0),n.fullMessageLength[o]=n.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return e.putBytes(i),Od(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var i=ur.util.createBuffer();i.putBytes(e.bytes());var a=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,s=a&n.blockLength-1;i.putBytes(Pl.substr(0,n.blockLength-s));for(var o,l,u=n.fullMessageLength[0]*8,c=0;c>>0,u+=l,i.putInt32(u>>>0),u=o>>>0;i.putInt32(u);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};Od(f,r,i);var d=ur.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d.putInt32(f.h5),d.putInt32(f.h6),d.putInt32(f.h7),d},n};var Pl=null,Dd=!1,Ud=null;function nC(){Pl=String.fromCharCode(128),Pl+=ur.util.fillString(String.fromCharCode(0),64),Ud=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Dd=!0}function Od(t,e,r){for(var n,i,a,s,o,l,u,c,f,d,p,h,m,g,b,I=r.length();I>=64;){for(u=0;u<16;++u)e[u]=r.getInt32();for(;u<64;++u)n=e[u-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=e[u-15],i=(i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=n+e[u-7]+i+e[u-16]|0;for(c=t.h0,f=t.h1,d=t.h2,p=t.h3,h=t.h4,m=t.h5,g=t.h6,b=t.h7,u=0;u<64;++u)s=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),o=g^h&(m^g),a=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),l=c&f|d&(c^f),n=b+s+o+Ud[u]+e[u],i=a+l,b=g,g=m,m=h,h=p+n>>>0,p=d,d=f,f=c,c=n+i>>>0;t.h0=t.h0+c|0,t.h1=t.h1+f|0,t.h2=t.h2+d|0,t.h3=t.h3+p|0,t.h4=t.h4+h|0,t.h5=t.h5+m|0,t.h6=t.h6+g|0,t.h7=t.h7+b|0,I-=64}}});var Ul=Q((bB,Fd)=>{var cr=ie();xe();var Ja=null;cr.util.isNodejs&&!cr.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Ja=Xa());var iC=Fd.exports=cr.prng=cr.prng||{};iC.create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,n=new Array(32),i=0;i<32;++i)n[i]=r.create();e.pools=n,e.pool=0,e.generate=function(u,c){if(!c)return e.generateSync(u);var f=e.plugin.cipher,d=e.plugin.increment,p=e.plugin.formatKey,h=e.plugin.formatSeed,m=cr.util.createBuffer();e.key=null,g();function g(b){if(b)return c(b);if(m.length()>=u)return c(null,m.getBytes(u));if(e.generated>1048575&&(e.key=null),e.key===null)return cr.util.nextTick(function(){a(g)});var I=f(e.key,e.seed);e.generated+=I.length,m.putBytes(I),e.key=p(f(e.key,d(e.seed))),e.seed=h(f(e.key,e.seed)),cr.util.setImmediate(g)}},e.generateSync=function(u){var c=e.plugin.cipher,f=e.plugin.increment,d=e.plugin.formatKey,p=e.plugin.formatSeed;e.key=null;for(var h=cr.util.createBuffer();h.length()1048575&&(e.key=null),e.key===null&&s();var m=c(e.key,e.seed);e.generated+=m.length,h.putBytes(m),e.key=d(c(e.key,f(e.seed))),e.seed=p(c(e.key,e.seed))}return h.getBytes(u)};function a(u){if(e.pools[0].messageLength>=32)return o(),u();var c=32-e.pools[0].messageLength<<5;e.seedFile(c,function(f,d){if(f)return u(f);e.collect(d),o(),u()})}function s(){if(e.pools[0].messageLength>=32)return o();var u=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(u)),o()}function o(){e.reseeds=e.reseeds===4294967295?0:e.reseeds+1;var u=e.plugin.md.create();u.update(e.keyBytes);for(var c=1,f=0;f<32;++f)e.reseeds%c===0&&(u.update(e.pools[f].digest().getBytes()),e.pools[f].start()),c=c<<1;e.keyBytes=u.digest().getBytes(),u.start(),u.update(e.keyBytes);var d=u.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(d),e.generated=0}function l(u){var c=null,f=cr.util.globalScope,d=f.crypto||f.msCrypto;d&&d.getRandomValues&&(c=function(B){return d.getRandomValues(B)});var p=cr.util.createBuffer();if(c)for(;p.length()>16),I+=(b&32767)<<16,I+=b>>15,I=(I&2147483647)+(I>>31),T=I&4294967295;for(var g=0;g<3;++g)w=T>>>(g<<3),w^=Math.floor(Math.random()*256),p.putByte(w&255)}return p.getBytes(u)}return Ja?(e.seedFile=function(u,c){Ja.randomBytes(u,function(f,d){if(f)return c(f);c(null,d.toString())})},e.seedFileSync=function(u){return Ja.randomBytes(u).toString()}):(e.seedFile=function(u,c){try{c(null,l(u))}catch(f){c(f)}},e.seedFileSync=l),e.collect=function(u){for(var c=u.length,f=0;f>d&255);e.collect(f)},e.registerWorker=function(u){if(u===self)e.seedFile=function(f,d){function p(h){var m=h.data;m.forge&&m.forge.prng&&(self.removeEventListener("message",p),d(m.forge.prng.err,m.forge.prng.bytes))}self.addEventListener("message",p),self.postMessage({forge:{prng:{needed:f}}})};else{var c=function(f){var d=f.data;d.forge&&d.forge.prng&&e.seedFile(d.forge.prng.needed,function(p,h){u.postMessage({forge:{prng:{err:p,bytes:h}}})})};u.addEventListener("message",c)}},e}});var Kt=Q((xB,Ml)=>{var ct=ie();Kr();Dl();Ul();xe();(function(){if(ct.random&&ct.random.getBytes){Ml.exports=ct.random;return}(function(t){var e={},r=new Array(4),n=ct.util.createBuffer();e.formatKey=function(f){var d=ct.util.createBuffer(f);return f=new Array(4),f[0]=d.getInt32(),f[1]=d.getInt32(),f[2]=d.getInt32(),f[3]=d.getInt32(),ct.aes._expandKey(f,!1)},e.formatSeed=function(f){var d=ct.util.createBuffer(f);return f=new Array(4),f[0]=d.getInt32(),f[1]=d.getInt32(),f[2]=d.getInt32(),f[3]=d.getInt32(),f},e.cipher=function(f,d){return ct.aes._updateBlock(f,d,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},e.increment=function(f){return++f[3],f},e.md=ct.md.sha256;function i(){var f=ct.prng.create(e);return f.getBytes=function(d,p){return f.generate(d,p)},f.getBytesSync=function(d){return f.generate(d)},f}var a=i(),s=null,o=ct.util.globalScope,l=o.crypto||o.msCrypto;if(l&&l.getRandomValues&&(s=function(f){return l.getRandomValues(f)}),ct.options.usePureJavaScript||!ct.util.isNodejs&&!s){if(typeof window>"u"||window.document,a.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var c in navigator)try{typeof navigator[c]=="string"&&(u+=navigator[c])}catch{}a.collect(u),u=null}t&&(t().mousemove(function(f){a.collectInt(f.clientX,16),a.collectInt(f.clientY,16)}),t().keypress(function(f){a.collectInt(f.charCode,8)}))}if(!ct.random)ct.random=a;else for(var c in a)ct.random[c]=a[c];ct.random.createInstance=i,Ml.exports=ct.random})(typeof jQuery<"u"?jQuery:null)})()});var Vl=Q((wB,$d)=>{var Lt=ie();xe();var Fl=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],Vd=[1,2,3,5],aC=function(t,e){return t<>16-e},sC=function(t,e){return(t&65535)>>e|t<<16-e&65535};$d.exports=Lt.rc2=Lt.rc2||{};Lt.rc2.expandKey=function(t,e){typeof t=="string"&&(t=Lt.util.createBuffer(t)),e=e||128;var r=t,n=t.length(),i=e,a=Math.ceil(i/8),s=255>>(i&7),o;for(o=n;o<128;o++)r.putByte(Fl[r.at(o-1)+r.at(o-n)&255]);for(r.setAt(128-a,Fl[r.at(128-a)&s]),o=127-a;o>=0;o--)r.setAt(o,Fl[r.at(o+1)^r.at(o+a)]);return r};var Kd=function(t,e,r){var n=!1,i=null,a=null,s=null,o,l,u,c,f=[];for(t=Lt.rc2.expandKey(t,e),u=0;u<64;u++)f.push(t.getInt16Le());r?(o=function(h){for(u=0;u<4;u++)h[u]+=f[c]+(h[(u+3)%4]&h[(u+2)%4])+(~h[(u+3)%4]&h[(u+1)%4]),h[u]=aC(h[u],Vd[u]),c++},l=function(h){for(u=0;u<4;u++)h[u]+=f[h[(u+3)%4]&63]}):(o=function(h){for(u=3;u>=0;u--)h[u]=sC(h[u],Vd[u]),h[u]-=f[c]+(h[(u+3)%4]&h[(u+2)%4])+(~h[(u+3)%4]&h[(u+1)%4]),c--},l=function(h){for(u=3;u>=0;u--)h[u]-=f[h[(u+3)%4]&63]});var d=function(h){var m=[];for(u=0;u<4;u++){var g=i.getInt16Le();s!==null&&(r?g^=s.getInt16Le():s.putInt16Le(g)),m.push(g&65535)}c=r?0:63;for(var b=0;b=8;)d([[5,o],[1,l],[6,o],[1,l],[5,o]])},finish:function(h){var m=!0;if(r)if(h)m=h(8,i,!r);else{var g=i.length()===8?8:8-i.length();i.fillWithByte(g,g)}if(m&&(n=!0,p.update()),!r&&(m=i.length()===0,m))if(h)m=h(8,a,!r);else{var b=a.length(),I=a.at(b-1);I>b?m=!1:a.truncate(I)}return m}},p};Lt.rc2.startEncrypting=function(t,e,r){var n=Lt.rc2.createEncryptionCipher(t,128);return n.start(e,r),n};Lt.rc2.createEncryptionCipher=function(t,e){return Kd(t,e,!0)};Lt.rc2.startDecrypting=function(t,e,r){var n=Lt.rc2.createDecryptionCipher(t,128);return n.start(e,r),n};Lt.rc2.createDecryptionCipher=function(t,e){return Kd(t,e,!1)}});var Ui=Q((SB,Xd)=>{var Kl=ie();Xd.exports=Kl.jsbn=Kl.jsbn||{};var Ar,oC=0xdeadbeefcafe,Hd=(oC&16777215)==15715070;function k(t,e,r){this.data=[],t!=null&&(typeof t=="number"?this.fromNumber(t,e,r):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}Kl.jsbn.BigInteger=k;function we(){return new k(null)}function lC(t,e,r,n,i,a){for(;--a>=0;){var s=e*this.data[t++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=s&67108863}return i}function uC(t,e,r,n,i,a){for(var s=e&32767,o=e>>15;--a>=0;){var l=this.data[t]&32767,u=this.data[t++]>>15,c=o*l+u*s;l=s*l+((c&32767)<<15)+r.data[n]+(i&1073741823),i=(l>>>30)+(c>>>15)+o*u+(i>>>30),r.data[n++]=l&1073741823}return i}function qd(t,e,r,n,i,a){for(var s=e&16383,o=e>>14;--a>=0;){var l=this.data[t]&16383,u=this.data[t++]>>14,c=o*l+u*s;l=s*l+((c&16383)<<14)+r.data[n]+i,i=(l>>28)+(c>>14)+o*u,r.data[n++]=l&268435455}return i}typeof navigator>"u"?(k.prototype.am=qd,Ar=28):Hd&&navigator.appName=="Microsoft Internet Explorer"?(k.prototype.am=uC,Ar=30):Hd&&navigator.appName!="Netscape"?(k.prototype.am=lC,Ar=26):(k.prototype.am=qd,Ar=28);k.prototype.DB=Ar;k.prototype.DM=(1<=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s}function dC(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0}function Hr(t){var e=we();return e.fromInt(t),e}function hC(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==256)r=8;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else{this.fromRadix(t,e);return}this.t=0,this.s=0;for(var n=t.length,i=!1,a=0;--n>=0;){var s=r==8?t[n]&255:Wd(t,n);if(s<0){t.charAt(n)=="-"&&(i=!0);continue}i=!1,a==0?this.data[this.t++]=s:a+r>this.DB?(this.data[this.t-1]|=(s&(1<>this.DB-a):this.data[this.t-1]|=s<=this.DB&&(a-=this.DB)}r==8&&t[0]&128&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t}function mC(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var r=(1<0)for(o>o)>0&&(i=!0,a=Gd(n));s>=0;)o>(o+=this.DB-e)):(n=this.data[s]>>(o-=e)&r,o<=0&&(o+=this.DB,--s)),n>0&&(i=!0),i&&(a+=Gd(n));return i?a:"0"}function gC(){var t=we();return k.ZERO.subTo(this,t),t}function yC(){return this.s<0?this.negate():this}function vC(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this.data[r]-t.data[r])!=0)return e;return 0}function es(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}function CC(){return this.t<=0?0:this.DB*(this.t-1)+es(this.data[this.t-1]^this.s&this.DM)}function bC(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s}function xC(t,e){for(var r=t;r=0;--o)e.data[o+a+1]=this.data[o]>>n|s,s=(this.data[o]&i)<=0;--o)e.data[o]=0;e.data[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()}function SC(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,i=this.DB-n,a=(1<>n;for(var s=r+1;s>n;n>0&&(e.data[this.t-r-1]|=(this.s&a)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()}function IC(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e.data[i]=0;for(i=0;i=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()}function TC(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(l,a),i.lShiftTo(l,r)):(n.copyTo(a),i.copyTo(r));var u=a.t,c=a.data[u-1];if(c!=0){var f=c*(1<1?a.data[u-2]>>this.F2:0),d=this.FV/f,p=(1<=0&&(r.data[r.t++]=1,r.subTo(b,r)),k.ONE.dlShiftTo(u,b),b.subTo(a,a);a.t=0;){var I=r.data[--m]==c?this.DM:Math.floor(r.data[m]*d+(r.data[m-1]+h)*p);if((r.data[m]+=a.am(0,I,r,g,0,u))0&&r.rShiftTo(l,r),s<0&&k.ZERO.subTo(r,r)}}}function RC(t){var e=we();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(k.ZERO)>0&&t.subTo(e,e),e}function nn(t){this.m=t}function _C(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function BC(t){return t}function NC(t){t.divRemTo(this.m,null,t)}function kC(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function LC(t,e){t.squareTo(e),this.reduce(e)}nn.prototype.convert=_C;nn.prototype.revert=BC;nn.prototype.reduce=NC;nn.prototype.mulTo=kC;nn.prototype.sqrTo=LC;function OC(){if(this.t<1)return 0;var t=this.data[0];if(!(t&1))return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function an(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}function DC(t){var e=we();return t.copyTo(e),this.reduce(e),e}function UC(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function MC(t,e){t.squareTo(e),this.reduce(e)}function FC(t,e,r){t.multiplyTo(e,r),this.reduce(r)}an.prototype.convert=PC;an.prototype.revert=DC;an.prototype.reduce=UC;an.prototype.mulTo=FC;an.prototype.sqrTo=MC;function VC(){return(this.t>0?this.data[0]&1:this.s)==0}function KC(t,e){if(t>4294967295||t<1)return k.ONE;var r=we(),n=we(),i=e.convert(this),a=es(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var s=r;r=n,n=s}return e.revert(r)}function $C(t,e){var r;return t<256||e.isEven()?r=new nn(e):r=new an(e),this.exp(t,r)}k.prototype.copyTo=fC;k.prototype.fromInt=dC;k.prototype.fromString=hC;k.prototype.clamp=pC;k.prototype.dlShiftTo=bC;k.prototype.drShiftTo=xC;k.prototype.lShiftTo=wC;k.prototype.rShiftTo=SC;k.prototype.subTo=EC;k.prototype.multiplyTo=IC;k.prototype.squareTo=AC;k.prototype.divRemTo=TC;k.prototype.invDigit=OC;k.prototype.isEven=VC;k.prototype.exp=KC;k.prototype.toString=mC;k.prototype.negate=gC;k.prototype.abs=yC;k.prototype.compareTo=vC;k.prototype.bitLength=CC;k.prototype.mod=RC;k.prototype.modPowInt=$C;k.ZERO=Hr(0);k.ONE=Hr(1);function HC(){var t=we();return this.copyTo(t),t}function qC(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<>24}function WC(){return this.t==0?this.s:this.data[0]<<16>>16}function zC(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function jC(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function YC(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=Hr(r),i=we(),a=we(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(t).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(t)+s}function XC(t,e){this.fromInt(0),e==null&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,a=0,s=0,o=0;o=r&&(this.dMultiply(n),this.dAddOffset(s,0),a=0,s=0)}a>0&&(this.dMultiply(Math.pow(e,a)),this.dAddOffset(s,0)),i&&k.ZERO.subTo(this,this)}function ZC(t,e,r){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(k.ONE.shiftLeft(t-1),Hl,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(k.ONE.shiftLeft(t-1),this);else{var n=new Array,i=t&7;n.length=(t>>3)+1,e.nextBytes(n),i>0?n[0]&=(1<0)for(r>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<=0;)r<8?(n=(this.data[t]&(1<>(r+=this.DB-8)):(n=this.data[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),n&128&&(n|=-256),i==0&&(this.s&128)!=(n&128)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e}function QC(t){return this.compareTo(t)==0}function eb(t){return this.compareTo(t)<0?this:t}function tb(t){return this.compareTo(t)>0?this:t}function rb(t,e,r){var n,i,a=Math.min(t.t,this.t);for(n=0;n>=16,e+=16),t&255||(t>>=8,e+=8),t&15||(t>>=4,e+=4),t&3||(t>>=2,e+=2),t&1||++e,e}function db(){for(var t=0;t=this.t?this.s!=0:(this.data[e]&1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()}function xb(t){var e=we();return this.addTo(t,e),e}function wb(t){var e=we();return this.subTo(t,e),e}function Sb(t){var e=we();return this.multiplyTo(t,e),e}function Eb(t){var e=we();return this.divRemTo(t,e,null),e}function Ib(t){var e=we();return this.divRemTo(t,null,e),e}function Ab(t){var e=we(),r=we();return this.divRemTo(t,e,r),new Array(e,r)}function Tb(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Rb(t,e){if(t!=0){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}}function Di(){}function Yd(t){return t}function _b(t,e,r){t.multiplyTo(e,r)}function Bb(t,e){t.squareTo(e)}Di.prototype.convert=Yd;Di.prototype.revert=Yd;Di.prototype.mulTo=_b;Di.prototype.sqrTo=Bb;function Nb(t){return this.exp(t,new Di)}function kb(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var i;for(i=r.t-this.t;n=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=we();return t.copyTo(e),this.reduce(e),e}function Pb(t){return t}function Db(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function Ub(t,e){t.squareTo(e),this.reduce(e)}function Mb(t,e,r){t.multiplyTo(e,r),this.reduce(r)}Dn.prototype.convert=Ob;Dn.prototype.revert=Pb;Dn.prototype.reduce=Db;Dn.prototype.mulTo=Mb;Dn.prototype.sqrTo=Ub;function Fb(t,e){var r=t.bitLength(),n,i=Hr(1),a;if(r<=0)return i;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?a=new nn(e):e.isEven()?a=new Dn(e):a=new an(e);var s=new Array,o=3,l=n-1,u=(1<1){var c=we();for(a.sqrTo(s[1],c);o<=u;)s[o]=we(),a.mulTo(c,s[o-2],s[o]),o+=2}var f=t.t-1,d,p=!0,h=we(),m;for(r=es(t.data[f])-1;f>=0;){for(r>=l?d=t.data[f]>>r-l&u:(d=(t.data[f]&(1<0&&(d|=t.data[f-1]>>this.DB+r-l)),o=n;!(d&1);)d>>=1,--o;if((r-=o)<0&&(r+=this.DB,--f),p)s[d].copyTo(i),p=!1;else{for(;o>1;)a.sqrTo(i,h),a.sqrTo(h,i),o-=2;o>0?a.sqrTo(i,h):(m=i,i=h,h=m),a.mulTo(h,s[d],i)}for(;f>=0&&!(t.data[f]&1<0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r}function Kb(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(e==0)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r}function $b(t){var e=t.isEven();if(this.isEven()&&e||t.signum()==0)return k.ZERO;for(var r=t.clone(),n=this.clone(),i=Hr(1),a=Hr(0),s=Hr(0),o=Hr(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),e?((!i.isEven()||!a.isEven())&&(i.addTo(this,i),a.subTo(t,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;n.isEven();)n.rShiftTo(1,n),e?((!s.isEven()||!o.isEven())&&(s.addTo(this,s),o.subTo(t,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);r.compareTo(n)>=0?(r.subTo(n,r),e&&i.subTo(s,i),a.subTo(o,a)):(n.subTo(r,n),e&&s.subTo(i,s),o.subTo(a,o))}if(n.compareTo(k.ONE)!=0)return k.ZERO;if(o.compareTo(t)>=0)return o.subtract(t);if(o.signum()<0)o.addTo(t,o);else return o;return o.signum()<0?o.add(t):o}var Qt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Hb=(1<<26)/Qt[Qt.length-1];function qb(t){var e,r=this.abs();if(r.t==1&&r.data[0]<=Qt[Qt.length-1]){for(e=0;e=0);var o=a.modPow(n,this);if(o.compareTo(k.ONE)!=0&&o.compareTo(e)!=0){for(var l=1;l++{var fr=ie();sr();xe();var Jd=eh.exports=fr.sha1=fr.sha1||{};fr.md.sha1=fr.md.algorithms.sha1=Jd;Jd.create=function(){Qd||zb();var t=null,e=fr.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,a=0;a>>0,s>>>0];for(var o=n.fullMessageLength.length-1;o>=0;--o)n.fullMessageLength[o]+=s[1],s[1]=s[0]+(n.fullMessageLength[o]/4294967296>>>0),n.fullMessageLength[o]=n.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return e.putBytes(i),Zd(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var i=fr.util.createBuffer();i.putBytes(e.bytes());var a=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,s=a&n.blockLength-1;i.putBytes(ql.substr(0,n.blockLength-s));for(var o,l,u=n.fullMessageLength[0]*8,c=0;c>>0,u+=l,i.putInt32(u>>>0),u=o>>>0;i.putInt32(u);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};Zd(f,r,i);var d=fr.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d},n};var ql=null,Qd=!1;function zb(){ql=String.fromCharCode(128),ql+=fr.util.fillString(String.fromCharCode(0),64),Qd=!0}function Zd(t,e,r){for(var n,i,a,s,o,l,u,c,f=r.length();f>=64;){for(i=t.h0,a=t.h1,s=t.h2,o=t.h3,l=t.h4,c=0;c<16;++c)n=r.getInt32(),e[c]=n,u=o^a&(s^o),n=(i<<5|i>>>27)+u+l+1518500249+n,l=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<20;++c)n=e[c-3]^e[c-8]^e[c-14]^e[c-16],n=n<<1|n>>>31,e[c]=n,u=o^a&(s^o),n=(i<<5|i>>>27)+u+l+1518500249+n,l=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<32;++c)n=e[c-3]^e[c-8]^e[c-14]^e[c-16],n=n<<1|n>>>31,e[c]=n,u=a^s^o,n=(i<<5|i>>>27)+u+l+1859775393+n,l=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<40;++c)n=e[c-6]^e[c-16]^e[c-28]^e[c-32],n=n<<2|n>>>30,e[c]=n,u=a^s^o,n=(i<<5|i>>>27)+u+l+1859775393+n,l=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<60;++c)n=e[c-6]^e[c-16]^e[c-28]^e[c-32],n=n<<2|n>>>30,e[c]=n,u=a&s|o&(a^s),n=(i<<5|i>>>27)+u+l+2400959708+n,l=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<80;++c)n=e[c-6]^e[c-16]^e[c-28]^e[c-32],n=n<<2|n>>>30,e[c]=n,u=a^s^o,n=(i<<5|i>>>27)+u+l+3395469782+n,l=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;t.h0=t.h0+i|0,t.h1=t.h1+a|0,t.h2=t.h2+s|0,t.h3=t.h3+o|0,t.h4=t.h4+l|0,f-=64}}});var Gl=Q((IB,rh)=>{var dr=ie();xe();Kt();Un();var th=rh.exports=dr.pkcs1=dr.pkcs1||{};th.encode_rsa_oaep=function(t,e,r){var n,i,a,s;typeof r=="string"?(n=r,i=arguments[3]||void 0,a=arguments[4]||void 0):r&&(n=r.label||void 0,i=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md)),a?a.start():a=dr.md.sha1.create(),s||(s=a);var o=Math.ceil(t.n.bitLength()/8),l=o-2*a.digestLength-2;if(e.length>l){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=e.length,u.maxLength=l,u}n||(n=""),a.update(n,"raw");for(var c=a.digest(),f="",d=l-e.length,p=0;p>24&255,a>>16&255,a>>8&255,a&255);r.start(),r.update(t+s),n+=r.digest().getBytes()}return n.substring(0,e)}});var zl=Q((AB,Wl)=>{var qr=ie();xe();Ui();Kt();(function(){if(qr.prime){Wl.exports=qr.prime;return}var t=Wl.exports=qr.prime=qr.prime||{},e=qr.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new e(null);n.fromInt(30);var i=function(f,d){return f|d};t.generateProbablePrime=function(f,d,p){typeof d=="function"&&(p=d,d={}),d=d||{};var h=d.algorithm||"PRIMEINC";typeof h=="string"&&(h={name:h}),h.options=h.options||{};var m=d.prng||qr.random,g={nextBytes:function(b){for(var I=m.getBytesSync(b.length),w=0;wd&&(f=u(d,p)),f.isProbablePrime(m))return b(null,f);f.dAddOffset(r[h++%8],0)}while(g<0||+new Date-I"u")return s(f,d,p,h);var m=u(f,d),g=p.workers,b=p.workLoad||100,I=b*30/8,w=p.workerScript||"forge/prime.worker.js";if(g===-1)return qr.util.estimateCores(function(B,N){B&&(N=2),g=N-1,T()});T();function T(){g=Math.max(1,g);for(var B=[],N=0;Nf&&(m=u(f,d));var Y=m.toString(16);J.target.postMessage({hex:Y,workLoad:b}),m.dAddOffset(I,0)}}}}function u(f,d){var p=new e(f,d),h=f-1;return p.testBit(h)||p.bitwiseTo(e.ONE.shiftLeft(h),i,p),p.dAddOffset(31-p.mod(n).byteValue(),0),p}function c(f){return f<=100?27:f<=150?18:f<=200?15:f<=250?12:f<=300?9:f<=350?8:f<=400?7:f<=500?6:f<=600?5:f<=800?4:f<=1250?3:2}})()});var Mi=Q((TB,uh)=>{var G=ie();Jt();Ui();$r();Gl();zl();Kt();xe();typeof ye>"u"&&(ye=G.jsbn.BigInteger);var ye,jl=G.util.isNodejs?Xa():null,A=G.asn1,Ht=G.util;G.pki=G.pki||{};uh.exports=G.pki.rsa=G.rsa=G.rsa||{};var ee=G.pki,jb=[6,4,2,4,2,4,6,2],Yb={name:"PrivateKeyInfo",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:A.Class.UNIVERSAL,type:A.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Xb={name:"RSAPrivateKey",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},Zb={name:"RSAPublicKey",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},Jb=G.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:A.Class.UNIVERSAL,type:A.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},Qb={name:"DigestInfo",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:A.Class.UNIVERSAL,type:A.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:A.Class.UNIVERSAL,type:A.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},ex=function(t){var e;if(t.algorithm in ee.oids)e=ee.oids[t.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}var n=A.oidToDer(e).getBytes(),i=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[]),a=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[]);a.value.push(A.create(A.Class.UNIVERSAL,A.Type.OID,!1,n)),a.value.push(A.create(A.Class.UNIVERSAL,A.Type.NULL,!1,""));var s=A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(a),i.value.push(s),A.toDer(i).getBytes()},oh=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(ye.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(ye.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var n;do n=new ye(G.util.bytesToHex(G.random.getBytes(e.n.bitLength()/8)),16);while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(ye.ONE));t=t.multiply(n.modPow(e.e,e.n)).mod(e.n);for(var i=t.mod(e.p).modPow(e.dP,e.p),a=t.mod(e.q).modPow(e.dQ,e.q);i.compareTo(a)<0;)i=i.add(e.p);var s=i.subtract(a).multiply(e.qInv).mod(e.p).multiply(e.q).add(a);return s=s.multiply(n.modInverse(e.n)).mod(e.n),s};ee.rsa.encrypt=function(t,e,r){var n=r,i,a=Math.ceil(e.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,i=lh(t,e,r)):(i=G.util.createBuffer(),i.putBytes(t));for(var s=new ye(i.toHex(),16),o=oh(s,e,n),l=o.toString(16),u=G.util.createBuffer(),c=a-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(G.util.hexToBytes(l)),u.getBytes()};ee.rsa.decrypt=function(t,e,r,n){var i=Math.ceil(e.n.bitLength()/8);if(t.length!==i){var a=new Error("Encrypted message length is invalid.");throw a.length=t.length,a.expected=i,a}var s=new ye(G.util.createBuffer(t).toHex(),16);if(s.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=oh(s,e,r),l=o.toString(16),u=G.util.createBuffer(),c=i-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(G.util.hexToBytes(l)),n!==!1?rs(u.getBytes(),e,r):u.getBytes()};ee.rsa.createKeyPairGenerationState=function(t,e,r){typeof t=="string"&&(t=parseInt(t,10)),t=t||2048,r=r||{};var n=r.prng||G.random,i={nextBytes:function(o){for(var l=n.getBytesSync(o.length),u=0;u>1,pBits:t-(t>>1),pqState:0,num:null,keys:null},s.e.fromInt(s.eInt);else throw new Error("Invalid key generation algorithm: "+a);return s};ee.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new ye(null);r.fromInt(30);for(var n=0,i=function(f,d){return f|d},a=+new Date,s,o=0;t.keys===null&&(e<=0||ol?t.pqState=0:t.num.isProbablePrime(rx(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(jb[n++%8],0):t.pqState===2?t.pqState=t.num.subtract(ye.ONE).gcd(t.e).compareTo(ye.ONE)===0?3:0:t.pqState===3&&(t.pqState=0,t.p===null?t.p=t.num:t.q=t.num,t.p!==null&&t.q!==null&&++t.state,t.num=null)}else if(t.state===1)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(t.state===2)t.p1=t.p.subtract(ye.ONE),t.q1=t.q.subtract(ye.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(t.state===3)t.phi.gcd(t.e).compareTo(ye.ONE)===0?++t.state:(t.p=null,t.q=null,t.state=0);else if(t.state===4)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(t.state===5){var c=t.e.modInverse(t.phi);t.keys={privateKey:ee.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:ee.rsa.setPublicKey(t.n,t.e)}}s=+new Date,o+=s-a,a=s}return t.keys!==null};ee.rsa.generateKeyPair=function(t,e,r,n){if(arguments.length===1?typeof t=="object"?(r=t,t=void 0):typeof t=="function"&&(n=t,t=void 0):arguments.length===2?typeof t=="number"?typeof e=="function"?(n=e,e=void 0):typeof e!="number"&&(r=e,e=void 0):(r=t,n=e,t=void 0,e=void 0):arguments.length===3&&(typeof e=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=e,e=void 0)),r=r||{},t===void 0&&(t=r.bits||2048),e===void 0&&(e=r.e||65537),!G.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(e===65537||e===3)){if(n){if(nh("generateKeyPair"))return jl.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,l,u){if(o)return n(o);n(null,{privateKey:ee.privateKeyFromPem(u),publicKey:ee.publicKeyFromPem(l)})});if(ih("generateKey")&&ih("exportKey"))return Ht.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:sh(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return Ht.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){n(o)}).then(function(o){if(o){var l=ee.privateKeyFromAsn1(A.fromDer(G.util.createBuffer(o)));n(null,{privateKey:l,publicKey:ee.setRsaPublicKey(l.n,l.e)})}});if(ah("generateKey")&&ah("exportKey")){var i=Ht.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:sh(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);i.oncomplete=function(o){var l=o.target.result,u=Ht.globalScope.msCrypto.subtle.exportKey("pkcs8",l.privateKey);u.oncomplete=function(c){var f=c.target.result,d=ee.privateKeyFromAsn1(A.fromDer(G.util.createBuffer(f)));n(null,{privateKey:d,publicKey:ee.setRsaPublicKey(d.n,d.e)})},u.onerror=function(c){n(c)}},i.onerror=function(o){n(o)};return}}else if(nh("generateKeyPairSync")){var a=jl.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:ee.privateKeyFromPem(a.privateKey),publicKey:ee.publicKeyFromPem(a.publicKey)}}}var s=ee.rsa.createKeyPairGenerationState(t,e,r);if(!n)return ee.rsa.stepKeyPairGenerationState(s,0),s.keys;tx(s,r,n)};ee.setRsaPublicKey=ee.rsa.setPublicKey=function(t,e){var r={n:t,e};return r.encrypt=function(n,i,a){if(typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSAES-PKCS1-V1_5"),i==="RSAES-PKCS1-V1_5")i={encode:function(o,l,u){return lh(o,l,2).getBytes()}};else if(i==="RSA-OAEP"||i==="RSAES-OAEP")i={encode:function(o,l){return G.pkcs1.encode_rsa_oaep(l,o,a)}};else if(["RAW","NONE","NULL",null].indexOf(i)!==-1)i={encode:function(o){return o}};else if(typeof i=="string")throw new Error('Unsupported encryption scheme: "'+i+'".');var s=i.encode(n,r,!0);return ee.rsa.encrypt(s,r,!0)},r.verify=function(n,i,a,s){typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSASSA-PKCS1-V1_5"),s===void 0&&(s={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in s||(s._parseAllDigestBytes=!0),a==="RSASSA-PKCS1-V1_5"?a={verify:function(l,u){u=rs(u,r,!0);var c=A.fromDer(u,{parseAllBytes:s._parseAllDigestBytes}),f={},d=[];if(!A.validate(c,Qb,f,d)){var p=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw p.errors=d,p}var h=A.derToOid(f.algorithmIdentifier);if(!(h===G.oids.md2||h===G.oids.md5||h===G.oids.sha1||h===G.oids.sha224||h===G.oids.sha256||h===G.oids.sha384||h===G.oids.sha512||h===G.oids["sha512-224"]||h===G.oids["sha512-256"])){var p=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw p.oid=h,p}if((h===G.oids.md2||h===G.oids.md5)&&!("parameters"in f))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return l===f.digest}}:(a==="NONE"||a==="NULL"||a===null)&&(a={verify:function(l,u){return u=rs(u,r,!0),l===u}});var o=ee.rsa.decrypt(i,r,!0,!1);return a.verify(n,o,r.n.bitLength())},r};ee.setRsaPrivateKey=ee.rsa.setPrivateKey=function(t,e,r,n,i,a,s,o){var l={n:t,e,d:r,p:n,q:i,dP:a,dQ:s,qInv:o};return l.decrypt=function(u,c,f){typeof c=="string"?c=c.toUpperCase():c===void 0&&(c="RSAES-PKCS1-V1_5");var d=ee.rsa.decrypt(u,l,!1,!1);if(c==="RSAES-PKCS1-V1_5")c={decode:rs};else if(c==="RSA-OAEP"||c==="RSAES-OAEP")c={decode:function(p,h){return G.pkcs1.decode_rsa_oaep(h,p,f)}};else if(["RAW","NONE","NULL",null].indexOf(c)!==-1)c={decode:function(p){return p}};else throw new Error('Unsupported encryption scheme: "'+c+'".');return c.decode(d,l,!1)},l.sign=function(u,c){var f=!1;typeof c=="string"&&(c=c.toUpperCase()),c===void 0||c==="RSASSA-PKCS1-V1_5"?(c={encode:ex},f=1):(c==="NONE"||c==="NULL"||c===null)&&(c={encode:function(){return u}},f=1);var d=c.encode(u,l.n.bitLength());return ee.rsa.encrypt(d,l,f)},l};ee.wrapRsaPrivateKey=function(t){return A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,A.integerToDer(0).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ee.oids.rsaEncryption).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.NULL,!1,"")]),A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,A.toDer(t).getBytes())])};ee.privateKeyFromAsn1=function(t){var e={},r=[];if(A.validate(t,Yb,e,r)&&(t=A.fromDer(G.util.createBuffer(e.privateKey))),e={},r=[],!A.validate(t,Xb,e,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var i,a,s,o,l,u,c,f;return i=G.util.createBuffer(e.privateKeyModulus).toHex(),a=G.util.createBuffer(e.privateKeyPublicExponent).toHex(),s=G.util.createBuffer(e.privateKeyPrivateExponent).toHex(),o=G.util.createBuffer(e.privateKeyPrime1).toHex(),l=G.util.createBuffer(e.privateKeyPrime2).toHex(),u=G.util.createBuffer(e.privateKeyExponent1).toHex(),c=G.util.createBuffer(e.privateKeyExponent2).toHex(),f=G.util.createBuffer(e.privateKeyCoefficient).toHex(),ee.setRsaPrivateKey(new ye(i,16),new ye(a,16),new ye(s,16),new ye(o,16),new ye(l,16),new ye(u,16),new ye(c,16),new ye(f,16))};ee.privateKeyToAsn1=ee.privateKeyToRSAPrivateKey=function(t){return A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,A.integerToDer(0).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.n)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.e)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.d)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.p)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.q)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.dP)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.dQ)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.qInv))])};ee.publicKeyFromAsn1=function(t){var e={},r=[];if(A.validate(t,Jb,e,r)){var n=A.derToOid(e.publicKeyOid);if(n!==ee.oids.rsaEncryption){var i=new Error("Cannot read public key. Unknown OID.");throw i.oid=n,i}t=e.rsaPublicKey}if(r=[],!A.validate(t,Zb,e,r)){var i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw i.errors=r,i}var a=G.util.createBuffer(e.publicKeyModulus).toHex(),s=G.util.createBuffer(e.publicKeyExponent).toHex();return ee.setRsaPublicKey(new ye(a,16),new ye(s,16))};ee.publicKeyToAsn1=ee.publicKeyToSubjectPublicKeyInfo=function(t){return A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ee.oids.rsaEncryption).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.NULL,!1,"")]),A.create(A.Class.UNIVERSAL,A.Type.BITSTRING,!1,[ee.publicKeyToRSAPublicKey(t)])])};ee.publicKeyToRSAPublicKey=function(t){return A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.n)),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,hr(t.e))])};function lh(t,e,r){var n=G.util.createBuffer(),i=Math.ceil(e.n.bitLength()/8);if(t.length>i-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.");throw a.length=t.length,a.max=i-11,a}n.putByte(0),n.putByte(r);var s=i-3-t.length,o;if(r===0||r===1){o=r===0?0:255;for(var l=0;l0;){for(var u=0,c=G.random.getBytes(s),l=0;l"u")throw new Error("Encryption block is invalid.");var l=0;if(o===0){l=i-3-n;for(var u=0;u1;){if(a.getByte()!==255){--a.read;break}++l}else if(o===2)for(l=0;a.length()>1;){if(a.getByte()===0){--a.read;break}++l}var c=a.getByte();if(c!==0||l!==i-3-a.length())throw new Error("Encryption block is invalid.");return a.getBytes()}function tx(t,e,r){typeof e=="function"&&(r=e,e={}),e=e||{};var n={algorithm:{name:e.algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(n.prng=e.prng),i();function i(){a(t.pBits,function(o,l){if(o)return r(o);if(t.p=l,t.q!==null)return s(o,t.q);a(t.qBits,s)})}function a(o,l){G.prime.generateProbablePrime(o,n,l)}function s(o,l){if(o)return r(o);if(t.q=l,t.p.compareTo(t.q)<0){var u=t.p;t.p=t.q,t.q=u}if(t.p.subtract(ye.ONE).gcd(t.e).compareTo(ye.ONE)!==0){t.p=null,i();return}if(t.q.subtract(ye.ONE).gcd(t.e).compareTo(ye.ONE)!==0){t.q=null,a(t.qBits,s);return}if(t.p1=t.p.subtract(ye.ONE),t.q1=t.q.subtract(ye.ONE),t.phi=t.p1.multiply(t.q1),t.phi.gcd(t.e).compareTo(ye.ONE)!==0){t.p=t.q=null,i();return}if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits){t.q=null,a(t.qBits,s);return}var c=t.e.modInverse(t.phi);t.keys={privateKey:ee.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:ee.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}}function hr(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=G.util.hexToBytes(e);return r.length>1&&(r.charCodeAt(0)===0&&!(r.charCodeAt(1)&128)||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}function rx(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function nh(t){return G.util.isNodejs&&typeof jl[t]=="function"}function ih(t){return typeof Ht.globalScope<"u"&&typeof Ht.globalScope.crypto=="object"&&typeof Ht.globalScope.crypto.subtle=="object"&&typeof Ht.globalScope.crypto.subtle[t]=="function"}function ah(t){return typeof Ht.globalScope<"u"&&typeof Ht.globalScope.msCrypto=="object"&&typeof Ht.globalScope.msCrypto.subtle=="object"&&typeof Ht.globalScope.msCrypto.subtle[t]=="function"}function sh(t){for(var e=G.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),n=0;n{var K=ie();Kr();Jt();Pi();sr();$r();Za();rn();Kt();Vl();Mi();xe();typeof ch>"u"&&(ch=K.jsbn.BigInteger);var ch,_=K.asn1,re=K.pki=K.pki||{};ph.exports=re.pbe=K.pbe=K.pbe||{};var sn=re.oids,nx={name:"EncryptedPrivateKeyInfo",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},ix={name:"PBES2Algorithms",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},ax={name:"pkcs-12PbeParams",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"iterations"}]};re.encryptPrivateKeyInfo=function(t,e,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=K.random.getBytesSync(r.saltSize),i=r.count,a=_.integerToDer(i),s,o,l;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var u,c,f;switch(r.algorithm){case"aes128":s=16,u=16,c=sn["aes128-CBC"],f=K.aes.createEncryptionCipher;break;case"aes192":s=24,u=16,c=sn["aes192-CBC"],f=K.aes.createEncryptionCipher;break;case"aes256":s=32,u=16,c=sn["aes256-CBC"],f=K.aes.createEncryptionCipher;break;case"des":s=8,u=8,c=sn.desCBC,f=K.des.createEncryptionCipher;break;default:var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=r.algorithm,d}var p="hmacWith"+r.prfAlgorithm.toUpperCase(),h=hh(p),m=K.pkcs5.pbkdf2(e,n,i,s,h),g=K.random.getBytesSync(u),b=f(m);b.start(g),b.update(_.toDer(t)),b.finish(),l=b.output.getBytes();var I=sx(n,a,s,p);o=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(sn.pkcs5PBES2).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(sn.pkcs5PBKDF2).getBytes()),I]),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(c).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,g)])])])}else if(r.algorithm==="3des"){s=24;var w=new K.util.ByteBuffer(n),m=re.pbe.generatePkcs12Key(e,w,1,i,s),g=re.pbe.generatePkcs12Key(e,w,2,i,s),b=K.des.createEncryptionCipher(m);b.start(g),b.update(_.toDer(t)),b.finish(),l=b.output.getBytes(),o=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(sn["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,n),_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,a.getBytes())])])}else{var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=r.algorithm,d}var T=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[o,_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,l)]);return T};re.decryptPrivateKeyInfo=function(t,e){var r=null,n={},i=[];if(!_.validate(t,nx,n,i)){var a=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}var s=_.derToOid(n.encryptionOid),o=re.pbe.getCipher(s,n.encryptionParams,e),l=K.util.createBuffer(n.encryptedData);return o.update(l),o.finish()&&(r=_.fromDer(o.output)),r};re.encryptedPrivateKeyToPem=function(t,e){var r={type:"ENCRYPTED PRIVATE KEY",body:_.toDer(t).getBytes()};return K.pem.encode(r,{maxline:e})};re.encryptedPrivateKeyFromPem=function(t){var e=K.pem.decode(t)[0];if(e.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return _.fromDer(e.body)};re.encryptRsaPrivateKey=function(t,e,r){if(r=r||{},!r.legacy){var n=re.wrapRsaPrivateKey(re.privateKeyToAsn1(t));return n=re.encryptPrivateKeyInfo(n,e,r),re.encryptedPrivateKeyToPem(n)}var i,a,s,o;switch(r.algorithm){case"aes128":i="AES-128-CBC",s=16,a=K.random.getBytesSync(16),o=K.aes.createEncryptionCipher;break;case"aes192":i="AES-192-CBC",s=24,a=K.random.getBytesSync(16),o=K.aes.createEncryptionCipher;break;case"aes256":i="AES-256-CBC",s=32,a=K.random.getBytesSync(16),o=K.aes.createEncryptionCipher;break;case"3des":i="DES-EDE3-CBC",s=24,a=K.random.getBytesSync(8),o=K.des.createEncryptionCipher;break;case"des":i="DES-CBC",s=8,a=K.random.getBytesSync(8),o=K.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw l.algorithm=r.algorithm,l}var u=K.pbe.opensslDeriveBytes(e,a.substr(0,8),s),c=o(u);c.start(a),c.update(_.toDer(re.privateKeyToAsn1(t))),c.finish();var f={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:i,parameters:K.util.bytesToHex(a).toUpperCase()},body:c.output.getBytes()};return K.pem.encode(f)};re.decryptRsaPrivateKey=function(t,e){var r=null,n=K.pem.decode(t)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var i=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw i.headerType=i,i}if(n.procType&&n.procType.type==="ENCRYPTED"){var a,s;switch(n.dekInfo.algorithm){case"DES-CBC":a=8,s=K.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,s=K.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,s=K.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,s=K.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,s=K.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,s=function(f){return K.rc2.createDecryptionCipher(f,40)};break;case"RC2-64-CBC":a=8,s=function(f){return K.rc2.createDecryptionCipher(f,64)};break;case"RC2-128-CBC":a=16,s=function(f){return K.rc2.createDecryptionCipher(f,128)};break;default:var i=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw i.algorithm=n.dekInfo.algorithm,i}var o=K.util.hexToBytes(n.dekInfo.parameters),l=K.pbe.opensslDeriveBytes(e,o.substr(0,8),a),u=s(l);if(u.start(o),u.update(K.util.createBuffer(n.body)),u.finish())r=u.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=re.decryptPrivateKeyInfo(_.fromDer(r),e):r=_.fromDer(r),r!==null&&(r=re.privateKeyFromAsn1(r)),r};re.pbe.generatePkcs12Key=function(t,e,r,n,i,a){var s,o;if(typeof a>"u"||a===null){if(!("sha1"in K.md))throw new Error('"sha1" hash algorithm unavailable.');a=K.md.sha1.create()}var l=a.digestLength,u=a.blockLength,c=new K.util.ByteBuffer,f=new K.util.ByteBuffer;if(t!=null){for(o=0;o=0;o--)he=he>>8,he+=q.at(o)+ae.at(o),ae.setAt(o,he&255);J.putBuffer(ae)}w=J,c.putBuffer(N)}return c.truncate(c.length()-i),c};re.pbe.getCipher=function(t,e,r){switch(t){case re.oids.pkcs5PBES2:return re.pbe.getCipherForPBES2(t,e,r);case re.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case re.oids["pbewithSHAAnd40BitRC2-CBC"]:return re.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};re.pbe.getCipherForPBES2=function(t,e,r){var n={},i=[];if(!_.validate(e,ix,n,i)){var a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}if(t=_.derToOid(n.kdfOid),t!==re.oids.pkcs5PBKDF2){var a=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw a.oid=t,a.supportedOids=["pkcs5PBKDF2"],a}if(t=_.derToOid(n.encOid),t!==re.oids["aes128-CBC"]&&t!==re.oids["aes192-CBC"]&&t!==re.oids["aes256-CBC"]&&t!==re.oids["des-EDE3-CBC"]&&t!==re.oids.desCBC){var a=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw a.oid=t,a.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],a}var s=n.kdfSalt,o=K.util.createBuffer(n.kdfIterationCount);o=o.getInt(o.length()<<3);var l,u;switch(re.oids[t]){case"aes128-CBC":l=16,u=K.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,u=K.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,u=K.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,u=K.des.createDecryptionCipher;break;case"desCBC":l=8,u=K.des.createDecryptionCipher;break}var c=dh(n.prfOid),f=K.pkcs5.pbkdf2(r,s,o,l,c),d=n.encIv,p=u(f);return p.start(d),p};re.pbe.getCipherForPKCS12PBE=function(t,e,r){var n={},i=[];if(!_.validate(e,ax,n,i)){var a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw a.errors=i,a}var s=K.util.createBuffer(n.salt),o=K.util.createBuffer(n.iterations);o=o.getInt(o.length()<<3);var l,u,c;switch(t){case re.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:l=24,u=8,c=K.des.startDecrypting;break;case re.oids["pbewithSHAAnd40BitRC2-CBC"]:l=5,u=8,c=function(m,g){var b=K.rc2.createDecryptionCipher(m,40);return b.start(g,null),b};break;default:var a=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw a.oid=t,a}var f=dh(n.prfOid),d=re.pbe.generatePkcs12Key(r,s,1,o,l,f);f.start();var p=re.pbe.generatePkcs12Key(r,s,2,o,u,f);return c(d,p)};re.pbe.opensslDeriveBytes=function(t,e,r,n){if(typeof n>"u"||n===null){if(!("md5"in K.md))throw new Error('"md5" hash algorithm unavailable.');n=K.md.md5.create()}e===null&&(e="");for(var i=[fh(n,t+e)],a=16,s=1;a{var Mn=ie();Jt();xe();var V=Mn.asn1,Fn=yh.exports=Mn.pkcs7asn1=Mn.pkcs7asn1||{};Mn.pkcs7=Mn.pkcs7||{};Mn.pkcs7.asn1=Fn;var mh={name:"ContentInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Fn.contentInfoValidator=mh;var gh={name:"EncryptedContentInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Fn.envelopedDataValidator={name:"EnvelopedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(gh)};Fn.encryptedDataValidator={name:"EncryptedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"}].concat(gh)};var ox={name:"SignerInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:V.Class.UNIVERSAL,type:V.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:V.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Fn.signedDataValidator={name:"SignedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},mh,{name:"SignedData.Certificates",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:V.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,capture:"signerInfos",optional:!0,value:[ox]}]};Fn.recipientInfoValidator={name:"RecipientInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:V.Class.UNIVERSAL,type:V.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var Zl=Q((BB,vh)=>{var on=ie();xe();on.mgf=on.mgf||{};var lx=vh.exports=on.mgf.mgf1=on.mgf1=on.mgf1||{};lx.create=function(t){var e={generate:function(r,n){for(var i=new on.util.ByteBuffer,a=Math.ceil(n/t.digestLength),s=0;s{var ns=ie();Zl();Ch.exports=ns.mgf=ns.mgf||{};ns.mgf.mgf1=ns.mgf1});var is=Q((kB,xh)=>{var ln=ie();Kt();xe();var ux=xh.exports=ln.pss=ln.pss||{};ux.create=function(t){arguments.length===3&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e=t.md,r=t.mgf,n=e.digestLength,i=t.salt||null;typeof i=="string"&&(i=ln.util.createBuffer(i));var a;if("saltLength"in t)a=t.saltLength;else if(i!==null)a=i.length();else throw new Error("Salt length not specified or specific salt not given.");if(i!==null&&i.length()!==a)throw new Error("Given salt length does not match length of given salt.");var s=t.prng||ln.random,o={};return o.encode=function(l,u){var c,f=u-1,d=Math.ceil(f/8),p=l.digest().getBytes();if(d>8*d-f&255;return B=String.fromCharCode(B.charCodeAt(0)&~N)+B.substr(1),B+g+String.fromCharCode(188)},o.verify=function(l,u,c){var f,d=c-1,p=Math.ceil(d/8);if(u=u.substr(-p),p>8*p-d&255;if(m.charCodeAt(0)&b)throw new Error("Bits beyond keysize not zero as expected.");var I=r.generate(g,h),w="";for(f=0;f{var W=ie();Kr();Jt();Pi();sr();bh();$r();rn();is();Mi();xe();var y=W.asn1,P=Ah.exports=W.pki=W.pki||{},ve=P.oids,Ye={};Ye.CN=ve.commonName;Ye.commonName="CN";Ye.C=ve.countryName;Ye.countryName="C";Ye.L=ve.localityName;Ye.localityName="L";Ye.ST=ve.stateOrProvinceName;Ye.stateOrProvinceName="ST";Ye.O=ve.organizationName;Ye.organizationName="O";Ye.OU=ve.organizationalUnitName;Ye.organizationalUnitName="OU";Ye.E=ve.emailAddress;Ye.emailAddress="E";var Sh=W.pki.rsa.publicKeyValidator,cx={name:"Certificate",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:y.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:y.Class.UNIVERSAL,type:y.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:y.Class.UNIVERSAL,type:y.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:y.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:y.Class.UNIVERSAL,type:y.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:y.Class.UNIVERSAL,type:y.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:y.Class.UNIVERSAL,type:y.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:y.Class.UNIVERSAL,type:y.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Sh,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:y.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:y.Class.UNIVERSAL,type:y.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:y.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:y.Class.UNIVERSAL,type:y.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:y.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:y.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:y.Class.UNIVERSAL,type:y.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},fx={name:"rsapss",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:y.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:y.Class.UNIVERSAL,type:y.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:y.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:y.Class.UNIVERSAL,type:y.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:y.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:y.Class.UNIVERSAL,type:y.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:y.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:y.Class.UNIVERSAL,type:y.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},dx={name:"CertificationRequestInfo",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:y.Class.UNIVERSAL,type:y.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Sh,{name:"CertificationRequestInfo.attributes",tagClass:y.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:y.Class.UNIVERSAL,type:y.Type.SET,constructed:!0}]}]}]},hx={name:"CertificationRequest",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[dx,{name:"CertificationRequest.signatureAlgorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:y.Class.UNIVERSAL,type:y.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:y.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:y.Class.UNIVERSAL,type:y.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};P.RDNAttributesAsArray=function(t,e){for(var r=[],n,i,a,s=0;s2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(s.validity.notBefore=l[0],s.validity.notAfter=l[1],s.tbsCertificate=r.tbsCertificate,e){s.md=ss({signatureOid:s.signatureOid,type:"certificate"});var u=y.toDer(s.tbsCertificate);s.md.update(u.getBytes())}var c=W.md.sha1.create(),f=y.toDer(r.certIssuer);c.update(f.getBytes()),s.issuer.getField=function(h){return Gr(s.issuer,h)},s.issuer.addField=function(h){qt([h]),s.issuer.attributes.push(h)},s.issuer.attributes=P.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(s.issuer.uniqueId=r.certIssuerUniqueId),s.issuer.hash=c.digest().toHex();var d=W.md.sha1.create(),p=y.toDer(r.certSubject);return d.update(p.getBytes()),s.subject.getField=function(h){return Gr(s.subject,h)},s.subject.addField=function(h){qt([h]),s.subject.attributes.push(h)},s.subject.attributes=P.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(s.subject.uniqueId=r.certSubjectUniqueId),s.subject.hash=d.digest().toHex(),r.certExtensions?s.extensions=P.certificateExtensionsFromAsn1(r.certExtensions):s.extensions=[],s.publicKey=P.publicKeyFromAsn1(r.subjectPublicKeyInfo),s};P.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r1&&(n=r.value.charCodeAt(1),i=r.value.length>2?r.value.charCodeAt(2):0),e.digitalSignature=(n&128)===128,e.nonRepudiation=(n&64)===64,e.keyEncipherment=(n&32)===32,e.dataEncipherment=(n&16)===16,e.keyAgreement=(n&8)===8,e.keyCertSign=(n&4)===4,e.cRLSign=(n&2)===2,e.encipherOnly=(n&1)===1,e.decipherOnly=(i&128)===128}else if(e.name==="basicConstraints"){var r=y.fromDer(e.value);r.value.length>0&&r.value[0].type===y.Type.BOOLEAN?e.cA=r.value[0].value.charCodeAt(0)!==0:e.cA=!1;var a=null;r.value.length>0&&r.value[0].type===y.Type.INTEGER?a=r.value[0].value:r.value.length>1&&(a=r.value[1].value),a!==null&&(e.pathLenConstraint=y.derToInteger(a))}else if(e.name==="extKeyUsage")for(var r=y.fromDer(e.value),s=0;s1&&(n=r.value.charCodeAt(1)),e.client=(n&128)===128,e.server=(n&64)===64,e.email=(n&32)===32,e.objsign=(n&16)===16,e.reserved=(n&8)===8,e.sslCA=(n&4)===4,e.emailCA=(n&2)===2,e.objCA=(n&1)===1}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.altNames=[];for(var l,r=y.fromDer(e.value),u=0;u"u"&&(e.type&&e.type in P.oids?e.name=P.oids[e.type]:e.shortName&&e.shortName in Ye&&(e.name=P.oids[Ye[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in P.oids)e.type=P.oids[e.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=e,n}if(typeof e.shortName>"u"&&e.name&&e.name in Ye&&(e.shortName=Ye[e.name]),e.type===ve.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=y.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var i=0;i"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}function Ih(t,e){if(e=e||{},typeof t.name>"u"&&t.id&&t.id in P.oids&&(t.name=P.oids[t.id]),typeof t.id>"u")if(t.name&&t.name in P.oids)t.id=P.oids[t.name];else{var r=new Error("Extension ID not specified.");throw r.extension=t,r}if(typeof t.value<"u")return t;if(t.name==="keyUsage"){var n=0,i=0,a=0;t.digitalSignature&&(i|=128,n=7),t.nonRepudiation&&(i|=64,n=6),t.keyEncipherment&&(i|=32,n=5),t.dataEncipherment&&(i|=16,n=4),t.keyAgreement&&(i|=8,n=3),t.keyCertSign&&(i|=4,n=2),t.cRLSign&&(i|=2,n=1),t.encipherOnly&&(i|=1,n=0),t.decipherOnly&&(a|=128,n=7);var s=String.fromCharCode(n);a!==0?s+=String.fromCharCode(i)+String.fromCharCode(a):i!==0&&(s+=String.fromCharCode(i)),t.value=y.create(y.Class.UNIVERSAL,y.Type.BITSTRING,!1,s)}else if(t.name==="basicConstraints")t.value=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]),t.cA&&t.value.value.push(y.create(y.Class.UNIVERSAL,y.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in t&&t.value.value.push(y.create(y.Class.UNIVERSAL,y.Type.INTEGER,!1,y.integerToDer(t.pathLenConstraint).getBytes()));else if(t.name==="extKeyUsage"){t.value=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]);var o=t.value.value;for(var l in t)t[l]===!0&&(l in ve?o.push(y.create(y.Class.UNIVERSAL,y.Type.OID,!1,y.oidToDer(ve[l]).getBytes())):l.indexOf(".")!==-1&&o.push(y.create(y.Class.UNIVERSAL,y.Type.OID,!1,y.oidToDer(l).getBytes())))}else if(t.name==="nsCertType"){var n=0,i=0;t.client&&(i|=128,n=7),t.server&&(i|=64,n=6),t.email&&(i|=32,n=5),t.objsign&&(i|=16,n=4),t.reserved&&(i|=8,n=3),t.sslCA&&(i|=4,n=2),t.emailCA&&(i|=2,n=1),t.objCA&&(i|=1,n=0);var s=String.fromCharCode(n);i!==0&&(s+=String.fromCharCode(i)),t.value=y.create(y.Class.UNIVERSAL,y.Type.BITSTRING,!1,s)}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.value=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]);for(var u,c=0;c128)throw new Error('Invalid "nsComment" content.');t.value=y.create(y.Class.UNIVERSAL,y.Type.IA5STRING,!1,t.comment)}else if(t.name==="subjectKeyIdentifier"&&e.cert){var f=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=f.toHex(),t.value=y.create(y.Class.UNIVERSAL,y.Type.OCTETSTRING,!1,f.getBytes())}else if(t.name==="authorityKeyIdentifier"&&e.cert){t.value=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]);var o=t.value.value;if(t.keyIdentifier){var d=t.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;o.push(y.create(y.Class.CONTEXT_SPECIFIC,0,!1,d))}if(t.authorityCertIssuer){var p=[y.create(y.Class.CONTEXT_SPECIFIC,4,!0,[Vn(t.authorityCertIssuer===!0?e.cert.issuer:t.authorityCertIssuer)])];o.push(y.create(y.Class.CONTEXT_SPECIFIC,1,!0,p))}if(t.serialNumber){var h=W.util.hexToBytes(t.serialNumber===!0?e.cert.serialNumber:t.serialNumber);o.push(y.create(y.Class.CONTEXT_SPECIFIC,2,!1,h))}}else if(t.name==="cRLDistributionPoints"){t.value=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]);for(var o=t.value.value,m=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]),g=y.create(y.Class.CONTEXT_SPECIFIC,0,!0,[]),u,c=0;c"u"){var r=new Error("Extension value not specified.");throw r.extension=t,r}return t}function Jl(t,e){switch(t){case ve["RSASSA-PSS"]:var r=[];return e.hash.algorithmOid!==void 0&&r.push(y.create(y.Class.CONTEXT_SPECIFIC,0,!0,[y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[y.create(y.Class.UNIVERSAL,y.Type.OID,!1,y.oidToDer(e.hash.algorithmOid).getBytes()),y.create(y.Class.UNIVERSAL,y.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&r.push(y.create(y.Class.CONTEXT_SPECIFIC,1,!0,[y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[y.create(y.Class.UNIVERSAL,y.Type.OID,!1,y.oidToDer(e.mgf.algorithmOid).getBytes()),y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[y.create(y.Class.UNIVERSAL,y.Type.OID,!1,y.oidToDer(e.mgf.hash.algorithmOid).getBytes()),y.create(y.Class.UNIVERSAL,y.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&r.push(y.create(y.Class.CONTEXT_SPECIFIC,2,!0,[y.create(y.Class.UNIVERSAL,y.Type.INTEGER,!1,y.integerToDer(e.saltLength).getBytes())])),y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,r);default:return y.create(y.Class.UNIVERSAL,y.Type.NULL,!1,"")}}function px(t){var e=y.create(y.Class.CONTEXT_SPECIFIC,0,!0,[]);if(t.attributes.length===0)return e;for(var r=t.attributes,n=0;n=mx&&t0&&n.value.push(P.certificateExtensionsToAsn1(t.extensions)),n};P.getCertificationRequestInfo=function(t){var e=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[y.create(y.Class.UNIVERSAL,y.Type.INTEGER,!1,y.integerToDer(t.version).getBytes()),Vn(t.subject),P.publicKeyToAsn1(t.publicKey),px(t)]);return e};P.distinguishedNameToAsn1=function(t){return Vn(t)};P.certificateToAsn1=function(t){var e=t.tbsCertificate||P.getTBSCertificate(t);return y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[e,y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[y.create(y.Class.UNIVERSAL,y.Type.OID,!1,y.oidToDer(t.signatureOid).getBytes()),Jl(t.signatureOid,t.signatureParameters)]),y.create(y.Class.UNIVERSAL,y.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])};P.certificateExtensionsToAsn1=function(t){var e=y.create(y.Class.CONTEXT_SPECIFIC,3,!0,[]),r=y.create(y.Class.UNIVERSAL,y.Type.SEQUENCE,!0,[]);e.value.push(r);for(var n=0;n"u"&&(i=new Date);var a=!0,s=null,o=0;do{var l=e.shift(),u=null,c=!1;if(i&&(il.validity.notAfter)&&(s={message:"Certificate is not valid yet or has expired.",error:P.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:i}),s===null){if(u=e[0]||t.getIssuer(l),u===null&&l.isIssuer(l)&&(c=!0,u=l),u){var f=u;W.util.isArray(f)||(f=[f]);for(var d=!1;!d&&f.length>0;){u=f.shift();try{d=u.verify(l)}catch{}}d||(s={message:"Certificate signature is invalid.",error:P.certificateError.bad_certificate})}s===null&&(!u||c)&&!t.hasCertificate(l)&&(s={message:"Certificate is not trusted.",error:P.certificateError.unknown_ca})}if(s===null&&u&&!l.isIssuer(u)&&(s={message:"Certificate issuer is invalid.",error:P.certificateError.bad_certificate}),s===null)for(var p={keyUsage:!0,basicConstraints:!0},h=0;s===null&&hg.pathLenConstraint&&(s={message:"Certificate basicConstraints pathLenConstraint violated.",error:P.certificateError.bad_certificate})}}var w=s===null?!0:s.error,T=r.verify?r.verify(w,o,n):w;if(T===!0)s=null;else throw w===!0&&(s={message:"The application rejected the certificate.",error:P.certificateError.bad_certificate}),(T||T===0)&&(typeof T=="object"&&!W.util.isArray(T)?(T.message&&(s.message=T.message),T.error&&(s.error=T.error)):typeof T=="string"&&(s.error=T)),s;a=!1,++o}while(e.length>0);return!0}});var eu=Q((OB,Rh)=>{var Le=ie();Jt();Ln();$r();Xl();Yl();Kt();Mi();Un();xe();os();var x=Le.asn1,fe=Le.pki,Vi=Rh.exports=Le.pkcs12=Le.pkcs12||{},Th={name:"ContentInfo",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:x.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},yx={name:"PFX",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:x.Class.UNIVERSAL,type:x.Type.INTEGER,constructed:!1,capture:"version"},Th,{name:"PFX.macData",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:x.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:x.Class.UNIVERSAL,type:x.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:x.Class.UNIVERSAL,type:x.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:x.Class.UNIVERSAL,type:x.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},vx={name:"SafeBag",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:x.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:x.Class.UNIVERSAL,type:x.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Cx={name:"Attribute",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:x.Class.UNIVERSAL,type:x.Type.SET,constructed:!0,capture:"values"}]},bx={name:"CertBag",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:x.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:x.Class.UNIVERSAL,type:x.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Fi(t,e,r,n){for(var i=[],a=0;a=0&&i.push(o)}}return i}Vi.pkcs12FromAsn1=function(t,e,r){typeof e=="string"?(r=e,e=!0):e===void 0&&(e=!0);var n={},i=[];if(!x.validate(t,yx,n,i)){var a=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw a.errors=a,a}var s={version:n.version.charCodeAt(0),safeContents:[],getBags:function(g){var b={},I;return"localKeyId"in g?I=g.localKeyId:"localKeyIdHex"in g&&(I=Le.util.hexToBytes(g.localKeyIdHex)),I===void 0&&!("friendlyName"in g)&&"bagType"in g&&(b[g.bagType]=Fi(s.safeContents,null,null,g.bagType)),I!==void 0&&(b.localKeyId=Fi(s.safeContents,"localKeyId",I,g.bagType)),"friendlyName"in g&&(b.friendlyName=Fi(s.safeContents,"friendlyName",g.friendlyName,g.bagType)),b},getBagsByFriendlyName:function(g,b){return Fi(s.safeContents,"friendlyName",g,b)},getBagsByLocalKeyId:function(g,b){return Fi(s.safeContents,"localKeyId",g,b)}};if(n.version.charCodeAt(0)!==3){var a=new Error("PKCS#12 PFX of version other than 3 not supported.");throw a.version=n.version.charCodeAt(0),a}if(x.derToOid(n.contentType)!==fe.oids.data){var a=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw a.oid=x.derToOid(n.contentType),a}var o=n.content.value[0];if(o.tagClass!==x.Class.UNIVERSAL||o.type!==x.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=Ql(o),n.mac){var l=null,u=0,c=x.derToOid(n.macAlgorithm);switch(c){case fe.oids.sha1:l=Le.md.sha1.create(),u=20;break;case fe.oids.sha256:l=Le.md.sha256.create(),u=32;break;case fe.oids.sha384:l=Le.md.sha384.create(),u=48;break;case fe.oids.sha512:l=Le.md.sha512.create(),u=64;break;case fe.oids.md5:l=Le.md.md5.create(),u=16;break}if(l===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var f=new Le.util.ByteBuffer(n.macSalt),d="macIterations"in n?parseInt(Le.util.bytesToHex(n.macIterations),16):1,p=Vi.generateKey(r,f,3,d,u,l),h=Le.hmac.create();h.start(l,p),h.update(o.value);var m=h.getMac();if(m.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return xx(s,o.value,e,r),s};function Ql(t){if(t.composed||t.constructed){for(var e=Le.util.createBuffer(),r=0;r0&&(a=x.create(x.Class.UNIVERSAL,x.Type.SET,!0,l));var u=[],c=[];e!==null&&(Le.util.isArray(e)?c=e:c=[e]);for(var f=[],d=0;d0){var g=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,f),b=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(fe.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(g).getBytes())])]);u.push(b)}var I=null;if(t!==null){var w=fe.wrapRsaPrivateKey(fe.privateKeyToAsn1(t));r===null?I=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(fe.oids.keyBag).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[w]),a]):I=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(fe.oids.pkcs8ShroudedKeyBag).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[fe.encryptPrivateKeyInfo(w,r,n)]),a]);var T=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[I]),B=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(fe.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(T).getBytes())])]);u.push(B)}var N=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,u),H;if(n.useMac){var o=Le.md.sha1.create(),q=new Le.util.ByteBuffer(Le.random.getBytes(n.saltSize)),j=n.count,t=Vi.generateKey(r,q,3,j,20),J=Le.hmac.create();J.start(o,t),J.update(x.toDer(N).getBytes());var ae=J.getMac();H=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(fe.oids.sha1).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,ae.getBytes())]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,q.getBytes()),x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(j).getBytes())])}return x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(3).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(fe.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(N).getBytes())])]),H])};Vi.generateKey=Le.pbe.generatePkcs12Key});var ru=Q((PB,_h)=>{var Wr=ie();Jt();$r();Yl();rn();Za();eu();is();Mi();xe();os();var tu=Wr.asn1,Kn=_h.exports=Wr.pki=Wr.pki||{};Kn.pemToDer=function(t){var e=Wr.pem.decode(t)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Wr.util.createBuffer(e.body)};Kn.privateKeyFromPem=function(t){var e=Wr.pem.decode(t)[0];if(e.type!=="PRIVATE KEY"&&e.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=tu.fromDer(e.body);return Kn.privateKeyFromAsn1(n)};Kn.privateKeyToPem=function(t,e){var r={type:"RSA PRIVATE KEY",body:tu.toDer(Kn.privateKeyToAsn1(t)).getBytes()};return Wr.pem.encode(r,{maxline:e})};Kn.privateKeyInfoToPem=function(t,e){var r={type:"PRIVATE KEY",body:tu.toDer(t).getBytes()};return Wr.pem.encode(r,{maxline:e})}});var lu=Q((DB,Uh)=>{var L=ie();Jt();Ln();Wa();rn();ru();Kt();Un();xe();var fs=function(t,e,r,n){var i=L.util.createBuffer(),a=t.length>>1,s=a+(t.length&1),o=t.substr(0,s),l=t.substr(a,s),u=L.util.createBuffer(),c=L.hmac.create();r=e+r;var f=Math.ceil(n/16),d=Math.ceil(n/20);c.start("MD5",o);var p=L.util.createBuffer();u.putBytes(r);for(var h=0;h0&&(C.queue(t,C.createAlert(t,{level:C.Alert.Level.warning,description:C.Alert.Description.no_renegotiation})),C.flush(t)),t.process()};C.parseHelloMessage=function(t,e,r){var n=null,i=t.entity===C.ConnectionEnd.client;if(r<38)t.error(t,{message:i?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.illegal_parameter}});else{var a=e.fragment,s=a.length();if(n={version:{major:a.getByte(),minor:a.getByte()},random:L.util.createBuffer(a.getBytes(32)),session_id:Ut(a,1),extensions:[]},i?(n.cipher_suite=a.getBytes(2),n.compression_method=a.getByte()):(n.cipher_suites=Ut(a,2),n.compression_methods=Ut(a,1)),s=r-(s-a.length()),s>0){for(var o=Ut(a,2);o.length()>0;)n.extensions.push({type:[o.getByte(),o.getByte()],data:Ut(o,2)});if(!i)for(var l=0;l0;){var f=c.getByte();if(f!==0)break;t.session.extensions.server_name.serverNameList.push(Ut(c,2).getBytes())}}}if(t.session.version&&(n.version.major!==t.session.version.major||n.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.protocol_version}});if(i)t.session.cipherSuite=C.getCipherSuite(n.cipher_suite);else for(var d=L.util.createBuffer(n.cipher_suites.bytes());d.length()>0&&(t.session.cipherSuite=C.getCipherSuite(d.getBytes(2)),t.session.cipherSuite===null););if(t.session.cipherSuite===null)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.handshake_failure},cipherSuite:L.util.bytesToHex(n.cipher_suite)});i?t.session.compressionMethod=n.compression_method:t.session.compressionMethod=C.CompressionMethod.none}return n};C.createSecurityParameters=function(t,e){var r=t.entity===C.ConnectionEnd.client,n=e.random.bytes(),i=r?t.session.sp.client_random:n,a=r?n:C.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:C.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:a}};C.handleServerHello=function(t,e,r){var n=C.parseHelloMessage(t,e,r);if(!t.fail){if(n.version.minor<=t.version.minor)t.version.minor=n.version.minor;else return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.protocol_version}});t.session.version=t.version;var i=n.session_id.bytes();i.length>0&&i===t.session.id?(t.expect=kh,t.session.resuming=!0,t.session.sp.server_random=n.random.bytes()):(t.expect=_x,t.session.resuming=!1,C.createSecurityParameters(t,n)),t.session.id=i,t.process()}};C.handleClientHello=function(t,e,r){var n=C.parseHelloMessage(t,e,r);if(!t.fail){var i=n.session_id.bytes(),a=null;if(t.sessionCache&&(a=t.sessionCache.getSession(i),a===null?i="":(a.version.major!==n.version.major||a.version.minor>n.version.minor)&&(a=null,i="")),i.length===0&&(i=L.random.getBytes(32)),t.session.id=i,t.session.clientHelloVersion=n.version,t.session.sp={},a)t.version=t.session.version=a.version,t.session.sp=a.sp;else{for(var s,o=1;o0;)a=Ut(i.certificate_list,3),s=L.asn1.fromDer(a),a=L.pki.certificateFromAsn1(s,!0),o.push(a)}catch(u){return t.error(t,{message:"Could not parse certificate list.",cause:u,send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.bad_certificate}})}var l=t.entity===C.ConnectionEnd.client;(l||t.verifyClient===!0)&&o.length===0?t.error(t,{message:l?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.illegal_parameter}}):o.length===0?t.expect=l?Bh:au:(l?t.session.serverCertificate=o[0]:t.session.clientCertificate=o[0],C.verifyCertificateChain(t,o)&&(t.expect=l?Bh:au)),t.process()};C.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.unsupported_certificate}});t.expect=Bx,t.process()};C.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.unsupported_certificate}});var n=e.fragment,i={enc_pre_master_secret:Ut(n,2).getBytes()},a=null;if(t.getPrivateKey)try{a=t.getPrivateKey(t,t.session.serverCertificate),a=L.pki.privateKeyFromPem(a)}catch(l){t.error(t,{message:"Could not get private key.",cause:l,send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.internal_error}})}if(a===null)return t.error(t,{message:"No private key set.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.internal_error}});try{var s=t.session.sp;s.pre_master_secret=a.decrypt(i.enc_pre_master_secret);var o=t.session.clientHelloVersion;if(o.major!==s.pre_master_secret.charCodeAt(0)||o.minor!==s.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{s.pre_master_secret=L.random.getBytes(48)}t.expect=su,t.session.clientCertificate!==null&&(t.expect=Ux),t.process()};C.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.illegal_parameter}});var n=e.fragment,i={certificate_types:Ut(n,1),certificate_authorities:Ut(n,2)};t.session.certificateRequest=i,t.expect=Nx,t.process()};C.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var i=n.bytes();n.read+=4;var a={signature:Ut(n,2).getBytes()},s=L.util.createBuffer();s.putBuffer(t.session.md5.digest()),s.putBuffer(t.session.sha1.digest()),s=s.getBytes();try{var o=t.session.clientCertificate;if(!o.publicKey.verify(s,a.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(i),t.session.sha1.update(i)}catch{return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.handshake_failure}})}t.expect=su,t.process()};C.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.record_overflow}});if(t.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.insufficient_security}},i=0,a=t.verify(t,n.alert.description,i,[]);if(a!==!0)return(a||a===0)&&(typeof a=="object"&&!L.util.isArray(a)?(a.message&&(n.message=a.message),a.alert&&(n.alert.description=a.alert)):typeof a=="number"&&(n.alert.description=a)),t.error(t,n)}t.session.certificateRequest!==null&&(e=C.createRecord(t,{type:C.ContentType.handshake,data:C.createCertificate(t)}),C.queue(t,e)),e=C.createRecord(t,{type:C.ContentType.handshake,data:C.createClientKeyExchange(t)}),C.queue(t,e),t.expect=Ox;var s=function(o,l){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&C.queue(o,C.createRecord(o,{type:C.ContentType.handshake,data:C.createCertificateVerify(o,l)})),C.queue(o,C.createRecord(o,{type:C.ContentType.change_cipher_spec,data:C.createChangeCipherSpec()})),o.state.pending=C.createConnectionState(o),o.state.current.write=o.state.pending.write,C.queue(o,C.createRecord(o,{type:C.ContentType.handshake,data:C.createFinished(o)})),o.expect=kh,C.flush(o),o.process()};if(t.session.certificateRequest===null||t.session.clientCertificate===null)return s(t,null);C.getClientSignature(t,s)};C.handleChangeCipherSpec=function(t,e){if(e.fragment.getByte()!==1)return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.illegal_parameter}});var r=t.entity===C.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=C.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?kx:Mx,t.process()};C.handleFinished=function(t,e,r){var n=e.fragment;n.read-=4;var i=n.bytes();n.read+=4;var a=e.fragment.getBytes();n=L.util.createBuffer(),n.putBuffer(t.session.md5.digest()),n.putBuffer(t.session.sha1.digest());var s=t.entity===C.ConnectionEnd.client,o=s?"server finished":"client finished",l=t.session.sp,u=12,c=fs;if(n=c(l.master_secret,o,n.getBytes(),u),n.getBytes()!==a)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.decrypt_error}});t.session.md5.update(i),t.session.sha1.update(i),(t.session.resuming&&s||!t.session.resuming&&!s)&&(C.queue(t,C.createRecord(t,{type:C.ContentType.change_cipher_spec,data:C.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,C.queue(t,C.createRecord(t,{type:C.ContentType.handshake,data:C.createFinished(t)}))),t.expect=s?Lx:Fx,t.handshaking=!1,++t.handshakes,t.peerCertificate=s?t.session.serverCertificate:t.session.clientCertificate,C.flush(t),t.isConnected=!0,t.connected(t),t.process()};C.handleAlert=function(t,e){var r=e.fragment,n={level:r.getByte(),description:r.getByte()},i;switch(n.description){case C.Alert.Description.close_notify:i="Connection closed.";break;case C.Alert.Description.unexpected_message:i="Unexpected message.";break;case C.Alert.Description.bad_record_mac:i="Bad record MAC.";break;case C.Alert.Description.decryption_failed:i="Decryption failed.";break;case C.Alert.Description.record_overflow:i="Record overflow.";break;case C.Alert.Description.decompression_failure:i="Decompression failed.";break;case C.Alert.Description.handshake_failure:i="Handshake failure.";break;case C.Alert.Description.bad_certificate:i="Bad certificate.";break;case C.Alert.Description.unsupported_certificate:i="Unsupported certificate.";break;case C.Alert.Description.certificate_revoked:i="Certificate revoked.";break;case C.Alert.Description.certificate_expired:i="Certificate expired.";break;case C.Alert.Description.certificate_unknown:i="Certificate unknown.";break;case C.Alert.Description.illegal_parameter:i="Illegal parameter.";break;case C.Alert.Description.unknown_ca:i="Unknown certificate authority.";break;case C.Alert.Description.access_denied:i="Access denied.";break;case C.Alert.Description.decode_error:i="Decode error.";break;case C.Alert.Description.decrypt_error:i="Decrypt error.";break;case C.Alert.Description.export_restriction:i="Export restriction.";break;case C.Alert.Description.protocol_version:i="Unsupported protocol version.";break;case C.Alert.Description.insufficient_security:i="Insufficient security.";break;case C.Alert.Description.internal_error:i="Internal error.";break;case C.Alert.Description.user_canceled:i="User canceled.";break;case C.Alert.Description.no_renegotiation:i="Renegotiation not supported.";break;default:i="Unknown error.";break}if(n.description===C.Alert.Description.close_notify)return t.close();t.error(t,{message:i,send:!1,origin:t.entity===C.ConnectionEnd.client?"server":"client",alert:n}),t.process()};C.handleHandshake=function(t,e){var r=e.fragment,n=r.getByte(),i=r.getInt24();if(i>r.length())return t.fragmented=e,e.fragment=L.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var a=r.bytes(i+4);r.read+=4,n in cs[t.entity][t.expect]?(t.entity===C.ConnectionEnd.server&&!t.open&&!t.fail&&(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:L.md.md5.create(),sha1:L.md.sha1.create()}),n!==C.HandshakeType.hello_request&&n!==C.HandshakeType.certificate_verify&&n!==C.HandshakeType.finished&&(t.session.md5.update(a),t.session.sha1.update(a)),cs[t.entity][t.expect][n](t,e,i)):C.handleUnexpected(t,e)};C.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()};C.handleHeartbeat=function(t,e){var r=e.fragment,n=r.getByte(),i=r.getInt16(),a=r.getBytes(i);if(n===C.HeartbeatMessageType.heartbeat_request){if(t.handshaking||i>a.length)return t.process();C.queue(t,C.createRecord(t,{type:C.ContentType.heartbeat,data:C.createHeartbeat(C.HeartbeatMessageType.heartbeat_response,a)})),C.flush(t)}else if(n===C.HeartbeatMessageType.heartbeat_response){if(a!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,L.util.createBuffer(a))}t.process()};var Rx=0,_x=1,Bh=2,Bx=3,Nx=4,kh=5,kx=6,Lx=7,Ox=8,Px=0,Dx=1,au=2,Ux=3,su=4,Mx=5,Fx=6,v=C.handleUnexpected,Lh=C.handleChangeCipherSpec,mt=C.handleAlert,It=C.handleHandshake,Oh=C.handleApplicationData,gt=C.handleHeartbeat,ou=[];ou[C.ConnectionEnd.client]=[[v,mt,It,v,gt],[v,mt,It,v,gt],[v,mt,It,v,gt],[v,mt,It,v,gt],[v,mt,It,v,gt],[Lh,mt,v,v,gt],[v,mt,It,v,gt],[v,mt,It,Oh,gt],[v,mt,It,v,gt]];ou[C.ConnectionEnd.server]=[[v,mt,It,v,gt],[v,mt,It,v,gt],[v,mt,It,v,gt],[v,mt,It,v,gt],[Lh,mt,v,v,gt],[v,mt,It,v,gt],[v,mt,It,Oh,gt],[v,mt,It,v,gt]];var zr=C.handleHelloRequest,Vx=C.handleServerHello,Ph=C.handleCertificate,Nh=C.handleServerKeyExchange,nu=C.handleCertificateRequest,ls=C.handleServerHelloDone,Dh=C.handleFinished,cs=[];cs[C.ConnectionEnd.client]=[[v,v,Vx,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,Ph,Nh,nu,ls,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,v,Nh,nu,ls,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,v,v,nu,ls,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,v,v,v,ls,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,Dh],[zr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[zr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v]];var Kx=C.handleClientHello,$x=C.handleClientKeyExchange,Hx=C.handleCertificateVerify;cs[C.ConnectionEnd.server]=[[v,Kx,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,Ph,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,$x,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,Hx,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,Dh],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v]];C.generateKeys=function(t,e){var r=fs,n=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var i=2*e.mac_key_length+2*e.enc_key_length,a=t.version.major===C.Versions.TLS_1_0.major&&t.version.minor===C.Versions.TLS_1_0.minor;a&&(i+=2*e.fixed_iv_length);var s=r(e.master_secret,"key expansion",n,i),o={client_write_MAC_key:s.getBytes(e.mac_key_length),server_write_MAC_key:s.getBytes(e.mac_key_length),client_write_key:s.getBytes(e.enc_key_length),server_write_key:s.getBytes(e.enc_key_length)};return a&&(o.client_write_IV=s.getBytes(e.fixed_iv_length),o.server_write_IV=s.getBytes(e.fixed_iv_length)),o};C.createConnectionState=function(t){var e=t.entity===C.ConnectionEnd.client,r=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(s){return!0},compressionState:null,compressFunction:function(s){return!0},updateSequenceNumber:function(){a.sequenceNumber[1]===4294967295?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},n={read:r(),write:r()};if(n.read.update=function(a,s){return n.read.cipherFunction(s,n.read)?n.read.compressFunction(a,s,n.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.decompression_failure}}):a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.bad_record_mac}}),!a.fail},n.write.update=function(a,s){return n.write.compressFunction(a,s,n.write)?n.write.cipherFunction(s,n.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.internal_error}}),!a.fail},t.session){var i=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(i),i.keys=C.generateKeys(t,i),n.read.macKey=e?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=e?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(n,t,i),i.compression_algorithm){case C.CompressionMethod.none:break;case C.CompressionMethod.deflate:n.read.compressFunction=Tx,n.write.compressFunction=Ax;break;default:throw new Error("Unsupported compression algorithm.")}}return n};C.createRandom=function(){var t=new Date,e=+t+t.getTimezoneOffset()*6e4,r=L.util.createBuffer();return r.putInt32(e),r.putBytes(L.random.getBytes(28)),r};C.createRecord=function(t,e){if(!e.data)return null;var r={type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data};return r};C.createAlert=function(t,e){var r=L.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),C.createRecord(t,{type:C.ContentType.alert,data:r})};C.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=L.util.createBuffer(),r=0;r0&&(f+=2);var d=t.session.id,p=d.length+1+2+4+28+2+i+1+s+f,h=L.util.createBuffer();return h.putByte(C.HandshakeType.client_hello),h.putInt24(p),h.putByte(t.version.major),h.putByte(t.version.minor),h.putBytes(t.session.sp.client_random),Gt(h,1,L.util.createBuffer(d)),Gt(h,2,e),Gt(h,1,a),f>0&&Gt(h,2,o),h};C.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,n=L.util.createBuffer();return n.putByte(C.HandshakeType.server_hello),n.putInt24(r),n.putByte(t.version.major),n.putByte(t.version.minor),n.putBytes(t.session.sp.server_random),Gt(n,1,L.util.createBuffer(e)),n.putByte(t.session.cipherSuite.id[0]),n.putByte(t.session.cipherSuite.id[1]),n.putByte(t.session.compressionMethod),n};C.createCertificate=function(t){var e=t.entity===C.ConnectionEnd.client,r=null;if(t.getCertificate){var n;e?n=t.session.certificateRequest:n=t.session.extensions.server_name.serverNameList,r=t.getCertificate(t,n)}var i=L.util.createBuffer();if(r!==null)try{L.util.isArray(r)||(r=[r]);for(var a=null,s=0;s0&&(r.putByte(C.HandshakeType.server_key_exchange),r.putInt24(e)),r};C.getClientSignature=function(t,e){var r=L.util.createBuffer();r.putBuffer(t.session.md5.digest()),r.putBuffer(t.session.sha1.digest()),r=r.getBytes(),t.getSignature=t.getSignature||function(n,i,a){var s=null;if(n.getPrivateKey)try{s=n.getPrivateKey(n,n.session.clientCertificate),s=L.pki.privateKeyFromPem(s)}catch(o){n.error(n,{message:"Could not get private key.",cause:o,send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.internal_error}})}s===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.internal_error}}):i=s.sign(i,null),a(n,i)},t.getSignature(t,r,e)};C.createCertificateVerify=function(t,e){var r=e.length+2,n=L.util.createBuffer();return n.putByte(C.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(e.length),n.putBytes(e),n};C.createCertificateRequest=function(t){var e=L.util.createBuffer();e.putByte(1);var r=L.util.createBuffer();for(var n in t.caStore.certs){var i=t.caStore.certs[n],a=L.pki.distinguishedNameToAsn1(i.subject),s=L.asn1.toDer(a);r.putInt16(s.length()),r.putBuffer(s)}var o=1+e.length()+2+r.length(),l=L.util.createBuffer();return l.putByte(C.HandshakeType.certificate_request),l.putInt24(o),Gt(l,1,e),Gt(l,2,r),l};C.createServerHelloDone=function(t){var e=L.util.createBuffer();return e.putByte(C.HandshakeType.server_hello_done),e.putInt24(0),e};C.createChangeCipherSpec=function(){var t=L.util.createBuffer();return t.putByte(1),t};C.createFinished=function(t){var e=L.util.createBuffer();e.putBuffer(t.session.md5.digest()),e.putBuffer(t.session.sha1.digest());var r=t.entity===C.ConnectionEnd.client,n=t.session.sp,i=12,a=fs,s=r?"client finished":"server finished";e=a(n.master_secret,s,e.getBytes(),i);var o=L.util.createBuffer();return o.putByte(C.HandshakeType.finished),o.putInt24(e.length()),o.putBuffer(e),o};C.createHeartbeat=function(t,e,r){typeof r>"u"&&(r=e.length);var n=L.util.createBuffer();n.putByte(t),n.putInt16(r),n.putBytes(e);var i=n.length(),a=Math.max(16,i-r-3);return n.putBytes(L.random.getBytes(a)),n};C.queue=function(t,e){if(e&&!(e.fragment.length()===0&&(e.type===C.ContentType.handshake||e.type===C.ContentType.alert||e.type===C.ContentType.change_cipher_spec))){if(e.type===C.ContentType.handshake){var r=e.fragment.bytes();t.session.md5.update(r),t.session.sha1.update(r),r=null}var n;if(e.fragment.length()<=C.MaxFragment)n=[e];else{n=[];for(var i=e.fragment.bytes();i.length>C.MaxFragment;)n.push(C.createRecord(t,{type:e.type,data:L.util.createBuffer(i.slice(0,C.MaxFragment))})),i=i.slice(C.MaxFragment);i.length>0&&n.push(C.createRecord(t,{type:e.type,data:L.util.createBuffer(i)}))}for(var a=0;a0&&(s=r.order[0]),s!==null&&s in r.cache){a=r.cache[s],delete r.cache[s];for(var o in r.order)if(r.order[o]===s){r.order.splice(o,1);break}}return a},r.setSession=function(i,a){if(r.order.length===r.capacity){var s=r.order.shift();delete r.cache[s]}var s=L.util.bytesToHex(i);r.order.push(s),r.cache[s]=a}}return r};C.createConnection=function(t){var e=null;t.caStore?L.util.isArray(t.caStore)?e=L.pki.createCaStore(t.caStore):e=t.caStore:e=L.pki.createCaStore();var r=t.cipherSuites||null;if(r===null){r=[];for(var n in C.CipherSuites)r.push(C.CipherSuites[n])}var i=t.server?C.ConnectionEnd.server:C.ConnectionEnd.client,a=t.sessionCache?C.createSessionCache(t.sessionCache):null,s={version:{major:C.Version.major,minor:C.Version.minor},entity:i,sessionId:t.sessionId,caStore:e,sessionCache:a,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(c,f,d,p){return f},verifyOptions:t.verifyOptions||{},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:L.util.createBuffer(),tlsData:L.util.createBuffer(),data:L.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:function(c,f){f.origin=f.origin||(c.entity===C.ConnectionEnd.client?"client":"server"),f.send&&(C.queue(c,C.createAlert(c,f.alert)),C.flush(c));var d=f.fatal!==!1;d&&(c.fail=!0),t.error(c,f),d&&c.close(!1)},deflate:t.deflate||null,inflate:t.inflate||null};s.reset=function(c){s.version={major:C.Version.major,minor:C.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=s.entity===C.ConnectionEnd.client?Rx:Px,s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(c||typeof c>"u"),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=C.createConnectionState(s)},s.reset();var o=function(c,f){var d=f.type-C.ContentType.change_cipher_spec,p=ou[c.entity][c.expect];d in p?p[d](c,f):C.handleUnexpected(c,f)},l=function(c){var f=0,d=c.input,p=d.length();if(p<5)f=5-p;else{c.record={type:d.getByte(),version:{major:d.getByte(),minor:d.getByte()},length:d.getInt16(),fragment:L.util.createBuffer(),ready:!1};var h=c.record.version.major===c.version.major;h&&c.session&&c.session.version&&(h=c.record.version.minor===c.version.minor),h||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:C.Alert.Level.fatal,description:C.Alert.Description.protocol_version}})}return f},u=function(c){var f=0,d=c.input,p=d.length();if(p0&&(s.sessionCache&&(f=s.sessionCache.getSession(c)),f===null&&(c="")),c.length===0&&s.sessionCache&&(f=s.sessionCache.getSession(),f!==null&&(c=f.id)),s.session={id:c,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:L.md.md5.create(),sha1:L.md.sha1.create()},f&&(s.version=f.version,s.session.sp=f.sp),s.session.sp.client_random=C.createRandom().getBytes(),s.open=!0,C.queue(s,C.createRecord(s,{type:C.ContentType.handshake,data:C.createClientHello(s)})),C.flush(s)}},s.process=function(c){var f=0;return c&&s.input.putBytes(c),s.fail||(s.record!==null&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),s.record===null&&(f=l(s)),!s.fail&&s.record!==null&&!s.record.ready&&(f=u(s)),!s.fail&&s.record!==null&&s.record.ready&&o(s,s.record)),f},s.prepare=function(c){return C.queue(s,C.createRecord(s,{type:C.ContentType.application_data,data:L.util.createBuffer(c)})),C.flush(s)},s.prepareHeartbeatRequest=function(c,f){return c instanceof L.util.ByteBuffer&&(c=c.bytes()),typeof f>"u"&&(f=c.length),s.expectedHeartbeatPayload=c,C.queue(s,C.createRecord(s,{type:C.ContentType.heartbeat,data:C.createHeartbeat(C.HeartbeatMessageType.heartbeat_request,c,f)})),C.flush(s)},s.close=function(c){if(!s.fail&&s.sessionCache&&s.session){var f={id:s.session.id,version:s.session.version,sp:s.session.sp};f.sp.keys=null,s.sessionCache.setSession(f.id,f)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,C.queue(s,C.createAlert(s,{level:C.Alert.Level.warning,description:C.Alert.Description.close_notify})),C.flush(s)),s.closed(s)),s.reset(c)},s};Uh.exports=L.tls=L.tls||{};for(us in C)typeof C[us]!="function"&&(L.tls[us]=C[us]);var us;L.tls.prf_tls1=fs;L.tls.hmac_sha1=Ix;L.tls.createSessionCache=C.createSessionCache;L.tls.createConnection=C.createConnection});var Vh=Q((UB,Fh)=>{var jr=ie();Kr();lu();var Wt=Fh.exports=jr.tls;Wt.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=Wt.BulkCipherAlgorithm.aes,t.cipher_type=Wt.CipherType.block,t.enc_key_length=16,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=Wt.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:Mh};Wt.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=Wt.BulkCipherAlgorithm.aes,t.cipher_type=Wt.CipherType.block,t.enc_key_length=32,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=Wt.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:Mh};function Mh(t,e,r){var n=e.entity===jr.tls.ConnectionEnd.client;t.read.cipherState={init:!1,cipher:jr.cipher.createDecipher("AES-CBC",n?r.keys.server_write_key:r.keys.client_write_key),iv:n?r.keys.server_write_IV:r.keys.client_write_IV},t.write.cipherState={init:!1,cipher:jr.cipher.createCipher("AES-CBC",n?r.keys.client_write_key:r.keys.server_write_key),iv:n?r.keys.client_write_IV:r.keys.server_write_IV},t.read.cipherFunction=jx,t.write.cipherFunction=Gx,t.read.macLength=t.write.macLength=r.mac_length,t.read.macFunction=t.write.macFunction=Wt.hmac_sha1}function Gx(t,e){var r=!1,n=e.macFunction(e.macKey,e.sequenceNumber,t);t.fragment.putBytes(n),e.updateSequenceNumber();var i;t.version.minor===Wt.Versions.TLS_1_0.minor?i=e.cipherState.init?null:e.cipherState.iv:i=jr.random.getBytesSync(16),e.cipherState.init=!0;var a=e.cipherState.cipher;return a.start({iv:i}),t.version.minor>=Wt.Versions.TLS_1_1.minor&&a.output.putBytes(i),a.update(t.fragment),a.finish(Wx)&&(t.fragment=a.output,t.length=t.fragment.length(),r=!0),r}function Wx(t,e,r){if(!r){var n=t-e.length()%t;e.fillWithByte(n-1,n)}return!0}function zx(t,e,r){var n=!0;if(r){for(var i=e.length(),a=e.last(),s=i-1-a;s=a?(t.fragment=i.output.getBytes(o-a),s=i.output.getBytes(a)):t.fragment=i.output.getBytes(),t.fragment=jr.util.createBuffer(t.fragment),t.length=t.fragment.length();var l=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),r=Yx(e.macKey,s,l)&&r,r}function Yx(t,e,r){var n=jr.hmac.create();return n.start("SHA1",t),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),e===r}});var fu=Q((MB,qh)=>{var De=ie();sr();xe();var Ki=qh.exports=De.sha512=De.sha512||{};De.md.sha512=De.md.algorithms.sha512=Ki;var $h=De.sha384=De.sha512.sha384=De.sha512.sha384||{};$h.create=function(){return Ki.create("SHA-384")};De.md.sha384=De.md.algorithms.sha384=$h;De.sha512.sha256=De.sha512.sha256||{create:function(){return Ki.create("SHA-512/256")}};De.md["sha512/256"]=De.md.algorithms["sha512/256"]=De.sha512.sha256;De.sha512.sha224=De.sha512.sha224||{create:function(){return Ki.create("SHA-512/224")}};De.md["sha512/224"]=De.md.algorithms["sha512/224"]=De.sha512.sha224;Ki.create=function(t){if(Hh||Xx(),typeof t>"u"&&(t="SHA-512"),!(t in un))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=un[t],r=null,n=De.util.createBuffer(),i=new Array(80),a=0;a<80;++a)i[a]=new Array(2);var s=64;switch(t){case"SHA-384":s=48;break;case"SHA-512/256":s=32;break;case"SHA-512/224":s=28;break}var o={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:s,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var l=o.messageLengthSize/4,u=0;u>>0,c>>>0];for(var f=o.fullMessageLength.length-1;f>=0;--f)o.fullMessageLength[f]+=c[1],c[1]=c[0]+(o.fullMessageLength[f]/4294967296>>>0),o.fullMessageLength[f]=o.fullMessageLength[f]>>>0,c[0]=c[1]/4294967296>>>0;return n.putBytes(l),Kh(r,i,n),(n.read>2048||n.length()===0)&&n.compact(),o},o.digest=function(){var l=De.util.createBuffer();l.putBytes(n.bytes());var u=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,c=u&o.blockLength-1;l.putBytes(uu.substr(0,o.blockLength-c));for(var f,d,p=o.fullMessageLength[0]*8,h=0;h>>0,p+=d,l.putInt32(p>>>0),p=f>>>0;l.putInt32(p);for(var m=new Array(r.length),h=0;h=128;){for(be=0;be<16;++be)e[be][0]=r.getInt32()>>>0,e[be][1]=r.getInt32()>>>0;for(;be<80;++be)Ct=e[be-2],ne=Ct[0],$=Ct[1],n=((ne>>>19|$<<13)^($>>>29|ne<<3)^ne>>>6)>>>0,i=((ne<<13|$>>>19)^($<<3|ne>>>29)^(ne<<26|$>>>6))>>>0,ze=e[be-15],ne=ze[0],$=ze[1],a=((ne>>>1|$<<31)^(ne>>>8|$<<24)^ne>>>7)>>>0,s=((ne<<31|$>>>1)^(ne<<24|$>>>8)^(ne<<25|$>>>7))>>>0,dt=e[be-7],Ve=e[be-16],$=i+dt[1]+s+Ve[1],e[be][0]=n+dt[0]+a+Ve[0]+($/4294967296>>>0)>>>0,e[be][1]=$>>>0;for(m=t[0][0],g=t[0][1],b=t[1][0],I=t[1][1],w=t[2][0],T=t[2][1],B=t[3][0],N=t[3][1],H=t[4][0],q=t[4][1],j=t[5][0],J=t[5][1],ae=t[6][0],he=t[6][1],Y=t[7][0],st=t[7][1],be=0;be<80;++be)u=((H>>>14|q<<18)^(H>>>18|q<<14)^(q>>>9|H<<23))>>>0,c=((H<<18|q>>>14)^(H<<14|q>>>18)^(q<<23|H>>>9))>>>0,f=(ae^H&(j^ae))>>>0,d=(he^q&(J^he))>>>0,o=((m>>>28|g<<4)^(g>>>2|m<<30)^(g>>>7|m<<25))>>>0,l=((m<<4|g>>>28)^(g<<30|m>>>2)^(g<<25|m>>>7))>>>0,p=(m&b|w&(m^b))>>>0,h=(g&I|T&(g^I))>>>0,$=st+c+d+cu[be][1]+e[be][1],n=Y+u+f+cu[be][0]+e[be][0]+($/4294967296>>>0)>>>0,i=$>>>0,$=l+h,a=o+p+($/4294967296>>>0)>>>0,s=$>>>0,Y=ae,st=he,ae=j,he=J,j=H,J=q,$=N+i,H=B+n+($/4294967296>>>0)>>>0,q=$>>>0,B=w,N=T,w=b,T=I,b=m,I=g,$=i+s,m=n+a+($/4294967296>>>0)>>>0,g=$>>>0;$=t[0][1]+g,t[0][0]=t[0][0]+m+($/4294967296>>>0)>>>0,t[0][1]=$>>>0,$=t[1][1]+I,t[1][0]=t[1][0]+b+($/4294967296>>>0)>>>0,t[1][1]=$>>>0,$=t[2][1]+T,t[2][0]=t[2][0]+w+($/4294967296>>>0)>>>0,t[2][1]=$>>>0,$=t[3][1]+N,t[3][0]=t[3][0]+B+($/4294967296>>>0)>>>0,t[3][1]=$>>>0,$=t[4][1]+q,t[4][0]=t[4][0]+H+($/4294967296>>>0)>>>0,t[4][1]=$>>>0,$=t[5][1]+J,t[5][0]=t[5][0]+j+($/4294967296>>>0)>>>0,t[5][1]=$>>>0,$=t[6][1]+he,t[6][0]=t[6][0]+ae+($/4294967296>>>0)>>>0,t[6][1]=$>>>0,$=t[7][1]+st,t[7][0]=t[7][0]+Y+($/4294967296>>>0)>>>0,t[7][1]=$>>>0,je-=128}}});var Gh=Q(du=>{var Zx=ie();Jt();var ft=Zx.asn1;du.privateKeyValidator={name:"PrivateKeyInfo",tagClass:ft.Class.UNIVERSAL,type:ft.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:ft.Class.UNIVERSAL,type:ft.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:ft.Class.UNIVERSAL,type:ft.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ft.Class.UNIVERSAL,type:ft.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:ft.Class.UNIVERSAL,type:ft.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};du.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:ft.Class.UNIVERSAL,type:ft.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:ft.Class.UNIVERSAL,type:ft.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ft.Class.UNIVERSAL,type:ft.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:ft.Class.UNIVERSAL,type:ft.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var ip=Q((VB,np)=>{var yt=ie();Ui();Kt();fu();xe();var Zh=Gh(),Jx=Zh.publicKeyValidator,Qx=Zh.privateKeyValidator;typeof Wh>"u"&&(Wh=yt.jsbn.BigInteger);var Wh,mu=yt.util.ByteBuffer,Ot=typeof Buffer>"u"?Uint8Array:Buffer;yt.pki=yt.pki||{};np.exports=yt.pki.ed25519=yt.ed25519=yt.ed25519||{};var de=yt.ed25519;de.constants={};de.constants.PUBLIC_KEY_BYTE_LENGTH=32;de.constants.PRIVATE_KEY_BYTE_LENGTH=64;de.constants.SEED_BYTE_LENGTH=32;de.constants.SIGN_BYTE_LENGTH=64;de.constants.HASH_BYTE_LENGTH=64;de.generateKeyPair=function(t){t=t||{};var e=t.seed;if(e===void 0)e=yt.random.getBytesSync(de.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==de.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+de.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=Tr({message:e,encoding:"binary"});for(var r=new Ot(de.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Ot(de.constants.PRIVATE_KEY_BYTE_LENGTH),i=0;i<32;++i)n[i]=e[i];return nw(r,n),{publicKey:r,privateKey:n}};de.privateKeyFromAsn1=function(t){var e={},r=[],n=yt.asn1.validate(t,Qx,e,r);if(!n){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=yt.asn1.derToOid(e.privateKeyOid),s=yt.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var o=e.privateKey,l=Tr({message:yt.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:l}};de.publicKeyFromAsn1=function(t){var e={},r=[],n=yt.asn1.validate(t,Jx,e,r);if(!n){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=yt.asn1.derToOid(e.publicKeyOid),s=yt.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var o=e.ed25519PublicKey;if(o.length!==de.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Tr({message:o,encoding:"binary"})};de.publicKeyFromPrivateKey=function(t){t=t||{};var e=Tr({message:t.privateKey,encoding:"binary"});if(e.length!==de.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+de.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new Ot(de.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n=0};function Tr(t){var e=t.message;if(e instanceof Uint8Array||e instanceof Ot)return e;var r=t.encoding;if(e===void 0)if(t.md)e=t.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof e=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.from(e,r);e=new mu(e,r)}else if(!(e instanceof mu))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new Ot(e.length()),i=0;i=32;--n){for(r=0,i=n-32,a=n-12;i>8,e[i]-=r*256;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;++i)e[i]+=r-(e[31]>>4)*hu[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;++i)e[i]-=r*hu[i];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,t[n]=e[n]&255}function yu(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;Jh(t,e)}function vu(t,e){var r=z(),n=z(),i=z(),a=z(),s=z(),o=z(),l=z(),u=z(),c=z();Hn(r,t[1],t[0]),Hn(c,e[1],e[0]),Ne(r,r,c),$n(n,t[0],t[1]),$n(c,e[0],e[1]),Ne(n,n,c),Ne(i,t[3],e[3]),Ne(i,i,tw),Ne(a,t[2],e[2]),$n(a,a,a),Hn(s,n,r),Hn(o,a,i),$n(l,a,i),$n(u,n,r),Ne(t[0],s,o),Ne(t[1],u,l),Ne(t[2],l,o),Ne(t[3],s,u)}function Yh(t,e,r){for(var n=0;n<4;++n)rp(t[n],e[n],r)}function Cu(t,e){var r=z(),n=z(),i=z();cw(i,e[2]),Ne(r,e[0],i),Ne(n,e[1],i),hs(t,n),t[31]^=ep(r)<<7}function hs(t,e){var r,n,i,a=z(),s=z();for(r=0;r<16;++r)s[r]=e[r];for(pu(s),pu(s),pu(s),n=0;n<2;++n){for(a[0]=s[0]-65517,r=1;r<15;++r)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,rp(s,a,1-i)}for(r=0;r<16;r++)t[2*r]=s[r]&255,t[2*r+1]=s[r]>>8}function sw(t,e){var r=z(),n=z(),i=z(),a=z(),s=z(),o=z(),l=z();return Yr(t[2],ds),ow(t[1],e),cn(i,t[1]),Ne(a,i,ew),Hn(i,i,t[2]),$n(a,t[2],a),cn(s,a),cn(o,s),Ne(l,o,s),Ne(r,l,i),Ne(r,r,a),lw(r,r),Ne(r,r,i),Ne(r,r,a),Ne(r,r,a),Ne(t[0],r,a),cn(n,t[0]),Ne(n,n,a),Xh(n,i)&&Ne(t[0],t[0],rw),cn(n,t[0]),Ne(n,n,a),Xh(n,i)?-1:(ep(t[0])===e[31]>>7&&Hn(t[0],gu,t[0]),Ne(t[3],t[0],t[1]),0)}function ow(t,e){var r;for(r=0;r<16;++r)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function lw(t,e){var r=z(),n;for(n=0;n<16;++n)r[n]=e[n];for(n=250;n>=0;--n)cn(r,r),n!==1&&Ne(r,r,e);for(n=0;n<16;++n)t[n]=r[n]}function Xh(t,e){var r=new Ot(32),n=new Ot(32);return hs(r,t),hs(n,e),Qh(r,0,n,0)}function Qh(t,e,r,n){return uw(t,e,r,n,32)}function uw(t,e,r,n,i){var a,s=0;for(a=0;a>>8)-1}function ep(t){var e=new Ot(32);return hs(e,t),e[0]&1}function tp(t,e,r){var n,i;for(Yr(t[0],gu),Yr(t[1],ds),Yr(t[2],ds),Yr(t[3],gu),i=255;i>=0;--i)n=r[i/8|0]>>(i&7)&1,Yh(t,e,n),vu(e,t),vu(t,t),Yh(t,e,n)}function bu(t,e){var r=[z(),z(),z(),z()];Yr(r[0],zh),Yr(r[1],jh),Yr(r[2],ds),Ne(r[3],zh,jh),tp(t,r,e)}function Yr(t,e){var r;for(r=0;r<16;r++)t[r]=e[r]|0}function cw(t,e){var r=z(),n;for(n=0;n<16;++n)r[n]=e[n];for(n=253;n>=0;--n)cn(r,r),n!==2&&n!==4&&Ne(r,r,e);for(n=0;n<16;++n)t[n]=r[n]}function pu(t){var e,r,n=1;for(e=0;e<16;++e)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-n*65536;t[0]+=n-1+37*(n-1)}function rp(t,e,r){for(var n,i=~(r-1),a=0;a<16;++a)n=i&(t[a]^e[a]),t[a]^=n,e[a]^=n}function z(t){var e,r=new Float64Array(16);if(t)for(e=0;e{var Mt=ie();xe();Kt();Ui();op.exports=Mt.kem=Mt.kem||{};var ap=Mt.jsbn.BigInteger;Mt.kem.rsa={};Mt.kem.rsa.create=function(t,e){e=e||{};var r=e.prng||Mt.random,n={};return n.encrypt=function(i,a){var s=Math.ceil(i.n.bitLength()/8),o;do o=new ap(Mt.util.bytesToHex(r.getBytesSync(s)),16).mod(i.n);while(o.compareTo(ap.ONE)<=0);o=Mt.util.hexToBytes(o.toString(16));var l=s-o.length;l>0&&(o=Mt.util.fillString(String.fromCharCode(0),l)+o);var u=i.encrypt(o,"NONE"),c=t.generate(o,a);return{encapsulation:u,key:c}},n.decrypt=function(i,a,s){var o=i.decrypt(a,"NONE");return t.generate(o,s)},n};Mt.kem.kdf1=function(t,e){sp(this,t,0,e||t.digestLength)};Mt.kem.kdf2=function(t,e){sp(this,t,1,e||t.digestLength)};function sp(t,e,r,n){t.generate=function(i,a){for(var s=new Mt.util.ByteBuffer,o=Math.ceil(a/n)+r,l=new Mt.util.ByteBuffer,u=r;u{var pe=ie();xe();fp.exports=pe.log=pe.log||{};pe.log.levels=["none","error","warning","info","debug","verbose","max"];var ps={},Su=[],qi=null;pe.log.LEVEL_LOCKED=1<<1;pe.log.NO_LEVEL_CHECK=1<<2;pe.log.INTERPOLATE=1<<3;for(pr=0;pr"u"||e?t.flags|=pe.log.LEVEL_LOCKED:t.flags&=~pe.log.LEVEL_LOCKED};pe.log.addLogger=function(t){Su.push(t)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(up={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Gi=function(t,e){pe.log.prepareStandard(e);var r=up[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),r.apply(console,n)},qn=pe.log.makeLogger(Gi)):(Gi=function(e,r){pe.log.prepareStandardFull(r),console.log(r.standardFull)},qn=pe.log.makeLogger(Gi)),pe.log.setLevel(qn,"debug"),pe.log.addLogger(qn),qi=qn):console={log:function(){}};var qn,up,Gi;qi!==null&&typeof window<"u"&&window.location&&(Hi=new URL(window.location.href).searchParams,Hi.has("console.level")&&pe.log.setLevel(qi,Hi.get("console.level").slice(-1)[0]),Hi.has("console.lock")&&(cp=Hi.get("console.lock").slice(-1)[0],cp=="true"&&pe.log.lock(qi)));var Hi,cp;pe.log.consoleLogger=qi});var pp=Q((HB,hp)=>{hp.exports=sr();Wa();Un();Dl();fu()});var yp=Q((qB,gp)=>{var M=ie();Kr();Jt();Pi();$r();rn();Xl();Kt();xe();os();var S=M.asn1,At=gp.exports=M.pkcs7=M.pkcs7||{};At.messageFromPem=function(t){var e=M.pem.decode(t)[0];if(e.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=S.fromDer(e.body);return At.messageFromAsn1(n)};At.messageToPem=function(t,e){var r={type:"PKCS7",body:S.toDer(t.toAsn1()).getBytes()};return M.pem.encode(r,{maxline:e})};At.messageFromAsn1=function(t){var e={},r=[];if(!S.validate(t,At.asn1.contentInfoValidator,e,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var i=S.derToOid(e.contentType),a;switch(i){case M.pki.oids.envelopedData:a=At.createEnvelopedData();break;case M.pki.oids.encryptedData:a=At.createEncryptedData();break;case M.pki.oids.signedData:a=At.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+i+" is not (yet) supported.")}return a.fromAsn1(e.content.value[0]),a};At.createSignedData=function(){var t=null;return t={type:M.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(n){if(Iu(t,n,At.asn1.signedDataValidator),t.certificates=[],t.crls=[],t.digestAlgorithmIdentifiers=[],t.contentInfo=null,t.signerInfos=[],t.rawCapture.certificates)for(var i=t.rawCapture.certificates.value,a=0;a0&&s.value[0].value.push(S.create(S.Class.CONTEXT_SPECIFIC,0,!0,n)),a.length>0&&s.value[0].value.push(S.create(S.Class.CONTEXT_SPECIFIC,1,!0,a)),s.value[0].value.push(S.create(S.Class.UNIVERSAL,S.Type.SET,!0,t.signerInfos)),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(t.type).getBytes()),s])},addSigner:function(n){var i=n.issuer,a=n.serialNumber;if(n.certificate){var s=n.certificate;typeof s=="string"&&(s=M.pki.certificateFromPem(s)),i=s.issuer.attributes,a=s.serialNumber}var o=n.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=M.pki.privateKeyFromPem(o));var l=n.digestAlgorithm||M.pki.oids.sha1;switch(l){case M.pki.oids.sha1:case M.pki.oids.sha256:case M.pki.oids.sha384:case M.pki.oids.sha512:case M.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+l)}var u=n.authenticatedAttributes||[];if(u.length>0){for(var c=!1,f=!1,d=0;d0){for(var r=S.create(S.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n=r&&i{var rt=ie();Kr();Ln();Wa();Un();xe();var gs=vp.exports=rt.ssh=rt.ssh||{};gs.privateKeyToPutty=function(t,e,r){r=r||"",e=e||"";var n="ssh-rsa",i=e===""?"none":"aes256-cbc",a="PuTTY-User-Key-File-2: "+n+`\r `;a+="Encryption: "+i+`\r `,a+="Comment: "+r+`\r `;var s=rt.util.createBuffer();Gn(s,n),mr(s,t.e),mr(s,t.n);var o=rt.util.encode64(s.bytes(),64),l=Math.floor(o.length/66)+1;a+="Public-Lines: "+l+`\r `,a+=o;var u=rt.util.createBuffer();mr(u,t.d),mr(u,t.p),mr(u,t.q),mr(u,t.qInv);var c;if(!e)c=rt.util.encode64(u.bytes(),64);else{var f=u.length()+16-1;f-=f%16;var d=ms(u.bytes());d.truncate(d.length()-f+u.length()),u.putBuffer(d);var p=rt.util.createBuffer();p.putBuffer(ms("\0\0\0\0",e)),p.putBuffer(ms("\0\0\0",e));var h=rt.aes.createEncryptionCipher(p.truncate(8),"CBC");h.start(rt.util.createBuffer().fillWithByte(0,16)),h.update(u.copy()),h.finish();var m=h.output;m.truncate(16),c=rt.util.encode64(m.bytes(),64)}l=Math.floor(c.length/66)+1,a+=`\r Private-Lines: `+l+`\r `,a+=c;var g=ms("putty-private-key-file-mac-key",e),b=rt.util.createBuffer();Gn(b,n),Gn(b,i),Gn(b,r),b.putInt32(s.length()),b.putBuffer(s),b.putInt32(u.length()),b.putBuffer(u);var I=rt.hmac.create();return I.start("sha1",g),I.update(b.bytes()),a+=`\r Private-MAC: `+I.digest().toHex()+`\r `,a};gs.publicKeyToOpenSSH=function(t,e){var r="ssh-rsa";e=e||"";var n=rt.util.createBuffer();return Gn(n,r),mr(n,t.e),mr(n,t.n),r+" "+rt.util.encode64(n.bytes())+" "+e};gs.privateKeyToOpenSSH=function(t,e){return e?rt.pki.encryptRsaPrivateKey(t,e,{legacy:!0,algorithm:"aes128"}):rt.pki.privateKeyToPem(t)};gs.getPublicKeyFingerprint=function(t,e){e=e||{};var r=e.md||rt.md.md5.create(),n="ssh-rsa",i=rt.util.createBuffer();Gn(i,n),mr(i,t.e),mr(i,t.n),r.start(),r.update(i.getBytes());var a=r.digest();if(e.encoding==="hex"){var s=a.toHex();return e.delimiter?s.match(/.{2}/g).join(e.delimiter):s}else{if(e.encoding==="binary")return a.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return a};function mr(t,e){var r=e.toString(16);r[0]>="8"&&(r="00"+r);var n=rt.util.hexToBytes(r);t.putInt32(n.length),t.putBytes(n)}function Gn(t,e){t.putInt32(e.length),t.putString(e)}function ms(){for(var t=rt.md.sha1.create(),e=arguments.length,r=0;r{bp.exports=ie();Kr();Vh();Jt();Fa();Pi();ip();Ln();lp();dp();pp();Zl();Za();rn();Gl();eu();yp();ru();zl();Ul();is();Kt();Vl();Cp();lu();xe()});var er,Wi,wp=D(()=>{er=Ky(xp());In();Wi=class{static async encrypt(e){let r=Nt()?.pk;if(r)try{let n=er.default.pki.publicKeyFromPem(r),i=er.default.random.getBytesSync(32),a=er.default.cipher.createCipher("AES-GCM",i),s=er.default.random.getBytesSync(12);a.start({iv:s}),a.update(er.default.util.createBuffer(JSON.stringify(e),"utf8")),a.finish();let o=a.output.bytes(),l=a.mode.tag.bytes(),u=n.encrypt(i,"RSA-OAEP",{md:er.default.md.sha256.create()});return{k:er.default.util.encode64(u),i:er.default.util.encode64(s),c:er.default.util.encode64(o),t:er.default.util.encode64(l)}}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data.")}else return JSON.stringify(e)}static secureEnv(){return Boolean(window.crypto?.subtle)}}});var tr,Sp=D(()=>{tr=class{static timeExecution(e,r){return new Promise((n,i)=>{let a=Date.now();r().then(s=>{let l=Date.now()-a;this.timings[e]=l,n(s)}).catch(s=>{i(s)})})}static getTimings(){return{...this.timings}}static clearTimings(){this.timings={}}};tr.timings={}});function Cw(t){var e=t.appVersion;if(e.state!==Z.Success)return!1;if(/headless/i.test(e.value))return le.HeadlessChrome;if(/electron/i.test(e.value))return le.Electron;if(/slimerjs/i.test(e.value))return le.SlimerJS}function ys(t,e){return t.indexOf(e)!==-1}function Xr(t,e){return t.indexOf(e)!==-1}function bw(t,e){if("find"in t)return t.find(e);for(var r=0;r=5?Rt.Chromium:Wn(["ApplePayError"in r,"CSSPrimitiveValue"in r,"Counter"in r,n.vendor.indexOf("Apple")===0,"getStorageUpdates"in n,"WebKitMediaKeys"in r])>=4?Rt.Webkit:Wn(["buildID"in navigator,"MozAppearance"in((e=(t=document.documentElement)===null||t===void 0?void 0:t.style)!==null&&e!==void 0?e:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4?Rt.Gecko:Rt.Unknown}function Tu(){var t,e=(t=navigator.userAgent)===null||t===void 0?void 0:t.toLowerCase();return Xr(e,"wechat")?Tt.WeChat:Xr(e,"firefox")?Tt.Firefox:Xr(e,"opera")||Xr(e,"opr")?Tt.Opera:Xr(e,"chrome")?Tt.Chrome:Xr(e,"safari")?Tt.Safari:Xr(e,"trident")||Xr(e,"msie")?Tt.IE:Tt.Unknown}function Sw(){var t=zi(),e=t===Rt.Chromium,r=t===Rt.Gecko;if(!e&&!r)return!1;var n=window;return Wn(["onorientationchange"in n,"orientation"in n,e&&!("SharedWorker"in n),r&&/android/i.test(navigator.appVersion)])>=2}function Ew(){if(zi()!==Rt.Webkit)return!1;var t=window;return Wn(["safari"in t,!("DeviceMotionEvent"in t),!("ongestureend"in t),!("standalone"in navigator)])>=3}function Iw(){return document.hasFocus===void 0?!1:document.hasFocus()}function Aw(){var t=window;return Wn([!("MediaSettingsRange"in t),"RTCEncodedAudioFrame"in t,""+t.Intl=="[object Intl]",""+t.Reflect=="[object Reflect]"])>=3}function Tw(t){var e=t.evalLength;if(e.state===Z.Success){var r=e.value,n=Tu(),i=zi();return r===37&&!ys([Rt.Webkit,Rt.Gecko],i)||r===39&&!ys([Tt.IE],n)||r===33&&!ys([Rt.Chromium],i)}}function Rw(t){var e=t.functionBind;if(e.state===Z.NotFunction)return le.PhantomJS}function _w(t){var e=t.languages;if(e.state===Z.Success&&e.value.length===0)return le.HeadlessChrome}function Bw(t){var e=t.mimeTypesConsistent;if(e.state===Z.Success&&!e.value)return le.Unknown}function Nw(t){var e=t.notificationPermissions,r=Tu();if(r!==Tt.Chrome)return!1;if(e.state===Z.Success&&e.value)return le.HeadlessChrome}function kw(t){var e=t.pluginsArray;if(e.state===Z.Success&&!e.value)return le.HeadlessChrome}function Lw(t){var e=t.pluginsLength;if(e.state===Z.Success){var r=zi();if(!(r===Rt.Chromium&&Sw()||r===Rt.Webkit&&!Ew())&&e.value===0)return le.HeadlessChrome}}function Ow(t){var e,r=t.process;if(r.state!==Z.Success)return!1;if(r.value.type==="renderer"||((e=r.value.versions)===null||e===void 0?void 0:e.electron)!=null)return le.Electron}function Pw(t){var e=t.productSub;if(e.state!==Z.Success)return!1;var r=Tu();if((r===Tt.Chrome||r===Tt.Safari||r===Tt.Opera||r===Tt.WeChat)&&e.value!=="20030107")return le.Unknown}function Dw(t){var e=t.userAgent;if(e.state!==Z.Success)return!1;if(/PhantomJS/i.test(e.value))return le.PhantomJS;if(/Headless/i.test(e.value))return le.HeadlessChrome;if(/Electron/i.test(e.value))return le.Electron;if(/slimerjs/i.test(e.value))return le.SlimerJS}function Uw(t){var e=t.webDriver;if(e.state===Z.Success&&e.value)return le.HeadlessChrome}function Mw(t){var e=t.webGL;if(e.state===Z.Success){var r=e.value,n=r.vendor,i=r.renderer;if(n=="Brian Paul"&&i=="Mesa OffScreen")return le.HeadlessChrome}}function Fw(t){var e=t.windowExternal;if(e.state!==Z.Success)return!1;if(/Sequentum/i.test(e.value))return le.Sequentum}function Vw(t){var e=t.windowSize;if(e.state!==Z.Success)return!1;var r=e.value,n=r.outerWidth,i=r.outerHeight;if(Iw()&&n===0&&i===0)return le.HeadlessChrome}function Kw(t){var e=t.distinctiveProps;if(e.state!==Z.Success)return!1;var r=e.value,n;for(n in r)if(r[n])return n}function Hw(){var t=navigator.appVersion;if(t==null)throw new Ue(Z.Undefined,"navigator.appVersion is undefined");return t}function qw(){if(document.documentElement===void 0)throw new Ue(Z.Undefined,"document.documentElement is undefined");var t=document.documentElement;if(typeof t.getAttributeNames!="function")throw new Ue(Z.NotFunction,"document.documentElement.getAttributeNames is not a function");return t.getAttributeNames()}function Gw(){try{null[0]()}catch(t){if(t instanceof Error&&t.stack!=null)return t.stack.toString()}throw new Ue(Z.UnexpectedBehaviour,"errorTrace signal unexpected behaviour")}function Ww(){return eval.toString().length}function zw(){if(Function.prototype.bind===void 0)throw new Ue(Z.NotFunction,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()}function jw(){var t=navigator,e=[],r=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(r!==void 0&&e.push([r]),Array.isArray(t.languages)){var n=zi();n===Rt.Chromium&&Aw()||e.push(t.languages)}else if(typeof t.languages=="string"){var i=t.languages;i&&e.push(i.split(","))}return e}function Yw(){if(navigator.mimeTypes===void 0)throw new Ue(Z.Undefined,"navigator.mimeTypes is undefined");for(var t=navigator.mimeTypes,e=Object.getPrototypeOf(t)===MimeTypeArray.prototype,r=0;r=.001))try{var t=new XMLHttpRequest;t.open("get","https://m1.openfpcdn.io/botd/v".concat(vw,"/npm-monitoring"),!0),t.send()}catch(e){console.error(e)}}function Ip(t){var e=t===void 0?{}:t,r=e.monitoring,n=r===void 0?!0:r;return Si(this,void 0,void 0,function(){var i;return Ei(this,function(a){switch(a.label){case 0:return n&&cS(),i=new uS,[4,i.collect()];case 1:return a.sent(),[2,i]}})})}var vw,Z,le,Ue,Rt,Tt,$w,lS,uS,Ap=D(()=>{al();vw="1.5.0";(function(t){t[t.Success=0]="Success",t[t.Undefined=-1]="Undefined",t[t.NotFunction=-2]="NotFunction",t[t.UnexpectedBehaviour=-3]="UnexpectedBehaviour",t[t.Null=-4]="Null"})(Z||(Z={}));(function(t){t.Awesomium="awesomium",t.Cef="cef",t.CefSharp="cefsharp",t.CoachJS="coachjs",t.Electron="electron",t.FMiner="fminer",t.Geb="geb",t.NightmareJS="nightmarejs",t.Phantomas="phantomas",t.PhantomJS="phantomjs",t.Rhino="rhino",t.Selenium="selenium",t.Sequentum="sequentum",t.SlimerJS="slimerjs",t.WebDriverIO="webdriverio",t.WebDriver="webdriver",t.HeadlessChrome="headless_chrome",t.Unknown="unknown"})(le||(le={}));Ue=function(t){I0(e,t);function e(r,n){var i=t.call(this,n)||this;return i.state=r,i.name="BotdError",Object.setPrototypeOf(i,e.prototype),i}return e}(Error);(function(t){t.Unknown="unknown",t.Chromium="chromium",t.Gecko="gecko",t.Webkit="webkit"})(Rt||(Rt={}));(function(t){t.Unknown="unknown",t.Chrome="chrome",t.Firefox="firefox",t.Opera="opera",t.Safari="safari",t.IE="internet_explorer",t.WeChat="wechat"})(Tt||(Tt={}));$w={detectAppVersion:Cw,detectDocumentAttributes:xw,detectErrorTrace:ww,detectEvalLengthInconsistency:Tw,detectFunctionBind:Rw,detectLanguagesLengthInconsistency:_w,detectNotificationPermissions:Nw,detectPluginsArray:kw,detectPluginsLengthInconsistency:Lw,detectProcess:Ow,detectUserAgent:Dw,detectWebDriver:Uw,detectWebGL:Mw,detectWindowExternal:Fw,detectWindowSize:Vw,detectMimeTypesConsistent:Bw,detectProductSub:Pw,detectDistinctiveProperties:Kw};lS={userAgent:rS,appVersion:Hw,rtt:tS,windowSize:sS,pluginsLength:Jw,pluginsArray:Zw,errorTrace:Gw,productSub:eS,windowExternal:aS,mimeTypesConsistent:Yw,evalLength:Ww,webGL:iS,webDriver:nS,languages:jw,notificationPermissions:Xw,documentElementKeys:qw,functionBind:zw,process:Qw,distinctiveProps:oS},uS=function(){function t(){this.components=void 0,this.detections=void 0}return t.prototype.getComponents=function(){return this.components},t.prototype.getDetections=function(){return this.detections},t.prototype.getSources=function(){return lS},t.prototype.getDetectors=function(){return $w},t.prototype.detect=function(){if(this.components===void 0)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var e=this.components,r=this.getDetectors(),n={},i={bot:!1};for(var a in r){var s=r[a],o=s(e),l={bot:!1};typeof o=="string"?l={bot:!0,botKind:o}:o&&(l={bot:!0,botKind:le.Unknown}),n[a]=l,l.bot&&(i=l)}return this.detections=n,i},t.prototype.collect=function(){return Si(this,void 0,void 0,function(){var e,r,n,i=this;return Ei(this,function(a){switch(a.label){case 0:return e=this.getSources(),r={},n=Object.keys(e),[4,Promise.all(n.map(function(s){return Si(i,void 0,void 0,function(){var o,l,u,c,f;return Ei(this,function(d){switch(d.label){case 0:o=e[s],d.label=1;case 1:return d.trys.push([1,3,,4]),l=r,u=s,f={},[4,o()];case 2:return l[u]=(f.value=d.sent(),f.state=Z.Success,f),[3,4];case 3:return c=d.sent(),c instanceof Ue?r[s]={state:c.state,error:"".concat(c.name,": ").concat(c.message)}:r[s]={state:Z.UnexpectedBehaviour,error:c instanceof Error?"".concat(c.name,": ").concat(c.message):String(c)},[3,4];case 4:return[2]}})})}))];case 1:return a.sent(),this.components=r,[2,this.components]}})})},t}()});var Ru,Tp,Rp=D(()=>{Ap();Dr();Ru=class{static async detect(){try{return await(await Ip()).detect()}catch(e){return ht.addError("Bot prescreen failed",e),Promise.reject(e)}}},Tp=Ru});var _u,_p,Bp=D(()=>{Dr();_u=class{static async detect(){try{return{webdriver:navigator?.webdriver!==void 0}}catch(e){return ht.addError("Webdriver detection failed",e),Promise.reject(e)}}},_p=_u});var zt,Bu=D(()=>{y0();In();Dr();nl();Q0();td();nd();id();ad();wl();wp();Sp();Rp();Bp();En.defaults.withCredentials=!0;zt=class{static async formatRequest(e,r){try{e=`s_${e}`;let n=await Wi.encrypt(r);return JSON.stringify({type:e,data:n})}catch{}return JSON.stringify({type:e,data:r})}static async post(e,r,n,i,a,s){try{let o=Nt()?.api?.baseUrl;if(!o)throw console.error("Internal honeypot error: missing base url"),new Error("Missing base URL");let l=`${o}${e}`,u={identity:xi.getIdentity(),identities:xi.getIdentities()},c=new URLSearchParams(window.location.search).get("hp-passport");try{u={...u,...await Mr.get()}}catch{}let f=!navigator.geolocation.getCurrentPosition.toString().includes("[native code]")||window?.geoLocationStorage!==void 0,d=i||[];f&&d.push("blsf");let p={};try{let[b,I,w,T,B,N]=await Promise.all([tr.timeExecution("bot",Tp.detect),tr.timeExecution("languages",ed.get),tr.timeExecution("performance",rd.get),tr.timeExecution("screen",_i.get),tr.timeExecution("timezone",Bi.get),tr.timeExecution("webdriver",_p.detect)]);p={cbt:b,languages:I,performanceInfo:w,screen:T,timezone:B,webdriver:N}}catch{}let h={...n,...u,...p,session_id:a,device_id:s,library_version:Ua,ctags:d,...c&&{passport:c}},m=await zt.formatRequest(r,h);return(await En.post(l,m,{headers:{"Content-Type":"application/json;charset=UTF-8"}})).data}catch(o){throw ht.addError("Failed to communicate with the backend server"),zt.postError(o),o}}static async postError(e){try{let n=Nt()?.api?.routes?.errors;if(!n)return;let i=await zt.formatRequest("error",{message:e}),a=await En.post(n,i,{headers:{"Content-Type":"application/json;charset=UTF-8"}})}catch{console.error("error HP10002")}}}});var vs,Nu=D(()=>{vs=(t,e,r,n)=>{let i=0,a=s=>{try{let o=new URLSearchParams(window.location.search).has("hpdebug");(n?.debug===!0||o)&&console.log(`[hp] ${s}`)}catch{}};return{name:"honeypot-enrichment",type:"before",setup:async s=>{try{s.userId&&(n?.trackIdentities?(a(`setting user_id: ${s.userId}`),await r(s.userId)):a(`ignoring user_id since trackIdentities is set to false: ${s.userId}`))}catch{}let o=await e();a(`initialized plugin. honey=${JSON.stringify(o)}`)},execute:async s=>{try{let{user_id:o,event_type:l}=s;try{o&&(n?.trackIdentities?(a(`processing identify event: ${o}`),await r(o)):a(`ignoring identify event since trackIdentities is set to false: ${o}`))}catch{}let c=l.startsWith("[Amplitude] ")?l.replace("[Amplitude] ",""):l;i=i+1;let f=!1;if(n?.excludeEvents?.includes(c)||n?.includeEvents?.length&&!n?.includeEvents.includes(c)){if(n?.enrichEventProperties){let h={ignored:!0};s.event_properties={...s.event_properties,honey:h}}return a(`ignoring event: ${l}`),s}f||(a(`tracking event: ${l}`),await t(l,s.event_properties));let p=await e();return p?.geofenced&&p?.redirect_auto?(a(`dropping event: ${l}`),null):(n?.enrichEventProperties&&(s.event_properties={...s.event_properties,honey:p},a(`enriching event: ${l}. ${JSON.stringify(s.event_properties)}`)),s)}catch{return s}}}}});var ku,fS,Np=D(()=>{Nu();ku=class{constructor(){this.config=null;this.honey=null;this.id=[];this.q=[];this.didInit=!1;this.didLoad=!1;this.callbacks={};this.geofenced=!1;this._geoCaptcha=!1}setup(e){this.config=e}amplitudePlugin(e){return vs(this.track.bind(this),this.get.bind(this),this.identify.bind(this),e)}geofence(){window.honeypot?.geofence&&window.honeypot.geofence(),this.geofenced=!0}async geoCaptcha(){return new Promise((e,r)=>{let n=Date.now(),i=()=>{window.honeypot?.geoCaptcha?e(window.honeypot.geoCaptcha()):Date.now()-n>=5e3?r(new Error("GeoCaptcha not available: Honeypot SDK did not initialize in time.")):setTimeout(i,100)};i()})}ensureHoneypot(){window.honeypot||(window.honeypot={q:[],id:[]})}async identify(e,r,n){if(this.ensureHoneypot(),window.honeypot?.identify)window.honeypot.identify(e,r,n);else{let i={id:e,...r?{properties:r}:{},...n?{type:n}:{}};Array.isArray(window.honeypot.id)||(window.honeypot.id=[]),window.honeypot.id.push(i)}}on(e,r){this.ensureHoneypot(),window.honeypot.on?window.honeypot.on(e,r):(window.honeypot.callbacks[e]??=[]).push(r)}async flow(e,r){return this.ensureHoneypot(),new Promise((n,i)=>{let a=Date.now(),s=()=>{window&&window.honeypot&&this.didInit?n(window.honeypot.flow(e,r)):Date.now()-a>=5e3?i(new Error("Flow could not be created. Did you call the load() method first?")):setTimeout(s,100)};s()})}async track(e,r={}){this.ensureHoneypot();try{if(window.honeypot?.track)return window.honeypot.track(e,r);{let n=this.q||[];n.push([e,r]),this.q=n}}catch(n){this.config?.debug&&console.error("Error tracking event:",n)}}async init(){}maybeTime(e,r){if(this.config?.debug){if(r){console.timeEnd(e);return}console.time(e)}}load(e,r,n){return this.didLoad=!0,new Promise(i=>{let a=document.createElement("script");a.async=!0;let s=new URL(e),o=null,l=null;try{o=window.location.href}catch{}try{l=document.title}catch{}s.searchParams.append("url",o||"URL not available"),s.searchParams.append("title",l||"Title not available");try{if(window.honeypot&&Array.isArray(window.honeypot.q)){let f=window.honeypot.q.map(d=>d[0]);s.searchParams.append("events",JSON.stringify(f))}}catch(f){this.config?.debug&&console.error("Error appending event names to the script URL:",f)}try{let f=["hpdebug","hpgeotest"],d=new URLSearchParams(window.location.search);f.forEach(p=>{d.has(p)&&s.searchParams.append(p,d.get(p)||"")})}catch{}r&&(s.searchParams.append("identity",r),n&&s.searchParams.append("type",n));let u=new URLSearchParams(window.location.search).get("georef");u&&s.searchParams.append("georef",u),this.maybeTime("load honeypot");try{let f=window?.honeypot?.id;if(f){let d=null;Array.isArray(f)&&f.length>0?d=f[0]?.id:d=f?.id,d&&s.searchParams.append("identity",d)}}catch{}a.src=s.toString(),document.head.appendChild(a);let c=this.config;a.onload=()=>{this.didInit=!0,this.maybeTime("load honeypot",!0);try{window.honeypot&&(window.honeypot.config=c)}catch{}i(window.honeypot)}})}setSessionId(e){}setDeviceId(e){}async get(e){if(!this.didLoad&&this.config?.url)try{if(await this.load(this.config.url),window.honeypot)return window.honeypot.get()}catch{throw new Error("Failed to load")}else if(this.didLoad&&!this.didInit)return new Promise((r,n)=>{let i=Date.now(),a=()=>{window.honeypot&&window.honeypot.get?r(window.honeypot.get()):Date.now()-i>=2e3?n(new Error("Timeout: Honeypot SDK did not initialize in time.")):setTimeout(a,50)};a()});return new Promise((r,n)=>{(()=>{if(window.honeypot&&window.honeypot.honey)r(window.honeypot.honey);else{if(window.honeypot?.get)return window.honeypot.get();n(new Error("Honey not found"))}})()})}},fS=new ku});var ji,kp=D(()=>{Nu();ji=class{amplitudePlugin(e){return vs(this.track.bind(this),this.get.bind(this),this.identify.bind(this),e)}}});var Lp=D(()=>{Np();kp()});function Dc(t){if(Cs[t])return Cs[t];let e=globalThis[t],r=e.prototype,n=t in Dp?Dp[t]:void 0,i=Boolean(n&&n.every(o=>{var l,u;return Boolean((u=(l=Object.getOwnPropertyDescriptor(r,o))==null?void 0:l.get)==null?void 0:u.toString().includes("[native code]"))})),a=t in Up?Up[t]:void 0,s=Boolean(a&&a.every(o=>{var l;return typeof r[o]=="function"&&((l=r[o])==null?void 0:l.toString().includes("[native code]"))}));if(i&&s&&!gS())return Cs[t]=e.prototype,e.prototype;try{let o=document.createElement("iframe");document.body.appendChild(o);let l=o.contentWindow;if(!l)return e.prototype;let u=l[t].prototype;return document.body.removeChild(o),u?Cs[t]=u:r}catch{return r}}function Jr(t,e,r){var n;let i=`${t}.${String(r)}`;if(Lu[i])return Lu[i].call(e);let a=Dc(t),s=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return s?(Lu[i]=s,s.call(e)):e[r]}function km(t,e,r){let n=`${t}.${String(r)}`;if(Ou[n])return Ou[n].bind(e);let a=Dc(t)[r];return typeof a!="function"?e[r]:(Ou[n]=a,a.bind(e))}function yS(t){return Jr("Node",t,"childNodes")}function vS(t){return Jr("Node",t,"parentNode")}function CS(t){return Jr("Node",t,"parentElement")}function bS(t){return Jr("Node",t,"textContent")}function xS(t,e){return km("Node",t,"contains")(e)}function wS(t){return km("Node",t,"getRootNode")()}function SS(t){return!t||!("host"in t)?null:Jr("ShadowRoot",t,"host")}function ES(t){return t.styleSheets}function IS(t){return!t||!("shadowRoot"in t)?null:Jr("Element",t,"shadowRoot")}function AS(t,e){return Jr("Element",t,"querySelector")(e)}function TS(t,e){return Jr("Element",t,"querySelectorAll")(e)}function RS(){return Dc("MutationObserver").constructor}function Lm(t){return t.nodeType===t.ELEMENT_NODE}function ea(t){let e=t&&"host"in t&&"mode"in t&&vt.host(t)||null;return Boolean(e&&"shadowRoot"in e&&vt.shadowRoot(e)===t)}function ta(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function _S(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function BS(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let r=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?r.push("layer"):t.layerName&&r.push(`layer(${t.layerName})`),t.supportsText&&r.push(`supports(${t.supportsText})`),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function ju(t){try{let e=t.rules||t.cssRules;if(!e)return null;let r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);let n=Array.from(e,i=>Om(i,r)).join("");return _S(n)}catch{return null}}function Om(t,e){if(kS(t)){let r;try{r=ju(t.styleSheet)||BS(t)}catch{r=t.cssText}return t.styleSheet.href?js(r,t.styleSheet.href):r}else{let r=t.cssText;return LS(t)&&t.selectorText.includes(":")&&(r=NS(r)),e?js(r,e):r}}function NS(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function kS(t){return"styleSheet"in t}function LS(t){return"selectorText"in t}function OS(){return new zs}function Uc({element:t,maskInputOptions:e,tagName:r,type:n,value:i,maskInputFn:a}){let s=i||"",o=n&&dn(n);return(e[r.toLowerCase()]||o&&e[o])&&(a?s=a(s,t):s="*".repeat(s.length)),s}function dn(t){return t.toLowerCase()}function PS(t){let e=t.getContext("2d");if(!e)return!0;let r=50;for(let n=0;nl!==0))return!1}return!0}function Mc(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?dn(e):null}function Pm(t,e){let r;try{r=new URL(t,e??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return i?.[1]??null}function DS(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function js(t,e){return(t||"").replace(US,(r,n,i,a,s,o)=>{let l=i||s||o,u=n||a||"";if(!l)return r;if(MS.test(l)||FS.test(l))return`url(${u}${l}${u})`;if(VS.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${DS(e)+l}${u})`;let c=e.split("/"),f=l.split("/");c.pop();for(let d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function Pu(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function KS(t,e){let r=Array.from(e.childNodes),n=[];if(r.length>1&&t&&typeof t=="string"){let i=Pu(t);for(let a=1;a=e.length);){let a=n(WS);if(a.slice(-1)===",")a=Xn(t,a.substring(0,a.length-1)),i.push(a);else{let s="";a=Xn(t,a);let o=!1;for(;;){let l=e.charAt(r);if(l===""){i.push((a+s).trim());break}else if(o)l===")"&&(o=!1);else if(l===","){r+=1,i.push((a+s).trim());break}else l==="("&&(o=!0);s+=l,r+=1}}}return i.join(", ")}function Xn(t,e){return!e||e.trim()===""?e:Fc(t,e)}function YS(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Fc(t,e){let r=Vp.get(t);if(r||(r=t.createElement("a"),Vp.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function Um(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?Xn(t,n):r==="srcset"?jS(t,n):r==="style"?js(n,Fc(t)):e==="object"&&r==="data"?Xn(t,n):n)}function Mm(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function XS(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){let i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function Ys(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Ys(vt.parentNode(t),e,r):!1;for(let n=t.classList.length;n--;){let i=t.classList[n];if(e.test(i))return!0}return r?Ys(vt.parentNode(t),e,r):!1}function Fm(t,e,r,n){let i;if(Lm(t)){if(i=t,!vt.childNodes(i).length)return!1}else{if(vt.parentElement(t)===null)return!1;i=vt.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ys(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function ZS(t,e,r){let n=t.contentWindow;if(!n)return;let i=!1,a;try{a=n.document.readyState}catch{return}if(a!=="complete"){let o=setTimeout(()=>{i||(e(),i=!0)},r);t.addEventListener("load",()=>{clearTimeout(o),i=!0,e()});return}let s="about:blank";if(n.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function JS(t,e,r){let n=!1,i;try{i=t.sheet}catch{return}if(i)return;let a=setTimeout(()=>{n||(e(),n=!0)},r);t.addEventListener("load",()=>{clearTimeout(a),n=!0,e()})}function QS(t,e){let{doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:s,inlineStylesheet:o,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,cssCaptured:g=!1}=e,b=eE(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:at.Document,childNodes:[],compatMode:t.compatMode}:{type:at.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:at.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return rE(t,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:o,maskInputOptions:l,maskInputFn:c,dataURLOptions:f,inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m,rootId:b});case t.TEXT_NODE:return tE(t,{doc:r,needsMask:s,maskTextFn:u,rootId:b,cssCaptured:g});case t.CDATA_SECTION_NODE:return{type:at.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:at.Comment,textContent:vt.textContent(t)||"",rootId:b};default:return!1}}function eE(t,e){if(!e.hasNode(t))return;let r=e.getId(t);return r===1?void 0:r}function tE(t,e){let{needsMask:r,maskTextFn:n,rootId:i,cssCaptured:a}=e,s=vt.parentNode(t),o=s&&s.tagName,l="",u=o==="STYLE"?!0:void 0,c=o==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":a||(l=vt.textContent(t),u&&l&&(l=js(l,Fc(e.doc)))),!u&&!c&&l&&r&&(l=n?n(l,vt.parentElement(t)):l.replace(/[\S]/g,"*")),{type:at.Text,textContent:l||"",rootId:i}}function rE(t,e){let{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:o,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:p}=e,h=XS(t,n,i),m=GS(t),g={},b=t.attributes.length;for(let w=0;wB.href===t.href),T=null;w&&(T=ju(w)),T&&(delete g.rel,delete g.href,g._cssText=T)}if(m==="style"&&t.sheet){let w=ju(t.sheet);w&&(t.childNodes.length>1&&(w=$S(w,t)),g._cssText=w)}if(m==="input"||m==="textarea"||m==="select"){let w=t.value,T=t.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=Uc({element:t,type:Mc(t),tagName:m,value:w,maskInputOptions:s,maskInputFn:o}):T&&(g.checked=T)}if(m==="option"&&(t.selected&&!s.select?g.selected=!0:delete g.selected),m==="dialog"&&t.open&&(g.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(t.__context==="2d")PS(t)||(g.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){let w=t.toDataURL(l.type,l.quality),T=r.createElement("canvas");T.width=t.width,T.height=t.height;let B=T.toDataURL(l.type,l.quality);w!==B&&(g.rr_dataURL=w)}}if(m==="img"&&u){zn||(zn=r.createElement("canvas"),Fp=zn.getContext("2d"));let w=t,T=w.currentSrc||w.getAttribute("src")||"",B=w.crossOrigin,N=()=>{w.removeEventListener("load",N);try{zn.width=w.naturalWidth,zn.height=w.naturalHeight,Fp.drawImage(w,0,0),g.rr_dataURL=zn.toDataURL(l.type,l.quality)}catch(H){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${T}! Error: ${H}`)}w.crossOrigin==="anonymous"&&(B?g.crossOrigin=B:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N)}if(m==="audio"||m==="video"){let w=g;w.rr_mediaState=t.paused?"paused":"played",w.rr_mediaCurrentTime=t.currentTime,w.rr_mediaPlaybackRate=t.playbackRate,w.rr_mediaMuted=t.muted,w.rr_mediaLoop=t.loop,w.rr_mediaVolume=t.volume}if(d||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),h){let{width:w,height:T}=t.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${T}px`}}m==="iframe"&&!f(g.src)&&(t.contentDocument||(g.rr_src=g.src),delete g.src);let I;try{customElements.get(m)&&(I=!0)}catch{}return{type:at.Element,tagName:m,attributes:g,childNodes:[],isSVG:YS(t)||void 0,needBlock:h,rootId:p,isCustom:I}}function Oe(t){return t==null?"":t.toLowerCase()}function nE(t,e){if(e.comment&&t.type===at.Comment)return!0;if(t.type===at.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Pm(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Oe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Oe(t.attributes.name)==="application-name"||Oe(t.attributes.rel)==="icon"||Oe(t.attributes.rel)==="apple-touch-icon"||Oe(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Oe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Oe(t.attributes.property).match(/^(og|twitter|fb):/)||Oe(t.attributes.name).match(/^(og|twitter):/)||Oe(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Oe(t.attributes.name)==="robots"||Oe(t.attributes.name)==="googlebot"||Oe(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Oe(t.attributes.name)==="author"||Oe(t.attributes.name)==="generator"||Oe(t.attributes.name)==="framework"||Oe(t.attributes.name)==="publisher"||Oe(t.attributes.name)==="progid"||Oe(t.attributes.property).match(/^article:/)||Oe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Oe(t.attributes.name)==="google-site-verification"||Oe(t.attributes.name)==="yandex-verification"||Oe(t.attributes.name)==="csrf-token"||Oe(t.attributes.name)==="p:domain_verify"||Oe(t.attributes.name)==="verify-v1"||Oe(t.attributes.name)==="verification"||Oe(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Zn(t,e){let{doc:r,mirror:n,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:o,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:f,maskInputFn:d,slimDOMOptions:p,dataURLOptions:h={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:w=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:B=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:H=!1,cssCaptured:q=!1}=e,{needsMask:j}=e,{preserveWhiteSpace:J=!0}=e;j||(j=Fm(t,s,o,j===void 0));let ae=QS(t,{doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:j,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:d,dataURLOptions:h,inlineImages:m,recordCanvas:g,keepIframeSrcFn:N,newlyAddedElement:H,cssCaptured:q});if(!ae)return console.warn(t,"not serialized"),null;let he;n.hasNode(t)?he=n.getId(t):nE(ae,p)||!J&&ae.type===at.Text&&!ae.textContent.replace(/^\s+|\s+$/gm,"").length?he=na:he=Dm();let Y=Object.assign(ae,{id:he});if(n.add(t,Y),he===na)return null;b&&b(t);let st=!l;if(Y.type===at.Element){st=st&&!Y.needBlock,delete Y.needBlock;let ne=vt.shadowRoot(t);ne&&ta(ne)&&(Y.isShadowHost=!0)}if((Y.type===at.Document||Y.type===at.Element)&&st){p.headWhitespace&&Y.type===at.Element&&Y.tagName==="head"&&(J=!1);let ne={doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:j,maskTextClass:s,maskTextSelector:o,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:p,dataURLOptions:h,inlineImages:m,recordCanvas:g,preserveWhiteSpace:J,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:B,keepIframeSrcFn:N,cssCaptured:!1};if(!(Y.type===at.Element&&Y.tagName==="textarea"&&Y.attributes.value!==void 0)){Y.type===at.Element&&Y.attributes._cssText!==void 0&&typeof Y.attributes._cssText=="string"&&(ne.cssCaptured=!0);for(let Ct of Array.from(vt.childNodes(t))){let dt=Zn(Ct,ne);dt&&Y.childNodes.push(dt)}}let $=null;if(Lm(t)&&($=vt.shadowRoot(t)))for(let Ct of Array.from(vt.childNodes($))){let dt=Zn(Ct,ne);dt&&(ta($)&&(dt.isShadow=!0),Y.childNodes.push(dt))}}let be=vt.parentNode(t);return be&&ea(be)&&ta(be)&&(Y.isShadow=!0),Y.type===at.Element&&Y.tagName==="iframe"&&ZS(t,()=>{let ne=t.contentDocument;if(ne&&I){let $=Zn(ne,{doc:ne,mirror:n,blockClass:i,blockSelector:a,needsMask:j,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:p,dataURLOptions:h,inlineImages:m,recordCanvas:g,preserveWhiteSpace:J,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:B,keepIframeSrcFn:N});$&&I(t,$)}},w),Y.type===at.Element&&Y.tagName==="link"&&typeof Y.attributes.rel=="string"&&(Y.attributes.rel==="stylesheet"||Y.attributes.rel==="preload"&&typeof Y.attributes.href=="string"&&Pm(Y.attributes.href)==="css")&&JS(t,()=>{if(T){let ne=Zn(t,{doc:r,mirror:n,blockClass:i,blockSelector:a,needsMask:j,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:p,dataURLOptions:h,inlineImages:m,recordCanvas:g,preserveWhiteSpace:J,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:B,keepIframeSrcFn:N});ne&&T(t,ne)}},B),Y}function iE(t,e){let{mirror:r=new zs,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:s=null,inlineStylesheet:o=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:p=!1,dataURLOptions:h,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:B=()=>!1}=e||{};return Zn(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:o,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:h,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:B,newlyAddedElement:!1})}function aE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sE(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}function cE(t){return t[0].toUpperCase()+t.slice(1)}function Zu(t,e){new fE(e).stringify(t)}function Ju(t,e){let r=new t.constructor;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||n==="proxyCache")continue;let i=t[n],a=typeof i;n==="parent"&&a==="object"?e&&(r[n]=e):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(s=>Ju(s,r)):(a==="object"&&i!==null&&(i=Ju(i)),r[n]=i)}return r}function EE(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function tg(t){return t.map(e=>(e.nodes&&(e.nodes=tg(e.nodes)),delete e.source,e))}function rg(t){if(t[Ym]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)rg(e)}function rI(t){for(let e=t.length-1;e>=0;e--){let r=t[e],n=r[3]||r[2];if(n)return n}}function Qs(t,e){let r=new oI(t,e),n=new sI(r);try{n.parse()}catch(i){throw i}return n.root}function Xi(t){return typeof t=="object"&&typeof t.then=="function"}function hg(t){let e=!1,r=mI[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,ei,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,ei,r+"Exit"]:[r,r+"Exit"]}function rm(t){let e;return t.type==="document"?e=["Document",ei,"DocumentExit"]:t.type==="root"?e=["Root",ei,"RootExit"]:e=hg(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function oc(t){return t[gr]=!1,t.nodes&&t.nodes.forEach(e=>oc(e)),t}function oa(t,e){if(Array.isArray(t))return t.map(i=>oa(i));let{inputs:r,...n}=t;if(r){e=[];for(let i of r){let a={...i,__proto__:kI.prototype};a.map&&(a.map={...a.map,__proto__:_I.prototype}),e.push(a)}}if(n.nodes&&(n.nodes=t.nodes.map(i=>oa(i,e))),n.source){let{inputId:i,...a}=n.source;n.source=a,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new LI(n);if(n.type==="decl")return new RI(n);if(n.type==="rule")return new OI(n);if(n.type==="comment")return new BI(n);if(n.type==="atrule")return new NI(n);throw new Error("Unknown node type: "+t.type)}function Ae(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Yc(t)}function XI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ZI(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}function tA(t){return t[0].toUpperCase()+t.slice(1)}function dc(t,e){new rA(e).stringify(t)}function hc(t,e){let r=new t.constructor;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||n==="proxyCache")continue;let i=t[n],a=typeof i;n==="parent"&&a==="object"?e&&(r[n]=e):n==="source"?r[n]=i:Array.isArray(i)?r[n]=i.map(s=>hc(s,r)):(a==="object"&&i!==null&&(i=hc(i)),r[n]=i)}return r}function mA(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ug(t){return t.map(e=>(e.nodes&&(e.nodes=Ug(e.nodes)),delete e.source,e))}function Mg(t){if(t[Ng]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Mg(e)}function zA(t){for(let e=t.length-1;e>=0;e--){let r=t[e],n=r[3]||r[2];if(n)return n}}function no(t,e){let r=new JA(t,e),n=new ZA(r);try{n.parse()}catch(i){throw i}return n.root}function Ji(t){return typeof t=="object"&&typeof t.then=="function"}function Yg(t){let e=!1,r=sT[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,ni,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,ni,r+"Exit"]:[r,r+"Exit"]}function vm(t){let e;return t.type==="document"?e=["Document",ni,"DocumentExit"]:t.type==="root"?e=["Root",ni,"RootExit"]:e=Yg(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function wc(t){return t[yr]=!1,t.nodes&&t.nodes.forEach(e=>wc(e)),t}function fa(t,e){if(Array.isArray(t))return t.map(i=>fa(i));let{inputs:r,...n}=t;if(r){e=[];for(let i of r){let a={...i,__proto__:ST.prototype};a.map&&(a.map={...a.map,__proto__:bT.prototype}),e.push(a)}}if(n.nodes&&(n.nodes=t.nodes.map(i=>fa(i,e))),n.source){let{inputId:i,...a}=n.source;n.source=a,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new ET(n);if(n.type==="decl")return new CT(n);if(n.type==="rule")return new IT(n);if(n.type==="comment")return new xT(n);if(n.type==="atrule")return new wT(n);throw new Error("Unknown node type: "+t.type)}function Te(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new sf(t)}function of(t){if(Ms[t])return Ms[t];let e=globalThis[t],r=e.prototype,n=t in Cm?Cm[t]:void 0,i=Boolean(n&&n.every(o=>{var l,u;return Boolean((u=(l=Object.getOwnPropertyDescriptor(r,o))==null?void 0:l.get)==null?void 0:u.toString().includes("[native code]"))})),a=t in bm?bm[t]:void 0,s=Boolean(a&&a.every(o=>{var l;return typeof r[o]=="function"&&((l=r[o])==null?void 0:l.toString().includes("[native code]"))}));if(i&&s&&!FT())return Ms[t]=e.prototype,e.prototype;try{let o=document.createElement("iframe");document.body.appendChild(o);let l=o.contentWindow;if(!l)return e.prototype;let u=l[t].prototype;return document.body.removeChild(o),u?Ms[t]=u:r}catch{return r}}function Qr(t,e,r){var n;let i=`${t}.${String(r)}`;if(qu[i])return qu[i].call(e);let a=of(t),s=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return s?(qu[i]=s,s.call(e)):e[r]}function iy(t,e,r){let n=`${t}.${String(r)}`;if(Gu[n])return Gu[n].bind(e);let a=of(t)[r];return typeof a!="function"?e[r]:(Gu[n]=a,a.bind(e))}function VT(t){return Qr("Node",t,"childNodes")}function KT(t){return Qr("Node",t,"parentNode")}function $T(t){return Qr("Node",t,"parentElement")}function HT(t){return Qr("Node",t,"textContent")}function qT(t,e){return iy("Node",t,"contains")(e)}function GT(t){return iy("Node",t,"getRootNode")()}function WT(t){return!t||!("host"in t)?null:Qr("ShadowRoot",t,"host")}function zT(t){return t.styleSheets}function jT(t){return!t||!("shadowRoot"in t)?null:Qr("Element",t,"shadowRoot")}function YT(t,e){return Qr("Element",t,"querySelector")(e)}function XT(t,e){return Qr("Element",t,"querySelectorAll")(e)}function ay(){return of("MutationObserver").constructor}function _t(t,e,r=document){let n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function ha(t,e,r={}){let n=null,i=0;return function(...a){let s=Date.now();!i&&r.leading===!1&&(i=s);let o=e-(s-i),l=this;o<=0||o>e?(n&&(clearTimeout(n),n=null),i=s,t.apply(l,a)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,t.apply(l,a)},o))}}function Co(t,e,r,n,i=window){let a=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),a&&a.set&&a.set.call(this,s)}}),()=>Co(t,e,a||{},!0)}function si(t,e,r){try{if(!(e in t))return()=>{};let n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}function sy(t){var e,r,n,i;let a=t.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:a.documentElement.scrollLeft||a?.body&&((e=me.parentElement(a.body))==null?void 0:e.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:a?.documentElement.scrollTop||a?.body&&((n=me.parentElement(a.body))==null?void 0:n.scrollTop)||((i=a?.body)==null?void 0:i.scrollTop)||0}}function oy(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ly(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function uy(t){return t?t.nodeType===t.ELEMENT_NODE?t:me.parentElement(t):null}function Bt(t,e,r,n){if(!t)return!1;let i=uy(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(Ys(i,e,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function ZT(t,e){return e.getId(t)!==-1}function Wu(t,e,r){return t.tagName==="TITLE"&&r.headTitleMutations?!0:e.getId(t)===na}function cy(t,e){if(ea(t))return!1;let r=e.getId(t);if(!e.has(r))return!0;let n=me.parentNode(t);return n&&n.nodeType===t.DOCUMENT_NODE?!1:n?cy(n,e):!0}function Ic(t){return Boolean(t.changedTouches)}function JT(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function fy(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function dy(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Ac(t){return t?t instanceof da&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(me.shadowRoot(t)):!1}function hy(t){var e;let r=null;return"getRootNode"in t&&((e=me.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&me.host(me.getRootNode(t))&&(r=me.host(me.getRootNode(t))),r}function QT(t){let e=t,r;for(;r=hy(e);)e=r;return e}function e2(t){let e=t.ownerDocument;if(!e)return!1;let r=QT(t);return me.contains(e,r)}function py(t){let e=t.ownerDocument;return e?me.contains(e,t)||e2(t):!1}function wm(t){return"__ln"in t}function Bc(t,e){t.delete(e),me.childNodes(e).forEach(r=>Bc(t,r))}function t2(t,e){let r=[t];for(;r.length;){let n=r.pop();e.has(n)||(e.add(n),me.childNodes(n).forEach(i=>r.push(i)))}}function Em(t,e,r){return t.size===0?!1:r2(t,e)}function r2(t,e,r){let n=me.parentNode(e);return n?t.has(n):!1}function Im(t,e){return t.size===0?!1:gy(t,e)}function gy(t,e){let r=me.parentNode(e);return r?t.has(r)?!0:gy(t,r):!1}function n2(t){ra=t}function i2(){ra=void 0}function va(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function yy(t,e){let r=new _c;fn.push(r),r.init(t);let n=new(ay())(Ce(r.processMutations.bind(r)));return n.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function a2({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,a=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],o,l=ha(Ce(f=>{let d=Date.now()-o;t(s.map(p=>(p.timeOffset-=d,p)),f),s=[],o=null}),a),u=Ce(ha(Ce(f=>{let d=va(f),{clientX:p,clientY:h}=Ic(f)?f.changedTouches[0]:f;o||(o=io()),s.push({x:p,y:h,id:n.getId(d),timeOffset:io()-o}),l(typeof DragEvent<"u"&&f instanceof DragEvent?ge.Drag:f instanceof MouseEvent?ge.MouseMove:ge.TouchMove)}),i,{trailing:!1})),c=[_t("mousemove",u,r),_t("touchmove",u,r),_t("drag",u,r)];return Ce(()=>{c.forEach(f=>f())})}function s2({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let s=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,o=[],l=null,u=c=>f=>{let d=va(f);if(Bt(d,n,i,!0))return;let p=null,h=c;if("pointerType"in f){switch(f.pointerType){case"mouse":p=Rr.Mouse;break;case"touch":p=Rr.Touch;break;case"pen":p=Rr.Pen;break}p===Rr.Touch?Pt[c]===Pt.MouseDown?h="TouchStart":Pt[c]===Pt.MouseUp&&(h="TouchEnd"):Rr.Pen}else Ic(f)&&(p=Rr.Touch);p!==null?(l=p,(h.startsWith("Touch")&&p===Rr.Touch||h.startsWith("Mouse")&&p===Rr.Mouse)&&(p=null)):Pt[c]===Pt.Click&&(p=l,l=null);let m=Ic(f)?f.changedTouches[0]:f;if(!m)return;let g=r.getId(d),{clientX:b,clientY:I}=m;Ce(t)({type:Pt[h],id:g,x:b,y:I,...p!==null&&{pointerType:p}})};return Object.keys(Pt).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&s[c]!==!1).forEach(c=>{let f=dn(c),d=u(c);if(window.PointerEvent)switch(Pt[c]){case Pt.MouseDown:case Pt.MouseUp:f=f.replace("mouse","pointer");break;case Pt.TouchStart:case Pt.TouchEnd:return}o.push(_t(f,d,e))}),Ce(()=>{o.forEach(c=>c())})}function vy({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:a}){let s=Ce(ha(Ce(o=>{let l=va(o);if(!l||Bt(l,n,i,!0))return;let u=r.getId(l);if(l===e&&e.defaultView){let c=sy(e.defaultView);t({id:u,x:c.left,y:c.top})}else t({id:u,x:l.scrollLeft,y:l.scrollTop})}),a.scroll||100));return _t("scroll",s,e)}function o2({viewportResizeCb:t},{win:e}){let r=-1,n=-1,i=Ce(ha(Ce(()=>{let a=oy(),s=ly();(r!==a||n!==s)&&(t({width:Number(s),height:Number(a)}),r=a,n=s)}),200));return _t("resize",i,e)}function u2({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,ignoreClass:a,ignoreSelector:s,maskInputOptions:o,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function f(I){let w=va(I),T=I.isTrusted,B=w&&w.tagName;if(w&&B==="OPTION"&&(w=me.parentElement(w)),!w||!B||l2.indexOf(B)<0||Bt(w,n,i,!0)||w.classList.contains(a)||s&&w.matches(s))return;let N=w.value,H=!1,q=Mc(w)||"";q==="radio"||q==="checkbox"?H=w.checked:(o[B.toLowerCase()]||o[q])&&(N=Uc({element:w,maskInputOptions:o,tagName:B,type:q,value:N,maskInputFn:l})),d(w,c?{text:N,isChecked:H,userTriggered:T}:{text:N,isChecked:H});let j=w.name;q==="radio"&&j&&H&&e.querySelectorAll(`input[type="radio"][name="${j}"]`).forEach(J=>{if(J!==w){let ae=J.value;d(J,c?{text:ae,isChecked:!H,userTriggered:!1}:{text:ae,isChecked:!H})}})}function d(I,w){let T=Am.get(I);if(!T||T.text!==w.text||T.isChecked!==w.isChecked){Am.set(I,w);let B=r.getId(I);Ce(t)({...w,id:B})}}let h=(u.input==="last"?["change"]:["input","change"]).map(I=>_t(I,Ce(f),e)),m=e.defaultView;if(!m)return()=>{h.forEach(I=>I())};let g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&h.push(...b.map(I=>Co(I[0],I[1],{set(){Ce(f)({target:this,isTrusted:!1})}},!1,m))),Ce(()=>{h.forEach(I=>I())})}function ao(t){let e=[];function r(n,i){if(Fs("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Fs("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Fs("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Fs("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(s)}return i}return r(t,e)}function Zr(t,e,r){let n,i;return t?(t.ownerNode?n=e.getId(t.ownerNode):i=r.getId(t),{styleId:i,id:n}):{}}function c2({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Ce((c,f,d)=>{let[p,h]=d,{id:m,styleId:g}=Zr(f,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&t({id:m,styleId:g,adds:[{rule:p,index:h}]}),c.apply(f,d)})}),n.CSSStyleSheet.prototype.addRule=function(c,f,d=this.cssRules.length){let p=`${c} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Ce((c,f,d)=>{let[p]=d,{id:h,styleId:m}=Zr(f,e,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,removes:[{index:p}]}),c.apply(f,d)})}),n.CSSStyleSheet.prototype.removeRule=function(c){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Ce((c,f,d)=>{let[p]=d,{id:h,styleId:m}=Zr(f,e,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,replace:p}),c.apply(f,d)})}));let o;n.CSSStyleSheet.prototype.replaceSync&&(o=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:Ce((c,f,d)=>{let[p]=d,{id:h,styleId:m}=Zr(f,e,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,replaceSync:p}),c.apply(f,d)})}));let l={};Vs("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(Vs("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),Vs("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),Vs("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let u={};return Object.entries(l).forEach(([c,f])=>{u[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[c].insertRule,{apply:Ce((d,p,h)=>{let[m,g]=h,{id:b,styleId:I}=Zr(p.parentStyleSheet,e,r.styleMirror);return(b&&b!==-1||I&&I!==-1)&&t({id:b,styleId:I,adds:[{rule:m,index:[...ao(p),g||0]}]}),d.apply(p,h)})}),f.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:Ce((d,p,h)=>{let[m]=h,{id:g,styleId:b}=Zr(p.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||b&&b!==-1)&&t({id:g,styleId:b,removes:[{index:[...ao(p),m]}]}),d.apply(p,h)})})}),Ce(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=a,s&&(n.CSSStyleSheet.prototype.replace=s),o&&(n.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([c,f])=>{f.prototype.insertRule=u[c].insertRule,f.prototype.deleteRule=u[c].deleteRule})})}function Cy({mirror:t,stylesheetManager:e},r){var n,i,a;let s=null;r.nodeName==="#document"?s=t.getId(r):s=t.getId(me.host(r));let o=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,l=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!o||!l?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;let f=(c=l.set)==null?void 0:c.call(this,u);if(s!==null&&s!==-1)try{e.adoptStyleSheets(u,s)}catch{}return f}}),Ce(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function f2({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ce((o,l,u)=>{var c;let[f,d,p]=u;if(r.has(f))return a.apply(l,[f,d,p]);let{id:h,styleId:m}=Zr((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,set:{property:f,value:d,priority:p},index:ao(l.parentRule)}),o.apply(l,u)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Ce((o,l,u)=>{var c;let[f]=u;if(r.has(f))return s.apply(l,[f]);let{id:d,styleId:p}=Zr((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,n.styleMirror);return(d&&d!==-1||p&&p!==-1)&&t({id:d,styleId:p,remove:{property:f},index:ao(l.parentRule)}),o.apply(l,u)})}),Ce(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=s})}function d2({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:i,doc:a}){let s=Ce(l=>ha(Ce(u=>{let c=va(u);if(!c||Bt(c,e,r,!0))return;let{currentTime:f,volume:d,muted:p,playbackRate:h,loop:m}=c;t({type:l,id:n.getId(c),currentTime:f,volume:d,muted:p,playbackRate:h,loop:m})}),i.media||500)),o=[_t("play",s(Yn.Play),a),_t("pause",s(Yn.Pause),a),_t("seeked",s(Yn.Seeked),a),_t("volumechange",s(Yn.VolumeChange),a),_t("ratechange",s(Yn.RateChange),a)];return Ce(()=>{o.forEach(l=>l())})}function h2({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(l,u,c){let f=new a(l,u,c);return i.set(f,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};let s=si(e.fonts,"add",function(o){return function(l){return setTimeout(Ce(()=>{let u=i.get(l);u&&(t(u),i.delete(l))}),0),o.apply(this,[l])}});return n.push(()=>{r.FontFace=a}),n.push(s),Ce(()=>{n.forEach(o=>o())})}function p2(t){let{doc:e,mirror:r,blockClass:n,blockSelector:i,selectionCb:a}=t,s=!0,o=Ce(()=>{let l=e.getSelection();if(!l||s&&l?.isCollapsed)return;s=l.isCollapsed||!1;let u=[],c=l.rangeCount||0;for(let f=0;f{}:si(r.customElements,"define",function(i){return function(a,s,o){try{e({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,s,o])}})}function g2(t,e){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:s,inputCb:o,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:f,fontCb:d,selectionCb:p,customElementCb:h}=t;t.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),r(...m)},t.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),n(...m)},t.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},t.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),a(...m)},t.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),s(...m)},t.inputCb=(...m)=>{e.input&&e.input(...m),o(...m)},t.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),l(...m)},t.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},t.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),c(...m)},t.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),f(...m)},t.fontCb=(...m)=>{e.font&&e.font(...m),d(...m)},t.selectionCb=(...m)=>{e.selection&&e.selection(...m),p(...m)},t.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),h(...m)}}function y2(t,e={}){let r=t.doc.defaultView;if(!r)return()=>{};g2(t,e);let n;t.recordDOM&&(n=yy(t,t.doc));let i=a2(t),a=s2(t),s=vy(t),o=o2(t,{win:r}),l=u2(t),u=d2(t),c=()=>{},f=()=>{},d=()=>{},p=()=>{};t.recordDOM&&(c=c2(t,{win:r}),f=Cy(t,t.doc),d=f2(t,{win:r}),t.collectFonts&&(p=h2(t)));let h=p2(t),m=m2(t),g=[];for(let b of t.plugins)g.push(b.observer(b.callback,r,b.options));return Ce(()=>{fn.forEach(b=>b.reset()),n?.disconnect(),i(),a(),s(),o(),l(),u(),c(),f(),d(),p(),h(),m(),g.forEach(b=>b())})}function Fs(t){return typeof window[t]<"u"}function Vs(t){return Boolean(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function b2(t,e){let r=Tm.get(t);return r||(r=new Map,Tm.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}function Gs(t,e,r){if(t instanceof Array)return t.map(n=>Gs(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let n=t.constructor.name,i=C2(t);return{rr_type:n,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Gs(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let n=t.constructor.name,{src:i}=t;return{rr_type:n,src:i}}else if(t instanceof HTMLCanvasElement){let n="HTMLImageElement",i=t.toDataURL();return{rr_type:n,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Gs(t.data,e,r),t.width,t.height]};if(wy(t,e)||typeof t=="object"){let n=t.constructor.name,i=by(t,e,r);return{rr_type:n,index:i}}}}return t}function x2(t,e,r,n){let i=[],a=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of a)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let o=si(e.CanvasRenderingContext2D.prototype,s,function(l){return function(...u){return Bt(this.canvas,r,n,!0)||setTimeout(()=>{let c=xy(u,e,this);t(this.canvas,{type:ai["2D"],property:s,args:c})},0),l.apply(this,u)}});i.push(o)}catch{let o=Co(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:ai["2D"],property:s,args:[l],setter:!0})}});i.push(o)}return()=>{i.forEach(s=>s())}}function w2(t){return t==="experimental-webgl"?"webgl":t}function Rm(t,e,r,n){let i=[];try{let a=si(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(o,...l){if(!Bt(this,e,r,!0)){let u=w2(o);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[o,...l])}});i.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function _m(t,e,r,n,i,a){let s=[],o=Object.getOwnPropertyNames(t);for(let l of o)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof t[l]!="function")continue;let u=si(t,l,function(c){return function(...f){let d=c.apply(this,f);if(by(d,a,this),"tagName"in this.canvas&&!Bt(this.canvas,n,i,!0)){let p=xy(f,a,this),h={type:e,property:l,args:p};r(this.canvas,h)}return d}});s.push(u)}catch{let u=Co(t,l,{set(c){r(this.canvas,{type:e,property:l,args:[c],setter:!0})}});s.push(u)}return s}function S2(t,e,r,n){let i=[];return i.push(..._m(e.WebGLRenderingContext.prototype,ai.WebGL,t,r,n,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(..._m(e.WebGL2RenderingContext.prototype,ai.WebGL2,t,r,n,e)),()=>{i.forEach(a=>a())}}function I2(t){let e;try{if(e=Bm&&(window.URL||window.webkitURL).createObjectURL(Bm),!e)throw"";let r=new Worker(e,{name:t?.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+Sy,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}function oi(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:o=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:p,maskInputFn:h,maskTextFn:m,hooks:g,packFn:b,sampling:I={},dataURLOptions:w={},mousemoveWait:T,recordDOM:B=!0,recordCanvas:N=!1,recordCrossOriginIframes:H=!1,recordAfter:q=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:J=!1,inlineImages:ae=!1,plugins:he,keepIframeSrcFn:Y=()=>!1,ignoreCSSAttributes:st=new Set([]),errorHandler:be}=t;n2(be);let ne=H?window.parent===window:!0,$=!1;if(!ne)try{window.parent.document&&($=!1)}catch{$=!0}if(ne&&!e)throw new Error("emit function is required");if(!ne&&!$)return()=>{};T!==void 0&&I.mousemove===void 0&&(I.mousemove=T),rr.reset();let Ct=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},dt=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p==="all",headMetaDescKeywords:p==="all",headTitleMutations:p==="all"}:p||{};JT();let ze,Ve=0,je=X=>{for(let Re of he||[])Re.eventProcessor&&(X=Re.eventProcessor(X));return b&&!$&&(X=b(X)),X};Xe=(X,Re)=>{var se;let oe=X;if(oe.timestamp=io(),(se=fn[0])!=null&&se.isFrozen()&&oe.type!==Se.FullSnapshot&&!(oe.type===Se.IncrementalSnapshot&&oe.data.source===ge.Mutation)&&fn.forEach(_e=>_e.unfreeze()),ne)e?.(je(oe),Re);else if($){let _e={type:"rrweb",event:je(oe),origin:window.location.origin,isCheckout:Re};window.parent.postMessage(_e,"*")}if(oe.type===Se.FullSnapshot)ze=oe,Ve=0;else if(oe.type===Se.IncrementalSnapshot){if(oe.data.source===ge.Mutation&&oe.data.isAttachIframe)return;Ve++;let _e=n&&Ve>=n,Be=r&&oe.timestamp-ze.timestamp>r;(_e||Be)&&Ws(!0)}};let Ze=X=>{Xe({type:Se.IncrementalSnapshot,data:{source:ge.Mutation,...X}})},nt=X=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.Scroll,...X}}),it=X=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.CanvasMutation,...X}}),ot=X=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.AdoptedStyleSheet,...X}}),Ke=new Oc({mutationCb:Ze,adoptedStyleSheetCb:ot}),$e=new Nc({mirror:rr,mutationCb:Ze,stylesheetManager:Ke,recordCrossOriginIframes:H,wrappedEmit:Xe});for(let X of he||[])X.getMirror&&X.getMirror({nodeMirror:rr,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});let Qe=new Pc;zu=new Lc({recordCanvas:N,mutationCb:it,win:window,blockClass:i,blockSelector:a,mirror:rr,sampling:I.canvas,dataURLOptions:w});let Je=new kc({mutationCb:Ze,scrollCb:nt,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:Ct,dataURLOptions:w,maskTextFn:m,maskInputFn:h,recordCanvas:N,inlineImages:ae,sampling:I,slimDOMOptions:dt,iframeManager:$e,stylesheetManager:Ke,canvasManager:zu,keepIframeSrcFn:Y,processedNodeManager:Qe},mirror:rr});Ws=(X=!1)=>{if(!B)return;Xe({type:Se.Meta,data:{href:window.location.href,width:ly(),height:oy()}},X),Ke.reset(),Je.init(),fn.forEach(se=>se.lock());let Re=iE(document,{mirror:rr,blockClass:i,blockSelector:a,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:Ct,maskTextFn:m,maskInputFn:h,slimDOM:dt,dataURLOptions:w,recordCanvas:N,inlineImages:ae,onSerialize:se=>{fy(se,rr)&&$e.addIframe(se),dy(se,rr)&&Ke.trackLinkElement(se),Ac(se)&&Je.addShadowRoot(me.shadowRoot(se),document)},onIframeLoad:(se,oe)=>{$e.attachIframe(se,oe),Je.observeAttachShadow(se)},onStylesheetLoad:(se,oe)=>{Ke.attachLinkElement(se,oe)},keepIframeSrcFn:Y});if(!Re)return console.warn("Failed to snapshot the document");Xe({type:Se.FullSnapshot,data:{node:Re,initialOffset:sy(window)}},X),fn.forEach(se=>se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ke.adoptStyleSheets(document.adoptedStyleSheets,rr.getId(document))};try{let X=[],Re=oe=>{var _e;return Ce(y2)({mutationCb:Ze,mousemoveCb:(Be,bo)=>Xe({type:Se.IncrementalSnapshot,data:{source:bo,positions:Be}}),mouseInteractionCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.MouseInteraction,...Be}}),scrollCb:nt,viewportResizeCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.ViewportResize,...Be}}),inputCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.Input,...Be}}),mediaInteractionCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.MediaInteraction,...Be}}),styleSheetRuleCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.StyleSheetRule,...Be}}),styleDeclarationCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.StyleDeclaration,...Be}}),canvasMutationCb:it,fontCb:Be=>Xe({type:Se.IncrementalSnapshot,data:{source:ge.Font,...Be}}),selectionCb:Be=>{Xe({type:Se.IncrementalSnapshot,data:{source:ge.Selection,...Be}})},customElementCb:Be=>{Xe({type:Se.IncrementalSnapshot,data:{source:ge.CustomElement,...Be}})},blockClass:i,ignoreClass:s,ignoreSelector:o,maskTextClass:l,maskTextSelector:u,maskInputOptions:Ct,inlineStylesheet:c,sampling:I,recordDOM:B,recordCanvas:N,inlineImages:ae,userTriggeredOnInput:j,collectFonts:J,doc:oe,maskInputFn:h,maskTextFn:m,keepIframeSrcFn:Y,blockSelector:a,slimDOMOptions:dt,dataURLOptions:w,mirror:rr,iframeManager:$e,stylesheetManager:Ke,shadowDomManager:Je,processedNodeManager:Qe,canvasManager:zu,ignoreCSSAttributes:st,plugins:((_e=he?.filter(Be=>Be.observer))==null?void 0:_e.map(Be=>({observer:Be.observer,options:Be.options,callback:bo=>Xe({type:Se.Plugin,data:{plugin:Be.name,payload:bo}})})))||[]},g)};$e.addLoadListener(oe=>{try{X.push(Re(oe.contentDocument))}catch(_e){console.warn(_e)}});let se=()=>{Ws(),X.push(Re(document)),oo=!0};return document.readyState==="interactive"||document.readyState==="complete"?se():(X.push(_t("DOMContentLoaded",()=>{Xe({type:Se.DomContentLoaded,data:{}}),q==="DOMContentLoaded"&&se()})),X.push(_t("load",()=>{Xe({type:Se.Load,data:{}}),q==="load"&&se()},window))),()=>{X.forEach(oe=>oe()),Qe.destroy(),oo=!1,i2()}}catch(X){console.warn(X)}}var dS,hS,U,Op,pS,mS,Pp,at,Dp,Up,Cs,gS,Lu,Ou,vt,zs,Mp,US,MS,FS,VS,HS,qS,na,zn,Fp,WS,zS,Vp,Vc,Me,Vm,oE,lE,uE,nr,Kp,$p,Yu,Kc,pa,Hp,Xu,$m,fE,lo,bs,dE,hE,pE,mE,Qu,uo,gE,ec,co,yE,vE,CE,bE,qp,Gp,xE,wE,Du,SE,tc,Hm,IE,AE,Wp,xs,rc,nc,TE,Uu,zp,RE,Mu,_E,jp,Xs,fo,qm,Ks,$s,Gm,Wm,zm,Yp,BE,NE,kE,LE,jm,OE,ic,ho,Ym,Xm,Zm,Jm,PE,Qm,$c,Hc,eg,_r,hn,DE,ig,ag,ia,qc,ac,sg,UE,sc,Gc,Fu,Xp,ws,Zp,Ss,Yi,Es,Is,As,ME,FE,VE,KE,$E,HE,qE,GE,WE,zE,Ts,Rs,jE,Jp,YE,og,Zs,Wc,lg,ug,cg,Qn,ma,aa,fg,dg,XE,Js,zc,ZE,JE,QE,eI,tI,Qp,em,nI,iI,aI,sI,oI,jc,gr,lI,uI,cI,fI,dI,tm,hI,pI,mI,gI,yI,ei,lc,ti,mg,vI,CI,bI,xI,uc,wI,SI,EI,II,AI,sa,TI,RI,_I,BI,NI,kI,LI,OI,PI,DI,gg,UI,MI,Yc,FI,VI,yg,KI,vg,Cg,$I,HI,qI,GI,bg,xg,WI,zI,Ge,jI,YI,jt,Xc,Fe,wg,JI,QI,eA,ir,nm,im,cc,Zc,ga,am,fc,Eg,rA,po,_s,nA,iA,aA,sA,pc,mo,oA,mc,go,lA,uA,cA,fA,sm,om,dA,hA,Vu,pA,gc,Ig,gA,yA,lm,Bs,yc,vc,vA,Ku,um,CA,$u,bA,cm,eo,yo,Ag,Hs,qs,Tg,Rg,_g,fm,xA,wA,SA,EA,Bg,IA,Cc,vo,Ng,kg,Lg,Og,AA,Pg,Jc,Qc,Dg,Br,pn,TA,Vg,Kg,la,ef,bc,$g,RA,xc,tf,Hu,dm,Ns,hm,ks,Zi,Ls,Os,Ps,_A,BA,NA,kA,LA,OA,PA,DA,UA,MA,Ds,Us,FA,pm,VA,Hg,to,rf,qg,Gg,Wg,ri,ya,ua,zg,jg,KA,ro,nf,$A,HA,qA,GA,WA,mm,gm,jA,YA,XA,ZA,JA,af,yr,QA,eT,tT,rT,nT,ym,iT,aT,sT,oT,lT,ni,Sc,ii,Zg,uT,cT,fT,dT,Ec,hT,pT,mT,gT,yT,ca,vT,CT,bT,xT,wT,ST,ET,IT,AT,TT,Jg,RT,_T,sf,BT,NT,Qg,kT,ey,ty,LT,OT,PT,DT,ry,ny,UT,MT,We,da,Cm,bm,Ms,FT,qu,Gu,me,jn,xm,io,Tc,Se,ge,Pt,Rr,ai,Yn,my,Rc,Sm,_c,ra,Ce,fn,l2,Am,so,Nc,kc,Jn,v2,Qi,C2,Tm,by,xy,wy,Sy,E2,Bm,Lc,Oc,Pc,Xe,Ws,zu,oo,rr,Nm,Ey=D(()=>{dS=Object.defineProperty,hS=(t,e,r)=>e in t?dS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U=(t,e,r)=>hS(t,typeof e!="symbol"?e+"":e,r),pS=Object.defineProperty,mS=(t,e,r)=>e in t?pS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pp=(t,e,r)=>mS(t,typeof e!="symbol"?e+"":e,r),at=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(at||{}),Dp={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Up={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Cs={},gS=()=>!!globalThis.Zone;Lu={};Ou={};vt={childNodes:yS,parentNode:vS,parentElement:CS,textContent:bS,contains:xS,getRootNode:wS,host:SS,styleSheets:ES,shadowRoot:IS,querySelector:AS,querySelectorAll:TS,mutationObserver:RS};zs=class{constructor(){Pp(this,"idNodeMap",new Map),Pp(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){let n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Mp="__rrweb_original__";US=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,MS=/^(?:[a-z+]+:)?\/\//i,FS=/^www\..*/i,VS=/^(data:)([^,]*),(.*)/i;HS=1,qS=new RegExp("[^a-z0-9-_:]"),na=-2;WS=/^[^ \t\n\r\u000c]+/,zS=/^[, \t\n\r\u000c]+/;Vp=new WeakMap;Vc={exports:{}},Me=String,Vm=function(){return{isColorSupported:!1,reset:Me,bold:Me,dim:Me,italic:Me,underline:Me,inverse:Me,hidden:Me,strikethrough:Me,black:Me,red:Me,green:Me,yellow:Me,blue:Me,magenta:Me,cyan:Me,white:Me,gray:Me,bgBlack:Me,bgRed:Me,bgGreen:Me,bgYellow:Me,bgBlue:Me,bgMagenta:Me,bgCyan:Me,bgWhite:Me}};Vc.exports=Vm();Vc.exports.createColors=Vm;oE=Vc.exports,lE={},uE=Object.freeze(Object.defineProperty({__proto__:null,default:lE},Symbol.toStringTag,{value:"Module"})),nr=sE(uE),Kp=oE,$p=nr,Yu=class Km extends Error{constructor(e,r,n,i,a,s){super(e),this.name="CssSyntaxError",this.reason=e,a&&(this.file=a),i&&(this.source=i),s&&(this.plugin=s),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Km)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=Kp.isColorSupported),$p&&e&&(r=$p(r));let n=r.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,n.length),s=String(a).length,o,l;if(e){let{bold:u,gray:c,red:f}=Kp.createColors(!0);o=d=>u(f(d)),l=d=>c(d)}else o=l=u=>u;return n.slice(i,a).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let p=l(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+l(d)+u+` `+p+o("^")}return" "+l(d)+u}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` `),this.name+": "+this.message+e}},Kc=Yu;Yu.default=Yu;pa={};pa.isClean=Symbol("isClean");pa.my=Symbol("my");Hp={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Xu=class{constructor(e){this.builder=e}atrule(e,r){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let a=(e.raws.between||"")+(r?";":"");this.builder(n+i+a,e)}}beforeAfter(e,r){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):r==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,a=0;for(;i&&i.type!=="root";)a+=1,i=i.parent;if(n.includes(` `)){let s=this.raw(e,null,"indent");if(s.length)for(let o=0;o0&&e.nodes[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon");for(let i=0;i{if(i=l.raws[r],typeof i<"u")return!1})}return typeof i>"u"&&(i=Hp[n]),s.rawCache[n]=i,i}rawBeforeClose(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,r){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let r;return e.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let a=n.raws.before.split(` `);return r=a[a.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let n=e[r],i=e.raws[r];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}},$m=Xu;Xu.default=Xu;fE=$m;lo=Zu;Zu.default=Zu;({isClean:bs,my:dE}=pa),hE=Kc,pE=$m,mE=lo;Qu=class{constructor(e={}){this.raws={},this[bs]=!1,this[dE]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let n of e[r])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=Ju(this);for(let n in e)r[n]=e[n];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:n,start:i}=this.rangeBy(r);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},r)}return new hE(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markDirty(){if(this[bs]){this[bs]=!1;let e=this;for(;e=e.parent;)e[bs]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,r){let n=this.source.start;if(e.index)n=this.positionInside(e.index,r);else if(e.word){r=this.toString();let i=r.indexOf(e.word);i!==-1&&(n=this.positionInside(i,r))}return n}positionInside(e,r){let n=r||this.toString(),i=this.source.start.column,a=this.source.start.line;for(let s=0;stypeof l=="object"&&l.toJSON?l.toJSON(null,r):l);else if(typeof o=="object"&&o.toJSON)n[s]=o.toJSON(null,r);else if(s==="source"){let l=r.get(o.input);l==null&&(l=a,r.set(o.input,a),a++),n[s]={end:o.end,inputId:l,start:o.start}}else n[s]=o}return i&&(n.inputs=[...r.keys()].map(s=>s.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=mE){e.stringify&&(e=e.stringify);let r="";return e(this,n=>{r+=n}),r}warn(e,r,n){let i={node:this};for(let a in n)i[a]=n[a];return e.warn(r,i)}get proxyOf(){return this}},uo=Qu;Qu.default=Qu;gE=uo,ec=class extends gE{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},co=ec;ec.default=ec;yE="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",vE=(t,e=21)=>(r=e)=>{let n="",i=r;for(;i--;)n+=t[Math.random()*t.length|0];return n},CE=(t=21)=>{let e="",r=t;for(;r--;)e+=yE[Math.random()*64|0];return e},bE={nanoid:CE,customAlphabet:vE},{SourceMapConsumer:qp,SourceMapGenerator:Gp}=nr,{existsSync:xE,readFileSync:wE}=nr,{dirname:Du,join:SE}=nr;tc=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Du(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new qp(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,a=/^data:application\/json,/;if(i.test(e)||a.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||n.test(e))return EE(e.substr(RegExp.lastMatch.length));let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let n=e.lastIndexOf(r.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=Du(e),xE(e))return this.mapFile=e,wE(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(r instanceof qp)return Gp.fromSourceMap(r).toString();if(r instanceof Gp)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=SE(Du(e),n)),this.loadFile(n)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Hm=tc;tc.default=tc;({SourceMapConsumer:IE,SourceMapGenerator:AE}=nr),{fileURLToPath:Wp,pathToFileURL:xs}=nr,{isAbsolute:rc,resolve:nc}=nr,{nanoid:TE}=bE,Uu=nr,zp=Kc,RE=Hm,Mu=Symbol("fromOffsetCache"),_E=Boolean(IE&&AE),jp=Boolean(nc&&rc),Xs=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!jp||/^\w+:\/\//.test(r.from)||rc(r.from)?this.file=r.from:this.file=nc(r.from)),jp&&_E){let n=new RE(this.css,r);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,r,n,i={}){let a,s,o;if(r&&typeof r=="object"){let u=r,c=n;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);r=f.line,n=f.col}else r=u.line,n=u.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);s=f.line,o=f.col}else s=c.line,o=c.column}else if(!n){let u=this.fromOffset(r);r=u.line,n=u.col}let l=this.origin(r,n,s,o);return l?a=new zp(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):a=new zp(e,s===void 0?r:{column:n,line:r},s===void 0?n:{column:o,line:s},this.css,this.file,i.plugin),a.input={column:n,endColumn:o,endLine:s,line:r,source:this.css},this.file&&(xs&&(a.input.url=xs(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let r,n;if(this[Mu])n=this[Mu];else{let a=this.css.split(` `);n=new Array(a.length);let s=0;for(let o=0,l=a.length;o=r)i=n.length-1;else{let a=n.length-2,s;for(;i>1),e=n[s+1])i=s+1;else{i=s;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:nc(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,n,i){if(!this.map)return!1;let a=this.map.consumer(),s=a.originalPositionFor({column:r,line:e});if(!s.source)return!1;let o;typeof n=="number"&&(o=a.originalPositionFor({column:i,line:n}));let l;rc(s.source)?l=xs(s.source):l=new URL(s.source,this.map.consumer().sourceRoot||xs(this.map.mapFile));let u={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:l.toString()};if(l.protocol==="file:")if(Wp)u.file=Wp(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=a.sourceContentFor(s.source);return c&&(u.source=c),u}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},fo=Xs;Xs.default=Xs;Uu&&Uu.registerInput&&Uu.registerInput(Xs);({SourceMapConsumer:qm,SourceMapGenerator:Ks}=nr),{dirname:$s,relative:Gm,resolve:Wm,sep:zm}=nr,{pathToFileURL:Yp}=nr,BE=fo,NE=Boolean(qm&&Ks),kE=Boolean($s&&Wm&&Gm&&zm),LE=class{constructor(e,r,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=` `;this.css.includes(`\r `)&&(r=`\r `),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),n=e.root||$s(e.file),i;this.mapOpts.sourcesContent===!1?(i=new qm(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),kE&&NE&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ks.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ks({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ks({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,n="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,s;this.stringify(this.root,(o,l,u)=>{if(this.css+=o,l&&u!=="end"&&(i.generated.line=e,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=o.match(/\n/g),a?(e+=a.length,s=o.lastIndexOf(` `),r=o.length-s):r+=o.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let n=this.opts.to?$s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=$s(Wm(n,this.mapOpts.annotation)));let i=Gm(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new BE(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(Yp){let n=Yp(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;zm==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},jm=LE,OE=uo,ic=class extends OE{constructor(e){super(e),this.type="comment"}},ho=ic;ic.default=ic;({isClean:Ym,my:Xm}=pa),Zm=co,Jm=ho,PE=uo;_r=class ng extends PE{append(...e){for(let r of e){let n=this.normalize(r,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,i;for(;this.indexes[r]e[r](...n.map(i=>typeof i=="function"?(a,s)=>i(a.toProxy(),s):i)):r==="every"||r==="some"?n=>e[r]((i,...a)=>n(i.toProxy(),...a)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let n=this.index(e),i=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let s of i)this.proxyOf.nodes.splice(n+1,0,s);let a;for(let s in this.indexes)a=this.indexes[s],n"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Zm(e)]}else if(e.selector)e=[new $c(e)];else if(e.name)e=[new Hc(e)];else if(e.text)e=[new Jm(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Xm]||ng.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ym]&&rg(i),typeof i.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(i.raws.before=r.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let r of e){let n=this.normalize(r,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=e&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(e,r,n){return n||(n=r,r={}),this.walkDecls(i=>{r.props&&!r.props.includes(i.prop)||r.fast&&!i.value.includes(r.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,n)=>{let i;try{i=e(r,n)}catch(a){throw r.addToError(a)}return i!==!1&&r.walk&&(i=r.walk(e)),i})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return r(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="atrule")return r(n,i)}))}walkComments(e){return this.walk((r,n)=>{if(r.type==="comment")return e(r,n)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return r(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="decl")return r(n,i)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return r(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="rule")return r(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};_r.registerParse=t=>{Qm=t};_r.registerRule=t=>{$c=t};_r.registerAtRule=t=>{Hc=t};_r.registerRoot=t=>{eg=t};hn=_r;_r.default=_r;_r.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Hc.prototype):t.type==="rule"?Object.setPrototypeOf(t,$c.prototype):t.type==="decl"?Object.setPrototypeOf(t,Zm.prototype):t.type==="comment"?Object.setPrototypeOf(t,Jm.prototype):t.type==="root"&&Object.setPrototypeOf(t,eg.prototype),t[Xm]=!0,t.nodes&&t.nodes.forEach(e=>{_r.rebuild(e)})};DE=hn,ia=class extends DE{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ig(new ag,this,e).stringify()}};ia.registerLazyResult=t=>{ig=t};ia.registerProcessor=t=>{ag=t};qc=ia;ia.default=ia;ac=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},sg=ac;ac.default=ac;UE=sg,sc=class{constructor(e,r,n){this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new UE(e,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Gc=sc;sc.default=sc;Fu="'".charCodeAt(0),Xp='"'.charCodeAt(0),ws="\\".charCodeAt(0),Zp="/".charCodeAt(0),Ss=` `.charCodeAt(0),Yi=" ".charCodeAt(0),Es="\f".charCodeAt(0),Is=" ".charCodeAt(0),As="\r".charCodeAt(0),ME="[".charCodeAt(0),FE="]".charCodeAt(0),VE="(".charCodeAt(0),KE=")".charCodeAt(0),$E="{".charCodeAt(0),HE="}".charCodeAt(0),qE=";".charCodeAt(0),GE="*".charCodeAt(0),WE=":".charCodeAt(0),zE="@".charCodeAt(0),Ts=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,jE=/.[\r\n"'(/\\]/,Jp=/[\da-f]/i,YE=function(e,r={}){let n=e.css.valueOf(),i=r.ignoreErrors,a,s,o,l,u,c,f,d,p,h,m=n.length,g=0,b=[],I=[];function w(){return g}function T(q){throw e.error("Unclosed "+q,g)}function B(){return I.length===0&&g>=m}function N(q){if(I.length)return I.pop();if(g>=m)return;let j=q?q.ignoreUnclosed:!1;switch(a=n.charCodeAt(g),a){case Ss:case Yi:case Is:case As:case Es:{s=g;do s+=1,a=n.charCodeAt(s);while(a===Yi||a===Ss||a===Is||a===As||a===Es);h=["space",n.slice(g,s)],g=s-1;break}case ME:case FE:case $E:case HE:case WE:case qE:case KE:{let J=String.fromCharCode(a);h=[J,J,g];break}case VE:{if(d=b.length?b.pop()[1]:"",p=n.charCodeAt(g+1),d==="url"&&p!==Fu&&p!==Xp&&p!==Yi&&p!==Ss&&p!==Is&&p!==Es&&p!==As){s=g;do{if(c=!1,s=n.indexOf(")",s+1),s===-1)if(i||j){s=g;break}else T("bracket");for(f=s;n.charCodeAt(f-1)===ws;)f-=1,c=!c}while(c);h=["brackets",n.slice(g,s+1),g,s],g=s}else s=n.indexOf(")",g+1),l=n.slice(g,s+1),s===-1||jE.test(l)?h=["(","(",g]:(h=["brackets",l,g,s],g=s);break}case Fu:case Xp:{o=a===Fu?"'":'"',s=g;do{if(c=!1,s=n.indexOf(o,s+1),s===-1)if(i||j){s=g+1;break}else T("string");for(f=s;n.charCodeAt(f-1)===ws;)f-=1,c=!c}while(c);h=["string",n.slice(g,s+1),g,s],g=s;break}case zE:{Ts.lastIndex=g+1,Ts.test(n),Ts.lastIndex===0?s=n.length-1:s=Ts.lastIndex-2,h=["at-word",n.slice(g,s+1),g,s],g=s;break}case ws:{for(s=g,u=!0;n.charCodeAt(s+1)===ws;)s+=1,u=!u;if(a=n.charCodeAt(s+1),u&&a!==Zp&&a!==Yi&&a!==Ss&&a!==Is&&a!==As&&a!==Es&&(s+=1,Jp.test(n.charAt(s)))){for(;Jp.test(n.charAt(s+1));)s+=1;n.charCodeAt(s+1)===Yi&&(s+=1)}h=["word",n.slice(g,s+1),g,s],g=s;break}default:{a===Zp&&n.charCodeAt(g+1)===GE?(s=n.indexOf("*/",g+2)+1,s===0&&(i||j?s=n.length:T("comment")),h=["comment",n.slice(g,s+1),g,s],g=s):(Rs.lastIndex=g+1,Rs.test(n),Rs.lastIndex===0?s=n.length-1:s=Rs.lastIndex-2,h=["word",n.slice(g,s+1),g,s],b.push(h),g=s);break}}return g++,h}function H(q){I.push(q)}return{back:H,endOfFile:B,nextToken:N,position:w}},og=hn,Zs=class extends og{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Wc=Zs;Zs.default=Zs;og.registerAtRule(Zs);lg=hn,Qn=class extends lg{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,n){let i=super.normalize(e);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let a of i)a.raws.before=r.raws.before}return i}removeChild(e,r){let n=this.index(e);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new ug(new cg,this,e).stringify()}};Qn.registerLazyResult=t=>{ug=t};Qn.registerProcessor=t=>{cg=t};ma=Qn;Qn.default=Qn;lg.registerRoot(Qn);aa={comma(t){return aa.split(t,[","],!0)},space(t){let e=[" ",` `," "];return aa.split(t,e)},split(t,e,r){let n=[],i="",a=!1,s=0,o=!1,l="",u=!1;for(let c of t)u?u=!1:c==="\\"?u=!0:o?c===l&&(o=!1):c==='"'||c==="'"?(o=!0,l=c):c==="("?s+=1:c===")"?s>0&&(s-=1):s===0&&e.includes(c)&&(a=!0),a?(i!==""&&n.push(i.trim()),i="",a=!1):i+=c;return(r||i!=="")&&n.push(i.trim()),n}},fg=aa;aa.default=aa;dg=hn,XE=fg,Js=class extends dg{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return XE.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},zc=Js;Js.default=Js;dg.registerRule(Js);ZE=co,JE=YE,QE=ho,eI=Wc,tI=ma,Qp=zc,em={empty:!0,space:!0};nI=class{constructor(e){this.input=e,this.root=new tI,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new eI;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let n,i,a,s=!1,o=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?u.push(n==="("?")":"]"):n==="{"&&u.length>0?u.push("}"):n===u[u.length-1]&&u.pop(),u.length===0)if(n===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){o=!0;break}else if(n==="}"){if(l.length>0){for(a=l.length-1,i=l[a];i&&i[0]==="space";)i=l[--a];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(r.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(r,"params",l),s&&(e=l[l.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n=0,i;for(let a=r-1;a>=0&&(i=e[a],!(i[0]!=="space"&&(n+=1,n===2)));a--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let r=0,n,i,a;for(let[s,o]of e.entries()){if(n=o,i=n[0],i==="("&&(r+=1),i===")"&&(r-=1),r===0&&i===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return s}a=n}return!1}comment(e){let r=new QE;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=i[2],r.raws.left=i[1],r.raws.right=i[3]}}createTokenizer(){this.tokenizer=JE(this.input)}decl(e,r){let n=new ZE;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||rI(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let a;for(;e.length;)if(a=e.shift(),a[0]===":"){n.raws.between+=a[1];break}else a[0]==="word"&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)s.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(a=e[u],a[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(n.raws.important=c);break}else if(a[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let p=c[d][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=f,e=c)}if(a[0]!=="space"&&a[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(n.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(n,"value",s.concat(e),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new Qp;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,n=null,i=!1,a=null,s=[],o=e[1].startsWith("--"),l=[],u=e;for(;u;){if(n=u[0],l.push(u),n==="("||n==="[")a||(a=u),s.push(n==="("?")":"]");else if(o&&i&&n==="{")a||(a=u),s.push("}");else if(s.length===0)if(n===";")if(i){this.decl(l,o);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),r=!0;break}else n===":"&&(i=!0);else n===s[s.length-1]&&(s.pop(),s.length===0&&(a=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),s.length>0&&this.unclosedBracket(a),r&&i){if(!o)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,n,i){let a,s,o=n.length,l="",u=!0,c,f;for(let d=0;dp+h[1],"");e.raws[r]={raw:d,value:l}}e[r]=l}rule(e){e.pop();let r=new Qp;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let r,n="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],r==="space");)n=e.pop()[1]+n;return n}stringFrom(e,r){let n="";for(let i=r;i"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let a=hI;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{i=a(r,n)}catch(s){this.processed=!0,this.error=s}i&&!i[lI]&&fI.rebuild(i)}this.result=new tm(e,i,n),this.helpers={...lc,postcss:lc,result:this.result},this.plugins=this.processor.plugins.map(a=>typeof a=="object"&&a.prepare?{...a,...a.prepare(this.result)}:a)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let n=this.result.lastPlugin;try{r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(r,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,i])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!gI[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yI[n])if(typeof r[n]=="object")for(let i in r[n])i==="*"?e(r,n,r[n][i]):e(r,n+"-"+i.toLowerCase(),r[n][i]);else typeof r[n]=="function"&&e(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let n=this.visitTick(r);if(Xi(n))try{await n}catch(i){let a=r[r.length-1].node;throw this.handleError(i,a)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let i=e.nodes.map(a=>n(a,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return Xi(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=cI;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let i=new uI(r,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(Xi(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[gr];)e[gr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[n,i]of e){this.result.lastPlugin=n;let a;try{a=i(r,this.helpers)}catch(s){throw this.handleError(s,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(Xi(a))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:n,visitors:i}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&r.visitorIndex{i[gr]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ti.registerPostcss=t=>{lc=t};mg=ti;ti.default=ti;pI.registerLazyResult(ti);dI.registerLazyResult(ti);vI=jm,CI=lo,bI=jc,xI=Gc,uc=class{constructor(e,r,n){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=n,this._map=void 0;let i,a=CI;this.result=new xI(this._processor,i,this._opts),this.result.css=r;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let o=new vI(a,i,this._opts,r);if(o.isMap()){let[l,u]=o.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return this.async().then(e,r)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=bI;try{e=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},wI=uc;uc.default=uc;SI=wI,EI=mg,II=qc,AI=ma,sa=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new SI(this,e,r):new EI(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},TI=sa;sa.default=sa;AI.registerProcessor(sa);II.registerProcessor(sa);RI=co,_I=Hm,BI=ho,NI=Wc,kI=fo,LI=ma,OI=zc;PI=oa;oa.default=oa;DI=Kc,gg=co,UI=mg,MI=hn,Yc=TI,FI=lo,VI=PI,yg=qc,KI=sg,vg=ho,Cg=Wc,$I=Gc,HI=fo,qI=jc,GI=fg,bg=zc,xg=ma,WI=uo;Ae.plugin=function(e,r){let n=!1;function i(...s){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: https://www.w3ctech.com/topic/2226`));let o=r(...s);return o.postcssPlugin=e,o.postcssVersion=new Yc().version,o}let a;return Object.defineProperty(i,"postcss",{get(){return a||(a=i()),a}}),i.process=function(s,o,l){return Ae([i(l)]).process(s,o)},i};Ae.stringify=FI;Ae.parse=qI;Ae.fromJSON=VI;Ae.list=GI;Ae.comment=t=>new vg(t);Ae.atRule=t=>new Cg(t);Ae.decl=t=>new gg(t);Ae.rule=t=>new bg(t);Ae.root=t=>new xg(t);Ae.document=t=>new yg(t);Ae.CssSyntaxError=DI;Ae.Declaration=gg;Ae.Container=MI;Ae.Processor=Yc;Ae.Document=yg;Ae.Comment=vg;Ae.Warning=KI;Ae.AtRule=Cg;Ae.Result=$I;Ae.Input=HI;Ae.Rule=bg;Ae.Root=xg;Ae.Node=WI;UI.registerPostcss(Ae);zI=Ae;Ae.default=Ae;Ge=aE(zI);Ge.stringify;Ge.fromJSON;Ge.plugin;Ge.parse;Ge.list;Ge.document;Ge.comment;Ge.atRule;Ge.rule;Ge.decl;Ge.root;Ge.CssSyntaxError;Ge.Declaration;Ge.Container;Ge.Processor;Ge.Document;Ge.Comment;Ge.Warning;Ge.AtRule;Ge.Result;Ge.Input;Ge.Rule;Ge.Root;Ge.Node;jI=Object.defineProperty,YI=(t,e,r)=>e in t?jI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jt=(t,e,r)=>YI(t,typeof e!="symbol"?e+"":e,r);Xc={exports:{}},Fe=String,wg=function(){return{isColorSupported:!1,reset:Fe,bold:Fe,dim:Fe,italic:Fe,underline:Fe,inverse:Fe,hidden:Fe,strikethrough:Fe,black:Fe,red:Fe,green:Fe,yellow:Fe,blue:Fe,magenta:Fe,cyan:Fe,white:Fe,gray:Fe,bgBlack:Fe,bgRed:Fe,bgGreen:Fe,bgYellow:Fe,bgBlue:Fe,bgMagenta:Fe,bgCyan:Fe,bgWhite:Fe}};Xc.exports=wg();Xc.exports.createColors=wg;JI=Xc.exports,QI={},eA=Object.freeze(Object.defineProperty({__proto__:null,default:QI},Symbol.toStringTag,{value:"Module"})),ir=ZI(eA),nm=JI,im=ir,cc=class Sg extends Error{constructor(e,r,n,i,a,s){super(e),this.name="CssSyntaxError",this.reason=e,a&&(this.file=a),i&&(this.source=i),s&&(this.plugin=s),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Sg)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=nm.isColorSupported),im&&e&&(r=im(r));let n=r.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,n.length),s=String(a).length,o,l;if(e){let{bold:u,gray:c,red:f}=nm.createColors(!0);o=d=>u(f(d)),l=d=>c(d)}else o=l=u=>u;return n.slice(i,a).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let p=l(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+l(d)+u+` `+p+o("^")}return" "+l(d)+u}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` `),this.name+": "+this.message+e}},Zc=cc;cc.default=cc;ga={};ga.isClean=Symbol("isClean");ga.my=Symbol("my");am={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};fc=class{constructor(e){this.builder=e}atrule(e,r){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let a=(e.raws.between||"")+(r?";":"");this.builder(n+i+a,e)}}beforeAfter(e,r){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):r==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,a=0;for(;i&&i.type!=="root";)a+=1,i=i.parent;if(n.includes(` `)){let s=this.raw(e,null,"indent");if(s.length)for(let o=0;o0&&e.nodes[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon");for(let i=0;i{if(i=l.raws[r],typeof i<"u")return!1})}return typeof i>"u"&&(i=am[n]),s.rawCache[n]=i,i}rawBeforeClose(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,r){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let r;return e.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let a=n.raws.before.split(` `);return r=a[a.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let n=e[r],i=e.raws[r];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}},Eg=fc;fc.default=fc;rA=Eg;po=dc;dc.default=dc;({isClean:_s,my:nA}=ga),iA=Zc,aA=Eg,sA=po;pc=class{constructor(e={}){this.raws={},this[_s]=!1,this[nA]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let n of e[r])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=hc(this);for(let n in e)r[n]=e[n];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:n,start:i}=this.rangeBy(r);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},r)}return new iA(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markDirty(){if(this[_s]){this[_s]=!1;let e=this;for(;e=e.parent;)e[_s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,r){let n=this.source.start;if(e.index)n=this.positionInside(e.index,r);else if(e.word){r=this.toString();let i=r.indexOf(e.word);i!==-1&&(n=this.positionInside(i,r))}return n}positionInside(e,r){let n=r||this.toString(),i=this.source.start.column,a=this.source.start.line;for(let s=0;stypeof l=="object"&&l.toJSON?l.toJSON(null,r):l);else if(typeof o=="object"&&o.toJSON)n[s]=o.toJSON(null,r);else if(s==="source"){let l=r.get(o.input);l==null&&(l=a,r.set(o.input,a),a++),n[s]={end:o.end,inputId:l,start:o.start}}else n[s]=o}return i&&(n.inputs=[...r.keys()].map(s=>s.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=sA){e.stringify&&(e=e.stringify);let r="";return e(this,n=>{r+=n}),r}warn(e,r,n){let i={node:this};for(let a in n)i[a]=n[a];return e.warn(r,i)}get proxyOf(){return this}},mo=pc;pc.default=pc;oA=mo,mc=class extends oA{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},go=mc;mc.default=mc;lA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",uA=(t,e=21)=>(r=e)=>{let n="",i=r;for(;i--;)n+=t[Math.random()*t.length|0];return n},cA=(t=21)=>{let e="",r=t;for(;r--;)e+=lA[Math.random()*64|0];return e},fA={nanoid:cA,customAlphabet:uA},{SourceMapConsumer:sm,SourceMapGenerator:om}=ir,{existsSync:dA,readFileSync:hA}=ir,{dirname:Vu,join:pA}=ir;gc=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Vu(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new sm(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,a=/^data:application\/json,/;if(i.test(e)||a.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||n.test(e))return mA(e.substr(RegExp.lastMatch.length));let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let n=e.lastIndexOf(r.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=Vu(e),dA(e))return this.mapFile=e,hA(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(r instanceof sm)return om.fromSourceMap(r).toString();if(r instanceof om)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=pA(Vu(e),n)),this.loadFile(n)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ig=gc;gc.default=gc;({SourceMapConsumer:gA,SourceMapGenerator:yA}=ir),{fileURLToPath:lm,pathToFileURL:Bs}=ir,{isAbsolute:yc,resolve:vc}=ir,{nanoid:vA}=fA,Ku=ir,um=Zc,CA=Ig,$u=Symbol("fromOffsetCache"),bA=Boolean(gA&&yA),cm=Boolean(vc&&yc),eo=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!cm||/^\w+:\/\//.test(r.from)||yc(r.from)?this.file=r.from:this.file=vc(r.from)),cm&&bA){let n=new CA(this.css,r);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,r,n,i={}){let a,s,o;if(r&&typeof r=="object"){let u=r,c=n;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);r=f.line,n=f.col}else r=u.line,n=u.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);s=f.line,o=f.col}else s=c.line,o=c.column}else if(!n){let u=this.fromOffset(r);r=u.line,n=u.col}let l=this.origin(r,n,s,o);return l?a=new um(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):a=new um(e,s===void 0?r:{column:n,line:r},s===void 0?n:{column:o,line:s},this.css,this.file,i.plugin),a.input={column:n,endColumn:o,endLine:s,line:r,source:this.css},this.file&&(Bs&&(a.input.url=Bs(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let r,n;if(this[$u])n=this[$u];else{let a=this.css.split(` `);n=new Array(a.length);let s=0;for(let o=0,l=a.length;o=r)i=n.length-1;else{let a=n.length-2,s;for(;i>1),e=n[s+1])i=s+1;else{i=s;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:vc(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,n,i){if(!this.map)return!1;let a=this.map.consumer(),s=a.originalPositionFor({column:r,line:e});if(!s.source)return!1;let o;typeof n=="number"&&(o=a.originalPositionFor({column:i,line:n}));let l;yc(s.source)?l=Bs(s.source):l=new URL(s.source,this.map.consumer().sourceRoot||Bs(this.map.mapFile));let u={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:l.toString()};if(l.protocol==="file:")if(lm)u.file=lm(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=a.sourceContentFor(s.source);return c&&(u.source=c),u}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},yo=eo;eo.default=eo;Ku&&Ku.registerInput&&Ku.registerInput(eo);({SourceMapConsumer:Ag,SourceMapGenerator:Hs}=ir),{dirname:qs,relative:Tg,resolve:Rg,sep:_g}=ir,{pathToFileURL:fm}=ir,xA=yo,wA=Boolean(Ag&&Hs),SA=Boolean(qs&&Rg&&Tg&&_g),EA=class{constructor(e,r,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=` `;this.css.includes(`\r `)&&(r=`\r `),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),n=e.root||qs(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ag(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),SA&&wA&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Hs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Hs({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Hs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,n="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,s;this.stringify(this.root,(o,l,u)=>{if(this.css+=o,l&&u!=="end"&&(i.generated.line=e,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=o.match(/\n/g),a?(e+=a.length,s=o.lastIndexOf(` `),r=o.length-s):r+=o.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let n=this.opts.to?qs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=qs(Rg(n,this.mapOpts.annotation)));let i=Tg(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new xA(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(fm){let n=fm(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;_g==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},Bg=EA,IA=mo,Cc=class extends IA{constructor(e){super(e),this.type="comment"}},vo=Cc;Cc.default=Cc;({isClean:Ng,my:kg}=ga),Lg=go,Og=vo,AA=mo;Br=class Fg extends AA{append(...e){for(let r of e){let n=this.normalize(r,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,i;for(;this.indexes[r]e[r](...n.map(i=>typeof i=="function"?(a,s)=>i(a.toProxy(),s):i)):r==="every"||r==="some"?n=>e[r]((i,...a)=>n(i.toProxy(),...a)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,n){return e[r]===n||(e[r]=n,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let n=this.index(e),i=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let s of i)this.proxyOf.nodes.splice(n+1,0,s);let a;for(let s in this.indexes)a=this.indexes[s],n"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Lg(e)]}else if(e.selector)e=[new Jc(e)];else if(e.name)e=[new Qc(e)];else if(e.text)e=[new Og(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[kg]||Fg.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ng]&&Mg(i),typeof i.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(i.raws.before=r.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let r of e){let n=this.normalize(r,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=e&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(e,r,n){return n||(n=r,r={}),this.walkDecls(i=>{r.props&&!r.props.includes(i.prop)||r.fast&&!i.value.includes(r.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,n)=>{let i;try{i=e(r,n)}catch(a){throw r.addToError(a)}return i!==!1&&r.walk&&(i=r.walk(e)),i})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return r(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="atrule")return r(n,i)}))}walkComments(e){return this.walk((r,n)=>{if(r.type==="comment")return e(r,n)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return r(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="decl")return r(n,i)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return r(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return r(n,i)}):(r=e,this.walk((n,i)=>{if(n.type==="rule")return r(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Br.registerParse=t=>{Pg=t};Br.registerRule=t=>{Jc=t};Br.registerAtRule=t=>{Qc=t};Br.registerRoot=t=>{Dg=t};pn=Br;Br.default=Br;Br.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Qc.prototype):t.type==="rule"?Object.setPrototypeOf(t,Jc.prototype):t.type==="decl"?Object.setPrototypeOf(t,Lg.prototype):t.type==="comment"?Object.setPrototypeOf(t,Og.prototype):t.type==="root"&&Object.setPrototypeOf(t,Dg.prototype),t[kg]=!0,t.nodes&&t.nodes.forEach(e=>{Br.rebuild(e)})};TA=pn,la=class extends TA{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Vg(new Kg,this,e).stringify()}};la.registerLazyResult=t=>{Vg=t};la.registerProcessor=t=>{Kg=t};ef=la;la.default=la;bc=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},$g=bc;bc.default=bc;RA=$g,xc=class{constructor(e,r,n){this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new RA(e,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},tf=xc;xc.default=xc;Hu="'".charCodeAt(0),dm='"'.charCodeAt(0),Ns="\\".charCodeAt(0),hm="/".charCodeAt(0),ks=` `.charCodeAt(0),Zi=" ".charCodeAt(0),Ls="\f".charCodeAt(0),Os=" ".charCodeAt(0),Ps="\r".charCodeAt(0),_A="[".charCodeAt(0),BA="]".charCodeAt(0),NA="(".charCodeAt(0),kA=")".charCodeAt(0),LA="{".charCodeAt(0),OA="}".charCodeAt(0),PA=";".charCodeAt(0),DA="*".charCodeAt(0),UA=":".charCodeAt(0),MA="@".charCodeAt(0),Ds=/[\t\n\f\r "#'()/;[\\\]{}]/g,Us=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,FA=/.[\r\n"'(/\\]/,pm=/[\da-f]/i,VA=function(e,r={}){let n=e.css.valueOf(),i=r.ignoreErrors,a,s,o,l,u,c,f,d,p,h,m=n.length,g=0,b=[],I=[];function w(){return g}function T(q){throw e.error("Unclosed "+q,g)}function B(){return I.length===0&&g>=m}function N(q){if(I.length)return I.pop();if(g>=m)return;let j=q?q.ignoreUnclosed:!1;switch(a=n.charCodeAt(g),a){case ks:case Zi:case Os:case Ps:case Ls:{s=g;do s+=1,a=n.charCodeAt(s);while(a===Zi||a===ks||a===Os||a===Ps||a===Ls);h=["space",n.slice(g,s)],g=s-1;break}case _A:case BA:case LA:case OA:case UA:case PA:case kA:{let J=String.fromCharCode(a);h=[J,J,g];break}case NA:{if(d=b.length?b.pop()[1]:"",p=n.charCodeAt(g+1),d==="url"&&p!==Hu&&p!==dm&&p!==Zi&&p!==ks&&p!==Os&&p!==Ls&&p!==Ps){s=g;do{if(c=!1,s=n.indexOf(")",s+1),s===-1)if(i||j){s=g;break}else T("bracket");for(f=s;n.charCodeAt(f-1)===Ns;)f-=1,c=!c}while(c);h=["brackets",n.slice(g,s+1),g,s],g=s}else s=n.indexOf(")",g+1),l=n.slice(g,s+1),s===-1||FA.test(l)?h=["(","(",g]:(h=["brackets",l,g,s],g=s);break}case Hu:case dm:{o=a===Hu?"'":'"',s=g;do{if(c=!1,s=n.indexOf(o,s+1),s===-1)if(i||j){s=g+1;break}else T("string");for(f=s;n.charCodeAt(f-1)===Ns;)f-=1,c=!c}while(c);h=["string",n.slice(g,s+1),g,s],g=s;break}case MA:{Ds.lastIndex=g+1,Ds.test(n),Ds.lastIndex===0?s=n.length-1:s=Ds.lastIndex-2,h=["at-word",n.slice(g,s+1),g,s],g=s;break}case Ns:{for(s=g,u=!0;n.charCodeAt(s+1)===Ns;)s+=1,u=!u;if(a=n.charCodeAt(s+1),u&&a!==hm&&a!==Zi&&a!==ks&&a!==Os&&a!==Ps&&a!==Ls&&(s+=1,pm.test(n.charAt(s)))){for(;pm.test(n.charAt(s+1));)s+=1;n.charCodeAt(s+1)===Zi&&(s+=1)}h=["word",n.slice(g,s+1),g,s],g=s;break}default:{a===hm&&n.charCodeAt(g+1)===DA?(s=n.indexOf("*/",g+2)+1,s===0&&(i||j?s=n.length:T("comment")),h=["comment",n.slice(g,s+1),g,s],g=s):(Us.lastIndex=g+1,Us.test(n),Us.lastIndex===0?s=n.length-1:s=Us.lastIndex-2,h=["word",n.slice(g,s+1),g,s],b.push(h),g=s);break}}return g++,h}function H(q){I.push(q)}return{back:H,endOfFile:B,nextToken:N,position:w}},Hg=pn,to=class extends Hg{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},rf=to;to.default=to;Hg.registerAtRule(to);qg=pn,ri=class extends qg{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,n){let i=super.normalize(e);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let a of i)a.raws.before=r.raws.before}return i}removeChild(e,r){let n=this.index(e);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Gg(new Wg,this,e).stringify()}};ri.registerLazyResult=t=>{Gg=t};ri.registerProcessor=t=>{Wg=t};ya=ri;ri.default=ri;qg.registerRoot(ri);ua={comma(t){return ua.split(t,[","],!0)},space(t){let e=[" ",` `," "];return ua.split(t,e)},split(t,e,r){let n=[],i="",a=!1,s=0,o=!1,l="",u=!1;for(let c of t)u?u=!1:c==="\\"?u=!0:o?c===l&&(o=!1):c==='"'||c==="'"?(o=!0,l=c):c==="("?s+=1:c===")"?s>0&&(s-=1):s===0&&e.includes(c)&&(a=!0),a?(i!==""&&n.push(i.trim()),i="",a=!1):i+=c;return(r||i!=="")&&n.push(i.trim()),n}},zg=ua;ua.default=ua;jg=pn,KA=zg,ro=class extends jg{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return KA.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},nf=ro;ro.default=ro;jg.registerRule(ro);$A=go,HA=VA,qA=vo,GA=rf,WA=ya,mm=nf,gm={empty:!0,space:!0};jA=class{constructor(e){this.input=e,this.root=new WA,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new GA;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let n,i,a,s=!1,o=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?u.push(n==="("?")":"]"):n==="{"&&u.length>0?u.push("}"):n===u[u.length-1]&&u.pop(),u.length===0)if(n===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){o=!0;break}else if(n==="}"){if(l.length>0){for(a=l.length-1,i=l[a];i&&i[0]==="space";)i=l[--a];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(r.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(r,"params",l),s&&(e=l[l.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let n=0,i;for(let a=r-1;a>=0&&(i=e[a],!(i[0]!=="space"&&(n+=1,n===2)));a--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let r=0,n,i,a;for(let[s,o]of e.entries()){if(n=o,i=n[0],i==="("&&(r+=1),i===")"&&(r-=1),r===0&&i===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return s}a=n}return!1}comment(e){let r=new qA;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=i[2],r.raws.left=i[1],r.raws.right=i[3]}}createTokenizer(){this.tokenizer=HA(this.input)}decl(e,r){let n=new $A;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||zA(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let a;for(;e.length;)if(a=e.shift(),a[0]===":"){n.raws.between+=a[1];break}else a[0]==="word"&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)s.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(a=e[u],a[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(n.raws.important=c);break}else if(a[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let p=c[d][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=f,e=c)}if(a[0]!=="space"&&a[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(n.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(n,"value",s.concat(e),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new mm;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,n=null,i=!1,a=null,s=[],o=e[1].startsWith("--"),l=[],u=e;for(;u;){if(n=u[0],l.push(u),n==="("||n==="[")a||(a=u),s.push(n==="("?")":"]");else if(o&&i&&n==="{")a||(a=u),s.push("}");else if(s.length===0)if(n===";")if(i){this.decl(l,o);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),r=!0;break}else n===":"&&(i=!0);else n===s[s.length-1]&&(s.pop(),s.length===0&&(a=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),s.length>0&&this.unclosedBracket(a),r&&i){if(!o)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,n,i){let a,s,o=n.length,l="",u=!0,c,f;for(let d=0;dp+h[1],"");e.raws[r]={raw:d,value:l}}e[r]=l}rule(e){e.pop();let r=new mm;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let r,n="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let r,n="";for(;e.length&&(r=e[e.length-1][0],r==="space");)n=e.pop()[1]+n;return n}stringFrom(e,r){let n="";for(let i=r;i"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let a=iT;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{i=a(r,n)}catch(s){this.processed=!0,this.error=s}i&&!i[QA]&&rT.rebuild(i)}this.result=new ym(e,i,n),this.helpers={...Sc,postcss:Sc,result:this.result},this.plugins=this.processor.plugins.map(a=>typeof a=="object"&&a.prepare?{...a,...a.prepare(this.result)}:a)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let n=this.result.lastPlugin;try{r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(r,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,i])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!oT[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!lT[n])if(typeof r[n]=="object")for(let i in r[n])i==="*"?e(r,n,r[n][i]):e(r,n+"-"+i.toLowerCase(),r[n][i]);else typeof r[n]=="function"&&e(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let n=this.visitTick(r);if(Ji(n))try{await n}catch(i){let a=r[r.length-1].node;throw this.handleError(i,a)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let i=e.nodes.map(a=>n(a,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return Ji(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=tT;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let i=new eT(r,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(Ji(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];)e[yr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[n,i]of e){this.result.lastPlugin=n;let a;try{a=i(r,this.helpers)}catch(s){throw this.handleError(s,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(Ji(a))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:n,visitors:i}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&r.visitorIndex{i[yr]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ii.registerPostcss=t=>{Sc=t};Zg=ii;ii.default=ii;aT.registerLazyResult(ii);nT.registerLazyResult(ii);uT=Bg,cT=po,fT=af,dT=tf,Ec=class{constructor(e,r,n){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=n,this._map=void 0;let i,a=cT;this.result=new dT(this._processor,i,this._opts),this.result.css=r;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let o=new uT(a,i,this._opts,r);if(o.isMap()){let[l,u]=o.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return this.async().then(e,r)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=fT;try{e=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},hT=Ec;Ec.default=Ec;pT=hT,mT=Zg,gT=ef,yT=ya,ca=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new pT(this,e,r):new mT(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},vT=ca;ca.default=ca;yT.registerProcessor(ca);gT.registerProcessor(ca);CT=go,bT=Ig,xT=vo,wT=rf,ST=yo,ET=ya,IT=nf;AT=fa;fa.default=fa;TT=Zc,Jg=go,RT=Zg,_T=pn,sf=vT,BT=po,NT=AT,Qg=ef,kT=$g,ey=vo,ty=rf,LT=tf,OT=yo,PT=af,DT=zg,ry=nf,ny=ya,UT=mo;Te.plugin=function(e,r){let n=!1;function i(...s){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: https://www.w3ctech.com/topic/2226`));let o=r(...s);return o.postcssPlugin=e,o.postcssVersion=new sf().version,o}let a;return Object.defineProperty(i,"postcss",{get(){return a||(a=i()),a}}),i.process=function(s,o,l){return Te([i(l)]).process(s,o)},i};Te.stringify=BT;Te.parse=PT;Te.fromJSON=NT;Te.list=DT;Te.comment=t=>new ey(t);Te.atRule=t=>new ty(t);Te.decl=t=>new Jg(t);Te.rule=t=>new ry(t);Te.root=t=>new ny(t);Te.document=t=>new Qg(t);Te.CssSyntaxError=TT;Te.Declaration=Jg;Te.Container=_T;Te.Processor=sf;Te.Document=Qg;Te.Comment=ey;Te.Warning=kT;Te.AtRule=ty;Te.Result=LT;Te.Input=OT;Te.Rule=ry;Te.Root=ny;Te.Node=UT;RT.registerPostcss(Te);MT=Te;Te.default=Te;We=XI(MT);We.stringify;We.fromJSON;We.plugin;We.parse;We.list;We.document;We.comment;We.atRule;We.rule;We.decl;We.root;We.CssSyntaxError;We.Declaration;We.Container;We.Processor;We.Document;We.Comment;We.Warning;We.AtRule;We.Result;We.Input;We.Rule;We.Root;We.Node;da=class{constructor(...e){jt(this,"parentElement",null),jt(this,"parentNode",null),jt(this,"ownerDocument"),jt(this,"firstChild",null),jt(this,"lastChild",null),jt(this,"previousSibling",null),jt(this,"nextSibling",null),jt(this,"ELEMENT_NODE",1),jt(this,"TEXT_NODE",3),jt(this,"nodeType"),jt(this,"nodeName"),jt(this,"RRNodeType")}get childNodes(){let e=[],r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof da){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},Cm={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},bm={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ms={},FT=()=>!!globalThis.Zone;qu={};Gu={};me={childNodes:VT,parentNode:KT,parentElement:$T,textContent:HT,contains:qT,getRootNode:GT,host:WT,styleSheets:zT,shadowRoot:jT,querySelector:YT,querySelectorAll:XT,mutationObserver:ay};jn=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`,xm={map:{},getId(){return console.error(jn),-1},getNode(){return console.error(jn),null},removeNodeFromMap(){console.error(jn)},has(){return console.error(jn),!1},reset(){console.error(jn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(xm=new Proxy(xm,{get(t,e,r){return e==="map"&&console.error(jn),Reflect.get(t,e,r)}}));io=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(io=()=>new Date().getTime());Tc=class{constructor(){U(this,"id",1),U(this,"styleIDMap",new WeakMap),U(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};Se=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Se||{}),ge=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(ge||{}),Pt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Pt||{}),Rr=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Rr||{}),ai=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ai||{}),Yn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Yn||{}),my=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(my||{});Rc=class{constructor(){U(this,"length",0),U(this,"head",null),U(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n`${t}@${e}`,_c=class{constructor(){U(this,"frozen",!1),U(this,"locked",!1),U(this,"texts",[]),U(this,"attributes",[]),U(this,"attributeMap",new WeakMap),U(this,"removes",[]),U(this,"mapRemoves",[]),U(this,"movedMap",{}),U(this,"addedSet",new Set),U(this,"movedSet",new Set),U(this,"droppedSet",new Set),U(this,"removesSubTreeCache",new Set),U(this,"mutationCb"),U(this,"blockClass"),U(this,"blockSelector"),U(this,"maskTextClass"),U(this,"maskTextSelector"),U(this,"inlineStylesheet"),U(this,"maskInputOptions"),U(this,"maskTextFn"),U(this,"maskInputFn"),U(this,"keepIframeSrcFn"),U(this,"recordCanvas"),U(this,"inlineImages"),U(this,"slimDOMOptions"),U(this,"dataURLOptions"),U(this,"doc"),U(this,"mirror"),U(this,"iframeManager"),U(this,"stylesheetManager"),U(this,"shadowDomManager"),U(this,"canvasManager"),U(this,"processedNodeManager"),U(this,"unattachedDoc"),U(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),U(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],r=new Set,n=new Rc,i=l=>{let u=l,c=na;for(;c===na;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},a=l=>{let u=me.parentNode(l);if(!u||!py(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){let h=u.tagName;if(h==="TEXTAREA")return;h==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let f=ea(u)?this.mirror.getId(hy(l)):this.mirror.getId(u),d=i(l);if(f===-1||d===-1)return n.addNode(l);let p=Zn(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:h=>{fy(h,this.mirror)&&this.iframeManager.addIframe(h),dy(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Ac(l)&&this.shadowDomManager.addShadowRoot(me.shadowRoot(l),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)},cssCaptured:c});p&&(e.push({parentId:f,nextId:d,node:p}),r.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)Em(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(me.parentNode(l))||a(l);for(let l of this.addedSet)!Im(this.droppedSet,l)&&!Em(this.removesSubTreeCache,l,this.mirror)||Im(this.movedSet,l)?a(l):this.droppedSet.add(l);let s=null;for(;n.length;){let l=null;if(s){let u=this.mirror.getId(me.parentNode(s.value)),c=i(s.value);u!==-1&&c!==-1&&(l=s)}if(!l){let u=n.tail;for(;u;){let c=u;if(u=u.previous,c){let f=this.mirror.getId(me.parentNode(c.value));if(i(c.value)===-1)continue;if(f!==-1){l=c;break}else{let p=c.value,h=me.parentNode(p);if(h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=me.host(h);if(this.mirror.getId(m)!==-1){l=c;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),a(l.value)}let o={texts:this.texts.map(l=>{let u=l.node,c=me.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:u}=l;if(typeof u.style=="string"){let c=JSON.stringify(l.styleDiff),f=JSON.stringify(l._unchangedStyles);c.length!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),U(this,"genTextAreaValueMutation",e=>{let r=this.attributeMap.get(e);r||(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e,r)),r.attributes.value=Array.from(me.childNodes(e),n=>me.textContent(n)||"").join("")}),U(this,"processMutation",e=>{if(!Wu(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let r=me.textContent(e.target);!Bt(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:Fm(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,uy(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{let r=e.target,n=e.attributeName,i=e.target.getAttribute(n);if(n==="value"){let s=Mc(r);i=Uc({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:i,maskInputFn:this.maskInputFn})}if(Bt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let a=this.attributeMap.get(e.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),n==="type"&&r.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Mm(r.tagName,n))if(a.attributes[n]=Um(this.doc,dn(r.tagName),dn(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let o of Array.from(r.style)){let l=r.style.getPropertyValue(o),u=r.style.getPropertyPriority(o);l!==s.style.getPropertyValue(o)||u!==s.style.getPropertyPriority(o)?u===""?a.styleDiff[o]=l:a.styleDiff[o]=[l,u]:a._unchangedStyles[o]=[l,u]}for(let o of Array.from(s.style))r.style.getPropertyValue(o)===""&&(a.styleDiff[o]=!1)}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(Bt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let n=this.mirror.getId(r),i=ea(e.target)?this.mirror.getId(me.host(e.target)):this.mirror.getId(e.target);Bt(e.target,this.blockClass,this.blockSelector,!1)||Wu(r,this.mirror,this.slimDOMOptions)||!ZT(r,this.mirror)||(this.addedSet.has(r)?(Bc(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||cy(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Sm(n,i)]?Bc(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:ea(e.target)&&ta(e.target)?!0:void 0}),t2(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),U(this,"genAdds",(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Wu(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Sm(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Bt(e,this.blockClass,this.blockSelector,!1)||(me.childNodes(e).forEach(n=>this.genAdds(n)),Ac(e)&&me.childNodes(me.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=e[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};Ce=t=>ra?(...r)=>{try{return t(...r)}catch(n){if(ra&&ra(n)===!0)return;throw n}}:t,fn=[];l2=["INPUT","TEXTAREA","SELECT"],Am=new WeakMap;so=class{constructor(e){U(this,"iframeIdToRemoteIdMap",new WeakMap),U(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,r,n,i){let a=n||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),o=a.get(r);return o||(o=this.generateIdFn(),a.set(r,o),s.set(o,r)),o}getIds(e,r){let n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return r.map(a=>this.getId(e,a,n,i))}getRemoteId(e,r,n){let i=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let a=i.get(r);return a||-1}getRemoteIds(e,r){let n=this.getRemoteIdToIdMap(e);return r.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}},Nc=class{constructor(e){U(this,"iframes",new WeakMap),U(this,"crossOriginIframeMap",new WeakMap),U(this,"crossOriginIframeMirror",new so(Dm)),U(this,"crossOriginIframeStyleMirror"),U(this,"crossOriginIframeRootIdMap",new WeakMap),U(this,"mirror"),U(this,"mutationCb"),U(this,"wrappedEmit"),U(this,"loadListener"),U(this,"stylesheetManager"),U(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new so(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(e,r){var n;switch(r.type){case Se.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);let i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:Se.IncrementalSnapshot,data:{source:ge.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Se.Meta:case Se.Load:case Se.DomContentLoaded:return!1;case Se.Plugin:return r;case Se.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case Se.IncrementalSnapshot:switch(r.data.source){case ge.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let a=this.crossOriginIframeRootIdMap.get(e);a&&this.patchRootIdOnNode(i.node,a)}),r.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case ge.Drag:case ge.TouchMove:case ge.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case ge.ViewportResize:return!1;case ge.MediaInteraction:case ge.MouseInteraction:case ge.Scroll:case ge.CanvasMutation:case ge.Input:return this.replaceIds(r.data,e,["id"]),r;case ge.StyleSheetRule:case ge.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case ge.Font:return r;case ge.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),r;case ge.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),r}}return!1}replace(e,r,n,i){for(let a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=e.getIds(n,r[a]):r[a]=e.getId(n,r[a]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(e,r){e.type!==my.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},kc=class{constructor(e){U(this,"shadowDoms",new WeakSet),U(this,"mutationCb"),U(this,"scrollCb"),U(this,"bypassOptions"),U(this,"mirror"),U(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,r){if(!ta(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=yy({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(vy({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(me.host(e))),this.restoreHandlers.push(Cy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){let n=this;this.restoreHandlers.push(si(e.prototype,"attachShadow",function(i){return function(a){let s=i.call(this,a),o=me.shadowRoot(this);return o&&py(this)&&n.addShadowRoot(o,r),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Qi=0;Qi>2],i+=Jn[(e[r]&3)<<4|e[r+1]>>4],i+=Jn[(e[r+1]&15)<<2|e[r+2]>>6],i+=Jn[e[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Tm=new Map;by=(t,e,r)=>{if(!t||!(wy(t,e)||typeof t=="object"))return;let n=t.constructor.name,i=b2(r,n),a=i.indexOf(t);return a===-1&&(a=i.length,i.push(t)),a};xy=(t,e,r)=>t.map(n=>Gs(n,e,r)),wy=(t,e)=>{let n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function");return Boolean(n.find(i=>t instanceof e[i]))};Sy="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",E2=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),Bm=typeof window<"u"&&window.Blob&&new Blob([E2(Sy)],{type:"text/javascript;charset=utf-8"});Lc=class{constructor(e){U(this,"pendingCanvasMutations",new Map),U(this,"rafStamps",{latestId:0,invokeId:null}),U(this,"mirror"),U(this,"mutationCb"),U(this,"resetObservers"),U(this,"frozen",!1),U(this,"locked",!1),U(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});let{sampling:r="all",win:n,blockClass:i,blockSelector:a,recordCanvas:s,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,i,a),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,a,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,n,i,a){let s=Rm(r,n,i,!0),o=new Map,l=new I2;l.onmessage=h=>{let{id:m}=h.data;if(o.set(m,!1),!("base64"in h.data))return;let{base64:g,type:b,width:I,height:w}=h.data;this.mutationCb({id:m,type:ai["2D"],commands:[{property:"clearRect",args:[0,0,I,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:b}]},0,0]}]})};let u=1e3/e,c=0,f,d=()=>{let h=[];return r.document.querySelectorAll("canvas").forEach(m=>{Bt(m,n,i,!0)||h.push(m)}),h},p=h=>{if(c&&h-c{var g;let b=this.mirror.getId(m);if(o.get(b)||m.width===0||m.height===0)return;if(o.set(b,!0),["webgl","webgl2"].includes(m.__context)){let w=m.getContext(m.__context);((g=w?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}let I=await createImageBitmap(m);l.postMessage({id:b,bitmap:I,width:m.width,height:m.height,dataURLOptions:a.dataURLOptions},[I])}),f=requestAnimationFrame(p)};f=requestAnimationFrame(p),this.resetObservers=()=>{s(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Rm(e,r,n,!1),a=x2(this.processMutation.bind(this),e,r,n),s=S2(this.processMutation.bind(this),e,r,n);this.resetObservers=()=>{i(),a(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;let i=n.map(s=>{let{type:o,...l}=s;return l}),{type:a}=n[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(e)}},Oc=class{constructor(e){U(this,"trackedLinkElements",new WeakSet),U(this,"mutationCb"),U(this,"adoptedStyleSheetCb"),U(this,"styleMirror",new Tc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;let n={id:r,styleIds:[]},i=[];for(let a of e){let s;this.styleMirror.has(a)?s=this.styleMirror.getId(a):(s=this.styleMirror.add(a),i.push({styleId:s,rules:Array.from(a.rules||CSSRule,(o,l)=>({rule:Om(o,a.href),index:l}))})),n.styleIds.push(s)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Pc=class{constructor(){U(this,"nodeMap",new WeakMap),U(this,"active",!1)}inOtherBuffer(e,r){let n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==r)}add(e,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r))}destroy(){}},oo=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Op=t.contentWindow)==null?void 0:Op.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}rr=OS();oi.addCustomEvent=(t,e)=>{if(!oo)throw new Error("please add custom event after start recording");Xe({type:Se.Custom,data:{tag:t,payload:e}})};oi.freezePage=()=>{fn.forEach(t=>t.freeze())};oi.takeFullSnapshot=t=>{if(!oo)throw new Error("please take full snapshot after start recording");Ws(t)};oi.mirror=rr;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Nm||(Nm={}))});var lf,A2,uf,Iy=D(()=>{Bu();Ey();lf=class{constructor(){this.recordingEvents=[];this.batchInterval=1e4;this.intervalId=null}setEvent(e){this.event_name=e}maybeRecord(e){let n=e?.dataCapture?.sessionReplay,i=n?.maskAllInputs!==!1||!0;if(n?.enabled&&n?.id){this.startBatchSending(e);let a=oi({maskAllInputs:i,emit:s=>{let o={recording_id:n.id,page_title:document.title,url:window.location.href,recording_data:s,timestamp:s?.timestamp,...this.event_name&&{event_name:this.event_name}};this.recordingEvents.push(o)}});window.addEventListener("unload",()=>{this.intervalId&&clearInterval(this.intervalId),this.sendBatch(e),a()})}}startBatchSending(e){this.intervalId=setInterval(()=>{this.sendBatch(e)},this.batchInterval)}async sendBatch(e){let r=e?.api?.routes?.sessionReplay;if(!r||this.recordingEvents.length===0)return;let n={events:[...this.recordingEvents]};try{console.log("Sending session recording batch"),this.recordingEvents=[],await zt.post(r,"session_replay",n)}catch(i){console.error("Failed to send session recording batch:",i),this.recordingEvents.unshift(...n.events)}}},A2=new lf,uf=A2});var vr,mn,Ay=D(()=>{In();bi();vr=class{static install(e){let r=this.normalizeNetworkCaptureConfig(Nt());if(!r||!r.enabled){te.debug("Network capture not enabled, skipping fetch proxy");return}if(!window.fetch){te.debug("fetch is not available, skipping fetch proxy");return}if(this.isProxyInstalled){te.debug("Fetch proxy already installed");return}this.originalFetch=window.fetch.bind(window);let n=async function(...i){let a=Date.now(),[s,o]=i,l,u="GET";if(typeof s=="string"?l=s:s instanceof URL?l=s.toString():s instanceof Request?(l=s.url,u=s.method):l=String(s),o?.method&&(u=o.method),l.includes(Nt()?.api?.baseUrl||""))return vr.originalFetch(...i);if(!vr.shouldSampleRequest(r.sampleRate??0))return vr.originalFetch(...i);try{let f=await vr.originalFetch(...i),p=Date.now()-a,h=l;try{h=new URL(l,window.location.origin).pathname}catch{te.debug("Failed to parse URL:",l)}if(!vr.matchesEndpointFilters(h,r.endpointFilters))return te.debug("Request filtered out by endpoint filters:",h),f;if(!vr.matchesResponseCodeFilters(f.status,r.responseCodeFilters))return te.debug("Request filtered out by response code filters:",f.status),f;let m=!0;if(r.responseBodyFilters&&r.responseBodyFilters.length>0&&(m=await vr.matchesResponseBodyFilters(f,r.responseBodyFilters,r.maxBodySizeForFiltering),!m))return te.debug("Request filtered out by response body filters"),f;te.debug("Network request captured:",{method:u,url:h,status:f.status,statusText:f.statusText,duration:p,timestamp:a,sampled:!0});try{e({method:u,endpoint:h,status:f.status,duration:p,success:f.ok,contentType:f.headers.get("content-type"),contentLength:f.headers.get("content-length")})}catch(g){te.debug("Error in tracking callback:",g)}return f}catch(f){let p=Date.now()-a,h=l;try{h=new URL(l,window.location.origin).pathname}catch{te.debug("Failed to parse URL:",l)}if(!vr.matchesEndpointFilters(h,r.endpointFilters))throw te.debug("Failed request filtered out by endpoint filters:",h),f;te.debug("Network request failed:",{method:u,url:h,error:f.message,duration:p,timestamp:a,sampled:!0});try{e({method:u,endpoint:h,error:f.message,duration:p,success:!1})}catch(m){te.debug("Error in tracking callback:",m)}throw f}};window.fetch=n,this.isProxyInstalled=!0,te.debug("Advanced fetch proxy installed with config:",r)}static uninstall(){this.originalFetch&&this.isProxyInstalled&&(window.fetch=this.originalFetch,this.originalFetch=null,this.isProxyInstalled=!1,te.debug("Fetch proxy uninstalled"))}static isInstalled(){return this.isProxyInstalled}static normalizeNetworkCaptureConfig(e){if(!e?.dataCapture?.networkCapture)return null;let r=e.dataCapture.networkCapture;return typeof r=="boolean"?r?{enabled:!0,sampleRate:0,maxBodySizeForFiltering:10240}:null:{enabled:r.enabled??!0,sampleRate:r.sampleRate??0,endpointFilters:r.endpointFilters,responseCodeFilters:r.responseCodeFilters,responseBodyFilters:r.responseBodyFilters,maxBodySizeForFiltering:r.maxBodySizeForFiltering??10240}}static matchesEndpointFilters(e,r){return!r||r.length===0?!0:r.some(n=>{if(e===n)return!0;if(n.includes("*")){let i=n.replace(/\*/g,".*");return new RegExp(`^${i}$`).test(e)}if(n.startsWith("/")&&n.endsWith("/"))try{return new RegExp(n.slice(1,-1)).test(e)}catch{return te.debug("Invalid regex filter:",n),!1}return e.includes(n)})}static matchesResponseCodeFilters(e,r){return!r||r.length===0?!0:r.some(n=>{if(typeof n=="number")return e===n;if(typeof n=="string"){if(n.endsWith("xx")){let i=n.charAt(0);return e.toString().startsWith(i)}return e.toString()===n}return!1})}static async matchesResponseBodyFilters(e,r,n){if(!r||r.length===0)return!0;try{let i=e.clone(),a=i.headers.get("content-length");if(a&&parseInt(a)>(n??10240))return te.debug("Response body too large for filtering, skipping"),!1;let s=await i.text();return s.length>(n??10240)?(te.debug("Response body too large for filtering, skipping"),!1):r.some(o=>{if(o.startsWith("/")&&o.endsWith("/"))try{return new RegExp(o.slice(1,-1)).test(s)}catch{return te.debug("Invalid regex body filter:",o),!1}return s.includes(o)})}catch(i){return te.debug("Error checking response body filters:",i),!1}}static shouldSampleRequest(e){return e<=0?!1:e>=100?!0:Math.random()*100{Ty=` /* Base styles */ .nicebox { color: black; width: 100%; font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif; font-size: 1.2em; height: 100%; line-height: 2em; top: 0; left: 0; position: fixed; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1000; } .nicebox a, .nicebox button { color: #74716D; text-decoration: none; outline: none; } .nicebox a:hover, .nicebox a:focus { color: #c94e50; outline: none; } .nicebox__title { font-size: 1.5em; line-height: 2.5em; } .nicebox button { cursor: pointer; font-size: 1.2em; padding: 0.6em 1.2em; outline: none; border: none; color: #fff; background: #c94e50; position:relative; } .nicebox__overlay { position: absolute; z-index: 1; background: rgba(55, 58, 71, 0.9); width: 100%; height: 100%; top: 0; left: 0; opacity: 0; transition: opacity 0.3s ease-in-out; } .nicebox--open .nicebox__overlay { opacity: 1; pointer-events: auto; } .nicebox__content { width: 50%; max-width: 560px; min-width: 290px; background: #fff; padding: 2em 3em; text-align: center; position: relative; z-index: 5; opacity: 0; transform: scale(0.9); transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; } .nicebox--open .nicebox__content { opacity: 1; transform: scale(1); pointer-events: auto; } .nicebox__buttons { cursor: pointer; display: flex; gap: 10px; margin-top: 20px; justify-content: center; } /* fancy animation */ .nicebox.fancy.nicebox--open .nicebox__content, .nicebox.fancy.nicebox--close .nicebox__content { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.fancy.nicebox--open .nicebox__content { -webkit-animation-name: fancy-anim-open; animation-name: fancy-anim-open; } .nicebox.fancy.nicebox--close .nicebox__content { -webkit-animation-name: fancy-anim-close; animation-name: fancy-anim-close; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; } @-webkit-keyframes fancy-anim-open { 0% { opacity: 0; -webkit-transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 2.083333% { -webkit-transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 4.166667% { -webkit-transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 6.25% { -webkit-transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 8.333333% { -webkit-transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 10.416667% { -webkit-transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 12.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 14.583333% { -webkit-transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 16.666667% { -webkit-transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 18.75% { -webkit-transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 20.833333% { -webkit-transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 22.916667% { -webkit-transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 25% { -webkit-transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 27.083333% { -webkit-transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 29.166667% { -webkit-transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 31.25% { -webkit-transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 33.333333% { -webkit-transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 35.416667% { -webkit-transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 37.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 39.583333% { -webkit-transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 41.666667% { -webkit-transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 43.75% { -webkit-transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 45.833333% { -webkit-transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 47.916667% { -webkit-transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 50% { opacity: 1; -webkit-transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 52.083333% { -webkit-transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 54.166667% { -webkit-transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 56.25% { -webkit-transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 58.333333% { -webkit-transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 60.416667% { -webkit-transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 62.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 64.583333% { -webkit-transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 66.666667% { -webkit-transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 68.75% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 70.833333% { -webkit-transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 72.916667% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 75% { -webkit-transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 77.083333% { -webkit-transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 79.166667% { -webkit-transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 81.25% { -webkit-transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 83.333333% { -webkit-transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 85.416667% { -webkit-transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 87.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 89.583333% { -webkit-transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 91.666667% { -webkit-transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 93.75% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 95.833333% { -webkit-transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 97.916667% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 100% { opacity: 1; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } } @keyframes fancy-anim-open { 0% { opacity: 0; -webkit-transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 2.083333% { -webkit-transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 4.166667% { -webkit-transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 6.25% { -webkit-transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 8.333333% { -webkit-transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 10.416667% { -webkit-transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 12.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 14.583333% { -webkit-transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 16.666667% { -webkit-transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 18.75% { -webkit-transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 20.833333% { -webkit-transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 22.916667% { -webkit-transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 25% { -webkit-transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 27.083333% { -webkit-transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 29.166667% { -webkit-transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 31.25% { -webkit-transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 33.333333% { -webkit-transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 35.416667% { -webkit-transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 37.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 39.583333% { -webkit-transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 41.666667% { -webkit-transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 43.75% { -webkit-transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 45.833333% { -webkit-transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 47.916667% { -webkit-transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 50% { opacity: 1; -webkit-transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 52.083333% { -webkit-transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 54.166667% { -webkit-transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 56.25% { -webkit-transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 58.333333% { -webkit-transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 60.416667% { -webkit-transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 62.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 64.583333% { -webkit-transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 66.666667% { -webkit-transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 68.75% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 70.833333% { -webkit-transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 72.916667% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 75% { -webkit-transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 77.083333% { -webkit-transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 79.166667% { -webkit-transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 81.25% { -webkit-transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 83.333333% { -webkit-transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 85.416667% { -webkit-transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 87.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 89.583333% { -webkit-transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 91.666667% { -webkit-transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 93.75% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 95.833333% { -webkit-transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 97.916667% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 100% { opacity: 1; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } } @-webkit-keyframes fancy-anim-close { 0% { opacity: 1; } 100% { opacity: 0; -webkit-transform: scale3d(0.8, 0.8, 1); } } @keyframes fancy-anim-close { 0% { opacity: 1; } 100% { opacity: 0; -webkit-transform: scale3d(0.8, 0.8, 1); transform: scale3d(0.8, 0.8, 1); } } /* simple animation */ .nicebox.simple.nicebox--open .nicebox__content, .nicebox.simple.nicebox--close .nicebox__content { animation-duration: 0.4s; animation-fill-mode: forwards; } .nicebox.simple.nicebox--open .nicebox__content { animation-name: simple-anim-open; animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1); } .nicebox.simple.nicebox--close .nicebox__content { animation-name: simple-anim-close; } @keyframes simple-anim-open { 0% { opacity: 0; transform: scale3d(0, 0, 1); } 100% { opacity: 1; transform: scale3d(1, 1, 1); } } @keyframes simple-anim-close { 0% { opacity: 1; } 100% { opacity: 0; transform: scale3d(0.5, 0.5, 1); } } /* Annie animation */ .nicebox.annie .nicebox__overlay { -webkit-transition-duration: 0.3s; transition-duration: 0.3s; } .nicebox.annie.nicebox--open .nicebox__content, .nicebox.annie.nicebox--close .nicebox__content { -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.annie.nicebox--open .nicebox__content { -webkit-animation-name: annie-anim-open; animation-name: annie-anim-open; } .nicebox.annie.nicebox--close .nicebox__content { -webkit-animation-name: annie-anim-close; animation-name: annie-anim-close; } .nicebox.annie.nicebox--open h2, .nicebox.annie.nicebox--open button { -webkit-animation: annie-anim-elem 0.3s both; animation: annie-anim-elem 0.3s both; } .nicebox.annie.nicebox--open h2 { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; } .nicebox.annie.nicebox--open button { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; } @-webkit-keyframes annie-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes annie-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes annie-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } } @keyframes annie-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } } /* Inner elements animations */ @-webkit-keyframes annie-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes annie-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Cathy animation */ .nicebox.cathy .nicebox__overlay { -webkit-transition-duration: 0.4s; transition-duration: 0.4s; } .nicebox.cathy .nicebox__content { overflow: hidden; } .nicebox.cathy.nicebox--open .nicebox__content, .nicebox.cathy.nicebox--close .nicebox__content { -webkit-animation-duration: 0.4s; animation-duration: 0.4s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.cathy.nicebox--open .nicebox__content { -webkit-animation-name: cathy-anim-open; animation-name: cathy-anim-open; -webkit-animation-timing-function: cubic-bezier(0.7,0,0.3,1); animation-timing-function: cubic-bezier(0.7,0,0.3,1); } .nicebox.cathy.nicebox--close .nicebox__content { -webkit-animation-name: cathy-anim-close; animation-name: cathy-anim-close; } .nicebox.cathy.nicebox--open h2, .nicebox.cathy.nicebox--open p, .nicebox.cathy.nicebox--open input, .nicebox.cathy.nicebox--open button { -webkit-animation: cathy-anim-elem 0.4s both; animation: cathy-anim-elem 0.4s both; } .nicebox.cathy.nicebox--open h2 { -webkit-animation-delay: 0.27s; animation-delay: 0.27s; } .nicebox.cathy.nicebox--open p, .nicebox.cathy.nicebox--open input { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; } .nicebox.cathy.nicebox--open button { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } @-webkit-keyframes cathy-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, -400px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes cathy-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, -400px, 0); transform: translate3d(0, -400px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes cathy-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); } } @keyframes cathy-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); transform: translate3d(0, 100px, 0); } } /* Inner elements animations */ @-webkit-keyframes cathy-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes cathy-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Ken animation */ .nicebox.ken { -webkit-align-items: flex-start; align-items: flex-start; } .nicebox.ken.nicebox--open .nicebox__content, .nicebox.ken.nicebox--close .nicebox__content { opacity: 1; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.ken.nicebox--open .nicebox__content { -webkit-animation-name: ken-anim-open; animation-name: ken-anim-open; } .nicebox.ken.nicebox--close .nicebox__content { -webkit-animation-name: ken-anim-close; animation-name: ken-anim-close; } .nicebox.ken.nicebox--open h2, .nicebox.ken.nicebox--open button { -webkit-animation: ken-anim-elem 0.3s both; animation: anim-elem 0.3s both; } .nicebox.ken.nicebox--open h2 { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } .nicebox.ken.nicebox--open button { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; } @-webkit-keyframes ken-anim-open { 0% { -webkit-transform: translate3d(0, -100%, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); } } @keyframes ken-anim-open { 0% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes ken-anim-close { 0% { -webkit-transform: translate3d(0, 0, 0); } 100% { -webkit-transform: translate3d(0, -100%, 0); } } @keyframes ken-anim-close { 0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } } /* Inner elements animations */ @-webkit-keyframes ken-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes ken-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Alex animation */ .nicebox.alex { -webkit-align-items: flex-end; align-items: flex-end; } .nicebox.alex.nicebox--open .nicebox__content, .nicebox.alex.nicebox--close .nicebox__content { opacity: 1; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-transform-origin: 50% 100%; transform-origin: 50% 100%; -webkit-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; } .nicebox.alex.nicebox--open .nicebox__content { -webkit-animation-name: alex-anim-open; animation-name: alex-anim-open; } .nicebox.alex.nicebox--close .nicebox__content { -webkit-animation-name: alex-anim-close; animation-name: alex-anim-close; } .nicebox.alex.nicebox--open h2, .nicebox.alex.nicebox--open button { -webkit-animation: alex-anim-elem 0.3s both; animation: alex-anim-elem 0.3s both; } .nicebox.alex.nicebox--open h2 { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } .nicebox.alex.nicebox--open button { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; } @-webkit-keyframes alex-anim-open { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); } } @keyframes alex-anim-open { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); transform: perspective(1000px) rotate3d(1,0,0,90deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); transform: perspective(1000px) rotate3d(1,0,0,0deg); } } @-webkit-keyframes alex-anim-close { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); } } @keyframes alex-anim-close { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); transform: perspective(1000px) rotate3d(1,0,0,0deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); transform: perspective(1000px) rotate3d(1,0,0,90deg); } } /* Inner elements animations */ @-webkit-keyframes alex-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes alex-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); transform: translate3d(0, 100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } `});var gn,_y=D(()=>{Ry();gn=class{static injectCSS(){let e="nicebox-styles";if(!document.getElementById(e)){let r=document.createElement("style");r.id=e,r.textContent=Ty,document.head.appendChild(r)}}static cleanup(){if(this.modalContainer){this.modalContainer.classList.remove("nicebox--open"),this.modalContainer.classList.add("nicebox--close");let e=this.modalContainer.__config;setTimeout(()=>{this.modalContainer?.remove(),this.modalContainer=null,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null),e?.onDestroy?.()},300)}}static setLoading(e,r,n){let i=this.modalContainer?.querySelectorAll("button:not([disabled])");if(r){i?.forEach(s=>{s!==e&&(n?s.style.display="none":s.disabled=!0)});let a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("width","24"),a.setAttribute("height","24"),a.setAttribute("viewBox","0 0 24 24"),a.setAttribute("style",` position: absolute; top: -12px; right: -12px; `),a.innerHTML=` `,a.classList.add("loading-spinner"),e.appendChild(a)}else i?.forEach(s=>{n?s.style.display="":s.disabled=!1}),e.querySelector(".loading-spinner")?.remove()}static createModal(e){let r=document.createElement("div");r.__config=e,r.className="nicebox";let n=document.createElement("div");n.className="nicebox__overlay",r.appendChild(n);let i=document.createElement("div");i.className="nicebox__content",r.appendChild(i);let a=document.createElement("h2");if(a.textContent=e.title,a.className="nicebox__title",i.appendChild(a),e.description){let s=document.createElement("p");s.textContent=e.description,s.className="nicebox__description",i.appendChild(s)}if(e.timer){let s;e.showTimer&&(s=document.createElement("div"),s.className="nicebox__timer",s.style.position="absolute",s.style.top="10px",s.style.right="10px",i.appendChild(s));let o=()=>{let l=new Date,u=typeof e.timer=="string"?new Date(e.timer):e.timer,c=u?u.getTime()-l.getTime():0;if(c<=0){clearInterval(this.countdownInterval),e.timerExpiryLink?window.location.href=e.timerExpiryLink:this.cleanup();return}let f=Math.floor(c/1e3%60),d=Math.floor(c/(1e3*60)%60),p=Math.floor(c/(1e3*60*60)%24),h=Math.floor(c/(1e3*60*60*24));s&&(s.textContent=h>0?`${h}d ${p}h ${d}m`:p>0?`${p}h ${d}m`:`${d}m ${f}s`)};o(),this.countdownInterval=setInterval(o,1e3)}if(e.buttons?.length){let s=document.createElement("div");s.className="nicebox__buttons",e.buttons.forEach(o=>{let l=document.createElement("button");l.textContent=o.text;let u={setTitle:c=>{let f=this.modalContainer?.querySelector(".nicebox__title");f&&(f.textContent=c)},setDescription:c=>{let f=this.modalContainer?.querySelector(".nicebox__description");f&&(f.textContent=c)}};l.addEventListener("click",async()=>{if(!this.loading){this.loading=!0,this.setLoading(l,!0,o.hideOthersOnClick||!1);try{o?.click?(await o.click(u,o,l),this.cleanup()):o?.link=="close"?this.cleanup():o?.link&&(window.location.href=o?.link)}catch(c){let f=c?.message||"An unexpected error occurred. Please try again.";u.setDescription(f),console.error("Dialog error:",c)}finally{this.setLoading(l,!1,o.hideOthersOnClick||!1),this.loading=!1,l.disabled=!1,l.textContent=o?.text||l.textContent,o?.style&&Object.assign(l.style,o.style)}}}),o.style&&Object.assign(l.style,o.style),o.class&&l.classList.add(o.class),s.appendChild(l)}),i.appendChild(s)}return e.disallowOutsideClick?n.addEventListener("click",s=>s.stopPropagation()):n.addEventListener("click",this.cleanup.bind(this)),r}static fire(e){if(this.modalContainer)return;this.injectCSS(),this.cleanup();let r=this.createModal(e);e.animationClass&&r.classList.add(e.animationClass),document.body.appendChild(r),setTimeout(()=>{r.classList.add("nicebox--open")},0),this.modalContainer=r}};gn.modalContainer=null,gn.loading=!1,gn.countdownInterval=null});var Ca,By=D(()=>{Ca=class{constructor(e){this.eventCallbacks=new Map;this.data=e}getState(){return this.data.state}isStarted(){return this.getState()!=="not started"}isCompleted(){return this.getState()==="completed"}_executeCallbacks(e){let r=this.eventCallbacks.get(e);if(r)for(let n of r)n(this)}setState(e,r){this.data.state=e,r&&(this.data.metadata=r),this._executeCallbacks("update")}start(e){return this.setState("started",e),this.data.start_time=new Date().getTime(),this.data.end_time=null,this}complete(e){return this.setState("completed",e),this.data.end_time=new Date().getTime(),this}clear(e){return this.setState("cleared",e),this.data.start_time=null,this.data.end_time=null,this._executeCallbacks("update"),this}on(e,r){let n=this.eventCallbacks.get(e)||[];n.push(r),this.eventCallbacks.set(e,n)}}});var yn,Ny=D(()=>{By();yn=class{constructor(e){this.eventCallbacks=new Map;this.data=e,this.steps=new Map(e?.steps?.map(r=>[r.step_id,new Ca(r)]))}static async get(e,r){return new yn({flow_id:e,instance_id:r,steps:[],state:"empty"})}getData(){return this.data}getState(){if(this.data?.state=="force completed")return this.data.state;if(!this.steps||this.steps.size==0)return"empty";let e=Array.from(this.steps.values()).some(n=>n.getState()==="started"),r=Array.from(this.steps.values()).every(n=>n.getState()==="completed");return e?"started":r?"completed":"not started"}isStarted(){return this.getState()!=="not started"}isCompleted(){let e=this.getState();return e==="completed"||e==="force completed"}step(e){let r=this.steps.get(e);if(!r){let n=new Ca({step_id:e,state:"not started"});this.steps.set(e,n);for(let[i,a]of this.eventCallbacks.entries())for(let s of a)n.on(i,s);r=n}return r}async complete(){try{this.setState("force completed")}catch(e){console.error("Error completing flow:",e)}}setState(e){this.data.state=e}clear(e=!1){if(this.setState("cleared"),e)for(let[r,n]of this.steps.entries())n.clear();return this}on(e,r){let n=this.eventCallbacks.get(e)||[];n.push(r),this.eventCallbacks.set(e,n);for(let[i,a]of this.steps.entries())a.on(e,r)}}});var cf,T2,Nr,ky=D(()=>{Bu();In();bi();Lp();xl();wl();nl();Iy();Ay();_y();Ny();new URLSearchParams(window.location.search).has("hpdebug")&&console.log(`hp${Ua}`);cf=class extends ji{constructor(){super(...arguments);this.config=null;this.honey=null;this.id=null;this.sessionId=null;this.deviceId=null;this.q=[];this.didInit=!1;this.callbacks={};this.geofenceResults=null;this.intervalId=null;this.challengeInProgress=!1;this._ci=!1}setup(r){this.config=r}async _setup(r){v0(r);try{r?.dataCapture?.networkCapture?.enabled&&mn.install(n=>{this.track("__nr",n).catch(i=>{te.debug("Failed to track network request:",i)})})}catch(n){te.error("Error setting up network capture:",n)}try{uf.maybeRecord(r)}catch{te.debug("Error recording session")}te.setDebugMode(r?.debug===!0);try{this.didInit=!0;let n=window.navigator,i=this.maybeRescreen.bind(this);"connection"in n&&(n.connection||n?.mozConnection||n?.webkitConnection).addEventListener("change",()=>{te.debug("Connection changed"),i()}),r?.dataCapture?.consoleListener&&this.checkConsole()}catch(n){te.error("Could not setup Honeypot"),te.error(n)}}bubble(r){gn.fire(r)}setSessionId(r){this.sessionId=r}setDeviceId(r){this.deviceId=r}async flow(r,n){try{let i=await yn.get(r,n);return i.on("update",async a=>{i.data.state=i.getState(),await this.track(`${r} - ${a?.data?.step_id}`)}),i}catch(i){return console.log("Error fetching flow:",i.message),Promise.reject(i)}}async showChallenge(r){return this.challengeInProgress?Promise.reject("Challenge already in progress"):r?.allow?(this.challengeInProgress=!0,new Promise((n,i)=>{this.bubble({title:r?.title||"Error",description:r?.description||"You appear to be accessing this website from an unsupported region. To proceed, you'll need to share some more information about your location.",animationClass:r?.animation||"simple",disallowOutsideClick:!0,buttons:[{text:"Share location using browser",hideOthersOnClick:!0,style:{backgroundColor:r?.colors?.button||"white",color:r?.colors?.buttonText||"white",fontSize:"16px"},click:async(a,s,o)=>{try{a.setTitle("Requesting location..."),a.setDescription("Please grant access when prompted");let l=()=>new Promise((h,m)=>{navigator.geolocation.getCurrentPosition(h,async g=>{let b;switch(g.code){case g.PERMISSION_DENIED:b="You denied the request for Geolocation.";break;case g.POSITION_UNAVAILABLE:b="Location information is unavailable.";break;case g.TIMEOUT:b="The request to get your location timed out.";break;default:b="An unknown error occurred while fetching location.";break}let I=await this.track("__confirm",{error:g.code});h(I)})}),u=()=>new Promise((h,m)=>{let g=document.createElement("iframe");if(g.setAttribute("sandbox","allow-same-origin"),g.classList.add("hidden"),document.body.appendChild(g),!g.contentWindow){g.remove(),m(new Error("Iframe contentWindow is not available."));return}g.contentWindow.navigator.geolocation.getCurrentPosition(b=>{g.remove(),h(b)},async b=>{let I=await this.track("__confirm",{error:b.code});g.remove(),h(I)})}),[c,f]=await Promise.allSettled([l(),u()]);if(c.status==="rejected"&&f.status==="rejected")throw new Error("Failed to retrieve geolocation in both contexts.");a.setTitle("Confirming location..."),a.setDescription("Almost done");let d={p1:c.status==="fulfilled"?{latitude:c.value.coords.latitude,longitude:c.value.coords.longitude,accuracy:c.value.coords.accuracy,altitude:c.value.coords.altitude,altitudeAccuracy:c.value.coords.altitudeAccuracy,heading:c.value.coords.heading,speed:c.value.coords.speed}:null,p2:f.status==="fulfilled"?{latitude:f.value.coords.latitude,longitude:f.value.coords.longitude,accuracy:f.value.coords.accuracy,altitude:f.value.coords.altitude,altitudeAccuracy:f.value.coords.altitudeAccuracy,heading:f.value.coords.heading,speed:f.value.coords.speed}:null},p=await this.track("__confirm",d);p?.geofenced?(this.geofence(),n(p)):(await new Promise(h=>{setTimeout(()=>{a.setTitle("Success!"),a.setDescription("Your request was processed successfully."),s.text="Done",s.style={backgroundColor:"green"},h("ok")},2e3)}),n(p))}catch(l){a.setTitle("Error"),a.setDescription("An unexpected error occurred."),s.text="Redirecting",s.style={backgroundColor:"orange"},setTimeout(()=>{this.geofence(),i(l)},1e3)}}}]})})):await this.track("__confirm")}async checkConsole(){try{let r=(...i)=>{try{this._ci=!0,this.challengeInProgress&&(this.track("__confirm",{error:9}),this.geofence())}catch(a){te.error("Error in notify function:",a)}},n="_ci";console.debug(Object.defineProperties(new Error,{message:{get(){return r(n),""}},toString:{value(){return new Error().stack?.includes("toString@")&&r(n),""}}}))}catch(r){te.error("Error in listen method:",r)}}async identify(r,n={},i="account"){try{xi.setIdentity(r,n,i)}catch{}}async track(r,n={}){let i=Nt()?.api?.routes?.ping;if(!i)return Promise.reject("Internal honeypot error: no endpoint is configured");try{uf.setEvent(r)}catch{te.debug("Error setting event")}try{let s={event:{time:String(Date.now()),type:r,properties:n}};te.info("Payload"),te.info(JSON.stringify(s));let o=await zt.post(i,"beacon",s,this._ci?["_ci"]:void 0,this.sessionId,this.deviceId);return this.honey=o?.honey,this.geofenceResults=o?.geofenceResults||null,this.processGeofenceResults(),this.get()}catch(a){return Promise.reject(a)}}async get(r){return r?await this.track("__empty"):this.honey?Promise.resolve(this.honey):Promise.reject("Honey not found")}async processPassport(){try{let r=Nt()?.api?.routes?.ping;return!r||!new URLSearchParams(window.location.search).has("hp-passport")?void 0:await new Promise((n,i)=>{this.bubble({title:"Check Passport",description:"Request a temporary passport",animationClass:"simple",disallowOutsideClick:!0,onDestroy:()=>n(!0),buttons:[{text:"Go",click:async(a,s,o)=>{try{let l=window.prompt("Enter the code you received"),c={event:{time:String(Date.now()),type:"__passport",properties:{code:l}}};if(a.setTitle("Verifying..."),a.setDescription("Please wait"),(await zt.post(r,"beacon",c))?.status==="valid"){a.setTitle("Success!"),a.setDescription("Passport issued successfully");let d=new URL(window.location.href);d.searchParams.delete("hp-passport"),window.location.href=d.toString()}else{let d=await this.track("__confirm",{error:17});i(d)}}catch(l){let u=await this.track("__confirm",{error:17});i(l)}}}]})})}catch{}}async geoCaptcha(){try{let r=Nt()?.geoCaptcha;return r&&r?.title?await this.showChallenge(r):Promise.reject("GeoCaptcha not configured")}catch(r){return Promise.reject(r)}}processGeofenceResults(){if(!this.geofenceResults)return;let r=this.geofenceResults;if(r?.redirectUrl&&r?.challenge?.allow||new URLSearchParams(window.location.search).has("hpdebug-challenge")){let n=this.geofenceResults?.challenge||{};this.showChallenge(n)}else r?.redirectUrl&&r?.autoRedirect&&this.geofence();r?.rescreenEnabled&&r?.rescreenFrequencySeconds&&r.rescreenFrequencySeconds>=1?this.startRescreening(r.rescreenFrequencySeconds):this.stopRescreening()}async maybeRescreen(){return this.geofenceResults?.rescreenEnabled?await this.track("__rescreen"):Promise.resolve("skipped")}startRescreening(r){let n=this.maybeRescreen.bind(this);this.intervalId||(this.intervalId=setInterval(async()=>{let i=await n();te.info("Schedule results"),te.info(JSON.stringify(i))},r*1e3))}stopRescreening(){try{this.intervalId!==null&&(clearInterval(this.intervalId),this.intervalId=null)}catch{}}geofence(){try{let r=this.geofenceResults?.redirectUrl;r&&kt.isValidUrlOrPath(r)&&!kt.onRedirectPage(r)&&window.location.pathname!="/geo-unavailable"&&(window.location.href=r+"?georef="+this.geofenceResults?.ref)}catch{}}},T2=new cf,Nr=T2});var R2=Q((Pk,Ly)=>{ky();window&&(window.honeypot&&(Nr.id=window.honeypot.id||null,Nr.config=window.honeypot.config||{},Nr.q=window.honeypot.q||[],Nr.fq=window.honeypot.fq||[],Nr.callbacks=window.honeypot.callbacks||{},Nr.geofenced=window.honeypot.geofenced||!1),window.honeypot=Nr);Ly.exports={honeypot:Nr}});R2();})(); (async () => { await honeypot._setup({"api":{"baseUrl":"https://gently-d6dl5.quill.run","routes":{"ping":"/58sj3ae84cd6","sessionReplay":null}},"dataCapture":{"consoleListener":true,"networkCapture":{},"sessionReplay":{"enabled":false,"id":"5b644070-22d6-4773-82cb-003d1c248d4d","endpoint":"https://gently-d6dl5.quill.run/"}},"pk":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkZZsv5bbSPByg4a3vE31\nnMEjdy0Pbt6Z4txa4lCgHxBBEk6QptrqTA3PBpJrrUcxpQ9xLOhRAYtWzanWf5OF\n1OxkdjCX2o7yOtVN0FfBj7OfVBH7zLztUShvduaKbqH6xNuS8fB7f8fImfzRBAv4\nZFouKETsjof+cw4VoQG0KxEbuXFkmAB8s1Rfc7nKR/C3KLEOgKrz8kOP6Lk1hmNt\nVaERLRLehLZI0qVesYSlotHeLQI6I86ef0Q7wRX3iXe1cUphR1aWKUwUcRUfeuqL\nXUVBi0Rt7PuE3c0m4nBVHxXXxaLeZV744QCvZ47HqoRJSYg+euaeXIRho7WjQRI2\nhQIDAQAB\n-----END PUBLIC KEY-----\n","geoCaptcha":{"animation":"simple","title":"Please prove your location","description":"","expiry_minutes":100,"colors":{"button":"red"},"enabled":true,"rollout_percent":100,"untrusted_mode":false,"trust_mode":false,"allow":true}}); honeypot.honey = {"org_id":"a7859801-e727-4019-aa01-d56110dd282a","honeypot_name":"gently-d6dl5","event_id":"e081a578-5601-4512-ab99-b339c1838914","events":["Page View"],"event_name":"Page View","event_time":"2025-06-15T10:04:15.480Z","ip_address":"216.73.216.140","ip_address_connecting":"216.73.216.140","ip_address_forwarded_for":null,"asn":16509,"as_organization":"Anthropic, PBC","verified_bot_category":null,"unverified_bot_category":null,"city_name":"Columbus","country_name":"United States","country_code":"US","continent":"NA","region_name":"Ohio","region_code":"OH","latitude":39.96118,"longitude":-82.99879,"timezone":"America/New_York","identity_type":"unknown","identities":[],"handprint_id":"2263de66-b234-445e-bce6-5d637396e67b","device_id":"9b6926f6-f250-4961-970f-dbad6ae31fb3","session_id":"539c14f4-8676-4724-9810-53f822cfcb10","ref":"5b644070-22d6-4773-82cb-003d1c248d4d","referer":null,"ua":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","browser_name":"WebKit","browser_version":"537.36","browser_major":"537","engine_name":"WebKit","engine_version":"537.36","os_name":null,"os_version":null,"device_vendor":null,"device_model":null,"device_type":null,"cpu_architecture":null,"timezone_browser":"America/New_York","current_tags":["hosting_provider","e56133cf-1c28-447e-85ce-cbe12bfc6320"],"session_tags":["hosting_provider","e56133cf-1c28-447e-85ce-cbe12bfc6320"],"last_event_name":null,"last_event_date":"2025-06-15T10:04:15.480Z","seconds_since_last_event":0,"session_start_date":"2025-06-15T10:04:15.480Z","seconds_since_session_start":0,"session_total_event_count":1,"last_identity":{},"session_ips":["216.73.216.140"],"session_ip_count":1,"last_ip_address":"","last_connection_type":null,"last_asn":null,"last_as_organization":null,"last_city_name":null,"last_country_name":null,"last_country_code":null,"last_region_name":null,"last_timezone_browser":null,"last_timezone_ip":null,"tag_metadata":{"hosting_provider":{"connecting_ip":{"connection_type":1,"service":"","geo":{"country":"US","country_name":"United States","continent":"NA","continent_name":"North America"},"abuse":{}},"forwarded_ip":{},"_schema":"ip_v001"}},"connection_type":1,"geofence_vpn_rescreen_frequency_seconds":2,"geofence_triggered":false,"redirect_url":"","redirect_auto":false,"geofence_test_only":false,"geo_challenge_status":0,"geofence_event_count":0,"behaviors":{"count_listings_5m":null,"unique_emails_1d":{"timestamp":"2025-06-15T10:04:15.480Z","remaining_window_seconds":86400},"sequence_login_create_listing":{"index":-1,"completed":0,"start_time":null,"percent_complete":0,"completion_times":[],"completion_time_stats":{"avg":null,"max":null,"min":null,"sum":0,"last":null},"intermediary_events":0,"unique_intermediate_events":[],"event_ids":[],"timestamp":"2025-06-15T10:04:15.480Z","remaining_window_seconds":31536000},"unique_identities_by_handprint_365d":{"timestamp":"2025-06-15T10:04:15.480Z","remaining_window_seconds":31536000}},"geofenced":false}; honeypot.geofenceResults = {"autoRedirect":false,"redirectUrl":null,"ref":null,"rescreenFrequencySeconds":-1,"challenge":{"animation":"simple","title":"Please prove your location","description":"","expiry_minutes":100,"colors":{"button":"red"},"enabled":true,"rollout_percent":100,"untrusted_mode":false,"trust_mode":false,"allow":false}}; await honeypot.processPassport(); honeypot.processGeofenceResults(); })();