>8*m-d&255;if(h.charCodeAt(0)&b)throw new Error("Bits beyond keysize not zero as expected.");var I=r.generate(C,p),S="";for(f=0;f{var j=te();Ir();Ht();oa();Xt();Bc();Tr();Mr();hi();ca();ye();var g=j.asn1,P=Oc.exports=j.pki=j.pki||{},me=P.oids,He={};He.CN=me.commonName;He.commonName="CN";He.C=me.countryName;He.countryName="C";He.L=me.localityName;He.localityName="L";He.ST=me.stateOrProvinceName;He.stateOrProvinceName="ST";He.O=me.organizationName;He.organizationName="O";He.OU=me.organizationalUnitName;He.organizationalUnitName="OU";He.E=me.emailAddress;He.emailAddress="E";var Lc=j.pki.rsa.publicKeyValidator,my={name:"Certificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Lc,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},gy={name:"rsapss",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},yy={name:"CertificationRequestInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Lc,{name:"CertificationRequestInfo.attributes",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:g.Class.UNIVERSAL,type:g.Type.SET,constructed:!0}]}]}]},vy={name:"CertificationRequest",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[yy,{name:"CertificationRequest.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};P.RDNAttributesAsArray=function(e,t){for(var r=[],n,a,i,s=0;s2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(s.validity.notBefore=u[0],s.validity.notAfter=u[1],s.tbsCertificate=r.tbsCertificate,t){s.md=gi({signatureOid:s.signatureOid,type:"certificate"});var l=g.toDer(s.tbsCertificate);s.md.update(l.getBytes())}var c=j.md.sha1.create(),f=g.toDer(r.certIssuer);c.update(f.getBytes()),s.issuer.getField=function(p){return _r(s.issuer,p)},s.issuer.addField=function(p){Lt([p]),s.issuer.attributes.push(p)},s.issuer.attributes=P.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(s.issuer.uniqueId=r.certIssuerUniqueId),s.issuer.hash=c.digest().toHex();var d=j.md.sha1.create(),m=g.toDer(r.certSubject);return d.update(m.getBytes()),s.subject.getField=function(p){return _r(s.subject,p)},s.subject.addField=function(p){Lt([p]),s.subject.attributes.push(p)},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(e){for(var t=[],r=0;r1&&(n=r.value.charCodeAt(1),a=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(n&128)===128,t.nonRepudiation=(n&64)===64,t.keyEncipherment=(n&32)===32,t.dataEncipherment=(n&16)===16,t.keyAgreement=(n&8)===8,t.keyCertSign=(n&4)===4,t.cRLSign=(n&2)===2,t.encipherOnly=(n&1)===1,t.decipherOnly=(a&128)===128}else if(t.name==="basicConstraints"){var r=g.fromDer(t.value);r.value.length>0&&r.value[0].type===g.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var i=null;r.value.length>0&&r.value[0].type===g.Type.INTEGER?i=r.value[0].value:r.value.length>1&&(i=r.value[1].value),i!==null&&(t.pathLenConstraint=g.derToInteger(i))}else if(t.name==="extKeyUsage")for(var r=g.fromDer(t.value),s=0;s1&&(n=r.value.charCodeAt(1)),t.client=(n&128)===128,t.server=(n&64)===64,t.email=(n&32)===32,t.objsign=(n&16)===16,t.reserved=(n&8)===8,t.sslCA=(n&4)===4,t.emailCA=(n&2)===2,t.objCA=(n&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var u,r=g.fromDer(t.value),l=0;l"u"&&(t.type&&t.type in P.oids?t.name=P.oids[t.type]:t.shortName&&t.shortName in He&&(t.name=P.oids[He[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in P.oids)t.type=P.oids[t.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=t,n}if(typeof t.shortName>"u"&&t.name&&t.name in He&&(t.shortName=He[t.name]),t.type===me.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=g.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var a=0;a"u"){var n=new Error("Attribute value not specified.");throw n.attribute=t,n}}}function Pc(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in P.oids&&(e.name=P.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in P.oids)e.id=P.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var n=0,a=0,i=0;e.digitalSignature&&(a|=128,n=7),e.nonRepudiation&&(a|=64,n=6),e.keyEncipherment&&(a|=32,n=5),e.dataEncipherment&&(a|=16,n=4),e.keyAgreement&&(a|=8,n=3),e.keyCertSign&&(a|=4,n=2),e.cRLSign&&(a|=2,n=1),e.encipherOnly&&(a|=1,n=0),e.decipherOnly&&(i|=128,n=7);var s=String.fromCharCode(n);i!==0?s+=String.fromCharCode(a)+String.fromCharCode(i):a!==0&&(s+=String.fromCharCode(a)),e.value=g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,s)}else if(e.name==="basicConstraints")e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(g.create(g.Class.UNIVERSAL,g.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var u in e)e[u]===!0&&(u in me?o.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(me[u]).getBytes())):u.indexOf(".")!==-1&&o.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(u).getBytes())))}else if(e.name==="nsCertType"){var n=0,a=0;e.client&&(a|=128,n=7),e.server&&(a|=64,n=6),e.email&&(a|=32,n=5),e.objsign&&(a|=16,n=4),e.reserved&&(a|=8,n=3),e.sslCA&&(a|=4,n=2),e.emailCA&&(a|=2,n=1),e.objCA&&(a|=1,n=0);var s=String.fromCharCode(n);a!==0&&(s+=String.fromCharCode(a)),e.value=g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,s)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);for(var l,c=0;c128)throw new Error('Invalid "nsComment" content.');e.value=g.create(g.Class.UNIVERSAL,g.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var f=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=f.toHex(),e.value=g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,f.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var d=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var m=[g.create(g.Class.CONTEXT_SPECIFIC,4,!0,[vn(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,m))}if(e.serialNumber){var p=j.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!1,p))}}else if(e.name==="cRLDistributionPoints"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);for(var o=e.value.value,h=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),C=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]),l,c=0;c"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}function So(e,t){switch(e){case me["RSASSA-PSS"]:var r=[];return t.hash.algorithmOid!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.mgf.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.mgf.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(t.saltLength).getBytes())])),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,r);default:return g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")}}function Cy(e){var t=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,n=0;n=by&&e0&&n.value.push(P.certificateExtensionsToAsn1(e.extensions)),n};P.getCertificationRequestInfo=function(e){var t=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.version).getBytes()),vn(e.subject),P.publicKeyToAsn1(e.publicKey),Cy(e)]);return t};P.distinguishedNameToAsn1=function(e){return vn(e)};P.certificateToAsn1=function(e){var t=e.tbsCertificate||P.getTBSCertificate(e);return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[t,g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.signatureOid).getBytes()),So(e.signatureOid,e.signatureParameters)]),g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])};P.certificateExtensionsToAsn1=function(e){var t=g.create(g.Class.CONTEXT_SPECIFIC,3,!0,[]),r=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n"u"&&(a=new Date);var i=!0,s=null,o=0;do{var u=t.shift(),l=null,c=!1;if(a&&(au.validity.notAfter)&&(s={message:"Certificate is not valid yet or has expired.",error:P.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:a}),s===null){if(l=t[0]||e.getIssuer(u),l===null&&u.isIssuer(u)&&(c=!0,l=u),l){var f=l;j.util.isArray(f)||(f=[f]);for(var d=!1;!d&&f.length>0;){l=f.shift();try{d=l.verify(u)}catch{}}d||(s={message:"Certificate signature is invalid.",error:P.certificateError.bad_certificate})}s===null&&(!l||c)&&!e.hasCertificate(u)&&(s={message:"Certificate is not trusted.",error:P.certificateError.unknown_ca})}if(s===null&&l&&!u.isIssuer(l)&&(s={message:"Certificate issuer is invalid.",error:P.certificateError.bad_certificate}),s===null)for(var m={keyUsage:!0,basicConstraints:!0},p=0;s===null&&pC.pathLenConstraint&&(s={message:"Certificate basicConstraints pathLenConstraint violated.",error:P.certificateError.bad_certificate})}}var S=s===null?!0:s.error,_=r.verify?r.verify(S,o,n):S;if(_===!0)s=null;else throw S===!0&&(s={message:"The application rejected the certificate.",error:P.certificateError.bad_certificate}),(_||_===0)&&(typeof _=="object"&&!j.util.isArray(_)?(_.message&&(s.message=_.message),_.error&&(s.error=_.error)):typeof _=="string"&&(s.error=_)),s;i=!1,++o}while(t.length>0);return!0}});var wo=Q((kE,Mc)=>{var _e=te();Ht();fn();Tr();bo();Co();Bt();ca();mn();ye();yi();var x=_e.asn1,le=_e.pki,da=Mc.exports=_e.pkcs12=_e.pkcs12||{},Uc={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"}]},Sy={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"},Uc,{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"}]}]},Ey={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"}]},wy={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"}]},Iy={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 fa(e,t,r,n){for(var a=[],i=0;i=0&&a.push(o)}}return a}da.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var n={},a=[];if(!x.validate(e,Sy,n,a)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var s={version:n.version.charCodeAt(0),safeContents:[],getBags:function(C){var b={},I;return"localKeyId"in C?I=C.localKeyId:"localKeyIdHex"in C&&(I=_e.util.hexToBytes(C.localKeyIdHex)),I===void 0&&!("friendlyName"in C)&&"bagType"in C&&(b[C.bagType]=fa(s.safeContents,null,null,C.bagType)),I!==void 0&&(b.localKeyId=fa(s.safeContents,"localKeyId",I,C.bagType)),"friendlyName"in C&&(b.friendlyName=fa(s.safeContents,"friendlyName",C.friendlyName,C.bagType)),b},getBagsByFriendlyName:function(C,b){return fa(s.safeContents,"friendlyName",C,b)},getBagsByLocalKeyId:function(C,b){return fa(s.safeContents,"localKeyId",C,b)}};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(x.derToOid(n.contentType)!==le.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=x.derToOid(n.contentType),i}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=Eo(o),n.mac){var u=null,l=0,c=x.derToOid(n.macAlgorithm);switch(c){case le.oids.sha1:u=_e.md.sha1.create(),l=20;break;case le.oids.sha256:u=_e.md.sha256.create(),l=32;break;case le.oids.sha384:u=_e.md.sha384.create(),l=48;break;case le.oids.sha512:u=_e.md.sha512.create(),l=64;break;case le.oids.md5:u=_e.md.md5.create(),l=16;break}if(u===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var f=new _e.util.ByteBuffer(n.macSalt),d="macIterations"in n?parseInt(_e.util.bytesToHex(n.macIterations),16):1,m=da.generateKey(r,f,3,d,l,u),p=_e.hmac.create();p.start(u,m),p.update(o.value);var h=p.getMac();if(h.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return Ty(s,o.value,t,r),s};function Eo(e){if(e.composed||e.constructed){for(var t=_e.util.createBuffer(),r=0;r0&&(i=x.create(x.Class.UNIVERSAL,x.Type.SET,!0,u));var l=[],c=[];t!==null&&(_e.util.isArray(t)?c=t:c=[t]);for(var f=[],d=0;d0){var C=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(le.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(C).getBytes())])]);l.push(b)}var I=null;if(e!==null){var S=le.wrapRsaPrivateKey(le.privateKeyToAsn1(e));r===null?I=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.keyBag).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[S]),i]):I=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.pkcs8ShroudedKeyBag).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[le.encryptPrivateKeyInfo(S,r,n)]),i]);var _=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(le.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(_).getBytes())])]);l.push(B)}var N=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,l),G;if(n.useMac){var o=_e.md.sha1.create(),W=new _e.util.ByteBuffer(_e.random.getBytes(n.saltSize)),re=n.count,e=da.generateKey(r,W,3,re,20),ee=_e.hmac.create();ee.start(o,e),ee.update(x.toDer(N).getBytes());var ne=ee.getMac();G=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(le.oids.sha1).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,ne.getBytes())]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,W.getBytes()),x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(re).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(le.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(N).getBytes())])]),G])};da.generateKey=_e.pbe.generatePkcs12Key});var To=Q((LE,Vc)=>{var Br=te();Ht();Tr();Co();Mr();oi();wo();hi();ca();ye();yi();var Io=Br.asn1,Cn=Vc.exports=Br.pki=Br.pki||{};Cn.pemToDer=function(e){var t=Br.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Br.util.createBuffer(t.body)};Cn.privateKeyFromPem=function(e){var t=Br.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.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=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=Io.fromDer(t.body);return Cn.privateKeyFromAsn1(n)};Cn.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:Io.toDer(Cn.privateKeyToAsn1(e)).getBytes()};return Br.pem.encode(r,{maxline:t})};Cn.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:Io.toDer(e).getBytes()};return Br.pem.encode(r,{maxline:t})}});var ko=Q((DE,jc)=>{var L=te();Ht();fn();ri();Mr();To();Bt();mn();ye();var xi=function(e,t,r,n){var a=L.util.createBuffer(),i=e.length>>1,s=i+(e.length&1),o=e.substr(0,s),u=e.substr(i,s),l=L.util.createBuffer(),c=L.hmac.create();r=t+r;var f=Math.ceil(n/16),d=Math.ceil(n/20);c.start("MD5",o);var m=L.util.createBuffer();l.putBytes(r);for(var p=0;p0&&(v.queue(e,v.createAlert(e,{level:v.Alert.Level.warning,description:v.Alert.Description.no_renegotiation})),v.flush(e)),e.process()};v.parseHelloMessage=function(e,t,r){var n=null,a=e.entity===v.ConnectionEnd.client;if(r<38)e.error(e,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});else{var i=t.fragment,s=i.length();if(n={version:{major:i.getByte(),minor:i.getByte()},random:L.util.createBuffer(i.getBytes(32)),session_id:Tt(i,1),extensions:[]},a?(n.cipher_suite=i.getBytes(2),n.compression_method=i.getByte()):(n.cipher_suites=Tt(i,2),n.compression_methods=Tt(i,1)),s=r-(s-i.length()),s>0){for(var o=Tt(i,2);o.length()>0;)n.extensions.push({type:[o.getByte(),o.getByte()],data:Tt(o,2)});if(!a)for(var u=0;u0;){var f=c.getByte();if(f!==0)break;e.session.extensions.server_name.serverNameList.push(Tt(c,2).getBytes())}}}if(e.session.version&&(n.version.major!==e.session.version.major||n.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.protocol_version}});if(a)e.session.cipherSuite=v.getCipherSuite(n.cipher_suite);else for(var d=L.util.createBuffer(n.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=v.getCipherSuite(d.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.handshake_failure},cipherSuite:L.util.bytesToHex(n.cipher_suite)});a?e.session.compressionMethod=n.compression_method:e.session.compressionMethod=v.CompressionMethod.none}return n};v.createSecurityParameters=function(e,t){var r=e.entity===v.ConnectionEnd.client,n=t.random.bytes(),a=r?e.session.sp.client_random:n,i=r?n:v.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:v.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:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:a,server_random:i}};v.handleServerHello=function(e,t,r){var n=v.parseHelloMessage(e,t,r);if(!e.fail){if(n.version.minor<=e.version.minor)e.version.minor=n.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.protocol_version}});e.session.version=e.version;var a=n.session_id.bytes();a.length>0&&a===e.session.id?(e.expect=Hc,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=Dy,e.session.resuming=!1,v.createSecurityParameters(e,n)),e.session.id=a,e.process()}};v.handleClientHello=function(e,t,r){var n=v.parseHelloMessage(e,t,r);if(!e.fail){var a=n.session_id.bytes(),i=null;if(e.sessionCache&&(i=e.sessionCache.getSession(a),i===null?a="":(i.version.major!==n.version.major||i.version.minor>n.version.minor)&&(i=null,a="")),a.length===0&&(a=L.random.getBytes(32)),e.session.id=a,e.session.clientHelloVersion=n.version,e.session.sp={},i)e.version=e.session.version=i.version,e.session.sp=i.sp;else{for(var s,o=1;o0;)i=Tt(a.certificate_list,3),s=L.asn1.fromDer(i),i=L.pki.certificateFromAsn1(s,!0),o.push(i)}catch(l){return e.error(e,{message:"Could not parse certificate list.",cause:l,send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.bad_certificate}})}var u=e.entity===v.ConnectionEnd.client;(u||e.verifyClient===!0)&&o.length===0?e.error(e,{message:u?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}}):o.length===0?e.expect=u?Fc:_o:(u?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],v.verifyCertificateChain(e,o)&&(e.expect=u?Fc:_o)),e.process()};v.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.unsupported_certificate}});e.expect=Py,e.process()};v.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.unsupported_certificate}});var n=t.fragment,a={enc_pre_master_secret:Tt(n,2).getBytes()},i=null;if(e.getPrivateKey)try{i=e.getPrivateKey(e,e.session.serverCertificate),i=L.pki.privateKeyFromPem(i)}catch(u){e.error(e,{message:"Could not get private key.",cause:u,send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}})}if(i===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}});try{var s=e.session.sp;s.pre_master_secret=i.decrypt(a.enc_pre_master_secret);var o=e.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)}e.expect=Bo,e.session.clientCertificate!==null&&(e.expect=Hy),e.process()};v.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});var n=t.fragment,a={certificate_types:Tt(n,1),certificate_authorities:Tt(n,2)};e.session.certificateRequest=a,e.expect=Oy,e.process()};v.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});var n=t.fragment;n.read-=4;var a=n.bytes();n.read+=4;var i={signature:Tt(n,2).getBytes()},s=L.util.createBuffer();s.putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest()),s=s.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(s,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(a),e.session.sha1.update(a)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.handshake_failure}})}e.expect=Bo,e.process()};v.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.record_overflow}});if(e.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.insufficient_security}},a=0,i=e.verify(e,n.alert.description,a,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!L.util.isArray(i)?(i.message&&(n.message=i.message),i.alert&&(n.alert.description=i.alert)):typeof i=="number"&&(n.alert.description=i)),e.error(e,n)}e.session.certificateRequest!==null&&(t=v.createRecord(e,{type:v.ContentType.handshake,data:v.createCertificate(e)}),v.queue(e,t)),t=v.createRecord(e,{type:v.ContentType.handshake,data:v.createClientKeyExchange(e)}),v.queue(e,t),e.expect=Vy;var s=function(o,u){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&v.queue(o,v.createRecord(o,{type:v.ContentType.handshake,data:v.createCertificateVerify(o,u)})),v.queue(o,v.createRecord(o,{type:v.ContentType.change_cipher_spec,data:v.createChangeCipherSpec()})),o.state.pending=v.createConnectionState(o),o.state.current.write=o.state.pending.write,v.queue(o,v.createRecord(o,{type:v.ContentType.handshake,data:v.createFinished(o)})),o.expect=Hc,v.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return s(e,null);v.getClientSignature(e,s)};v.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});var r=e.entity===v.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=v.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?Uy:Gy,e.process()};v.handleFinished=function(e,t,r){var n=t.fragment;n.read-=4;var a=n.bytes();n.read+=4;var i=t.fragment.getBytes();n=L.util.createBuffer(),n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest());var s=e.entity===v.ConnectionEnd.client,o=s?"server finished":"client finished",u=e.session.sp,l=12,c=xi;if(n=c(u.master_secret,o,n.getBytes(),l),n.getBytes()!==i)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.decrypt_error}});e.session.md5.update(a),e.session.sha1.update(a),(e.session.resuming&&s||!e.session.resuming&&!s)&&(v.queue(e,v.createRecord(e,{type:v.ContentType.change_cipher_spec,data:v.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,v.queue(e,v.createRecord(e,{type:v.ContentType.handshake,data:v.createFinished(e)}))),e.expect=s?My:qy,e.handshaking=!1,++e.handshakes,e.peerCertificate=s?e.session.serverCertificate:e.session.clientCertificate,v.flush(e),e.isConnected=!0,e.connected(e),e.process()};v.handleAlert=function(e,t){var r=t.fragment,n={level:r.getByte(),description:r.getByte()},a;switch(n.description){case v.Alert.Description.close_notify:a="Connection closed.";break;case v.Alert.Description.unexpected_message:a="Unexpected message.";break;case v.Alert.Description.bad_record_mac:a="Bad record MAC.";break;case v.Alert.Description.decryption_failed:a="Decryption failed.";break;case v.Alert.Description.record_overflow:a="Record overflow.";break;case v.Alert.Description.decompression_failure:a="Decompression failed.";break;case v.Alert.Description.handshake_failure:a="Handshake failure.";break;case v.Alert.Description.bad_certificate:a="Bad certificate.";break;case v.Alert.Description.unsupported_certificate:a="Unsupported certificate.";break;case v.Alert.Description.certificate_revoked:a="Certificate revoked.";break;case v.Alert.Description.certificate_expired:a="Certificate expired.";break;case v.Alert.Description.certificate_unknown:a="Certificate unknown.";break;case v.Alert.Description.illegal_parameter:a="Illegal parameter.";break;case v.Alert.Description.unknown_ca:a="Unknown certificate authority.";break;case v.Alert.Description.access_denied:a="Access denied.";break;case v.Alert.Description.decode_error:a="Decode error.";break;case v.Alert.Description.decrypt_error:a="Decrypt error.";break;case v.Alert.Description.export_restriction:a="Export restriction.";break;case v.Alert.Description.protocol_version:a="Unsupported protocol version.";break;case v.Alert.Description.insufficient_security:a="Insufficient security.";break;case v.Alert.Description.internal_error:a="Internal error.";break;case v.Alert.Description.user_canceled:a="User canceled.";break;case v.Alert.Description.no_renegotiation:a="Renegotiation not supported.";break;default:a="Unknown error.";break}if(n.description===v.Alert.Description.close_notify)return e.close();e.error(e,{message:a,send:!1,origin:e.entity===v.ConnectionEnd.client?"server":"client",alert:n}),e.process()};v.handleHandshake=function(e,t){var r=t.fragment,n=r.getByte(),a=r.getInt24();if(a>r.length())return e.fragmented=t,t.fragment=L.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var i=r.bytes(a+4);r.read+=4,n in bi[e.entity][e.expect]?(e.entity===v.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.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!==v.HandshakeType.hello_request&&n!==v.HandshakeType.certificate_verify&&n!==v.HandshakeType.finished&&(e.session.md5.update(i),e.session.sha1.update(i)),bi[e.entity][e.expect][n](e,t,a)):v.handleUnexpected(e,t)};v.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};v.handleHeartbeat=function(e,t){var r=t.fragment,n=r.getByte(),a=r.getInt16(),i=r.getBytes(a);if(n===v.HeartbeatMessageType.heartbeat_request){if(e.handshaking||a>i.length)return e.process();v.queue(e,v.createRecord(e,{type:v.ContentType.heartbeat,data:v.createHeartbeat(v.HeartbeatMessageType.heartbeat_response,i)})),v.flush(e)}else if(n===v.HeartbeatMessageType.heartbeat_response){if(i!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,L.util.createBuffer(i))}e.process()};var Ly=0,Dy=1,Fc=2,Py=3,Oy=4,Hc=5,Uy=6,My=7,Vy=8,Fy=0,Ky=1,_o=2,Hy=3,Bo=4,Gy=5,qy=6,y=v.handleUnexpected,Gc=v.handleChangeCipherSpec,ot=v.handleAlert,mt=v.handleHandshake,qc=v.handleApplicationData,ut=v.handleHeartbeat,No=[];No[v.ConnectionEnd.client]=[[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[Gc,ot,y,y,ut],[y,ot,mt,y,ut],[y,ot,mt,qc,ut],[y,ot,mt,y,ut]];No[v.ConnectionEnd.server]=[[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[Gc,ot,y,y,ut],[y,ot,mt,y,ut],[y,ot,mt,qc,ut],[y,ot,mt,y,ut]];var Nr=v.handleHelloRequest,Wy=v.handleServerHello,Wc=v.handleCertificate,Kc=v.handleServerKeyExchange,Ao=v.handleCertificateRequest,vi=v.handleServerHelloDone,zc=v.handleFinished,bi=[];bi[v.ConnectionEnd.client]=[[y,y,Wy,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,Wc,Kc,Ao,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,Kc,Ao,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,Ao,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,zc],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y]];var zy=v.handleClientHello,jy=v.handleClientKeyExchange,Yy=v.handleCertificateVerify;bi[v.ConnectionEnd.server]=[[y,zy,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,Wc,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,jy,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,Yy,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,zc],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y]];v.generateKeys=function(e,t){var r=xi,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var a=2*t.mac_key_length+2*t.enc_key_length,i=e.version.major===v.Versions.TLS_1_0.major&&e.version.minor===v.Versions.TLS_1_0.minor;i&&(a+=2*t.fixed_iv_length);var s=r(t.master_secret,"key expansion",n,a),o={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return i&&(o.client_write_IV=s.getBytes(t.fixed_iv_length),o.server_write_IV=s.getBytes(t.fixed_iv_length)),o};v.createConnectionState=function(e){var t=e.entity===v.ConnectionEnd.client,r=function(){var i={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(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]}};return i},n={read:r(),write:r()};if(n.read.update=function(i,s){return n.read.cipherFunction(s,n.read)?n.read.compressFunction(i,s,n.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.bad_record_mac}}),!i.fail},n.write.update=function(i,s){return n.write.compressFunction(i,s,n.write)?n.write.cipherFunction(s,n.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}}),!i.fail},e.session){var a=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(a),a.keys=v.generateKeys(e,a),n.read.macKey=t?a.keys.server_write_MAC_key:a.keys.client_write_MAC_key,n.write.macKey=t?a.keys.client_write_MAC_key:a.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,a),a.compression_algorithm){case v.CompressionMethod.none:break;case v.CompressionMethod.deflate:n.read.compressFunction=ky,n.write.compressFunction=Ny;break;default:throw new Error("Unsupported compression algorithm.")}}return n};v.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,r=L.util.createBuffer();return r.putInt32(t),r.putBytes(L.random.getBytes(28)),r};v.createRecord=function(e,t){if(!t.data)return null;var r={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return r};v.createAlert=function(e,t){var r=L.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),v.createRecord(e,{type:v.ContentType.alert,data:r})};v.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=L.util.createBuffer(),r=0;r0&&(f+=2);var d=e.session.id,m=d.length+1+2+4+28+2+a+1+s+f,p=L.util.createBuffer();return p.putByte(v.HandshakeType.client_hello),p.putInt24(m),p.putByte(e.version.major),p.putByte(e.version.minor),p.putBytes(e.session.sp.client_random),Dt(p,1,L.util.createBuffer(d)),Dt(p,2,t),Dt(p,1,i),f>0&&Dt(p,2,o),p};v.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,n=L.util.createBuffer();return n.putByte(v.HandshakeType.server_hello),n.putInt24(r),n.putByte(e.version.major),n.putByte(e.version.minor),n.putBytes(e.session.sp.server_random),Dt(n,1,L.util.createBuffer(t)),n.putByte(e.session.cipherSuite.id[0]),n.putByte(e.session.cipherSuite.id[1]),n.putByte(e.session.compressionMethod),n};v.createCertificate=function(e){var t=e.entity===v.ConnectionEnd.client,r=null;if(e.getCertificate){var n;t?n=e.session.certificateRequest:n=e.session.extensions.server_name.serverNameList,r=e.getCertificate(e,n)}var a=L.util.createBuffer();if(r!==null)try{L.util.isArray(r)||(r=[r]);for(var i=null,s=0;s0&&(r.putByte(v.HandshakeType.server_key_exchange),r.putInt24(t)),r};v.getClientSignature=function(e,t){var r=L.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(n,a,i){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:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}})}s===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}}):a=s.sign(a,null),i(n,a)},e.getSignature(e,r,t)};v.createCertificateVerify=function(e,t){var r=t.length+2,n=L.util.createBuffer();return n.putByte(v.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(t.length),n.putBytes(t),n};v.createCertificateRequest=function(e){var t=L.util.createBuffer();t.putByte(1);var r=L.util.createBuffer();for(var n in e.caStore.certs){var a=e.caStore.certs[n],i=L.pki.distinguishedNameToAsn1(a.subject),s=L.asn1.toDer(i);r.putInt16(s.length()),r.putBuffer(s)}var o=1+t.length()+2+r.length(),u=L.util.createBuffer();return u.putByte(v.HandshakeType.certificate_request),u.putInt24(o),Dt(u,1,t),Dt(u,2,r),u};v.createServerHelloDone=function(e){var t=L.util.createBuffer();return t.putByte(v.HandshakeType.server_hello_done),t.putInt24(0),t};v.createChangeCipherSpec=function(){var e=L.util.createBuffer();return e.putByte(1),e};v.createFinished=function(e){var t=L.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===v.ConnectionEnd.client,n=e.session.sp,a=12,i=xi,s=r?"client finished":"server finished";t=i(n.master_secret,s,t.getBytes(),a);var o=L.util.createBuffer();return o.putByte(v.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o};v.createHeartbeat=function(e,t,r){typeof r>"u"&&(r=t.length);var n=L.util.createBuffer();n.putByte(e),n.putInt16(r),n.putBytes(t);var a=n.length(),i=Math.max(16,a-r-3);return n.putBytes(L.random.getBytes(i)),n};v.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===v.ContentType.handshake||t.type===v.ContentType.alert||t.type===v.ContentType.change_cipher_spec))){if(t.type===v.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var n;if(t.fragment.length()<=v.MaxFragment)n=[t];else{n=[];for(var a=t.fragment.bytes();a.length>v.MaxFragment;)n.push(v.createRecord(e,{type:t.type,data:L.util.createBuffer(a.slice(0,v.MaxFragment))})),a=a.slice(v.MaxFragment);a.length>0&&n.push(v.createRecord(e,{type:t.type,data:L.util.createBuffer(a)}))}for(var i=0;i0&&(s=r.order[0]),s!==null&&s in r.cache){i=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 i},r.setSession=function(a,i){if(r.order.length===r.capacity){var s=r.order.shift();delete r.cache[s]}var s=L.util.bytesToHex(a);r.order.push(s),r.cache[s]=i}}return r};v.createConnection=function(e){var t=null;e.caStore?L.util.isArray(e.caStore)?t=L.pki.createCaStore(e.caStore):t=e.caStore:t=L.pki.createCaStore();var r=e.cipherSuites||null;if(r===null){r=[];for(var n in v.CipherSuites)r.push(v.CipherSuites[n])}var a=e.server?v.ConnectionEnd.server:v.ConnectionEnd.client,i=e.sessionCache?v.createSessionCache(e.sessionCache):null,s={version:{major:v.Version.major,minor:v.Version.minor},entity:a,sessionId:e.sessionId,caStore:t,sessionCache:i,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(c,f,d,m){return f},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:L.util.createBuffer(),tlsData:L.util.createBuffer(),data:L.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(c,f){f.origin=f.origin||(c.entity===v.ConnectionEnd.client?"client":"server"),f.send&&(v.queue(c,v.createAlert(c,f.alert)),v.flush(c));var d=f.fatal!==!1;d&&(c.fail=!0),e.error(c,f),d&&c.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};s.reset=function(c){s.version={major:v.Version.major,minor:v.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=s.entity===v.ConnectionEnd.client?Ly:Fy,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=v.createConnectionState(s)},s.reset();var o=function(c,f){var d=f.type-v.ContentType.change_cipher_spec,m=No[c.entity][c.expect];d in m?m[d](c,f):v.handleUnexpected(c,f)},u=function(c){var f=0,d=c.input,m=d.length();if(m<5)f=5-m;else{c.record={type:d.getByte(),version:{major:d.getByte(),minor:d.getByte()},length:d.getInt16(),fragment:L.util.createBuffer(),ready:!1};var p=c.record.version.major===c.version.major;p&&c.session&&c.session.version&&(p=c.record.version.minor===c.version.minor),p||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.protocol_version}})}return f},l=function(c){var f=0,d=c.input,m=d.length();if(m0&&(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=v.createRandom().getBytes(),s.open=!0,v.queue(s,v.createRecord(s,{type:v.ContentType.handshake,data:v.createClientHello(s)})),v.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=u(s)),!s.fail&&s.record!==null&&!s.record.ready&&(f=l(s)),!s.fail&&s.record!==null&&s.record.ready&&o(s,s.record)),f},s.prepare=function(c){return v.queue(s,v.createRecord(s,{type:v.ContentType.application_data,data:L.util.createBuffer(c)})),v.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,v.queue(s,v.createRecord(s,{type:v.ContentType.heartbeat,data:v.createHeartbeat(v.HeartbeatMessageType.heartbeat_request,c,f)})),v.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,v.queue(s,v.createAlert(s,{level:v.Alert.Level.warning,description:v.Alert.Description.close_notify})),v.flush(s)),s.closed(s)),s.reset(c)},s};jc.exports=L.tls=L.tls||{};for(Ci in v)typeof v[Ci]!="function"&&(L.tls[Ci]=v[Ci]);var Ci;L.tls.prf_tls1=xi;L.tls.hmac_sha1=By;L.tls.createSessionCache=v.createSessionCache;L.tls.createConnection=v.createConnection});var Zc=Q((PE,Xc)=>{var kr=te();Ir();ko();var Pt=Xc.exports=kr.tls;Pt.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Pt.BulkCipherAlgorithm.aes,e.cipher_type=Pt.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Pt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Yc};Pt.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Pt.BulkCipherAlgorithm.aes,e.cipher_type=Pt.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Pt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Yc};function Yc(e,t,r){var n=t.entity===kr.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:kr.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},e.write.cipherState={init:!1,cipher:kr.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},e.read.cipherFunction=$y,e.write.cipherFunction=Zy,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=Pt.hmac_sha1}function Zy(e,t){var r=!1,n=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(n),t.updateSequenceNumber();var a;e.version.minor===Pt.Versions.TLS_1_0.minor?a=t.cipherState.init?null:t.cipherState.iv:a=kr.random.getBytesSync(16),t.cipherState.init=!0;var i=t.cipherState.cipher;return i.start({iv:a}),e.version.minor>=Pt.Versions.TLS_1_1.minor&&i.output.putBytes(a),i.update(e.fragment),i.finish(Qy)&&(e.fragment=i.output,e.length=e.fragment.length(),r=!0),r}function Qy(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function Jy(e,t,r){var n=!0;if(r){for(var a=t.length(),i=t.last(),s=a-1-i;s=i?(e.fragment=a.output.getBytes(o-i),s=a.output.getBytes(i)):e.fragment=a.output.getBytes(),e.fragment=kr.util.createBuffer(e.fragment),e.length=e.fragment.length();var u=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),r=ev(t.macKey,s,u)&&r,r}function ev(e,t,r){var n=kr.hmac.create();return n.start("SHA1",e),n.update(t),t=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),t===r}});var Po=Q((OE,ef)=>{var ke=te();Xt();ye();var pa=ef.exports=ke.sha512=ke.sha512||{};ke.md.sha512=ke.md.algorithms.sha512=pa;var Jc=ke.sha384=ke.sha512.sha384=ke.sha512.sha384||{};Jc.create=function(){return pa.create("SHA-384")};ke.md.sha384=ke.md.algorithms.sha384=Jc;ke.sha512.sha256=ke.sha512.sha256||{create:function(){return pa.create("SHA-512/256")}};ke.md["sha512/256"]=ke.md.algorithms["sha512/256"]=ke.sha512.sha256;ke.sha512.sha224=ke.sha512.sha224||{create:function(){return pa.create("SHA-512/224")}};ke.md["sha512/224"]=ke.md.algorithms["sha512/224"]=ke.sha512.sha224;pa.create=function(e){if($c||tv(),typeof e>"u"&&(e="SHA-512"),!(e in qr))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=qr[e],r=null,n=ke.util.createBuffer(),a=new Array(80),i=0;i<80;++i)a[i]=new Array(2);var s=64;switch(e){case"SHA-384":s=48;break;case"SHA-512/256":s=32;break;case"SHA-512/224":s=28;break}var o={algorithm:e.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 u=o.messageLengthSize/4,l=0;l>>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(u),Qc(r,a,n),(n.read>2048||n.length()===0)&&n.compact(),o},o.digest=function(){var u=ke.util.createBuffer();u.putBytes(n.bytes());var l=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,c=l&o.blockLength-1;u.putBytes(Lo.substr(0,o.blockLength-c));for(var f,d,m=o.fullMessageLength[0]*8,p=0;p>>0,m+=d,u.putInt32(m>>>0),m=f>>>0;u.putInt32(m);for(var h=new Array(r.length),p=0;p=128;){for(fe=0;fe<16;++fe)t[fe][0]=r.getInt32()>>>0,t[fe][1]=r.getInt32()>>>0;for(;fe<80;++fe)Ut=t[fe-2],be=Ut[0],H=Ut[1],n=((be>>>19|H<<13)^(H>>>29|be<<3)^be>>>6)>>>0,a=((be<<13|H>>>19)^(H<<3|be>>>29)^(be<<26|H>>>6))>>>0,Fe=t[fe-15],be=Fe[0],H=Fe[1],i=((be>>>1|H<<31)^(be>>>8|H<<24)^be>>>7)>>>0,s=((be<<31|H>>>1)^(be<<24|H>>>8)^(be<<25|H>>>7))>>>0,jt=t[fe-7],De=t[fe-16],H=a+jt[1]+s+De[1],t[fe][0]=n+jt[0]+i+De[0]+(H/4294967296>>>0)>>>0,t[fe][1]=H>>>0;for(h=e[0][0],C=e[0][1],b=e[1][0],I=e[1][1],S=e[2][0],_=e[2][1],B=e[3][0],N=e[3][1],G=e[4][0],W=e[4][1],re=e[5][0],ee=e[5][1],ne=e[6][0],q=e[6][1],Ve=e[7][0],Ee=e[7][1],fe=0;fe<80;++fe)l=((G>>>14|W<<18)^(G>>>18|W<<14)^(W>>>9|G<<23))>>>0,c=((G<<18|W>>>14)^(G<<14|W>>>18)^(W<<23|G>>>9))>>>0,f=(ne^G&(re^ne))>>>0,d=(q^W&(ee^q))>>>0,o=((h>>>28|C<<4)^(C>>>2|h<<30)^(C>>>7|h<<25))>>>0,u=((h<<4|C>>>28)^(C<<30|h>>>2)^(C<<25|h>>>7))>>>0,m=(h&b|S&(h^b))>>>0,p=(C&I|_&(C^I))>>>0,H=Ee+c+d+Do[fe][1]+t[fe][1],n=Ve+l+f+Do[fe][0]+t[fe][0]+(H/4294967296>>>0)>>>0,a=H>>>0,H=u+p,i=o+m+(H/4294967296>>>0)>>>0,s=H>>>0,Ve=ne,Ee=q,ne=re,q=ee,re=G,ee=W,H=N+a,G=B+n+(H/4294967296>>>0)>>>0,W=H>>>0,B=S,N=_,S=b,_=I,b=h,I=C,H=a+s,h=n+i+(H/4294967296>>>0)>>>0,C=H>>>0;H=e[0][1]+C,e[0][0]=e[0][0]+h+(H/4294967296>>>0)>>>0,e[0][1]=H>>>0,H=e[1][1]+I,e[1][0]=e[1][0]+b+(H/4294967296>>>0)>>>0,e[1][1]=H>>>0,H=e[2][1]+_,e[2][0]=e[2][0]+S+(H/4294967296>>>0)>>>0,e[2][1]=H>>>0,H=e[3][1]+N,e[3][0]=e[3][0]+B+(H/4294967296>>>0)>>>0,e[3][1]=H>>>0,H=e[4][1]+W,e[4][0]=e[4][0]+G+(H/4294967296>>>0)>>>0,e[4][1]=H>>>0,H=e[5][1]+ee,e[5][0]=e[5][0]+re+(H/4294967296>>>0)>>>0,e[5][1]=H>>>0,H=e[6][1]+q,e[6][0]=e[6][0]+ne+(H/4294967296>>>0)>>>0,e[6][1]=H>>>0,H=e[7][1]+Ee,e[7][0]=e[7][0]+Ve+(H/4294967296>>>0)>>>0,e[7][1]=H>>>0,Ke-=128}}});var tf=Q(Oo=>{var rv=te();Ht();var at=rv.asn1;Oo.privateKeyValidator={name:"PrivateKeyInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};Oo.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:at.Class.UNIVERSAL,type:at.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var mf=Q((ME,hf)=>{var lt=te();la();Bt();Po();ye();var uf=tf(),nv=uf.publicKeyValidator,av=uf.privateKeyValidator;typeof rf>"u"&&(rf=lt.jsbn.BigInteger);var rf,Vo=lt.util.ByteBuffer,Et=typeof Buffer>"u"?Uint8Array:Buffer;lt.pki=lt.pki||{};hf.exports=lt.pki.ed25519=lt.ed25519=lt.ed25519||{};var ce=lt.ed25519;ce.constants={};ce.constants.PUBLIC_KEY_BYTE_LENGTH=32;ce.constants.PRIVATE_KEY_BYTE_LENGTH=64;ce.constants.SEED_BYTE_LENGTH=32;ce.constants.SIGN_BYTE_LENGTH=64;ce.constants.HASH_BYTE_LENGTH=64;ce.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=lt.random.getBytesSync(ce.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==ce.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+ce.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=pr({message:t,encoding:"binary"});for(var r=new Et(ce.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Et(ce.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)n[a]=t[a];return uv(r,n),{publicKey:r,privateKey:n}};ce.privateKeyFromAsn1=function(e){var t={},r=[],n=lt.asn1.validate(e,av,t,r);if(!n){var a=new Error("Invalid Key.");throw a.errors=r,a}var i=lt.asn1.derToOid(t.privateKeyOid),s=lt.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.privateKey,u=pr({message:lt.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:u}};ce.publicKeyFromAsn1=function(e){var t={},r=[],n=lt.asn1.validate(e,nv,t,r);if(!n){var a=new Error("Invalid Key.");throw a.errors=r,a}var i=lt.asn1.derToOid(t.publicKeyOid),s=lt.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.ed25519PublicKey;if(o.length!==ce.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return pr({message:o,encoding:"binary"})};ce.publicKeyFromPrivateKey=function(e){e=e||{};var t=pr({message:e.privateKey,encoding:"binary"});if(t.length!==ce.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+ce.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new Et(ce.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n=0};function pr(e){var t=e.message;if(t instanceof Uint8Array||t instanceof Et)return t;var r=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,r);t=new Vo(t,r)}else if(!(t instanceof Vo))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 Et(t.length()),a=0;a=32;--n){for(r=0,a=n-32,i=n-12;a>8,t[a]-=r*256;t[a]+=r,t[n]=0}for(r=0,a=0;a<32;++a)t[a]+=r-(t[31]>>4)*Uo[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;++a)t[a]-=r*Uo[a];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=t[n]&255}function Ko(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;lf(e,t)}function Ho(e,t){var r=Y(),n=Y(),a=Y(),i=Y(),s=Y(),o=Y(),u=Y(),l=Y(),c=Y();xn(r,e[1],e[0]),xn(c,t[1],t[0]),Ae(r,r,c),bn(n,e[0],e[1]),bn(c,t[0],t[1]),Ae(n,n,c),Ae(a,e[3],t[3]),Ae(a,a,sv),Ae(i,e[2],t[2]),bn(i,i,i),xn(s,n,r),xn(o,i,a),bn(u,i,a),bn(l,n,r),Ae(e[0],s,o),Ae(e[1],l,u),Ae(e[2],u,o),Ae(e[3],s,l)}function sf(e,t,r){for(var n=0;n<4;++n)pf(e[n],t[n],r)}function Go(e,t){var r=Y(),n=Y(),a=Y();mv(a,t[2]),Ae(r,t[0],a),Ae(n,t[1],a),Ei(e,n),e[31]^=ff(r)<<7}function Ei(e,t){var r,n,a,i=Y(),s=Y();for(r=0;r<16;++r)s[r]=t[r];for(Mo(s),Mo(s),Mo(s),n=0;n<2;++n){for(i[0]=s[0]-65517,r=1;r<15;++r)i[r]=s[r]-65535-(i[r-1]>>16&1),i[r-1]&=65535;i[15]=s[15]-32767-(i[14]>>16&1),a=i[15]>>16&1,i[14]&=65535,pf(s,i,1-a)}for(r=0;r<16;r++)e[2*r]=s[r]&255,e[2*r+1]=s[r]>>8}function fv(e,t){var r=Y(),n=Y(),a=Y(),i=Y(),s=Y(),o=Y(),u=Y();return Lr(e[2],Si),dv(e[1],t),Wr(a,e[1]),Ae(i,a,iv),xn(a,a,e[2]),bn(i,e[2],i),Wr(s,i),Wr(o,s),Ae(u,o,s),Ae(r,u,a),Ae(r,r,i),pv(r,r),Ae(r,r,a),Ae(r,r,i),Ae(r,r,i),Ae(e[0],r,i),Wr(n,e[0]),Ae(n,n,i),of(n,a)&&Ae(e[0],e[0],ov),Wr(n,e[0]),Ae(n,n,i),of(n,a)?-1:(ff(e[0])===t[31]>>7&&xn(e[0],Fo,e[0]),Ae(e[3],e[0],e[1]),0)}function dv(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function pv(e,t){var r=Y(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=250;n>=0;--n)Wr(r,r),n!==1&&Ae(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}function of(e,t){var r=new Et(32),n=new Et(32);return Ei(r,e),Ei(n,t),cf(r,0,n,0)}function cf(e,t,r,n){return hv(e,t,r,n,32)}function hv(e,t,r,n,a){var i,s=0;for(i=0;i>>8)-1}function ff(e){var t=new Et(32);return Ei(t,e),t[0]&1}function df(e,t,r){var n,a;for(Lr(e[0],Fo),Lr(e[1],Si),Lr(e[2],Si),Lr(e[3],Fo),a=255;a>=0;--a)n=r[a/8|0]>>(a&7)&1,sf(e,t,n),Ho(t,e),Ho(e,e),sf(e,t,n)}function qo(e,t){var r=[Y(),Y(),Y(),Y()];Lr(r[0],nf),Lr(r[1],af),Lr(r[2],Si),Ae(r[3],nf,af),df(e,r,t)}function Lr(e,t){var r;for(r=0;r<16;r++)e[r]=t[r]|0}function mv(e,t){var r=Y(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=253;n>=0;--n)Wr(r,r),n!==2&&n!==4&&Ae(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}function Mo(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-n*65536;e[0]+=n-1+37*(n-1)}function pf(e,t,r){for(var n,a=~(r-1),i=0;i<16;++i)n=a&(e[i]^t[i]),e[i]^=n,t[i]^=n}function Y(e){var t,r=new Float64Array(16);if(e)for(t=0;t{var At=te();ye();Bt();la();vf.exports=At.kem=At.kem||{};var gf=At.jsbn.BigInteger;At.kem.rsa={};At.kem.rsa.create=function(e,t){t=t||{};var r=t.prng||At.random,n={};return n.encrypt=function(a,i){var s=Math.ceil(a.n.bitLength()/8),o;do o=new gf(At.util.bytesToHex(r.getBytesSync(s)),16).mod(a.n);while(o.compareTo(gf.ONE)<=0);o=At.util.hexToBytes(o.toString(16));var u=s-o.length;u>0&&(o=At.util.fillString(String.fromCharCode(0),u)+o);var l=a.encrypt(o,"NONE"),c=e.generate(o,i);return{encapsulation:l,key:c}},n.decrypt=function(a,i,s){var o=a.decrypt(i,"NONE");return e.generate(o,s)},n};At.kem.kdf1=function(e,t){yf(this,e,0,t||e.digestLength)};At.kem.kdf2=function(e,t){yf(this,e,1,t||e.digestLength)};function yf(e,t,r,n){e.generate=function(a,i){for(var s=new At.util.ByteBuffer,o=Math.ceil(i/n)+r,u=new At.util.ByteBuffer,l=r;l{var de=te();ye();Sf.exports=de.log=de.log||{};de.log.levels=["none","error","warning","info","debug","verbose","max"];var wi={},jo=[],ga=null;de.log.LEVEL_LOCKED=1<<1;de.log.NO_LEVEL_CHECK=1<<2;de.log.INTERPOLATE=1<<3;for(nr=0;nr"u"||t?e.flags|=de.log.LEVEL_LOCKED:e.flags&=~de.log.LEVEL_LOCKED};de.log.addLogger=function(e){jo.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(bf={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},ya=function(e,t){de.log.prepareStandard(t);var r=bf[t.level],n=[t.standard];n=n.concat(t.arguments.slice()),r.apply(console,n)},Sn=de.log.makeLogger(ya)):(ya=function(t,r){de.log.prepareStandardFull(r),console.log(r.standardFull)},Sn=de.log.makeLogger(ya)),de.log.setLevel(Sn,"debug"),de.log.addLogger(Sn),ga=Sn):console={log:function(){}};var Sn,bf,ya;ga!==null&&typeof window<"u"&&window.location&&(ma=new URL(window.location.href).searchParams,ma.has("console.level")&&de.log.setLevel(ga,ma.get("console.level").slice(-1)[0]),ma.has("console.lock")&&(xf=ma.get("console.lock").slice(-1)[0],xf=="true"&&de.log.lock(ga)));var ma,xf;de.log.consoleLogger=ga});var If=Q((KE,wf)=>{wf.exports=Xt();ri();mn();io();Po()});var Rf=Q((HE,Af)=>{var U=te();Ir();Ht();oa();Tr();Mr();bo();Bt();ye();yi();var E=U.asn1,gt=Af.exports=U.pkcs7=U.pkcs7||{};gt.messageFromPem=function(e){var t=U.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=E.fromDer(t.body);return gt.messageFromAsn1(n)};gt.messageToPem=function(e,t){var r={type:"PKCS7",body:E.toDer(e.toAsn1()).getBytes()};return U.pem.encode(r,{maxline:t})};gt.messageFromAsn1=function(e){var t={},r=[];if(!E.validate(e,gt.asn1.contentInfoValidator,t,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 a=E.derToOid(t.contentType),i;switch(a){case U.pki.oids.envelopedData:i=gt.createEnvelopedData();break;case U.pki.oids.encryptedData:i=gt.createEncryptedData();break;case U.pki.oids.signedData:i=gt.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return i.fromAsn1(t.content.value[0]),i};gt.createSignedData=function(){var e=null;return e={type:U.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(n){if(Xo(e,n,gt.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var a=e.rawCapture.certificates.value,i=0;i0&&s.value[0].value.push(E.create(E.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&s.value[0].value.push(E.create(E.Class.CONTEXT_SPECIFIC,1,!0,i)),s.value[0].value.push(E.create(E.Class.UNIVERSAL,E.Type.SET,!0,e.signerInfos)),E.create(E.Class.UNIVERSAL,E.Type.SEQUENCE,!0,[E.create(E.Class.UNIVERSAL,E.Type.OID,!1,E.oidToDer(e.type).getBytes()),s])},addSigner:function(n){var a=n.issuer,i=n.serialNumber;if(n.certificate){var s=n.certificate;typeof s=="string"&&(s=U.pki.certificateFromPem(s)),a=s.issuer.attributes,i=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=U.pki.privateKeyFromPem(o));var u=n.digestAlgorithm||U.pki.oids.sha1;switch(u){case U.pki.oids.sha1:case U.pki.oids.sha256:case U.pki.oids.sha384:case U.pki.oids.sha512:case U.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var l=n.authenticatedAttributes||[];if(l.length>0){for(var c=!1,f=!1,d=0;d0){for(var r=E.create(E.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n=r&&a{var Xe=te();Ir();fn();ri();mn();ye();var Ti=_f.exports=Xe.ssh=Xe.ssh||{};Ti.privateKeyToPutty=function(e,t,r){r=r||"",t=t||"";var n="ssh-rsa",a=t===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+n+`\r
`;i+="Encryption: "+a+`\r
`,i+="Comment: "+r+`\r
`;var s=Xe.util.createBuffer();En(s,n),ar(s,e.e),ar(s,e.n);var o=Xe.util.encode64(s.bytes(),64),u=Math.floor(o.length/66)+1;i+="Public-Lines: "+u+`\r
`,i+=o;var l=Xe.util.createBuffer();ar(l,e.d),ar(l,e.p),ar(l,e.q),ar(l,e.qInv);var c;if(!t)c=Xe.util.encode64(l.bytes(),64);else{var f=l.length()+16-1;f-=f%16;var d=Ii(l.bytes());d.truncate(d.length()-f+l.length()),l.putBuffer(d);var m=Xe.util.createBuffer();m.putBuffer(Ii("\0\0\0\0",t)),m.putBuffer(Ii("\0\0\0",t));var p=Xe.aes.createEncryptionCipher(m.truncate(8),"CBC");p.start(Xe.util.createBuffer().fillWithByte(0,16)),p.update(l.copy()),p.finish();var h=p.output;h.truncate(16),c=Xe.util.encode64(h.bytes(),64)}u=Math.floor(c.length/66)+1,i+=`\r
Private-Lines: `+u+`\r
`,i+=c;var C=Ii("putty-private-key-file-mac-key",t),b=Xe.util.createBuffer();En(b,n),En(b,a),En(b,r),b.putInt32(s.length()),b.putBuffer(s),b.putInt32(l.length()),b.putBuffer(l);var I=Xe.hmac.create();return I.start("sha1",C),I.update(b.bytes()),i+=`\r
Private-MAC: `+I.digest().toHex()+`\r
`,i};Ti.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var n=Xe.util.createBuffer();return En(n,r),ar(n,e.e),ar(n,e.n),r+" "+Xe.util.encode64(n.bytes())+" "+t};Ti.privateKeyToOpenSSH=function(e,t){return t?Xe.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Xe.pki.privateKeyToPem(e)};Ti.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||Xe.md.md5.create(),n="ssh-rsa",a=Xe.util.createBuffer();En(a,n),ar(a,e.e),ar(a,e.n),r.start(),r.update(a.getBytes());var i=r.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function ar(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var n=Xe.util.hexToBytes(r);e.putInt32(n.length),e.putBytes(n)}function En(e,t){e.putInt32(t.length),e.putString(t)}function Ii(){for(var e=Xe.md.sha1.create(),t=arguments.length,r=0;r{Nf.exports=te();Ir();Zc();Ht();Xa();oa();mf();fn();Cf();Ef();If();xo();oi();Mr();mo();wo();Rf();To();yo();so();hi();Bt();lo();Bf();ko();ye()});var qt,va,Lf=O(()=>{qt=zd(kf());zn();va=class{static async encrypt(t){let r=Mt()?.pk;if(r)try{let n=qt.default.pki.publicKeyFromPem(r),a=qt.default.random.getBytesSync(32),i=qt.default.cipher.createCipher("AES-GCM",a),s=qt.default.random.getBytesSync(12);i.start({iv:s}),i.update(qt.default.util.createBuffer(JSON.stringify(t),"utf8")),i.finish();let o=i.output.bytes(),u=i.mode.tag.bytes(),l=n.encrypt(a,"RSA-OAEP",{md:qt.default.md.sha256.create()});return{k:qt.default.util.encode64(l),i:qt.default.util.encode64(s),c:qt.default.util.encode64(o),t:qt.default.util.encode64(u)}}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data.")}else return JSON.stringify(t)}static secureEnv(){return Boolean(window.crypto?.subtle)}}});var Wt,Df=O(()=>{Wt=class{static timeExecution(t,r){return new Promise((n,a)=>{let i=Date.now();r().then(s=>{let u=Date.now()-i;this.timings[t]=u,n(s)}).catch(s=>{a(s)})})}static getTimings(){return{...this.timings}}static clearTimings(){this.timings={}}};Wt.timings={}});function wv(e){var t=e.appVersion;if(t.state!==Z.Success)return!1;if(/headless/i.test(t.value))return se.HeadlessChrome;if(/electron/i.test(t.value))return se.Electron;if(/slimerjs/i.test(t.value))return se.SlimerJS}function Ai(e,t){return e.indexOf(t)!==-1}function Dr(e,t){return e.indexOf(t)!==-1}function Iv(e,t){if("find"in e)return e.find(t);for(var r=0;r=5?vt.Chromium:wn(["ApplePayError"in r,"CSSPrimitiveValue"in r,"Counter"in r,n.vendor.indexOf("Apple")===0,"getStorageUpdates"in n,"WebKitMediaKeys"in r])>=4?vt.Webkit:wn(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4?vt.Gecko:vt.Unknown}function Qo(){var e,t=(e=navigator.userAgent)===null||e===void 0?void 0:e.toLowerCase();return Dr(t,"wechat")?yt.WeChat:Dr(t,"firefox")?yt.Firefox:Dr(t,"opera")||Dr(t,"opr")?yt.Opera:Dr(t,"chrome")?yt.Chrome:Dr(t,"safari")?yt.Safari:Dr(t,"trident")||Dr(t,"msie")?yt.IE:yt.Unknown}function Rv(){var e=Ca(),t=e===vt.Chromium,r=e===vt.Gecko;if(!t&&!r)return!1;var n=window;return wn(["onorientationchange"in n,"orientation"in n,t&&!("SharedWorker"in n),r&&/android/i.test(navigator.appVersion)])>=2}function _v(){if(Ca()!==vt.Webkit)return!1;var e=window;return wn(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Bv(){return document.hasFocus===void 0?!1:document.hasFocus()}function Nv(){var e=window;return wn([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3}function kv(e){var t=e.evalLength;if(t.state===Z.Success){var r=t.value,n=Qo(),a=Ca();return r===37&&!Ai([vt.Webkit,vt.Gecko],a)||r===39&&!Ai([yt.IE],n)||r===33&&!Ai([vt.Chromium],a)}}function Lv(e){var t=e.functionBind;if(t.state===Z.NotFunction)return se.PhantomJS}function Dv(e){var t=e.languages;if(t.state===Z.Success&&t.value.length===0)return se.HeadlessChrome}function Pv(e){var t=e.mimeTypesConsistent;if(t.state===Z.Success&&!t.value)return se.Unknown}function Ov(e){var t=e.notificationPermissions,r=Qo();if(r!==yt.Chrome)return!1;if(t.state===Z.Success&&t.value)return se.HeadlessChrome}function Uv(e){var t=e.pluginsArray;if(t.state===Z.Success&&!t.value)return se.HeadlessChrome}function Mv(e){var t=e.pluginsLength;if(t.state===Z.Success){var r=Ca();if(!(r===vt.Chromium&&Rv()||r===vt.Webkit&&!_v())&&t.value===0)return se.HeadlessChrome}}function Vv(e){var t,r=e.process;if(r.state!==Z.Success)return!1;if(r.value.type==="renderer"||((t=r.value.versions)===null||t===void 0?void 0:t.electron)!=null)return se.Electron}function Fv(e){var t=e.productSub;if(t.state!==Z.Success)return!1;var r=Qo();if((r===yt.Chrome||r===yt.Safari||r===yt.Opera||r===yt.WeChat)&&t.value!=="20030107")return se.Unknown}function Kv(e){var t=e.userAgent;if(t.state!==Z.Success)return!1;if(/PhantomJS/i.test(t.value))return se.PhantomJS;if(/Headless/i.test(t.value))return se.HeadlessChrome;if(/Electron/i.test(t.value))return se.Electron;if(/slimerjs/i.test(t.value))return se.SlimerJS}function Hv(e){var t=e.webDriver;if(t.state===Z.Success&&t.value)return se.HeadlessChrome}function Gv(e){var t=e.webGL;if(t.state===Z.Success){var r=t.value,n=r.vendor,a=r.renderer;if(n=="Brian Paul"&&a=="Mesa OffScreen")return se.HeadlessChrome}}function qv(e){var t=e.windowExternal;if(t.state!==Z.Success)return!1;if(/Sequentum/i.test(t.value))return se.Sequentum}function Wv(e){var t=e.windowSize;if(t.state!==Z.Success)return!1;var r=t.value,n=r.outerWidth,a=r.outerHeight;if(Bv()&&n===0&&a===0)return se.HeadlessChrome}function zv(e){var t=e.distinctiveProps;if(t.state!==Z.Success)return!1;var r=t.value,n;for(n in r)if(r[n])return n}function Yv(){var e=navigator.appVersion;if(e==null)throw new Le(Z.Undefined,"navigator.appVersion is undefined");return e}function Xv(){if(document.documentElement===void 0)throw new Le(Z.Undefined,"document.documentElement is undefined");var e=document.documentElement;if(typeof e.getAttributeNames!="function")throw new Le(Z.NotFunction,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()}function Zv(){try{null[0]()}catch(e){if(e instanceof Error&&e.stack!=null)return e.stack.toString()}throw new Le(Z.UnexpectedBehaviour,"errorTrace signal unexpected behaviour")}function Qv(){return eval.toString().length}function Jv(){if(Function.prototype.bind===void 0)throw new Le(Z.NotFunction,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()}function $v(){var e=navigator,t=[],r=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(r!==void 0&&t.push([r]),Array.isArray(e.languages)){var n=Ca();n===vt.Chromium&&Nv()||t.push(e.languages)}else if(typeof e.languages=="string"){var a=e.languages;a&&t.push(a.split(","))}return t}function e1(){if(navigator.mimeTypes===void 0)throw new Le(Z.Undefined,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,t=Object.getPrototypeOf(e)===MimeTypeArray.prototype,r=0;r=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat(Ev,"/npm-monitoring"),!0),e.send()}catch(t){console.error(t)}}function Of(e){var t=e===void 0?{}:e,r=t.monitoring,n=r===void 0?!0:r;return Xn(this,void 0,void 0,function(){var a;return Zn(this,function(i){switch(i.label){case 0:return n&&m1(),a=new h1,[4,a.collect()];case 1:return i.sent(),[2,a]}})})}var Ev,Z,se,Le,vt,yt,jv,p1,h1,Uf=O(()=>{Rs();Ev="1.5.0";(function(e){e[e.Success=0]="Success",e[e.Undefined=-1]="Undefined",e[e.NotFunction=-2]="NotFunction",e[e.UnexpectedBehaviour=-3]="UnexpectedBehaviour",e[e.Null=-4]="Null"})(Z||(Z={}));(function(e){e.Awesomium="awesomium",e.Cef="cef",e.CefSharp="cefsharp",e.CoachJS="coachjs",e.Electron="electron",e.FMiner="fminer",e.Geb="geb",e.NightmareJS="nightmarejs",e.Phantomas="phantomas",e.PhantomJS="phantomjs",e.Rhino="rhino",e.Selenium="selenium",e.Sequentum="sequentum",e.SlimerJS="slimerjs",e.WebDriverIO="webdriverio",e.WebDriver="webdriver",e.HeadlessChrome="headless_chrome",e.Unknown="unknown"})(se||(se={}));Le=function(e){Pu(t,e);function t(r,n){var a=e.call(this,n)||this;return a.state=r,a.name="BotdError",Object.setPrototypeOf(a,t.prototype),a}return t}(Error);(function(e){e.Unknown="unknown",e.Chromium="chromium",e.Gecko="gecko",e.Webkit="webkit"})(vt||(vt={}));(function(e){e.Unknown="unknown",e.Chrome="chrome",e.Firefox="firefox",e.Opera="opera",e.Safari="safari",e.IE="internet_explorer",e.WeChat="wechat"})(yt||(yt={}));jv={detectAppVersion:wv,detectDocumentAttributes:Tv,detectErrorTrace:Av,detectEvalLengthInconsistency:kv,detectFunctionBind:Lv,detectLanguagesLengthInconsistency:Dv,detectNotificationPermissions:Ov,detectPluginsArray:Uv,detectPluginsLengthInconsistency:Mv,detectProcess:Vv,detectUserAgent:Kv,detectWebDriver:Hv,detectWebGL:Gv,detectWindowExternal:qv,detectWindowSize:Wv,detectMimeTypesConsistent:Pv,detectProductSub:Fv,detectDistinctiveProperties:zv};p1={userAgent:o1,appVersion:Yv,rtt:s1,windowSize:f1,pluginsLength:n1,pluginsArray:r1,errorTrace:Zv,productSub:i1,windowExternal:c1,mimeTypesConsistent:e1,evalLength:Qv,webGL:l1,webDriver:u1,languages:$v,notificationPermissions:t1,documentElementKeys:Xv,functionBind:Jv,process:a1,distinctiveProps:d1},h1=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.getSources=function(){return p1},e.prototype.getDetectors=function(){return jv},e.prototype.detect=function(){if(this.components===void 0)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var t=this.components,r=this.getDetectors(),n={},a={bot:!1};for(var i in r){var s=r[i],o=s(t),u={bot:!1};typeof o=="string"?u={bot:!0,botKind:o}:o&&(u={bot:!0,botKind:se.Unknown}),n[i]=u,u.bot&&(a=u)}return this.detections=n,a},e.prototype.collect=function(){return Xn(this,void 0,void 0,function(){var t,r,n,a=this;return Zn(this,function(i){switch(i.label){case 0:return t=this.getSources(),r={},n=Object.keys(t),[4,Promise.all(n.map(function(s){return Xn(a,void 0,void 0,function(){var o,u,l,c,f;return Zn(this,function(d){switch(d.label){case 0:o=t[s],d.label=1;case 1:return d.trys.push([1,3,,4]),u=r,l=s,f={},[4,o()];case 2:return u[l]=(f.value=d.sent(),f.state=Z.Success,f),[3,4];case 3:return c=d.sent(),c instanceof Le?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 i.sent(),this.components=r,[2,this.components]}})})},e}()});var Jo,Mf,Vf=O(()=>{Uf();br();Jo=class{static async detect(){try{return await(await Of()).detect()}catch(t){return it.addError("Bot prescreen failed",t),Promise.reject(t)}}},Mf=Jo});var $o,Ff,Kf=O(()=>{br();$o=class{static async detect(){try{return{webdriver:navigator?.webdriver!==void 0}}catch(t){return it.addError("Webdriver detection failed",t),Promise.reject(t)}}},Ff=$o});var Ot,e0=O(()=>{Au();zn();br();Ts();ll();fl();pl();hl();ml();Ws();Lf();Df();Vf();Kf();rn.defaults.withCredentials=!0;Ot=class{static async formatRequest(t,r){try{t=`s_${t}`;let n=await va.encrypt(r);return JSON.stringify({type:t,data:n})}catch{}return JSON.stringify({type:t,data:r})}static async post(t,r,n,a,i,s){try{let o=Mt()?.api?.baseUrl;if(!o)throw console.error("Internal honeypot error: missing base url"),new Error("Missing base URL");let u=`${o}${t}`,l={identity:jn.getIdentity(),identities:jn.getIdentities()},c=new URLSearchParams(window.location.search).get("hp-passport");try{l={...l,...await Sr.get()}}catch{}let f=!navigator.geolocation.getCurrentPosition.toString().includes("[native code]")||window?.geoLocationStorage!==void 0,d=a||[];f&&d.push("blsf");let m={};try{let[b,I,S,_,B,N]=await Promise.all([Wt.timeExecution("bot",Mf.detect),Wt.timeExecution("languages",cl.get),Wt.timeExecution("performance",dl.get),Wt.timeExecution("screen",ta.get),Wt.timeExecution("timezone",ra.get),Wt.timeExecution("webdriver",Ff.detect)]);m={cbt:b,languages:I,performanceInfo:S,screen:_,timezone:B,webdriver:N}}catch{}let p={...n,...l,...m,session_id:i,device_id:s,library_version:ja,ctags:d,...c&&{passport:c}},h=await Ot.formatRequest(r,p);return(await rn.post(u,h,{headers:{"Content-Type":"application/json;charset=UTF-8"}})).data}catch(o){throw it.addError("Failed to communicate with the backend server"),Ot.postError(o),o}}static async postError(t){try{let n=Mt()?.api?.routes?.errors;if(!n)return;let a=await Ot.formatRequest("error",{message:t}),i=await rn.post(n,a,{headers:{"Content-Type":"application/json;charset=UTF-8"}})}catch{console.error("error HP10002")}}}});var Ri,t0=O(()=>{Ri=(e,t,r,n)=>{let a=0,i=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?(i(`setting user_id: ${s.userId}`),await r(s.userId)):i(`ignoring user_id since trackIdentities is set to false: ${s.userId}`))}catch{}let o=await t();i(`initialized plugin. honey=${JSON.stringify(o)}`)},execute:async s=>{try{let{user_id:o,event_type:u}=s;try{o&&(n?.trackIdentities?(i(`processing identify event: ${o}`),await r(o)):i(`ignoring identify event since trackIdentities is set to false: ${o}`))}catch{}let c=u.startsWith("[Amplitude] ")?u.replace("[Amplitude] ",""):u;a=a+1;let f=!1;if(n?.excludeEvents?.includes(c)||n?.includeEvents?.length&&!n?.includeEvents.includes(c)){if(n?.enrichEventProperties){let p={ignored:!0};s.event_properties={...s.event_properties,honey:p}}return i(`ignoring event: ${u}`),s}f||(i(`tracking event: ${u}`),await e(u,s.event_properties));let m=await t();return m?.geofenced&&m?.redirect_auto?(i(`dropping event: ${u}`),null):(n?.enrichEventProperties&&(s.event_properties={...s.event_properties,honey:m},i(`enriching event: ${u}. ${JSON.stringify(s.event_properties)}`)),s)}catch{return s}}}}});var r0,g1,Hf=O(()=>{t0();r0=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(t){this.config=t}amplitudePlugin(t){return Ri(this.track.bind(this),this.get.bind(this),this.identify.bind(this),t)}geofence(){window.honeypot?.geofence&&window.honeypot.geofence(),this.geofenced=!0}async geoCaptcha(){return new Promise((t,r)=>{let n=Date.now(),a=()=>{window.honeypot?.geoCaptcha?t(window.honeypot.geoCaptcha()):Date.now()-n>=5e3?r(new Error("GeoCaptcha not available: Honeypot SDK did not initialize in time.")):setTimeout(a,100)};a()})}ensureHoneypot(){window.honeypot||(window.honeypot={q:[],id:[]})}async identify(t,r,n){if(this.ensureHoneypot(),window.honeypot?.identify)window.honeypot.identify(t,r,n);else{let a={id:t,...r?{properties:r}:{},...n?{type:n}:{}};Array.isArray(window.honeypot.id)||(window.honeypot.id=[]),window.honeypot.id.push(a)}}on(t,r){this.ensureHoneypot(),window.honeypot.on?window.honeypot.on(t,r):(window.honeypot.callbacks[t]??=[]).push(r)}async flow(t,r){return this.ensureHoneypot(),new Promise((n,a)=>{let i=Date.now(),s=()=>{window&&window.honeypot&&this.didInit?n(window.honeypot.flow(t,r)):Date.now()-i>=5e3?a(new Error("Flow could not be created. Did you call the load() method first?")):setTimeout(s,100)};s()})}async track(t,r={}){this.ensureHoneypot();try{if(window.honeypot?.track)return window.honeypot.track(t,r);{let n=this.q||[];n.push([t,r]),this.q=n}}catch(n){this.config?.debug&&console.error("Error tracking event:",n)}}async init(){}maybeTime(t,r){if(this.config?.debug){if(r){console.timeEnd(t);return}console.time(t)}}load(t,r,n){return this.didLoad=!0,new Promise(a=>{let i=document.createElement("script");i.async=!0;let s=new URL(t),o=null,u=null;try{o=window.location.href}catch{}try{u=document.title}catch{}s.searchParams.append("url",o||"URL not available"),s.searchParams.append("title",u||"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(m=>{d.has(m)&&s.searchParams.append(m,d.get(m)||"")})}catch{}r&&(s.searchParams.append("identity",r),n&&s.searchParams.append("type",n));let l=new URLSearchParams(window.location.search).get("georef");l&&s.searchParams.append("georef",l),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{}i.src=s.toString(),document.head.appendChild(i);let c=this.config;i.onload=()=>{this.didInit=!0,this.maybeTime("load honeypot",!0);try{window.honeypot&&(window.honeypot.config=c)}catch{}a(window.honeypot)}})}setSessionId(t){}setDeviceId(t){}async get(t){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 a=Date.now(),i=()=>{window.honeypot&&window.honeypot.get?r(window.honeypot.get()):Date.now()-a>=2e3?n(new Error("Timeout: Honeypot SDK did not initialize in time.")):setTimeout(i,50)};i()});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"))}})()})}},g1=new r0});var ba,Gf=O(()=>{t0();ba=class{amplitudePlugin(t){return Ri(this.track.bind(this),this.get.bind(this),this.identify.bind(this),t)}}});var qf=O(()=>{Hf();Gf()});function x1(e){return e.nodeType===e.ELEMENT_NODE}function Sa(e){let t=e?.host;return Boolean(t?.shadowRoot===e)}function Ea(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function S1(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function E1(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Li(e){try{let t=e.rules||e.cssRules;return t?S1(Array.from(t,od).join("")):null}catch{return null}}function od(e){let t;if(I1(e))try{t=Li(e.styleSheet)||E1(e)}catch{}else if(T1(e)&&e.selectorText.includes(":"))return w1(e.cssText);return t||e.cssText}function w1(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function I1(e){return"styleSheet"in e}function T1(e){return"selectorText"in e}function A1(){return new Di}function g0({element:e,maskInputOptions:t,tagName:r,type:n,value:a,maskInputFn:i}){let s=a||"",o=n&&jr(n);return(t[r.toLowerCase()]||o&&t[o])&&(i?s=i(s,e):s="*".repeat(s.length)),s}function jr(e){return e.toLowerCase()}function R1(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;nu!==0))return!1}return!0}function y0(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?jr(t):null}function ud(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,a=r.pathname.match(n);return a?.[1]??null}function ld(){return _1++}function N1(e){if(e instanceof HTMLFormElement)return"form";let t=jr(e.tagName);return B1.test(t)?"div":t}function k1(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}function Pi(e,t){return(e||"").replace(L1,(r,n,a,i,s,o)=>{let u=a||s||o,l=n||i||"";if(!u)return r;if(D1.test(u)||P1.test(u))return`url(${l}${u}${l})`;if(O1.test(u))return`url(${l}${u}${l})`;if(u[0]==="/")return`url(${l}${k1(t)+u}${l})`;let c=t.split("/"),f=u.split("/");c.pop();for(let d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${l}${c.join("/")}${l})`})}function V1(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s,o=i.exec(t.substring(r));return o?(s=o[0],r+=s.length,s):""}let a=[];for(;n(M1),!(r>=t.length);){let i=n(U1);if(i.slice(-1)===",")i=Rn(e,i.substring(0,i.length-1)),a.push(i);else{let s="";i=Rn(e,i);let o=!1;for(;;){let u=t.charAt(r);if(u===""){a.push((i+s).trim());break}else if(o)u===")"&&(o=!1);else if(u===","){r+=1,a.push((i+s).trim());break}else u==="("&&(o=!0);s+=u,r+=1}}}return a.join(", ")}function Rn(e,t){return!t||t.trim()===""?t:Ki(e,t)}function F1(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Ki(e,t){let r=Xf.get(e);if(r||(r=e.createElement("a"),Xf.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function cd(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Rn(e,n):r==="srcset"?V1(e,n):r==="style"?Pi(n,Ki(e)):t==="object"&&r==="data"?Rn(e,n):n)}function fd(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function K1(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let a=e.classList[n];if(t.test(a))return!0}if(r)return e.matches(r)}catch{}return!1}function Oi(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Oi(e.parentNode,t,r):!1;for(let n=e.classList.length;n--;){let a=e.classList[n];if(t.test(a))return!0}return r?Oi(e.parentNode,t,r):!1}function dd(e,t,r,n){try{let a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(a===null)return!1;if(typeof t=="string"){if(n){if(a.closest(`.${t}`))return!0}else if(a.classList.contains(t))return!0}else if(Oi(a,t,n))return!0;if(r){if(n){if(a.closest(r))return!0}else if(a.matches(r))return!0}}catch{}return!1}function H1(e,t,r){let n=e.contentWindow;if(!n)return;let a=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){let o=setTimeout(()=>{a||(t(),a=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),a=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function G1(e,t,r){let n=!1,a;try{a=e.sheet}catch{return}if(a)return;let i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}function q1(e,t){let{doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:s,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:l,maskInputFn:c,dataURLOptions:f={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:p,newlyAddedElement:h=!1}=t,C=W1(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Je.Document,childNodes:[],compatMode:e.compatMode}:{type:Je.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Je.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return j1(e,{doc:r,blockClass:a,blockSelector:i,inlineStylesheet:o,maskInputOptions:u,maskInputFn:c,dataURLOptions:f,inlineImages:d,recordCanvas:m,keepIframeSrcFn:p,newlyAddedElement:h,rootId:C});case e.TEXT_NODE:return z1(e,{doc:r,needsMask:s,maskTextFn:l,rootId:C});case e.CDATA_SECTION_NODE:return{type:Je.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:Je.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}function W1(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function z1(e,t){var r;let{needsMask:n,maskTextFn:a,rootId:i}=t,s=e.parentNode&&e.parentNode.tagName,o=e.textContent,u=s==="STYLE"?!0:void 0,l=s==="SCRIPT"?!0:void 0;if(u&&o){try{e.nextSibling||e.previousSibling||(r=e.parentNode.sheet)!=null&&r.cssRules&&(o=Li(e.parentNode.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}o=Pi(o,Ki(t.doc))}return l&&(o="SCRIPT_PLACEHOLDER"),!u&&!l&&o&&n&&(o=a?a(o,e.parentElement):o.replace(/[\S]/g,"*")),{type:Je.Text,textContent:o||"",isStyle:u,rootId:i}}function j1(e,t){let{doc:r,blockClass:n,blockSelector:a,inlineStylesheet:i,maskInputOptions:s={},maskInputFn:o,dataURLOptions:u={},inlineImages:l,recordCanvas:c,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:m}=t,p=K1(e,n,a),h=N1(e),C={},b=e.attributes.length;for(let S=0;SB.href===e.href),_=null;S&&(_=Li(S)),_&&(delete C.rel,delete C.href,C._cssText=Pi(_,S.href))}if(h==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let S=Li(e.sheet);S&&(C._cssText=Pi(S,Ki(r)))}if(h==="input"||h==="textarea"||h==="select"){let S=e.value,_=e.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&S?C.value=g0({element:e,type:y0(e),tagName:h,value:S,maskInputOptions:s,maskInputFn:o}):_&&(C.checked=_)}if(h==="option"&&(e.selected&&!s.select?C.selected=!0:delete C.selected),h==="canvas"&&c){if(e.__context==="2d")R1(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let S=e.toDataURL(u.type,u.quality),_=r.createElement("canvas");_.width=e.width,_.height=e.height;let B=_.toDataURL(u.type,u.quality);S!==B&&(C.rr_dataURL=S)}}if(h==="img"&&l){In||(In=r.createElement("canvas"),Yf=In.getContext("2d"));let S=e,_=S.currentSrc||S.getAttribute("src")||"",B=S.crossOrigin,N=()=>{S.removeEventListener("load",N);try{In.width=S.naturalWidth,In.height=S.naturalHeight,Yf.drawImage(S,0,0),C.rr_dataURL=In.toDataURL(u.type,u.quality)}catch(G){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?N():S.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${_}! Error: ${G}`)}S.crossOrigin==="anonymous"&&(B?C.crossOrigin=B:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?N():S.addEventListener("load",N)}if(h==="audio"||h==="video"){let S=C;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),p){let{width:S,height:_}=e.getBoundingClientRect();C={class:C.class,rr_width:`${S}px`,rr_height:`${_}px`}}h==="iframe"&&!f(C.src)&&(e.contentDocument||(C.rr_src=C.src),delete C.src);let I;try{customElements.get(h)&&(I=!0)}catch{}return{type:Je.Element,tagName:h,attributes:C,childNodes:[],isSVG:F1(e)||void 0,needBlock:p,rootId:m,isCustom:I}}function Be(e){return e==null?"":e.toLowerCase()}function Y1(e,t){if(t.comment&&e.type===Je.Comment)return!0;if(e.type===Je.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ud(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Be(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Be(e.attributes.name)==="application-name"||Be(e.attributes.rel)==="icon"||Be(e.attributes.rel)==="apple-touch-icon"||Be(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Be(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Be(e.attributes.property).match(/^(og|twitter|fb):/)||Be(e.attributes.name).match(/^(og|twitter):/)||Be(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Be(e.attributes.name)==="robots"||Be(e.attributes.name)==="googlebot"||Be(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Be(e.attributes.name)==="author"||Be(e.attributes.name)==="generator"||Be(e.attributes.name)==="framework"||Be(e.attributes.name)==="publisher"||Be(e.attributes.name)==="progid"||Be(e.attributes.property).match(/^article:/)||Be(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Be(e.attributes.name)==="google-site-verification"||Be(e.attributes.name)==="yandex-verification"||Be(e.attributes.name)==="csrf-token"||Be(e.attributes.name)==="p:domain_verify"||Be(e.attributes.name)==="verify-v1"||Be(e.attributes.name)==="verification"||Be(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _n(e,t){let{doc:r,mirror:n,blockClass:a,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:c={},maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p={},inlineImages:h=!1,recordCanvas:C=!1,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S=5e3,onStylesheetLoad:_,stylesheetLoadTimeout:B=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:G=!1}=t,{needsMask:W}=t,{preserveWhiteSpace:re=!0}=t;!W&&e.childNodes&&(W=dd(e,s,o,W===void 0));let ee=q1(e,{doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:W,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,dataURLOptions:p,inlineImages:h,recordCanvas:C,keepIframeSrcFn:N,newlyAddedElement:G});if(!ee)return console.warn(e,"not serialized"),null;let ne;n.hasNode(e)?ne=n.getId(e):Y1(ee,m)||!re&&ee.type===Je.Text&&!ee.isStyle&&!ee.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Ia:ne=ld();let q=Object.assign(ee,{id:ne});if(n.add(e,q),ne===Ia)return null;b&&b(e);let Ve=!u;if(q.type===Je.Element){Ve=Ve&&!q.needBlock,delete q.needBlock;let Ee=e.shadowRoot;Ee&&Ea(Ee)&&(q.isShadowHost=!0)}if((q.type===Je.Document||q.type===Je.Element)&&Ve){m.headWhitespace&&q.type===Je.Element&&q.tagName==="head"&&(re=!1);let Ee={doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:W,maskTextClass:s,maskTextSelector:o,skipChild:u,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p,inlineImages:h,recordCanvas:C,preserveWhiteSpace:re,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:N};if(!(q.type===Je.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0))for(let fe of Array.from(e.childNodes)){let be=_n(fe,Ee);be&&q.childNodes.push(be)}if(x1(e)&&e.shadowRoot)for(let fe of Array.from(e.shadowRoot.childNodes)){let be=_n(fe,Ee);be&&(Ea(e.shadowRoot)&&(be.isShadow=!0),q.childNodes.push(be))}}return e.parentNode&&Sa(e.parentNode)&&Ea(e.parentNode)&&(q.isShadow=!0),q.type===Je.Element&&q.tagName==="iframe"&&H1(e,()=>{let Ee=e.contentDocument;if(Ee&&I){let fe=_n(Ee,{doc:Ee,mirror:n,blockClass:a,blockSelector:i,needsMask:W,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p,inlineImages:h,recordCanvas:C,preserveWhiteSpace:re,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:N});fe&&I(e,fe)}},S),q.type===Je.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&ud(q.attributes.href)==="css")&&G1(e,()=>{if(_){let Ee=_n(e,{doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:W,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p,inlineImages:h,recordCanvas:C,preserveWhiteSpace:re,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:N});Ee&&_(e,Ee)}},B),q}function X1(e,t){let{mirror:r=new Di,blockClass:n="rr-block",blockSelector:a=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:m=!1,dataURLOptions:p,preserveWhiteSpace:h,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:_,keepIframeSrcFn:B=()=>!1}=t||{};return _n(e,{doc:e,mirror:r,blockClass:n,blockSelector:a,maskTextClass:i,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:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:p,inlineImages:u,recordCanvas:l,preserveWhiteSpace:h,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:_,keepIframeSrcFn:B,newlyAddedElement:!1})}function Ct(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function Ta(e,t,r={}){let n=null,a=0;return function(...i){let s=Date.now();!a&&r.leading===!1&&(a=s);let o=t-(s-a),u=this;o<=0||o>t?(n&&(clearTimeout(n),n=null),a=s,e.apply(u,i)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{a=r.leading===!1?0:Date.now(),n=null,e.apply(u,i)},o))}}function Hi(e,t,r,n,a=window){let i=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Hi(e,t,i||{},!0)}function kn(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],a=r(n);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=a,()=>{e[t]=n}}catch{return()=>{}}}function pd(e){var t,r,n,a,i,s;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o?.documentElement.scrollLeft||((r=(t=o?.body)==null?void 0:t.parentElement)==null?void 0:r.scrollLeft)||((n=o?.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||((i=(a=o?.body)==null?void 0:a.parentElement)==null?void 0:i.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function hd(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function md(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function gd(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function bt(e,t,r,n){if(!e)return!1;let a=gd(e);if(!a)return!1;try{if(typeof t=="string"){if(a.classList.contains(t)||n&&a.closest("."+t)!==null)return!0}else if(Oi(a,t,n))return!0}catch{}return!!(r&&(a.matches(r)||n&&a.closest(r)!==null))}function Z1(e,t){return t.getId(e)!==-1}function n0(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===Ia}function yd(e,t){if(Sa(e))return!1;let r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?yd(e.parentNode,t):!0:!0}function i0(e){return Boolean(e.changedTouches)}function Q1(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function vd(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Cd(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function s0(e){return Boolean(e?.shadowRoot)}function bd(e){var t,r;let n=null;return((r=(t=e.getRootNode)==null?void 0:t.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function J1(e){let t=e,r;for(;r=bd(t);)t=r;return t}function $1(e){let t=e.ownerDocument;if(!t)return!1;let r=J1(e);return t.contains(r)}function xd(e){let t=e.ownerDocument;return t?t.contains(e)||$1(e):!1}function Qf(e){return"__ln"in e}function c0(e,t){e.delete(t),t.childNodes.forEach(r=>c0(e,r))}function $f(e,t,r){return e.length===0?!1:eC(e,t,r)}function eC(e,t,r){let n=t.parentNode;for(;n;){let a=r.getId(n);if(e.some(i=>i.id===a))return!0;n=n.parentNode}return!1}function ed(e,t){return e.size===0?!1:Sd(e,t)}function Sd(e,t){let{parentNode:r}=t;return r?e.has(r)?!0:Sd(e,r):!1}function tC(e){wa=e}function rC(){wa=void 0}function Aa(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Ed(e,t){var r,n;let a=new l0;zr.push(a),a.init(e);let i=window.MutationObserver||window.__rrMutationObserver,s=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");s&&window[s]&&(i=window[s]);let o=new i(ge(a.processMutations.bind(a)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function nC({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let a=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],o,u=Ta(ge(f=>{let d=Date.now()-o;e(s.map(m=>(m.timeOffset-=d,m)),f),s=[],o=null}),i),l=ge(Ta(ge(f=>{let d=Aa(f),{clientX:m,clientY:p}=i0(f)?f.changedTouches[0]:f;o||(o=Ui()),s.push({x:m,y:p,id:n.getId(d),timeOffset:Ui()-o}),u(typeof DragEvent<"u"&&f instanceof DragEvent?pe.Drag:f instanceof MouseEvent?pe.MouseMove:pe.TouchMove)}),a,{trailing:!1})),c=[Ct("mousemove",l,r),Ct("touchmove",l,r),Ct("drag",l,r)];return ge(()=>{c.forEach(f=>f())})}function aC({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let s=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,o=[],u=null,l=c=>f=>{let d=Aa(f);if(bt(d,n,a,!0))return;let m=null,p=c;if("pointerType"in f){switch(f.pointerType){case"mouse":m=hr.Mouse;break;case"touch":m=hr.Touch;break;case"pen":m=hr.Pen;break}m===hr.Touch?wt[c]===wt.MouseDown?p="TouchStart":wt[c]===wt.MouseUp&&(p="TouchEnd"):hr.Pen}else i0(f)&&(m=hr.Touch);m!==null?(u=m,(p.startsWith("Touch")&&m===hr.Touch||p.startsWith("Mouse")&&m===hr.Mouse)&&(m=null)):wt[c]===wt.Click&&(m=u,u=null);let h=i0(f)?f.changedTouches[0]:f;if(!h)return;let C=r.getId(d),{clientX:b,clientY:I}=h;ge(e)({type:wt[p],id:C,x:b,y:I,...m!==null&&{pointerType:m}})};return Object.keys(wt).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&s[c]!==!1).forEach(c=>{let f=jr(c),d=l(c);if(window.PointerEvent)switch(wt[c]){case wt.MouseDown:case wt.MouseUp:f=f.replace("mouse","pointer");break;case wt.TouchStart:case wt.TouchEnd:return}o.push(Ct(f,d,t))}),ge(()=>{o.forEach(c=>c())})}function wd({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,sampling:i}){let s=ge(Ta(ge(o=>{let u=Aa(o);if(!u||bt(u,n,a,!0))return;let l=r.getId(u);if(u===t&&t.defaultView){let c=pd(t.defaultView);e({id:l,x:c.left,y:c.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Ct("scroll",s,t)}function iC({viewportResizeCb:e},{win:t}){let r=-1,n=-1,a=ge(Ta(ge(()=>{let i=hd(),s=md();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return Ct("resize",a,t)}function oC({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,ignoreClass:i,ignoreSelector:s,maskInputOptions:o,maskInputFn:u,sampling:l,userTriggeredOnInput:c}){function f(I){let S=Aa(I),_=I.isTrusted,B=S&&S.tagName;if(S&&B==="OPTION"&&(S=S.parentElement),!S||!B||sC.indexOf(B)<0||bt(S,n,a,!0)||S.classList.contains(i)||s&&S.matches(s))return;let N=S.value,G=!1,W=y0(S)||"";W==="radio"||W==="checkbox"?G=S.checked:(o[B.toLowerCase()]||o[W])&&(N=g0({element:S,maskInputOptions:o,tagName:B,type:W,value:N,maskInputFn:u})),d(S,c?{text:N,isChecked:G,userTriggered:_}:{text:N,isChecked:G});let re=S.name;W==="radio"&&re&&G&&t.querySelectorAll(`input[type="radio"][name="${re}"]`).forEach(ee=>{if(ee!==S){let ne=ee.value;d(ee,c?{text:ne,isChecked:!G,userTriggered:!1}:{text:ne,isChecked:!G})}})}function d(I,S){let _=td.get(I);if(!_||_.text!==S.text||_.isChecked!==S.isChecked){td.set(I,S);let B=r.getId(I);ge(e)({...S,id:B})}}let p=(l.input==="last"?["change"]:["input","change"]).map(I=>Ct(I,ge(f),t)),h=t.defaultView;if(!h)return()=>{p.forEach(I=>I())};let C=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),b=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&p.push(...b.map(I=>Hi(I[0],I[1],{set(){ge(f)({target:this,isTrusted:!1})}},!1,h))),ge(()=>{p.forEach(I=>I())})}function Mi(e){let t=[];function r(n,a){if(_i("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||_i("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||_i("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||_i("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);a.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);a.unshift(s)}return a}return r(e,t)}function Pr(e,t,r){let n,a;return e?(e.ownerNode?n=t.getId(e.ownerNode):a=r.getId(e),{styleId:a,id:n}):{}}function uC({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let a=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:ge((c,f,d)=>{let[m,p]=d,{id:h,styleId:C}=Pr(f,t,r.styleMirror);return(h&&h!==-1||C&&C!==-1)&&e({id:h,styleId:C,adds:[{rule:m,index:p}]}),c.apply(f,d)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ge((c,f,d)=>{let[m]=d,{id:p,styleId:h}=Pr(f,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,removes:[{index:m}]}),c.apply(f,d)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ge((c,f,d)=>{let[m]=d,{id:p,styleId:h}=Pr(f,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,replace:m}),c.apply(f,d)})}));let o;n.CSSStyleSheet.prototype.replaceSync&&(o=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:ge((c,f,d)=>{let[m]=d,{id:p,styleId:h}=Pr(f,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,replaceSync:m}),c.apply(f,d)})}));let u={};Bi("CSSGroupingRule")?u.CSSGroupingRule=n.CSSGroupingRule:(Bi("CSSMediaRule")&&(u.CSSMediaRule=n.CSSMediaRule),Bi("CSSConditionRule")&&(u.CSSConditionRule=n.CSSConditionRule),Bi("CSSSupportsRule")&&(u.CSSSupportsRule=n.CSSSupportsRule));let l={};return Object.entries(u).forEach(([c,f])=>{l[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(l[c].insertRule,{apply:ge((d,m,p)=>{let[h,C]=p,{id:b,styleId:I}=Pr(m.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||I&&I!==-1)&&e({id:b,styleId:I,adds:[{rule:h,index:[...Mi(m),C||0]}]}),d.apply(m,p)})}),f.prototype.deleteRule=new Proxy(l[c].deleteRule,{apply:ge((d,m,p)=>{let[h]=p,{id:C,styleId:b}=Pr(m.parentStyleSheet,t,r.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,removes:[{index:[...Mi(m),h]}]}),d.apply(m,p)})})}),ge(()=>{n.CSSStyleSheet.prototype.insertRule=a,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),o&&(n.CSSStyleSheet.prototype.replaceSync=o),Object.entries(u).forEach(([c,f])=>{f.prototype.insertRule=l[c].insertRule,f.prototype.deleteRule=l[c].deleteRule})})}function Id({mirror:e,stylesheetManager:t},r){var n,a,i;let s=null;r.nodeName==="#document"?s=e.getId(r):s=e.getId(r.host);let o=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(i=(a=r.ownerDocument)==null?void 0:a.defaultView)==null?void 0:i.ShadowRoot,u=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!o||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var l;return(l=u.get)==null?void 0:l.call(this)},set(l){var c;let f=(c=u.set)==null?void 0:c.call(this,l);if(s!==null&&s!==-1)try{t.adoptStyleSheets(l,s)}catch{}return f}}),ge(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function lC({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:a}){let i=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ge((o,u,l)=>{var c;let[f,d,m]=l;if(r.has(f))return i.apply(u,[f,d,m]);let{id:p,styleId:h}=Pr((c=u.parentRule)==null?void 0:c.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:f,value:d,priority:m},index:Mi(u.parentRule)}),o.apply(u,l)})});let s=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ge((o,u,l)=>{var c;let[f]=l;if(r.has(f))return s.apply(u,[f]);let{id:d,styleId:m}=Pr((c=u.parentRule)==null?void 0:c.parentStyleSheet,t,n.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,remove:{property:f},index:Mi(u.parentRule)}),o.apply(u,l)})}),ge(()=>{a.CSSStyleDeclaration.prototype.setProperty=i,a.CSSStyleDeclaration.prototype.removeProperty=s})}function cC({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:a,doc:i}){let s=ge(u=>Ta(ge(l=>{let c=Aa(l);if(!c||bt(c,t,r,!0))return;let{currentTime:f,volume:d,muted:m,playbackRate:p,loop:h}=c;e({type:u,id:n.getId(c),currentTime:f,volume:d,muted:m,playbackRate:p,loop:h})}),a.media||500)),o=[Ct("play",s(An.Play),i),Ct("pause",s(An.Pause),i),Ct("seeked",s(An.Seeked),i),Ct("volumechange",s(An.VolumeChange),i),Ct("ratechange",s(An.RateChange),i)];return ge(()=>{o.forEach(u=>u())})}function fC({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],a=new WeakMap,i=r.FontFace;r.FontFace=function(u,l,c){let f=new i(u,l,c);return a.set(f,{family:u,buffer:typeof l!="string",descriptors:c,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),f};let s=kn(t.fonts,"add",function(o){return function(u){return setTimeout(ge(()=>{let l=a.get(u);l&&(e(l),a.delete(u))}),0),o.apply(this,[u])}});return n.push(()=>{r.FontFace=i}),n.push(s),ge(()=>{n.forEach(o=>o())})}function dC(e){let{doc:t,mirror:r,blockClass:n,blockSelector:a,selectionCb:i}=e,s=!0,o=ge(()=>{let u=t.getSelection();if(!u||s&&u?.isCollapsed)return;s=u.isCollapsed||!1;let l=[],c=u.rangeCount||0;for(let f=0;f{}:kn(r.customElements,"define",function(a){return function(i,s,o){try{t({define:{name:i}})}catch{console.warn(`Custom element callback failed for ${i}`)}return a.apply(this,[i,s,o])}})}function hC(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:a,scrollCb:i,viewportResizeCb:s,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:f,fontCb:d,selectionCb:m,customElementCb:p}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),r(...h)},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),n(...h)},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),a(...h)},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),i(...h)},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),s(...h)},e.inputCb=(...h)=>{t.input&&t.input(...h),o(...h)},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),u(...h)},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),l(...h)},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),c(...h)},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),f(...h)},e.fontCb=(...h)=>{t.font&&t.font(...h),d(...h)},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),m(...h)},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),p(...h)}}function mC(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};hC(e,t);let n;e.recordDOM&&(n=Ed(e,e.doc));let a=nC(e),i=aC(e),s=wd(e),o=iC(e,{win:r}),u=oC(e),l=cC(e),c=()=>{},f=()=>{},d=()=>{},m=()=>{};e.recordDOM&&(c=uC(e,{win:r}),f=Id(e,e.doc),d=lC(e,{win:r}),e.collectFonts&&(m=fC(e)));let p=dC(e),h=pC(e),C=[];for(let b of e.plugins)C.push(b.observer(b.callback,r,b.options));return ge(()=>{zr.forEach(b=>b.reset()),n?.disconnect(),a(),i(),s(),o(),u(),l(),c(),f(),d(),m(),p(),h(),C.forEach(b=>b())})}function _i(e){return typeof window[e]<"u"}function Bi(e){return Boolean(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}function vC(e,t){let r=rd.get(e);return r||(r=new Map,rd.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Ni(e,t,r){if(e instanceof Array)return e.map(n=>Ni(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let n=e.constructor.name,a=yC(e);return{rr_type:n,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ni(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let n=e.constructor.name,{src:a}=e;return{rr_type:n,src:a}}else if(e instanceof HTMLCanvasElement){let n="HTMLImageElement",a=e.toDataURL();return{rr_type:n,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ni(e.data,t,r),e.width,e.height]};if(Rd(e,t)||typeof e=="object"){let n=e.constructor.name,a=Td(e,t,r);return{rr_type:n,index:a}}}}return e}function CC(e,t,r,n){let a=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of i)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;let o=kn(t.CanvasRenderingContext2D.prototype,s,function(u){return function(...l){return bt(this.canvas,r,n,!0)||setTimeout(()=>{let c=Ad(l,t,this);e(this.canvas,{type:Nn["2D"],property:s,args:c})},0),u.apply(this,l)}});a.push(o)}catch{let o=Hi(t.CanvasRenderingContext2D.prototype,s,{set(u){e(this.canvas,{type:Nn["2D"],property:s,args:[u],setter:!0})}});a.push(o)}return()=>{a.forEach(s=>s())}}function bC(e){return e==="experimental-webgl"?"webgl":e}function nd(e,t,r,n){let a=[];try{let i=kn(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(o,...u){if(!bt(this,t,r,!0)){let l=bC(o);if("__context"in this||(this.__context=l),n&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){let c=u[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[o,...u])}});a.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(i=>i())}}function ad(e,t,r,n,a,i,s){let o=[],u=Object.getOwnPropertyNames(e);for(let l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let c=kn(e,l,function(f){return function(...d){let m=f.apply(this,d);if(Td(m,s,this),"tagName"in this.canvas&&!bt(this.canvas,n,a,!0)){let p=Ad(d,s,this),h={type:t,property:l,args:p};r(this.canvas,h)}return m}});o.push(c)}catch{let c=Hi(e,l,{set(f){r(this.canvas,{type:t,property:l,args:[f],setter:!0})}});o.push(c)}return o}function xC(e,t,r,n,a){let i=[];return i.push(...ad(t.WebGLRenderingContext.prototype,Nn.WebGL,e,r,n,a,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...ad(t.WebGL2RenderingContext.prototype,Nn.WebGL2,e,r,n,a,t)),()=>{i.forEach(s=>s())}}function EC(e){let t;try{if(t=id&&(window.URL||window.webkitURL).createObjectURL(id),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+_d,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}function Ln(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:a="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:o=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:m,maskInputFn:p,maskTextFn:h,hooks:C,packFn:b,sampling:I={},dataURLOptions:S={},mousemoveWait:_,recordDOM:B=!0,recordCanvas:N=!1,recordCrossOriginIframes:G=!1,recordAfter:W=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:re=!1,collectFonts:ee=!1,inlineImages:ne=!1,plugins:q,keepIframeSrcFn:Ve=()=>!1,ignoreCSSAttributes:Ee=new Set([]),errorHandler:fe}=e;tC(fe);let be=G?window.parent===window:!0,H=!1;if(!be)try{window.parent.document&&(H=!1)}catch{H=!0}if(be&&!t)throw new Error("emit function is required");if(!be&&!H)return()=>{};_!==void 0&&I.mousemove===void 0&&(I.mousemove=_),zt.reset();let Ut=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},jt=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};Q1();let Fe,De=0,Ke=X=>{for(let we of q||[])we.eventProcessor&&(X=we.eventProcessor(X));return b&&!H&&(X=b(X)),X};Ge=(X,we)=>{var ae;let ie=X;if(ie.timestamp=Ui(),(ae=zr[0])!=null&&ae.isFrozen()&&ie.type!==Ce.FullSnapshot&&!(ie.type===Ce.IncrementalSnapshot&&ie.data.source===pe.Mutation)&&zr.forEach(Ie=>Ie.unfreeze()),be)t?.(Ke(ie),we);else if(H){let Ie={type:"rrweb",event:Ke(ie),origin:window.location.origin,isCheckout:we};window.parent.postMessage(Ie,"*")}if(ie.type===Ce.FullSnapshot)Fe=ie,De=0;else if(ie.type===Ce.IncrementalSnapshot){if(ie.data.source===pe.Mutation&&ie.data.isAttachIframe)return;De++;let Ie=n&&De>=n,Te=r&&ie.timestamp-Fe.timestamp>r;(Ie||Te)&&ki(!0)}};let qe=X=>{Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Mutation,...X}})},Ze=X=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Scroll,...X}}),Qe=X=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.CanvasMutation,...X}}),$e=X=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.AdoptedStyleSheet,...X}}),Pe=new h0({mutationCb:qe,adoptedStyleSheetCb:$e}),Oe=new f0({mirror:zt,mutationCb:qe,stylesheetManager:Pe,recordCrossOriginIframes:G,wrappedEmit:Ge});for(let X of q||[])X.getMirror&&X.getMirror({nodeMirror:zt,crossOriginIframeMirror:Oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Oe.crossOriginIframeStyleMirror});let ze=new m0;a0=new p0({recordCanvas:N,mutationCb:Qe,win:window,blockClass:a,blockSelector:i,mirror:zt,sampling:I.canvas,dataURLOptions:S});let We=new d0({mutationCb:qe,scrollCb:Ze,bypassOptions:{blockClass:a,blockSelector:i,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:Ut,dataURLOptions:S,maskTextFn:h,maskInputFn:p,recordCanvas:N,inlineImages:ne,sampling:I,slimDOMOptions:jt,iframeManager:Oe,stylesheetManager:Pe,canvasManager:a0,keepIframeSrcFn:Ve,processedNodeManager:ze},mirror:zt});ki=(X=!1)=>{if(!B)return;Ge({type:Ce.Meta,data:{href:window.location.href,width:md(),height:hd()}},X),Pe.reset(),We.init(),zr.forEach(ae=>ae.lock());let we=X1(document,{mirror:zt,blockClass:a,blockSelector:i,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:Ut,maskTextFn:h,slimDOM:jt,dataURLOptions:S,recordCanvas:N,inlineImages:ne,onSerialize:ae=>{vd(ae,zt)&&Oe.addIframe(ae),Cd(ae,zt)&&Pe.trackLinkElement(ae),s0(ae)&&We.addShadowRoot(ae.shadowRoot,document)},onIframeLoad:(ae,ie)=>{Oe.attachIframe(ae,ie),We.observeAttachShadow(ae)},onStylesheetLoad:(ae,ie)=>{Pe.attachLinkElement(ae,ie)},keepIframeSrcFn:Ve});if(!we)return console.warn("Failed to snapshot the document");Ge({type:Ce.FullSnapshot,data:{node:we,initialOffset:pd(window)}},X),zr.forEach(ae=>ae.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,zt.getId(document))};try{let X=[],we=ie=>{var Ie;return ge(mC)({mutationCb:qe,mousemoveCb:(Te,Gi)=>Ge({type:Ce.IncrementalSnapshot,data:{source:Gi,positions:Te}}),mouseInteractionCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.MouseInteraction,...Te}}),scrollCb:Ze,viewportResizeCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.ViewportResize,...Te}}),inputCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Input,...Te}}),mediaInteractionCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.MediaInteraction,...Te}}),styleSheetRuleCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.StyleSheetRule,...Te}}),styleDeclarationCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.StyleDeclaration,...Te}}),canvasMutationCb:Qe,fontCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Font,...Te}}),selectionCb:Te=>{Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Selection,...Te}})},customElementCb:Te=>{Ge({type:Ce.IncrementalSnapshot,data:{source:pe.CustomElement,...Te}})},blockClass:a,ignoreClass:s,ignoreSelector:o,maskTextClass:u,maskTextSelector:l,maskInputOptions:Ut,inlineStylesheet:c,sampling:I,recordDOM:B,recordCanvas:N,inlineImages:ne,userTriggeredOnInput:re,collectFonts:ee,doc:ie,maskInputFn:p,maskTextFn:h,keepIframeSrcFn:Ve,blockSelector:i,slimDOMOptions:jt,dataURLOptions:S,mirror:zt,iframeManager:Oe,stylesheetManager:Pe,shadowDomManager:We,processedNodeManager:ze,canvasManager:a0,ignoreCSSAttributes:Ee,plugins:((Ie=q?.filter(Te=>Te.observer))==null?void 0:Ie.map(Te=>({observer:Te.observer,options:Te.options,callback:Gi=>Ge({type:Ce.Plugin,data:{plugin:Te.name,payload:Gi}})})))||[]},C)};Oe.addLoadListener(ie=>{try{X.push(we(ie.contentDocument))}catch(Ie){console.warn(Ie)}});let ae=()=>{ki(),X.push(we(document)),Fi=!0};return document.readyState==="interactive"||document.readyState==="complete"?ae():(X.push(Ct("DOMContentLoaded",()=>{Ge({type:Ce.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&ae()})),X.push(Ct("load",()=>{Ge({type:Ce.Load,data:{}}),W==="load"&&ae()},window))),()=>{X.forEach(ie=>ie()),ze.destroy(),Fi=!1,rC()}}catch(X){console.warn(X)}}var y1,v1,M,Wf,C1,b1,zf,Je,Di,jf,_1,B1,Ia,In,Yf,L1,D1,P1,O1,U1,M1,Xf,Tn,Zf,Ui,o0,Ce,pe,wt,hr,Nn,An,u0,Jf,l0,wa,ge,zr,sC,td,Vi,f0,d0,Bn,gC,xa,yC,rd,Td,Ad,Rd,_d,SC,id,p0,h0,m0,Ge,ki,a0,Fi,zt,sd,Bd=O(()=>{y1=Object.defineProperty,v1=(e,t,r)=>t in e?y1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>(v1(e,typeof t!="symbol"?t+"":t,r),r),C1=Object.defineProperty,b1=(e,t,r)=>t in e?C1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zf=(e,t,r)=>(b1(e,typeof t!="symbol"?t+"":t,r),r),Je=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Je||{});Di=class{constructor(){zf(this,"idNodeMap",new Map),zf(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let a=this.nodeMetaMap.get(n);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};jf="__rrweb_original__";_1=1,B1=new RegExp("[^a-z0-9-_:]"),Ia=-2;L1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D1=/^(?:[a-z+]+:)?\/\//i,P1=/^www\..*/i,O1=/^(data:)([^,]*),(.*)/i;U1=/^[^ \t\n\r\u000c]+/,M1=/^[, \t\n\r\u000c]+/;Xf=new WeakMap;Tn=`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.`,Zf={map:{},getId(){return console.error(Tn),-1},getNode(){return console.error(Tn),null},removeNodeFromMap(){console.error(Tn)},has(){return console.error(Tn),!1},reset(){console.error(Tn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Zf=new Proxy(Zf,{get(e,t,r){return t==="map"&&console.error(Tn),Reflect.get(e,t,r)}}));Ui=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ui=()=>new Date().getTime());o0=class{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};Ce=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Ce||{}),pe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(pe||{}),wt=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(wt||{}),hr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(hr||{}),Nn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Nn||{}),An=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(An||{});u0=class{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n`${e}@${t}`,l0=class{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,n=new u0,a=u=>{let l=u,c=Ia;for(;c===Ia;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},i=u=>{if(!u.parentNode||!xd(u)||u.parentNode.tagName==="TEXTAREA")return;let l=Sa(u.parentNode)?this.mirror.getId(bd(u)):this.mirror.getId(u.parentNode),c=a(u);if(l===-1||c===-1)return n.addNode(u);let f=_n(u,{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:d=>{vd(d,this.mirror)&&this.iframeManager.addIframe(d),Cd(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),s0(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(d,m)=>{this.iframeManager.attachIframe(d,m),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,m)=>{this.stylesheetManager.attachLinkElement(d,m)}});f&&(t.push({parentId:l,nextId:c,node:f}),r.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let u of this.movedSet)$f(this.removes,u,this.mirror)&&!this.movedSet.has(u.parentNode)||i(u);for(let u of this.addedSet)!ed(this.droppedSet,u)&&!$f(this.removes,u,this.mirror)||ed(this.movedSet,u)?i(u):this.droppedSet.add(u);let s=null;for(;n.length;){let u=null;if(s){let l=this.mirror.getId(s.value.parentNode),c=a(s.value);l!==-1&&c!==-1&&(u=s)}if(!u){let l=n.tail;for(;l;){let c=l;if(l=l.previous,c){let f=this.mirror.getId(c.value.parentNode);if(a(c.value)===-1)continue;if(f!==-1){u=c;break}else{let m=c.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=m.parentNode.host;if(this.mirror.getId(p)!==-1){u=c;break}}}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}s=u.previous,n.removeNode(u.value),i(u.value)}let o={texts:this.texts.map(u=>{let l=u.node;return l.parentNode&&l.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(l.parentNode),{id:this.mirror.getId(l),value:u.value}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{let{attributes:l}=u;if(typeof l.style=="string"){let c=JSON.stringify(u.styleDiff),f=JSON.stringify(u._unchangedStyles);c.length!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!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.movedMap={},this.mutationCb(o))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(t.childNodes,n=>n.textContent||"").join("")}),M(this,"processMutation",t=>{if(!n0(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=t.target.textContent;!bt(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:dd(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,gd(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,a=t.target.getAttribute(n);if(n==="value"){let s=y0(r);a=g0({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:a,maskInputFn:this.maskInputFn})}if(bt(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!fd(r.tagName,n)&&(i.attributes[n]=cd(this.doc,jr(r.tagName),jr(n),a),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let o of Array.from(r.style)){let u=r.style.getPropertyValue(o),l=r.style.getPropertyPriority(o);u!==s.style.getPropertyValue(o)||l!==s.style.getPropertyPriority(o)?l===""?i.styleDiff[o]=u:i.styleDiff[o]=[u,l]:i._unchangedStyles[o]=[u,l]}for(let o of Array.from(s.style))r.style.getPropertyValue(o)===""&&(i.styleDiff[o]=!1)}break}case"childList":{if(bt(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),a=Sa(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);bt(t.target,this.blockClass,this.blockSelector,!1)||n0(r,this.mirror,this.slimDOMOptions)||!Z1(r,this.mirror)||(this.addedSet.has(r)?(c0(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||yd(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Jf(n,a)]?c0(this.movedSet,r):this.removes.push({parentId:a,id:n,isShadow:Sa(t.target)&&Ea(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(n0(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Jf(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);bt(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(n=>this.genAdds(n)),s0(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["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]=t[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()}};ge=e=>wa?(...r)=>{try{return e(...r)}catch(n){if(wa&&wa(n)===!0)return;throw n}}:e,zr=[];sC=["INPUT","TEXTAREA","SELECT"],td=new WeakMap;Vi=class{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,a){let i=n||this.getIdToRemoteIdMap(t),s=a||this.getRemoteIdToIdMap(t),o=i.get(r);return o||(o=this.generateIdFn(),i.set(r,o),s.set(o,r)),o}getIds(t,r){let n=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,a))}getRemoteId(t,r,n){let a=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let i=a.get(r);return i||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(a=>this.getRemoteId(t,a,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},f0=class{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Vi(ld)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n,a;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(a=this.loadListener)==null||a.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let a=this.crossOriginIframeMap.get(t.source);if(!a)return;let i=this.transformCrossOriginEvent(a,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case Ce.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let a=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(r.data.node,a),{timestamp:r.timestamp,type:Ce.IncrementalSnapshot,data:{source:pe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ce.Meta:case Ce.Load:case Ce.DomContentLoaded:return!1;case Ce.Plugin:return r;case Ce.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case Ce.IncrementalSnapshot:switch(r.data.source){case pe.Mutation:return r.data.adds.forEach(a=>{this.replaceIds(a,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,t);let i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(a.node,i)}),r.data.removes.forEach(a=>{this.replaceIds(a,t,["parentId","id"])}),r.data.attributes.forEach(a=>{this.replaceIds(a,t,["id"])}),r.data.texts.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case pe.Drag:case pe.TouchMove:case pe.MouseMove:return r.data.positions.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case pe.ViewportResize:return!1;case pe.MediaInteraction:case pe.MouseInteraction:case pe.Scroll:case pe.CanvasMutation:case pe.Input:return this.replaceIds(r.data,t,["id"]),r;case pe.StyleSheetRule:case pe.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case pe.Font:return r;case pe.Selection:return r.data.ranges.forEach(a=>{this.replaceIds(a,t,["start","end"])}),r;case pe.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(a=>{this.replaceStyleIds(a,t,["styleId"])}),r}}return!1}replace(t,r,n,a){for(let i of a)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Je.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},d0=class{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Ea(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let n=Ed({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(wd({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Id({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(kn(t.prototype,"attachShadow",function(a){return function(i){let s=a.call(this,i);return this.shadowRoot&&xd(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Bn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(xa=0;xa>2],a+=Bn[(t[r]&3)<<4|t[r+1]>>4],a+=Bn[(t[r+1]&15)<<2|t[r+2]>>6],a+=Bn[t[r+2]&63];return n%3===2?a=a.substring(0,a.length-1)+"=":n%3===1&&(a=a.substring(0,a.length-2)+"=="),a},rd=new Map;Td=(e,t,r)=>{if(!e||!(Rd(e,t)||typeof e=="object"))return;let n=e.constructor.name,a=vC(r,n),i=a.indexOf(e);return i===-1&&(i=a.length,a.push(e)),i};Ad=(e,t,r)=>e.map(n=>Ni(n,t,r)),Rd=(e,t)=>{let n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(a=>typeof t[a]=="function");return Boolean(n.find(a=>e instanceof t[a]))};_d="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpCiAgICAgICAgcmV0dXJuIHRyYW5zcGFyZW50QmxvYk1hcC5nZXQoaWQpOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIHRyYW5zcGFyZW50QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgIHJldHVybiBiYXNlNjQ7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gIiI7CiAgICB9CiAgfQogIGNvbnN0IHdvcmtlciA9IHNlbGY7CiAgd29ya2VyLm9ubWVzc2FnZSA9IGFzeW5jIGZ1bmN0aW9uKGUpIHsKICAgIGlmICgiT2Zmc2NyZWVuQ2FudmFzIiBpbiBnbG9iYWxUaGlzKSB7CiAgICAgIGNvbnN0IHsgaWQsIGJpdG1hcCwgd2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMgfSA9IGUuZGF0YTsKICAgICAgY29uc3QgdHJhbnNwYXJlbnRCYXNlNjQgPSBnZXRUcmFuc3BhcmVudEJsb2JGb3IoCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGRhdGFVUkxPcHRpb25zCiAgICAgICk7CiAgICAgIGNvbnN0IG9mZnNjcmVlbiA9IG5ldyBPZmZzY3JlZW5DYW52YXMod2lkdGgsIGhlaWdodCk7CiAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCIyZCIpOwogICAgICBjdHguZHJhd0ltYWdlKGJpdG1hcCwgMCwgMCk7CiAgICAgIGJpdG1hcC5jbG9zZSgpOwogICAgICBjb25zdCBibG9iID0gYXdhaXQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOwogICAgICBjb25zdCB0eXBlID0gYmxvYi50eXBlOwogICAgICBjb25zdCBhcnJheUJ1ZmZlciA9IGF3YWl0IGJsb2IuYXJyYXlCdWZmZXIoKTsKICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsKICAgICAgaWYgKCFsYXN0QmxvYk1hcC5oYXMoaWQpICYmIGF3YWl0IHRyYW5zcGFyZW50QmFzZTY0ID09PSBiYXNlNjQpIHsKICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB9CiAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpCiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UoewogICAgICAgIGlkLAogICAgICAgIHR5cGUsCiAgICAgICAgYmFzZTY0LAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodAogICAgICB9KTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkOiBlLmRhdGEuaWQgfSk7CiAgICB9CiAgfTsKfSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1CWjFyN1JKRC5qcy5tYXAK",SC=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),id=typeof window<"u"&&window.Blob&&new Blob([SC(_d)],{type:"text/javascript;charset=utf-8"});p0=class{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(u,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(l)});let{sampling:r="all",win:n,blockClass:a,blockSelector:i,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,a,i),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,a,i,{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(t,r,n,a,i){let s=nd(r,n,a,!0),o=new Map,u=new EC;u.onmessage=p=>{let{id:h}=p.data;if(o.set(h,!1),!("base64"in p.data))return;let{base64:C,type:b,width:I,height:S}=p.data;this.mutationCb({id:h,type:Nn["2D"],commands:[{property:"clearRect",args:[0,0,I,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:b}]},0,0]}]})};let l=1e3/t,c=0,f,d=()=>{let p=[];return r.document.querySelectorAll("canvas").forEach(h=>{bt(h,n,a,!0)||p.push(h)}),p},m=p=>{if(c&&p-c{var C;let b=this.mirror.getId(h);if(o.get(b)||h.width===0||h.height===0)return;if(o.set(b,!0),["webgl","webgl2"].includes(h.__context)){let S=h.getContext(h.__context);((C=S?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}let I=await createImageBitmap(h);u.postMessage({id:b,bitmap:I,width:h.width,height:h.height,dataURLOptions:i.dataURLOptions},[I])}),f=requestAnimationFrame(m)};f=requestAnimationFrame(m),this.resetObservers=()=>{s(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=nd(t,r,n,!1),i=CC(this.processMutation.bind(this),t,r,n),s=xC(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{a(),i(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let a=n.map(s=>{let{type:o,...u}=s;return u}),{type:i}=n[0];this.mutationCb({id:r,type:i,commands:a}),this.pendingCanvasMutations.delete(t)}},h0=class{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new o0),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},a=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),a.push({styleId:s,rules:Array.from(i.rules||CSSRule,(o,u)=>({rule:od(o),index:u}))})),n.styleIds.push(s)}a.length>0&&(n.styles=a),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},m0=class{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(a=>a!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Fi=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Wf=e.contentWindow)==null?void 0:Wf.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}zt=A1();Ln.addCustomEvent=(e,t)=>{if(!Fi)throw new Error("please add custom event after start recording");Ge({type:Ce.Custom,data:{tag:e,payload:t}})};Ln.freezePage=()=>{zr.forEach(e=>e.freeze())};Ln.takeFullSnapshot=e=>{if(!Fi)throw new Error("please take full snapshot after start recording");ki(e)};Ln.mirror=zt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(sd||(sd={}))});var v0,wC,C0,Nd=O(()=>{e0();Bd();v0=class{constructor(){this.recordingEvents=[];this.batchInterval=1e4;this.intervalId=null}setEvent(t){this.event_name=t}maybeRecord(t){let n=t?.dataCapture?.sessionReplay,a=n?.maskAllInputs!==!1||!0;if(n?.enabled&&n?.id){this.startBatchSending(t);let i=Ln({maskAllInputs:a,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(t),i()})}}startBatchSending(t){this.intervalId=setInterval(()=>{this.sendBatch(t)},this.batchInterval)}async sendBatch(t){let r=t?.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 Ot.post(r,"session_replay",n)}catch(a){console.error("Failed to send session recording batch:",a),this.recordingEvents.unshift(...n.events)}}},wC=new v0,C0=wC});var kd,Ld=O(()=>{kd=`
/* 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 Yr,Dd=O(()=>{Ld();Yr=class{static injectCSS(){let t="nicebox-styles";if(!document.getElementById(t)){let r=document.createElement("style");r.id=t,r.textContent=kd,document.head.appendChild(r)}}static cleanup(){if(this.modalContainer){this.modalContainer.classList.remove("nicebox--open"),this.modalContainer.classList.add("nicebox--close");let t=this.modalContainer.__config;setTimeout(()=>{this.modalContainer?.remove(),this.modalContainer=null,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null),t?.onDestroy?.()},300)}}static setLoading(t,r,n){let a=this.modalContainer?.querySelectorAll("button:not([disabled])");if(r){a?.forEach(s=>{s!==t&&(n?s.style.display="none":s.disabled=!0)});let i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("width","24"),i.setAttribute("height","24"),i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("style",`
position: absolute;
top: -12px;
right: -12px;
`),i.innerHTML=`
`,i.classList.add("loading-spinner"),t.appendChild(i)}else a?.forEach(s=>{n?s.style.display="":s.disabled=!1}),t.querySelector(".loading-spinner")?.remove()}static createModal(t){let r=document.createElement("div");r.__config=t,r.className="nicebox";let n=document.createElement("div");n.className="nicebox__overlay",r.appendChild(n);let a=document.createElement("div");a.className="nicebox__content",r.appendChild(a);let i=document.createElement("h2");if(i.textContent=t.title,i.className="nicebox__title",a.appendChild(i),t.description){let s=document.createElement("p");s.textContent=t.description,s.className="nicebox__description",a.appendChild(s)}if(t.timer){let s;t.showTimer&&(s=document.createElement("div"),s.className="nicebox__timer",s.style.position="absolute",s.style.top="10px",s.style.right="10px",a.appendChild(s));let o=()=>{let u=new Date,l=typeof t.timer=="string"?new Date(t.timer):t.timer,c=l?l.getTime()-u.getTime():0;if(c<=0){clearInterval(this.countdownInterval),t.timerExpiryLink?window.location.href=t.timerExpiryLink:this.cleanup();return}let f=Math.floor(c/1e3%60),d=Math.floor(c/(1e3*60)%60),m=Math.floor(c/(1e3*60*60)%24),p=Math.floor(c/(1e3*60*60*24));s&&(s.textContent=p>0?`${p}d ${m}h ${d}m`:m>0?`${m}h ${d}m`:`${d}m ${f}s`)};o(),this.countdownInterval=setInterval(o,1e3)}if(t.buttons?.length){let s=document.createElement("div");s.className="nicebox__buttons",t.buttons.forEach(o=>{let u=document.createElement("button");u.textContent=o.text;let l={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)}};u.addEventListener("click",async()=>{if(!this.loading){this.loading=!0,this.setLoading(u,!0,o.hideOthersOnClick||!1);try{o?.click?(await o.click(l,o,u),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.";l.setDescription(f),console.error("Dialog error:",c)}finally{this.setLoading(u,!1,o.hideOthersOnClick||!1),this.loading=!1,u.disabled=!1,u.textContent=o?.text||u.textContent,o?.style&&Object.assign(u.style,o.style)}}}),o.style&&Object.assign(u.style,o.style),o.class&&u.classList.add(o.class),s.appendChild(u)}),a.appendChild(s)}return t.disallowOutsideClick?n.addEventListener("click",s=>s.stopPropagation()):n.addEventListener("click",this.cleanup.bind(this)),r}static fire(t){if(this.modalContainer)return;this.injectCSS(),this.cleanup();let r=this.createModal(t);t.animationClass&&r.classList.add(t.animationClass),document.body.appendChild(r),setTimeout(()=>{r.classList.add("nicebox--open")},0),this.modalContainer=r}};Yr.modalContainer=null,Yr.loading=!1,Yr.countdownInterval=null});var Ra,Pd=O(()=>{Ra=class{constructor(t){this.eventCallbacks=new Map;this.data=t}getState(){return this.data.state}isStarted(){return this.getState()!=="not started"}isCompleted(){return this.getState()==="completed"}_executeCallbacks(t){let r=this.eventCallbacks.get(t);if(r)for(let n of r)n(this)}setState(t,r){this.data.state=t,r&&(this.data.metadata=r),this._executeCallbacks("update")}start(t){return this.setState("started",t),this.data.start_time=new Date().getTime(),this.data.end_time=null,this}complete(t){return this.setState("completed",t),this.data.end_time=new Date().getTime(),this}clear(t){return this.setState("cleared",t),this.data.start_time=null,this.data.end_time=null,this._executeCallbacks("update"),this}on(t,r){let n=this.eventCallbacks.get(t)||[];n.push(r),this.eventCallbacks.set(t,n)}}});var Xr,Od=O(()=>{Pd();Xr=class{constructor(t){this.eventCallbacks=new Map;this.data=t,this.steps=new Map(t?.steps?.map(r=>[r.step_id,new Ra(r)]))}static async get(t,r){return new Xr({flow_id:t,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 t=Array.from(this.steps.values()).some(n=>n.getState()==="started"),r=Array.from(this.steps.values()).every(n=>n.getState()==="completed");return t?"started":r?"completed":"not started"}isStarted(){return this.getState()!=="not started"}isCompleted(){let t=this.getState();return t==="completed"||t==="force completed"}step(t){let r=this.steps.get(t);if(!r){let n=new Ra({step_id:t,state:"not started"});this.steps.set(t,n);for(let[a,i]of this.eventCallbacks.entries())for(let s of i)n.on(a,s);r=n}return r}async complete(){try{this.setState("force completed")}catch(t){console.error("Error completing flow:",t)}}setState(t){this.data.state=t}clear(t=!1){if(this.setState("cleared"),t)for(let[r,n]of this.steps.entries())n.clear();return this}on(t,r){let n=this.eventCallbacks.get(t)||[];n.push(r),this.eventCallbacks.set(t,n);for(let[a,i]of this.steps.entries())i.on(t,r)}}});var b0,IC,mr,Ud=O(()=>{e0();zn();Ga();qf();qs();Ws();Ts();Nd();Dd();Od();new URLSearchParams(window.location.search).has("hpdebug")&&console.log(`hp${ja}`);b0=class extends ba{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){Ru(r);try{C0.maybeRecord(r)}catch{et.debug("Error recording session")}et.setDebugMode(r?.debug===!0);try{this.didInit=!0;let n=window.navigator,a=this.maybeRescreen.bind(this);"connection"in n&&(n.connection||n?.mozConnection||n?.webkitConnection).addEventListener("change",()=>{et.debug("Connection changed"),a()}),r?.dataCapture?.consoleListener&&this.checkConsole()}catch(n){et.error("Could not setup Honeypot"),et.error(n)}}bubble(r){Yr.fire(r)}setSessionId(r){this.sessionId=r}setDeviceId(r){this.deviceId=r}async flow(r,n){try{let a=await Xr.get(r,n);return a.on("update",async i=>{a.data.state=a.getState(),await this.track(`${r} - ${i?.data?.step_id}`)}),a}catch(a){return console.log("Error fetching flow:",a.message),Promise.reject(a)}}async showChallenge(r){return this.challengeInProgress?Promise.reject("Challenge already in progress"):r?.allow?(this.challengeInProgress=!0,new Promise((n,a)=>{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(i,s,o)=>{try{i.setTitle("Requesting location..."),i.setDescription("Please grant access when prompted");let u=()=>new Promise((p,h)=>{navigator.geolocation.getCurrentPosition(p,async C=>{let b;switch(C.code){case C.PERMISSION_DENIED:b="You denied the request for Geolocation.";break;case C.POSITION_UNAVAILABLE:b="Location information is unavailable.";break;case C.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:C.code});p(I)})}),l=()=>new Promise((p,h)=>{let C=document.createElement("iframe");if(C.setAttribute("sandbox","allow-same-origin"),C.classList.add("hidden"),document.body.appendChild(C),!C.contentWindow){C.remove(),h(new Error("Iframe contentWindow is not available."));return}C.contentWindow.navigator.geolocation.getCurrentPosition(b=>{C.remove(),p(b)},async b=>{let I=await this.track("__confirm",{error:b.code});C.remove(),p(I)})}),[c,f]=await Promise.allSettled([u(),l()]);if(c.status==="rejected"&&f.status==="rejected")throw new Error("Failed to retrieve geolocation in both contexts.");i.setTitle("Confirming location..."),i.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},m=await this.track("__confirm",d);m?.geofenced?(this.geofence(),n(m)):(await new Promise(p=>{setTimeout(()=>{i.setTitle("Success!"),i.setDescription("Your request was processed successfully."),s.text="Done",s.style={backgroundColor:"green"},p("ok")},2e3)}),n(m))}catch(u){i.setTitle("Error"),i.setDescription("An unexpected error occurred."),s.text="Redirecting",s.style={backgroundColor:"orange"},setTimeout(()=>{this.geofence(),a(u)},1e3)}}}]})})):await this.track("__confirm")}async checkConsole(){try{let r=(...a)=>{try{this._ci=!0,this.challengeInProgress&&(this.track("__confirm",{error:9}),this.geofence())}catch(i){et.error("Error in notify function:",i)}},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){et.error("Error in listen method:",r)}}async identify(r,n={},a="account"){try{jn.setIdentity(r,n,a)}catch{}}async track(r,n={}){let a=Mt()?.api?.routes?.ping;if(!a)return Promise.reject("Internal honeypot error: no endpoint is configured");try{C0.setEvent(r)}catch{et.debug("Error setting event")}try{let s={event:{time:String(Date.now()),type:r,properties:n}};et.info("Payload"),et.info(JSON.stringify(s));let o=await Ot.post(a,"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(i){return Promise.reject(i)}}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=Mt()?.api?.routes?.ping;return!r||!new URLSearchParams(window.location.search).has("hp-passport")?void 0:await new Promise((n,a)=>{this.bubble({title:"Check Passport",description:"Request a temporary passport",animationClass:"simple",disallowOutsideClick:!0,onDestroy:()=>n(!0),buttons:[{text:"Go",click:async(i,s,o)=>{try{let u=window.prompt("Enter the code you received"),c={event:{time:String(Date.now()),type:"__passport",properties:{code:u}}};if(i.setTitle("Verifying..."),i.setDescription("Please wait"),(await Ot.post(r,"beacon",c))?.status==="valid"){i.setTitle("Success!"),i.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});a(d)}}catch(u){let l=await this.track("__confirm",{error:17});a(u)}}}]})})}catch{}}async geoCaptcha(){try{let r=Mt()?.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 a=await n();et.info("Schedule results"),et.info(JSON.stringify(a))},r*1e3))}stopRescreening(){try{this.intervalId!==null&&(clearInterval(this.intervalId),this.intervalId=null)}catch{}}geofence(){try{let r=this.geofenceResults?.redirectUrl;r&&xt.isValidUrlOrPath(r)&&!xt.onRedirectPage(r)&&window.location.pathname!="/geo-unavailable"&&(window.location.href=r+"?georef="+this.geofenceResults?.ref)}catch{}}},IC=new b0,mr=IC});var TC=Q((Zw,Md)=>{Ud();window&&(window.honeypot&&(mr.id=window.honeypot.id||null,mr.config=window.honeypot.config||{},mr.q=window.honeypot.q||[],mr.fq=window.honeypot.fq||[],mr.callbacks=window.honeypot.callbacks||{},mr.geofenced=window.honeypot.geofenced||!1),window.honeypot=mr);Md.exports={honeypot:mr}});TC();})();
(async () => {
await honeypot._setup({"api":{"baseUrl":"https://nternow-prod-as0n1.quill.run","routes":{"ping":"/58sj3ae84cd6","sessionReplay":"/9854wrdkhsue"}},"dataCapture":{"consoleListener":true,"sessionReplay":{"enabled":false,"id":"4022a761-e88d-4075-b3e4-3dc8648e996d","endpoint":"https://nternow-prod-as0n1.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":"Error","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.","expiry_minutes":1440,"colors":{"button":"#2081E2"},"enabled":false,"allow":true}});
honeypot.honey = {"org_id":"549220db-8567-475d-a375-bbb61bffdc31","honeypot_name":"nternow-prod-as0n1","event_id":"fb622560-344d-40e2-9f28-50cf2bbe391a","events":["Page View"],"event_name":"Page View","event_time":"2025-04-30T07:00:48.621Z","ip_address":"3.147.72.3","ip_address_connecting":"3.147.72.3","ip_address_forwarded_for":null,"asn":16509,"as_organization":"Amazon.com","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.9625,"longitude":-83.0061,"timezone":"America/New_York","identity_type":"unknown","identities":[],"handprint_id":"601bb14b-ccff-49dc-a1f3-b262f317ec4e","device_id":"601bb14b-ccff-49dc-a1f3-b262f317ec4e","session_id":"05589a3a-26f2-4337-a2e6-5954371cb7a8","ref":"4022a761-e88d-4075-b3e4-3dc8648e996d","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"],"session_tags":["hosting_provider"],"last_event_name":null,"last_event_date":"2025-04-30T07:00:48.621Z","seconds_since_last_event":0,"session_start_date":"2025-04-30T07:00:48.621Z","seconds_since_session_start":0,"session_total_event_count":1,"last_identity":{},"session_ips":["3.147.72.3"],"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":{},"connection_type":1,"geofence_vpn_rescreen_frequency_seconds":3,"geofence_triggered":false,"redirect_url":"","redirect_auto":false,"geofence_test_only":false,"geo_challenge_status":0,"geofence_event_count":0,"dynamic_features":{},"geofenced":false};
honeypot.geofenceResults = {"autoRedirect":false,"redirectUrl":null,"ref":null,"rescreenFrequencySeconds":-1,"challenge":{"animation":"simple","title":"Error","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.","expiry_minutes":1440,"colors":{"button":"#2081E2"},"enabled":false,"allow":false}};
await honeypot.processPassport();
honeypot.processGeofenceResults();
})();