PageSourceSearch

https://file.pizza/_next/static/chunks/513-4835d51b1aa69d47.js

js file.pizza collected 2026-10-02 05:24:35 UTC 206,772 bytes, 26 lines download raw bytes

vendor: 6,064 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[513],{1944:e=>{let t={};t.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){let n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){let n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){let t=[];t.push(e.foundation);let n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);let r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return n.name=(t=t[0].split("/"))[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);let n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){let t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){let t,n={},r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n[(t=r[e].trim().split("="))[0].trim()]=t[1];return n},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){let r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){let t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){let t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){let t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){let n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){let t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){let t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;let t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){let r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){let n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){let o=r[i],s=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(s){let r=t.parseRtpMap(s),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}
1t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});let i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){let n,r=[],i=t.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),s=-1!==i.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),c=a.length>0&&a[0].ssrc,u=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));u.length>0&&u[0].length>1&&u[0][0]===c&&(n=u[0][1]),i.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&n&&(t.rtx={ssrc:n}),r.push(t),o&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:c,mechanism:s?"red+ulpfec":"red"},r.push(t))}}),0===r.length&&c&&r.push({ssrc:c});let l=t.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substring(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substring(5),10)*.95-16e3:void 0,r.forEach(e=>{e.maxBitrate=l})),r},t.parseRtcpParameters=function(e){let n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);let i=t.matchPrefix(e,"a=rtcp-rsize");return n.reducedSize=i.length>0,n.compound=0===i.length,n.mux=t.matchPrefix(e,"a=rtcp-mux").length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n,r=t.matchPrefix(e,"a=msid:");if(1===r.length)return{stream:(n=r[0].substring(7).split(" "))[0],track:n[1]};let i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);if(i.length>0)return{stream:(n=i[0].value.split(" "))[0],track:n[1]}},t.parseSctpDescription=function(e){let n,r=t.parseMLine(e),i=t.matchPrefix(e,"a=max-message-size:");i.length>0&&(n=parseInt(i[0].substring(19),10)),isNaN(n)&&(n=65536);let o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:r.fmt,maxMessageSize:n};let s=t.matchPrefix(e,"a=sctpmap:");if(s.length>0){let e=s[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:n}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){return"v=0\r\no="+(r||"thisisadapterortc")+" "+(e||t.generateSessionId())+" "+(void 0!==n?n:2)+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){let r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){let n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){let n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;let n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t},7937:(e,t,n)=>{n.d(t,{n:()=>l});var r=n(3141),i=n(586),o=n(6483),s=n(6316),a=n(5166),c=class extends s.Q{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.EN)(t.mutationKey)!==(0,a.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,i.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){o.jG.batch(()=>
1{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#r.onSuccess?.(e.data,t,n,r),this.#r.onSettled?.(e.data,null,t,n,r)):e?.type==="error"&&(this.#r.onError?.(e.error,t,n,r),this.#r.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#t)})})}},u=n(7172);function l(e,t){let n=(0,u.jE)(t),[i]=r.useState(()=>new c(n,e));r.useEffect(()=>{i.setOptions(e)},[i,e]);let s=r.useSyncExternalStore(r.useCallback(e=>i.subscribe(o.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((e,t)=>{i.mutate(e,t).catch(a.lQ)},[i]);if(s.error&&(0,a.GU)(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}},9035:(e,t,n)=>{n.d(t,{YOg:()=>oI,zMY:()=>ou,gMt:()=>oF,euz:()=>o8,aig:()=>ot,Ikc:()=>oA,YjP:()=>ip,L5J:()=>oC});var r,i,o={};n.r(o),n.d(o,{base64:()=>ex,base64url:()=>eP,bigint:()=>eM,boolean:()=>eL,browserEmail:()=>eb,cidrv4:()=>eT,cidrv6:()=>ez,cuid:()=>en,cuid2:()=>er,date:()=>e$,datetime:()=>eU,domain:()=>eR,duration:()=>ec,e164:()=>eO,email:()=>em,emoji:()=>ew,extendedDuration:()=>eu,guid:()=>el,hex:()=>eW,hostname:()=>eE,html5Email:()=>ey,idnEmail:()=>e_,integer:()=>ej,ipv4:()=>ek,ipv6:()=>eS,ksuid:()=>es,lowercase:()=>eJ,mac:()=>eC,md5_base64:()=>eY,md5_base64url:()=>eX,md5_hex:()=>eH,nanoid:()=>ea,null:()=>eB,number:()=>eN,rfc5322Email:()=>eg,sha1_base64:()=>eQ,sha1_base64url:()=>e0,sha1_hex:()=>eq,sha256_base64:()=>e2,sha256_base64url:()=>e6,sha256_hex:()=>e1,sha384_base64:()=>e3,sha384_base64url:()=>e8,sha384_hex:()=>e4,sha512_base64:()=>e9,sha512_base64url:()=>e7,sha512_hex:()=>e5,string:()=>eZ,time:()=>eA,ulid:()=>ei,undefined:()=>eF,unicodeEmail:()=>ev,uppercase:()=>eV,uuid:()=>ed,uuid4:()=>ep,uuid6:()=>eh,uuid7:()=>ef,xid:()=>eo});var s={};n.r(s),n.d(s,{endsWith:()=>r$,gt:()=>rm,gte:()=>ry,includes:()=>rO,length:()=>rx,lowercase:()=>rE,lt:()=>rh,lte:()=>rf,maxLength:()=>rT,maxSize:()=>rk,mime:()=>rA,minLength:()=>rz,minSize:()=>rS,multipleOf:()=>rw,negative:()=>rv,nonnegative:()=>rb,nonpositive:()=>r_,normalize:()=>rZ,overwrite:()=>rU,positive:()=>rg,property:()=>rD,regex:()=>rP,size:()=>rC,slugify:()=>rL,startsWith:()=>rI,toLowerCase:()=>rj,toUpperCase:()=>rN,trim:()=>rM,uppercase:()=>rR});var a={};n.r(a),n.d(a,{ZodISODate:()=>rq,ZodISODateTime:()=>rY,ZodISODuration:()=>r2,ZodISOTime:()=>r0,date:()=>rQ,datetime:()=>rX,duration:()=>r6,time:()=>r1});var c={};function u(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=s.prototype,o=Object.keys(i);for(let e=0;e<o.length;e++){let t=o[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class o extends i{}function s(e){var t;let i=n?.Parent?new o:this;for(let n of(r(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))n();return i}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}n.r(c),n.d(c,{ZodAny:()=>ow,ZodArray:()=>oO,ZodBase64:()=>iX,ZodBase64URL:()=>iQ,ZodBigInt:()=>
1ol,ZodBigIntFormat:()=>op,ZodBoolean:()=>oc,ZodCIDRv4:()=>iK,ZodCIDRv6:()=>iH,ZodCUID:()=>iO,ZodCUID2:()=>i$,ZodCatch:()=>sf,ZodCodec:()=>sb,ZodCustom:()=>sI,ZodCustomStringFormat:()=>i3,ZodDate:()=>oE,ZodDefault:()=>ss,ZodDiscriminatedUnion:()=>oB,ZodE164:()=>i1,ZodEmail:()=>im,ZodEmoji:()=>ix,ZodEnum:()=>o2,ZodFile:()=>o5,ZodFunction:()=>sR,ZodGUID:()=>ig,ZodIPv4:()=>iL,ZodIPv6:()=>iV,ZodIntersection:()=>oJ,ZodJWT:()=>i6,ZodKSUID:()=>ij,ZodLazy:()=>sz,ZodLiteral:()=>o3,ZodMAC:()=>iF,ZodMap:()=>oq,ZodNaN:()=>sy,ZodNanoID:()=>iE,ZodNever:()=>oT,ZodNonOptional:()=>sl,ZodNull:()=>o_,ZodNullable:()=>sr,ZodNumber:()=>oe,ZodNumberFormat:()=>on,ZodObject:()=>oD,ZodOptional:()=>st,ZodPipe:()=>sv,ZodPrefault:()=>sc,ZodPromise:()=>sP,ZodReadonly:()=>sk,ZodRecord:()=>oG,ZodSet:()=>o0,ZodString:()=>id,ZodStringFormat:()=>ih,ZodSuccess:()=>sp,ZodSymbol:()=>om,ZodTemplateLiteral:()=>sC,ZodTransform:()=>o7,ZodTuple:()=>oW,ZodType:()=>iu,ZodULID:()=>iA,ZodURL:()=>iC,ZodUUID:()=>i_,ZodUndefined:()=>og,ZodUnion:()=>oM,ZodUnknown:()=>oS,ZodVoid:()=>ox,ZodXID:()=>iZ,ZodXor:()=>oN,_ZodString:()=>il,_default:()=>sa,_function:()=>sO,any:()=>ok,array:()=>oI,base64:()=>iq,base64url:()=>i0,bigint:()=>od,boolean:()=>ou,catch:()=>sm,check:()=>s$,cidrv4:()=>iG,cidrv6:()=>iY,codec:()=>sw,cuid:()=>iI,cuid2:()=>iD,custom:()=>sD,date:()=>oR,describe:()=>sZ,discriminatedUnion:()=>oF,e164:()=>i2,email:()=>iy,emoji:()=>iP,enum:()=>o6,file:()=>o9,float32:()=>oi,float64:()=>oo,function:()=>sO,guid:()=>iv,hash:()=>i7,hex:()=>i9,hostname:()=>i5,httpUrl:()=>iz,instanceof:()=>sj,int:()=>or,int32:()=>os,int64:()=>oh,intersection:()=>oV,ipv4:()=>iB,ipv6:()=>iW,json:()=>sL,jwt:()=>i4,keyof:()=>o$,ksuid:()=>iN,lazy:()=>sx,literal:()=>o8,looseObject:()=>oZ,looseRecord:()=>oX,mac:()=>iJ,map:()=>oQ,meta:()=>sM,nan:()=>sg,nanoid:()=>iR,nativeEnum:()=>o4,never:()=>oz,nonoptional:()=>sd,null:()=>ob,nullable:()=>si,nullish:()=>so,number:()=>ot,object:()=>oA,optional:()=>sn,partialRecord:()=>oY,pipe:()=>s_,prefault:()=>su,preprocess:()=>sB,promise:()=>sE,readonly:()=>sS,record:()=>oH,refine:()=>sA,set:()=>o1,strictObject:()=>oU,string:()=>ip,stringFormat:()=>i8,stringbool:()=>sN,success:()=>sh,superRefine:()=>sU,symbol:()=>oy,templateLiteral:()=>sT,transform:()=>se,tuple:()=>oK,uint32:()=>oa,uint64:()=>of,ulid:()=>iU,undefined:()=>ov,union:()=>oj,unknown:()=>oC,url:()=>iT,uuid:()=>ib,uuidv4:()=>iw,uuidv6:()=>ik,uuidv7:()=>iS,void:()=>oP,xid:()=>iM,xor:()=>oL}),Object.freeze({status:"aborted"}),Symbol("zod_brand");class l extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class d extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let p={};function h(e){return e&&Object.assign(p,e),p}function f(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function m(e,t="|"){return e.map(e=>A(e)).join(t)}function y(e,t){return"bigint"==typeof t?t.toString():t}function g(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function v(e){return null==e}function _(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let b=Symbol("evaluating");function w(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==b)return void 0===r&&(r=b,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function k(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function S(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function C(e){return JSON.stringify(e)}let T="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function z(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let x=g(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function P(e){if(!1===z(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==z(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function E(e){return P(e)?{...e}:Array.isArray(e)?[...e]:e}let R=new Set(["string","number","symbol"]),O=new Set(["string","number","bigint","boolean","symbol","undefined"]);function I(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function A(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}
1let U={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Z={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function M(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function j(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function N(e){return"string"==typeof e?e:e?.message}function L(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=N(e.inst?._zod.def?.error?.(e))??N(t?.error?.(e))??N(n.customError?.(e))??N(n.localeError?.(e))??"Invalid input"),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function B(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function F(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function J(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let V=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,y,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},W=u("$ZodError",V),K=u("$ZodError",V,{Parent:Error}),G=e=>(t,n,r,i)=>{let o=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new l;if(s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>L(e,o,h())));throw T(t,i?.callee),t}return s.value},H=G(K),Y=e=>async(t,n,r,i)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>L(e,o,h())));throw T(t,i?.callee),t}return s.value},X=Y(K),q=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new l;return o.issues.length?{success:!1,error:new(e??W)(o.issues.map(e=>L(e,i,h())))}:{success:!0,data:o.value}},Q=q(K),ee=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>L(e,i,h())))}:{success:!0,data:o.value}},et=ee(K),en=/^[cC][^\s-]{8,}$/,er=/^[0-9a-z]+$/,ei=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,eo=/^[0-9a-vA-V]{20}$/,es=/^[A-Za-z0-9]{27}$/,ea=/^[a-zA-Z0-9_-]{21}$/,ec=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eu=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,el=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ed=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ep=ed(4),eh=ed(6),ef=ed(7),em=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ey=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eg=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ev=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,e_=ev,eb=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function ew(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}let ek=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,eS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,eC=e=>{let t=I(e??":");return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},eT=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ez=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ex=/^$|^(?:[0-9a-zA-Z+/]{4}
1)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,eP=/^[A-Za-z0-9_-]*$/,eE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,eR=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,eO=/^\+(?:[0-9]){6,14}[0-9]$/,eI="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",e$=RegExp(`^${eI}$`);function eD(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function eA(e){return RegExp(`^${eD(e)}$`)}function eU(e){let t=eD({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return RegExp(`^${eI}T(?:${r})$`)}let eZ=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},eM=/^-?\d+n?$/,ej=/^-?\d+$/,eN=/^-?\d+(?:\.\d+)?/,eL=/^(?:true|false)$/i,eB=/^null$/i,eF=/^undefined$/i,eJ=/^[^A-Z]*$/,eV=/^[^a-z]*$/,eW=/^[0-9a-fA-F]*$/;function eK(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function eG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}let eH=/^[0-9a-fA-F]{32}$/,eY=eK(22,"=="),eX=eG(22),eq=/^[0-9a-fA-F]{40}$/,eQ=eK(27,"="),e0=eG(27),e1=/^[0-9a-fA-F]{64}$/,e2=eK(43,"="),e6=eG(43),e4=/^[0-9a-fA-F]{96}$/,e3=eK(64,""),e8=eG(64),e5=/^[0-9a-fA-F]{128}$/,e9=eK(86,"=="),e7=eG(86),te=u("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tt={number:"number",bigint:"bigint",object:"date"},tn=u("$ZodCheckLessThan",(e,t)=>{te.init(e,t);let n=tt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tr=u("$ZodCheckGreaterThan",(e,t)=>{te.init(e,t);let n=tt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ti=u("$ZodCheckMultipleOf",(e,t)=>{te.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),i=(r.split(".")[1]||"").length;if(0===i&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let o=n>i?n:i;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),to=u("$ZodCheckNumberFormat",(e,t)=>{te.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,o]=U[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=o,n&&(r.pattern=ej)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),ts=u("$ZodCheckBigIntFormat",(e,t)=>{te.init(e,t);
vendor: 4,169 bytes, line 1
1let[n,r]=Z[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inst:e})}}),ta=u("$ZodCheckMaxSize",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:B(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tc=u("$ZodCheckMinSize",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:B(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tu=u("$ZodCheckSizeEquals",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let o=i>t.size;n.issues.push({origin:B(r),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tl=u("$ZodCheckMaxLength",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=F(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),td=u("$ZodCheckMinLength",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=F(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tp=u("$ZodCheckLengthEquals",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let o=F(r),s=i>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),th=u("$ZodCheckStringFormat",(e,t)=>{var n,r;te.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),tf=u("$ZodCheckRegex",(e,t)=>{th.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),tm=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eJ),th.init(e,t)}),ty=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eV),th.init(e,t)}),tg=u("$ZodCheckIncludes",(e,t)=>{te.init(e,t);let n=I(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input
1:n.value,inst:e,continue:!t.abort})}}),tv=u("$ZodCheckStartsWith",(e,t)=>{te.init(e,t);let n=RegExp(`^${I(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),t_=u("$ZodCheckEndsWith",(e,t)=>{te.init(e,t);let n=RegExp(`.*${I(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function tb(e,t,n){e.issues.length&&t.issues.push(...j(n,e.issues))}let tw=u("$ZodCheckProperty",(e,t)=>{te.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>tb(n,e,t.property));tb(n,e,t.property)}}),tk=u("$ZodCheckMimeType",(e,t)=>{te.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),tS=u("$ZodCheckOverwrite",(e,t)=>{te.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class tC{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>`  ${e}`)].join("\n"))}}let tT={major:4,minor:2,patch:1},tz=u("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tT;let r=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&r.unshift(e),r))for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r,i=M(e);for(let o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&n?.async===!1)throw new l;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(i||(i=M(e,t)))});else{if(e.issues.length===t)continue;i||(i=M(e,t))}}return r?r.then(()=>e):e},n=(n,i,o)=>{if(M(n))return n.aborted=!0,n;let s=t(i,r,o);if(s instanceof Promise){if(!1===o.async)throw new l;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(i,o)=>{if(o.skipChecks)return e._zod.parse(i,o);if("backward"===o.direction){let t=e._zod.parse({value:i.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,o)):n(t,i,o)}let s=e._zod.parse(i,o);if(s instanceof Promise){if(!1===o.async)throw new l;return s.then(e=>t(e,r,o))}return t(s,r,o)}}e["~standard"]={validate:t=>{try{let n=Q(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return et(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),tx=u("$ZodString",(e,t)=>{tz.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??eZ(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),tP=u("$ZodStringFormat",(e,t)=>{th.init(e,t),tx.init(e,t)}),tE=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=el),tP.init(e,t)}),tR=u("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ed(e))}else t.pattern??(t.pattern=ed());tP.init(e,t)}),tO=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=em),tP.init(e,t)}),tI=u("$ZodURL",(e,t)=>{tP.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",n
1ote:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),t$=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ew()),tP.init(e,t)}),tD=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ea),tP.init(e,t)}),tA=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=en),tP.init(e,t)}),tU=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=er),tP.init(e,t)}),tZ=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ei),tP.init(e,t)}),tM=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eo),tP.init(e,t)}),tj=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=es),tP.init(e,t)}),tN=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=eU(t)),tP.init(e,t)}),tL=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=e$),tP.init(e,t)}),tB=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=eA(t)),tP.init(e,t)}),tF=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ec),tP.init(e,t)}),tJ=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ek),tP.init(e,t),e._zod.bag.format="ipv4"}),tV=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=eS),tP.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),tW=u("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=eC(t.delimiter)),tP.init(e,t),e._zod.bag.format="mac"}),tK=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=eT),tP.init(e,t)}),tG=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ez),tP.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function tH(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tY=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ex),tP.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{tH(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tX=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=eP),tP.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{!function(e){if(!eP.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tH(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),tq=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=eO),tP.init(e,t)}),tQ=u("$ZodJWT",(e,t)=>{tP.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),t0=u("$ZodCustomStringFormat",(e,t)=>{tP.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),t1=u("$ZodNumber",(e,t)=>{tz.init(e,t),e._zod.pattern=e._zod.bag.pattern??eN,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}let i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;let o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),t2=u("$ZodNumberFormat",(e,t)=>{to.init(e,t),t1.init(e,t)}),t6=u("$ZodBoolean",(e,t)=>{tz.init(e,t),e._zod.pattern=eL,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),t4=u("$ZodBigInt",(e,t)=>{tz.init(e,t),e._zod.pattern=eM,e._zod.parse=(n,r)=>
1{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),t3=u("$ZodBigIntFormat",(e,t)=>{ts.init(e,t),t4.init(e,t)}),t8=u("$ZodSymbol",(e,t)=>{tz.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return"symbol"==typeof r||t.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),t}}),t5=u("$ZodUndefined",(e,t)=>{tz.init(e,t),e._zod.pattern=eF,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{let r=t.value;return void 0===r||t.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),t}}),t9=u("$ZodNull",(e,t)=>{tz.init(e,t),e._zod.pattern=eB,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}}),t7=u("$ZodAny",(e,t)=>{tz.init(e,t),e._zod.parse=e=>e}),ne=u("$ZodUnknown",(e,t)=>{tz.init(e,t),e._zod.parse=e=>e}),nt=u("$ZodNever",(e,t)=>{tz.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),nn=u("$ZodVoid",(e,t)=>{tz.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return void 0===r||t.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),t}}),nr=u("$ZodDate",(e,t)=>{tz.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function ni(e,t,n){e.issues.length&&t.issues.push(...j(n,e.issues)),t.value[n]=e.value}let no=u("$ZodArray",(e,t)=>{tz.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);let o=[];for(let e=0;e<i.length;e++){let s=i[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?o.push(a.then(t=>ni(t,n,e))):ni(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function ns(e,t,n,r){e.issues.length&&t.issues.push(...j(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function na(e){var t;let n=Object.keys(e.shape);for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let r=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function nc(e,t,n,r,i,o){let s=[],a=i.keySet,c=i.catchall._zod,u=c.def.type;for(let i in t){if(a.has(i))continue;if("never"===u){s.push(i);continue}let o=c.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then(e=>ns(e,n,i,t))):ns(o,n,i,t)}return(s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length)?Promise.all(e).then(()=>n):n}let nu=u("$ZodObject",(e,t)=>{let n;tz.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!r?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let i=g(()=>na(t));w(e._zod,"propValues",()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values)for(let e of(n[t]??(n[t]=new Set),r.values))n[t].add(e)}return n});let o=t.catchall;e._zod.parse=(t,r)=>{n??(n=i.value);let s=t.value;if(!z(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};let a=[],c=n.shape;for(let e of n.keys){let n=c[e]._zod.run({value:s[e],issues:[]},r);n instanceof Promise?a.push(n.then(n=>ns(n,t,e,s))):ns(n,t,e,s)}return o?nc(a,s,t,r,i.value,e):a.length?Promise.all(a).then(()=>t):t}}),nl=u("$ZodObjectJIT",(e,t)=>{let n,r;nu.init(e,t);let i=e._zod.parse,o=g(()=>na(t)),s=!p.jitless,a=s&&x.value,c=t.catchall;e._zod.parse=(u,l)=>{r??(r=o.value);let d=u.value;return z(d)?s&&a&&l?.async===!1&&!0!==l.jitless?(n||(n=(e=>{let t=new tC(["shape","payload","ctx"]),n=o.value,r=e=>{let t=C(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),s=0;for(let e of n.keys)i[e]=`key_${s++}`;for(let e of(t.write("const newResult = {};"),n.keys)){let n=i[e],o=C(e);t.write(`const ${n} = ${r(e)};`),t.write(`
2        if (${n}.issues.length) {
3          payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
4            ...iss,
5            path: iss.path ? [${o}, ...iss.path] : [${o}]
6          })));
7        }
8        
9        
10        if (${n}.value === undefined) {
11          if (${o} in input) {
12            newResult[${o}] = undefined;
13          }
14        } else {
15          newResult[${o}] = ${n}.value;
16        }
17        
18      `)}t.write("payload.value = newResult;"),t.write("return payload;");let a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),u=n(u,l),c)?nc([],d,u,l,r,e):u:i(u,l):(u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u)}});
18function nd(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!M(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>L(e,r,h())))}),t)}let np=u("$ZodUnion",(e,t)=>{tz.init(e,t),w(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),w(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),w(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),w(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>_(e.source)).join("|")})$`)}});let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let s=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),s=!0;else{if(0===t.issues.length)return t;a.push(t)}}return s?Promise.all(a).then(t=>nd(t,i,e,o)):nd(a,i,e,o)}});function nh(e,t,n,r){let i=e.filter(e=>0===e.issues.length);return 1===i.length?t.value=i[0].value:0===i.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>L(e,r,h())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t}let nf=u("$ZodXor",(e,t)=>{np.init(e,t),t.inclusive=!1;let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let s=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);t instanceof Promise?(a.push(t),s=!0):a.push(t)}return s?Promise.all(a).then(t=>nh(t,i,e,o)):nh(a,i,e,o)}}),nm=u("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,np.init(e,t);let n=e._zod.parse;w(e._zod,"propValues",()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r))for(let r of(e[t]||(e[t]=new Set),n))e[t].add(r)}return e});let r=g(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,o)=>{let s=i.value;if(!z(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),ny=u("$ZodIntersection",(e,t)=>{tz.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>ng(e,t,n)):ng(e,i,o)}});function ng(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),M(e))return e;let r=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(P(t)&&P(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o[r]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}let nv=u("$ZodTuple",(e,t)=>{tz.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[],a=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),c=-1===a?0:n.length-a;if(!t.rest){let t=o.length>n.length,i=o.length<c-1;if(t||i)return r.issues.push({...t?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}
18,input:o,inst:e,origin:"array"}),r}let u=-1;for(let e of n){if(++u>=o.length&&u>=c)continue;let t=e._zod.run({value:o[u],issues:[]},i);t instanceof Promise?s.push(t.then(e=>n_(e,r,u))):n_(t,r,u)}if(t.rest)for(let e of o.slice(n.length)){u++;let n=t.rest._zod.run({value:e,issues:[]},i);n instanceof Promise?s.push(n.then(e=>n_(e,r,u))):n_(n,r,u)}return s.length?Promise.all(s).then(()=>r):r}});function n_(e,t,n){e.issues.length&&t.issues.push(...j(n,e.issues)),t.value[n]=e.value}let nb=u("$ZodRecord",(e,t)=>{tz.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!P(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){let a;n.value={};let c=new Set;for(let e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){c.add("number"==typeof e?e.toString():e);let s=t.valueType._zod.run({value:i[e],issues:[]},r);s instanceof Promise?o.push(s.then(t=>{t.issues.length&&n.issues.push(...j(e,t.issues)),n.value[e]=t.value})):(s.issues.length&&n.issues.push(...j(e,s.issues)),n.value[e]=s.value)}for(let e in i)c.has(e)||(a=a??[]).push(e);a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:a})}else for(let s of(n.value={},Reflect.ownKeys(i))){if("__proto__"===s)continue;let a=t.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){"loose"===t.mode?n.value[s]=i[s]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>L(e,r,h())),input:s,path:[s],inst:e});continue}let c=t.valueType._zod.run({value:i[s],issues:[]},r);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...j(s,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...j(s,c.issues)),n.value[a.value]=c.value)}return o.length?Promise.all(o).then(()=>n):n}}),nw=u("$ZodMap",(e,t)=>{tz.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let o=[];for(let[s,a]of(n.value=new Map,i)){let c=t.keyType._zod.run({value:s,issues:[]},r),u=t.valueType._zod.run({value:a,issues:[]},r);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([t,o])=>{nk(t,o,n,s,i,e,r)})):nk(c,u,n,s,i,e,r)}return o.length?Promise.all(o).then(()=>n):n}});function nk(e,t,n,r,i,o,s){e.issues.length&&(R.has(typeof r)?n.issues.push(...j(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(e=>L(e,s,h()))})),t.issues.length&&(R.has(typeof r)?n.issues.push(...j(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(e=>L(e,s,h()))})),n.value.set(e.value,t.value)}let nS=u("$ZodSet",(e,t)=>{tz.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];for(let e of(n.value=new Set,i)){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?o.push(i.then(e=>nC(e,n))):nC(i,n)}return o.length?Promise.all(o).then(()=>n):n}});function nC(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}let nT=u("$ZodEnum",(e,t)=>{tz.init(e,t);let n=f(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>R.has(typeof e)).map(e=>"string"==typeof e?I(e):e.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),nz=u("$ZodLiteral",(e,t)=>{if(tz.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?I(e):e?I(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),nx=u("$ZodFile",(e,t)=>{tz.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),t}}),nP=u("$ZodTransform",(e,t)=>{tz.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new d(e.constructor.name);
18let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new l;return n.value=i,n}});function nE(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}let nR=u("$ZodOptional",(e,t)=>{tz.init(e,t),e._zod.optin="optional",e._zod.optout="optional",w(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),w(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${_(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>nE(t,e.value)):nE(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),nO=u("$ZodNullable",(e,t)=>{tz.init(e,t),w(e._zod,"optin",()=>t.innerType._zod.optin),w(e._zod,"optout",()=>t.innerType._zod.optout),w(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${_(e.source)}|null)$`):void 0}),w(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),nI=u("$ZodDefault",(e,t)=>{tz.init(e,t),e._zod.optin="optional",w(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>n$(e,t)):n$(r,t)}});function n$(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let nD=u("$ZodPrefault",(e,t)=>{tz.init(e,t),e._zod.optin="optional",w(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nA=u("$ZodNonOptional",(e,t)=>{tz.init(e,t),w(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>nU(t,e)):nU(i,e)}});function nU(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let nZ=u("$ZodSuccess",(e,t)=>{tz.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new d("ZodSuccess");let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===r.issues.length,e)}}),nM=u("$ZodCatch",(e,t)=>{tz.init(e,t),w(e._zod,"optin",()=>t.innerType._zod.optin),w(e._zod,"optout",()=>t.innerType._zod.optout),w(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>L(e,n,h()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>L(e,n,h()))},input:e.value}),e.issues=[]),e)}}),nj=u("$ZodNaN",(e,t)=>{tz.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),nN=u("$ZodPipe",(e,t)=>{tz.init(e,t),w(e._zod,"values",()=>t.in._zod.values),w(e._zod,"optin",()=>t.in._zod.optin),w(e._zod,"optout",()=>t.out._zod.optout),w(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>nL(e,t.in,n)):nL(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>nL(e,t.out,n)):nL(r,t.out,n)}});function nL(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let nB=u("$ZodCodec",(e,t)=>{tz.init(e,t),w(e._zod,"values",()=>t.in._zod.values),w(e._zod,"optin",()=>t.in._zod.optin),w(e._zod,"optout",()=>t.out._zod.optout),w(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>nF(e,t,n)):nF(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>nF(e,t,n)):nF(r,t,n)}}});
18function nF(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>nJ(e,r,t.out,n)):nJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>nJ(e,r,t.in,n)):nJ(e,r,t.in,n)}}function nJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}let nV=u("$ZodReadonly",(e,t)=>{tz.init(e,t),w(e._zod,"propValues",()=>t.innerType._zod.propValues),w(e._zod,"values",()=>t.innerType._zod.values),w(e._zod,"optin",()=>t.innerType?._zod?.optin),w(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(nW):nW(r)}});function nW(e){return e.value=Object.freeze(e.value),e}let nK=u("$ZodTemplateLiteral",(e,t)=>{tz.init(e,t);let n=[];for(let e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith("^"),i=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(r,i))}else if(null===e||O.has(typeof e))n.push(I(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join("")}$`),e._zod.parse=(n,r)=>("string"!=typeof n.value?n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),n)}),nG=u("$ZodFunction",(e,t)=>(tz.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw Error("implement() must be called with a function");return function(...n){let r=Reflect.apply(t,this,e._def.input?H(e._def.input,n):n);return e._def.output?H(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw Error("implementAsync() must be called with a function");return async function(...n){let r=e._def.input?await X(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await X(e._def.output,i):i}},e._zod.parse=(t,n)=>("function"!=typeof t.value?t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}):e._def.output&&"promise"===e._def.output._zod.def.type?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t),e.input=(...t)=>{let n=e.constructor;return new n(Array.isArray(t[0])?{type:"function",input:new nv({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}:{type:"function",input:t[0],output:e._def.output})},e.output=t=>new e.constructor({type:"function",input:e._def.input,output:t}),e)),nH=u("$ZodPromise",(e,t)=>{tz.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),nY=u("$ZodLazy",(e,t)=>{tz.init(e,t),w(e._zod,"innerType",()=>t.getter()),w(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),w(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),w(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),w(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),nX=u("$ZodCustom",(e,t)=>{te.init(e,t),tz.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>nq(t,n,r,e));nq(i,n,r,e)}});function nq(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(J(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class nQ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(r=globalThis).__zod_globalRegistry??(r.__zod_globalRegistry=new nQ);let n0=globalThis.__zod_globalRegistry;function n1(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...D(t)})}function n2(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...D(t)})}function n6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...D(t)})}function n4(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(t)})}function n3(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(t)})}function n8(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(t)})}function n5(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...D(t)})}function n9(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...D(t)})}function n7(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(t)})}function re(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...D(t)})}function rt(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(t)})}function rn(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...D(t)})}function rr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...D(t)})}function ri(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(t)})}function ro(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(t)})}function rs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(t)})}function ra(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(t)})}function rc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(t)})}function ru(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...D(t)})}function rl(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...D(t)})}function rd(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...D(t)})}function rp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...D(t)})}function rh(e,t){return new tn({check:"less_than",...D(t),value:e,inclusive:!1})}function rf(e,t){return new tn({check:"less_than",...D(t),value:e,inclusive:!0})}function rm(e,t){return new tr({check:"greater_than",...D(t),value:e,inclusive:!1})}function ry(e,t){return new tr({check:"greater_than",...D(t),value:e,inclusive:!0})}function rg(e){return rm(0,e)}function rv(e){return rh(0,e)}function r_(e){return rf(0,e)}function rb(e){return ry(0,e)}function rw(e,t){return new ti({check:"multiple_of",...D(t),value:e})}function rk(e,t){return new ta({check:"max_size",...D(t),maximum:e})}function rS(e,t){return new tc({check:"min_size",...D(t),minimum:e})}function rC(e,t){return new tu({check:"size_equals",...D(t),size:e})}function rT(e,t){return new tl({check:"max_length",...D(t),maximum:e})}function rz(e,t){return new td({check:"min_length",...D(t),minimum:e})}function rx(e,t){return new tp({check:"length_equals",...D(t),length:e})}function rP(e,t){return new tf({check:"string_format",format:"regex",...D(t),pattern:e})}function rE(e){return new tm({check:"string_format",format:"lowercase",...D(e)})}
18function rR(e){return new ty({check:"string_format",format:"uppercase",...D(e)})}function rO(e,t){return new tg({check:"string_format",format:"includes",...D(t),includes:e})}function rI(e,t){return new tv({check:"string_format",format:"starts_with",...D(t),prefix:e})}function r$(e,t){return new t_({check:"string_format",format:"ends_with",...D(t),suffix:e})}function rD(e,t,n){return new tw({check:"property",property:e,schema:t,...D(n)})}function rA(e,t){return new tk({check:"mime_type",mime:e,...D(t)})}function rU(e){return new tS({check:"overwrite",tx:e})}function rZ(e){return rU(t=>t.normalize(e))}function rM(){return rU(e=>e.trim())}function rj(){return rU(e=>e.toLowerCase())}function rN(){return rU(e=>e.toUpperCase())}function rL(){return rU(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,""))}function rB(e,t,n,r={}){let i=D(r),o={...D(r),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...i};return n instanceof RegExp&&(o.pattern=n),new e(o)}function rF(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??n0,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function rJ(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path},o=e._zod.parent;if(o)s.ref=o,rJ(o,t,r),t.seen.get(o).isParent=!0;else if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,r);else{let n=s.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function rV(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:o}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};let i=`#/${r}/`,o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+o}})(t);r.def={...r.schema},o&&(r.defId=o);let s=r.schema;for(let e in s)delete s[e];s.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
19
20Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let i=n[1];if(t===n[0]){r(n);continue}if(e.external){let i=e.external.registry.get(n[0])?.id;if(t!==n[0]&&i){r(n);continue}}if(e.metadataRegistry.get(n[0])?.id||i.cycle||i.count>1&&"ref"===e.reused){r(n);continue}}}function rW(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t),i=n.def??n.schema,o={...i};if(null===n.ref)return;let s=n.ref;if(n.ref=null,s){r(s);let t=e.seen.get(s).schema;t.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(t)):(Object.assign(i,t),Object.assign(i,o))}n.isParent||e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};
20if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?i.$defs=o:i.definitions=o);try{let e=JSON.parse(JSON.stringify(i));return Object.defineProperty(e,"~standard",{value:{...t["~standard"],jsonSchema:{input:rK(t,"input"),output:rK(t,"output")}},enumerable:!1,writable:!1}),e}catch(e){throw Error("Error converting schema to JSON.")}}let rK=(e,t)=>n=>{let{libraryOptions:r,target:i}=n??{},o=rF({...r??{},target:i,io:t,processors:{}});return rJ(e,o),rV(o,e),rW(o,e)},rG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rH=(e,t,n,r)=>{let i=e._zod.def,o=!1===i.inclusive,s=i.options.map((e,n)=>rJ(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=s:n.anyOf=s},rY=u("ZodISODateTime",(e,t)=>{tN.init(e,t),ih.init(e,t)});function rX(e){return new rY({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(e)})}let rq=u("ZodISODate",(e,t)=>{tL.init(e,t),ih.init(e,t)});function rQ(e){return new rq({type:"string",format:"date",check:"string_format",...D(e)})}let r0=u("ZodISOTime",(e,t)=>{tB.init(e,t),ih.init(e,t)});function r1(e){return new r0({type:"string",format:"time",check:"string_format",precision:null,...D(e)})}let r2=u("ZodISODuration",(e,t)=>{tF.init(e,t),ih.init(e,t)});function r6(e){return new r2({type:"string",format:"duration",check:"string_format",...D(e)})}let r4=(e,t)=>{W.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code&&i.errors.length)i.errors.map(e=>r({issues:e}));else if("invalid_key"===i.code)r({issues:i.issues});else if("invalid_element"===i.code)r({issues:i.issues});else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,y,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,y,2)}},isEmpty:{get:()=>0===e.issues.length}})};u("ZodError",r4);let r3=u("ZodError",r4,{Parent:Error}),r8=G(r3),r5=Y(r3),r9=q(r3),r7=ee(r3),ie=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return G(r3)(e,t,r)},it=(e,t,n)=>G(r3)(e,t,n),ir=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Y(r3)(e,t,r)},ii=async(e,t,n)=>Y(r3)(e,t,n),io=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return q(r3)(e,t,r)},is=(e,t,n)=>q(r3)(e,t,n),ia=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ee(r3)(e,t,r)},ic=async(e,t,n)=>ee(r3)(e,t,n),iu=u("ZodType",(e,t)=>(tz.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rK(e,"input"),output:rK(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=rF({...n,processors:t});return rJ(e,r),rV(r,e),rW(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(S(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>$(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>r8(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>r9(e,t,n),e.parseAsync=async(t,n)=>r5(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>r7(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ie(e,t,n),e.decode=(t,n)=>it(e,t,n),e.encodeAsync=async(t,n)=>ir(e,t,n),e.decodeAsync=async(t,n)=>ii(e,t,n),e.safeEncode=(t,n)=>
20io(e,t,n),e.safeDecode=(t,n)=>is(e,t,n),e.safeEncodeAsync=async(t,n)=>ia(e,t,n),e.safeDecodeAsync=async(t,n)=>ic(e,t,n),e.refine=(t,n)=>e.check(sA(t,n)),e.superRefine=t=>e.check(sU(t)),e.overwrite=t=>e.check(rU(t)),e.optional=()=>sn(e),e.nullable=()=>si(e),e.nullish=()=>sn(si(e)),e.nonoptional=t=>sd(e,t),e.array=()=>oI(e),e.or=t=>oj([e,t]),e.and=t=>oV(e,t),e.transform=t=>s_(e,se(t)),e.default=t=>sa(e,t),e.prefault=t=>su(e,t),e.catch=t=>sm(e,t),e.pipe=t=>s_(e,t),e.readonly=()=>sS(e),e.describe=t=>{let n=e.clone();return n0.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>n0.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return n0.get(e);let n=e.clone();return n0.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),il=u("_ZodString",(e,t)=>{tx.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{n.type="string";let{minimum:i,maximum:o,format:s,patterns:a,contentEncoding:c}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof o&&(n.maxLength=o),s&&(n.format=rG[s]??s,""===n.format&&delete n.format),c&&(n.contentEncoding=c),a&&a.size>0){let e=[...a];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n,0);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(rP(...t)),e.includes=(...t)=>e.check(rO(...t)),e.startsWith=(...t)=>e.check(rI(...t)),e.endsWith=(...t)=>e.check(r$(...t)),e.min=(...t)=>e.check(rz(...t)),e.max=(...t)=>e.check(rT(...t)),e.length=(...t)=>e.check(rx(...t)),e.nonempty=(...t)=>e.check(rz(1,...t)),e.lowercase=t=>e.check(rE(t)),e.uppercase=t=>e.check(rR(t)),e.trim=()=>e.check(rM()),e.normalize=(...t)=>e.check(rZ(...t)),e.toLowerCase=()=>e.check(rj()),e.toUpperCase=()=>e.check(rN()),e.slugify=()=>e.check(rL())}),id=u("ZodString",(e,t)=>{tx.init(e,t),il.init(e,t),e.email=t=>e.check(n1(im,t)),e.url=t=>e.check(n5(iC,t)),e.jwt=t=>e.check(rp(i6,t)),e.emoji=t=>e.check(n9(ix,t)),e.guid=t=>e.check(n2(ig,t)),e.uuid=t=>e.check(n6(i_,t)),e.uuidv4=t=>e.check(n4(i_,t)),e.uuidv6=t=>e.check(n3(i_,t)),e.uuidv7=t=>e.check(n8(i_,t)),e.nanoid=t=>e.check(n7(iE,t)),e.guid=t=>e.check(n2(ig,t)),e.cuid=t=>e.check(re(iO,t)),e.cuid2=t=>e.check(rt(i$,t)),e.ulid=t=>e.check(rn(iA,t)),e.base64=t=>e.check(ru(iX,t)),e.base64url=t=>e.check(rl(iQ,t)),e.xid=t=>e.check(rr(iZ,t)),e.ksuid=t=>e.check(ri(ij,t)),e.ipv4=t=>e.check(ro(iL,t)),e.ipv6=t=>e.check(rs(iV,t)),e.cidrv4=t=>e.check(ra(iK,t)),e.cidrv6=t=>e.check(rc(iH,t)),e.e164=t=>e.check(rd(i1,t)),e.datetime=t=>e.check(rX(t)),e.date=t=>e.check(rQ(t)),e.time=t=>e.check(r1(t)),e.duration=t=>e.check(r6(t))});function ip(e){return new id({type:"string",...D(e)})}let ih=u("ZodStringFormat",(e,t)=>{tP.init(e,t),il.init(e,t)}),im=u("ZodEmail",(e,t)=>{tO.init(e,t),ih.init(e,t)});function iy(e){return n1(im,e)}let ig=u("ZodGUID",(e,t)=>{tE.init(e,t),ih.init(e,t)});function iv(e){return n2(ig,e)}let i_=u("ZodUUID",(e,t)=>{tR.init(e,t),ih.init(e,t)});function ib(e){return n6(i_,e)}function iw(e){return n4(i_,e)}function ik(e){return n3(i_,e)}function iS(e){return n8(i_,e)}let iC=u("ZodURL",(e,t)=>{tI.init(e,t),ih.init(e,t)});function iT(e){return n5(iC,e)}function iz(e){return n5(iC,{protocol:/^https?$/,hostname:eR,...D(e)})}let ix=u("ZodEmoji",(e,t)=>{t$.init(e,t),ih.init(e,t)});function iP(e){return n9(ix,e)}let iE=u("ZodNanoID",(e,t)=>{tD.init(e,t),ih.init(e,t)});function iR(e){return n7(iE,e)}let iO=u("ZodCUID",(e,t)=>{tA.init(e,t),ih.init(e,t)});function iI(e){return re(iO,e)}let i$=u("ZodCUID2",(e,t)=>{tU.init(e,t),ih.init(e,t)});function iD(e){return rt(i$,e)}let iA=u("ZodULID",(e,t)=>{tZ.init(e,t),ih.init(e,t)});function iU(e){return rn(iA,e)}let iZ=u("ZodXID",(e,t)=>{tM.init(e,t),ih.init(e,t)});function iM(e){return rr(iZ,e)}let ij=u("ZodKSUID",(e,t)=>{tj.init(e,t),ih.init(e,t)});function iN(e){return ri(ij,e)}let iL=u("ZodIPv4",(e,t)=>{tJ.init(e,t),ih.init(e,t)});function iB(e){return ro(iL,e)}let iF=u("ZodMAC",(e,t)=>{tW.init(e,t),ih.init(e,t)});function iJ(e){return new iF({type:"string",format:"mac",check:"string_format",abort:!1,...D(e)})}let iV=u("ZodIPv6",(e,t)=>{tV.init(e,t),ih.init(e,t)});function iW(e){return rs(iV,e)}let iK=u("ZodCIDRv4",(e,t)=>{tK.init(e,t),ih.init(e,t)});function iG(e){return ra(iK,e)}let iH=u("ZodCIDRv6",(e,t)=>{tG.init(e,t),ih.init(e,t)});function iY(e){return rc(iH,e)}let iX=u("ZodBase64",(e,t)=>{tY.init(e,t),ih.init(e,t)});function iq(e){return ru(iX,e)}let iQ=u("ZodBase64URL",(e,t)=>{tX.init(e,t),ih.init(e,t)});function i0(e){return rl(iQ,e)}let i1=u("ZodE164",(e,t)=>
20{tq.init(e,t),ih.init(e,t)});function i2(e){return rd(i1,e)}let i6=u("ZodJWT",(e,t)=>{tQ.init(e,t),ih.init(e,t)});function i4(e){return rp(i6,e)}let i3=u("ZodCustomStringFormat",(e,t)=>{t0.init(e,t),ih.init(e,t)});function i8(e,t,n={}){return rB(i3,e,t,n)}function i5(e){return rB(i3,"hostname",eE,e)}function i9(e){return rB(i3,"hex",eW,e)}function i7(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,i=o[r];if(!i)throw Error(`Unrecognized hash format: ${r}`);return rB(i3,r,i,t)}let oe=u("ZodNumber",(e,t)=>{t1.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,format:s,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?n.type="integer":n.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),"number"==typeof i&&(n.minimum=i,"number"==typeof u&&"draft-04"!==t.target&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),"number"==typeof o&&(n.maximum=o,"number"==typeof c&&"draft-04"!==t.target&&(c<=o?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof a&&(n.multipleOf=a)})(e,t,n,0),e.gt=(t,n)=>e.check(rm(t,n)),e.gte=(t,n)=>e.check(ry(t,n)),e.min=(t,n)=>e.check(ry(t,n)),e.lt=(t,n)=>e.check(rh(t,n)),e.lte=(t,n)=>e.check(rf(t,n)),e.max=(t,n)=>e.check(rf(t,n)),e.int=t=>e.check(or(t)),e.safe=t=>e.check(or(t)),e.positive=t=>e.check(rm(0,t)),e.nonnegative=t=>e.check(ry(0,t)),e.negative=t=>e.check(rh(0,t)),e.nonpositive=t=>e.check(rf(0,t)),e.multipleOf=(t,n)=>e.check(rw(t,n)),e.step=(t,n)=>e.check(rw(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ot(e){return new oe({type:"number",checks:[],...D(e)})}let on=u("ZodNumberFormat",(e,t)=>{t2.init(e,t),oe.init(e,t)});function or(e){return new on({type:"number",check:"number_format",abort:!1,format:"safeint",...D(e)})}function oi(e){return new on({type:"number",check:"number_format",abort:!1,format:"float32",...D(e)})}function oo(e){return new on({type:"number",check:"number_format",abort:!1,format:"float64",...D(e)})}function os(e){return new on({type:"number",check:"number_format",abort:!1,format:"int32",...D(e)})}function oa(e){return new on({type:"number",check:"number_format",abort:!1,format:"uint32",...D(e)})}let oc=u("ZodBoolean",(e,t)=>{t6.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function ou(e){return new oc({type:"boolean",...D(e)})}let ol=u("ZodBigInt",(e,t)=>{t4.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")})(0,e,0,0),e.gte=(t,n)=>e.check(ry(t,n)),e.min=(t,n)=>e.check(ry(t,n)),e.gt=(t,n)=>e.check(rm(t,n)),e.gte=(t,n)=>e.check(ry(t,n)),e.min=(t,n)=>e.check(ry(t,n)),e.lt=(t,n)=>e.check(rh(t,n)),e.lte=(t,n)=>e.check(rf(t,n)),e.max=(t,n)=>e.check(rf(t,n)),e.positive=t=>e.check(rm(BigInt(0),t)),e.negative=t=>e.check(rh(BigInt(0),t)),e.nonpositive=t=>e.check(rf(BigInt(0),t)),e.nonnegative=t=>e.check(ry(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(rw(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function od(e){return new ol({type:"bigint",...D(e)})}let op=u("ZodBigIntFormat",(e,t)=>{t3.init(e,t),ol.init(e,t)});function oh(e){return new op({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...D(e)})}function of(e){return new op({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...D(e)})}let om=u("ZodSymbol",(e,t)=>{t8.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")})(0,e,0,0)});function oy(e){return new om({type:"symbol",...D(e)})}let og=u("ZodUndefined",(e,t)=>{t5.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")})(0,e,0,0)});function ov(e){return new og({type:"undefined",...D(e)})}let o_=u("ZodNull",(e,t)=>{t9.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"})(0,e,t,0)});function ob(e){return new o_({type:"null",...D(e)})}let ow=u("ZodAny",(e,t)=>{t7.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function ok(){return new ow({type:"any"})}let oS=u("ZodUnknown",(e,t)=>{ne.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function oC(){return new oS({type:"unknown"})}let oT=u("ZodNever",(e,t)=>{nt.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}});function oz(e){return new oT({type:"never",...D(e)})}let ox=u("ZodVoid",(e,t)=>{nn.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")})(0,e,0,0)});function oP(e){return new ox({type:"void",...D(e)})}let oE=u("ZodDate",(e,t)=>{nr.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,e,0,0),e.min=(t,n)=>e.check(ry(t,n)),e.max=(t,n)=>e.check(rf(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function oR(e){return new oE({type:"date",...D(e)})}let oO=u("ZodArray",(e,t)=>{no.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;"number"==typeof o&&(n.minItems=o),"number"==typeof s&&(n.maxItems=s),n.type="array",n.items=rJ(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(rz(t,n)),e.nonempty=t=>e.check(rz(1,t)),e.max=(t,n)=>e.check(rT(t,n)),e.length=(t,n)=>e.check(rx(t,n)),e.unwrap=()=>e.element});function oI(e,t){return new oO({type:"array",element:e,...D(t)})}function o$(e){return o6(Object.keys(e._zod.def.shape))}let oD=u("ZodObject",(e,t)=>{nl.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object",n.properties={};let o=i.shape;for(let e in o)n.properties[e]=rJ(o[e],t,{...r,path:[...r.path,"properties",e]});let s=new Set([...new Set(Object.keys(o))].filter(e=>{let n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));s.size>0&&(n.required=Array.from(s)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=rJ(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),w(e,"shape",()=>t.shape),e.keyof=()=>o6(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:oC()}),e.loose=()=>e.clone({...e._zod.def,catchall:oC()}),e.strict=()=>e.clone({...e._zod.def,catchall:oz()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>(function(e,t){if(!P(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let r=S(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return k(this,"shape",n),n},checks:[]});return $(e,r)})(e,t),e.safeExtend=t=>(function(e,t){if(!P(t))throw Error("Invalid input to safeExtend: expected a plain object");let n={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return k(this,"shape",n),n},checks:e._zod.def.checks};return $(e,n)})(e,t),e.merge=t=>(function(e,t){let n=S(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return k(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return $(e,n)})(e,t),e.pick=t=>(function(e,t){let n=e._zod.def,r=S(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return k(this,"shape",e),e},checks:[]});return $(e,r)})(e,t),e.omit=t=>(function(e,t){let n=e._zod.def,r=S(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return k(this,"shape",r),r},checks:[]});return $(e,r)})(e,t),e.partial=(...t)=>(function(e,t,n){let r=S(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return k(this,"shape",i),i},checks:[]});return $(t,r)})(st,e,t[0]),e.required=(...t)=>(function(e,t,n){let r=S(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(let t in r)i[t]=new e({type:"nonoptional",innerType:r[t]});return k(this,"shape",i),i},checks:[]});return $(t,r)})(sl,e,t[0])});function oA(e,t){return new oD({type:"object",shape:e??{},...D(t)})}function oU(e,t){return new oD({type:"object",shape:e,catchall:oz(),...D(t)})}function oZ(e,t){return new oD({type:"object",shape:e,catchall:oC(),...D(t)})}let oM=u("ZodUnion",(e,t)=>{np.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rH(e,t,n,r),e.options=t.options});function oj(e,t){return new oM({type:"union",options:e,...D(t)})}let oN=u("ZodXor",(e,t)=>{oM.init(e,t),nf.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rH(e,t,n,r),e.options=t.options});function oL(e,t){return new oN({type:"union",options:e,inclusive:!1,...D(t)})}let oB=u("ZodDiscriminatedUnion",(e,t)=>{oM.init(e,t),nm.init(e,t)});function oF(e,t,n){return new oB({type:"union",options:t,discriminator:e,...D(n)})}let oJ=u("ZodIntersection",(e,t)=>{ny.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=rJ(i.left,t,{...r,path:[...r.path,"allOf",0]}),s=rJ(i.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]]})(e,t,n,r)});function oV(e,t){return new oJ({type:"intersection",left:e,right:t})}let oW=u("ZodTuple",(e,t)=>{nv.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="array";
20let o="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",a=i.items.map((e,n)=>rJ(e,t,{...r,path:[...r.path,o,n]})),c=i.rest?rJ(i.rest,t,{...r,path:[...r.path,s,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(n.prefixItems=a,c&&(n.items=c)):"openapi-3.0"===t.target?(n.items={anyOf:a},c&&n.items.anyOf.push(c),n.minItems=a.length,c||(n.maxItems=a.length)):(n.items=a,c&&(n.additionalItems=c));let{minimum:u,maximum:l}=e._zod.bag;"number"==typeof u&&(n.minItems=u),"number"==typeof l&&(n.maxItems=l)})(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function oK(e,t,n){let r=t instanceof tz,i=r?n:t;return new oW({type:"tuple",items:e,rest:r?t:null,...D(i)})}let oG=u("ZodRecord",(e,t)=>{nb.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object",("draft-07"===t.target||"draft-2020-12"===t.target)&&(n.propertyNames=rJ(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=rJ(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function oH(e,t,n){return new oG({type:"record",keyType:e,valueType:t,...D(n)})}function oY(e,t,n){let r=$(e);return r._zod.values=void 0,new oG({type:"record",keyType:r,valueType:t,...D(n)})}function oX(e,t,n){return new oG({type:"record",keyType:e,valueType:t,mode:"loose",...D(n)})}let oq=u("ZodMap",(e,t)=>{nw.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")})(0,e,0,0),e.keyType=t.keyType,e.valueType=t.valueType});function oQ(e,t,n){return new oq({type:"map",keyType:e,valueType:t,...D(n)})}let o0=u("ZodSet",(e,t)=>{nS.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")})(0,e,0,0),e.min=(...t)=>e.check(rS(...t)),e.nonempty=t=>e.check(rS(1,t)),e.max=(...t)=>e.check(rk(...t)),e.size=(...t)=>e.check(rC(...t))});function o1(e,t){return new o0({type:"set",valueType:e,...D(t)})}let o2=u("ZodEnum",(e,t)=>{nT.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=f(e._zod.def.entries);i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=i})(e,0,n,0),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new o2({...t,checks:[],...D(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new o2({...t,checks:[],...D(r),entries:i})}});function o6(e,t){return new o2({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...D(t)})}function o4(e,t){return new o2({type:"enum",entries:e,...D(t)})}let o3=u("ZodLiteral",(e,t)=>{nz.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=[];for(let e of i.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else o.push(Number(e));else o.push(e);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,0),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
20(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function o8(e,t){return new o3({type:"literal",values:Array.isArray(e)?e:[e],...D(t)})}let o5=u("ZodFile",(e,t)=>{nx.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:a}=e._zod.bag;void 0!==o&&(i.minLength=o),void 0!==s&&(i.maxLength=s),a?1===a.length?(i.contentMediaType=a[0],Object.assign(n,i)):n.anyOf=a.map(e=>({...i,contentMediaType:e})):Object.assign(n,i)})(e,0,n,0),e.min=(t,n)=>e.check(rS(t,n)),e.max=(t,n)=>e.check(rk(t,n)),e.mime=(t,n)=>e.check(rA(Array.isArray(t)?t:[t],n))});function o9(e){return new o5({type:"file",...D(e)})}let o7=u("ZodTransform",(e,t)=>{nP.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e,0,0),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new d(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(J(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(J(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function se(e){return new o7({type:"transform",transform:e})}let st=u("ZodOptional",(e,t)=>{nR.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;rJ(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function sn(e){return new st({type:"optional",innerType:e})}let sr=u("ZodNullable",(e,t)=>{nO.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=rJ(i.innerType,t,r),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function si(e){return new sr({type:"nullable",innerType:e})}function so(e){return sn(si(e))}let ss=u("ZodDefault",(e,t)=>{nI.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;rJ(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sa(e,t){return new ss({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():E(t)}})}let sc=u("ZodPrefault",(e,t)=>{nD.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;rJ(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function su(e,t){return new sc({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():E(t)}})}let sl=u("ZodNonOptional",(e,t)=>{nA.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;rJ(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function sd(e,t){return new sl({type:"nonoptional",innerType:e,...D(t)})}let sp=u("ZodSuccess",(e,t)=>{nZ.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"},e.unwrap=()=>e._zod.def.innerType});function sh(e){return new sp({type:"success",innerType:e})}let sf=u("ZodCatch",(e,t)=>{nM.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;rJ(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function sm(e,t){return new sf({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}let sy=u("ZodNaN",(e,t)=>{nj.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")})(0,e,0,0)});function sg(e){return new sy({type:"nan",...D(e)})}let sv=u("ZodPipe",(e,t)=>{nN.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o="input"===t.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;rJ(o,t,r),t.seen.get(e).ref=o})(e,t,0,r),e.in=t.in,e.out=t.out});function s_(e,t){return new sv({type:"pipe",in:e,out:t})}let sb=u("ZodCodec",(e,t)=>{sv.init(e,t),nB.init(e,t)});function sw(e,t,n){return new sb({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}let sk=u("ZodReadonly",(e,t)=>{nV.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;rJ(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sS(e){return new sk({type:"readonly",innerType:e})}let sC=u("ZodTemplateLiteral",(e,t)=>{nK.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");n.type="string",n.pattern=i.source})(e,0,n,0)});function sT(e,t){return new sC({type:"template_literal",parts:e,...D(t)})}let sz=u("ZodLazy",(e,t)=>{nY.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.innerType;rJ(i,t,r),t.seen.get(e).ref=i}
20)(e,t,0,r),e.unwrap=()=>e._zod.def.getter()});function sx(e){return new sz({type:"lazy",getter:e})}let sP=u("ZodPromise",(e,t)=>{nH.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;rJ(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function sE(e){return new sP({type:"promise",innerType:e})}let sR=u("ZodFunction",(e,t)=>{nG.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")})(0,e,0,0)});function sO(e){return new sR({type:"function",input:Array.isArray(e?.input)?oK(e?.input):e?.input??oI(oC()),output:e?.output??oC()})}let sI=u("ZodCustom",(e,t)=>{nX.init(e,t),iu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e,0,0)});function s$(e){let t=new te({check:"custom"});return t._zod.check=e,t}function sD(e,t){let n=D(t);return n.abort??(n.abort=!0),new sI({type:"custom",check:"custom",fn:e??(()=>!0),...n})}function sA(e,t={}){return new sI({type:"custom",check:"custom",fn:e,...D(t)})}function sU(e){let t=function(e,t){let n=new te({check:"custom",...D(void 0)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{"string"==typeof e?n.issues.push(J(e,n.value,t._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=n.value),e.inst??(e.inst=t),e.continue??(e.continue=!t._zod.def.abort),n.issues.push(J(e)))},e(n.value,n)));return t}let sZ=function(e){let t=new te({check:"describe"});return t._zod.onattach=[t=>{let n=n0.get(t)??{};n0.add(t,{...n,description:e})}],t._zod.check=()=>{},t},sM=function(e){let t=new te({check:"meta"});return t._zod.onattach=[t=>{let n=n0.get(t)??{};n0.add(t,{...n,...e})}],t._zod.check=()=>{},t};function sj(e,t={error:`Input not instance of ${e.name}`}){let n=new sI({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...D(t)});return n._zod.bag.Class=e,n}let sN=(...e)=>(function(e,t){let n=D(t),r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(r=r.map(e=>"string"==typeof e?e.toLowerCase():e),i=i.map(e=>"string"==typeof e?e.toLowerCase():e));let o=new Set(r),s=new Set(i),a=e.Codec??nB,c=e.Boolean??t6,u=new a({type:"pipe",in:new(e.String??tx)({type:"string",error:n.error}),out:new c({type:"boolean",error:n.error}),transform:(e,t)=>{let r=e;return"sensitive"!==n.case&&(r=r.toLowerCase()),!!o.has(r)||!s.has(r)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:t.value,inst:u,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?r[0]||"true":i[0]||"false",error:n.error});return u})({Codec:sb,Boolean:oc,String:id},...e);function sL(e){let t=sx(()=>oj([ip(e),ot(),ou(),ob(),oI(t),oH(ip(),t)]));return t}function sB(e,t){return s_(se(e),t)}i||(i={}),h({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(n.input)}`;case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${A(n.values[0])}`;return`Invalid option: expected one of ${m(n.values,"|")}`;
20case"too_big":{let t=n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${m(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`}}})()})},9707:(e,t,n)=>{n.d(t,{Ay:()=>tv});var r,i,o,s={};n.r(s),n.d(s,{fixNegotiationNeeded:()=>$,shimAddTrackRemoveTrack:()=>O,shimAddTrackRemoveTrackWithNative:()=>R,shimGetSendersWithDtmf:()=>P,shimGetUserMedia:()=>T,shimMediaStream:()=>z,shimOnTrack:()=>x,shimPeerConnection:()=>I,shimSenderReceiverGetStats:()=>E});var a={};n.r(a),n.d(a,{shimAddTransceiver:()=>B,shimCreateAnswer:()=>V,shimCreateOffer:()=>J,shimGetDisplayMedia:()=>A,shimGetParameters:()=>F,shimGetUserMedia:()=>D,shimOnTrack:()=>U,shimPeerConnection:()=>Z,shimRTCDataChannel:()=>L,shimReceiverGetStats:()=>j,shimRemoveStream:()=>N,shimSenderGetStats:()=>M});var c={};n.r(c),n.d(c,{shimAudioContext:()=>ee,shimCallbacksAPI:()=>G,shimConstraints:()=>Y,shimCreateOfferLegacy:()=>Q,shimGetUserMedia:()=>H,shimLocalStreamsAPI:()=>W,shimRTCIceServerUrls:()=>X,shimRemoteStreamsAPI:()=>K,shimTrackEventTransceiver:()=>q});var u={};n.r(u),n.d(u,{removeExtmapAllowMixed:()=>ec,shimAddIceCandidateNullOrEmpty:()=>eu,shimConnectionState:()=>ea,shimMaxMessageSize:()=>eo,shimParameterlessSetLocalDescription:()=>el,shimRTCIceCandidate:()=>er,shimRTCIceCandidateRelayProtocol:()=>ei,shimSendThrowTypeError:()=>es});class l{constructor(){this.encoder=new TextEncoder,this._pieces=[],this._parts=[]}append_buffer(e){this.flush(),this._parts.push(e)}append(e){this._pieces.push(e)}flush(){if(this._pieces.length>0){let e=new Uint8Array(this._pieces);this._parts.push(e),this._pieces=[]}}toArrayBuffer(){let e=[];for(let t of this._parts)e.push(t);return function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e){let e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(e,r),r+=t.byteLength}return n}(e).buffer}}function d(e){return new h(e).unpack()}function p(e){let t=new f,n=t.pack(e);return n instanceof Promise?n.then(()=>t.getBuffer()):t.getBuffer()}class h{constructor(e){this.index=0,this.dataBuffer=e,this.dataView=new Uint8Array(this.dataBuffer),this.length=this.dataBuffer.byteLength}unpack(){let e,t=this.unpack_uint8();if(t<128)return t;if((224^t)<32)return(224^t)-32;if((e=160^t)<=15)return this.unpack_raw(e);if((e=176^t)<=15)return this.unpack_string(e);if((e=144^t)<=15)return this.unpack_array(e);if((e=128^t)<=15)return this.unpack_map(e);switch(t){case 192:return null;case 193:case 212:case 213:case 214:case 215:return;case 194:return!1;case 195:return!0;case 202:return this.unpack_float();case 203:return this.unpack_double();case 204:return this.unpack_uint8();case 205:return this.unpack_uint16();case 206:return this.unpack_uint32();case 207:return this.unpack_uint64();case 208:return this.unpack_int8();case 209:return this.unpack_int16();case 210:return this.unpack_int32();case 211:return this.unpack_int64();case 216:return e=this.unpack_uint16(),this.unpack_string(e);case 217:return e=this.unpack_uint32(),this.unpack_string(e);case 218:return e=this.unpack_uint16(),this.unpack_raw(e);case 219:return e=this.unpack_uint32(),this.unpack_raw(e);case 220:return e=this.unpack_uint16(),this.unpack_array(e);case 221:return e=this.unpack_uint32(),this.unpack_array(e);case 222:return e=this.unpack_uint16(),this.unpack_map(e);case 223:return e=this.unpack_uint32(),this.unpack_map(e)}}
vendor: 41,881 bytes, line 20
20unpack_uint8(){let e=255&this.dataView[this.index];return this.index++,e}unpack_uint16(){let e=this.read(2),t=(255&e[0])*256+(255&e[1]);return this.index+=2,t}unpack_uint32(){let e=this.read(4),t=((256*e[0]+e[1])*256+e[2])*256+e[3];return this.index+=4,t}unpack_uint64(){let e=this.read(8),t=((((((256*e[0]+e[1])*256+e[2])*256+e[3])*256+e[4])*256+e[5])*256+e[6])*256+e[7];return this.index+=8,t}unpack_int8(){let e=this.unpack_uint8();return e<128?e:e-256}unpack_int16(){let e=this.unpack_uint16();return e<32768?e:e-65536}unpack_int32(){let e=this.unpack_uint32();return e<0x80000000?e:e-0x100000000}unpack_int64(){let e=this.unpack_uint64();return e<0x8000000000000000?e:e-0xffffffffffffffff}unpack_raw(e){if(this.length<this.index+e)throw Error(`BinaryPackFailure: index is out of range ${this.index} ${e} ${this.length}`);let t=this.dataBuffer.slice(this.index,this.index+e);return this.index+=e,t}unpack_string(e){let t,n,r=this.read(e),i=0,o="";for(;i<e;)(t=r[i])<160?(n=t,i++):(192^t)<32?(n=(31&t)<<6|63&r[i+1],i+=2):(224^t)<16?(n=(15&t)<<12|(63&r[i+1])<<6|63&r[i+2],i+=3):(n=(7&t)<<18|(63&r[i+1])<<12|(63&r[i+2])<<6|63&r[i+3],i+=4),o+=String.fromCodePoint(n);return this.index+=e,o}unpack_array(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=this.unpack();return t}unpack_map(e){let t={};for(let n=0;n<e;n++)t[this.unpack()]=this.unpack();return t}unpack_float(){let e=this.unpack_uint32();return(0==e>>31?1:-1)*(8388607&e|8388608)*2**((e>>23&255)-127-23)}unpack_double(){let e=this.unpack_uint32(),t=this.unpack_uint32(),n=(e>>20&2047)-1023;return(0==e>>31?1:-1)*((1048575&e|1048576)*2**(n-20)+t*2**(n-52))}read(e){let t=this.index;if(t+e<=this.length)return this.dataView.subarray(t,t+e);throw Error("BinaryPackFailure: read index out of range")}}class f{getBuffer(){return this._bufferBuilder.toArrayBuffer()}pack(e){if("string"==typeof e)this.pack_string(e);else if("number"==typeof e)Math.floor(e)===e?this.pack_integer(e):this.pack_double(e);else if("boolean"==typeof e)!0===e?this._bufferBuilder.append(195):!1===e&&this._bufferBuilder.append(194);else if(void 0===e)this._bufferBuilder.append(192);else if("object"==typeof e)if(null===e)this._bufferBuilder.append(192);else{let t=e.constructor;if(e instanceof Array){let t=this.pack_array(e);if(t instanceof Promise)return t.then(()=>this._bufferBuilder.flush())}else if(e instanceof ArrayBuffer)this.pack_bin(new Uint8Array(e));else if("BYTES_PER_ELEMENT"in e)this.pack_bin(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));else if(e instanceof Date)this.pack_string(e.toString());else if(e instanceof Blob)return e.arrayBuffer().then(e=>{this.pack_bin(new Uint8Array(e)),this._bufferBuilder.flush()});else if(t==Object||t.toString().startsWith("class")){let t=this.pack_object(e);if(t instanceof Promise)return t.then(()=>this._bufferBuilder.flush())}else throw Error(`Type "${t.toString()}" not yet supported`)}else throw Error(`Type "${typeof e}" not yet supported`);this._bufferBuilder.flush()}pack_bin(e){let t=e.length;if(t<=15)this.pack_uint8(160+t);else if(t<=65535)this._bufferBuilder.append(218),this.pack_uint16(t);else if(t<=0xffffffff)this._bufferBuilder.append(219),this.pack_uint32(t);else throw Error("Invalid length");this._bufferBuilder.append_buffer(e)}pack_string(e){let t=this._textEncoder.encode(e),n=t.length;if(n<=15)this.pack_uint8(176+n);else if(n<=65535)this._bufferBuilder.append(216),this.pack_uint16(n);else if(n<=0xffffffff)this._bufferBuilder.append(217),this.pack_uint32(n);else throw Error("Invalid length");this._bufferBuilder.append_buffer(t)}pack_array(e){let t=e.length;if(t<=15)this.pack_uint8(144+t);else if(t<=65535)this._bufferBuilder.append(220),this.pack_uint16(t);else if(t<=0xffffffff)this._bufferBuilder.append(221),this.pack_uint32(t);else throw Error("Invalid length");let n=r=>{if(r<t){let t=this.pack(e[r]);return t instanceof Promise?t.then(()=>n(r+1)):n(r+1)}};return n(0)}pack_integer(e){if(e>=-32&&e<=127)this._bufferBuilder.append(255&e);else if(e>=0&&e<=255)this._bufferBuilder.append(204),this.pack_uint8(e);else if(e>=-128&&e<=127)this._bufferBuilder.append(208),this.pack_int8(e);else if(e>=0&&e<=65535)this._bufferBuilder.append(205),this.pack_uint16(e);else if(e>=-32768&&e<=32767)this._bufferBuilder.append(209),this.pack_int16(e);else if(e>=0&&e<=0xffffffff)this._bufferBuilder.append(206),this.pack_uint32(e);else if(e>=-0x80000000&&e<=0x7fffffff)this._bufferBuilder.append(210),this.pack_int32(e);else if(e>=-0x8000000000000000&&e<=0x8000000000000000)this._bufferBuilder.append(211),this.pack_int64(e);else if(e>=0&&e<=0xffffffffffffffff)this._bufferBuilder.append(207),this.pack_uint64(e);else throw Error("Invalid integer")}pack_double(e){let t=0;e<0&&(t=1,e=-e);let n=Math.floor(Math.log(e)/Math.LN2),r=Math.floor((e/2**n-1)*0x10000000000000),i=t<<31|n+1023<<20|r/0x100000000&1048575;this._bufferBuilder.append(203),this.pack_int32(i),this.pack_int32(r%0x100000000)}pack_object(e){let t=Object.keys(e),n=t.length;if(n<=15)this.pack_uint8(128+n);else if(n<=65535)this._bufferBuilder.append(222),this.pack_uint16(n);else if(n<=0xffffffff)this._bufferBuilder.append(223),this.pack_uint32(n);else throw Error("Invalid length");let r=n=>{if(n<t.length){let i=t[n];if(e.hasOwnProperty(i)){this.pack(i);let t=this.pack(e[i]);if(t instanceof Promise)return t.then(()=>r(n+1))}return r(n+1)}};return r(0)}pack_uint8(e){this._bufferBuilder.append(e)}pack_uint16(e){this._bufferBuilder.append(e>>8),this._bufferBuilder.append(255&e)}pack_uint32(e){let t=0|e;this._bufferBuilder.append((0xff000000&t)>>>24),this._bufferBuilder.append((0xff0000&t)>>>16),this._bufferBuilder.append((65280&t)>>>8),this._bufferBuilder.append(255&t)}pack_uint64(e){let t=e/0x100000000,n=e%0x100000000;this._bufferBuilder.append((0xff000000&t)>>>24),this._bufferBuilder.append((0xff0000&t)>>>16),this._bufferBuilder.append((65280&t)>>>8),this._bufferBuilder.append(255&t),this._bufferBuilder.append((0xff000000&n)>>>24),this._bufferBuilder.append((0xff0000&n)>>>16),this._bufferBuilder.append((65280&n)>>>8),this._bufferBuilder.append(255&n)}pack_int8(e){this._bufferBuilder.append(255&e)}pack_int16(e){this._bufferBuilder.append((65280&e)>>8),this._bufferBuilder.append(255&e)}pack_int32(e){this._bufferBuilder.append(e>>>24&255),this._bufferBuilder.append((0xff0000&e)>>>16),this._bufferBuilder.append((65280&e)>>>8),this._bufferBuilder.append(255&e)}pack_int64(e){let t=Math.floor(e/0x100000000),n=e%0x100000000;this._bufferBuilder.append((0xff000000&t)>>>24),this._bufferBuilder.append((0xff0000&t)>>>16),this._bufferBuilder.append((65280&t)>>>8),this._bufferBuilder.append(255&t),this._bufferBuilder.append((0xff000000&n)>>>24),this._bufferBuilder.append((0xff0000&n)>>>16),this._bufferBuilder.append((65280&n)>>>8),this._bufferBuilder.append(255&n)}constructor(){this._bufferBuilder=new l,this._textEncoder=new TextEncoder}}let m=!0,y=!0;function g(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function v(e,t,n){if(!e.RTCPeerConnection)return;let r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);let o=e=>{let t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};let o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t]||!this._eventMap[t].has(n))return o.apply(this,arguments);let r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function _(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(m=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function b(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(y=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function w(){"object"==typeof window&&(m||"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments))}function k(e,t){y&&console.warn(e+" is deprecated, please use "+t+" instead.")}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e,t,n){let r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;let o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&function e(t,n,r){!n||r.has(n.id)||(r.set(n.id,n),Object.keys(n).forEach(i=>{i.endsWith("Id")?e(t,t.get(n[i]),r):i.endsWith("Ids")&&n[i].forEach(n=>{e(t,t.get(n),r)})}))}(e,n,i)})}),i}function T(e,t){let n=e&&e.navigator;if(!n.mediaDevices)return;let r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;let t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;let r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);let i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),(e={})[i("max",n)]=r.ideal):e[i("",n)]=r.ideal,t.optional.push(e)}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){let t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});let s=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!s)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:("user"===o.exact||"user"===o.ideal)&&(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let s=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!s&&n.length&&t.includes("back")&&(s=n[n.length-1]),s&&(e.video.deviceId=o.exact?{exact:s.deviceId}:{ideal:s.deviceId}),e.video=r(e.video),w("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return w("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:({PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"})[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=(function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}).bind(n),n.mediaDevices.getUserMedia){let e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function z(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function x(e){if("object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype)v(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e));else{Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};let i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};let i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}}function P(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){let t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};let r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);let t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{let t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function E(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>C(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),v(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>C(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;let t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e,t,n,r=arguments[0];return(this.getSenders().forEach(t=>{t.track===r&&(e?n=!0:e=t)}),this.getReceivers().forEach(e=>(e.track===r&&(t?n=!0:t=e),e.track===r)),n||e&&t)?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):e?e.getStats():t?t.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function R(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});let t=this.getSenders();n.apply(this,arguments);let r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{let n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function O(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return R(e);let n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){let n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};let i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");let r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{let r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){let n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=({[t](){let e=arguments,t=arguments.length&&"function"==typeof arguments[0];return t?n.apply(this,[t=>{let n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}})[t]});let s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){var e,t;let n;return arguments.length&&arguments[0].type?(arguments[0]=(e=this,t=arguments[0],n=t.sdp,Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})),s.apply(this,arguments)):s.apply(this,arguments)};let a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){let e=a.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){let t;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function I(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){let n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=({[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}})[t]})}function $(e,t){v(e,"negotiationneeded",e=>{let n=e.target;if(!(t.version<72)&&(!n.getConfiguration||"plan-b"!==n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}function D(e,t){let n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){k("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){let e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(e((n=JSON.parse(JSON.stringify(n))).audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){let t=r.prototype.getSettings;r.prototype.getSettings=function(){let n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){let t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(e(n=JSON.parse(JSON.stringify(n)),"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function A(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){let e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function U(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Z(e,t){if("object"!=typeof e||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){let n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=({[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}})[t]});let n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function M(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function j(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),v(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function N(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){k("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function L(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function B(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]);let n=(e=[...e]).length>0;n&&e.forEach(e=>{if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError("max_framerate must be >= 0.0")});let r=t.apply(this,arguments);if(n){let{sender:t}=r,n=t.getParameters();"encodings"in n&&(1!==n.encodings.length||0!==Object.keys(n.encodings[0]).length)||(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function F(e){if(!("object"==typeof e&&e.RTCRtpSender))return;let t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){let e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function J(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function V(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function W(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);let t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);let n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function K(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);let n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function G(e){if("object"!=typeof e||!e.RTCPeerConnection)return;let t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){let r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){let n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let a=function(e,t,n){let r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=a,t.setRemoteDescription=a=function(e,t,n){let r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=function(e,t,n){let r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r}}function H(e){let t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){let e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(Y(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}).bind(t))}function Y(e){return e&&void 0!==e.video?Object.assign({},e,{video:function e(t){return S(t)?Object.keys(t).reduce(function(n,r){let i=S(t[r]),o=i?e(t[r]):t[r],s=i&&!Object.keys(o).length;return void 0===o||s?n:Object.assign(n,{[r]:o})},{}):t}(e.video)}):e}function X(e){if(!e.RTCPeerConnection)return;let t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){let t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(k("RTCIceServer.url","RTCIceServer.urls"),(r=JSON.parse(JSON.stringify(r))).urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function q(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Q(e){let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function ee(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var et=n(1944),en=n.n(et);function er(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;let t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let n=new t(e),r=en().parseCandidate(e.candidate);for(let e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,v(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function ei(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||v(e,"icecandidate",e=>{if(e.candidate){let t=en().parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol=({0:"tls",1:"tcp",2:"udp"})[t.priority>>24])}return e})}function eo(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});let n=function(e){if(!e||!e.sdp)return!1;let t=en().splitSections(e.sdp);return t.shift(),t.some(e=>{let t=en().parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})},r=function(e){let t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return -1;let n=parseInt(t[1],10);return n!=n?-1:n},i=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:0x7ffffff5:t.version<60?57===t.version?65535:65536:0x7ffffff5),n},o=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);let i=en().matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=0x7ffffff5),r},s=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){let{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){let e,t=r(arguments[0]),n=i(t),s=o(arguments[0],t);e=0===n&&0===s?1/0:0===n||0===s?Math.max(n,s):Math.min(n,s);let a={};Object.defineProperty(a,"maxMessageSize",{get:()=>e}),this._sctp=a}return s.apply(this,arguments)}}function es(e){if(!(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){let n=e.send;e.send=function(){let r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}let n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=n.apply(this,arguments);return t(e,this),e},v(e,"datachannel",e=>(t(e.channel,e.target),e))}function ea(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;let t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return({completed:"connected",checking:"connecting"})[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{let n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{let t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;let n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function ec(e,t){if(!e.RTCPeerConnection||"chrome"===t.browser&&t.version>=71||"safari"===t.browser&&t._safariVersion>=13.1)return;let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){let n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function eu(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function el(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(!(e={type:e.type,sdp:e.sdp}).type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}return e.sdp||"offer"!==e.type&&"answer"!==e.type?n.apply(this,[e]):("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}let ed=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let n=function(e){let t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;let{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){let e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}return n.mozGetUserMedia?(t.browser="firefox",t.version=parseInt(g(n.userAgent,/Firefox\/(\d+)\./,1))):n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection?(t.browser="chrome",t.version=parseInt(g(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))):e.RTCPeerConnection&&n.userAgent.match(/AppleWeb
20Kit\/(\d+)\./)?(t.browser="safari",t.version=parseInt(g(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=g(n.userAgent,/Version\/(\d+(\.?\d+))/,1)):t.browser="Not a supported browser.",t}(e),r={browserDetails:n,commonShim:u,extractVersion:g,disableLog:_,disableWarnings:b,sdp:et};switch(n.browser){case"chrome":if(!s||!I||!t.shimChrome){w("Chrome shim is not included in this adapter release.");break}if(null===n.version){w("Chrome shim can not determine version, not shimming.");break}w("adapter.js shimming chrome."),r.browserShim=s,eu(e,n),el(e,n),T(e,n),z(e,n),I(e,n),x(e,n),O(e,n),P(e,n),E(e,n),$(e,n),er(e,n),ei(e,n),ea(e,n),eo(e,n),es(e,n),ec(e,n);break;case"firefox":if(!a||!Z||!t.shimFirefox){w("Firefox shim is not included in this adapter release.");break}w("adapter.js shimming firefox."),r.browserShim=a,eu(e,n),el(e,n),D(e,n),Z(e,n),U(e,n),N(e,n),M(e,n),j(e,n),L(e,n),B(e,n),F(e,n),J(e,n),V(e,n),er(e,n),ea(e,n),eo(e,n),es(e,n);break;case"safari":if(!c||!t.shimSafari){w("Safari shim is not included in this adapter release.");break}w("adapter.js shimming safari."),r.browserShim=c,eu(e,n),el(e,n),X(e,n),Q(e,n),G(e,n),W(e,n),K(e,n),q(e,n),H(e,n),ee(e,n),er(e,n),ei(e,n),eo(e,n),es(e,n),ec(e,n);break;default:w("Unsupported browser!")}return r}({window:"undefined"==typeof window?void 0:window});function ep(e,t,n){var r=Math.floor(n/0x100000000);e.setUint32(t,r),e.setUint32(t+4,n)}function eh(e,t){return 0x100000000*e.getInt32(t)+e.getUint32(t+4)}var ef=n(4310),em=(void 0===ef||(null==(r=null==ef?void 0:ef.env)?void 0:r.TEXT_ENCODING)!=="never")&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function ey(e){for(var t=e.length,n=0,r=0;r<t;){var i=e.charCodeAt(r++);if((0xffffff80&i)==0){n++;continue}if((0xfffff800&i)==0)n+=2;else{if(i>=55296&&i<=56319&&r<t){var o=e.charCodeAt(r);(64512&o)==56320&&(++r,i=((1023&i)<<10)+(1023&o)+65536)}(0xffff0000&i)==0?n+=3:n+=4}}return n}var eg=em?new TextEncoder:void 0,ev=em?200*(void 0!==ef&&(null==(i=null==ef?void 0:ef.env)?void 0:i.TEXT_ENCODING)!=="force"):0xffffffff,e_=(null==eg?void 0:eg.encodeInto)?function(e,t,n){eg.encodeInto(e,t.subarray(n))}:function(e,t,n){t.set(eg.encode(e),n)};function eb(e,t,n){for(var r=t,i=r+n,o=[],s="";r<i;){var a=e[r++];if((128&a)==0)o.push(a);else if((224&a)==192){var c=63&e[r++];o.push((31&a)<<6|c)}else if((240&a)==224){var c=63&e[r++],u=63&e[r++];o.push((31&a)<<12|c<<6|u)}else if((248&a)==240){var c=63&e[r++],u=63&e[r++],l=(7&a)<<18|c<<12|u<<6|63&e[r++];l>65535&&(l-=65536,o.push(l>>>10&1023|55296),l=56320|1023&l),o.push(l)}else o.push(a);o.length>=4096&&(s+=String.fromCharCode.apply(String,o),o.length=0)}return o.length>0&&(s+=String.fromCharCode.apply(String,o)),s}var ew=em?new TextDecoder:null,ek=em?200*(void 0!==ef&&(null==(o=null==ef?void 0:ef.env)?void 0:o.TEXT_DECODER)!=="force"):0xffffffff,eS=function(e,t){this.type=e,this.data=t},eC=function(){var e=function(t,n){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eT=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,Object.create(t.prototype)),Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,value:t.name}),r}return eC(t,e),t}(Error),ez={type:-1,encode:function(e){var t,n,r,i;return e instanceof Date?function(e){var t=e.sec,n=e.nsec;if(t>=0&&n>=0&&t<=0x3ffffffff)if(0===n&&t<=0xffffffff){var r=new Uint8Array(4),i=new DataView(r.buffer);return i.setUint32(0,t),r}else{var o=t/0x100000000,r=new Uint8Array(8),i=new DataView(r.buffer);return i.setUint32(0,n<<2|3&o),i.setUint32(4,0|t),r}var r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,n),ep(i,4,t),r}((n=Math.floor((t=e.getTime())/1e3),i=Math.floor((r=(t-1e3*n)*1e6)/1e9),{sec:n+i,nsec:r-1e9*i})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:var n=t.getUint32(0),r=0;return{sec:n,nsec:0};case 8:var i=t.getUint32(0),n=(3&i)*0x100000000+t.getUint32(4),r=i>>>2;return{sec:n,nsec:r};case 12:var n=eh(t,4),r=t.getUint32(0);return{sec:n,nsec:r};default:throw new eT("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},ex=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(ez)}return e.prototype.register=function(e){var t=e.type,n=e.encode,r=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=r;else{var i=1+t;this.builtInEncoders[i]=n,this.builtInDecoders[i]=r}},e.prototype.tryToEncode=function(e,t){for(var n=0;n<this.builtInEncoders.length;n++){var r=this.builtInEncoders[n];if(null!=r){var i=r(e,t);if(null!=i){var o=-1-n;return new eS(o,i)}}}for(var n=0;n<this.encoders.length;n++){var r=this.encoders[n];if(null!=r){var i=r(e,t);if(null!=i){var o=n;return new eS(o,i)}}}return e instanceof eS?e:null},e.prototype.decode=function(e,t,n){var r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,n):new eS(t,e)},e.defaultCodec=new e,e}();function eP(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}function eE(e){return"".concat(e<0?"-":"","0x").concat(Math.abs(e).toString(16).padStart(2,"0"))}!function(){function e(e,t,n,r,i,o,s,a){void 0===e&&(e=ex.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=100),void 0===r&&(r=2048),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===a&&(a=!1),this.extensionCodec=e,this.context=t,this.maxDepth=n,this.initialBufferSize=r,this.sortKeys=i,this.forceFloat32=o,this.ignoreUndefined=s,this.forceIntegerToFloat=a,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}e.prototype.reinitializeState=function(){this.pos=0},e.prototype.encodeSharedRef=function(e){return this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)},e.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)},e.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"str
20ing"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(2*t)},e.prototype.resizeBuffer=function(e){var t=new ArrayBuffer(e),n=new Uint8Array(t),r=new DataView(t);n.set(this.bytes),this.view=r,this.bytes=n},e.prototype.encodeNil=function(){this.writeU8(192)},e.prototype.encodeBoolean=function(e){!1===e?this.writeU8(194):this.writeU8(195)},e.prototype.encodeNumber=function(e){Number.isSafeInteger(e)&&!this.forceIntegerToFloat?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<0x100000000?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-0x80000000?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<0x100000000)this.writeU8(219),this.writeU32(e);else throw Error("Too long string: ".concat(e," bytes in UTF-8"))},e.prototype.encodeString=function(e){if(e.length>ev){var t=ey(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),e_(e,this.bytes,this.pos),this.pos+=t}else{var t=ey(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var r=e.length,i=n,o=0;o<r;){var s=e.charCodeAt(o++);if((0xffffff80&s)==0){t[i++]=s;continue}if((0xfffff800&s)==0)t[i++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&o<r){var a=e.charCodeAt(o);(64512&a)==56320&&(++o,s=((1023&s)<<10)+(1023&a)+65536)}(0xffff0000&s)==0?t[i++]=s>>12&15|224:(t[i++]=s>>18&7|240,t[i++]=s>>12&63|128),t[i++]=s>>6&63|128}t[i++]=63&s|128}}(e,this.bytes,this.pos),this.pos+=t}},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if("object"==typeof e)this.encodeMap(e,t);else throw Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)))},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<0x100000000)this.writeU8(198),this.writeU32(t);else throw Error("Too large binary: ".concat(t));var n=eP(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<0x100000000)this.writeU8(221),this.writeU32(n);else throw Error("Too large array: ".concat(n));for(var r=0;r<e.length;r++){var i=e[r];this.doEncode(i,t+1)}},e.prototype.countWithoutUndefined=function(e,t){for(var n=0,r=0;r<t.length;r++)void 0!==e[t[r]]&&n++;return n},e.prototype.encodeMap=function(e,t){var n=Object.keys(e);this.sortKeys&&n.sort();var r=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(r<16)this.writeU8(128+r);else if(r<65536)this.writeU8(222),this.writeU16(r);else if(r<0x100000000)this.writeU8(223),this.writeU32(r);else throw Error("Too large map object: ".concat(r));for(var i=0;i<n.length;i++){var o=n[i],s=e[o];this.ignoreUndefined&&void 0===s||(this.encodeString(o),this.doEncode(s,t+1))}},e.prototype.encodeExtension=function(e){var t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<0x100000000)this.writeU8(201),this.writeU32(t);else throw Error("Too large extension object: ".concat(t));this.writeI8(e.type),this.writeU8a(e.data)},e.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},e.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},e.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},e.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},e.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},e.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},e.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},e.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},e.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},e.prototype.writeU64=function(e){var t,n;this.ensureBufferSizeToWrite(8),t=this.view,n=this.pos,t.setUint32(n,e/0x100000000),t.setUint32(n+4,e),this.pos+=8},e.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),ep(this.view,this.pos,e),this.pos+=8}}();var eR=function(){function e(e,t){void 0===e&&(e=16),void 0===t&&(t=16),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var n=0;n<this.maxKeyLength;n++)this.caches.push([])}return e.prototype.canBeCached=function(e){return e>0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){var r=this.caches[n-1];e:for(var i=0;i<r.length;i++){for(var o=r[i],s=o.bytes,a=0;a<n;a++)if(s[a]!==e[t+a])continue e;return o.str}return null},e.prototype.store=function(e,t){var n=this.caches[e.length-1],r={bytes:e,str:t};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)}
vendor: 13,095 bytes, line 20
20,e.prototype.decode=function(e,t,n){var r=this.find(e,t,n);if(null!=r)return this.hit++,r;this.miss++;var i=eb(e,t,n),o=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(o,i),i},e}(),eO=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var c=[o,a];if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(6===c[0]&&s.label<i[1]){s.label=i[1],i=c;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(c);break}i[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},eI=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,s,a;o=r,s=i,a=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}},e$=function(e){return this instanceof e$?(this.v=e,this):new e$(e)},eD=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})})}function a(e,t){try{var n;(n=i[e](t)).value instanceof e$?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},eA=function(e){var t=typeof e;return"string"===t||"number"===t},eU=new DataView(new ArrayBuffer(0)),eZ=new Uint8Array(eU.buffer),eM=function(){try{eU.getInt8(0)}catch(e){return e.constructor}throw Error("never reached")}(),ej=new eM("Insufficient data"),eN=new eR;function eL(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}!function(){function e(e,t,n,r,i,o,s,a){void 0===e&&(e=ex.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=0xffffffff),void 0===r&&(r=0xffffffff),void 0===i&&(i=0xffffffff),void 0===o&&(o=0xffffffff),void 0===s&&(s=0xffffffff),void 0===a&&(a=eN),this.extensionCodec=e,this.context=t,this.maxStrLength=n,this.maxBinLength=r,this.maxArrayLength=i,this.maxMapLength=o,this.maxExtLength=s,this.keyDecoder=a,this.totalPos=0,this.pos=0,this.view=eU,this.bytes=eZ,this.headByte=-1,this.stack=[]}e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1,this.stack.length=0},e.prototype.setBuffer=function(e){this.bytes=eP(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=eP(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining(1)){var t=this.bytes.subarray(this.pos),n=eP(e),r=new Uint8Array(t.length+n.length);r.set(t),r.set(n,t.length),this.setBuffer(r)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return this.view.byteLength-this.pos>=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return eO(this,function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:if(!this.hasRemaining(1))return[3,3];return[4,this.doDecodeSync()];case 2:return t.sent(),[3,1];case 3:return[2]}})},e.prototype.decodeAsync=function(e){var t,n,r,i,o,s,a,c;return o=this,s=void 0,a=void 0,c=function(){var o,s,a,c,u,l,d;return eO(this,function(p){switch(p.label){case 0:o=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=eI(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,o)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),o=!0}catch(e){if(!(e instanceof eM))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return r={error:p.sent()},[3,12];case 7:if(p.trys.push([7,,10,11]),!(n&&!n.done&&(i=t.return)))return[3,9];return[4,i.call(t)];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(r)throw r.error;return[7];case 11:return[7];case 12:if(o){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw c=this,u=c.headByte,l=c.pos,d=c.totalPos,RangeError("Insufficient data in parsing ".concat(eE(u)," at ").concat(d," (").concat(l," in the current buffer)"))}})},new(a||(a=Promise))(function(e,t){function n(e){try{i(c.next(e))}catch(e){t(e)}}function r(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof a?i:new a(function(e){e(i)})).then(n,r)}i((c=c.apply(o,s||[])).next())})},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return eD(this,arguments,function(){var n,r,i,o,s,a,c,u;return eO(this,function(l){switch(l.label){case 0:n=t,r=-1,l.label=1;case 1:l.trys.push([1,13,14,19]),i=eI(e),l.label=2;case 2:return[4,e$(i.next())];case 3:if((o=l.sent()).done)return[3,12];if(s=o.value,t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(r=this.readArraySize(),n=!1,this.complete()),l.label=4;case 4:l.trys.push([4,9,,10]),l.label=5;case 5:return[4,e$(this.doDecodeSync())];case 6:return[4,l.sent()];case 7:if(l.sent(),0==--r)return[3,8];return[3,5];case 8:return[3,10];case 9:if(!((a=l.sent())instanceof eM))throw a;return[3,10];case 10:this.totalPos+=this.pos,l.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c={error:l.sent()},[3,19];case 14:if(l.trys.push([14,,17,18]),!(o&&!o.done&&(u=i.return)))return[3,16];return[4,e$(u.call(i))];case 15:l.sent(),l.label=16;case 16:return[3,18];case 17:if(c)throw c.error;return[7];case 18:return[7];case 19:return[2]}})})},e.prototype.doDecodeSync=function(){t:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){var n=e-128;if(0!==n){this.pushMapState(n),this.complete();continue}t={}}else if(e<160){var n=e-144;if(0!==n){this.pushArrayState(n),this.complete();continue}t=[]}else{var r=e-160;t=this.decodeUtf8String(r,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e){var r=this.lookU8();t=this.decodeUtf8String(r,1)}else if(218===e){var r=this.lookU16();t=this.decodeUtf8String(r,2)}else if(219===e){var r=this.lookU32();t=this.decodeUtf8String(r,4)}else if(220===e){var n=this.readU16();if(0!==n){this.pushArrayState(n),this.complete();continue}t=[]}else if(221===e){var n=this.readU32();if(0!==n){this.pushArrayState(n),this.complete();continue}t=[]}else if(222===e){var n=this.readU16();if(0!==n){this.pushMapState(n),this.complete();continue}t={}}else if(223===e){var n=this.readU32();if(0!==n){this.pushMapState(n),this.complete();continue}t={}}else if(196===e){var n=this.lookU8();t=this.decodeBinary(n,1)}else if(197===e){var n=this.lookU16();t=this.decodeBinary(n,2)}else if(198===e){var n=this.lookU32();t=this.decodeBinary(n,4)}else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e){var n=this.lookU8();t=this.decodeExtension(n,1)}else if(200===e){var n=this.lookU16();t=this.decodeExtension(n,2)}else if(201===e){var n=this.lookU32();t=this.decodeExtension(n,4)}else throw new eT("Unrecognized type byte: ".concat(eE(e)));this.complete();for(var i=this.stack;i.length>0;){var o=i[i.length-1];if(0===o.type)if(o.array[o.position]=t,o.position++,o.position===o.size)i.pop(),t=o.array;else continue t;else if(1===o.type){if(!eA(t))throw new eT("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new eT("The key __proto__ is not allowed");o.key=t,o.type=2;continue t}else if(o.map[o.key]=t,o.readCount++,o.readCount===o.size)i.pop(),t=o.map;else{o.key=null,o.type=1;continue t}}return t}},e.prototype.readHeadByte=function(){return -1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new eT("Unrecognized array type byte: ".concat(eE(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new eT("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new eT("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){if(e>this.maxStrLength)throw new eT("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLength<this.pos+t+e)throw ej;var n,r,i,o,s=this.pos+t;return this.stateIsMapKey()&&(null==(i=this.keyDecoder)?void 0:i.canBeCached(e))?o=this.keyDecoder.decode(this.bytes,s,e):e>ek?(n=this.bytes,r=n.subarray(s,s+e),o=ew.decode(r)):o=eb(this.bytes,s,e),this.pos+=t+e,o},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new eT("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw ej;var n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new eT("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,0x100000000*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=eh(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e}}();class eB{constructor(){this.chunkedMTU=16300,this._dataCount=1,this.chunk=e=>{let t=[],n=e.byteLength,r=Math.ceil(n/this.chunkedMTU),i=0,o=0;for(;o<n;){let s=Math.min(n,o+this.chunkedMTU),a=e.slice(o,s),c={__peerData:this._dataCount,n:i,data:a,total:r};t.push(c),o=s,i++}return this._dataCount++,t}}}let eF=ed.default||ed,eJ=new class{isWebRTCSupported(){return"undefined"!=typeof RTCPeerConnection}isBrowserSupported(){let e=this.getBrowser(),t=this.getVersion();return!!this.supportedBrowsers.includes(e)&&("chrome"===e?t>
vendor: 11,914 bytes, lines 20-26
20=this.minChromeVersion:"firefox"===e?t>=this.minFirefoxVersion:"safari"===e&&!this.isIOS&&t>=this.minSafariVersion)}getBrowser(){return eF.browserDetails.browser}getVersion(){return eF.browserDetails.version||0}isUnifiedPlanSupported(){let e,t=this.getBrowser(),n=eF.browserDetails.version||0;if("chrome"===t&&n<this.minChromeVersion)return!1;if("firefox"===t&&n>=this.minFirefoxVersion)return!0;if(!window.RTCRtpTransceiver||!("currentDirection"in RTCRtpTransceiver.prototype))return!1;let r=!1;try{(e=new RTCPeerConnection).addTransceiver("audio"),r=!0}catch(e){}finally{e&&e.close()}return r}toString(){return`Supports:
21    browser:${this.getBrowser()}
22    version:${this.getVersion()}
23    isIOS:${this.isIOS}
24    isWebRTCSupported:${this.isWebRTCSupported()}
25    isBrowserSupported:${this.isBrowserSupported()}
26    isUnifiedPlanSupported:${this.isUnifiedPlanSupported()}`}constructor(){this.isIOS="undefined"!=typeof navigator&&["iPad","iPhone","iPod"].includes(navigator.platform),this.supportedBrowsers=["firefox","chrome","safari"],this.minFirefoxVersion=59,this.minChromeVersion=72,this.minSafariVersion=605}},eV=e=>!e||/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(e),eW=()=>Math.random().toString(36).slice(2),eK={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:["turn:eu-0.turn.peerjs.com:3478","turn:us-0.turn.peerjs.com:3478"],username:"peerjs",credential:"peerjsp"}],sdpSemantics:"unified-plan"};class eG extends eB{noop(){}blobToArrayBuffer(e,t){let n=new FileReader;return n.onload=function(e){e.target&&t(e.target.result)},n.readAsArrayBuffer(e),n}binaryStringToArrayBuffer(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=255&e.charCodeAt(n);return t.buffer}isSecure(){return"https:"===location.protocol}constructor(...e){super(...e),this.CLOUD_HOST="0.peerjs.com",this.CLOUD_PORT=443,this.chunkedBrowsers={Chrome:1,chrome:1},this.defaultConfig=eK,this.browser=eJ.getBrowser(),this.browserVersion=eJ.getVersion(),this.pack=p,this.unpack=d,this.supports=function(){let e,t={browser:eJ.isBrowserSupported(),webRTC:eJ.isWebRTCSupported(),audioVideo:!1,data:!1,binaryBlob:!1,reliable:!1};if(!t.webRTC)return t;try{let n;e=new RTCPeerConnection(eK),t.audioVideo=!0;try{n=e.createDataChannel("_PEERJSTEST",{ordered:!0}),t.data=!0,t.reliable=!!n.ordered;try{n.binaryType="blob",t.binaryBlob=!eJ.isIOS}catch(e){}}catch(e){}finally{n&&n.close()}}catch(e){}finally{e&&e.close()}return t}(),this.validateId=eV,this.randomToken=eW}}let eH=new eG;class eY{get logLevel(){return this._logLevel}set logLevel(e){this._logLevel=e}log(...e){this._logLevel>=3&&this._print(3,...e)}warn(...e){this._logLevel>=2&&this._print(2,...e)}error(...e){this._logLevel>=1&&this._print(1,...e)}setLogFunction(e){this._print=e}_print(e,...t){let n=["PeerJS: ",...t];for(let e in n)n[e]instanceof Error&&(n[e]="("+n[e].name+") "+n[e].message);e>=3?console.log(...n):e>=2?console.warn("WARNING",...n):e>=1&&console.error("ERROR",...n)}constructor(){this._logLevel=0}}var eX=new eY,eq={},eQ=Object.prototype.hasOwnProperty,e0="~";function e1(){}function e2(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function e6(e,t,n,r,i){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new e2(n,r||e,i),s=e0?e0+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],o]:e._events[s].push(o):(e._events[s]=o,e._eventsCount++),e}function e4(e,t){0==--e._eventsCount?e._events=new e1:delete e._events[t]}function e3(){this._events=new e1,this._eventsCount=0}Object.create&&(e1.prototype=Object.create(null),new e1().__proto__||(e0=!1)),e3.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)eQ.call(e,t)&&n.push(e0?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},e3.prototype.listeners=function(e){var t=e0?e0+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=Array(i);r<i;r++)o[r]=n[r].fn;return o},e3.prototype.listenerCount=function(e){var t=e0?e0+e:e,n=this._events[t];return n?n.fn?1:n.length:0},e3.prototype.emit=function(e,t,n,r,i,o){var s=e0?e0+e:e;if(!this._events[s])return!1;var a,c,u=this._events[s],l=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,i),!0;case 6:return u.fn.call(u.context,t,n,r,i,o),!0}for(c=1,a=Array(l-1);c<l;c++)a[c-1]=arguments[c];u.fn.apply(u.context,a)}else{var d,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),l){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,r);break;default:if(!a)for(d=1,a=Array(l-1);d<l;d++)a[d-1]=arguments[d];u[c].fn.apply(u[c].context,a)}}return!0},e3.prototype.on=function(e,t,n){return e6(this,e,t,n,!1)},e3.prototype.once=function(e,t,n){return e6(this,e,t,n,!0)},e3.prototype.removeListener=function(e,t,n,r){var i=e0?e0+e:e;if(!this._events[i])return this;if(!t)return e4(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||r&&!o.once||n&&o.context!==n||e4(this,i);else{for(var s=0,a=[],c=o.length;s<c;s++)(o[s].fn!==t||r&&!o[s].once||n&&o[s].context!==n)&&a.push(o[s]);a.length?this._events[i]=1===a.length?a[0]:a:e4(this,i)}return this},e3.prototype.removeAllListeners=function(e){var t;return e?(t=e0?e0+e:e,this._events[t]&&e4(this,t)):(this._events=new e1,this._eventsCount=0),this},e3.prototype.off=e3.prototype.removeListener,e3.prototype.addListener=e3.prototype.on,e3.prefixed=e0,e3.EventEmitter=e3,eq=e3;var e8={};eL(e8,"ConnectionType",()=>e5),eL(e8,"PeerErrorType",()=>e9),eL(e8,"BaseConnectionErrorType",()=>e7),eL(e8,"DataConnectionErrorType",()=>te),eL(e8,"SerializationType",()=>tt),eL(e8,"SocketEventType",()=>tn),eL(e8,"ServerMessageType",()=>tr);var e5=function(e){return e.Data="data",e.Media="media",e}({}),e9=function(e){return e.BrowserIncompatible="browser-incompatible",e.Disconnected="disconnected",e.InvalidID="invalid-id",e.InvalidKey="invalid-key",e.Network="network",e.PeerUnavailable="peer-unavailable",e.SslUnavailable="ssl-unavailable",e.ServerError="server-error",e.SocketError="socket-error",e.SocketClosed="socket-closed",e.UnavailableID="unavailable-id",e.WebRTC="webrtc",e}({}),e7=function(e){return e.NegotiationFailed="negotiation-failed",e.ConnectionClosed="connection-closed",e}({}),te=function(e){return e.NotOpenYet="not-open-yet",e.MessageToBig="message-too-big",e}({}),tt=function(e){return e.Binary="binary",e.BinaryUTF8="binary-utf8",e.JSON="json",e.None="raw",e}({}),tn=function(e){return e.Message="message",e.Disconnected="disconnected",e.Error="error",e.Close="close",e}({}),tr=function(e){return e.Heartbeat="HEARTBEAT",e.Candidate="CANDIDATE",e.Offer="OFFER",e.Answer="ANSWER",e.Open="OPEN",e.Error="ERROR",e.IdTaken="ID-TAKEN",e.InvalidKey="INVALID-KEY",e.Leave="LEAVE",e.Expire="EXPIRE",e}({});let ti="1.5.5";class to extends eq.EventEmitter{constructor(e,t,n,r,i,o=5e3){super(),this.pingInterval=o,this._disconnected=!0,this._messagesQueue=[],this._baseUrl=(e?"wss://":"ws://")+t+":"+n+r+"peerjs?key="+i}start(e,t){this._id=e;let n=`${this._baseUrl}&id=${e}&token=${t}`;!this._socket&&this._disconnected&&(this._socket=new WebSocket(n+"&version="+ti),this._disconnected=!1,this._socket.onmessage=e=>{let t;try{t=JSON.parse(e.data),eX.log("Server message received:",t)}catch(t){eX.log("Invalid server message",e.data);return}this.emit(tn.Message,t)},this._socket.onclose=e=>{this._disconnected||(eX.log("Socket closed.",e),this._cleanup(),this._disconnected=!0,this.emit(tn.Disconnected))},this._socket.onopen=()=>{this._disconnected||(this._sendQueuedMessages(),eX.log("Socket open"),this._scheduleHeartbeat())})}_scheduleHeartbeat(){this._wsPingTimer=setTimeout(()=>{this._sendHeartbeat()},this.pingInterval)}_sendHeartbeat(){if(!this._wsOpen())return void eX.log("Cannot send heartbeat, because socket closed");let e=JSON.stringify({type:tr.Heartbeat});this._socket.send(e),this._scheduleHeartbeat()}_wsOpen(){return!!this._socket&&1===this._socket.readyState}_sendQueuedMessages(){let e=[...this._messagesQueue];for(let t of(this._messagesQueue=[],e))this.send(t)}send(e){if(this._disconnected)return;if(!this._id)return void this._messagesQueue.push(e);if(!e.type)return void this.emit(tn.Error,"Invalid message");if(!this._wsOpen())return;let t=JSON.stringify(e);this._socket.send(t)}close(){this._disconnected||(this._cleanup(),this._disconnected=!0)}_cleanup(){this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(),this._socket=void 0),clearTimeout(this._wsPingTimer)}}class ts{constructor(e){this.connection=e}startConnection(e){let t=this._startPeerConnection();if(this.connection.peerConnection=t,this.connection.type===e5.Media&&e._stream&&this._addTracksToConnection(e._stream,t),e.originator){let n=this.connection,r={ordered:!!e.reliable},i=t.createDataChannel(n.label,r);n._initializeDataChannel(i),this._makeOffer()}else this.handleSDP("OFFER",e.sdp)}_startPeerConnection(){eX.log("Creating RTCPeerConnection.");let e=new RTCPeerConnection(this.connection.provider.options.config);return this._setupListeners(e),e}_setupListeners(e){let t=this.connection.peer,n=this.connection.connectionId,r=this.connection.type,i=this.connection.provider;eX.log("Listening for ICE candidates."),e.onicecandidate=e=>{e.candidate&&e.candidate.candidate&&(eX.log(`Received ICE candidates for ${t}:`,e.candidate),i.socket.send({type:tr.Candidate,payload:{candidate:e.candidate,type:r,connectionId:n},dst:t}))},e.oniceconnectionstatechange=()=>{switch(e.iceConnectionState){case"failed":eX.log("iceConnectionState is failed, closing connections to "+t),this.connection.emitError(e7.NegotiationFailed,"Negotiation of connection to "+t+" failed."),this.connection.close();break;case"closed":eX.log("iceConnectionState is closed, closing connections to "+t),this.connection.emitError(e7.ConnectionClosed,"Connection to "+t+" closed."),this.connection.close();break;case"disconnected":eX.log("iceConnectionState changed to disconnected on the connection with "+t);break;case"completed":e.onicecandidate=()=>{}}this.connection.emit("iceStateChanged",e.iceConnectionState)},eX.log("Listening for data channel"),e.ondatachannel=e=>{eX.log("Received data channel");let r=e.channel;i.getConnection(t,n)._initializeDataChannel(r)},eX.log("Listening for remote stream"),e.ontrack=e=>{eX.log("Received remote stream");let r=e.streams[0],o=i.getConnection(t,n);o.type===e5.Media&&this._addStreamToMediaConnection(r,o)}}cleanup(){eX.log("Cleaning up PeerConnection to "+this.connection.peer);let e=this.connection.peerConnection;if(!e)return;this.connection.peerConnection=null,e.onicecandidate=e.oniceconnectionstatechange=e.ondatachannel=e.ontrack=()=>{};let t="closed"!==e.signalingState,n=!1,r=this.connection.dataChannel;r&&(n=!!r.readyState&&"closed"!==r.readyState),(t||n)&&e.close()}async _makeOffer(){let e=this.connection.peerConnection,t=this.connection.provider;try{let n=await e.createOffer(this.connection.options.constraints);eX.log("Created offer."),this.connection.options.sdpTransform&&"function"==typeof this.connection.options.sdpTransform&&(n.sdp=this.connection.options.sdpTransform(n.sdp)||n.sdp);try{await e.setLocalDescription(n),eX.log("Set localDescription:",n,`for:${this.connection.peer}`);let r={sdp:n,type:this.connection.type,connectionId:this.connection.connectionId,metadata:this.connection.metadata};if(this.connection.type===e5.Data){let e=this.connection;r={...r,label:e.label,reliable:e.reliable,serialization:e.serialization}}t.socket.send({type:tr.Offer,payload:r,dst:this.connection.peer})}catch(e){"OperationError: Failed to set local offer sdp: Called 
26in wrong state: kHaveRemoteOffer"!=e&&(t.emitError(e9.WebRTC,e),eX.log("Failed to setLocalDescription, ",e))}}catch(e){t.emitError(e9.WebRTC,e),eX.log("Failed to createOffer, ",e)}}async _makeAnswer(){let e=this.connection.peerConnection,t=this.connection.provider;try{let n=await e.createAnswer();eX.log("Created answer."),this.connection.options.sdpTransform&&"function"==typeof this.connection.options.sdpTransform&&(n.sdp=this.connection.options.sdpTransform(n.sdp)||n.sdp);try{await e.setLocalDescription(n),eX.log("Set localDescription:",n,`for:${this.connection.peer}`),t.socket.send({type:tr.Answer,payload:{sdp:n,type:this.connection.type,connectionId:this.connection.connectionId},dst:this.connection.peer})}catch(e){t.emitError(e9.WebRTC,e),eX.log("Failed to setLocalDescription, ",e)}}catch(e){t.emitError(e9.WebRTC,e),eX.log("Failed to create answer, ",e)}}async handleSDP(e,t){t=new RTCSessionDescription(t);let n=this.connection.peerConnection,r=this.connection.provider;eX.log("Setting remote description",t);try{await n.setRemoteDescription(t),eX.log(`Set remoteDescription:${e} for:${this.connection.peer}`),"OFFER"===e&&await this._makeAnswer()}catch(e){r.emitError(e9.WebRTC,e),eX.log("Failed to setRemoteDescription, ",e)}}
vendor: 9,454 bytes, line 26
26async handleCandidate(e){eX.log("handleCandidate:",e);try{await this.connection.peerConnection.addIceCandidate(e),eX.log(`Added ICE candidate for:${this.connection.peer}`)}catch(e){this.connection.provider.emitError(e9.WebRTC,e),eX.log("Failed to handleCandidate, ",e)}}_addTracksToConnection(e,t){if(eX.log(`add tracks from stream ${e.id} to peer connection`),!t.addTrack)return eX.error("Your browser does't support RTCPeerConnection#addTrack. Ignored.");e.getTracks().forEach(n=>{t.addTrack(n,e)})}_addStreamToMediaConnection(e,t){eX.log(`add stream ${e.id} to media connection ${t.connectionId}`),t.addStream(e)}}class ta extends eq.EventEmitter{emitError(e,t){eX.error("Error:",t),this.emit("error",new tc(`${e}`,t))}}class tc extends Error{constructor(e,t){"string"==typeof t?super(t):(super(),Object.assign(this,t)),this.type=e}}class tu extends ta{get open(){return this._open}constructor(e,t,n){super(),this.peer=e,this.provider=t,this.options=n,this._open=!1,this.metadata=n.metadata}}class tl extends tu{static #s=this.ID_PREFIX="mc_";get type(){return e5.Media}get localStream(){return this._localStream}get remoteStream(){return this._remoteStream}constructor(e,t,n){super(e,t,n),this._localStream=this.options._stream,this.connectionId=this.options.connectionId||tl.ID_PREFIX+eH.randomToken(),this._negotiator=new ts(this),this._localStream&&this._negotiator.startConnection({_stream:this._localStream,originator:!0})}_initializeDataChannel(e){this.dataChannel=e,this.dataChannel.onopen=()=>{eX.log(`DC#${this.connectionId} dc connection success`),this.emit("willCloseOnRemote")},this.dataChannel.onclose=()=>{eX.log(`DC#${this.connectionId} dc closed for:`,this.peer),this.close()}}addStream(e){eX.log("Receiving stream",e),this._remoteStream=e,super.emit("stream",e)}handleMessage(e){let t=e.type,n=e.payload;switch(e.type){case tr.Answer:this._negotiator.handleSDP(t,n.sdp),this._open=!0;break;case tr.Candidate:this._negotiator.handleCandidate(n.candidate);break;default:eX.warn(`Unrecognized message type:${t} from peer:${this.peer}`)}}answer(e,t={}){if(this._localStream)return void eX.warn("Local stream already exists on this MediaConnection. Are you answering a call twice?");for(let n of(this._localStream=e,t&&t.sdpTransform&&(this.options.sdpTransform=t.sdpTransform),this._negotiator.startConnection({...this.options._payload,_stream:e}),this.provider._getMessages(this.connectionId)))this.handleMessage(n);this._open=!0}close(){this._negotiator&&(this._negotiator.cleanup(),this._negotiator=null),this._localStream=null,this._remoteStream=null,this.provider&&(this.provider._removeConnection(this),this.provider=null),this.options&&this.options._stream&&(this.options._stream=null),this.open&&(this._open=!1,super.emit("close"))}}class td{constructor(e){this._options=e}_buildRequest(e){let t=this._options.secure?"https":"http",{host:n,port:r,path:i,key:o}=this._options,s=new URL(`${t}://${n}:${r}${i}${o}/${e}`);return s.searchParams.set("ts",`${Date.now()}${Math.random()}`),s.searchParams.set("version",ti),fetch(s.href,{referrerPolicy:this._options.referrerPolicy})}async retrieveId(){try{let e=await this._buildRequest("id");if(200!==e.status)throw Error(`Error. Status:${e.status}`);return e.text()}catch(t){eX.error("Error retrieving ID",t);let e="";throw"/"===this._options.path&&this._options.host!==eH.CLOUD_HOST&&(e=" If you passed in a `path` to your self-hosted PeerServer, you'll also need to pass in that same path when creating a new Peer."),Error("Could not get an ID from the server."+e)}}async listAllPeers(){try{let e=await this._buildRequest("peers");if(200!==e.status){if(401===e.status){let e="";throw e=this._options.host===eH.CLOUD_HOST?"It looks like you're using the cloud server. You can email [email protected] to enable peer listing for your API key.":"You need to enable `allow_discovery` on your self-hosted PeerServer to use this feature.",Error("It doesn't look like you have permission to list peers IDs. "+e)}throw Error(`Error. Status:${e.status}`)}return e.json()}catch(e){throw eX.error("Error retrieving list peers",e),Error("Could not get list peers from the server."+e)}}}class tp extends tu{static #s=this.ID_PREFIX="dc_";static #a=this.MAX_BUFFERED_AMOUNT=8388608;get type(){return e5.Data}constructor(e,t,n){super(e,t,n),this.connectionId=this.options.connectionId||tp.ID_PREFIX+eW(),this.label=this.options.label||this.connectionId,this.reliable=!!this.options.reliable,this._negotiator=new ts(this),this._negotiator.startConnection(this.options._payload||{originator:!0,reliable:this.reliable})}_initializeDataChannel(e){this.dataChannel=e,this.dataChannel.onopen=()=>{eX.log(`DC#${this.connectionId} dc connection success`),this._open=!0,this.emit("open")},this.dataChannel.onmessage=e=>{eX.log(`DC#${this.connectionId} dc onmessage:`,e.data)},this.dataChannel.onclose=()=>{eX.log(`DC#${this.connectionId} dc closed for:`,this.peer),this.close()}}close(e){if(e?.flush)return void this.send({__peerData:{type:"close"}});this._negotiator&&(this._negotiator.cleanup(),this._negotiator=null),this.provider&&(this.provider._removeConnection(this),this.provider=null),this.dataChannel&&(this.dataChannel.onopen=null,this.dataChannel.onmessage=null,this.dataChannel.onclose=null,this.dataChannel=null),this.open&&(this._open=!1,super.emit("close"))}send(e,t=!1){return this.open?this._send(e,t):void this.emitError(te.NotOpenYet,"Connection is not open. You should listen for the `open` event before sending messages.")}async handleMessage(e){let t=e.payload;switch(e.type){case tr.Answer:await this._negotiator.handleSDP(e.type,t.sdp);break;case tr.Candidate:await this._negotiator.handleCandidate(t.candidate);break;default:eX.warn("Unrecognized message type:",e.type,"from peer:",this.peer)}}}class th extends tp{get bufferSize(){return this._bufferSize}_initializeDataChannel(e){super._initializeDataChannel(e),this.dataChannel.binaryType="arraybuffer",this.dataChannel.addEventListener("message",e=>this._handleDataMessage(e))}_bufferedSend(e){(this._buffering||!this._trySend(e))&&(this._buffer.push(e),this._bufferSize=this._buffer.length)}_trySend(e){if(!this.open)return!1;if(this.dataChannel.bufferedAmount>tp.MAX_BUFFERED_AMOUNT)return this._buffering=!0,setTimeout(()=>{this._buffering=!1,this._tryBuffer()},50),!1;try{this.dataChannel.send(e)}catch(e){return eX.error(`DC#:${this.connectionId} Error when sending:`,e),this._buffering=!0,this.close(),!1}return!0}_tryBuffer(){if(!this.open||0===this._buffer.length)return;let e=this._buffer[0];this._trySend(e)&&(this._buffer.shift(),this._bufferSize=this._buffer.length,this._tryBuffer())}close(e){if(e?.flush)return void this.send({__peerData:{type:"close"}});this._buffer=[],this._bufferSize=0,super.close()}constructor(...e){super(...e),this._buffer=[],this._bufferSize=0,this._buffering=!1}}class tf extends th{close(e){super.close(e),this._chunkedData={}}constructor(e,t,n){super(e,t,n),this.chunker=new eB,this.serialization=tt.Binary,this._chunkedData={}}_handleDataMessage({data:e}){let t=d(e),n=t.__peerData;if(n)return"close"===n.type?void this.close():void this._handleChunk(t);this.emit("data",t)}_handleChunk(e){let t=e.__peerData,n=this._chunkedData[t]||{data:[],count:0,total:e.total};if(n.data[e.n]=new Uint8Array(e.data),n.count++,this._chunkedData[t]=n,n.total===n.count){delete this._chunkedData[t];let e=function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(n.data);this._handleDataMessage({data:e})}}_send(e,t){let n=p(e);return n instanceof Promise?this._send_blob(n):!t&&n.byteLength>this.chunker.chunkedMTU?void this._sendChunks(n):void this._bufferedSend(n)}async _send_blob(e){let t=await e;if(t.byteLength>this.chunker.chunkedMTU)return void this._sendChunks(t);this._bufferedSend(t)}_sendChunks(e){let t=this.chunker.chunk(e);for(let e of(eX.log(`DC#${this.connectionId} Try to send ${t.length} chunks...`),t))this.send(e,!0)}}class tm extends th{_handleDataMessage({data:e}){super.emit("data",e)}_send(e,t){this._bufferedSend(e)}constructor(...e){super(...e),this.serialization=tt.None}}class ty extends th{_handleDataMessage({data:e}){let t=this.parse(this.decoder.decode(e)),n=t.__peerData;if(n&&"close"===n.type)return void this.close();this.emit("data",t)}_send(e,t){let n=this.encoder.encode(this.stringify(e));if(n.byteLength>=eH.chunkedMTU)return void this.emitError(te.MessageToBig,"Message too big for JSON channel");this._bufferedSend(n)}constructor(...e){super(...e),this.serialization=tt.JSON,this.encoder=new TextEncoder,this.decoder=new TextDecoder,this.stringify=JSON.stringify,this.parse=JSON.parse}}class tg extends ta{static #s=this.DEFAULT_KEY="peerjs";get id(){return this._id}get options(){return this._options}get open(){return this._open}get socket(){return this._socket}get connections(){let e=Object.create(null);for(let[t,n]of this._connections)e[t]=n;return e}get destroyed(){return this._destroyed}get disconnected(){return this._disconnected}constructor(e,t){let n;if(super(),this._serializers={raw:tm,json:ty,binary:tf,"binary-utf8":tf,default:tf},this._id=null,this._lastServerId=null,this._destroyed=!1,this._disconnected=!1,this._open=!1,this._connections=new Map,this._lostMessages=new Map,e&&e.constructor==Object?t=e:e&&(n=e.toString()),t={debug:0,host:eH.CLOUD_HOST,port:eH.CLOUD_PORT,path:"/",key:tg.DEFAULT_KEY,token:eH.randomToken(),config:eH.defaultConfig,referrerPolicy:"str
26ict-origin-when-cross-origin",serializers:{},...t},this._options=t,this._serializers={...this._serializers,...this.options.serializers},"/"===this._options.host&&(this._options.host=window.location.hostname),this._options.path&&("/"!==this._options.path[0]&&(this._options.path="/"+this._options.path),"/"!==this._options.path[this._options.path.length-1]&&(this._options.path+="/")),void 0===this._options.secure&&this._options.host!==eH.CLOUD_HOST?this._options.secure=eH.isSecure():this._options.host==eH.CLOUD_HOST&&(this._options.secure=!0),this._options.logFunction&&eX.setLogFunction(this._options.logFunction),eX.logLevel=this._options.debug||0,this._api=new td(t),this._socket=this._createServerConnection(),!eH.supports.audioVideo&&!eH.supports.data)return void this._delayedAbort(e9.BrowserIncompatible,"The current browser does not support WebRTC");if(n&&!eH.validateId(n))return void this._delayedAbort(e9.InvalidID,`ID "${n}" is invalid`);n?this._initialize(n):this._api.retrieveId().then(e=>this._initialize(e)).catch(e=>this._abort(e9.ServerError,e))}_createServerConnection(){let e=new to(this._options.secure,this._options.host,this._options.port,this._options.path,this._options.key,this._options.pingInterval);return e.on(tn.Message,e=>{this._handleMessage(e)}),e.on(tn.Error,e=>{this._abort(e9.SocketError,e)}),e.on(tn.Disconnected,()=>{this.disconnected||(this.emitError(e9.Network,"Lost connection to server."),this.disconnect())}),e.on(tn.Close,()=>{this.disconnected||this._abort(e9.SocketClosed,"Underlying socket is already closed.")}),e}_initialize(e){this._id=e,this.socket.start(e,this._options.token)}_handleMessage(e){let t=e.type,n=e.payload,r=e.src;switch(t){case tr.Open:this._lastServerId=this.id,this._open=!0,this.emit("open",this.id);break;case tr.Error:this._abort(e9.ServerError,n.msg);break;case tr.IdTaken:this._abort(e9.UnavailableID,`ID "${this.id}" is taken`);break;case tr.InvalidKey:this._abort(e9.InvalidKey,`API KEY "${this._options.key}" is invalid`);break;case tr.Leave:eX.log(`Received leave message from ${r}`),this._cleanupPeer(r),this._connections.delete(r);break;case tr.Expire:this.emitError(e9.PeerUnavailable,`Could not connect to peer ${r}`);break;case tr.Offer:{let e=n.connectionId,t=this.getConnection(r,e);if(t&&(t.close(),eX.warn(`Offer received for existing Connection ID:${e}`)),n.type===e5.Media){let i=new tl(r,this,{connectionId:e,_payload:n,metadata:n.metadata});t=i,this._addConnection(r,t),this.emit("call",i)}else{if(n.type!==e5.Data)return void eX.warn(`Received malformed connection type:${n.type}`);let i=new this._serializers[n.serialization](r,this,{connectionId:e,_payload:n,metadata:n.metadata,label:n.label,serialization:n.serialization,reliable:n.reliable});t=i,this._addConnection(r,t),this.emit("connection",i)}for(let n of this._getMessages(e))t.handleMessage(n);break}default:{if(!n)return void eX.warn(`You received a malformed message from ${r} of type ${t}`);let i=n.connectionId,o=this.getConnection(r,i);o&&o.peerConnection?o.handleMessage(e):i?this._storeMessage(i,e):eX.warn("You received an unrecognized message:",e)}}}_storeMessage(e,t){this._lostMessages.has(e)||this._lostMessages.set(e,[]),this._lostMessages.get(e).push(t)}_getMessages(e){let t=this._lostMessages.get(e);return t?(this._lostMessages.delete(e),t):[]}
vendor: 2,796 bytes, line 26
26connect(e,t={}){if(t={serialization:"default",...t},this.disconnected){eX.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect, or call reconnect on this peer if you believe its ID to still be available."),this.emitError(e9.Disconnected,"Cannot connect to new Peer after disconnecting from server.");return}let n=new this._serializers[t.serialization](e,this,t);return this._addConnection(e,n),n}call(e,t,n={}){if(this.disconnected){eX.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect."),this.emitError(e9.Disconnected,"Cannot connect to new Peer after disconnecting from server.");return}if(!t)return void eX.error("To call a peer, you must provide a stream from your browser's `getUserMedia`.");let r=new tl(e,this,{...n,_stream:t});return this._addConnection(e,r),r}_addConnection(e,t){eX.log(`add connection ${t.type}:${t.connectionId} to peerId:${e}`),this._connections.has(e)||this._connections.set(e,[]),this._connections.get(e).push(t)}_removeConnection(e){let t=this._connections.get(e.peer);if(t){let n=t.indexOf(e);-1!==n&&t.splice(n,1)}this._lostMessages.delete(e.connectionId)}getConnection(e,t){let n=this._connections.get(e);if(!n)return null;for(let e of n)if(e.connectionId===t)return e;return null}_delayedAbort(e,t){setTimeout(()=>{this._abort(e,t)},0)}_abort(e,t){eX.error("Aborting!"),this.emitError(e,t),this._lastServerId?this.disconnect():this.destroy()}destroy(){this.destroyed||(eX.log(`Destroy peer with ID:${this.id}`),this.disconnect(),this._cleanup(),this._destroyed=!0,this.emit("close"))}_cleanup(){for(let e of this._connections.keys())this._cleanupPeer(e),this._connections.delete(e);this.socket.removeAllListeners()}_cleanupPeer(e){let t=this._connections.get(e);if(t)for(let e of t)e.close()}disconnect(){if(this.disconnected)return;let e=this.id;eX.log(`Disconnect peer with ID:${e}`),this._disconnected=!0,this._open=!1,this.socket.close(),this._lastServerId=e,this._id=null,this.emit("disconnected",e)}reconnect(){if(this.disconnected&&!this.destroyed)eX.log(`Attempting reconnection to server with ID ${this._lastServerId}`),this._disconnected=!1,this._initialize(this._lastServerId);else if(this.destroyed)throw Error("This peer cannot reconnect to the server. It has already been destroyed.");else if(this.disconnected||this.open)throw Error(`Peer ${this.id} cannot reconnect because it is not disconnected from the server!`);else eX.error("In a hurry? We're still trying to make the initial connection!")}listAllPeers(e=e=>{}){this._api.listAllPeers().then(t=>e(t)).catch(e=>this._abort(e9.ServerError,e))}}var tv=tg}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.