fern-api 0.51.19 → 0.51.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.cjs +3 -3
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1684,7 +1684,7 @@ ${c.indent}`:""}${Xmf(o)}:${l.indent?" ":""}`;return u=!1,s=!0,l.objectItem=void
1684
1684
  `}),r.replaceAll(/\n$/g,"")}function t31(e){return e?Mu.green(r3.radioOn):r3.radioOff}var Uio=Ei(dwe(),1);function Nxd(e,t){return e=String(e),t=typeof t=="string"?t:"*",e.length===0?"":Array.from({length:e.length+1}).join(t)}var gGn=class extends r2{_run(t){this.done=t;let r=TL(this.rl),i=r.line.pipe((0,Uio.map)(this.filterInput.bind(this))),n=this.handleSubmitEvents(i);return n.success.forEach(this.onEnd.bind(this)),n.error.forEach(this.onError.bind(this)),r.keypress.pipe((0,Uio.takeUntil)(n.success)).forEach(this.onKeypress.bind(this)),this.render(),this}render(t){let r=this.getQuestion(),i="";r+=this.status==="answered"?this.getMaskedValue(this.answer):this.getMaskedValue(this.rl.line||""),t&&(i=`
1685
1685
  `+Mu.red(">> ")+t),this.screen.render(r,i)}getMaskedValue(t){return this.status==="answered"?this.opt.mask?Mu.cyan(Nxd(t,this.opt.mask)):Mu.italic.dim("[hidden]"):this.opt.mask?Nxd(t,this.opt.mask):Mu.italic.dim("[input is hidden] ")}getSpinningValue(t){return this.getMaskedValue(t)}filterInput(t){return t||(this.opt.default==null?"":this.opt.default)}onEnd(t){this.status="answered",this.answer=t.value,this.render(),this.screen.done(),this.done(t.value)}onError(t){this.render(t.isValid)}onKeypress(){this.opt.default&&=void 0,this.render()}};var lzd=Ei(xds(),1),fzd=Ei(dwe(),1);var MGn=class extends r2{_run(t){this.done=t,this.editorResult=new fzd.Subject;let r=TL(this.rl);this.lineSubscription=r.line.subscribe(this.startExternalEditor.bind(this));let i=this.opt.waitUserInput===void 0?!0:this.opt.waitUserInput,n=this.handleSubmitEvents(this.editorResult);return n.success.forEach(this.onEnd.bind(this)),n.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,i?this.render():this.startExternalEditor(),this}render(t){let r="",i=this.getQuestion();i+=this.status==="answered"?Mu.dim("Received"):Mu.dim("Press <enter> to launch your preferred editor."),t&&(r=Mu.red(">> ")+t),this.screen.render(i,r)}startExternalEditor(){this.rl.pause(),(0,lzd.editAsync)(this.currentText,this.endExternalEditor.bind(this),{postfix:this.opt.postfix??".txt"})}endExternalEditor(t,r){this.rl.resume(),t?this.editorResult.error(t):this.editorResult.next(r)}onEnd(t){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=t.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(t){this.render(t.isValid)}};var gzd=Ei(_zd(),1);var vzd=Ei(require("readline"),1),bzd=Ei(yzd(),1),Uji=class{constructor(t){this.rl||=vzd.default.createInterface($31(t)),this.rl.resume(),this.onForceClose=this.onForceClose.bind(this),process.on("exit",this.onForceClose),this.rl.on("SIGINT",this.onForceClose)}onForceClose(){this.close(),process.kill(process.pid,"SIGINT"),console.log("")}close(){this.rl.removeListener("SIGINT",this.onForceClose),process.removeListener("exit",this.onForceClose),this.rl.output.unmute(),this.activePrompt&&typeof this.activePrompt.close=="function"&&this.activePrompt.close(),this.rl.output.end(),this.rl.pause(),this.rl.close()}};function $31(e={}){e.skipTTYChecks=e.skipTTYChecks===void 0?!0:e.skipTTYChecks;let t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY){let n=new Error("Prompts can not be meaningfully rendered in non-TTY environments");throw n.isTtyError=!0,n}let r=new bzd.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}var qGn=class extends Uji{constructor(t={}){super(t),this.log=(0,gzd.default)(this.writeLog.bind(this)),this.bottomBar=t.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return fGn(this.rl,this.bottomBar.split(`
1686
1686
  `).length),this}updateBottomBar(t){return fGn(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=t,this.render(),this.rl.output.mute(),this}writeLog(t){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(t.toString())),this.render(),this.rl.output.mute(),this}enforceLF(t){return/[\n\r]$/.test(t)?t:t+`
1687
- `}write(t){let r=t.split(/\n/);this.height=r.length,this.rl.setPrompt(r.at(-1)),this.rl.output.rows===0&&this.rl.output.columns===0&&Rio(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var Mzd=Ei(Pzd(),1),qzd=Ei(Vls(),1),Tzd=Ei(Ezd(),1),rM=Ei(dwe(),1),Czd=Ei(O$n(),1);var uno=Ei(dwe(),1),Azd=Ei(O$n(),1),sno=function(e,t,r){return typeof e[t]!="function"?(0,uno.of)(e):(0,uno.from)((0,Azd.default)(e[t])(r).then(i=>(e[t]=i,e)))};var TGn={isPlainObject:Mzd.default,set:Tzd.default,get:qzd.default},jun=class extends Uji{constructor(t,r){super(r),this.prompts=t}run(t,r){this.answers=TGn.isPlainObject(r)?{...r}:{},TGn.isPlainObject(t)&&(t=Object.values(t).every(n=>TGn.isPlainObject(n)&&n.name===void 0)?Object.entries(t).map(([n,a])=>({name:n,...a})):[t]);let i=Array.isArray(t)?(0,rM.from)(t):t;return this.process=i.pipe((0,rM.concatMap)(this.processQuestion.bind(this)),(0,rM.publish)()),this.process.connect(),this.process.pipe((0,rM.reduce)((n,a)=>(TGn.set(n,a.name,a.answer),n),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(t){return this.close(),Promise.reject(t)}processQuestion(t){return t={...t},(0,rM.defer)(()=>(0,rM.of)(t).pipe((0,rM.concatMap)(this.setDefaultType.bind(this)),(0,rM.concatMap)(this.filterIfRunnable.bind(this)),(0,rM.concatMap)(()=>sno(t,"message",this.answers)),(0,rM.concatMap)(()=>sno(t,"default",this.answers)),(0,rM.concatMap)(()=>sno(t,"choices",this.answers)),(0,rM.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,rM.defer)(()=>(0,rM.from)(this.activePrompt.run().then(i=>({name:t.name,answer:i}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,rM.defer)(()=>(0,rM.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&TGn.get(this.answers,t.name)!==void 0)return(0,rM.empty)();if(t.when===!1)return(0,rM.empty)();if(typeof t.when!="function")return(0,rM.of)(t);let{answers:r}=this;return(0,rM.defer)(()=>(0,rM.from)((0,Czd.default)(t.when)(r).then(i=>{if(i)return t})).pipe((0,rM.filter)(i=>i!=null)))}};function Bzd(e){let t=function(r,i){let n;try{n=new jun(t.prompts,e)}catch(u){return Promise.reject(u)}let a=n.run(r,i);return a.ui=n,a};return t.prompts={},t.registerPrompt=function(r,i){return t.prompts[r]=i,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",pGn),this.registerPrompt("input",Bji),this.registerPrompt("number",_Gn),this.registerPrompt("confirm",hGn),this.registerPrompt("rawlist",yGn),this.registerPrompt("expand",vGn),this.registerPrompt("checkbox",bGn),this.registerPrompt("password",gGn),this.registerPrompt("editor",MGn)},t.restoreDefaultPrompts(),t}var Rds=Bzd();function c71(e,t){Rds.registerPrompt(e,t)}function l71(){Rds.restoreDefaultPrompts()}var f71={prompt:Rds,ui:{BottomBar:qGn,Prompt:jun},createPromptModule:Bzd,registerPrompt:c71,restoreDefaultPrompts:l71,Separator:yte},cno=f71;var WRd=Ei(xzd()),I61="4.2.1",n2t;(function(e){e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay"})(n2t||(n2t={}));function z61(e,t){if(!e)throw new Error(t)}function R61(e){return e?.replace(/\/+$/,"")}async function F61(e,t){let r=null;for(let i=0;i<t.retryCount+1;i++){i>0&&await new Promise(n=>setTimeout(n,t.retryDelay));try{return await e()}catch(n){if(r=n,!t.retryCheck(n))throw n}}throw r}function N61(){return new Date().getTime()}function IRd(){return new Date().toISOString()}function HRd(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}var WGn=String.fromCharCode,zRd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Pno={};function L61(e,t){if(!Pno[e]){Pno[e]={};for(let r=0;r<e.length;r++)Pno[e][e.charAt(r)]=r}return Pno[e][t]}var HGn={compressToBase64:function(e){if(e==null)return"";let t=HGn._compress(e,6,function(r){return zRd.charAt(r)});switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return e==null?"":e==""?null:HGn._decompress(e.length,32,function(t){return L61(zRd,e.charAt(t))})},compress:function(e){return HGn._compress(e,16,function(t){return WGn(t)})},_compress:function(e,t,r){if(e==null)return"";let i={},n={},a=[],u,l,f="",s="",o="",c=2,b=3,g=2,O=0,m=0,w;for(w=0;w<e.length;w+=1)if(f=e.charAt(w),Object.prototype.hasOwnProperty.call(i,f)||(i[f]=b++,n[f]=!0),s=o+f,Object.prototype.hasOwnProperty.call(i,s))o=s;else{if(Object.prototype.hasOwnProperty.call(n,o)){if(o.charCodeAt(0)<256){for(u=0;u<g;u++)O=O<<1,m==t-1?(m=0,a.push(r(O)),O=0):m++;for(l=o.charCodeAt(0),u=0;u<8;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}else{for(l=1,u=0;u<g;u++)O=O<<1|l,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=0;for(l=o.charCodeAt(0),u=0;u<16;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}c--,c==0&&(c=Math.pow(2,g),g++),delete n[o]}else for(l=i[o],u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;c--,c==0&&(c=Math.pow(2,g),g++),i[s]=b++,o=String(f)}if(o!==""){if(Object.prototype.hasOwnProperty.call(n,o)){if(o.charCodeAt(0)<256){for(u=0;u<g;u++)O=O<<1,m==t-1?(m=0,a.push(r(O)),O=0):m++;for(l=o.charCodeAt(0),u=0;u<8;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}else{for(l=1,u=0;u<g;u++)O=O<<1|l,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=0;for(l=o.charCodeAt(0),u=0;u<16;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}c--,c==0&&(c=Math.pow(2,g),g++),delete n[o]}else for(l=i[o],u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;c--,c==0&&(c=Math.pow(2,g),g++)}for(l=2,u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;for(;;)if(O=O<<1,m==t-1){a.push(r(O));break}else m++;return a.join("")},decompress:function(e){return e==null?"":e==""?null:HGn._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(e,t,r){let i=[],n=[],a={val:r(0),position:t,index:1},u=4,l=4,f=3,s="",o,c,b,g,O,m,w;for(o=0;o<3;o+=1)i[o]=o;for(b=0,O=Math.pow(2,2),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;switch(b){case 0:for(b=0,O=Math.pow(2,8),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;w=WGn(b);break;case 1:for(b=0,O=Math.pow(2,16),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;w=WGn(b);break;case 2:return""}for(i[3]=w,c=w,n.push(w);;){if(a.index>e)return"";for(b=0,O=Math.pow(2,f),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;switch(w=b){case 0:for(b=0,O=Math.pow(2,8),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;i[l++]=WGn(b),w=l-1,u--;break;case 1:for(b=0,O=Math.pow(2,16),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;i[l++]=WGn(b),w=l-1,u--;break;case 2:return n.join("")}if(u==0&&(u=Math.pow(2,f),f++),i[w])s=i[w];else if(w===l)s=c+c.charAt(0);else return null;n.push(s),i[l++]=c+s.charAt(0),u--,c=s,u==0&&(u=Math.pow(2,f),f++)}}},jps=class{constructor(){this.events={},this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(i=>i!==r)}}emit(t,r){for(let i of this.events[t]||[])i(r);for(let i of this.events["*"]||[])i(t,r)}};var jno="0123456789abcdef",wno=class e{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new e(t)}static fromFieldsV7(t,r,i,n){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||t<0||r<0||i<0||n<0||t>0xffffffffffff||r>4095||i>1073741823||n>4294967295)throw new RangeError("invalid field value");let a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/2**8,a[5]=t,a[6]=112|r>>>8,a[7]=r,a[8]=128|i>>>24,a[9]=i>>>16,a[10]=i>>>8,a[11]=i,a[12]=n>>>24,a[13]=n>>>16,a[14]=n>>>8,a[15]=n,new e(a)}static parse(t){let r;switch(t.length){case 32:r=/^[0-9a-f]{32}$/i.exec(t)?.[0];break;case 36:r=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break;case 38:r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t)?.slice(1,6).join("");break;case 45:r=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break}if(r){let i=new Uint8Array(16);for(let n=0;n<16;n+=4){let a=parseInt(r.substring(2*n,2*n+8),16);i[n+0]=a>>>24,i[n+1]=a>>>16,i[n+2]=a>>>8,i[n+3]=a}return new e(i)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let r=0;r<this.bytes.length;r++)t+=jno.charAt(this.bytes[r]>>>4),t+=jno.charAt(this.bytes[r]&15),(r===3||r===5||r===7||r===9)&&(t+="-");return t}toHex(){let t="";for(let r=0;r<this.bytes.length;r++)t+=jno.charAt(this.bytes[r]>>>4),t+=jno.charAt(this.bytes[r]&15);return t}toJSON(){return this.toString()}getVariant(){let t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(r=>r===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(r=>r===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new e(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let r=0;r<16;r++){let i=this.bytes[r]-t.bytes[r];if(i!==0)return Math.sign(i)}return 0}},wps=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??U61()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,r){let i=this.generateOrAbortCore(t,r);return i===void 0&&(this.timestamp=0,i=this.generateOrAbortCore(t,r)),i}generateOrAbortCore(t,r){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(r<0||r>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else if(t+r>=this.timestamp)this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter());else return;return wno.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){let t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,wno.ofInner(t)}},U61=()=>({nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}),RRd,FRd=()=>V61().toString(),V61=()=>(RRd||(RRd=new wps)).generate(),Sno=class extends Error{constructor(t){super("HTTP error while fetching PostHog: "+t.status),this.response=t,this.name="PostHogFetchHttpError"}},$Gn=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};function NRd(e){return typeof e=="object"&&(e instanceof Sno||e instanceof $Gn)}var Sps=class{constructor(t,r){this.flushPromise=null,this.disableGeoip=!0,this.historicalMigration=!1,this.disabled=!1,this.defaultOptIn=!0,this.pendingPromises={},this._events=new jps,this._isInitialized=!1,z61(t,"You must pass your PostHog project's api key."),this.apiKey=t,this.host=R61(r?.host||"https://us.i.posthog.com"),this.flushAt=r?.flushAt?Math.max(r?.flushAt,1):20,this.maxBatchSize=Math.max(this.flushAt,r?.maxBatchSize??100),this.maxQueueSize=Math.max(this.flushAt,r?.maxQueueSize??1e3),this.flushInterval=r?.flushInterval??1e4,this.captureMode=r?.captureMode||"json",this.defaultOptIn=r?.defaultOptIn??!0,this._retryOptions={retryCount:r?.fetchRetryCount??3,retryDelay:r?.fetchRetryDelay??3e3,retryCheck:NRd},this.requestTimeout=r?.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r?.featureFlagsRequestTimeoutMs??3e3,this.disableGeoip=r?.disableGeoip??!0,this.disabled=r?.disabled??!1,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled){this.logMsgIfDebug(()=>console.warn("[PostHog] The client is disabled"));return}if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(n2t.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(n2t.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(n2t.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(i,n)=>console.log("PostHog Debug",i,n));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}buildPayload(t){return{distinct_id:t.distinct_id,event:t.event,properties:{...t.properties||{},...this.getCommonEventProperties()}}}addPendingPromise(t){let r=FRd();return this.pendingPromises[r]=t,t.catch(()=>{}).finally(()=>{delete this.pendingPromises[r]}),t}identifyStateless(t,r,i){this.wrap(()=>{let n={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",n,i)})}captureStateless(t,r,i,n){this.wrap(()=>{let a=this.buildPayload({distinct_id:t,event:r,properties:i});this.enqueue("capture",a,n)})}aliasStateless(t,r,i,n){this.wrap(()=>{let a=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...i||{},distinct_id:r,alias:t}});this.enqueue("alias",a,n)})}groupIdentifyStateless(t,r,i,n,a,u){this.wrap(()=>{let l=this.buildPayload({distinct_id:a||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:i||{},...u||{}}});this.enqueue("capture",l,n)})}async getDecide(t,r={},i={},n={},a={}){await this._initPromise;let u=`${this.host}/decide/?v=3`,l={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify({token:this.apiKey,distinct_id:t,groups:r,person_properties:i,group_properties:n,...a})};return this.fetchWithRetry(u,l,{retryCount:0},this.featureFlagsRequestTimeoutMs).then(f=>f.json()).catch(f=>{this._events.emit("error",f)})}async getFeatureFlagStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagsStateless(r,i,n,a,u);if(!l)return;let f=l[t];return f===void 0&&(f=!1),f}async getFeatureFlagPayloadStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagPayloadsStateless(r,i,n,a,u);if(!l)return;let f=l[t];return f===void 0?null:f}async getFeatureFlagPayloadsStateless(t,r={},i={},n={},a){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,i,n,a)).payloads}_parsePayload(t){try{return JSON.parse(t)}catch{return t}}async getFeatureFlagsStateless(t,r={},i={},n={},a){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,i,n,a)).flags}async getFeatureFlagsAndPayloadsStateless(t,r={},i={},n={},a){await this._initPromise;let u={};(a??this.disableGeoip)&&(u.geoip_disable=!0);let l=await this.getDecide(t,r,i,n,u),f=l?.featureFlags,s=l?.featureFlagPayloads,o=s;return s&&(o=Object.fromEntries(Object.entries(s).map(([c,b])=>[c,this._parsePayload(b)]))),{flags:f,payloads:o}}enqueue(t,r,i){this.wrap(()=>{if(this.optedOut){this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");return}let n={...r,type:t,library:this.getLibraryId(),library_version:this.getLibraryVersion(),timestamp:i?.timestamp?i?.timestamp:IRd(),uuid:i?.uuid?i.uuid:FRd()};(i?.disableGeoip??this.disableGeoip)&&(n.properties||(n.properties={}),n.properties.$geoip_disable=!0),n.distinctId&&(n.distinct_id=n.distinctId,delete n.distinctId);let u=this.getPersistedProperty(n2t.Queue)||[];u.length>=this.maxQueueSize&&(u.shift(),this.logMsgIfDebug(()=>console.info("Queue is full, the oldest event is dropped."))),u.push({message:n}),this.setPersistedProperty(n2t.Queue,u),this._events.emit(t,n),u.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=HRd(()=>this.flushBackground(),this.flushInterval))})}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.flush().catch(()=>{})}async flush(){return this.flushPromise||(this.flushPromise=this._flush().finally(()=>{this.flushPromise=null}),this.addPendingPromise(this.flushPromise)),this.flushPromise}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getPersistedProperty(n2t.Queue)||[];if(!t.length)return[];let r=t.slice(0,this.maxBatchSize),i=r.map(s=>s.message),n=()=>{let s=this.getPersistedProperty(n2t.Queue)||[];this.setPersistedProperty(n2t.Queue,s.slice(r.length))},a={api_key:this.apiKey,batch:i,sent_at:IRd()};this.historicalMigration&&(a.historical_migration=!0);let u=JSON.stringify(a),l=this.captureMode==="form"?`${this.host}/e/?ip=1&_=${N61()}&v=${this.getLibraryVersion()}`:`${this.host}/batch/`,f=this.captureMode==="form"?{method:"POST",mode:"no-cors",credentials:"omit",headers:{...this.getCustomHeaders(),"Content-Type":"application/x-www-form-urlencoded"},body:`data=${encodeURIComponent(HGn.compressToBase64(u))}&compression=lz64`}:{method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:u};try{await this.fetchWithRetry(l,f)}catch(s){throw s instanceof $Gn||n(),this._events.emit("error",s),s}return n(),this._events.emit("flush",i),i}async fetchWithRetry(t,r,i,n){var a;return(a=AbortSignal).timeout??(a.timeout=function(l){let f=new AbortController;return setTimeout(()=>f.abort(),l),f.signal}),await F61(async()=>{let u=null;try{u=await this.fetch(t,{signal:AbortSignal.timeout(n??this.requestTimeout),...r})}catch(f){throw new $Gn(f)}if(!(r.mode==="no-cors")&&(u.status<200||u.status>=400))throw new Sno(u);return u},{...this._retryOptions,...i})}async shutdown(t=3e4){await this._initPromise,this.clearFlushTimer();try{await Promise.all(Object.values(this.pendingPromises));let r=Date.now()+t;for(;(this.getPersistedProperty(n2t.Queue)||[]).length!==0;){await this.flush();let n=Date.now();if(r<n)break}}catch(r){if(!NRd(r))throw r;this.logMsgIfDebug(()=>console.error("Error while shutting down PostHog",r))}}},Dps=class{constructor(){this._memoryStorage={}}getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}},Eps=typeof fetch<"u"?fetch:typeof global.fetch<"u"?global.fetch:void 0;if(!Eps){let e=xRd();Eps=async(t,r)=>{let i=await e.request({url:t,headers:r.headers,method:r.method.toLowerCase(),data:r.body,signal:r.signal,validateStatus:()=>!0});return{status:i.status,text:async()=>i.data,json:async()=>i.data}}}var $Rd=Eps,W61=1152921504606847e3,H61=["is_not"],Dno=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},i2=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},Aps=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:i,timeout:n,host:a,customHeaders:u,...l}){this.debugMode=!1,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=n,this.projectApiKey=i,this.host=a,this.poller=void 0,this.fetch=l.fetch||$Rd,this.onError=l.onError,this.customHeaders=u,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}async getFeatureFlag(t,r,i={},n={},a={}){await this.loadFeatureFlags();let u,l;if(!this.loadedSuccessfullyOnce)return u;for(let f of this.featureFlags)if(t===f.key){l=f;break}if(l!==void 0)try{u=this.computeFlagLocally(l,r,i,n,a),this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${u}`))}catch(f){f instanceof i2?this.logMsgIfDebug(()=>console.debug(`InconclusiveMatchError when computing flag locally: ${t}: ${f}`)):f instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${f}`))}return u}async computeFeatureFlagPayloadLocally(t,r){await this.loadFeatureFlags();let i;if(this.loadedSuccessfullyOnce){if(typeof r=="boolean"?i=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]:typeof r=="string"&&(i=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]),i==null)return null;try{return JSON.parse(i)}catch{return i}}}async getAllFlagsAndPayloads(t,r={},i={},n={}){await this.loadFeatureFlags();let a={},u={},l=this.featureFlags.length==0;return this.featureFlags.map(async f=>{try{let s=this.computeFlagLocally(f,t,r,i,n);a[f.key]=s;let o=await this.computeFeatureFlagPayloadLocally(f.key,s);o&&(u[f.key]=o)}catch(s){s instanceof i2||s instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${f.key}: ${s}`)),l=!0}}),{response:a,payloads:u,fallbackToDecide:l}}computeFlagLocally(t,r,i={},n={},a={}){if(t.ensure_experience_continuity)throw new i2("Flag has experience continuity enabled");if(!t.active)return!1;let l=(t.filters||{}).aggregation_group_type_index;if(l!=null){let f=this.groupTypeMapping[String(l)];if(!f)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${l} for feature flag ${t.key}`)),new i2("Flag has unknown group type index");if(!(f in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;let s=a[f];return this.matchFeatureFlagProperties(t,i[f],s)}else return this.matchFeatureFlagProperties(t,r,n)}matchFeatureFlagProperties(t,r,i){let n=t.filters||{},a=n.groups||[],u=!1,l,f=[...a].sort((s,o)=>{let c=!!s.variant,b=!!o.variant;return c&&b?0:c?-1:b?1:0});for(let s of f)try{if(this.isConditionMatch(t,r,s,i)){let o=s.variant,c=n.multivariate?.variants||[];o&&c.some(b=>b.key===o)?l=o:l=this.getMatchingVariant(t,r)||!0;break}}catch(o){if(o instanceof i2)u=!0;else throw o}if(l!==void 0)return l;if(u)throw new i2("Can't determine if feature flag is enabled or not with given properties");return!1}isConditionMatch(t,r,i,n){let a=i.rollout_percentage,u=l=>{this.logMsgIfDebug(()=>console.warn(l))};if((i.properties||[]).length>0){for(let l of i.properties){let f=l.type,s=!1;if(f==="cohort"?s=QRd(l,n,this.cohorts,this.debugMode):s=GRd(l,n,u),!s)return!1}if(a==null)return!0}return!(a!=null&&LRd(t.key,r)>a/100)}getMatchingVariant(t,r){let i=LRd(t.key,r,"variant"),n=this.variantLookupTable(t).find(a=>i>=a.valueMin&&i<a.valueMax);if(n)return n.key}variantLookupTable(t){let r=[],i=0,n=0;return((t.filters||{}).multivariate?.variants||[]).forEach(l=>{n=i+l.rollout_percentage/100,r.push({valueMin:i,valueMax:n,key:l.key}),i=n}),r}async loadFeatureFlags(t=!1){(!this.loadedSuccessfullyOnce||t)&&await this._loadFeatureFlags()}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0),this.poller=setTimeout(()=>this._loadFeatureFlags(),this.pollingInterval);try{let t=await this._requestFeatureFlagDefinitions();if(t&&t.status===401)throw new Dno("Your personalApiKey is invalid. Are you sure you're not using your Project API key? More information: https://posthog.com/docs/api/overview");if(t&&t.status!==200)return;let r=await t.json();"flags"in r||this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(r)}`)),this.featureFlags=r.flags||[],this.featureFlagsByKey=this.featureFlags.reduce((i,n)=>(i[n.key]=n,i),{}),this.groupTypeMapping=r.group_type_mapping||{},this.cohorts=r.cohorts||[],this.loadedSuccessfullyOnce=!0}catch(t){t instanceof Dno&&this.onError?.(t)}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/api/feature_flag/local_evaluation?token=${this.projectApiKey}&send_cohorts`,r={method:"GET",headers:{...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`}},i=null;if(this.timeout&&typeof this.timeout=="number"){let n=new AbortController;i=HRd(()=>{n.abort()},this.timeout),r.signal=n.signal}try{return await this.fetch(t,r)}finally{clearTimeout(i)}}stopPoller(){clearTimeout(this.poller)}};function LRd(e,t,r=""){let i=(0,WRd.createHash)();return i.update(`${e}.${t}${r}`),parseInt(i.digest("hex").slice(0,15),16)/W61}function GRd(e,t,r){let i=e.key,n=e.value,a=e.operator||"exact";if(i in t){if(a==="is_not_set")throw new i2("Operator is_not_set is not supported")}else throw new i2(`Property ${i} not found in propertyValues`);let u=t[i];if(u==null&&!H61.includes(a))return r&&r(`Property ${i} cannot have a value of null/undefined with the ${a} operator`),!1;function l(s,o){return Array.isArray(s)?s.map(c=>String(c).toLowerCase()).includes(String(o).toLowerCase()):String(s).toLowerCase()===String(o).toLowerCase()}function f(s,o,c){if(c==="gt")return s>o;if(c==="gte")return s>=o;if(c==="lt")return s<o;if(c==="lte")return s<=o;throw new Error(`Invalid operator: ${c}`)}switch(a){case"exact":return l(n,u);case"is_not":return!l(n,u);case"is_set":return i in t;case"icontains":return String(u).toLowerCase().includes(String(n).toLowerCase());case"not_icontains":return!String(u).toLowerCase().includes(String(n).toLowerCase());case"regex":return URd(String(n))&&String(u).match(String(n))!==null;case"not_regex":return URd(String(n))&&String(u).match(String(n))===null;case"gt":case"gte":case"lt":case"lte":{let s=typeof n=="number"?n:null;if(typeof n=="string")try{s=parseFloat(n)}catch{}return s!=null&&u!=null?typeof u=="string"?f(u,String(n),a):f(u,s,a):f(String(u),String(n),a)}case"is_date_after":case"is_date_before":{let s=$61(String(n));if(s==null&&(s=VRd(n)),s==null)throw new i2(`Invalid date: ${n}`);let o=VRd(u);return["is_date_before"].includes(a)?o<s:o>s}default:throw new i2(`Unknown operator: ${a}`)}}function QRd(e,t,r,i=!1){let n=String(e.value);if(!(n in r))throw new i2("can't match cohort without a given cohort property value");let a=r[n];return JRd(a,t,r,i)}function JRd(e,t,r,i=!1){if(!e)return!0;let n=e.type,a=e.values;if(!a||a.length===0)return!0;let u=!1;if("values"in a[0]){for(let l of a)try{let f=JRd(l,t,r,i);if(n==="AND"){if(!f)return!1}else if(f)return!0}catch(f){if(f instanceof i2)i&&console.debug(`Failed to compute property ${l} locally: ${f}`),u=!0;else throw f}if(u)throw new i2("Can't match cohort without a given cohort property value");return n==="AND"}else{for(let l of a)try{let f;l.type==="cohort"?f=QRd(l,t,r,i):f=GRd(l,t);let s=l.negation||!1;if(n==="AND"){if(!f&&!s||f&&s)return!1}else if(f&&!s||!f&&s)return!0}catch(f){if(f instanceof i2)i&&console.debug(`Failed to compute property ${l} locally: ${f}`),u=!0;else throw f}if(u)throw new i2("can't match cohort without a given cohort property value");return n==="AND"}}function URd(e){try{return new RegExp(e),!0}catch{return!1}}function VRd(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new i2(`${e} is in an invalid date format`)}else throw new i2(`The date provided ${e} must be a string, number, or date object`)}function $61(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),i=new Date(new Date().toISOString());if(r){if(!r.groups)return null;let n=parseInt(r.groups.number);if(n>=1e4)return null;let a=r.groups.interval;if(a=="h")i.setUTCHours(i.getUTCHours()-n);else if(a=="d")i.setUTCDate(i.getUTCDate()-n);else if(a=="w")i.setUTCDate(i.getUTCDate()-n*7);else if(a=="m")i.setUTCMonth(i.getUTCMonth()-n);else if(a=="y")i.setUTCFullYear(i.getUTCFullYear()-n);else return null;return i}else return null}var G61=30*1e3,Q61=50*1e3,qun=class extends Sps{constructor(t,r={}){super(t,r),this._memoryStorage=new Dps,this.options=r,r.personalApiKey&&(this.featureFlagsPoller=new Aps({pollingInterval:typeof r.featureFlagsPollingInterval=="number"?r.featureFlagsPollingInterval:G61,personalApiKey:r.personalApiKey,projectApiKey:t,timeout:r.requestTimeout??1e4,host:this.host,fetch:r.fetch,onError:i=>{this._events.emit("error",i)},customHeaders:this.getCustomHeaders()})),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=r.maxCacheSize||Q61}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):$Rd(t,r)}getLibraryId(){return"posthog-node"}getLibraryVersion(){return I61}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}capture({distinctId:t,event:r,properties:i,groups:n,sendFeatureFlags:a,timestamp:u,disableGeoip:l,uuid:f}){let s=b=>{super.captureStateless(t,r,b,{timestamp:u,disableGeoip:l,uuid:f})},o=(b,g,O)=>super.getFeatureFlagsStateless(b,g,void 0,void 0,O),c=Promise.resolve().then(async()=>{if(a)return await o(t,n,l);if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let b={};for(let[g,O]of Object.entries(n||{}))b[g]=String(O);return await this.getAllFlags(t,{groups:b,disableGeoip:l,onlyEvaluateLocally:!0})}return{}}).then(b=>{let g={};if(b)for(let[m,w]of Object.entries(b))g[`$feature/${m}`]=w;let O=Object.keys(b||{}).filter(m=>b?.[m]!==!1);return O.length>0&&(g.$active_feature_flags=O),g}).catch(()=>({})).then(b=>{s({...b,...i,$groups:n})});this.addPendingPromise(c)}identify({distinctId:t,properties:r,disableGeoip:i}){let n=r?.$set||r;super.identifyStateless(t,{$set:n},{disableGeoip:i})}alias(t){super.aliasStateless(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}async getFeatureFlag(t,r,i){let{groups:n,disableGeoip:a}=i||{},{onlyEvaluateLocally:u,sendFeatureFlagEvents:l,personProperties:f,groupProperties:s}=i||{},o=this.addLocalPersonAndGroupProperties(r,n,f,s);f=o.allPersonProperties,s=o.allGroupProperties,u==null&&(u=!1),l==null&&(l=!0);let c=await this.featureFlagsPoller?.getFeatureFlag(t,r,n,f,s),b=c!==void 0;!b&&!u&&(c=await super.getFeatureFlagStateless(t,r,n,f,s,a));let g=`${t}_${c}`;return l&&(!(r in this.distinctIdHasSentFlagCalls)||!this.distinctIdHasSentFlagCalls[r].includes(g))&&(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(g):this.distinctIdHasSentFlagCalls[r]=[g],this.capture({distinctId:r,event:"$feature_flag_called",properties:{$feature_flag:t,$feature_flag_response:c,locally_evaluated:b,[`$feature/${t}`]:c},groups:n,disableGeoip:a})),c}async getFeatureFlagPayload(t,r,i,n){let{groups:a,disableGeoip:u}=n||{},{onlyEvaluateLocally:l,sendFeatureFlagEvents:f,personProperties:s,groupProperties:o}=n||{},c=this.addLocalPersonAndGroupProperties(r,a,s,o);s=c.allPersonProperties,o=c.allGroupProperties;let b;return i||(i=await this.getFeatureFlag(t,r,{...n,onlyEvaluateLocally:!0})),i&&(b=await this.featureFlagsPoller?.computeFeatureFlagPayloadLocally(t,i)),l==null&&(l=!1),f==null&&(f=!0),l==null&&(l=!1),!(b!==void 0)&&!l&&(b=await super.getFeatureFlagPayloadStateless(t,r,a,s,o,u)),b}async isFeatureEnabled(t,r,i){let n=await this.getFeatureFlag(t,r,i);if(n!==void 0)return!!n||!1}async getAllFlags(t,r){return(await this.getAllFlagsAndPayloads(t,r)).featureFlags}async getAllFlagsAndPayloads(t,r){let{groups:i,disableGeoip:n}=r||{},{onlyEvaluateLocally:a,personProperties:u,groupProperties:l}=r||{},f=this.addLocalPersonAndGroupProperties(t,i,u,l);u=f.allPersonProperties,l=f.allGroupProperties,a==null&&(a=!1);let s=await this.featureFlagsPoller?.getAllFlagsAndPayloads(t,i,u,l),o={},c={},b=!0;if(s&&(o=s.response,c=s.payloads,b=s.fallbackToDecide),b&&!a){let g=await super.getFeatureFlagsAndPayloadsStateless(t,i,u,l,n);o={...o,...g.flags||{}},c={...c,...g.payloads||{}}}return{featureFlags:o,featureFlagPayloads:c}}groupIdentify({groupType:t,groupKey:r,properties:i,distinctId:n,disableGeoip:a}){super.groupIdentifyStateless(t,r,i,{disableGeoip:a},n)}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}async shutdown(t){return this.featureFlagsPoller?.stopPoller(),super.shutdown(t)}addLocalPersonAndGroupProperties(t,r,i,n){let a={distinct_id:t,...i||{}},u={};if(r)for(let l of Object.keys(r))u[l]={$group_key:r[l],...n?.[l]||{}};return{allPersonProperties:a,allGroupProperties:u}}},Mps=class e{constructor(t,r,i,n){this.posthog=t,this.posthogHost=r,this.organization=i,this.prefix=n,this.name="posthog-node",this.posthogHost=t.options.host??"https://us.i.posthog.com"}setupOnce(t,r){t(i=>{if(i.exception?.values===void 0||i.exception.values.length===0)return i;i.tags||(i.tags={});let n=r(),a=i.tags[e.POSTHOG_ID_TAG];if(a===void 0)return i;i.tags["PostHog Person URL"]=new URL(`/person/${a}`,this.posthogHost).toString();let u={$exception_message:i.exception.values[0]?.value,$exception_type:i.exception.values[0]?.type,$exception_personURL:i.tags["PostHog Person URL"],$sentry_event_id:i.event_id,$sentry_exception:i.exception,$sentry_exception_message:i.exception.values[0]?.value,$sentry_exception_type:i.exception.values[0]?.type,$sentry_tags:i.tags},l=n.getClient()?.getDsn()?.projectId;return this.organization!==void 0&&l!==void 0&&i.event_id!==void 0&&(u.$sentry_url=`${this.prefix??"https://sentry.io/organizations"}/${this.organization}/issues/?project=${l}&query=${i.event_id}`),this.posthog.capture({event:"$exception",distinctId:a,properties:u}),i})}};Mps.POSTHOG_ID_TAG="posthog_distinct_id";var Eno=class{posthog;constructor({posthogApiKey:t}){this.posthog=new qun(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"0.51.19",usingAccessToken:!0}})}async flush(){await this.posthog.flush()}};var GGn=class{async sendEvent(){}async identify(){}async flush(){}};var Tun=require("fs/promises"),ZRd=require("os"),kRd=require("path");var KRd=Ei(require("crypto")),Mno=new Uint8Array(256),Ano=Mno.length;function qps(){return Ano>Mno.length-16&&(KRd.default.randomFillSync(Mno),Ano=0),Mno.slice(Ano,Ano+=16)}var xL=[];for(let e=0;e<256;++e)xL.push((e+256).toString(16).slice(1));function YRd(e,t=0){return xL[e[t+0]]+xL[e[t+1]]+xL[e[t+2]]+xL[e[t+3]]+"-"+xL[e[t+4]]+xL[e[t+5]]+"-"+xL[e[t+6]]+xL[e[t+7]]+"-"+xL[e[t+8]]+xL[e[t+9]]+"-"+xL[e[t+10]]+xL[e[t+11]]+xL[e[t+12]]+xL[e[t+13]]+xL[e[t+14]]+xL[e[t+15]]}var XRd=Ei(require("crypto")),Tps={randomUUID:XRd.default.randomUUID};function J61(e,t,r){if(Tps.randomUUID&&!t&&!e)return Tps.randomUUID();e=e||{};let i=e.random||(e.rng||qps)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=i[n];return t}return YRd(i)}var ZCe=J61;var K61="id",Y61=".fern",QGn=class{posthog;userId;constructor({token:t,posthogApiKey:r}){this.posthog=new qun(r),this.userId=t==null?void 0:Kas(t)}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"0.51.19",...t,...t.properties}})}async flush(){await this.posthog.flush()}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=ku(Kl.of((0,ZRd.homedir)()),yo.of(Y61),yo.of(K61));await Lf(t)||(await(0,Tun.mkdir)((0,kRd.dirname)(t),{recursive:!0}),await(0,Tun.writeFile)(t,ZCe())),this.persistedDistinctId=(await(0,Tun.readFile)(t)).toString()}return this.persistedDistinctId}};var Cps;async function Cun(){return Cps==null&&(Cps=await X61()),Cps}async function X61(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new GGn;let r=await LXa();return r!=null?new QGn({token:r,posthogApiKey:e}):await NXa()!=null?new Eno({posthogApiKey:e}):new QGn({token:void 0,posthogApiKey:e})}catch{return new GGn}}function JGn(e,t){return function(){return e.apply(t,arguments)}}var{toString:Z61}=Object.prototype,{getPrototypeOf:Ips}=Object,Tno=(e=>t=>{let r=Z61.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),a2t=e=>(e=e.toLowerCase(),t=>Tno(t)===e),Cno=e=>t=>typeof t===e,{isArray:xun}=Array,KGn=Cno("undefined");function k61(e){return e!==null&&!KGn(e)&&e.constructor!==null&&!KGn(e.constructor)&&_we(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var rFd=a2t("ArrayBuffer");function e41(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rFd(e.buffer),t}var t41=Cno("string"),_we=Cno("function"),iFd=Cno("number"),Bno=e=>e!==null&&typeof e=="object",r41=e=>e===!0||e===!1,qno=e=>{if(Tno(e)!=="object")return!1;let t=Ips(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},i41=a2t("Date"),n41=a2t("File"),a41=a2t("Blob"),o41=a2t("FileList"),u41=e=>Bno(e)&&_we(e.pipe),s41=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_we(e.append)&&((t=Tno(e))==="formdata"||t==="object"&&_we(e.toString)&&e.toString()==="[object FormData]"))},c41=a2t("URLSearchParams"),[l41,f41,d41,p41]=["ReadableStream","Request","Response","Headers"].map(a2t),_41=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function YGn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),xun(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,l;for(i=0;i<u;i++)l=a[i],t.call(null,e[l],l,e)}}function nFd(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var $ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,aFd=e=>!KGn(e)&&e!==$ji;function xps(){let{caseless:e}=aFd(this)&&this||{},t={},r=(i,n)=>{let a=e&&nFd(t,n)||n;qno(t[a])&&qno(i)?t[a]=xps(t[a],i):qno(i)?t[a]=xps({},i):xun(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&YGn(arguments[i],r);return t}var h41=(e,t,r,{allOwnKeys:i}={})=>(YGn(t,(n,a)=>{r&&_we(n)?e[a]=JGn(n,r):e[a]=n},{allOwnKeys:i}),e),y41=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),v41=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},b41=(e,t,r,i)=>{let n,a,u,l={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=r!==!1&&Ips(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},g41=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},O41=e=>{if(!e)return null;if(xun(e))return e;let t=e.length;if(!iFd(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},m41=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ips(Uint8Array)),P41=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},j41=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},w41=a2t("HTMLFormElement"),S41=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),eFd=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),D41=a2t("RegExp"),oFd=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};YGn(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},E41=e=>{oFd(e,(t,r)=>{if(_we(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(_we(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},A41=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return xun(e)?i(e):i(String(e).split(t)),r},M41=()=>{},q41=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Bps="abcdefghijklmnopqrstuvwxyz",tFd="0123456789",uFd={DIGIT:tFd,ALPHA:Bps,ALPHA_DIGIT:Bps+Bps.toUpperCase()+tFd},T41=(e=16,t=uFd.ALPHA_DIGIT)=>{let r="",{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function C41(e){return!!(e&&_we(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var B41=e=>{let t=new Array(10),r=(i,n)=>{if(Bno(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=xun(i)?[]:{};return YGn(i,(u,l)=>{let f=r(u,n+1);!KGn(f)&&(a[l]=f)}),t[n]=void 0,a}}return i};return r(e,0)},x41=a2t("AsyncFunction"),I41=e=>e&&(Bno(e)||_we(e))&&_we(e.then)&&_we(e.catch),sFd=((e,t)=>e?setImmediate:t?((r,i)=>($ji.addEventListener("message",({source:n,data:a})=>{n===$ji&&a===r&&i.length&&i.shift()()},!1),n=>{i.push(n),$ji.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_we($ji.postMessage)),z41=typeof queueMicrotask<"u"?queueMicrotask.bind($ji):typeof process<"u"&&process.nextTick||sFd,os={isArray:xun,isArrayBuffer:rFd,isBuffer:k61,isFormData:s41,isArrayBufferView:e41,isString:t41,isNumber:iFd,isBoolean:r41,isObject:Bno,isPlainObject:qno,isReadableStream:l41,isRequest:f41,isResponse:d41,isHeaders:p41,isUndefined:KGn,isDate:i41,isFile:n41,isBlob:a41,isRegExp:D41,isFunction:_we,isStream:u41,isURLSearchParams:c41,isTypedArray:m41,isFileList:o41,forEach:YGn,merge:xps,extend:h41,trim:_41,stripBOM:y41,inherits:v41,toFlatObject:b41,kindOf:Tno,kindOfTest:a2t,endsWith:g41,toArray:O41,forEachEntry:P41,matchAll:j41,isHTMLForm:w41,hasOwnProperty:eFd,hasOwnProp:eFd,reduceDescriptors:oFd,freezeMethods:E41,toObjectSet:A41,toCamelCase:S41,noop:M41,toFiniteNumber:q41,findKey:nFd,global:$ji,isContextDefined:aFd,ALPHABET:uFd,generateString:T41,isSpecCompliantForm:C41,toJSONObject:B41,isAsyncFn:x41,isThenable:I41,setImmediate:sFd,asap:z41};function Iun(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}os.inherits(Iun,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:os.toJSONObject(this.config),code:this.code,status:this.status}}});var cFd=Iun.prototype,lFd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{lFd[e]={value:e}});Object.defineProperties(Iun,lFd);Object.defineProperty(cFd,"isAxiosError",{value:!0});Iun.from=(e,t,r,i,n,a)=>{let u=Object.create(cFd);return os.toFlatObject(e,u,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),Iun.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var yp=Iun;var fFd=Ei(CLn(),1),xno=fFd.default;function zps(e){return os.isPlainObject(e)||os.isArray(e)}function pFd(e){return os.endsWith(e,"[]")?e.slice(0,-2):e}function dFd(e,t,r){return e?e.concat(t).map(function(n,a){return n=pFd(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function R41(e){return os.isArray(e)&&!e.some(zps)}var F41=os.toFlatObject(os,{},null,function(t){return/^is[A-Z]/.test(t)});function N41(e,t,r){if(!os.isObject(e))throw new TypeError("target must be an object");t=t||new(xno||FormData),r=os.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!os.isUndefined(w[m])});let i=r.metaTokens,n=r.visitor||o,a=r.dots,u=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&os.isSpecCompliantForm(t);if(!os.isFunction(n))throw new TypeError("visitor must be a function");function s(O){if(O===null)return"";if(os.isDate(O))return O.toISOString();if(!f&&os.isBlob(O))throw new yp("Blob is not supported. Use a Buffer instead.");return os.isArrayBuffer(O)||os.isTypedArray(O)?f&&typeof Blob=="function"?new Blob([O]):Buffer.from(O):O}function o(O,m,w){let A=O;if(O&&!w&&typeof O=="object"){if(os.endsWith(m,"{}"))m=i?m:m.slice(0,-2),O=JSON.stringify(O);else if(os.isArray(O)&&R41(O)||(os.isFileList(O)||os.endsWith(m,"[]"))&&(A=os.toArray(O)))return m=pFd(m),A.forEach(function(q,D){!(os.isUndefined(q)||q===null)&&t.append(u===!0?dFd([m],D,a):u===null?m:m+"[]",s(q))}),!1}return zps(O)?!0:(t.append(dFd(w,m,a),s(O)),!1)}let c=[],b=Object.assign(F41,{defaultVisitor:o,convertValue:s,isVisitable:zps});function g(O,m){if(!os.isUndefined(O)){if(c.indexOf(O)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(O),os.forEach(O,function(A,M){(!(os.isUndefined(A)||A===null)&&n.call(t,A,os.isString(M)?M.trim():M,m,b))===!0&&g(A,m?m.concat(M):[M])}),c.pop()}}if(!os.isObject(e))throw new TypeError("data must be an object");return g(e),t}var tkr=N41;function _Fd(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function hFd(e,t){this._pairs=[],e&&tkr(e,this,t)}var yFd=hFd.prototype;yFd.append=function(t,r){this._pairs.push([t,r])};yFd.toString=function(t){let r=t?function(i){return t.call(this,i,_Fd)}:_Fd;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var vFd=hFd;function L41(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Gji(e,t,r){if(!t)return e;let i=r&&r.encode||L41,n=r&&r.serialize,a;if(n?a=n(t,r):a=os.isURLSearchParams(t)?t.toString():new vFd(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var Rps=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){os.forEach(this.handlers,function(i){i!==null&&t(i)})}},Fps=Rps;var zun={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var bFd=Ei(require("url"),1),gFd=bFd.default.URLSearchParams;var OFd={isNode:!0,classes:{URLSearchParams:gFd,FormData:xno,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var Ups={};Ro(Ups,{hasBrowserEnv:()=>Lps,hasStandardBrowserEnv:()=>U41,hasStandardBrowserWebWorkerEnv:()=>V41,navigator:()=>Nps,origin:()=>W41});var Lps=typeof window<"u"&&typeof document<"u",Nps=typeof navigator=="object"&&navigator||void 0,U41=Lps&&(!Nps||["ReactNative","NativeScript","NS"].indexOf(Nps.product)<0),V41=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W41=Lps&&window.location.href||"http://localhost";var sT={...Ups,...OFd};function Vps(e,t){return tkr(e,new sT.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return sT.isNode&&os.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function H41(e){return os.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $41(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function G41(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let l=Number.isFinite(+u),f=a>=r.length;return u=!u&&os.isArray(n)?n.length:u,f?(os.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!l):((!n[u]||!os.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&os.isArray(n[u])&&(n[u]=$41(n[u])),!l)}if(os.isFormData(e)&&os.isFunction(e.entries)){let r={};return os.forEachEntry(e,(i,n)=>{t(H41(i),n,r,0)}),r}return null}var Ino=G41;function Q41(e,t,r){if(os.isString(e))try{return(t||JSON.parse)(e),os.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var Wps={transitional:zun,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=os.isObject(t);if(a&&os.isHTMLForm(t)&&(t=new FormData(t)),os.isFormData(t))return n?JSON.stringify(Ino(t)):t;if(os.isArrayBuffer(t)||os.isBuffer(t)||os.isStream(t)||os.isFile(t)||os.isBlob(t)||os.isReadableStream(t))return t;if(os.isArrayBufferView(t))return t.buffer;if(os.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Vps(t,this.formSerializer).toString();if((l=os.isFileList(t))||i.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return tkr(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),Q41(t)):t}],transformResponse:[function(t){let r=this.transitional||Wps.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(os.isResponse(t)||os.isReadableStream(t))return t;if(t&&os.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(l){if(u)throw l.name==="SyntaxError"?yp.from(l,yp.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sT.classes.FormData,Blob:sT.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};os.forEach(["delete","get","head","post","put","patch"],e=>{Wps.headers[e]={}});var Run=Wps;var J41=os.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mFd=e=>{let t={},r,i,n;return e&&e.split(`
1687
+ `}write(t){let r=t.split(/\n/);this.height=r.length,this.rl.setPrompt(r.at(-1)),this.rl.output.rows===0&&this.rl.output.columns===0&&Rio(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var Mzd=Ei(Pzd(),1),qzd=Ei(Vls(),1),Tzd=Ei(Ezd(),1),rM=Ei(dwe(),1),Czd=Ei(O$n(),1);var uno=Ei(dwe(),1),Azd=Ei(O$n(),1),sno=function(e,t,r){return typeof e[t]!="function"?(0,uno.of)(e):(0,uno.from)((0,Azd.default)(e[t])(r).then(i=>(e[t]=i,e)))};var TGn={isPlainObject:Mzd.default,set:Tzd.default,get:qzd.default},jun=class extends Uji{constructor(t,r){super(r),this.prompts=t}run(t,r){this.answers=TGn.isPlainObject(r)?{...r}:{},TGn.isPlainObject(t)&&(t=Object.values(t).every(n=>TGn.isPlainObject(n)&&n.name===void 0)?Object.entries(t).map(([n,a])=>({name:n,...a})):[t]);let i=Array.isArray(t)?(0,rM.from)(t):t;return this.process=i.pipe((0,rM.concatMap)(this.processQuestion.bind(this)),(0,rM.publish)()),this.process.connect(),this.process.pipe((0,rM.reduce)((n,a)=>(TGn.set(n,a.name,a.answer),n),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(t){return this.close(),Promise.reject(t)}processQuestion(t){return t={...t},(0,rM.defer)(()=>(0,rM.of)(t).pipe((0,rM.concatMap)(this.setDefaultType.bind(this)),(0,rM.concatMap)(this.filterIfRunnable.bind(this)),(0,rM.concatMap)(()=>sno(t,"message",this.answers)),(0,rM.concatMap)(()=>sno(t,"default",this.answers)),(0,rM.concatMap)(()=>sno(t,"choices",this.answers)),(0,rM.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,rM.defer)(()=>(0,rM.from)(this.activePrompt.run().then(i=>({name:t.name,answer:i}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,rM.defer)(()=>(0,rM.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&TGn.get(this.answers,t.name)!==void 0)return(0,rM.empty)();if(t.when===!1)return(0,rM.empty)();if(typeof t.when!="function")return(0,rM.of)(t);let{answers:r}=this;return(0,rM.defer)(()=>(0,rM.from)((0,Czd.default)(t.when)(r).then(i=>{if(i)return t})).pipe((0,rM.filter)(i=>i!=null)))}};function Bzd(e){let t=function(r,i){let n;try{n=new jun(t.prompts,e)}catch(u){return Promise.reject(u)}let a=n.run(r,i);return a.ui=n,a};return t.prompts={},t.registerPrompt=function(r,i){return t.prompts[r]=i,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",pGn),this.registerPrompt("input",Bji),this.registerPrompt("number",_Gn),this.registerPrompt("confirm",hGn),this.registerPrompt("rawlist",yGn),this.registerPrompt("expand",vGn),this.registerPrompt("checkbox",bGn),this.registerPrompt("password",gGn),this.registerPrompt("editor",MGn)},t.restoreDefaultPrompts(),t}var Rds=Bzd();function c71(e,t){Rds.registerPrompt(e,t)}function l71(){Rds.restoreDefaultPrompts()}var f71={prompt:Rds,ui:{BottomBar:qGn,Prompt:jun},createPromptModule:Bzd,registerPrompt:c71,restoreDefaultPrompts:l71,Separator:yte},cno=f71;var WRd=Ei(xzd()),I61="4.2.1",n2t;(function(e){e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay"})(n2t||(n2t={}));function z61(e,t){if(!e)throw new Error(t)}function R61(e){return e?.replace(/\/+$/,"")}async function F61(e,t){let r=null;for(let i=0;i<t.retryCount+1;i++){i>0&&await new Promise(n=>setTimeout(n,t.retryDelay));try{return await e()}catch(n){if(r=n,!t.retryCheck(n))throw n}}throw r}function N61(){return new Date().getTime()}function IRd(){return new Date().toISOString()}function HRd(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}var WGn=String.fromCharCode,zRd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Pno={};function L61(e,t){if(!Pno[e]){Pno[e]={};for(let r=0;r<e.length;r++)Pno[e][e.charAt(r)]=r}return Pno[e][t]}var HGn={compressToBase64:function(e){if(e==null)return"";let t=HGn._compress(e,6,function(r){return zRd.charAt(r)});switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return e==null?"":e==""?null:HGn._decompress(e.length,32,function(t){return L61(zRd,e.charAt(t))})},compress:function(e){return HGn._compress(e,16,function(t){return WGn(t)})},_compress:function(e,t,r){if(e==null)return"";let i={},n={},a=[],u,l,f="",s="",o="",c=2,b=3,g=2,O=0,m=0,w;for(w=0;w<e.length;w+=1)if(f=e.charAt(w),Object.prototype.hasOwnProperty.call(i,f)||(i[f]=b++,n[f]=!0),s=o+f,Object.prototype.hasOwnProperty.call(i,s))o=s;else{if(Object.prototype.hasOwnProperty.call(n,o)){if(o.charCodeAt(0)<256){for(u=0;u<g;u++)O=O<<1,m==t-1?(m=0,a.push(r(O)),O=0):m++;for(l=o.charCodeAt(0),u=0;u<8;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}else{for(l=1,u=0;u<g;u++)O=O<<1|l,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=0;for(l=o.charCodeAt(0),u=0;u<16;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}c--,c==0&&(c=Math.pow(2,g),g++),delete n[o]}else for(l=i[o],u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;c--,c==0&&(c=Math.pow(2,g),g++),i[s]=b++,o=String(f)}if(o!==""){if(Object.prototype.hasOwnProperty.call(n,o)){if(o.charCodeAt(0)<256){for(u=0;u<g;u++)O=O<<1,m==t-1?(m=0,a.push(r(O)),O=0):m++;for(l=o.charCodeAt(0),u=0;u<8;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}else{for(l=1,u=0;u<g;u++)O=O<<1|l,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=0;for(l=o.charCodeAt(0),u=0;u<16;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}c--,c==0&&(c=Math.pow(2,g),g++),delete n[o]}else for(l=i[o],u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;c--,c==0&&(c=Math.pow(2,g),g++)}for(l=2,u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;for(;;)if(O=O<<1,m==t-1){a.push(r(O));break}else m++;return a.join("")},decompress:function(e){return e==null?"":e==""?null:HGn._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(e,t,r){let i=[],n=[],a={val:r(0),position:t,index:1},u=4,l=4,f=3,s="",o,c,b,g,O,m,w;for(o=0;o<3;o+=1)i[o]=o;for(b=0,O=Math.pow(2,2),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;switch(b){case 0:for(b=0,O=Math.pow(2,8),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;w=WGn(b);break;case 1:for(b=0,O=Math.pow(2,16),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;w=WGn(b);break;case 2:return""}for(i[3]=w,c=w,n.push(w);;){if(a.index>e)return"";for(b=0,O=Math.pow(2,f),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;switch(w=b){case 0:for(b=0,O=Math.pow(2,8),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;i[l++]=WGn(b),w=l-1,u--;break;case 1:for(b=0,O=Math.pow(2,16),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;i[l++]=WGn(b),w=l-1,u--;break;case 2:return n.join("")}if(u==0&&(u=Math.pow(2,f),f++),i[w])s=i[w];else if(w===l)s=c+c.charAt(0);else return null;n.push(s),i[l++]=c+s.charAt(0),u--,c=s,u==0&&(u=Math.pow(2,f),f++)}}},jps=class{constructor(){this.events={},this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(i=>i!==r)}}emit(t,r){for(let i of this.events[t]||[])i(r);for(let i of this.events["*"]||[])i(t,r)}};var jno="0123456789abcdef",wno=class e{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new e(t)}static fromFieldsV7(t,r,i,n){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||t<0||r<0||i<0||n<0||t>0xffffffffffff||r>4095||i>1073741823||n>4294967295)throw new RangeError("invalid field value");let a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/2**8,a[5]=t,a[6]=112|r>>>8,a[7]=r,a[8]=128|i>>>24,a[9]=i>>>16,a[10]=i>>>8,a[11]=i,a[12]=n>>>24,a[13]=n>>>16,a[14]=n>>>8,a[15]=n,new e(a)}static parse(t){let r;switch(t.length){case 32:r=/^[0-9a-f]{32}$/i.exec(t)?.[0];break;case 36:r=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break;case 38:r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t)?.slice(1,6).join("");break;case 45:r=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break}if(r){let i=new Uint8Array(16);for(let n=0;n<16;n+=4){let a=parseInt(r.substring(2*n,2*n+8),16);i[n+0]=a>>>24,i[n+1]=a>>>16,i[n+2]=a>>>8,i[n+3]=a}return new e(i)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let r=0;r<this.bytes.length;r++)t+=jno.charAt(this.bytes[r]>>>4),t+=jno.charAt(this.bytes[r]&15),(r===3||r===5||r===7||r===9)&&(t+="-");return t}toHex(){let t="";for(let r=0;r<this.bytes.length;r++)t+=jno.charAt(this.bytes[r]>>>4),t+=jno.charAt(this.bytes[r]&15);return t}toJSON(){return this.toString()}getVariant(){let t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(r=>r===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(r=>r===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new e(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let r=0;r<16;r++){let i=this.bytes[r]-t.bytes[r];if(i!==0)return Math.sign(i)}return 0}},wps=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??U61()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,r){let i=this.generateOrAbortCore(t,r);return i===void 0&&(this.timestamp=0,i=this.generateOrAbortCore(t,r)),i}generateOrAbortCore(t,r){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(r<0||r>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else if(t+r>=this.timestamp)this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter());else return;return wno.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){let t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,wno.ofInner(t)}},U61=()=>({nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}),RRd,FRd=()=>V61().toString(),V61=()=>(RRd||(RRd=new wps)).generate(),Sno=class extends Error{constructor(t){super("HTTP error while fetching PostHog: "+t.status),this.response=t,this.name="PostHogFetchHttpError"}},$Gn=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};function NRd(e){return typeof e=="object"&&(e instanceof Sno||e instanceof $Gn)}var Sps=class{constructor(t,r){this.flushPromise=null,this.disableGeoip=!0,this.historicalMigration=!1,this.disabled=!1,this.defaultOptIn=!0,this.pendingPromises={},this._events=new jps,this._isInitialized=!1,z61(t,"You must pass your PostHog project's api key."),this.apiKey=t,this.host=R61(r?.host||"https://us.i.posthog.com"),this.flushAt=r?.flushAt?Math.max(r?.flushAt,1):20,this.maxBatchSize=Math.max(this.flushAt,r?.maxBatchSize??100),this.maxQueueSize=Math.max(this.flushAt,r?.maxQueueSize??1e3),this.flushInterval=r?.flushInterval??1e4,this.captureMode=r?.captureMode||"json",this.defaultOptIn=r?.defaultOptIn??!0,this._retryOptions={retryCount:r?.fetchRetryCount??3,retryDelay:r?.fetchRetryDelay??3e3,retryCheck:NRd},this.requestTimeout=r?.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r?.featureFlagsRequestTimeoutMs??3e3,this.disableGeoip=r?.disableGeoip??!0,this.disabled=r?.disabled??!1,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled){this.logMsgIfDebug(()=>console.warn("[PostHog] The client is disabled"));return}if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(n2t.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(n2t.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(n2t.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(i,n)=>console.log("PostHog Debug",i,n));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}buildPayload(t){return{distinct_id:t.distinct_id,event:t.event,properties:{...t.properties||{},...this.getCommonEventProperties()}}}addPendingPromise(t){let r=FRd();return this.pendingPromises[r]=t,t.catch(()=>{}).finally(()=>{delete this.pendingPromises[r]}),t}identifyStateless(t,r,i){this.wrap(()=>{let n={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",n,i)})}captureStateless(t,r,i,n){this.wrap(()=>{let a=this.buildPayload({distinct_id:t,event:r,properties:i});this.enqueue("capture",a,n)})}aliasStateless(t,r,i,n){this.wrap(()=>{let a=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...i||{},distinct_id:r,alias:t}});this.enqueue("alias",a,n)})}groupIdentifyStateless(t,r,i,n,a,u){this.wrap(()=>{let l=this.buildPayload({distinct_id:a||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:i||{},...u||{}}});this.enqueue("capture",l,n)})}async getDecide(t,r={},i={},n={},a={}){await this._initPromise;let u=`${this.host}/decide/?v=3`,l={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify({token:this.apiKey,distinct_id:t,groups:r,person_properties:i,group_properties:n,...a})};return this.fetchWithRetry(u,l,{retryCount:0},this.featureFlagsRequestTimeoutMs).then(f=>f.json()).catch(f=>{this._events.emit("error",f)})}async getFeatureFlagStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagsStateless(r,i,n,a,u);if(!l)return;let f=l[t];return f===void 0&&(f=!1),f}async getFeatureFlagPayloadStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagPayloadsStateless(r,i,n,a,u);if(!l)return;let f=l[t];return f===void 0?null:f}async getFeatureFlagPayloadsStateless(t,r={},i={},n={},a){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,i,n,a)).payloads}_parsePayload(t){try{return JSON.parse(t)}catch{return t}}async getFeatureFlagsStateless(t,r={},i={},n={},a){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,i,n,a)).flags}async getFeatureFlagsAndPayloadsStateless(t,r={},i={},n={},a){await this._initPromise;let u={};(a??this.disableGeoip)&&(u.geoip_disable=!0);let l=await this.getDecide(t,r,i,n,u),f=l?.featureFlags,s=l?.featureFlagPayloads,o=s;return s&&(o=Object.fromEntries(Object.entries(s).map(([c,b])=>[c,this._parsePayload(b)]))),{flags:f,payloads:o}}enqueue(t,r,i){this.wrap(()=>{if(this.optedOut){this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");return}let n={...r,type:t,library:this.getLibraryId(),library_version:this.getLibraryVersion(),timestamp:i?.timestamp?i?.timestamp:IRd(),uuid:i?.uuid?i.uuid:FRd()};(i?.disableGeoip??this.disableGeoip)&&(n.properties||(n.properties={}),n.properties.$geoip_disable=!0),n.distinctId&&(n.distinct_id=n.distinctId,delete n.distinctId);let u=this.getPersistedProperty(n2t.Queue)||[];u.length>=this.maxQueueSize&&(u.shift(),this.logMsgIfDebug(()=>console.info("Queue is full, the oldest event is dropped."))),u.push({message:n}),this.setPersistedProperty(n2t.Queue,u),this._events.emit(t,n),u.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=HRd(()=>this.flushBackground(),this.flushInterval))})}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.flush().catch(()=>{})}async flush(){return this.flushPromise||(this.flushPromise=this._flush().finally(()=>{this.flushPromise=null}),this.addPendingPromise(this.flushPromise)),this.flushPromise}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getPersistedProperty(n2t.Queue)||[];if(!t.length)return[];let r=t.slice(0,this.maxBatchSize),i=r.map(s=>s.message),n=()=>{let s=this.getPersistedProperty(n2t.Queue)||[];this.setPersistedProperty(n2t.Queue,s.slice(r.length))},a={api_key:this.apiKey,batch:i,sent_at:IRd()};this.historicalMigration&&(a.historical_migration=!0);let u=JSON.stringify(a),l=this.captureMode==="form"?`${this.host}/e/?ip=1&_=${N61()}&v=${this.getLibraryVersion()}`:`${this.host}/batch/`,f=this.captureMode==="form"?{method:"POST",mode:"no-cors",credentials:"omit",headers:{...this.getCustomHeaders(),"Content-Type":"application/x-www-form-urlencoded"},body:`data=${encodeURIComponent(HGn.compressToBase64(u))}&compression=lz64`}:{method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:u};try{await this.fetchWithRetry(l,f)}catch(s){throw s instanceof $Gn||n(),this._events.emit("error",s),s}return n(),this._events.emit("flush",i),i}async fetchWithRetry(t,r,i,n){var a;return(a=AbortSignal).timeout??(a.timeout=function(l){let f=new AbortController;return setTimeout(()=>f.abort(),l),f.signal}),await F61(async()=>{let u=null;try{u=await this.fetch(t,{signal:AbortSignal.timeout(n??this.requestTimeout),...r})}catch(f){throw new $Gn(f)}if(!(r.mode==="no-cors")&&(u.status<200||u.status>=400))throw new Sno(u);return u},{...this._retryOptions,...i})}async shutdown(t=3e4){await this._initPromise,this.clearFlushTimer();try{await Promise.all(Object.values(this.pendingPromises));let r=Date.now()+t;for(;(this.getPersistedProperty(n2t.Queue)||[]).length!==0;){await this.flush();let n=Date.now();if(r<n)break}}catch(r){if(!NRd(r))throw r;this.logMsgIfDebug(()=>console.error("Error while shutting down PostHog",r))}}},Dps=class{constructor(){this._memoryStorage={}}getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}},Eps=typeof fetch<"u"?fetch:typeof global.fetch<"u"?global.fetch:void 0;if(!Eps){let e=xRd();Eps=async(t,r)=>{let i=await e.request({url:t,headers:r.headers,method:r.method.toLowerCase(),data:r.body,signal:r.signal,validateStatus:()=>!0});return{status:i.status,text:async()=>i.data,json:async()=>i.data}}}var $Rd=Eps,W61=1152921504606847e3,H61=["is_not"],Dno=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},i2=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},Aps=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:i,timeout:n,host:a,customHeaders:u,...l}){this.debugMode=!1,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=n,this.projectApiKey=i,this.host=a,this.poller=void 0,this.fetch=l.fetch||$Rd,this.onError=l.onError,this.customHeaders=u,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}async getFeatureFlag(t,r,i={},n={},a={}){await this.loadFeatureFlags();let u,l;if(!this.loadedSuccessfullyOnce)return u;for(let f of this.featureFlags)if(t===f.key){l=f;break}if(l!==void 0)try{u=this.computeFlagLocally(l,r,i,n,a),this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${u}`))}catch(f){f instanceof i2?this.logMsgIfDebug(()=>console.debug(`InconclusiveMatchError when computing flag locally: ${t}: ${f}`)):f instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${f}`))}return u}async computeFeatureFlagPayloadLocally(t,r){await this.loadFeatureFlags();let i;if(this.loadedSuccessfullyOnce){if(typeof r=="boolean"?i=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]:typeof r=="string"&&(i=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]),i==null)return null;try{return JSON.parse(i)}catch{return i}}}async getAllFlagsAndPayloads(t,r={},i={},n={}){await this.loadFeatureFlags();let a={},u={},l=this.featureFlags.length==0;return this.featureFlags.map(async f=>{try{let s=this.computeFlagLocally(f,t,r,i,n);a[f.key]=s;let o=await this.computeFeatureFlagPayloadLocally(f.key,s);o&&(u[f.key]=o)}catch(s){s instanceof i2||s instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${f.key}: ${s}`)),l=!0}}),{response:a,payloads:u,fallbackToDecide:l}}computeFlagLocally(t,r,i={},n={},a={}){if(t.ensure_experience_continuity)throw new i2("Flag has experience continuity enabled");if(!t.active)return!1;let l=(t.filters||{}).aggregation_group_type_index;if(l!=null){let f=this.groupTypeMapping[String(l)];if(!f)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${l} for feature flag ${t.key}`)),new i2("Flag has unknown group type index");if(!(f in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;let s=a[f];return this.matchFeatureFlagProperties(t,i[f],s)}else return this.matchFeatureFlagProperties(t,r,n)}matchFeatureFlagProperties(t,r,i){let n=t.filters||{},a=n.groups||[],u=!1,l,f=[...a].sort((s,o)=>{let c=!!s.variant,b=!!o.variant;return c&&b?0:c?-1:b?1:0});for(let s of f)try{if(this.isConditionMatch(t,r,s,i)){let o=s.variant,c=n.multivariate?.variants||[];o&&c.some(b=>b.key===o)?l=o:l=this.getMatchingVariant(t,r)||!0;break}}catch(o){if(o instanceof i2)u=!0;else throw o}if(l!==void 0)return l;if(u)throw new i2("Can't determine if feature flag is enabled or not with given properties");return!1}isConditionMatch(t,r,i,n){let a=i.rollout_percentage,u=l=>{this.logMsgIfDebug(()=>console.warn(l))};if((i.properties||[]).length>0){for(let l of i.properties){let f=l.type,s=!1;if(f==="cohort"?s=QRd(l,n,this.cohorts,this.debugMode):s=GRd(l,n,u),!s)return!1}if(a==null)return!0}return!(a!=null&&LRd(t.key,r)>a/100)}getMatchingVariant(t,r){let i=LRd(t.key,r,"variant"),n=this.variantLookupTable(t).find(a=>i>=a.valueMin&&i<a.valueMax);if(n)return n.key}variantLookupTable(t){let r=[],i=0,n=0;return((t.filters||{}).multivariate?.variants||[]).forEach(l=>{n=i+l.rollout_percentage/100,r.push({valueMin:i,valueMax:n,key:l.key}),i=n}),r}async loadFeatureFlags(t=!1){(!this.loadedSuccessfullyOnce||t)&&await this._loadFeatureFlags()}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0),this.poller=setTimeout(()=>this._loadFeatureFlags(),this.pollingInterval);try{let t=await this._requestFeatureFlagDefinitions();if(t&&t.status===401)throw new Dno("Your personalApiKey is invalid. Are you sure you're not using your Project API key? More information: https://posthog.com/docs/api/overview");if(t&&t.status!==200)return;let r=await t.json();"flags"in r||this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(r)}`)),this.featureFlags=r.flags||[],this.featureFlagsByKey=this.featureFlags.reduce((i,n)=>(i[n.key]=n,i),{}),this.groupTypeMapping=r.group_type_mapping||{},this.cohorts=r.cohorts||[],this.loadedSuccessfullyOnce=!0}catch(t){t instanceof Dno&&this.onError?.(t)}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/api/feature_flag/local_evaluation?token=${this.projectApiKey}&send_cohorts`,r={method:"GET",headers:{...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`}},i=null;if(this.timeout&&typeof this.timeout=="number"){let n=new AbortController;i=HRd(()=>{n.abort()},this.timeout),r.signal=n.signal}try{return await this.fetch(t,r)}finally{clearTimeout(i)}}stopPoller(){clearTimeout(this.poller)}};function LRd(e,t,r=""){let i=(0,WRd.createHash)();return i.update(`${e}.${t}${r}`),parseInt(i.digest("hex").slice(0,15),16)/W61}function GRd(e,t,r){let i=e.key,n=e.value,a=e.operator||"exact";if(i in t){if(a==="is_not_set")throw new i2("Operator is_not_set is not supported")}else throw new i2(`Property ${i} not found in propertyValues`);let u=t[i];if(u==null&&!H61.includes(a))return r&&r(`Property ${i} cannot have a value of null/undefined with the ${a} operator`),!1;function l(s,o){return Array.isArray(s)?s.map(c=>String(c).toLowerCase()).includes(String(o).toLowerCase()):String(s).toLowerCase()===String(o).toLowerCase()}function f(s,o,c){if(c==="gt")return s>o;if(c==="gte")return s>=o;if(c==="lt")return s<o;if(c==="lte")return s<=o;throw new Error(`Invalid operator: ${c}`)}switch(a){case"exact":return l(n,u);case"is_not":return!l(n,u);case"is_set":return i in t;case"icontains":return String(u).toLowerCase().includes(String(n).toLowerCase());case"not_icontains":return!String(u).toLowerCase().includes(String(n).toLowerCase());case"regex":return URd(String(n))&&String(u).match(String(n))!==null;case"not_regex":return URd(String(n))&&String(u).match(String(n))===null;case"gt":case"gte":case"lt":case"lte":{let s=typeof n=="number"?n:null;if(typeof n=="string")try{s=parseFloat(n)}catch{}return s!=null&&u!=null?typeof u=="string"?f(u,String(n),a):f(u,s,a):f(String(u),String(n),a)}case"is_date_after":case"is_date_before":{let s=$61(String(n));if(s==null&&(s=VRd(n)),s==null)throw new i2(`Invalid date: ${n}`);let o=VRd(u);return["is_date_before"].includes(a)?o<s:o>s}default:throw new i2(`Unknown operator: ${a}`)}}function QRd(e,t,r,i=!1){let n=String(e.value);if(!(n in r))throw new i2("can't match cohort without a given cohort property value");let a=r[n];return JRd(a,t,r,i)}function JRd(e,t,r,i=!1){if(!e)return!0;let n=e.type,a=e.values;if(!a||a.length===0)return!0;let u=!1;if("values"in a[0]){for(let l of a)try{let f=JRd(l,t,r,i);if(n==="AND"){if(!f)return!1}else if(f)return!0}catch(f){if(f instanceof i2)i&&console.debug(`Failed to compute property ${l} locally: ${f}`),u=!0;else throw f}if(u)throw new i2("Can't match cohort without a given cohort property value");return n==="AND"}else{for(let l of a)try{let f;l.type==="cohort"?f=QRd(l,t,r,i):f=GRd(l,t);let s=l.negation||!1;if(n==="AND"){if(!f&&!s||f&&s)return!1}else if(f&&!s||!f&&s)return!0}catch(f){if(f instanceof i2)i&&console.debug(`Failed to compute property ${l} locally: ${f}`),u=!0;else throw f}if(u)throw new i2("can't match cohort without a given cohort property value");return n==="AND"}}function URd(e){try{return new RegExp(e),!0}catch{return!1}}function VRd(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new i2(`${e} is in an invalid date format`)}else throw new i2(`The date provided ${e} must be a string, number, or date object`)}function $61(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),i=new Date(new Date().toISOString());if(r){if(!r.groups)return null;let n=parseInt(r.groups.number);if(n>=1e4)return null;let a=r.groups.interval;if(a=="h")i.setUTCHours(i.getUTCHours()-n);else if(a=="d")i.setUTCDate(i.getUTCDate()-n);else if(a=="w")i.setUTCDate(i.getUTCDate()-n*7);else if(a=="m")i.setUTCMonth(i.getUTCMonth()-n);else if(a=="y")i.setUTCFullYear(i.getUTCFullYear()-n);else return null;return i}else return null}var G61=30*1e3,Q61=50*1e3,qun=class extends Sps{constructor(t,r={}){super(t,r),this._memoryStorage=new Dps,this.options=r,r.personalApiKey&&(this.featureFlagsPoller=new Aps({pollingInterval:typeof r.featureFlagsPollingInterval=="number"?r.featureFlagsPollingInterval:G61,personalApiKey:r.personalApiKey,projectApiKey:t,timeout:r.requestTimeout??1e4,host:this.host,fetch:r.fetch,onError:i=>{this._events.emit("error",i)},customHeaders:this.getCustomHeaders()})),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=r.maxCacheSize||Q61}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):$Rd(t,r)}getLibraryId(){return"posthog-node"}getLibraryVersion(){return I61}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}capture({distinctId:t,event:r,properties:i,groups:n,sendFeatureFlags:a,timestamp:u,disableGeoip:l,uuid:f}){let s=b=>{super.captureStateless(t,r,b,{timestamp:u,disableGeoip:l,uuid:f})},o=(b,g,O)=>super.getFeatureFlagsStateless(b,g,void 0,void 0,O),c=Promise.resolve().then(async()=>{if(a)return await o(t,n,l);if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let b={};for(let[g,O]of Object.entries(n||{}))b[g]=String(O);return await this.getAllFlags(t,{groups:b,disableGeoip:l,onlyEvaluateLocally:!0})}return{}}).then(b=>{let g={};if(b)for(let[m,w]of Object.entries(b))g[`$feature/${m}`]=w;let O=Object.keys(b||{}).filter(m=>b?.[m]!==!1);return O.length>0&&(g.$active_feature_flags=O),g}).catch(()=>({})).then(b=>{s({...b,...i,$groups:n})});this.addPendingPromise(c)}identify({distinctId:t,properties:r,disableGeoip:i}){let n=r?.$set||r;super.identifyStateless(t,{$set:n},{disableGeoip:i})}alias(t){super.aliasStateless(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}async getFeatureFlag(t,r,i){let{groups:n,disableGeoip:a}=i||{},{onlyEvaluateLocally:u,sendFeatureFlagEvents:l,personProperties:f,groupProperties:s}=i||{},o=this.addLocalPersonAndGroupProperties(r,n,f,s);f=o.allPersonProperties,s=o.allGroupProperties,u==null&&(u=!1),l==null&&(l=!0);let c=await this.featureFlagsPoller?.getFeatureFlag(t,r,n,f,s),b=c!==void 0;!b&&!u&&(c=await super.getFeatureFlagStateless(t,r,n,f,s,a));let g=`${t}_${c}`;return l&&(!(r in this.distinctIdHasSentFlagCalls)||!this.distinctIdHasSentFlagCalls[r].includes(g))&&(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(g):this.distinctIdHasSentFlagCalls[r]=[g],this.capture({distinctId:r,event:"$feature_flag_called",properties:{$feature_flag:t,$feature_flag_response:c,locally_evaluated:b,[`$feature/${t}`]:c},groups:n,disableGeoip:a})),c}async getFeatureFlagPayload(t,r,i,n){let{groups:a,disableGeoip:u}=n||{},{onlyEvaluateLocally:l,sendFeatureFlagEvents:f,personProperties:s,groupProperties:o}=n||{},c=this.addLocalPersonAndGroupProperties(r,a,s,o);s=c.allPersonProperties,o=c.allGroupProperties;let b;return i||(i=await this.getFeatureFlag(t,r,{...n,onlyEvaluateLocally:!0})),i&&(b=await this.featureFlagsPoller?.computeFeatureFlagPayloadLocally(t,i)),l==null&&(l=!1),f==null&&(f=!0),l==null&&(l=!1),!(b!==void 0)&&!l&&(b=await super.getFeatureFlagPayloadStateless(t,r,a,s,o,u)),b}async isFeatureEnabled(t,r,i){let n=await this.getFeatureFlag(t,r,i);if(n!==void 0)return!!n||!1}async getAllFlags(t,r){return(await this.getAllFlagsAndPayloads(t,r)).featureFlags}async getAllFlagsAndPayloads(t,r){let{groups:i,disableGeoip:n}=r||{},{onlyEvaluateLocally:a,personProperties:u,groupProperties:l}=r||{},f=this.addLocalPersonAndGroupProperties(t,i,u,l);u=f.allPersonProperties,l=f.allGroupProperties,a==null&&(a=!1);let s=await this.featureFlagsPoller?.getAllFlagsAndPayloads(t,i,u,l),o={},c={},b=!0;if(s&&(o=s.response,c=s.payloads,b=s.fallbackToDecide),b&&!a){let g=await super.getFeatureFlagsAndPayloadsStateless(t,i,u,l,n);o={...o,...g.flags||{}},c={...c,...g.payloads||{}}}return{featureFlags:o,featureFlagPayloads:c}}groupIdentify({groupType:t,groupKey:r,properties:i,distinctId:n,disableGeoip:a}){super.groupIdentifyStateless(t,r,i,{disableGeoip:a},n)}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}async shutdown(t){return this.featureFlagsPoller?.stopPoller(),super.shutdown(t)}addLocalPersonAndGroupProperties(t,r,i,n){let a={distinct_id:t,...i||{}},u={};if(r)for(let l of Object.keys(r))u[l]={$group_key:r[l],...n?.[l]||{}};return{allPersonProperties:a,allGroupProperties:u}}},Mps=class e{constructor(t,r,i,n){this.posthog=t,this.posthogHost=r,this.organization=i,this.prefix=n,this.name="posthog-node",this.posthogHost=t.options.host??"https://us.i.posthog.com"}setupOnce(t,r){t(i=>{if(i.exception?.values===void 0||i.exception.values.length===0)return i;i.tags||(i.tags={});let n=r(),a=i.tags[e.POSTHOG_ID_TAG];if(a===void 0)return i;i.tags["PostHog Person URL"]=new URL(`/person/${a}`,this.posthogHost).toString();let u={$exception_message:i.exception.values[0]?.value,$exception_type:i.exception.values[0]?.type,$exception_personURL:i.tags["PostHog Person URL"],$sentry_event_id:i.event_id,$sentry_exception:i.exception,$sentry_exception_message:i.exception.values[0]?.value,$sentry_exception_type:i.exception.values[0]?.type,$sentry_tags:i.tags},l=n.getClient()?.getDsn()?.projectId;return this.organization!==void 0&&l!==void 0&&i.event_id!==void 0&&(u.$sentry_url=`${this.prefix??"https://sentry.io/organizations"}/${this.organization}/issues/?project=${l}&query=${i.event_id}`),this.posthog.capture({event:"$exception",distinctId:a,properties:u}),i})}};Mps.POSTHOG_ID_TAG="posthog_distinct_id";var Eno=class{posthog;constructor({posthogApiKey:t}){this.posthog=new qun(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"0.51.21",usingAccessToken:!0}})}async flush(){await this.posthog.flush()}};var GGn=class{async sendEvent(){}async identify(){}async flush(){}};var Tun=require("fs/promises"),ZRd=require("os"),kRd=require("path");var KRd=Ei(require("crypto")),Mno=new Uint8Array(256),Ano=Mno.length;function qps(){return Ano>Mno.length-16&&(KRd.default.randomFillSync(Mno),Ano=0),Mno.slice(Ano,Ano+=16)}var xL=[];for(let e=0;e<256;++e)xL.push((e+256).toString(16).slice(1));function YRd(e,t=0){return xL[e[t+0]]+xL[e[t+1]]+xL[e[t+2]]+xL[e[t+3]]+"-"+xL[e[t+4]]+xL[e[t+5]]+"-"+xL[e[t+6]]+xL[e[t+7]]+"-"+xL[e[t+8]]+xL[e[t+9]]+"-"+xL[e[t+10]]+xL[e[t+11]]+xL[e[t+12]]+xL[e[t+13]]+xL[e[t+14]]+xL[e[t+15]]}var XRd=Ei(require("crypto")),Tps={randomUUID:XRd.default.randomUUID};function J61(e,t,r){if(Tps.randomUUID&&!t&&!e)return Tps.randomUUID();e=e||{};let i=e.random||(e.rng||qps)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=i[n];return t}return YRd(i)}var ZCe=J61;var K61="id",Y61=".fern",QGn=class{posthog;userId;constructor({token:t,posthogApiKey:r}){this.posthog=new qun(r),this.userId=t==null?void 0:Kas(t)}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"0.51.21",...t,...t.properties}})}async flush(){await this.posthog.flush()}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=ku(Kl.of((0,ZRd.homedir)()),yo.of(Y61),yo.of(K61));await Lf(t)||(await(0,Tun.mkdir)((0,kRd.dirname)(t),{recursive:!0}),await(0,Tun.writeFile)(t,ZCe())),this.persistedDistinctId=(await(0,Tun.readFile)(t)).toString()}return this.persistedDistinctId}};var Cps;async function Cun(){return Cps==null&&(Cps=await X61()),Cps}async function X61(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new GGn;let r=await LXa();return r!=null?new QGn({token:r,posthogApiKey:e}):await NXa()!=null?new Eno({posthogApiKey:e}):new QGn({token:void 0,posthogApiKey:e})}catch{return new GGn}}function JGn(e,t){return function(){return e.apply(t,arguments)}}var{toString:Z61}=Object.prototype,{getPrototypeOf:Ips}=Object,Tno=(e=>t=>{let r=Z61.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),a2t=e=>(e=e.toLowerCase(),t=>Tno(t)===e),Cno=e=>t=>typeof t===e,{isArray:xun}=Array,KGn=Cno("undefined");function k61(e){return e!==null&&!KGn(e)&&e.constructor!==null&&!KGn(e.constructor)&&_we(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var rFd=a2t("ArrayBuffer");function e41(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rFd(e.buffer),t}var t41=Cno("string"),_we=Cno("function"),iFd=Cno("number"),Bno=e=>e!==null&&typeof e=="object",r41=e=>e===!0||e===!1,qno=e=>{if(Tno(e)!=="object")return!1;let t=Ips(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},i41=a2t("Date"),n41=a2t("File"),a41=a2t("Blob"),o41=a2t("FileList"),u41=e=>Bno(e)&&_we(e.pipe),s41=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_we(e.append)&&((t=Tno(e))==="formdata"||t==="object"&&_we(e.toString)&&e.toString()==="[object FormData]"))},c41=a2t("URLSearchParams"),[l41,f41,d41,p41]=["ReadableStream","Request","Response","Headers"].map(a2t),_41=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function YGn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),xun(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,l;for(i=0;i<u;i++)l=a[i],t.call(null,e[l],l,e)}}function nFd(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var $ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,aFd=e=>!KGn(e)&&e!==$ji;function xps(){let{caseless:e}=aFd(this)&&this||{},t={},r=(i,n)=>{let a=e&&nFd(t,n)||n;qno(t[a])&&qno(i)?t[a]=xps(t[a],i):qno(i)?t[a]=xps({},i):xun(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&YGn(arguments[i],r);return t}var h41=(e,t,r,{allOwnKeys:i}={})=>(YGn(t,(n,a)=>{r&&_we(n)?e[a]=JGn(n,r):e[a]=n},{allOwnKeys:i}),e),y41=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),v41=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},b41=(e,t,r,i)=>{let n,a,u,l={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=r!==!1&&Ips(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},g41=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},O41=e=>{if(!e)return null;if(xun(e))return e;let t=e.length;if(!iFd(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},m41=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ips(Uint8Array)),P41=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},j41=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},w41=a2t("HTMLFormElement"),S41=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),eFd=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),D41=a2t("RegExp"),oFd=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};YGn(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},E41=e=>{oFd(e,(t,r)=>{if(_we(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(_we(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},A41=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return xun(e)?i(e):i(String(e).split(t)),r},M41=()=>{},q41=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Bps="abcdefghijklmnopqrstuvwxyz",tFd="0123456789",uFd={DIGIT:tFd,ALPHA:Bps,ALPHA_DIGIT:Bps+Bps.toUpperCase()+tFd},T41=(e=16,t=uFd.ALPHA_DIGIT)=>{let r="",{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function C41(e){return!!(e&&_we(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var B41=e=>{let t=new Array(10),r=(i,n)=>{if(Bno(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=xun(i)?[]:{};return YGn(i,(u,l)=>{let f=r(u,n+1);!KGn(f)&&(a[l]=f)}),t[n]=void 0,a}}return i};return r(e,0)},x41=a2t("AsyncFunction"),I41=e=>e&&(Bno(e)||_we(e))&&_we(e.then)&&_we(e.catch),sFd=((e,t)=>e?setImmediate:t?((r,i)=>($ji.addEventListener("message",({source:n,data:a})=>{n===$ji&&a===r&&i.length&&i.shift()()},!1),n=>{i.push(n),$ji.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_we($ji.postMessage)),z41=typeof queueMicrotask<"u"?queueMicrotask.bind($ji):typeof process<"u"&&process.nextTick||sFd,os={isArray:xun,isArrayBuffer:rFd,isBuffer:k61,isFormData:s41,isArrayBufferView:e41,isString:t41,isNumber:iFd,isBoolean:r41,isObject:Bno,isPlainObject:qno,isReadableStream:l41,isRequest:f41,isResponse:d41,isHeaders:p41,isUndefined:KGn,isDate:i41,isFile:n41,isBlob:a41,isRegExp:D41,isFunction:_we,isStream:u41,isURLSearchParams:c41,isTypedArray:m41,isFileList:o41,forEach:YGn,merge:xps,extend:h41,trim:_41,stripBOM:y41,inherits:v41,toFlatObject:b41,kindOf:Tno,kindOfTest:a2t,endsWith:g41,toArray:O41,forEachEntry:P41,matchAll:j41,isHTMLForm:w41,hasOwnProperty:eFd,hasOwnProp:eFd,reduceDescriptors:oFd,freezeMethods:E41,toObjectSet:A41,toCamelCase:S41,noop:M41,toFiniteNumber:q41,findKey:nFd,global:$ji,isContextDefined:aFd,ALPHABET:uFd,generateString:T41,isSpecCompliantForm:C41,toJSONObject:B41,isAsyncFn:x41,isThenable:I41,setImmediate:sFd,asap:z41};function Iun(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}os.inherits(Iun,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:os.toJSONObject(this.config),code:this.code,status:this.status}}});var cFd=Iun.prototype,lFd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{lFd[e]={value:e}});Object.defineProperties(Iun,lFd);Object.defineProperty(cFd,"isAxiosError",{value:!0});Iun.from=(e,t,r,i,n,a)=>{let u=Object.create(cFd);return os.toFlatObject(e,u,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),Iun.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var yp=Iun;var fFd=Ei(CLn(),1),xno=fFd.default;function zps(e){return os.isPlainObject(e)||os.isArray(e)}function pFd(e){return os.endsWith(e,"[]")?e.slice(0,-2):e}function dFd(e,t,r){return e?e.concat(t).map(function(n,a){return n=pFd(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function R41(e){return os.isArray(e)&&!e.some(zps)}var F41=os.toFlatObject(os,{},null,function(t){return/^is[A-Z]/.test(t)});function N41(e,t,r){if(!os.isObject(e))throw new TypeError("target must be an object");t=t||new(xno||FormData),r=os.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!os.isUndefined(w[m])});let i=r.metaTokens,n=r.visitor||o,a=r.dots,u=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&os.isSpecCompliantForm(t);if(!os.isFunction(n))throw new TypeError("visitor must be a function");function s(O){if(O===null)return"";if(os.isDate(O))return O.toISOString();if(!f&&os.isBlob(O))throw new yp("Blob is not supported. Use a Buffer instead.");return os.isArrayBuffer(O)||os.isTypedArray(O)?f&&typeof Blob=="function"?new Blob([O]):Buffer.from(O):O}function o(O,m,w){let A=O;if(O&&!w&&typeof O=="object"){if(os.endsWith(m,"{}"))m=i?m:m.slice(0,-2),O=JSON.stringify(O);else if(os.isArray(O)&&R41(O)||(os.isFileList(O)||os.endsWith(m,"[]"))&&(A=os.toArray(O)))return m=pFd(m),A.forEach(function(q,D){!(os.isUndefined(q)||q===null)&&t.append(u===!0?dFd([m],D,a):u===null?m:m+"[]",s(q))}),!1}return zps(O)?!0:(t.append(dFd(w,m,a),s(O)),!1)}let c=[],b=Object.assign(F41,{defaultVisitor:o,convertValue:s,isVisitable:zps});function g(O,m){if(!os.isUndefined(O)){if(c.indexOf(O)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(O),os.forEach(O,function(A,M){(!(os.isUndefined(A)||A===null)&&n.call(t,A,os.isString(M)?M.trim():M,m,b))===!0&&g(A,m?m.concat(M):[M])}),c.pop()}}if(!os.isObject(e))throw new TypeError("data must be an object");return g(e),t}var tkr=N41;function _Fd(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function hFd(e,t){this._pairs=[],e&&tkr(e,this,t)}var yFd=hFd.prototype;yFd.append=function(t,r){this._pairs.push([t,r])};yFd.toString=function(t){let r=t?function(i){return t.call(this,i,_Fd)}:_Fd;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var vFd=hFd;function L41(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Gji(e,t,r){if(!t)return e;let i=r&&r.encode||L41,n=r&&r.serialize,a;if(n?a=n(t,r):a=os.isURLSearchParams(t)?t.toString():new vFd(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var Rps=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){os.forEach(this.handlers,function(i){i!==null&&t(i)})}},Fps=Rps;var zun={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var bFd=Ei(require("url"),1),gFd=bFd.default.URLSearchParams;var OFd={isNode:!0,classes:{URLSearchParams:gFd,FormData:xno,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var Ups={};Ro(Ups,{hasBrowserEnv:()=>Lps,hasStandardBrowserEnv:()=>U41,hasStandardBrowserWebWorkerEnv:()=>V41,navigator:()=>Nps,origin:()=>W41});var Lps=typeof window<"u"&&typeof document<"u",Nps=typeof navigator=="object"&&navigator||void 0,U41=Lps&&(!Nps||["ReactNative","NativeScript","NS"].indexOf(Nps.product)<0),V41=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W41=Lps&&window.location.href||"http://localhost";var sT={...Ups,...OFd};function Vps(e,t){return tkr(e,new sT.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return sT.isNode&&os.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function H41(e){return os.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $41(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function G41(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let l=Number.isFinite(+u),f=a>=r.length;return u=!u&&os.isArray(n)?n.length:u,f?(os.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!l):((!n[u]||!os.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&os.isArray(n[u])&&(n[u]=$41(n[u])),!l)}if(os.isFormData(e)&&os.isFunction(e.entries)){let r={};return os.forEachEntry(e,(i,n)=>{t(H41(i),n,r,0)}),r}return null}var Ino=G41;function Q41(e,t,r){if(os.isString(e))try{return(t||JSON.parse)(e),os.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var Wps={transitional:zun,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=os.isObject(t);if(a&&os.isHTMLForm(t)&&(t=new FormData(t)),os.isFormData(t))return n?JSON.stringify(Ino(t)):t;if(os.isArrayBuffer(t)||os.isBuffer(t)||os.isStream(t)||os.isFile(t)||os.isBlob(t)||os.isReadableStream(t))return t;if(os.isArrayBufferView(t))return t.buffer;if(os.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Vps(t,this.formSerializer).toString();if((l=os.isFileList(t))||i.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return tkr(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),Q41(t)):t}],transformResponse:[function(t){let r=this.transitional||Wps.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(os.isResponse(t)||os.isReadableStream(t))return t;if(t&&os.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(l){if(u)throw l.name==="SyntaxError"?yp.from(l,yp.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sT.classes.FormData,Blob:sT.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};os.forEach(["delete","get","head","post","put","patch"],e=>{Wps.headers[e]={}});var Run=Wps;var J41=os.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mFd=e=>{let t={},r,i,n;return e&&e.split(`
1688
1688
  `).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&J41[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var PFd=Symbol("internals");function XGn(e){return e&&String(e).trim().toLowerCase()}function zno(e){return e===!1||e==null?e:os.isArray(e)?e.map(zno):String(e)}function K41(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var Y41=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hps(e,t,r,i,n){if(os.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!os.isString(t)){if(os.isString(i))return t.indexOf(i)!==-1;if(os.isRegExp(i))return i.test(t)}}function X41(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function Z41(e,t){let r=os.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,a,u){return this[i].call(this,t,n,a,u)},configurable:!0})})}var Fun=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function a(l,f,s){let o=XGn(f);if(!o)throw new Error("header name must be a non-empty string");let c=os.findKey(n,o);(!c||n[c]===void 0||s===!0||s===void 0&&n[c]!==!1)&&(n[c||f]=zno(l))}let u=(l,f)=>os.forEach(l,(s,o)=>a(s,o,f));if(os.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(os.isString(t)&&(t=t.trim())&&!Y41(t))u(mFd(t),r);else if(os.isHeaders(t))for(let[l,f]of t.entries())a(f,l,i);else t!=null&&a(r,t,i);return this}get(t,r){if(t=XGn(t),t){let i=os.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return K41(n);if(os.isFunction(r))return r.call(this,n,i);if(os.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=XGn(t),t){let i=os.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Hps(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function a(u){if(u=XGn(u),u){let l=os.findKey(i,u);l&&(!r||Hps(i,i[l],l,r))&&(delete i[l],n=!0)}}return os.isArray(t)?t.forEach(a):a(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let a=r[i];(!t||Hps(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,i={};return os.forEach(this,(n,a)=>{let u=os.findKey(i,a);if(u){r[u]=zno(n),delete r[a];return}let l=t?X41(a):String(a).trim();l!==a&&delete r[a],r[l]=zno(n),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return os.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&os.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
1689
1689
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[PFd]=this[PFd]={accessors:{}}).accessors,n=this.prototype;function a(u){let l=XGn(u);i[l]||(Z41(n,u),i[l]=!0)}return os.isArray(t)?t.forEach(a):a(t),this}};Fun.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);os.reduceDescriptors(Fun.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});os.freezeMethods(Fun);var sI=Fun;function ZGn(e,t){let r=this||Run,i=t||r,n=sI.from(i.headers),a=i.data;return os.forEach(e,function(l){a=l.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function kGn(e){return!!(e&&e.__CANCEL__)}function jFd(e,t,r){yp.call(this,e??"canceled",yp.ERR_CANCELED,t,r),this.name="CanceledError"}os.inherits(jFd,yp,{__CANCEL__:!0});var hwe=jFd;function hGt(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new yp("Request failed with status code "+r.status,[yp.ERR_BAD_REQUEST,yp.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $ps(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gps(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qji(e,t){return e&&!$ps(t)?Gps(e,t):t}var NFd=Ei(BGn(),1),LFd=Ei(require("http"),1),UFd=Ei(require("https"),1),VFd=Ei(require("util"),1),WFd=Ei(Xds(),1),I4r=Ei(require("zlib"),1);var Jji="1.7.7";function eQn(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var k41=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Qps(e,t,r){let i=r&&r.Blob||sT.classes.Blob,n=eQn(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let a=k41.exec(e);if(!a)throw new yp("Invalid URL",yp.ERR_INVALID_URL);let u=a[1],l=a[2],f=a[3],s=Buffer.from(decodeURIComponent(f),l?"base64":"utf8");if(t){if(!i)throw new yp("Blob is not supported",yp.ERR_NOT_SUPPORT);return new i([s],{type:u})}return s}throw new yp("Unsupported protocol "+n,yp.ERR_NOT_SUPPORT)}var Kji=Ei(require("stream"),1);var wFd=Ei(require("stream"),1);var Jps=Symbol("internals"),Kps=class extends wFd.default.Transform{constructor(t){t=os.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,n)=>!os.isUndefined(n[i])),super({readableHighWaterMark:t.chunkSize});let r=this[Jps]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[Jps];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this[Jps],a=n.maxRate,u=this.readableHighWaterMark,l=n.timeWindow,f=1e3/l,s=a/f,o=n.minChunkSize!==!1?Math.max(n.minChunkSize,s*.01):0,c=(g,O)=>{let m=Buffer.byteLength(g);n.bytesSeen+=m,n.bytes+=m,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(g)?process.nextTick(O):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(O)}},b=(g,O)=>{let m=Buffer.byteLength(g),w=null,A=u,M,q=0;if(a){let D=Date.now();(!n.ts||(q=D-n.ts)>=l)&&(n.ts=D,M=s-n.bytes,n.bytes=M<0?-M:0,q=0),M=s-n.bytes}if(a){if(M<=0)return setTimeout(()=>{O(null,g)},l-q);M<A&&(A=M)}A&&m>A&&m-A>o&&(w=g.subarray(A),g=g.subarray(0,A)),c(g,w?()=>{process.nextTick(O,null,w)}:O)};b(t,function g(O,m){if(O)return i(O);m?b(m,g):i(null)})}},Yps=Kps;var HFd=require("events");var DFd=require("util"),EFd=require("stream");var{asyncIterator:SFd}=Symbol,e81=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[SFd]?yield*e[SFd]():yield e},Rno=e81;var t81=os.ALPHABET.ALPHA_DIGIT+"-_",tQn=new DFd.TextEncoder,rkr=`\r
1690
1690
  `,r81=tQn.encode(rkr),i81=2,Xps=class{constructor(t,r){let{escapeName:i}=this.constructor,n=os.isString(r),a=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${rkr}`;n?r=tQn.encode(String(r).replace(/\r?\n|\r\n?/g,rkr)):a+=`Content-Type: ${r.type||"application/octet-stream"}${rkr}`,this.headers=tQn.encode(a+rkr),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+i81,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;os.isTypedArray(t)?yield t:yield*Rno(t),yield r81}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},n81=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:a=i+"-"+os.generateString(n,t81)}=r||{};if(!os.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let u=tQn.encode("--"+a+rkr),l=tQn.encode("--"+a+"--"+rkr+rkr),f=l.byteLength,s=Array.from(e.entries()).map(([c,b])=>{let g=new Xps(c,b);return f+=g.size,g});f+=u.byteLength*s.length,f=os.toFiniteNumber(f);let o={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(f)&&(o["Content-Length"]=f),t&&t(o),EFd.Readable.from(async function*(){for(let c of s)yield u,yield*c.encode();yield l}())},AFd=n81;var MFd=Ei(require("stream"),1),Zps=class extends MFd.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},qFd=Zps;var a81=(e,t)=>os.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(a){i(a)}},i)}:e,TFd=a81;function o81(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,a=0,u;return t=t!==void 0?t:1e3,function(f){let s=Date.now(),o=i[a];u||(u=s),r[n]=f,i[n]=s;let c=a,b=0;for(;c!==n;)b+=r[c++],c=c%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),s-u<t)return;let g=o&&s-o;return g?Math.round(b*1e3/g):void 0}}var CFd=o81;function u81(e,t){let r=0,i=1e3/t,n,a,u=(s,o=Date.now())=>{r=o,n=null,a&&(clearTimeout(a),a=null),e.apply(null,s)};return[(...s)=>{let o=Date.now(),c=o-r;c>=i?u(s,o):(n=s,a||(a=setTimeout(()=>{a=null,u(n)},i-c)))},()=>n&&u(n)]}var BFd=u81;var x4r=(e,t,r=3)=>{let i=0,n=CFd(50,250);return BFd(a=>{let u=a.loaded,l=a.lengthComputable?a.total:void 0,f=u-i,s=n(f),o=u<=l;i=u;let c={loaded:u,total:l,progress:l?u/l:void 0,bytes:f,rate:s||void 0,estimated:s&&l&&o?(l-u)/s:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(c)},r)},Nun=(e,t)=>{let r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},Lun=e=>(...t)=>os.asap(()=>e(...t));var xFd={flush:I4r.default.constants.Z_SYNC_FLUSH,finishFlush:I4r.default.constants.Z_SYNC_FLUSH},s81={flush:I4r.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:I4r.default.constants.BROTLI_OPERATION_FLUSH},IFd=os.isFunction(I4r.default.createBrotliDecompress),{http:c81,https:l81}=WFd.default,f81=/https:?/,zFd=sT.protocols.map(e=>e+":"),RFd=(e,[t,r])=>(e.on("end",r).on("error",r),t);function d81(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function $Fd(e,t,r){let i=t;if(!i&&i!==!1){let n=(0,NFd.getProxyForUrl)(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let a=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+a}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(a){$Fd(a,t,a.href)}}var p81=typeof process<"u"&&os.kindOf(process)==="process",_81=e=>new Promise((t,r)=>{let i,n,a=(f,s)=>{n||(n=!0,i&&i(f,s))},u=f=>{a(f),t(f)},l=f=>{a(f,!0),r(f)};e(u,l,f=>i=f).catch(l)}),h81=({address:e,family:t})=>{if(!os.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},FFd=(e,t)=>h81(os.isObject(e)?e:{address:e,family:t}),GFd=p81&&function(t){return _81(async function(i,n,a){let{data:u,lookup:l,family:f}=t,{responseType:s,responseEncoding:o}=t,c=t.method.toUpperCase(),b,g=!1,O;if(l){let we=TFd(l,Xe=>os.isArray(Xe)?Xe:[Xe]);l=(Xe,Mt,De)=>{we(Xe,Mt,(Te,It,Ee)=>{if(Te)return De(Te);let St=os.isArray(It)?It.map(ut=>FFd(ut)):[FFd(It,Ee)];Mt.all?De(Te,St):De(Te,St[0].address,St[0].family)})}}let m=new HFd.EventEmitter,w=()=>{t.cancelToken&&t.cancelToken.unsubscribe(A),t.signal&&t.signal.removeEventListener("abort",A),m.removeAllListeners()};a((we,Xe)=>{b=!0,Xe&&(g=!0,w())});function A(we){m.emit("abort",!we||we.type?new hwe(null,t,O):we)}m.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(A),t.signal&&(t.signal.aborted?A():t.signal.addEventListener("abort",A)));let M=Qji(t.baseURL,t.url),q=new URL(M,sT.hasBrowserEnv?sT.origin:void 0),D=q.protocol||zFd[0];if(D==="data:"){let we;if(c!=="GET")return hGt(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{we=Qps(t.url,s==="blob",{Blob:t.env&&t.env.Blob})}catch(Xe){throw yp.from(Xe,yp.ERR_BAD_REQUEST,t)}return s==="text"?(we=we.toString(o),(!o||o==="utf8")&&(we=os.stripBOM(we))):s==="stream"&&(we=Kji.default.Readable.from(we)),hGt(i,n,{data:we,status:200,statusText:"OK",headers:new sI,config:t})}if(zFd.indexOf(D)===-1)return n(new yp("Unsupported protocol "+D,yp.ERR_BAD_REQUEST,t));let C=sI.from(t.headers).normalize();C.set("User-Agent","axios/"+Jji,!1);let{onUploadProgress:R,onDownloadProgress:$}=t,I=t.maxRate,U,H;if(os.isSpecCompliantForm(u)){let we=C.getContentType(/boundary=([-_\w\d]{10,70})/i);u=AFd(u,Xe=>{C.set(Xe)},{tag:`axios-${Jji}-boundary`,boundary:we&&we[1]||void 0})}else if(os.isFormData(u)&&os.isFunction(u.getHeaders)){if(C.set(u.getHeaders()),!C.hasContentLength())try{let we=await VFd.default.promisify(u.getLength).call(u);Number.isFinite(we)&&we>=0&&C.setContentLength(we)}catch{}}else if(os.isBlob(u))u.size&&C.setContentType(u.type||"application/octet-stream"),C.setContentLength(u.size||0),u=Kji.default.Readable.from(Rno(u));else if(u&&!os.isStream(u)){if(!Buffer.isBuffer(u))if(os.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(os.isString(u))u=Buffer.from(u,"utf-8");else return n(new yp("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",yp.ERR_BAD_REQUEST,t));if(C.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new yp("Request body larger than maxBodyLength limit",yp.ERR_BAD_REQUEST,t))}let te=os.toFiniteNumber(C.getContentLength());os.isArray(I)?(U=I[0],H=I[1]):U=H=I,u&&(R||U)&&(os.isStream(u)||(u=Kji.default.Readable.from(u,{objectMode:!1})),u=Kji.default.pipeline([u,new Yps({maxRate:os.toFiniteNumber(U)})],os.noop),R&&u.on("progress",RFd(u,Nun(te,x4r(Lun(R),!1,3)))));let J;if(t.auth){let we=t.auth.username||"",Xe=t.auth.password||"";J=we+":"+Xe}if(!J&&q.username){let we=q.username,Xe=q.password;J=we+":"+Xe}J&&C.delete("authorization");let ee;try{ee=Gji(q.pathname+q.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(we){let Xe=new Error(we.message);return Xe.config=t,Xe.url=t.url,Xe.exists=!0,n(Xe)}C.set("Accept-Encoding","gzip, compress, deflate"+(IFd?", br":""),!1);let fe={path:ee,method:c,headers:C.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:J,protocol:D,family:f,beforeRedirect:d81,beforeRedirects:{}};!os.isUndefined(l)&&(fe.lookup=l),t.socketPath?fe.socketPath=t.socketPath:(fe.hostname=q.hostname.startsWith("[")?q.hostname.slice(1,-1):q.hostname,fe.port=q.port,$Fd(fe,t.proxy,D+"//"+q.hostname+(q.port?":"+q.port:"")+fe.path));let me,ve=f81.test(fe.protocol);if(fe.agent=ve?t.httpsAgent:t.httpAgent,t.transport?me=t.transport:t.maxRedirects===0?me=ve?UFd.default:LFd.default:(t.maxRedirects&&(fe.maxRedirects=t.maxRedirects),t.beforeRedirect&&(fe.beforeRedirects.config=t.beforeRedirect),me=ve?l81:c81),t.maxBodyLength>-1?fe.maxBodyLength=t.maxBodyLength:fe.maxBodyLength=1/0,t.insecureHTTPParser&&(fe.insecureHTTPParser=t.insecureHTTPParser),O=me.request(fe,function(Xe){if(O.destroyed)return;let Mt=[Xe],De=+Xe.headers["content-length"];if($||H){let ut=new Yps({maxRate:os.toFiniteNumber(H)});$&&ut.on("progress",RFd(ut,Nun(De,x4r(Lun($),!0,3)))),Mt.push(ut)}let Te=Xe,It=Xe.req||O;if(t.decompress!==!1&&Xe.headers["content-encoding"])switch((c==="HEAD"||Xe.statusCode===204)&&delete Xe.headers["content-encoding"],(Xe.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Mt.push(I4r.default.createUnzip(xFd)),delete Xe.headers["content-encoding"];break;case"deflate":Mt.push(new qFd),Mt.push(I4r.default.createUnzip(xFd)),delete Xe.headers["content-encoding"];break;case"br":IFd&&(Mt.push(I4r.default.createBrotliDecompress(s81)),delete Xe.headers["content-encoding"])}Te=Mt.length>1?Kji.default.pipeline(Mt,os.noop):Mt[0];let Ee=Kji.default.finished(Te,()=>{Ee(),w()}),St={status:Xe.statusCode,statusText:Xe.statusMessage,headers:new sI(Xe.headers),config:t,request:It};if(s==="stream")St.data=Te,hGt(i,n,St);else{let ut=[],ge=0;Te.on("data",function(wt){ut.push(wt),ge+=wt.length,t.maxContentLength>-1&&ge>t.maxContentLength&&(g=!0,Te.destroy(),n(new yp("maxContentLength size of "+t.maxContentLength+" exceeded",yp.ERR_BAD_RESPONSE,t,It)))}),Te.on("aborted",function(){if(g)return;let wt=new yp("maxContentLength size of "+t.maxContentLength+" exceeded",yp.ERR_BAD_RESPONSE,t,It);Te.destroy(wt),n(wt)}),Te.on("error",function(wt){O.destroyed||n(yp.from(wt,null,t,It))}),Te.on("end",function(){try{let wt=ut.length===1?ut[0]:Buffer.concat(ut);s!=="arraybuffer"&&(wt=wt.toString(o),(!o||o==="utf8")&&(wt=os.stripBOM(wt))),St.data=wt}catch(wt){return n(yp.from(wt,null,t,St.request,St))}hGt(i,n,St)})}m.once("abort",ut=>{Te.destroyed||(Te.emit("error",ut),Te.destroy())})}),m.once("abort",we=>{n(we),O.destroy(we)}),O.on("error",function(Xe){n(yp.from(Xe,null,t,O))}),O.on("socket",function(Xe){Xe.setKeepAlive(!0,1e3*60)}),t.timeout){let we=parseInt(t.timeout,10);if(Number.isNaN(we)){n(new yp("error trying to parse `config.timeout` to int",yp.ERR_BAD_OPTION_VALUE,t,O));return}O.setTimeout(we,function(){if(b)return;let Mt=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",De=t.transitional||zun;t.timeoutErrorMessage&&(Mt=t.timeoutErrorMessage),n(new yp(Mt,De.clarifyTimeoutError?yp.ETIMEDOUT:yp.ECONNABORTED,t,O)),A()})}if(os.isStream(u)){let we=!1,Xe=!1;u.on("end",()=>{we=!0}),u.once("error",Mt=>{Xe=!0,O.destroy(Mt)}),u.on("close",()=>{!we&&!Xe&&A(new hwe("Request stream has been aborted",t,O))}),u.pipe(O)}else O.end(u)})};var QFd=sT.hasStandardBrowserEnv?function(){let t=sT.navigator&&/(msie|trident)/i.test(sT.navigator.userAgent),r=document.createElement("a"),i;function n(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(u){let l=os.isString(u)?n(u):u;return l.protocol===i.protocol&&l.host===i.host}}():function(){return function(){return!0}}();var JFd=sT.hasStandardBrowserEnv?{write(e,t,r,i,n,a){let u=[e+"="+encodeURIComponent(t)];os.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),os.isString(i)&&u.push("path="+i),os.isString(n)&&u.push("domain="+n),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var KFd=e=>e instanceof sI?{...e}:e;function o2t(e,t){t=t||{};let r={};function i(s,o,c){return os.isPlainObject(s)&&os.isPlainObject(o)?os.merge.call({caseless:c},s,o):os.isPlainObject(o)?os.merge({},o):os.isArray(o)?o.slice():o}function n(s,o,c){if(os.isUndefined(o)){if(!os.isUndefined(s))return i(void 0,s,c)}else return i(s,o,c)}function a(s,o){if(!os.isUndefined(o))return i(void 0,o)}function u(s,o){if(os.isUndefined(o)){if(!os.isUndefined(s))return i(void 0,s)}else return i(void 0,o)}function l(s,o,c){if(c in t)return i(s,o);if(c in e)return i(void 0,s)}let f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:l,headers:(s,o)=>n(KFd(s),KFd(o),!0)};return os.forEach(Object.keys(Object.assign({},e,t)),function(o){let c=f[o]||n,b=c(e[o],t[o],o);os.isUndefined(b)&&c!==l||(r[o]=b)}),r}var Fno=e=>{let t=o2t({},e),{data:r,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:a,headers:u,auth:l}=t;t.headers=u=sI.from(u),t.url=Gji(Qji(t.baseURL,t.url),e.params,e.paramsSerializer),l&&u.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let f;if(os.isFormData(r)){if(sT.hasStandardBrowserEnv||sT.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((f=u.getContentType())!==!1){let[s,...o]=f?f.split(";").map(c=>c.trim()).filter(Boolean):[];u.setContentType([s||"multipart/form-data",...o].join("; "))}}if(sT.hasStandardBrowserEnv&&(i&&os.isFunction(i)&&(i=i(t)),i||i!==!1&&QFd(t.url))){let s=n&&a&&JFd.read(a);s&&u.set(n,s)}return t};var y81=typeof XMLHttpRequest<"u",YFd=y81&&function(e){return new Promise(function(r,i){let n=Fno(e),a=n.data,u=sI.from(n.headers).normalize(),{responseType:l,onUploadProgress:f,onDownloadProgress:s}=n,o,c,b,g,O;function m(){g&&g(),O&&O(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let w=new XMLHttpRequest;w.open(n.method.toUpperCase(),n.url,!0),w.timeout=n.timeout;function A(){if(!w)return;let q=sI.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:q,config:e,request:w};hGt(function($){r($),m()},function($){i($),m()},C),w=null}"onloadend"in w?w.onloadend=A:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(A)},w.onabort=function(){w&&(i(new yp("Request aborted",yp.ECONNABORTED,e,w)),w=null)},w.onerror=function(){i(new yp("Network Error",yp.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let D=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",C=n.transitional||zun;n.timeoutErrorMessage&&(D=n.timeoutErrorMessage),i(new yp(D,C.clarifyTimeoutError?yp.ETIMEDOUT:yp.ECONNABORTED,e,w)),w=null},a===void 0&&u.setContentType(null),"setRequestHeader"in w&&os.forEach(u.toJSON(),function(D,C){w.setRequestHeader(C,D)}),os.isUndefined(n.withCredentials)||(w.withCredentials=!!n.withCredentials),l&&l!=="json"&&(w.responseType=n.responseType),s&&([b,O]=x4r(s,!0),w.addEventListener("progress",b)),f&&w.upload&&([c,g]=x4r(f),w.upload.addEventListener("progress",c),w.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(o=q=>{w&&(i(!q||q.type?new hwe(null,e,w):q),w.abort(),w=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));let M=eQn(n.url);if(M&&sT.protocols.indexOf(M)===-1){i(new yp("Unsupported protocol "+M+":",yp.ERR_BAD_REQUEST,e));return}w.send(a||null)})};var v81=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,n,a=function(s){if(!n){n=!0,l();let o=s instanceof Error?s:this.reason;i.abort(o instanceof yp?o:new hwe(o instanceof Error?o.message:o))}},u=t&&setTimeout(()=>{u=null,a(new yp(`timeout ${t} of ms exceeded`,yp.ETIMEDOUT))},t),l=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(a):s.removeEventListener("abort",a)}),e=null)};e.forEach(s=>s.addEventListener("abort",a));let{signal:f}=i;return f.unsubscribe=()=>os.asap(l),f}},XFd=v81;var b81=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let i=0,n;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},g81=async function*(e,t){for await(let r of O81(e))yield*b81(r,t)},O81=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:i}=await t.read();if(r)break;yield i}}finally{await t.cancel()}},kps=(e,t,r,i)=>{let n=g81(e,t),a=0,u,l=f=>{u||(u=!0,i&&i(f))};return new ReadableStream({async pull(f){try{let{done:s,value:o}=await n.next();if(s){l(),f.close();return}let c=o.byteLength;if(r){let b=a+=c;r(b)}f.enqueue(new Uint8Array(o))}catch(s){throw l(s),s}},cancel(f){return l(f),n.return()}},{highWaterMark:2})};var Lno=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kFd=Lno&&typeof ReadableStream=="function",m81=Lno&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),eNd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},P81=kFd&&eNd(()=>{let e=!1,t=new Request(sT.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ZFd=64*1024,e_s=kFd&&eNd(()=>os.isReadableStream(new Response("").body)),Nno={stream:e_s&&(e=>e.body)};Lno&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Nno[t]&&(Nno[t]=os.isFunction(e[t])?r=>r[t]():(r,i)=>{throw new yp(`Response type '${t}' is not supported`,yp.ERR_NOT_SUPPORT,i)})})})(new Response);var j81=async e=>{if(e==null)return 0;if(os.isBlob(e))return e.size;if(os.isSpecCompliantForm(e))return(await new Request(sT.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(os.isArrayBufferView(e)||os.isArrayBuffer(e))return e.byteLength;if(os.isURLSearchParams(e)&&(e=e+""),os.isString(e))return(await m81(e)).byteLength},w81=async(e,t)=>{let r=os.toFiniteNumber(e.getContentLength());return r??j81(t)},tNd=Lno&&(async e=>{let{url:t,method:r,data:i,signal:n,cancelToken:a,timeout:u,onDownloadProgress:l,onUploadProgress:f,responseType:s,headers:o,withCredentials:c="same-origin",fetchOptions:b}=Fno(e);s=s?(s+"").toLowerCase():"text";let g=XFd([n,a&&a.toAbortSignal()],u),O,m=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),w;try{if(f&&P81&&r!=="get"&&r!=="head"&&(w=await w81(o,i))!==0){let C=new Request(t,{method:"POST",body:i,duplex:"half"}),R;if(os.isFormData(i)&&(R=C.headers.get("content-type"))&&o.setContentType(R),C.body){let[$,I]=Nun(w,x4r(Lun(f)));i=kps(C.body,ZFd,$,I)}}os.isString(c)||(c=c?"include":"omit");let A="credentials"in Request.prototype;O=new Request(t,{...b,signal:g,method:r.toUpperCase(),headers:o.normalize().toJSON(),body:i,duplex:"half",credentials:A?c:void 0});let M=await fetch(O),q=e_s&&(s==="stream"||s==="response");if(e_s&&(l||q&&m)){let C={};["status","statusText","headers"].forEach(U=>{C[U]=M[U]});let R=os.toFiniteNumber(M.headers.get("content-length")),[$,I]=l&&Nun(R,x4r(Lun(l),!0))||[];M=new Response(kps(M.body,ZFd,$,()=>{I&&I(),m&&m()}),C)}s=s||"text";let D=await Nno[os.findKey(Nno,s)||"text"](M,e);return!q&&m&&m(),await new Promise((C,R)=>{hGt(C,R,{data:D,headers:sI.from(M.headers),status:M.status,statusText:M.statusText,config:e,request:O})})}catch(A){throw m&&m(),A&&A.name==="TypeError"&&/fetch/i.test(A.message)?Object.assign(new yp("Network Error",yp.ERR_NETWORK,e,O),{cause:A.cause||A}):yp.from(A,A&&A.code,e,O)}});var t_s={http:GFd,xhr:YFd,fetch:tNd};os.forEach(t_s,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var rNd=e=>`- ${e}`,S81=e=>os.isFunction(e)||e===null||e===!1,Uno={getAdapter:e=>{e=os.isArray(e)?e:[e];let{length:t}=e,r,i,n={};for(let a=0;a<t;a++){r=e[a];let u;if(i=r,!S81(r)&&(i=t_s[(u=String(r)).toLowerCase()],i===void 0))throw new yp(`Unknown adapter '${u}'`);if(i)break;n[u||"#"+a]=i}if(!i){let a=Object.entries(n).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
@@ -1882,7 +1882,7 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
1882
1882
  `,"")),VP}),n.push(...e.children.filter(l=>!!(l.type==="element"&&Array.isArray(l.properties.className)&&(l.properties.className.includes("tab")||l.properties.className.includes("Tab")||l.properties.className.includes("tabbed-content")||l.properties.className.includes("tab-content")))));else{let l=e.children[0];Ff(l,"element",function(f){Ff(f,"text",function(s){return i.push(s.value),VP})}),e.children.shift(),e.children[0].type==="element"&&n.push(...e.children[0].children)}let a=[];return n.forEach((l,f)=>{if(!i[f])return;let s=ZGt([l]);a.push({type:"element",tagName:"Tab",properties:{title:i[f]},children:s})}),{type:"element",tagName:"Tabs",properties:{},children:a}}function j8r(e){return function(t){return Ff(t,"element",function(r,i,n){if(r.tagName==="code"||r.tagName==="pre")return u2t;let a;return a=e(r,i,n),a?n&&typeof i=="number"?(n.children[i]=a,u2t):e_:e_})}}function Onp(){return j8r(_np)}function mnp(){return j8r(vnp)}function Pnp(){return j8r(fnp)}function jnp(){return j8r(dnp)}function wnp(){return j8r(bnp)}function Snp(){return j8r(ynp)}function Dnp(){return j8r(gnp)}function Enp(){return j8r(pnp)}function Anp(){return j8r(hnp)}function Mnp(){return function(e){return Ff(e,"element",function(t,r,i){if(msn.includes(t.tagName)){let n={type:"mdxJsxFlowElement",name:t.tagName,attributes:Object.entries(t.properties||{}).map(([a,u])=>({type:"mdxJsxAttribute",name:a,value:u})),children:t.children};i&&typeof r=="number"&&(i.children[r]=n)}}),e}}async function qnp(e,t){t=new URL(t);let r=[];Ff(e,function(a){let u;return a.type==="image"?u=a.url:a.type==="mdxJsxFlowElement"&&(u=a.attributes.find(l=>l.type==="mdxJsxAttribute"&&(l.name==="src"||l.name==="img"))?.value),u?(u.startsWith("/")&&(u=new URL(u,t.origin).toString()),r.push(u),e_):e_});let i=await Promise.all(r.map(async a=>await efn(a))),n=new Map(i.filter(a=>a.success).map(a=>a.data));return Ff(e,function(a,u,l){if(a.type==="image")a.url.startsWith("/")?a.url=n.get(new URL(a.url,t.origin).toString())??a.url:a.url=n.get(a.url)??a.url,l&&typeof u=="number"&&(l.children[u]=a);else if(a.type==="mdxJsxFlowElement"){let f=a.attributes.find(s=>s.type==="mdxJsxAttribute"&&(s.name==="src"||s.name==="img"));if(!f)return e_;f.value=n.get(f.value)??f.value,l&&typeof u=="number"&&(l.children[u]=a)}return e_}),i}function Tnp(e){let t;return Ff(e,"element",function(r){if(r.tagName==="article")if(r.properties.className&&Array.isArray(r.properties.className)&&r.properties.className.includes("rm-Article"))t=r;else return VP;return e_}),t}var w8r=class{constructor(t,r,i){this.property=t,this.normal=r,i&&(this.space=i)}};w8r.prototype.property={};w8r.prototype.normal={};w8r.prototype.space=null;function Nws(e,t){let r={},i={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(i,e[n].normal);return new w8r(r,i,t)}function S8r(e){return e.toLowerCase()}var TH=class{constructor(t,r){this.property=t,this.attribute=r}};TH.prototype.space=null;TH.prototype.boolean=!1;TH.prototype.booleanish=!1;TH.prototype.overloadedBoolean=!1;TH.prototype.number=!1;TH.prototype.commaSeparated=!1;TH.prototype.spaceSeparated=!1;TH.prototype.commaOrSpaceSeparated=!1;TH.prototype.mustUseProperty=!1;TH.prototype.defined=!1;var AXn={};Ro(AXn,{boolean:()=>OO,booleanish:()=>Uz,commaOrSpaceSeparated:()=>qte,commaSeparated:()=>gei,number:()=>td,overloadedBoolean:()=>Lws,spaceSeparated:()=>YM});var cgS=0,OO=N1i(),Uz=N1i(),Lws=N1i(),td=N1i(),YM=N1i(),gei=N1i(),qte=N1i();function N1i(){return 2**++cgS}var Uws=Object.keys(AXn),L1i=class extends TH{constructor(t,r,i,n){let a=-1;if(super(t,r),Cnp(this,"space",n),typeof i=="number")for(;++a<Uws.length;){let u=Uws[a];Cnp(this,Uws[a],(i&AXn[u])===AXn[u])}}};L1i.prototype.defined=!0;function Cnp(e,t,r){r&&(e[t]=r)}var lgS={}.hasOwnProperty;function BBe(e){let t={},r={},i;for(i in e.properties)if(lgS.call(e.properties,i)){let n=e.properties[i],a=new L1i(i,e.transform(e.attributes||{},i),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,r[S8r(i)]=i,r[S8r(a.attribute)]=i}return new w8r(t,r,e.space)}var Vws=BBe({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Wws=BBe({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function kdo(e,t){return t in e?e[t]:t}function epo(e,t){return kdo(e,t.toLowerCase())}var Hws=BBe({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:epo,properties:{xmlns:null,xmlnsXLink:null}});var $ws=BBe({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Uz,ariaAutoComplete:null,ariaBusy:Uz,ariaChecked:Uz,ariaColCount:td,ariaColIndex:td,ariaColSpan:td,ariaControls:YM,ariaCurrent:null,ariaDescribedBy:YM,ariaDetails:null,ariaDisabled:Uz,ariaDropEffect:YM,ariaErrorMessage:null,ariaExpanded:Uz,ariaFlowTo:YM,ariaGrabbed:Uz,ariaHasPopup:null,ariaHidden:Uz,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:YM,ariaLevel:td,ariaLive:null,ariaModal:Uz,ariaMultiLine:Uz,ariaMultiSelectable:Uz,ariaOrientation:null,ariaOwns:YM,ariaPlaceholder:null,ariaPosInSet:td,ariaPressed:Uz,ariaReadOnly:Uz,ariaRelevant:null,ariaRequired:Uz,ariaRoleDescription:YM,ariaRowCount:td,ariaRowIndex:td,ariaRowSpan:td,ariaSelected:Uz,ariaSetSize:td,ariaSort:null,ariaValueMax:td,ariaValueMin:td,ariaValueNow:td,ariaValueText:null,role:null}});var Bnp=BBe({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:epo,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gei,acceptCharset:YM,accessKey:YM,action:null,allow:null,allowFullScreen:OO,allowPaymentRequest:OO,allowUserMedia:OO,alt:null,as:null,async:OO,autoCapitalize:null,autoComplete:YM,autoFocus:OO,autoPlay:OO,blocking:YM,capture:OO,charSet:null,checked:OO,cite:null,className:YM,cols:td,colSpan:null,content:null,contentEditable:Uz,controls:OO,controlsList:YM,coords:td|gei,crossOrigin:null,data:null,dateTime:null,decoding:null,default:OO,defer:OO,dir:null,dirName:null,disabled:OO,download:Lws,draggable:Uz,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:OO,formTarget:null,headers:YM,height:td,hidden:OO,high:td,href:null,hrefLang:null,htmlFor:YM,httpEquiv:YM,id:null,imageSizes:null,imageSrcSet:null,inert:OO,inputMode:null,integrity:null,is:null,isMap:OO,itemId:null,itemProp:YM,itemRef:YM,itemScope:OO,itemType:YM,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:OO,low:td,manifest:null,max:null,maxLength:td,media:null,method:null,min:null,minLength:td,multiple:OO,muted:OO,name:null,nonce:null,noModule:OO,noValidate:OO,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:OO,optimum:td,pattern:null,ping:YM,placeholder:null,playsInline:OO,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:OO,referrerPolicy:null,rel:YM,required:OO,reversed:OO,rows:td,rowSpan:td,sandbox:YM,scope:null,scoped:OO,seamless:OO,selected:OO,shape:null,size:td,sizes:null,slot:null,span:td,spellCheck:Uz,src:null,srcDoc:null,srcLang:null,srcSet:null,start:td,step:null,style:null,tabIndex:td,target:null,title:null,translate:null,type:null,typeMustMatch:OO,useMap:null,value:Uz,width:td,wrap:null,align:null,aLink:null,archive:YM,axis:null,background:null,bgColor:null,border:td,borderColor:null,bottomMargin:td,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:OO,declare:OO,event:null,face:null,frame:null,frameBorder:null,hSpace:td,leftMargin:td,link:null,longDesc:null,lowSrc:null,marginHeight:td,marginWidth:td,noResize:OO,noHref:OO,noShade:OO,noWrap:OO,object:null,profile:null,prompt:null,rev:null,rightMargin:td,rules:null,scheme:null,scrolling:Uz,standby:null,summary:null,text:null,topMargin:td,valueType:null,version:null,vAlign:null,vLink:null,vSpace:td,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:OO,disableRemotePlayback:OO,prefix:null,property:null,results:td,security:null,unselectable:null}});var xnp=BBe({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:kdo,properties:{about:qte,accentHeight:td,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:td,amplitude:td,arabicForm:null,ascent:td,attributeName:null,attributeType:null,azimuth:td,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:td,by:null,calcMode:null,capHeight:td,className:YM,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:td,diffuseConstant:td,direction:null,display:null,dur:null,divisor:td,dominantBaseline:null,download:OO,dx:null,dy:null,edgeMode:null,editable:null,elevation:td,enableBackground:null,end:null,event:null,exponent:td,externalResourcesRequired:null,fill:null,fillOpacity:td,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gei,g2:gei,glyphName:gei,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:td,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:td,horizOriginX:td,horizOriginY:td,id:null,ideographic:td,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:td,k:td,k1:td,k2:td,k3:td,k4:td,kernelMatrix:qte,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:td,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:td,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:td,overlineThickness:td,paintOrder:null,panose1:null,path:null,pathLength:td,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:YM,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:td,pointsAtY:td,pointsAtZ:td,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qte,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qte,rev:qte,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qte,requiredFeatures:qte,requiredFonts:qte,requiredFormats:qte,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:td,specularExponent:td,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:td,strikethroughThickness:td,string:null,stroke:null,strokeDashArray:qte,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:td,strokeOpacity:td,strokeWidth:null,style:null,surfaceScale:td,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qte,tabIndex:td,tableValues:null,target:null,targetX:td,targetY:td,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qte,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:td,underlineThickness:td,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:td,values:null,vAlphabetic:td,vMathematical:td,vectorEffect:null,vHanging:td,vIdeographic:td,version:null,vertAdvY:td,vertOriginX:td,vertOriginY:td,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:td,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var fgS=/^data[-\w.:]+$/i,Inp=/-[a-z]/g,dgS=/[A-Z]/g;function MXn(e,t){let r=S8r(t),i=t,n=TH;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&fgS.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(Inp,_gS);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!Inp.test(a)){let u=a.replace(dgS,pgS);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}n=L1i}return new n(i,t)}function pgS(e){return"-"+e.toLowerCase()}function _gS(e){return e.charAt(1).toUpperCase()}var qXn=Nws([Wws,Vws,Hws,$ws,Bnp],"html"),TXn=Nws([Wws,Vws,Hws,$ws,xnp],"svg");function Gws(e){let t=[],r=String(e||""),i=r.indexOf(","),n=0,a=!1;for(;!a;){i===-1&&(i=r.length,a=!0);let u=r.slice(n,i).trim();(u||!a)&&t.push(u),n=i+1,i=r.indexOf(",",n)}return t}var znp=/[#.]/g;function Qws(e,t){let r=e||"",i={},n=0,a,u;for(;n<r.length;){znp.lastIndex=n;let l=znp.exec(r),f=r.slice(n,l?l.index:r.length);f&&(a?a==="#"?i.id=f:Array.isArray(i.className)?i.className.push(f):i.className=[f]:u=f,n+=f.length),l&&(a=l[0],n++)}return{type:"element",tagName:u||t||"div",properties:i,children:[]}}function Jws(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}var hgS=new Set(["button","menu","reset","submit"]),Kws={}.hasOwnProperty;function Xws(e,t,r){let i=r&&ggS(r);function n(a,u,...l){let f=-1,s;if(a==null){s={type:"root",children:[]};let o=u;l.unshift(o)}else if(s=Qws(a,t),s.tagName=s.tagName.toLowerCase(),i&&Kws.call(i,s.tagName)&&(s.tagName=i[s.tagName]),ygS(u,s.tagName)){let o;for(o in u)Kws.call(u,o)&&vgS(e,s.properties,o,u[o])}else l.unshift(u);for(;++f<l.length;)Yws(s.children,l[f]);return s.type==="element"&&s.tagName==="template"&&(s.content={type:"root",children:s.children},s.children=[]),s}return n}function ygS(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?hgS.has(e.type.toLowerCase()):!("value"in e)}function vgS(e,t,r,i){let n=MXn(e,r),a=-1,u;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;u=i}else typeof i=="boolean"?u=i:typeof i=="string"?n.spaceSeparated?u=Jws(i):n.commaSeparated?u=Gws(i):n.commaOrSpaceSeparated?u=Jws(Gws(i).join(" ")):u=Rnp(n,n.property,i):Array.isArray(i)?u=i.concat():u=n.property==="style"?bgS(i):String(i);if(Array.isArray(u)){let l=[];for(;++a<u.length;){let f=Rnp(n,n.property,u[a]);l[a]=f}u=l}if(n.property==="className"&&Array.isArray(t.className)){let l=u;u=t.className.concat(l)}t[n.property]=u}}function Yws(e,t){let r=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++r<t.length;)Yws(e,t[r]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Yws(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Rnp(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||S8r(r)===S8r(t)))return!0}return r}function bgS(e){let t=[],r;for(r in e)Kws.call(e,r)&&t.push([r,e[r]].join(": "));return t.join("; ")}function ggS(e){let t={},r=-1;for(;++r<e.length;)t[e[r].toLowerCase()]=e[r];return t}var Fnp=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var Zws=Xws(qXn,"div"),kws=Xws(TXn,"g",Fnp);function e1s(e){let t=String(e),r=[];return{toOffset:n,toPoint:i};function i(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=r[u];if(l===void 0){let f=Nnp(t,r[u-1]);l=f===-1?t.length+1:f+1,r[u]=l}if(l>a)return{line:u+1,column:a-(u>0?r[u-1]:0)+1,offset:a};u++}}}function n(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){let l=r[r.length-1],f=Nnp(t,l),s=f===-1?t.length+1:f+1;if(l===s)break;r.push(s)}let u=(a.line>1?r[a.line-2]:0)+a.column-1;if(u<r[a.line-1])return u}}}function Nnp(e,t){let r=e.indexOf("\r",t),i=e.indexOf(`
1883
1883
  `,t);return i===-1?r:r===-1||r+1===i?i:r<i?r:i}var Lnp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var Vnp={}.hasOwnProperty,OgS=Object.prototype;function t1s(e,t){let r=t||{};return r1s({file:r.file||void 0,location:!1,schema:r.space==="svg"?TXn:qXn,verbose:r.verbose||!1},e)}function r1s(e,t){let r;switch(t.nodeName){case"#comment":{let i=t;return r={type:"comment",value:i.data},tpo(e,i,r),r}case"#document":case"#document-fragment":{let i=t,n="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(r={type:"root",children:Wnp(e,t.childNodes),data:{quirksMode:n}},e.file&&e.location){let a=String(e.file),u=e1s(a),l=u.toPoint(0),f=u.toPoint(a.length);r.position={start:l,end:f}}return r}case"#documentType":{let i=t;return r={type:"doctype"},tpo(e,i,r),r}case"#text":{let i=t;return r={type:"text",value:i.value},tpo(e,i,r),r}default:return r=mgS(e,t),r}}function Wnp(e,t){let r=-1,i=[];for(;++r<t.length;){let n=r1s(e,t[r]);i.push(n)}return i}function mgS(e,t){let r=e.schema;e.schema=t.namespaceURI===Lnp.svg?TXn:qXn;let i=-1,n={};for(;++i<t.attrs.length;){let l=t.attrs[i],f=(l.prefix?l.prefix+":":"")+l.name;Vnp.call(OgS,f)||(n[f]=l.value)}let u=(e.schema.space==="svg"?kws:Zws)(t.tagName,n,Wnp(e,t.childNodes));if(tpo(e,t,u),u.tagName==="template"){let l=t,f=l.sourceCodeLocation,s=f&&f.startTag&&bfn(f.startTag),o=f&&f.endTag&&bfn(f.endTag),c=r1s(e,l.content);s&&o&&e.file&&(c.position={start:s.end,end:o.start}),u.content=c}return e.schema=r,u}function tpo(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let i=PgS(e,r,t.sourceCodeLocation);i&&(e.location=!0,r.position=i)}}function PgS(e,t,r){let i=bfn(r);if(t.type==="element"){let n=t.children[t.children.length-1];if(i&&!r.endTag&&n&&n.position&&n.position.end&&(i.end=Object.assign({},n.position.end)),e.verbose){let a={},u;if(r.attrs)for(u in r.attrs)Vnp.call(r.attrs,u)&&(a[MXn(e.schema,u).property]=bfn(r.attrs[u]));r.startTag;let l=bfn(r.startTag),f=r.endTag?bfn(r.endTag):void 0,s={opening:l};f&&(s.closing=f),s.properties=a,t.data={position:s}}}return i}function bfn(e){let t=Unp({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=Unp({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function Unp(e){return e.line&&e.column?e:void 0}var jgS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),QT="\uFFFD",Da;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(Da=Da||(Da={}));var fK={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function rpo(e){return e>=55296&&e<=57343}function Hnp(e){return e>=56320&&e<=57343}function $np(e,t){return(e-55296)*1024+9216+t}function ipo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function npo(e){return e>=64976&&e<=65007||jgS.has(e)}var Tc;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Tc=Tc||(Tc={}));var SgS=65536,apo=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=SgS,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t){let{line:r,col:i,offset:n}=this;return{code:t,startLine:r,endLine:r,startCol:i,endCol:i,startOffset:n,endOffset:n}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let r=this.html.charCodeAt(this.pos+1);if(Hnp(r))return this.pos++,this._addGap(),$np(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Da.EOF;return this._err(Tc.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){let r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Da.EOF;let i=this.html.charCodeAt(r);return i===Da.CARRIAGE_RETURN?Da.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Da.EOF;let t=this.html.charCodeAt(this.pos);return t===Da.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Da.LINE_FEED):t===Da.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,rpo(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===Da.LINE_FEED||t===Da.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ipo(t)?this._err(Tc.controlCharacterInInputStream):npo(t)&&this._err(Tc.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var oS;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(oS=oS||(oS={}));function opo(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var kGt=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var Gnp=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var i1s,EgS=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),n1s=(i1s=String.fromCodePoint)!==null&&i1s!==void 0?i1s:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function a1s(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=EgS.get(e))!==null&&t!==void 0?t:e}var X4;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(X4||(X4={}));var AgS=32,x2t;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(x2t||(x2t={}));function o1s(e){return e>=X4.ZERO&&e<=X4.NINE}function MgS(e){return e>=X4.UPPER_A&&e<=X4.UPPER_F||e>=X4.LOWER_A&&e<=X4.LOWER_F}function qgS(e){return e>=X4.UPPER_A&&e<=X4.UPPER_Z||e>=X4.LOWER_A&&e<=X4.LOWER_Z||o1s(e)}function TgS(e){return e===X4.EQUALS||qgS(e)}var Y4;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Y4||(Y4={}));var U1i;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(U1i||(U1i={}));var u1s=class{constructor(t,r,i){this.decodeTree=t,this.emitCodePoint=r,this.errors=i,this.state=Y4.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=U1i.Strict}startEntity(t){this.decodeMode=t,this.state=Y4.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Y4.EntityStart:return t.charCodeAt(r)===X4.NUM?(this.state=Y4.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Y4.NamedEntity,this.stateNamedEntity(t,r));case Y4.NumericStart:return this.stateNumericStart(t,r);case Y4.NumericDecimal:return this.stateNumericDecimal(t,r);case Y4.NumericHex:return this.stateNumericHex(t,r);case Y4.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|AgS)===X4.LOWER_X?(this.state=Y4.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Y4.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,i,n){if(r!==i){let a=i-r;this.result=this.result*Math.pow(n,a)+parseInt(t.substr(r,a),n),this.consumed+=a}}stateNumericHex(t,r){let i=r;for(;r<t.length;){let n=t.charCodeAt(r);if(o1s(n)||MgS(n))r+=1;else return this.addToNumericResult(t,i,r,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,r,16),-1}stateNumericDecimal(t,r){let i=r;for(;r<t.length;){let n=t.charCodeAt(r);if(o1s(n))r+=1;else return this.addToNumericResult(t,i,r,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,r,10),-1}emitNumericEntity(t,r){var i;if(this.consumed<=r)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===X4.SEMI)this.consumed+=1;else if(this.decodeMode===U1i.Strict)return 0;return this.emitCodePoint(a1s(this.result),this.consumed),this.errors&&(t!==X4.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){let{decodeTree:i}=this,n=i[this.treeIndex],a=(n&x2t.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){let u=t.charCodeAt(r);if(this.treeIndex=s1s(i,n,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===U1i.Attribute&&(a===0||TgS(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],a=(n&x2t.VALUE_LENGTH)>>14,a!==0){if(u===X4.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==U1i.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:i}=this,n=(i[r]&x2t.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,i){let{decodeTree:n}=this;return this.emitCodePoint(r===1?n[t]&~x2t.VALUE_LENGTH:n[t+1],i),r===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case Y4.NamedEntity:return this.result!==0&&(this.decodeMode!==U1i.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Y4.NumericDecimal:return this.emitNumericEntity(0,2);case Y4.NumericHex:return this.emitNumericEntity(0,3);case Y4.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Y4.EntityStart:return 0}}};function Qnp(e){let t="",r=new u1s(e,i=>t+=n1s(i));return function(n,a){let u=0,l=0;for(;(l=n.indexOf("&",l))>=0;){t+=n.slice(u,l),r.startEntity(a);let s=r.write(n,l+1);if(s<0){u=l+r.end();break}u=l+s,l=s===0?u+1:u}let f=t+n.slice(u);return t="",f}}function s1s(e,t,r,i){let n=(t&x2t.BRANCH_LENGTH)>>7,a=t&x2t.JUMP_TABLE;if(n===0)return a!==0&&i===a?r:-1;if(a){let f=i-a;return f<0||f>=n?-1:e[r+f]-1}let u=r,l=u+n-1;for(;u<=l;){let f=u+l>>>1,s=e[f];if(s<i)u=f+1;else if(s>i)l=f-1;else return e[f+n]}return-1}var bL7=Qnp(kGt),gL7=Qnp(Gnp);var Sl;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(Sl=Sl||(Sl={}));var eQt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(eQt=eQt||(eQt={}));var CH;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(CH=CH||(CH={}));var Ws;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Ws=Ws||(Ws={}));var vt;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"})(vt=vt||(vt={}));var CgS=new Map([[Ws.A,vt.A],[Ws.ADDRESS,vt.ADDRESS],[Ws.ANNOTATION_XML,vt.ANNOTATION_XML],[Ws.APPLET,vt.APPLET],[Ws.AREA,vt.AREA],[Ws.ARTICLE,vt.ARTICLE],[Ws.ASIDE,vt.ASIDE],[Ws.B,vt.B],[Ws.BASE,vt.BASE],[Ws.BASEFONT,vt.BASEFONT],[Ws.BGSOUND,vt.BGSOUND],[Ws.BIG,vt.BIG],[Ws.BLOCKQUOTE,vt.BLOCKQUOTE],[Ws.BODY,vt.BODY],[Ws.BR,vt.BR],[Ws.BUTTON,vt.BUTTON],[Ws.CAPTION,vt.CAPTION],[Ws.CENTER,vt.CENTER],[Ws.CODE,vt.CODE],[Ws.COL,vt.COL],[Ws.COLGROUP,vt.COLGROUP],[Ws.DD,vt.DD],[Ws.DESC,vt.DESC],[Ws.DETAILS,vt.DETAILS],[Ws.DIALOG,vt.DIALOG],[Ws.DIR,vt.DIR],[Ws.DIV,vt.DIV],[Ws.DL,vt.DL],[Ws.DT,vt.DT],[Ws.EM,vt.EM],[Ws.EMBED,vt.EMBED],[Ws.FIELDSET,vt.FIELDSET],[Ws.FIGCAPTION,vt.FIGCAPTION],[Ws.FIGURE,vt.FIGURE],[Ws.FONT,vt.FONT],[Ws.FOOTER,vt.FOOTER],[Ws.FOREIGN_OBJECT,vt.FOREIGN_OBJECT],[Ws.FORM,vt.FORM],[Ws.FRAME,vt.FRAME],[Ws.FRAMESET,vt.FRAMESET],[Ws.H1,vt.H1],[Ws.H2,vt.H2],[Ws.H3,vt.H3],[Ws.H4,vt.H4],[Ws.H5,vt.H5],[Ws.H6,vt.H6],[Ws.HEAD,vt.HEAD],[Ws.HEADER,vt.HEADER],[Ws.HGROUP,vt.HGROUP],[Ws.HR,vt.HR],[Ws.HTML,vt.HTML],[Ws.I,vt.I],[Ws.IMG,vt.IMG],[Ws.IMAGE,vt.IMAGE],[Ws.INPUT,vt.INPUT],[Ws.IFRAME,vt.IFRAME],[Ws.KEYGEN,vt.KEYGEN],[Ws.LABEL,vt.LABEL],[Ws.LI,vt.LI],[Ws.LINK,vt.LINK],[Ws.LISTING,vt.LISTING],[Ws.MAIN,vt.MAIN],[Ws.MALIGNMARK,vt.MALIGNMARK],[Ws.MARQUEE,vt.MARQUEE],[Ws.MATH,vt.MATH],[Ws.MENU,vt.MENU],[Ws.META,vt.META],[Ws.MGLYPH,vt.MGLYPH],[Ws.MI,vt.MI],[Ws.MO,vt.MO],[Ws.MN,vt.MN],[Ws.MS,vt.MS],[Ws.MTEXT,vt.MTEXT],[Ws.NAV,vt.NAV],[Ws.NOBR,vt.NOBR],[Ws.NOFRAMES,vt.NOFRAMES],[Ws.NOEMBED,vt.NOEMBED],[Ws.NOSCRIPT,vt.NOSCRIPT],[Ws.OBJECT,vt.OBJECT],[Ws.OL,vt.OL],[Ws.OPTGROUP,vt.OPTGROUP],[Ws.OPTION,vt.OPTION],[Ws.P,vt.P],[Ws.PARAM,vt.PARAM],[Ws.PLAINTEXT,vt.PLAINTEXT],[Ws.PRE,vt.PRE],[Ws.RB,vt.RB],[Ws.RP,vt.RP],[Ws.RT,vt.RT],[Ws.RTC,vt.RTC],[Ws.RUBY,vt.RUBY],[Ws.S,vt.S],[Ws.SCRIPT,vt.SCRIPT],[Ws.SECTION,vt.SECTION],[Ws.SELECT,vt.SELECT],[Ws.SOURCE,vt.SOURCE],[Ws.SMALL,vt.SMALL],[Ws.SPAN,vt.SPAN],[Ws.STRIKE,vt.STRIKE],[Ws.STRONG,vt.STRONG],[Ws.STYLE,vt.STYLE],[Ws.SUB,vt.SUB],[Ws.SUMMARY,vt.SUMMARY],[Ws.SUP,vt.SUP],[Ws.TABLE,vt.TABLE],[Ws.TBODY,vt.TBODY],[Ws.TEMPLATE,vt.TEMPLATE],[Ws.TEXTAREA,vt.TEXTAREA],[Ws.TFOOT,vt.TFOOT],[Ws.TD,vt.TD],[Ws.TH,vt.TH],[Ws.THEAD,vt.THEAD],[Ws.TITLE,vt.TITLE],[Ws.TR,vt.TR],[Ws.TRACK,vt.TRACK],[Ws.TT,vt.TT],[Ws.U,vt.U],[Ws.UL,vt.UL],[Ws.SVG,vt.SVG],[Ws.VAR,vt.VAR],[Ws.WBR,vt.WBR],[Ws.XMP,vt.XMP]]);function V1i(e){var t;return(t=CgS.get(e))!==null&&t!==void 0?t:vt.UNKNOWN}var $f=vt,Jnp={[Sl.HTML]:new Set([$f.ADDRESS,$f.APPLET,$f.AREA,$f.ARTICLE,$f.ASIDE,$f.BASE,$f.BASEFONT,$f.BGSOUND,$f.BLOCKQUOTE,$f.BODY,$f.BR,$f.BUTTON,$f.CAPTION,$f.CENTER,$f.COL,$f.COLGROUP,$f.DD,$f.DETAILS,$f.DIR,$f.DIV,$f.DL,$f.DT,$f.EMBED,$f.FIELDSET,$f.FIGCAPTION,$f.FIGURE,$f.FOOTER,$f.FORM,$f.FRAME,$f.FRAMESET,$f.H1,$f.H2,$f.H3,$f.H4,$f.H5,$f.H6,$f.HEAD,$f.HEADER,$f.HGROUP,$f.HR,$f.HTML,$f.IFRAME,$f.IMG,$f.INPUT,$f.LI,$f.LINK,$f.LISTING,$f.MAIN,$f.MARQUEE,$f.MENU,$f.META,$f.NAV,$f.NOEMBED,$f.NOFRAMES,$f.NOSCRIPT,$f.OBJECT,$f.OL,$f.P,$f.PARAM,$f.PLAINTEXT,$f.PRE,$f.SCRIPT,$f.SECTION,$f.SELECT,$f.SOURCE,$f.STYLE,$f.SUMMARY,$f.TABLE,$f.TBODY,$f.TD,$f.TEMPLATE,$f.TEXTAREA,$f.TFOOT,$f.TH,$f.THEAD,$f.TITLE,$f.TR,$f.TRACK,$f.UL,$f.WBR,$f.XMP]),[Sl.MATHML]:new Set([$f.MI,$f.MO,$f.MN,$f.MS,$f.MTEXT,$f.ANNOTATION_XML]),[Sl.SVG]:new Set([$f.TITLE,$f.FOREIGN_OBJECT,$f.DESC]),[Sl.XLINK]:new Set,[Sl.XML]:new Set,[Sl.XMLNS]:new Set};function upo(e){return e===$f.H1||e===$f.H2||e===$f.H3||e===$f.H4||e===$f.H5||e===$f.H6}var PL7=new Set([Ws.STYLE,Ws.SCRIPT,Ws.XMP,Ws.IFRAME,Ws.NOEMBED,Ws.NOFRAMES,Ws.PLAINTEXT]);var xgS=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),io;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(io||(io={}));var BH={DATA:io.DATA,RCDATA:io.RCDATA,RAWTEXT:io.RAWTEXT,SCRIPT_DATA:io.SCRIPT_DATA,PLAINTEXT:io.PLAINTEXT,CDATA_SECTION:io.CDATA_SECTION};function BXn(e){return e>=Da.DIGIT_0&&e<=Da.DIGIT_9}function CXn(e){return e>=Da.LATIN_CAPITAL_A&&e<=Da.LATIN_CAPITAL_Z}function IgS(e){return e>=Da.LATIN_SMALL_A&&e<=Da.LATIN_SMALL_Z}function Oei(e){return IgS(e)||CXn(e)}function c1s(e){return Oei(e)||BXn(e)}function Ynp(e){return e>=Da.LATIN_CAPITAL_A&&e<=Da.LATIN_CAPITAL_F}function Xnp(e){return e>=Da.LATIN_SMALL_A&&e<=Da.LATIN_SMALL_F}function zgS(e){return BXn(e)||Ynp(e)||Xnp(e)}function spo(e){return e+32}function Znp(e){return e===Da.SPACE||e===Da.LINE_FEED||e===Da.TABULATION||e===Da.FORM_FEED}function RgS(e){return e===Da.EQUALS_SIGN||c1s(e)}function Knp(e){return Znp(e)||e===Da.SOLIDUS||e===Da.GREATER_THAN_SIGN}var xXn=class{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=io.DATA,this.returnState=io.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new apo(r),this.currentLocation=this.getCurrentLocation(-1)}_err(t){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,i){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||i?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(t){this.consumedAfterSnapshot-=t,this.preprocessor.retreat(t)}_reconsumeInState(t,r){this.state=t,this._callState(r)}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:oS.START_TAG,tagName:"",tagID:vt.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oS.END_TAG,tagName:"",tagID:vt.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:oS.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:oS.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;let i=this.currentToken;if(opo(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){let n=(t=(r=i.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Tc.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let t=this.currentToken;this.prepareToken(t),t.tagID=V1i(t.tagName),t.type===oS.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Tc.endTagWithAttributes),t.selfClosing&&this._err(Tc.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case oS.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oS.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oS.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:oS.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==t)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=r;return}this._createCharacterToken(t,r)}_emitCodePoint(t){let r=Znp(t)?oS.WHITESPACE_CHARACTER:t===Da.NULL?oS.NULL_CHARACTER:oS.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(oS.CHARACTER,t)}_matchNamedCharacterReference(t){let r=null,i=0,n=!1;for(let a=0,u=kGt[0];a>=0&&(a=s1s(kGt,u,a+1,t),!(a<0));t=this._consume()){i+=1,u=kGt[a];let l=u&x2t.VALUE_LENGTH;if(l){let f=(l>>14)-1;if(t!==Da.SEMICOLON&&this._isCharacterReferenceInAttribute()&&RgS(this.preprocessor.peek(1))?(r=[Da.AMPERSAND],a+=f):(r=f===0?[kGt[a]&~x2t.VALUE_LENGTH]:f===1?[kGt[++a]]:[kGt[++a],kGt[++a]],i=0,n=t!==Da.SEMICOLON),f===0){this._consume();break}}}return this._unconsume(i),n&&!this.preprocessor.endOfChunkHit&&this._err(Tc.missingSemicolonAfterCharacterReference),this._unconsume(1),r}_isCharacterReferenceInAttribute(){return this.returnState===io.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===io.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===io.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case io.DATA:{this._stateData(t);break}case io.RCDATA:{this._stateRcdata(t);break}case io.RAWTEXT:{this._stateRawtext(t);break}case io.SCRIPT_DATA:{this._stateScriptData(t);break}case io.PLAINTEXT:{this._statePlaintext(t);break}case io.TAG_OPEN:{this._stateTagOpen(t);break}case io.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case io.TAG_NAME:{this._stateTagName(t);break}case io.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case io.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case io.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case io.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case io.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case io.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case io.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case io.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case io.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case io.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case io.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case io.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case io.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case io.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case io.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case io.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case io.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case io.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case io.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case io.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case io.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case io.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case io.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case io.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case io.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case io.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case io.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case io.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case io.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case io.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case io.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case io.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case io.BOGUS_COMMENT:{this._stateBogusComment(t);break}case io.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case io.COMMENT_START:{this._stateCommentStart(t);break}case io.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case io.COMMENT:{this._stateComment(t);break}case io.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case io.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case io.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case io.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case io.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case io.COMMENT_END:{this._stateCommentEnd(t);break}case io.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case io.DOCTYPE:{this._stateDoctype(t);break}case io.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case io.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case io.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case io.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case io.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case io.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case io.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case io.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case io.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case io.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case io.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case io.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case io.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case io.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case io.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case io.CDATA_SECTION:{this._stateCdataSection(t);break}case io.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case io.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case io.CHARACTER_REFERENCE:{this._stateCharacterReference(t);break}case io.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(t);break}case io.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}case io.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(t);break}case io.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(t);break}case io.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(t);break}case io.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(t);break}case io.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case Da.LESS_THAN_SIGN:{this.state=io.TAG_OPEN;break}case Da.AMPERSAND:{this.returnState=io.DATA,this.state=io.CHARACTER_REFERENCE;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitCodePoint(t);break}case Da.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case Da.AMPERSAND:{this.returnState=io.RCDATA,this.state=io.CHARACTER_REFERENCE;break}case Da.LESS_THAN_SIGN:{this.state=io.RCDATA_LESS_THAN_SIGN;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitChars(QT);break}case Da.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case Da.LESS_THAN_SIGN:{this.state=io.RAWTEXT_LESS_THAN_SIGN;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitChars(QT);break}case Da.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_LESS_THAN_SIGN;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitChars(QT);break}case Da.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitChars(QT);break}case Da.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oei(t))this._createStartTagToken(),this.state=io.TAG_NAME,this._stateTagName(t);else switch(t){case Da.EXCLAMATION_MARK:{this.state=io.MARKUP_DECLARATION_OPEN;break}case Da.SOLIDUS:{this.state=io.END_TAG_OPEN;break}case Da.QUESTION_MARK:{this._err(Tc.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=io.BOGUS_COMMENT,this._stateBogusComment(t);break}case Da.EOF:{this._err(Tc.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Tc.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=io.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Oei(t))this._createEndTagToken(),this.state=io.TAG_NAME,this._stateTagName(t);else switch(t){case Da.GREATER_THAN_SIGN:{this._err(Tc.missingEndTagName),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Tc.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=io.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this.state=io.BEFORE_ATTRIBUTE_NAME;break}case Da.SOLIDUS:{this.state=io.SELF_CLOSING_START_TAG;break}case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentTagToken();break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.tagName+=QT;break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(CXn(t)?spo(t):t)}}_stateRcdataLessThanSign(t){t===Da.SOLIDUS?this.state=io.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=io.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Oei(t)?(this.state=io.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=io.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=io.BEFORE_ATTRIBUTE_NAME,!1;case Da.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=io.SELF_CLOSING_START_TAG,!1;case Da.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=io.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=io.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===Da.SOLIDUS?this.state=io.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=io.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Oei(t)?(this.state=io.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=io.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=io.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case Da.SOLIDUS:{this.state=io.SCRIPT_DATA_END_TAG_OPEN;break}case Da.EXCLAMATION_MARK:{this.state=io.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=io.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Oei(t)?(this.state=io.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=io.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=io.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===Da.HYPHEN_MINUS?(this.state=io.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=io.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===Da.HYPHEN_MINUS?(this.state=io.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=io.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case Da.HYPHEN_MINUS:{this.state=io.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitChars(QT);break}case Da.EOF:{this._err(Tc.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case Da.HYPHEN_MINUS:{this.state=io.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.state=io.SCRIPT_DATA_ESCAPED,this._emitChars(QT);break}case Da.EOF:{this._err(Tc.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=io.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case Da.HYPHEN_MINUS:{this._emitChars("-");break}case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Da.GREATER_THAN_SIGN:{this.state=io.SCRIPT_DATA,this._emitChars(">");break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.state=io.SCRIPT_DATA_ESCAPED,this._emitChars(QT);break}case Da.EOF:{this._err(Tc.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=io.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===Da.SOLIDUS?this.state=io.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Oei(t)?(this._emitChars("<"),this.state=io.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=io.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Oei(t)?(this.state=io.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=io.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=io.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fK.SCRIPT,!1)&&Knp(this.preprocessor.peek(fK.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<fK.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=io.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case Da.HYPHEN_MINUS:{this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._emitChars(QT);break}case Da.EOF:{this._err(Tc.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case Da.HYPHEN_MINUS:{this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(QT);break}case Da.EOF:{this._err(Tc.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case Da.HYPHEN_MINUS:{this._emitChars("-");break}case Da.LESS_THAN_SIGN:{this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Da.GREATER_THAN_SIGN:{this.state=io.SCRIPT_DATA,this._emitChars(">");break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(QT);break}case Da.EOF:{this._err(Tc.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===Da.SOLIDUS?(this.state=io.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fK.SCRIPT,!1)&&Knp(this.preprocessor.peek(fK.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<fK.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=io.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=io.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.SOLIDUS:case Da.GREATER_THAN_SIGN:case Da.EOF:{this.state=io.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Da.EQUALS_SIGN:{this._err(Tc.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=io.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=io.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:case Da.SOLIDUS:case Da.GREATER_THAN_SIGN:case Da.EOF:{this._leaveAttrName(),this.state=io.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Da.EQUALS_SIGN:{this._leaveAttrName(),this.state=io.BEFORE_ATTRIBUTE_VALUE;break}case Da.QUOTATION_MARK:case Da.APOSTROPHE:case Da.LESS_THAN_SIGN:{this._err(Tc.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.currentAttr.name+=QT;break}default:this.currentAttr.name+=String.fromCodePoint(CXn(t)?spo(t):t)}}_stateAfterAttributeName(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.SOLIDUS:{this.state=io.SELF_CLOSING_START_TAG;break}case Da.EQUALS_SIGN:{this.state=io.BEFORE_ATTRIBUTE_VALUE;break}case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentTagToken();break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=io.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.QUOTATION_MARK:{this.state=io.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{this.state=io.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.missingAttributeValue),this.state=io.DATA,this.emitCurrentTagToken();break}default:this.state=io.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case Da.QUOTATION_MARK:{this.state=io.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Da.AMPERSAND:{this.returnState=io.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=io.CHARACTER_REFERENCE;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.currentAttr.value+=QT;break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case Da.APOSTROPHE:{this.state=io.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Da.AMPERSAND:{this.returnState=io.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=io.CHARACTER_REFERENCE;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.currentAttr.value+=QT;break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this._leaveAttrValue(),this.state=io.BEFORE_ATTRIBUTE_NAME;break}case Da.AMPERSAND:{this.returnState=io.ATTRIBUTE_VALUE_UNQUOTED,this.state=io.CHARACTER_REFERENCE;break}case Da.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=io.DATA,this.emitCurrentTagToken();break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this.currentAttr.value+=QT;break}case Da.QUOTATION_MARK:case Da.APOSTROPHE:case Da.LESS_THAN_SIGN:case Da.EQUALS_SIGN:case Da.GRAVE_ACCENT:{this._err(Tc.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this._leaveAttrValue(),this.state=io.BEFORE_ATTRIBUTE_NAME;break}case Da.SOLIDUS:{this._leaveAttrValue(),this.state=io.SELF_CLOSING_START_TAG;break}case Da.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=io.DATA,this.emitCurrentTagToken();break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:this._err(Tc.missingWhitespaceBetweenAttributes),this.state=io.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case Da.GREATER_THAN_SIGN:{let r=this.currentToken;r.selfClosing=!0,this.state=io.DATA,this.emitCurrentTagToken();break}case Da.EOF:{this._err(Tc.eofInTag),this._emitEOFToken();break}default:this._err(Tc.unexpectedSolidusInTag),this.state=io.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){let r=this.currentToken;switch(t){case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentComment(r);break}case Da.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.data+=QT;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fK.DASH_DASH,!0)?(this._createCommentToken(fK.DASH_DASH.length+1),this.state=io.COMMENT_START):this._consumeSequenceIfMatch(fK.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fK.DOCTYPE.length+1),this.state=io.DOCTYPE):this._consumeSequenceIfMatch(fK.CDATA_START,!0)?this.inForeignNode?this.state=io.CDATA_SECTION:(this._err(Tc.cdataInHtmlContent),this._createCommentToken(fK.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=io.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Tc.incorrectlyOpenedComment),this._createCommentToken(2),this.state=io.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case Da.HYPHEN_MINUS:{this.state=io.COMMENT_START_DASH;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.abruptClosingOfEmptyComment),this.state=io.DATA;let r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=io.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){let r=this.currentToken;switch(t){case Da.HYPHEN_MINUS:{this.state=io.COMMENT_END;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.abruptClosingOfEmptyComment),this.state=io.DATA,this.emitCurrentComment(r);break}case Da.EOF:{this._err(Tc.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=io.COMMENT,this._stateComment(t)}}_stateComment(t){let r=this.currentToken;switch(t){case Da.HYPHEN_MINUS:{this.state=io.COMMENT_END_DASH;break}case Da.LESS_THAN_SIGN:{r.data+="<",this.state=io.COMMENT_LESS_THAN_SIGN;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.data+=QT;break}case Da.EOF:{this._err(Tc.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){let r=this.currentToken;switch(t){case Da.EXCLAMATION_MARK:{r.data+="!",this.state=io.COMMENT_LESS_THAN_SIGN_BANG;break}case Da.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=io.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===Da.HYPHEN_MINUS?this.state=io.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=io.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===Da.HYPHEN_MINUS?this.state=io.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=io.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==Da.GREATER_THAN_SIGN&&t!==Da.EOF&&this._err(Tc.nestedComment),this.state=io.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){let r=this.currentToken;switch(t){case Da.HYPHEN_MINUS:{this.state=io.COMMENT_END;break}case Da.EOF:{this._err(Tc.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=io.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){let r=this.currentToken;switch(t){case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentComment(r);break}case Da.EXCLAMATION_MARK:{this.state=io.COMMENT_END_BANG;break}case Da.HYPHEN_MINUS:{r.data+="-";break}case Da.EOF:{this._err(Tc.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=io.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){let r=this.currentToken;switch(t){case Da.HYPHEN_MINUS:{r.data+="--!",this.state=io.COMMENT_END_DASH;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.incorrectlyClosedComment),this.state=io.DATA,this.emitCurrentComment(r);break}case Da.EOF:{this._err(Tc.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=io.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this.state=io.BEFORE_DOCTYPE_NAME;break}case Da.GREATER_THAN_SIGN:{this.state=io.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case Da.EOF:{this._err(Tc.eofInDoctype),this._createDoctypeToken(null);let r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingWhitespaceBeforeDoctypeName),this.state=io.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(CXn(t))this._createDoctypeToken(String.fromCharCode(spo(t))),this.state=io.DOCTYPE_NAME;else switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.NULL:{this._err(Tc.unexpectedNullCharacter),this._createDoctypeToken(QT),this.state=io.DOCTYPE_NAME;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.missingDoctypeName),this._createDoctypeToken(null);let r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofInDoctype),this._createDoctypeToken(null);let r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=io.DOCTYPE_NAME}}_stateDoctypeName(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this.state=io.AFTER_DOCTYPE_NAME;break}case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.name+=QT;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(CXn(t)?spo(t):t)}}_stateAfterDoctypeName(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fK.PUBLIC,!1)?this.state=io.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fK.SYSTEM,!1)?this.state=io.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Tc.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this.state=io.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case Da.QUOTATION_MARK:{this._err(Tc.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=io.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{this._err(Tc.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=io.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.QUOTATION_MARK:{r.publicId="",this.state=io.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{r.publicId="",this.state=io.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){let r=this.currentToken;switch(t){case Da.QUOTATION_MARK:{this.state=io.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.publicId+=QT;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){let r=this.currentToken;switch(t){case Da.APOSTROPHE:{this.state=io.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.publicId+=QT;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this.state=io.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case Da.GREATER_THAN_SIGN:{this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.QUOTATION_MARK:{this._err(Tc.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{this._err(Tc.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.QUOTATION_MARK:{r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:{this.state=io.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case Da.QUOTATION_MARK:{this._err(Tc.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{this._err(Tc.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.QUOTATION_MARK:{r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Da.APOSTROPHE:{r.systemId="",this.state=io.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=io.DATA,this.emitCurrentDoctype(r);break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){let r=this.currentToken;switch(t){case Da.QUOTATION_MARK:{this.state=io.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.systemId+=QT;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){let r=this.currentToken;switch(t){case Da.APOSTROPHE:{this.state=io.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter),r.systemId+=QT;break}case Da.GREATER_THAN_SIGN:{this._err(Tc.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){let r=this.currentToken;switch(t){case Da.SPACE:case Da.LINE_FEED:case Da.TABULATION:case Da.FORM_FEED:break;case Da.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.EOF:{this._err(Tc.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(Tc.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=io.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){let r=this.currentToken;switch(t){case Da.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=io.DATA;break}case Da.NULL:{this._err(Tc.unexpectedNullCharacter);break}case Da.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}default:}}_stateCdataSection(t){switch(t){case Da.RIGHT_SQUARE_BRACKET:{this.state=io.CDATA_SECTION_BRACKET;break}case Da.EOF:{this._err(Tc.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===Da.RIGHT_SQUARE_BRACKET?this.state=io.CDATA_SECTION_END:(this._emitChars("]"),this.state=io.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case Da.GREATER_THAN_SIGN:{this.state=io.DATA;break}case Da.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=io.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(t){t===Da.NUMBER_SIGN?this.state=io.NUMERIC_CHARACTER_REFERENCE:c1s(t)?(this.state=io.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(t)):(this._flushCodePointConsumedAsCharacterReference(Da.AMPERSAND),this._reconsumeInState(this.returnState,t))}_stateNamedCharacterReference(t){let r=this._matchNamedCharacterReference(t);if(!this._ensureHibernation())if(r){for(let i=0;i<r.length;i++)this._flushCodePointConsumedAsCharacterReference(r[i]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(Da.AMPERSAND),this.state=io.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(t){c1s(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===Da.SEMICOLON&&this._err(Tc.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,t))}_stateNumericCharacterReference(t){this.charRefCode=0,t===Da.LATIN_SMALL_X||t===Da.LATIN_CAPITAL_X?this.state=io.HEXADEMICAL_CHARACTER_REFERENCE_START:BXn(t)?(this.state=io.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(t)):(this._err(Tc.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(Da.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(Da.NUMBER_SIGN),this._reconsumeInState(this.returnState,t))}_stateHexademicalCharacterReferenceStart(t){zgS(t)?(this.state=io.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(t)):(this._err(Tc.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(Da.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(Da.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(t){Ynp(t)?this.charRefCode=this.charRefCode*16+t-55:Xnp(t)?this.charRefCode=this.charRefCode*16+t-87:BXn(t)?this.charRefCode=this.charRefCode*16+t-48:t===Da.SEMICOLON?this.state=io.NUMERIC_CHARACTER_REFERENCE_END:(this._err(Tc.missingSemicolonAfterCharacterReference),this.state=io.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(t))}_stateDecimalCharacterReference(t){BXn(t)?this.charRefCode=this.charRefCode*10+t-48:t===Da.SEMICOLON?this.state=io.NUMERIC_CHARACTER_REFERENCE_END:(this._err(Tc.missingSemicolonAfterCharacterReference),this.state=io.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(t))}_stateNumericCharacterReferenceEnd(t){if(this.charRefCode===Da.NULL)this._err(Tc.nullCharacterReference),this.charRefCode=Da.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(Tc.characterReferenceOutsideUnicodeRange),this.charRefCode=Da.REPLACEMENT_CHARACTER;else if(rpo(this.charRefCode))this._err(Tc.surrogateCharacterReference),this.charRefCode=Da.REPLACEMENT_CHARACTER;else if(npo(this.charRefCode))this._err(Tc.noncharacterCharacterReference);else if(ipo(this.charRefCode)||this.charRefCode===Da.CARRIAGE_RETURN){this._err(Tc.controlCharacterReference);let r=xgS.get(this.charRefCode);r!==void 0&&(this.charRefCode=r)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,t)}};var eap=new Set([vt.DD,vt.DT,vt.LI,vt.OPTGROUP,vt.OPTION,vt.P,vt.RB,vt.RP,vt.RT,vt.RTC]),knp=new Set([...eap,vt.CAPTION,vt.COLGROUP,vt.TBODY,vt.TD,vt.TFOOT,vt.TH,vt.THEAD,vt.TR]),cpo=new Map([[vt.APPLET,Sl.HTML],[vt.CAPTION,Sl.HTML],[vt.HTML,Sl.HTML],[vt.MARQUEE,Sl.HTML],[vt.OBJECT,Sl.HTML],[vt.TABLE,Sl.HTML],[vt.TD,Sl.HTML],[vt.TEMPLATE,Sl.HTML],[vt.TH,Sl.HTML],[vt.ANNOTATION_XML,Sl.MATHML],[vt.MI,Sl.MATHML],[vt.MN,Sl.MATHML],[vt.MO,Sl.MATHML],[vt.MS,Sl.MATHML],[vt.MTEXT,Sl.MATHML],[vt.DESC,Sl.SVG],[vt.FOREIGN_OBJECT,Sl.SVG],[vt.TITLE,Sl.SVG]]),FgS=[vt.H1,vt.H2,vt.H3,vt.H4,vt.H5,vt.H6],NgS=[vt.TR,vt.TEMPLATE,vt.HTML],LgS=[vt.TBODY,vt.TFOOT,vt.THEAD,vt.TEMPLATE,vt.HTML],UgS=[vt.TABLE,vt.TEMPLATE,vt.HTML],VgS=[vt.TD,vt.TH],lpo=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,i){this.treeAdapter=r,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=vt.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===vt.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Sl.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){let i=this._indexOf(t);this.items[i]=r,i===this.stackTop&&(this.current=r)}insertAfter(t,r,i){let n=this._indexOf(t)+1;this.items.splice(n,0,r),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==Sl.HTML);this.shortenToLength(r<0?0:r)}shortenToLength(t){for(;this.stackTop>=t;){let r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){let r=this._indexOf(t);this.shortenToLength(r<0?0:r)}popUntilPopped(t,r){let i=this._indexOfTagNames(t,r);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(FgS,Sl.HTML)}popUntilTableCellPopped(){this.popUntilPopped(VgS,Sl.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let i=this.stackTop;i>=0;i--)if(t.includes(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===r)return i;return-1}clearBackTo(t,r){let i=this._indexOfTagNames(t,r);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(UgS,Sl.HTML)}clearBackToTableBodyContext(){this.clearBackTo(LgS,Sl.HTML)}clearBackToTableRowContext(){this.clearBackTo(NgS,Sl.HTML)}remove(t){let r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===vt.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===vt.HTML}hasInScope(t){for(let r=this.stackTop;r>=0;r--){let i=this.tagIDs[r],n=this.treeAdapter.getNamespaceURI(this.items[r]);if(i===t&&n===Sl.HTML)return!0;if(cpo.get(i)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],i=this.treeAdapter.getNamespaceURI(this.items[t]);if(upo(r)&&i===Sl.HTML)return!0;if(cpo.get(r)===i)return!1}return!0}hasInListItemScope(t){for(let r=this.stackTop;r>=0;r--){let i=this.tagIDs[r],n=this.treeAdapter.getNamespaceURI(this.items[r]);if(i===t&&n===Sl.HTML)return!0;if((i===vt.UL||i===vt.OL)&&n===Sl.HTML||cpo.get(i)===n)return!1}return!0}hasInButtonScope(t){for(let r=this.stackTop;r>=0;r--){let i=this.tagIDs[r],n=this.treeAdapter.getNamespaceURI(this.items[r]);if(i===t&&n===Sl.HTML)return!0;if(i===vt.BUTTON&&n===Sl.HTML||cpo.get(i)===n)return!1}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--){let i=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===Sl.HTML){if(i===t)return!0;if(i===vt.TABLE||i===vt.TEMPLATE||i===vt.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===Sl.HTML){if(r===vt.TBODY||r===vt.THEAD||r===vt.TFOOT)return!0;if(r===vt.TABLE||r===vt.HTML)return!1}}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--){let i=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===Sl.HTML){if(i===t)return!0;if(i!==vt.OPTION&&i!==vt.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;eap.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;knp.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&knp.has(this.currentTagId);)this.pop()}};var xBe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(xBe=xBe||(xBe={}));var tap={type:xBe.Marker},fpo=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){let i=[],n=r.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){let f=this.entries[l];if(f.type===xBe.Marker)break;let{element:s}=f;if(this.treeAdapter.getTagName(s)===a&&this.treeAdapter.getNamespaceURI(s)===u){let o=this.treeAdapter.getAttrList(s);o.length===n&&i.push({idx:l,attrs:o})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<3)return;let r=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,r);if(i.length<3)return;let n=new Map(r.map(u=>[u.name,u.value])),a=0;for(let u=0;u<i.length;u++){let l=i[u];l.attrs.every(f=>n.get(f.name)===f.value)&&(a+=1,a>=3&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(tap)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:xBe.Element,element:t,token:r})}insertElementAfterBookmark(t,r){let i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:xBe.Element,element:t,token:r})}removeEntry(t){let r=this.entries.indexOf(t);r>=0&&this.entries.splice(r,1)}clearToLastMarker(){let t=this.entries.indexOf(tap);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){let r=this.entries.find(i=>i.type===xBe.Marker||this.treeAdapter.getTagName(i.element)===t);return r&&r.type===xBe.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===xBe.Element&&r.element===t)}};function rap(e){return{nodeName:"#text",value:e,parentNode:null}}var D8r={createDocument(){return{nodeName:"#document",mode:CH.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){let i=e.childNodes.indexOf(r);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,i){let n=e.childNodes.find(a=>a.nodeName==="#documentType");if(n)n.name=t,n.publicId=r,n.systemId=i;else{let a={nodeName:"#documentType",name:t,publicId:r,systemId:i,parentNode:null};D8r.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let r=e.childNodes[e.childNodes.length-1];if(D8r.isTextNode(r)){r.value+=t;return}}D8r.appendChild(e,rap(t))},insertTextBefore(e,t,r){let i=e.childNodes[e.childNodes.indexOf(r)-1];i&&D8r.isTextNode(i)?i.value+=t:D8r.insertBefore(e,rap(t),r)},adoptAttributes(e,t){let r=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)r.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var nap="html",WgS="about:legacy-compat",HgS="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",aap=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],$gS=[...aap,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],GgS=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),oap=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],QgS=[...oap,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function iap(e,t){return t.some(r=>e.startsWith(r))}function uap(e){return e.name===nap&&e.publicId===null&&(e.systemId===null||e.systemId===WgS)}function sap(e){if(e.name!==nap)return CH.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===HgS)return CH.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),GgS.has(r))return CH.QUIRKS;let i=t===null?$gS:aap;if(iap(r,i))return CH.QUIRKS;if(i=t===null?oap:QgS,iap(r,i))return CH.LIMITED_QUIRKS}return CH.NO_QUIRKS}var cap={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},KgS="definitionurl",YgS="definitionURL",XgS=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),ZgS=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Sl.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Sl.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Sl.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Sl.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Sl.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Sl.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Sl.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:Sl.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:Sl.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Sl.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Sl.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Sl.XMLNS}]]),kgS=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),eOS=new Set([vt.B,vt.BIG,vt.BLOCKQUOTE,vt.BODY,vt.BR,vt.CENTER,vt.CODE,vt.DD,vt.DIV,vt.DL,vt.DT,vt.EM,vt.EMBED,vt.H1,vt.H2,vt.H3,vt.H4,vt.H5,vt.H6,vt.HEAD,vt.HR,vt.I,vt.IMG,vt.LI,vt.LISTING,vt.MENU,vt.META,vt.NOBR,vt.OL,vt.P,vt.PRE,vt.RUBY,vt.S,vt.SMALL,vt.SPAN,vt.STRONG,vt.STRIKE,vt.SUB,vt.SUP,vt.TABLE,vt.TT,vt.U,vt.UL,vt.VAR]);function lap(e){let t=e.tagID;return t===vt.FONT&&e.attrs.some(({name:i})=>i===eQt.COLOR||i===eQt.SIZE||i===eQt.FACE)||eOS.has(t)}function l1s(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===KgS){e.attrs[t].name=YgS;break}}function f1s(e){for(let t=0;t<e.attrs.length;t++){let r=XgS.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function dpo(e){for(let t=0;t<e.attrs.length;t++){let r=ZgS.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function fap(e){let t=kgS.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=V1i(e.tagName))}function tOS(e,t){return t===Sl.MATHML&&(e===vt.MI||e===vt.MO||e===vt.MN||e===vt.MS||e===vt.MTEXT)}function rOS(e,t,r){if(t===Sl.MATHML&&e===vt.ANNOTATION_XML){for(let i=0;i<r.length;i++)if(r[i].name===eQt.ENCODING){let n=r[i].value.toLowerCase();return n===cap.TEXT_HTML||n===cap.APPLICATION_XML}}return t===Sl.SVG&&(e===vt.FOREIGN_OBJECT||e===vt.DESC||e===vt.TITLE)}function dap(e,t,r,i){return(!i||i===Sl.HTML)&&rOS(e,t,r)||(!i||i===Sl.MATHML)&&tOS(e,t)}var iOS="hidden",nOS=8,aOS=3,yu;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(yu||(yu={}));var oOS={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vap=new Set([vt.TABLE,vt.TBODY,vt.TFOOT,vt.THEAD,vt.TR]),_ap={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:D8r,onParseError:null},gfn=class{constructor(t,r,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=yu.INITIAL,this.originalInsertionMode=yu.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={..._ap,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new xXn(this.options,this),this.activeFormattingElements=new fpo(this.treeAdapter),this.fragmentContextID=i?V1i(this.treeAdapter.getTagName(i)):vt.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new lpo(this.document,this.treeAdapter,this)}static parse(t,r){let i=new this(r);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,r){let i={..._ap,...r};t??(t=i.treeAdapter.createElement(Ws.TEMPLATE,Sl.HTML,[]));let n=i.treeAdapter.createElement("documentmock",Sl.HTML,[]),a=new this(i,n,t);return a.fragmentContextID===vt.TEMPLATE&&a.tmplInsertionModeStack.unshift(yu.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){let t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,i){var n;if(!this.onParseError)return;let a=(n=t.location)!==null&&n!==void 0?n:oOS,u={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:i?a.startLine:a.endLine,endCol:i?a.startCol:a.endCol,endOffset:i?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,r,i){var n,a;(a=(n=this.treeAdapter).onItemPush)===null||a===void 0||a.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),r){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,r){let i=t===this.document||this.treeAdapter.getNamespaceURI(t)===Sl.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,Sl.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=yu.TEXT}switchToPlaintextParsing(){this.insertionMode=yu.TEXT,this.originalInsertionMode=yu.IN_BODY,this.tokenizer.state=BH.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Ws.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Sl.HTML))switch(this.fragmentContextID){case vt.TITLE:case vt.TEXTAREA:{this.tokenizer.state=BH.RCDATA;break}case vt.STYLE:case vt.XMP:case vt.IFRAME:case vt.NOEMBED:case vt.NOFRAMES:case vt.NOSCRIPT:{this.tokenizer.state=BH.RAWTEXT;break}case vt.SCRIPT:{this.tokenizer.state=BH.SCRIPT_DATA;break}case vt.PLAINTEXT:{this.tokenizer.state=BH.PLAINTEXT;break}default:}}_setDocumentType(t){let r=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,i,n),t.location){let u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){let i=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,r){let i=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,r){let i=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,r){let i=this.treeAdapter.createElement(t,Sl.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,r)}_insertTemplate(t){let r=this.treeAdapter.createElement(t.tagName,Sl.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,i),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(Ws.HTML,Sl.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,vt.HTML)}_appendCommentNode(t,r){let i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let r,i;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(r,t.chars,i):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;let n=this.treeAdapter.getChildNodes(r),a=i?n.lastIndexOf(i):n.length,u=n[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){let{endLine:f,endCol:s,endOffset:o}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:f,endCol:s,endOffset:o})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,r){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(r,i)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){let i=r.location,n=this.treeAdapter.getTagName(t),a=r.type===oS.END_TAG&&n===r.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,i;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,i=this.fragmentContextID):{current:r,currentTagId:i}=this.openElements,t.tagID===vt.SVG&&this.treeAdapter.getTagName(r)===Ws.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===Sl.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===vt.MGLYPH||t.tagID===vt.MALIGNMARK)&&!this._isIntegrationPoint(i,r,Sl.HTML)}_processToken(t){switch(t.type){case oS.CHARACTER:{this.onCharacter(t);break}case oS.NULL_CHARACTER:{this.onNullCharacter(t);break}case oS.COMMENT:{this.onComment(t);break}case oS.DOCTYPE:{this.onDoctype(t);break}case oS.START_TAG:{this._processStartTag(t);break}case oS.END_TAG:{this.onEndTag(t);break}case oS.EOF:{this.onEof(t);break}case oS.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,i){let n=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return dap(t,n,a,i)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let r=this.activeFormattingElements.entries.findIndex(n=>n.type===xBe.Marker||this.openElements.contains(n.element)),i=r<0?t-1:r-1;for(let n=i;n>=0;n--){let a=this.activeFormattingElements.entries[n];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=yu.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(vt.P),this.openElements.popUntilTagNamePopped(vt.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case vt.TR:{this.insertionMode=yu.IN_ROW;return}case vt.TBODY:case vt.THEAD:case vt.TFOOT:{this.insertionMode=yu.IN_TABLE_BODY;return}case vt.CAPTION:{this.insertionMode=yu.IN_CAPTION;return}case vt.COLGROUP:{this.insertionMode=yu.IN_COLUMN_GROUP;return}case vt.TABLE:{this.insertionMode=yu.IN_TABLE;return}case vt.BODY:{this.insertionMode=yu.IN_BODY;return}case vt.FRAMESET:{this.insertionMode=yu.IN_FRAMESET;return}case vt.SELECT:{this._resetInsertionModeForSelect(t);return}case vt.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case vt.HTML:{this.insertionMode=this.headElement?yu.AFTER_HEAD:yu.BEFORE_HEAD;return}case vt.TD:case vt.TH:{if(t>0){this.insertionMode=yu.IN_CELL;return}break}case vt.HEAD:{if(t>0){this.insertionMode=yu.IN_HEAD;return}break}}this.insertionMode=yu.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){let i=this.openElements.tagIDs[r];if(i===vt.TEMPLATE)break;if(i===vt.TABLE){this.insertionMode=yu.IN_SELECT_IN_TABLE;return}}this.insertionMode=yu.IN_SELECT}_isElementCausesFosterParenting(t){return vap.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case vt.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===Sl.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case vt.TABLE:{let i=this.treeAdapter.getParentNode(r);return i?{parent:i,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){let i=this.treeAdapter.getNamespaceURI(t);return Jnp[i].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zmS(this,t);return}switch(this.insertionMode){case yu.INITIAL:{IXn(this,t);break}case yu.BEFORE_HTML:{RXn(this,t);break}case yu.BEFORE_HEAD:{FXn(this,t);break}case yu.IN_HEAD:{NXn(this,t);break}case yu.IN_HEAD_NO_SCRIPT:{LXn(this,t);break}case yu.AFTER_HEAD:{UXn(this,t);break}case yu.IN_BODY:case yu.IN_CAPTION:case yu.IN_CELL:case yu.IN_TEMPLATE:{gap(this,t);break}case yu.TEXT:case yu.IN_SELECT:case yu.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case yu.IN_TABLE:case yu.IN_TABLE_BODY:case yu.IN_ROW:{d1s(this,t);break}case yu.IN_TABLE_TEXT:{Sap(this,t);break}case yu.IN_COLUMN_GROUP:{_po(this,t);break}case yu.AFTER_BODY:{hpo(this,t);break}case yu.AFTER_AFTER_BODY:{ppo(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ImS(this,t);return}switch(this.insertionMode){case yu.INITIAL:{IXn(this,t);break}case yu.BEFORE_HTML:{RXn(this,t);break}case yu.BEFORE_HEAD:{FXn(this,t);break}case yu.IN_HEAD:{NXn(this,t);break}case yu.IN_HEAD_NO_SCRIPT:{LXn(this,t);break}case yu.AFTER_HEAD:{UXn(this,t);break}case yu.TEXT:{this._insertCharacters(t);break}case yu.IN_TABLE:case yu.IN_TABLE_BODY:case yu.IN_ROW:{d1s(this,t);break}case yu.IN_COLUMN_GROUP:{_po(this,t);break}case yu.AFTER_BODY:{hpo(this,t);break}case yu.AFTER_AFTER_BODY:{ppo(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){p1s(this,t);return}switch(this.insertionMode){case yu.INITIAL:case yu.BEFORE_HTML:case yu.BEFORE_HEAD:case yu.IN_HEAD:case yu.IN_HEAD_NO_SCRIPT:case yu.AFTER_HEAD:case yu.IN_BODY:case yu.IN_TABLE:case yu.IN_CAPTION:case yu.IN_COLUMN_GROUP:case yu.IN_TABLE_BODY:case yu.IN_ROW:case yu.IN_CELL:case yu.IN_SELECT:case yu.IN_SELECT_IN_TABLE:case yu.IN_TEMPLATE:case yu.IN_FRAMESET:case yu.AFTER_FRAMESET:{p1s(this,t);break}case yu.IN_TABLE_TEXT:{zXn(this,t);break}case yu.AFTER_BODY:{pOS(this,t);break}case yu.AFTER_AFTER_BODY:case yu.AFTER_AFTER_FRAMESET:{_OS(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case yu.INITIAL:{hOS(this,t);break}case yu.BEFORE_HEAD:case yu.IN_HEAD:case yu.IN_HEAD_NO_SCRIPT:case yu.AFTER_HEAD:{this._err(t,Tc.misplacedDoctype);break}case yu.IN_TABLE_TEXT:{zXn(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Tc.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?RmS(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case yu.INITIAL:{IXn(this,t);break}case yu.BEFORE_HTML:{yOS(this,t);break}case yu.BEFORE_HEAD:{bOS(this,t);break}case yu.IN_HEAD:{I2t(this,t);break}case yu.IN_HEAD_NO_SCRIPT:{mOS(this,t);break}case yu.AFTER_HEAD:{jOS(this,t);break}case yu.IN_BODY:{xH(this,t);break}case yu.IN_TABLE:{Ofn(this,t);break}case yu.IN_TABLE_TEXT:{zXn(this,t);break}case yu.IN_CAPTION:{gmS(this,t);break}case yu.IN_COLUMN_GROUP:{v1s(this,t);break}case yu.IN_TABLE_BODY:{bpo(this,t);break}case yu.IN_ROW:{gpo(this,t);break}case yu.IN_CELL:{PmS(this,t);break}case yu.IN_SELECT:{Aap(this,t);break}case yu.IN_SELECT_IN_TABLE:{wmS(this,t);break}case yu.IN_TEMPLATE:{DmS(this,t);break}case yu.AFTER_BODY:{AmS(this,t);break}case yu.IN_FRAMESET:{MmS(this,t);break}case yu.AFTER_FRAMESET:{TmS(this,t);break}case yu.AFTER_AFTER_BODY:{BmS(this,t);break}case yu.AFTER_AFTER_FRAMESET:{xmS(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?FmS(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case yu.INITIAL:{IXn(this,t);break}case yu.BEFORE_HTML:{vOS(this,t);break}case yu.BEFORE_HEAD:{gOS(this,t);break}case yu.IN_HEAD:{OOS(this,t);break}case yu.IN_HEAD_NO_SCRIPT:{POS(this,t);break}case yu.AFTER_HEAD:{wOS(this,t);break}case yu.IN_BODY:{vpo(this,t);break}case yu.TEXT:{cmS(this,t);break}case yu.IN_TABLE:{VXn(this,t);break}case yu.IN_TABLE_TEXT:{zXn(this,t);break}case yu.IN_CAPTION:{OmS(this,t);break}case yu.IN_COLUMN_GROUP:{mmS(this,t);break}case yu.IN_TABLE_BODY:{_1s(this,t);break}case yu.IN_ROW:{Eap(this,t);break}case yu.IN_CELL:{jmS(this,t);break}case yu.IN_SELECT:{qap(this,t);break}case yu.IN_SELECT_IN_TABLE:{SmS(this,t);break}case yu.IN_TEMPLATE:{EmS(this,t);break}case yu.AFTER_BODY:{Cap(this,t);break}case yu.IN_FRAMESET:{qmS(this,t);break}case yu.AFTER_FRAMESET:{CmS(this,t);break}case yu.AFTER_AFTER_BODY:{ppo(this,t);break}default:}}onEof(t){switch(this.insertionMode){case yu.INITIAL:{IXn(this,t);break}case yu.BEFORE_HTML:{RXn(this,t);break}case yu.BEFORE_HEAD:{FXn(this,t);break}case yu.IN_HEAD:{NXn(this,t);break}case yu.IN_HEAD_NO_SCRIPT:{LXn(this,t);break}case yu.AFTER_HEAD:{UXn(this,t);break}case yu.IN_BODY:case yu.IN_TABLE:case yu.IN_CAPTION:case yu.IN_COLUMN_GROUP:case yu.IN_TABLE_BODY:case yu.IN_ROW:case yu.IN_CELL:case yu.IN_SELECT:case yu.IN_SELECT_IN_TABLE:{jap(this,t);break}case yu.TEXT:{lmS(this,t);break}case yu.IN_TABLE_TEXT:{zXn(this,t);break}case yu.IN_TEMPLATE:{Tap(this,t);break}case yu.AFTER_BODY:case yu.IN_FRAMESET:case yu.AFTER_FRAMESET:case yu.AFTER_AFTER_BODY:case yu.AFTER_AFTER_FRAMESET:{y1s(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===Da.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case yu.IN_HEAD:case yu.IN_HEAD_NO_SCRIPT:case yu.AFTER_HEAD:case yu.TEXT:case yu.IN_COLUMN_GROUP:case yu.IN_SELECT:case yu.IN_SELECT_IN_TABLE:case yu.IN_FRAMESET:case yu.AFTER_FRAMESET:{this._insertCharacters(t);break}case yu.IN_BODY:case yu.IN_CAPTION:case yu.IN_CELL:case yu.IN_TEMPLATE:case yu.AFTER_BODY:case yu.AFTER_AFTER_BODY:case yu.AFTER_AFTER_FRAMESET:{bap(this,t);break}case yu.IN_TABLE:case yu.IN_TABLE_BODY:case yu.IN_ROW:{d1s(this,t);break}case yu.IN_TABLE_TEXT:{wap(this,t);break}default:}}};function uOS(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):Pap(e,t),r}function sOS(e,t){let r=null,i=e.openElements.stackTop;for(;i>=0;i--){let n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(r=n)}return r||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),r}function cOS(e,t,r){let i=t,n=e.openElements.getCommonAncestor(t);for(let a=0,u=n;u!==r;a++,u=n){n=e.openElements.getCommonAncestor(u);let l=e.activeFormattingElements.getElementEntry(u),f=l&&a>=aOS;!l||f?(f&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=lOS(e,l),i===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function lOS(e,t){let r=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function fOS(e,t,r){let i=e.treeAdapter.getTagName(t),n=V1i(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(r);else{let a=e.treeAdapter.getNamespaceURI(t);n===vt.TEMPLATE&&a===Sl.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function dOS(e,t,r){let i=e.treeAdapter.getNamespaceURI(r.element),{token:n}=r,a=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,n),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,n.tagID)}function h1s(e,t){for(let r=0;r<nOS;r++){let i=uOS(e,t);if(!i)break;let n=sOS(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;let a=cOS(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(a),u&&fOS(e,u,a),dOS(e,n,i)}}function p1s(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function pOS(e,t){e._appendCommentNode(t,e.openElements.items[0])}function _OS(e,t){e._appendCommentNode(t,e.document)}function y1s(e,t){if(e.stopped=!0,t.location){let r=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=r;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){let a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function hOS(e,t){e._setDocumentType(t);let r=t.forceQuirks?CH.QUIRKS:sap(t);uap(t)||e._err(t,Tc.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=yu.BEFORE_HTML}function IXn(e,t){e._err(t,Tc.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,CH.QUIRKS),e.insertionMode=yu.BEFORE_HTML,e._processToken(t)}function yOS(e,t){t.tagID===vt.HTML?(e._insertElement(t,Sl.HTML),e.insertionMode=yu.BEFORE_HEAD):RXn(e,t)}function vOS(e,t){let r=t.tagID;(r===vt.HTML||r===vt.HEAD||r===vt.BODY||r===vt.BR)&&RXn(e,t)}function RXn(e,t){e._insertFakeRootElement(),e.insertionMode=yu.BEFORE_HEAD,e._processToken(t)}function bOS(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.HEAD:{e._insertElement(t,Sl.HTML),e.headElement=e.openElements.current,e.insertionMode=yu.IN_HEAD;break}default:FXn(e,t)}}function gOS(e,t){let r=t.tagID;r===vt.HEAD||r===vt.BODY||r===vt.HTML||r===vt.BR?FXn(e,t):e._err(t,Tc.endTagWithoutMatchingOpenElement)}function FXn(e,t){e._insertFakeElement(Ws.HEAD,vt.HEAD),e.headElement=e.openElements.current,e.insertionMode=yu.IN_HEAD,e._processToken(t)}function I2t(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.BASE:case vt.BASEFONT:case vt.BGSOUND:case vt.LINK:case vt.META:{e._appendElement(t,Sl.HTML),t.ackSelfClosing=!0;break}case vt.TITLE:{e._switchToTextParsing(t,BH.RCDATA);break}case vt.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,BH.RAWTEXT):(e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_HEAD_NO_SCRIPT);break}case vt.NOFRAMES:case vt.STYLE:{e._switchToTextParsing(t,BH.RAWTEXT);break}case vt.SCRIPT:{e._switchToTextParsing(t,BH.SCRIPT_DATA);break}case vt.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=yu.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(yu.IN_TEMPLATE);break}case vt.HEAD:{e._err(t,Tc.misplacedStartTagForHeadElement);break}default:NXn(e,t)}}function OOS(e,t){switch(t.tagID){case vt.HEAD:{e.openElements.pop(),e.insertionMode=yu.AFTER_HEAD;break}case vt.BODY:case vt.BR:case vt.HTML:{NXn(e,t);break}case vt.TEMPLATE:{W1i(e,t);break}default:e._err(t,Tc.endTagWithoutMatchingOpenElement)}}function W1i(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==vt.TEMPLATE&&e._err(t,Tc.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(vt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Tc.endTagWithoutMatchingOpenElement)}function NXn(e,t){e.openElements.pop(),e.insertionMode=yu.AFTER_HEAD,e._processToken(t)}function mOS(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.BASEFONT:case vt.BGSOUND:case vt.HEAD:case vt.LINK:case vt.META:case vt.NOFRAMES:case vt.STYLE:{I2t(e,t);break}case vt.NOSCRIPT:{e._err(t,Tc.nestedNoscriptInHead);break}default:LXn(e,t)}}function POS(e,t){switch(t.tagID){case vt.NOSCRIPT:{e.openElements.pop(),e.insertionMode=yu.IN_HEAD;break}case vt.BR:{LXn(e,t);break}default:e._err(t,Tc.endTagWithoutMatchingOpenElement)}}function LXn(e,t){let r=t.type===oS.EOF?Tc.openElementsLeftAfterEof:Tc.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=yu.IN_HEAD,e._processToken(t)}function jOS(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.BODY:{e._insertElement(t,Sl.HTML),e.framesetOk=!1,e.insertionMode=yu.IN_BODY;break}case vt.FRAMESET:{e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_FRAMESET;break}case vt.BASE:case vt.BASEFONT:case vt.BGSOUND:case vt.LINK:case vt.META:case vt.NOFRAMES:case vt.SCRIPT:case vt.STYLE:case vt.TEMPLATE:case vt.TITLE:{e._err(t,Tc.abandonedHeadElementChild),e.openElements.push(e.headElement,vt.HEAD),I2t(e,t),e.openElements.remove(e.headElement);break}case vt.HEAD:{e._err(t,Tc.misplacedStartTagForHeadElement);break}default:UXn(e,t)}}function wOS(e,t){switch(t.tagID){case vt.BODY:case vt.HTML:case vt.BR:{UXn(e,t);break}case vt.TEMPLATE:{W1i(e,t);break}default:e._err(t,Tc.endTagWithoutMatchingOpenElement)}}function UXn(e,t){e._insertFakeElement(Ws.BODY,vt.BODY),e.insertionMode=yu.IN_BODY,ypo(e,t)}function ypo(e,t){switch(t.type){case oS.CHARACTER:{gap(e,t);break}case oS.WHITESPACE_CHARACTER:{bap(e,t);break}case oS.COMMENT:{p1s(e,t);break}case oS.START_TAG:{xH(e,t);break}case oS.END_TAG:{vpo(e,t);break}case oS.EOF:{jap(e,t);break}default:}}function bap(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function gap(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function SOS(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function DOS(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function EOS(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_FRAMESET)}function AOS(e,t){e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._insertElement(t,Sl.HTML)}function MOS(e,t){e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),upo(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Sl.HTML)}function qOS(e,t){e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._insertElement(t,Sl.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function TOS(e,t){let r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._insertElement(t,Sl.HTML),r||(e.formElement=e.openElements.current))}function COS(e,t){e.framesetOk=!1;let r=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){let n=e.openElements.tagIDs[i];if(r===vt.LI&&n===vt.LI||(r===vt.DD||r===vt.DT)&&(n===vt.DD||n===vt.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==vt.ADDRESS&&n!==vt.DIV&&n!==vt.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._insertElement(t,Sl.HTML)}function BOS(e,t){e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._insertElement(t,Sl.HTML),e.tokenizer.state=BH.PLAINTEXT}function xOS(e,t){e.openElements.hasInScope(vt.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(vt.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML),e.framesetOk=!1}function IOS(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(Ws.A);r&&(h1s(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zOS(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ROS(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(vt.NOBR)&&(h1s(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Sl.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FOS(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function NOS(e,t){e.treeAdapter.getDocumentMode(e.document)!==CH.QUIRKS&&e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._insertElement(t,Sl.HTML),e.framesetOk=!1,e.insertionMode=yu.IN_TABLE}function Oap(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Sl.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function map(e){let t=opo(e,eQt.TYPE);return t!=null&&t.toLowerCase()===iOS}function LOS(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Sl.HTML),map(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function UOS(e,t){e._appendElement(t,Sl.HTML),t.ackSelfClosing=!0}function VOS(e,t){e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._appendElement(t,Sl.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function WOS(e,t){t.tagName=Ws.IMG,t.tagID=vt.IMG,Oap(e,t)}function HOS(e,t){e._insertElement(t,Sl.HTML),e.skipNextNewLine=!0,e.tokenizer.state=BH.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=yu.TEXT}function $OS(e,t){e.openElements.hasInButtonScope(vt.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,BH.RAWTEXT)}function GOS(e,t){e.framesetOk=!1,e._switchToTextParsing(t,BH.RAWTEXT)}function hap(e,t){e._switchToTextParsing(t,BH.RAWTEXT)}function QOS(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===yu.IN_TABLE||e.insertionMode===yu.IN_CAPTION||e.insertionMode===yu.IN_TABLE_BODY||e.insertionMode===yu.IN_ROW||e.insertionMode===yu.IN_CELL?yu.IN_SELECT_IN_TABLE:yu.IN_SELECT}function JOS(e,t){e.openElements.currentTagId===vt.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML)}function KOS(e,t){e.openElements.hasInScope(vt.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Sl.HTML)}function YOS(e,t){e.openElements.hasInScope(vt.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(vt.RTC),e._insertElement(t,Sl.HTML)}function XOS(e,t){e._reconstructActiveFormattingElements(),l1s(t),dpo(t),t.selfClosing?e._appendElement(t,Sl.MATHML):e._insertElement(t,Sl.MATHML),t.ackSelfClosing=!0}function ZOS(e,t){e._reconstructActiveFormattingElements(),f1s(t),dpo(t),t.selfClosing?e._appendElement(t,Sl.SVG):e._insertElement(t,Sl.SVG),t.ackSelfClosing=!0}function yap(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Sl.HTML)}function xH(e,t){switch(t.tagID){case vt.I:case vt.S:case vt.B:case vt.U:case vt.EM:case vt.TT:case vt.BIG:case vt.CODE:case vt.FONT:case vt.SMALL:case vt.STRIKE:case vt.STRONG:{zOS(e,t);break}case vt.A:{IOS(e,t);break}case vt.H1:case vt.H2:case vt.H3:case vt.H4:case vt.H5:case vt.H6:{MOS(e,t);break}case vt.P:case vt.DL:case vt.OL:case vt.UL:case vt.DIV:case vt.DIR:case vt.NAV:case vt.MAIN:case vt.MENU:case vt.ASIDE:case vt.CENTER:case vt.FIGURE:case vt.FOOTER:case vt.HEADER:case vt.HGROUP:case vt.DIALOG:case vt.DETAILS:case vt.ADDRESS:case vt.ARTICLE:case vt.SECTION:case vt.SUMMARY:case vt.FIELDSET:case vt.BLOCKQUOTE:case vt.FIGCAPTION:{AOS(e,t);break}case vt.LI:case vt.DD:case vt.DT:{COS(e,t);break}case vt.BR:case vt.IMG:case vt.WBR:case vt.AREA:case vt.EMBED:case vt.KEYGEN:{Oap(e,t);break}case vt.HR:{VOS(e,t);break}case vt.RB:case vt.RTC:{KOS(e,t);break}case vt.RT:case vt.RP:{YOS(e,t);break}case vt.PRE:case vt.LISTING:{qOS(e,t);break}case vt.XMP:{$OS(e,t);break}case vt.SVG:{ZOS(e,t);break}case vt.HTML:{SOS(e,t);break}case vt.BASE:case vt.LINK:case vt.META:case vt.STYLE:case vt.TITLE:case vt.SCRIPT:case vt.BGSOUND:case vt.BASEFONT:case vt.TEMPLATE:{I2t(e,t);break}case vt.BODY:{DOS(e,t);break}case vt.FORM:{TOS(e,t);break}case vt.NOBR:{ROS(e,t);break}case vt.MATH:{XOS(e,t);break}case vt.TABLE:{NOS(e,t);break}case vt.INPUT:{LOS(e,t);break}case vt.PARAM:case vt.TRACK:case vt.SOURCE:{UOS(e,t);break}case vt.IMAGE:{WOS(e,t);break}case vt.BUTTON:{xOS(e,t);break}case vt.APPLET:case vt.OBJECT:case vt.MARQUEE:{FOS(e,t);break}case vt.IFRAME:{GOS(e,t);break}case vt.SELECT:{QOS(e,t);break}case vt.OPTION:case vt.OPTGROUP:{JOS(e,t);break}case vt.NOEMBED:{hap(e,t);break}case vt.FRAMESET:{EOS(e,t);break}case vt.TEXTAREA:{HOS(e,t);break}case vt.NOSCRIPT:{e.options.scriptingEnabled?hap(e,t):yap(e,t);break}case vt.PLAINTEXT:{BOS(e,t);break}case vt.COL:case vt.TH:case vt.TD:case vt.TR:case vt.HEAD:case vt.FRAME:case vt.TBODY:case vt.TFOOT:case vt.THEAD:case vt.CAPTION:case vt.COLGROUP:break;default:yap(e,t)}}function kOS(e,t){if(e.openElements.hasInScope(vt.BODY)&&(e.insertionMode=yu.AFTER_BODY,e.options.sourceCodeLocationInfo)){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function emS(e,t){e.openElements.hasInScope(vt.BODY)&&(e.insertionMode=yu.AFTER_BODY,Cap(e,t))}function tmS(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function rmS(e){let t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(vt.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(vt.FORM):r&&e.openElements.remove(r))}function imS(e){e.openElements.hasInButtonScope(vt.P)||e._insertFakeElement(Ws.P,vt.P),e._closePElement()}function nmS(e){e.openElements.hasInListItemScope(vt.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(vt.LI),e.openElements.popUntilTagNamePopped(vt.LI))}function amS(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function omS(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function umS(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function smS(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Ws.BR,vt.BR),e.openElements.pop(),e.framesetOk=!1}function Pap(e,t){let r=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){let a=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==vt.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(a,u))break}}function vpo(e,t){switch(t.tagID){case vt.A:case vt.B:case vt.I:case vt.S:case vt.U:case vt.EM:case vt.TT:case vt.BIG:case vt.CODE:case vt.FONT:case vt.NOBR:case vt.SMALL:case vt.STRIKE:case vt.STRONG:{h1s(e,t);break}case vt.P:{imS(e);break}case vt.DL:case vt.UL:case vt.OL:case vt.DIR:case vt.DIV:case vt.NAV:case vt.PRE:case vt.MAIN:case vt.MENU:case vt.ASIDE:case vt.BUTTON:case vt.CENTER:case vt.FIGURE:case vt.FOOTER:case vt.HEADER:case vt.HGROUP:case vt.DIALOG:case vt.ADDRESS:case vt.ARTICLE:case vt.DETAILS:case vt.SECTION:case vt.SUMMARY:case vt.LISTING:case vt.FIELDSET:case vt.BLOCKQUOTE:case vt.FIGCAPTION:{tmS(e,t);break}case vt.LI:{nmS(e);break}case vt.DD:case vt.DT:{amS(e,t);break}case vt.H1:case vt.H2:case vt.H3:case vt.H4:case vt.H5:case vt.H6:{omS(e);break}case vt.BR:{smS(e);break}case vt.BODY:{kOS(e,t);break}case vt.HTML:{emS(e,t);break}case vt.FORM:{rmS(e);break}case vt.APPLET:case vt.OBJECT:case vt.MARQUEE:{umS(e,t);break}case vt.TEMPLATE:{W1i(e,t);break}default:Pap(e,t)}}function jap(e,t){e.tmplInsertionModeStack.length>0?Tap(e,t):y1s(e,t)}function cmS(e,t){var r;t.tagID===vt.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function lmS(e,t){e._err(t,Tc.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function d1s(e,t){if(vap.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=yu.IN_TABLE_TEXT,t.type){case oS.CHARACTER:{Sap(e,t);break}case oS.WHITESPACE_CHARACTER:{wap(e,t);break}}else WXn(e,t)}function fmS(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_CAPTION}function dmS(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_COLUMN_GROUP}function pmS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Ws.COLGROUP,vt.COLGROUP),e.insertionMode=yu.IN_COLUMN_GROUP,v1s(e,t)}function _mS(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_TABLE_BODY}function hmS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Ws.TBODY,vt.TBODY),e.insertionMode=yu.IN_TABLE_BODY,bpo(e,t)}function ymS(e,t){e.openElements.hasInTableScope(vt.TABLE)&&(e.openElements.popUntilTagNamePopped(vt.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function vmS(e,t){map(t)?e._appendElement(t,Sl.HTML):WXn(e,t),t.ackSelfClosing=!0}function bmS(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Sl.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ofn(e,t){switch(t.tagID){case vt.TD:case vt.TH:case vt.TR:{hmS(e,t);break}case vt.STYLE:case vt.SCRIPT:case vt.TEMPLATE:{I2t(e,t);break}case vt.COL:{pmS(e,t);break}case vt.FORM:{bmS(e,t);break}case vt.TABLE:{ymS(e,t);break}case vt.TBODY:case vt.TFOOT:case vt.THEAD:{_mS(e,t);break}case vt.INPUT:{vmS(e,t);break}case vt.CAPTION:{fmS(e,t);break}case vt.COLGROUP:{dmS(e,t);break}default:WXn(e,t)}}function VXn(e,t){switch(t.tagID){case vt.TABLE:{e.openElements.hasInTableScope(vt.TABLE)&&(e.openElements.popUntilTagNamePopped(vt.TABLE),e._resetInsertionMode());break}case vt.TEMPLATE:{W1i(e,t);break}case vt.BODY:case vt.CAPTION:case vt.COL:case vt.COLGROUP:case vt.HTML:case vt.TBODY:case vt.TD:case vt.TFOOT:case vt.TH:case vt.THEAD:case vt.TR:break;default:WXn(e,t)}}function WXn(e,t){let r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ypo(e,t),e.fosterParentingEnabled=r}function wap(e,t){e.pendingCharacterTokens.push(t)}function Sap(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function zXn(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)WXn(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Dap=new Set([vt.CAPTION,vt.COL,vt.COLGROUP,vt.TBODY,vt.TD,vt.TFOOT,vt.TH,vt.THEAD,vt.TR]);function gmS(e,t){let r=t.tagID;Dap.has(r)?e.openElements.hasInTableScope(vt.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(vt.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=yu.IN_TABLE,Ofn(e,t)):xH(e,t)}function OmS(e,t){let r=t.tagID;switch(r){case vt.CAPTION:case vt.TABLE:{e.openElements.hasInTableScope(vt.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(vt.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=yu.IN_TABLE,r===vt.TABLE&&VXn(e,t));break}case vt.BODY:case vt.COL:case vt.COLGROUP:case vt.HTML:case vt.TBODY:case vt.TD:case vt.TFOOT:case vt.TH:case vt.THEAD:case vt.TR:break;default:vpo(e,t)}}function v1s(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.COL:{e._appendElement(t,Sl.HTML),t.ackSelfClosing=!0;break}case vt.TEMPLATE:{I2t(e,t);break}default:_po(e,t)}}function mmS(e,t){switch(t.tagID){case vt.COLGROUP:{e.openElements.currentTagId===vt.COLGROUP&&(e.openElements.pop(),e.insertionMode=yu.IN_TABLE);break}case vt.TEMPLATE:{W1i(e,t);break}case vt.COL:break;default:_po(e,t)}}function _po(e,t){e.openElements.currentTagId===vt.COLGROUP&&(e.openElements.pop(),e.insertionMode=yu.IN_TABLE,e._processToken(t))}function bpo(e,t){switch(t.tagID){case vt.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_ROW;break}case vt.TH:case vt.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Ws.TR,vt.TR),e.insertionMode=yu.IN_ROW,gpo(e,t);break}case vt.CAPTION:case vt.COL:case vt.COLGROUP:case vt.TBODY:case vt.TFOOT:case vt.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE,Ofn(e,t));break}default:Ofn(e,t)}}function _1s(e,t){let r=t.tagID;switch(t.tagID){case vt.TBODY:case vt.TFOOT:case vt.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE);break}case vt.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE,VXn(e,t));break}case vt.BODY:case vt.CAPTION:case vt.COL:case vt.COLGROUP:case vt.HTML:case vt.TD:case vt.TH:case vt.TR:break;default:VXn(e,t)}}function gpo(e,t){switch(t.tagID){case vt.TH:case vt.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Sl.HTML),e.insertionMode=yu.IN_CELL,e.activeFormattingElements.insertMarker();break}case vt.CAPTION:case vt.COL:case vt.COLGROUP:case vt.TBODY:case vt.TFOOT:case vt.THEAD:case vt.TR:{e.openElements.hasInTableScope(vt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE_BODY,bpo(e,t));break}default:Ofn(e,t)}}function Eap(e,t){switch(t.tagID){case vt.TR:{e.openElements.hasInTableScope(vt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE_BODY);break}case vt.TABLE:{e.openElements.hasInTableScope(vt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE_BODY,_1s(e,t));break}case vt.TBODY:case vt.TFOOT:case vt.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(vt.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=yu.IN_TABLE_BODY,_1s(e,t));break}case vt.BODY:case vt.CAPTION:case vt.COL:case vt.COLGROUP:case vt.HTML:case vt.TD:case vt.TH:break;default:VXn(e,t)}}function PmS(e,t){let r=t.tagID;Dap.has(r)?(e.openElements.hasInTableScope(vt.TD)||e.openElements.hasInTableScope(vt.TH))&&(e._closeTableCell(),gpo(e,t)):xH(e,t)}function jmS(e,t){let r=t.tagID;switch(r){case vt.TD:case vt.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=yu.IN_ROW);break}case vt.TABLE:case vt.TBODY:case vt.TFOOT:case vt.THEAD:case vt.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),Eap(e,t));break}case vt.BODY:case vt.CAPTION:case vt.COL:case vt.COLGROUP:case vt.HTML:break;default:vpo(e,t)}}function Aap(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.OPTION:{e.openElements.currentTagId===vt.OPTION&&e.openElements.pop(),e._insertElement(t,Sl.HTML);break}case vt.OPTGROUP:{e.openElements.currentTagId===vt.OPTION&&e.openElements.pop(),e.openElements.currentTagId===vt.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Sl.HTML);break}case vt.INPUT:case vt.KEYGEN:case vt.TEXTAREA:case vt.SELECT:{e.openElements.hasInSelectScope(vt.SELECT)&&(e.openElements.popUntilTagNamePopped(vt.SELECT),e._resetInsertionMode(),t.tagID!==vt.SELECT&&e._processStartTag(t));break}case vt.SCRIPT:case vt.TEMPLATE:{I2t(e,t);break}default:}}function qap(e,t){switch(t.tagID){case vt.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===vt.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===vt.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===vt.OPTGROUP&&e.openElements.pop();break}case vt.OPTION:{e.openElements.currentTagId===vt.OPTION&&e.openElements.pop();break}case vt.SELECT:{e.openElements.hasInSelectScope(vt.SELECT)&&(e.openElements.popUntilTagNamePopped(vt.SELECT),e._resetInsertionMode());break}case vt.TEMPLATE:{W1i(e,t);break}default:}}function wmS(e,t){let r=t.tagID;r===vt.CAPTION||r===vt.TABLE||r===vt.TBODY||r===vt.TFOOT||r===vt.THEAD||r===vt.TR||r===vt.TD||r===vt.TH?(e.openElements.popUntilTagNamePopped(vt.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Aap(e,t)}function SmS(e,t){let r=t.tagID;r===vt.CAPTION||r===vt.TABLE||r===vt.TBODY||r===vt.TFOOT||r===vt.THEAD||r===vt.TR||r===vt.TD||r===vt.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(vt.SELECT),e._resetInsertionMode(),e.onEndTag(t)):qap(e,t)}function DmS(e,t){switch(t.tagID){case vt.BASE:case vt.BASEFONT:case vt.BGSOUND:case vt.LINK:case vt.META:case vt.NOFRAMES:case vt.SCRIPT:case vt.STYLE:case vt.TEMPLATE:case vt.TITLE:{I2t(e,t);break}case vt.CAPTION:case vt.COLGROUP:case vt.TBODY:case vt.TFOOT:case vt.THEAD:{e.tmplInsertionModeStack[0]=yu.IN_TABLE,e.insertionMode=yu.IN_TABLE,Ofn(e,t);break}case vt.COL:{e.tmplInsertionModeStack[0]=yu.IN_COLUMN_GROUP,e.insertionMode=yu.IN_COLUMN_GROUP,v1s(e,t);break}case vt.TR:{e.tmplInsertionModeStack[0]=yu.IN_TABLE_BODY,e.insertionMode=yu.IN_TABLE_BODY,bpo(e,t);break}case vt.TD:case vt.TH:{e.tmplInsertionModeStack[0]=yu.IN_ROW,e.insertionMode=yu.IN_ROW,gpo(e,t);break}default:e.tmplInsertionModeStack[0]=yu.IN_BODY,e.insertionMode=yu.IN_BODY,xH(e,t)}}function EmS(e,t){t.tagID===vt.TEMPLATE&&W1i(e,t)}function Tap(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(vt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):y1s(e,t)}function AmS(e,t){t.tagID===vt.HTML?xH(e,t):hpo(e,t)}function Cap(e,t){var r;if(t.tagID===vt.HTML){if(e.fragmentContext||(e.insertionMode=yu.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===vt.HTML){e._setEndLocation(e.openElements.items[0],t);let i=e.openElements.items[1];i&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(i))===null||r===void 0)&&r.endTag)&&e._setEndLocation(i,t)}}else hpo(e,t)}function hpo(e,t){e.insertionMode=yu.IN_BODY,ypo(e,t)}function MmS(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.FRAMESET:{e._insertElement(t,Sl.HTML);break}case vt.FRAME:{e._appendElement(t,Sl.HTML),t.ackSelfClosing=!0;break}case vt.NOFRAMES:{I2t(e,t);break}default:}}function qmS(e,t){t.tagID===vt.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==vt.FRAMESET&&(e.insertionMode=yu.AFTER_FRAMESET))}function TmS(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.NOFRAMES:{I2t(e,t);break}default:}}function CmS(e,t){t.tagID===vt.HTML&&(e.insertionMode=yu.AFTER_AFTER_FRAMESET)}function BmS(e,t){t.tagID===vt.HTML?xH(e,t):ppo(e,t)}function ppo(e,t){e.insertionMode=yu.IN_BODY,ypo(e,t)}function xmS(e,t){switch(t.tagID){case vt.HTML:{xH(e,t);break}case vt.NOFRAMES:{I2t(e,t);break}default:}}function ImS(e,t){t.chars=QT,e._insertCharacters(t)}function zmS(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bap(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Sl.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function RmS(e,t){if(lap(t))Bap(e),e._startTagOutsideForeignContent(t);else{let r=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(r);i===Sl.MATHML?l1s(t):i===Sl.SVG&&(fap(t),f1s(t)),dpo(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function FmS(e,t){if(t.tagID===vt.P||t.tagID===vt.BR){Bap(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){let i=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(i)===Sl.HTML){e._endTagOutsideForeignContent(t);break}let n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(r);break}}}var NmS=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),$L7=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function b1s(e,t){return function(i){let n,a=0,u="";for(;n=e.exec(i);)a!==n.index&&(u+=i.substring(a,n.index)),u+=t.get(n[0].charCodeAt(0)),a=n.index+1;return u+i.substring(a)}}var GL7=b1s(/[&<>'"]/g,NmS),LmS=b1s(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),UmS=b1s(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var ZL7=new Set([Ws.AREA,Ws.BASE,Ws.BASEFONT,Ws.BGSOUND,Ws.BR,Ws.COL,Ws.EMBED,Ws.FRAME,Ws.HR,Ws.IMG,Ws.INPUT,Ws.KEYGEN,Ws.LINK,Ws.META,Ws.PARAM,Ws.SOURCE,Ws.TRACK,Ws.WBR]);function xap(e,t){return gfn.parse(e,t)}function Iap(e,t,r){typeof e=="string"&&(r=t,t=e,e=null);let i=gfn.getFragmentParser(e,r);return i.tokenizer.write(t,!0),i.getFragment()}var zap={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}};var VmS="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",WmS=/-[a-z]/g,HmS=/%c(?:([-+])(\d+))?/g,$mS=/%x/g,GmS={2:!0,1:!1,0:null},QmS={};function g1s(e,t){let r=t||QmS,i=r.onerror,n=e instanceof vei?e:new vei(e),a=r.fragment?Iap:xap,u=String(n),l=a(u,{sourceCodeLocationInfo:!0,onParseError:r.onerror?f:null,scriptingEnabled:!1});return t1s(l,{file:n,space:r.space,verbose:r.verbose});function f(s){let o=s.code,c=JmS(o),b=r[c],g=b??!0,O=typeof g=="number"?g:g?1:0;if(O){let w=zap[c];let A=new Tm(m(w.reason),{place:{start:{line:s.startLine,column:s.startCol,offset:s.startOffset},end:{line:s.endLine,column:s.endCol,offset:s.endOffset}},ruleId:o,source:"hast-util-from-html"});n.path&&(A.file=n.path,A.name=n.path+":"+A.name),A.fatal=GmS[O],A.note=m(w.description),A.url=w.url===!1?void 0:VmS+o,i(A)}function m(w){return w.replace(HmS,A).replace($mS,M);function A(q,D,C){let R=(C?Number.parseInt(C,10):0)*(D==="-"?-1:1),$=u.charAt(s.startOffset+R);return YmS($)}function M(){return XmS(u.charCodeAt(s.startOffset))}}}}function JmS(e){return e.replace(WmS,KmS)}function KmS(e){return e.charAt(1).toUpperCase()}function YmS(e){return e==="`"?"` ` `":e}function XmS(e){return"0x"+e.toString(16).toUpperCase()}function Opo(e){let t=this,{emitParseErrors:r,...i}={...t.data("settings"),...e};t.parser=n;function n(a,u){return g1s(a,{...i,onerror:r?function(l){u.path&&(l.name=u.path+":"+l.name,l.file=u.path),u.messages.push(l)}:void 0})}}function mei(e){return bei().use(Opo).use(Fdo).use(cip).parse(e)}function mfn(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function O1s(e){return e.startsWith("/")?e.substring(1):e}function mpo(e){return mfn(O1s(e))}async function m1s(e,t,r,i={externalLink:!1}){let n=new URL(r);if(i.externalLink){let b=t,g=`${b}.mdx`;return IPs(g,"","","",n.toString()),{success:!0,data:[n.toString(),b]}}let a=mei(t);gws(a);let u=n.toString(),l=Tnp(a);if(!l)return{success:!1,data:void 0};let f={type:"root",children:[l]},s=bei().use(iip).use(hip).use(pip).use(Onp).use(Pnp).use(wnp).use(Enp).use(Anp).use(jnp).use(Snp).use(mnp).use(Dnp).use(nip).use(oip).use(Fdo).use(lnp).use(Mnp).use(lip).use(dip).use(fip).use(yip).use(aip).use(sip).use(_ip).runSync(f);await qnp(s,r);let o=bep(s),c=gep(s);try{let b=bei().use(Cdo).use(hdo).use(Bdo).stringify(s),g=String(b).replace(/\n{3,}/g,`
1884
1884
 
1885
- `);return i.rootPath?n=new URL(i.rootPath,n.origin):n.origin===mfn(n.toString())&&(n=new URL("home",new URL(n).origin)),IPs(r,o,c,g),e.logger.debug(`Successfully parsed page ${u}`),{success:!0,data:i.rootPath?[mpo(new URL(u).pathname),i.rootPath]:void 0}}catch(b){return e.logger.debug(`Error parsing page ${u}: ${b}`),{success:!1,data:[u,""]}}}function*ZmS(e,t=16){let r=0;for(;r<e.length;)yield e.slice(r,r+t),r+=t}async function Ppo(e,t,r={externalLinks:!1}){let i=[];for(let n of ZmS(t)){let a=await Promise.all(n.map(async(u,l)=>{try{if(r.externalLinks)return e.logger.debug(`Scraping external link with URL: ${u}...`),m1s(e,`external-link-${l}`,u,{externalLink:!0});{let f=await YYn({url:u});return e.logger.debug(`Scraping internal link with URL: ${u}...`),m1s(e,f,u,{externalLink:!1,rootPath:r.rootPaths?r.rootPaths[l]:void 0})}}catch{return{success:!1,data:void 0}}}));i.push(...a)}return i}function Rap(e){let t;return Ff(e,"element",function(r){return r.tagName==="div"&&r.properties.className&&Array.isArray(r.properties.className)&&r.properties.className.includes("hub-sidebar-content")?(t=r,VP):e_}),t}function HXn({node:e,tagName:t}){let r;return Ff(e,"element",function(i){return i.tagName===t?(r=i,VP):e_}),r}function jpo(e){if(!e)return"";let t="";return Ff(e,"text",function(r){t+=r.value}),t}function Fap(e){let t=[];return Ff(e,"element",function(r){if(r.tagName==="section"&&r.properties.className&&Array.isArray(r.properties.className)&&r.properties.className.includes("rm-Sidebar-section")){let i=HXn({node:r,tagName:"h2"}),n=i?jpo(i):"",u=Nap(r).flatMap(l=>typeof l=="string"?l:l.pages);t.push({group:n,pages:u})}}),t}function Nap(e){let t=[],r="section",i="h2";return Ff(e,"element",function(n,a,u){if(n.tagName===r&&(n.tagName="li"),n.tagName!=="li")return e_;let l;n.children[0]&&n.children[1]&&n.children[0].type==="element"&&n.children[0].tagName==="div"&&n.children[1].type==="element"&&n.children[1].tagName==="ul"&&n.children[0].children.filter(s=>s.type==="text").length===n.children[0].children.length&&(l=PBe(n.children[0],{delete:!1})),n.children.length===2&&n.children[1]&&n.children[1].type==="element"&&n.children[1].tagName==="ul"&&typeof a=="number"&&u&&(n.children=[{type:"element",tagName:"div",properties:{},children:n.children}]);let f=kmS({node:n,sectionTagName:i,childListTagName:"ul",title:l});return f!==void 0?(t.push(f),u2t):e_}),t}function kmS({node:e,sectionTagName:t="section",childListTagName:r="ul",title:i}){let n=HXn({node:e,tagName:"a"});if(!n)return;let a;if(a=n.properties.href,a===void 0||a==="#")return;let u=!1;if(Ff(n,"element",function(b){return b.tagName==="span"&&Array.isArray(b.properties.className)&&b.properties.className.includes("rm-APIMethod")?(u=!0,VP):e_}),u)return;a.startsWith("/")&&(a=a.substring(1));let l=HXn({node:e,tagName:t}),f=HXn({node:e,tagName:r});if(!f)return a;let s=i;s||(s=jpo(n)||jpo(l)||"");let o=Nap(f),c=a;return a!=="#"&&(o.includes(a)&&o.forEach((b,g)=>{b===a&&(o[g]=c)}),o.includes(c)||o.unshift(c)),{group:s,pages:o}}function Lap(e){let t;if(Ff(e,"element",function(i){return i.tagName==="header"&&i.properties.className&&Array.isArray(i.properties.className)&&i.properties.className.includes("rm-Header")?(t=i,VP):e_}),!t)return;let r=[];return Ff(t,"element",function(i){return i.tagName!=="nav"&&!(i.tagName==="div"&&i.properties.className&&Array.isArray(i.properties.className)&&i.properties.className.includes("rm-Header-right"))?e_:(Ff(i,"element",function(n){if(n.tagName!=="a"||!n.properties.href||typeof n.properties.href!="string"||n.properties.href.startsWith("http"))return e_;let a=PBe(n);return r.push({name:a||Xfo(n.properties.href),url:n.properties.href}),e_}),e_)}),r}function Uap(e){if(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e))return e;e=e.trim().toLowerCase();let t,r,i;if(/^\d+\s+\d+\s+\d+(\s+[0-9.]+)?$/.test(e))[t,r,i]=e.split(/\s+/).map(Number);else{let a=e.match(/^rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)$/);if(!a)return;[,t,r,i]=a.map(Number)}if(!t||!r||!i||t<0||t>255||r<0||r>255||i<0||i>255)return;let n=a=>Math.round(a).toString(16).padStart(2,"0");return`#${n(t)}${n(r)}${n(i)}`.toUpperCase()}async function Vap(e){let t,r;return Ff(e,"element",function(i){if(i.tagName!=="style"||i.properties.title!=="rm-custom-css"||i.children.length!==1||!i.children[0]||i.children[0].type!=="text")return e_;let n=i.children[0].value,a="--color-link-primary",u=new RegExp(`${a}\\s*[:|,]\\s*([^;)]+)`,"i"),l=n.match(u)?.[1]?.trim(),f=n.match(u)?.[1]?.trim();return!l||!f?e_:(t=Uap(l),r=Uap(f),e_)}),t&&r?{accentPrimary:{dark:t,light:r},background:{dark:void 0,light:void 0}}:t?{accentPrimary:{dark:t,light:t},background:{dark:void 0,light:void 0}}:NQn}function ePS(e){let t=[];return Ff(e,"element",r=>{r.tagName==="img"&&Array.isArray(r.properties.className)&&r.properties.className.includes("rm-Logo-img")&&t.push(r)}),t.length>0?t:void 0}async function Wap(e,t){let r=mei(e),i=ePS(r);if(i!=null){let n=await Promise.all(i.map(async a=>{let u=await efn(a.properties.src);return u.success&&u.data?u.data[1]:""}));t.push(...n)}for(let n=t.length-1;n>=0;n--)t[n]||t.splice(n,1)}var Hap=28;async function P1s(e,t){e=new URL(e);let r=[];if(t){let n=[];try{let a=await t.newPage();await a.goto(e.toString(),{waitUntil:"networkidle2"}),n.push(await a.content()),await a.click(".rm-ThemeToggle"),n.push(await a.content())}catch{}await Promise.all(n.map(async a=>await Wap(a,r)))}let i=[...new Set(r).values()];if(i.length!==0){if(i.length===1&&i[0]!=null){let n=yo.of(HW(i[0]));return{light:n,dark:n,height:Hap}}if(i[0]!=null&&i[1]!=null){let n=yo.of(HW(i[0])),a=yo.of(HW(i[1]));return{light:n,dark:a,height:Hap}}}}function $ap(e,t){return e.flatMap(r=>Gap(r,t))}function Gap(e,t){return typeof e=="string"?[new URL(e,t)]:typeof e=="object"&&e!=null&&"pages"in e&&Array.isArray(e.pages)?e.pages.flatMap(r=>typeof r=="string"?new URL(r,t):Gap(r,t)):[]}var Qap=["Home","Introduction","Getting Started","Get Started","Welcome","Start","Docs"];function Jap(e,t){for(let r of e)if(!t.includes(r))return r;return""}var wpo=class extends twi{documentationTab=void 0;tabUrlToInfo={};async import({args:t,builder:r}){let i=new URL(t.readmeUrl),n=await YYn({url:i}),a=Kl.of((0,Kap.join)(process.cwd(),"fern"));this.context.logger.debug("Successfully fetched HTML from Readme Docs Site");let u=mei(n);if(!r8d(u)){this.context.logger.error("The provided URL is not a Readme Docs Site");return}let s=(await this.scrapeAllSiteTabs(n,i)).data;if(!s){this.context.logger.error("Failed to scrape site tabs");return}this.context.logger.debug("Successfully scraped all site tabs"),s.logo&&r.setLogo({logo:s.logo});let o=yo.of(s.favicon.substring(1));r.setFavicon({favicon:o}),s.colors!=null&&r.setColors({colors:s.colors}),r.setLayout({layout:bQn});for(let b of s.tabs??[]){let g=O1s(b.url);b.name!=="API Reference"&&(this.tabUrlToInfo[g]={name:b.name,url:g,navigationBuilder:r.getNavigationBuilder({tabId:g,tabConfig:{slug:g,displayName:b.name}})})}for(let b of s.navigation){let g=await nbs({absolutePathToOutput:a,item:b,builder:r,context:this.context}),O=await this.getNavigationBuilder({navItem:b,builder:r});g!=null&&O.addItem({item:g})}let c=r.setInstance({companyName:t.organization});this.context.logger.debug(`Added instance ${c} to docs.yml`)}async scrapeAllSiteTabs(t,r){this.context.logger.debug(`Initializing site scraper from URL: ${r}`);let i=new URL(r),n=mei(t),a=Lap(n);if(!a||!a.length||a.length===1&&a[0]&&a[0].url===i.pathname)return this.scrapeSite(t,i,{hast:n});a.find(w=>i.pathname.startsWith(w.url))||a.push({name:Xfo(i.pathname),url:i.pathname});let u=await Promise.all(a.map(async w=>{if(w.url.startsWith("/reference"))return{success:!1,data:void 0};let A=new URL(r);A.pathname=w.url;try{let M=await YYn({url:A});return await this.scrapeSite(M,A,{tabs:[w]})}catch{return{success:!1,data:void 0}}})),l=[],f=[],s=NQn,o="/favicon.svg";u.filter(w=>w.success).forEach(w=>{this.context.logger.debug(`Successfully scraped tab: ${w.data?.name}`),w.data&&(l.push(...w.data.navigation),w.data.tabs&&f.push(...w.data.tabs),w.data.favicon!=="/favicon.svg"&&(o=w.data.favicon),w.data.colors!==NQn&&(s=w.data.colors))}),u.filter(w=>!w.success).forEach(w=>{this.context.logger.info(`Failed to scrape tab: ${w.message}`)});let g=await CPs(),O=await P1s(i,g),m=await zPs(n);return g&&await g.close(),{success:!0,data:{name:m,logo:O,navigation:l,tabs:f,favicon:o,colors:s}}}async scrapeSite(t,r,i={}){this.context.logger.debug(`Scraping site with URL: ${r}`);let n=i.hast;n||(n=mei(t));let u=new URL(r).origin;if(u==="")return{success:!1,message:`Invalid URL: ${r}`};let l=Rap(n);if(!l)return{success:!1,message:`${r.toString()}: Failed to find sidebar element`};let f=Fap(l),s=f.flatMap(w=>w.pages),o=$ap(s,u);if(o.length===0)return{success:!1,message:`No navigation items found for URL: ${r}`};let c=o.filter(w=>w.origin!==u),b=o.filter(w=>w.origin===u&&mfn(w.toString())!==u),g=o.filter(w=>w.origin===u&&mfn(w.toString())===u),O=[...b.map(w=>w.toString()),...g.map(w=>w.toString())],m=g.map(()=>{let w=Jap(Qap,O);return O.push(w),w});try{let w=await Ppo(this.context,c,{externalLinks:!0}),A=await Ppo(this.context,b),M=await Ppo(this.context,g,{externalLinks:!1,rootPaths:m}),q=new Map(w.filter(ee=>ee.success).map(ee=>ee.data)),D=new Map(M.filter(ee=>ee.success).map(ee=>ee.data)),C=(ee,fe)=>typeof ee=="string"?fe.get(ee)??ee:Array.isArray(ee)?ee.map(me=>fe.get(me)??me):ee;for(let ee of f)(0,$Xn.default)(ee.pages).forEach(function(fe){q.has(fe)||Array.isArray(fe)&&fe.some(me=>q.has(me))?this.update(C(fe,q)):(D.has(fe)||Array.isArray(fe)&&fe.some(me=>D.has(me)))&&this.update(C(fe,D))});for(let ee of f)(0,$Xn.default)(ee.pages).forEach(function(fe){typeof fe=="string"?this.update(fe.replace("/overview","")):Array.isArray(fe)&&this.update(fe.map(me=>typeof me=="string"?me.replace("/overview",""):me))});let R=[...w,...A,...M].filter(ee=>!ee.success).map(ee=>ee.data?.[0]).filter(Boolean).map(ee=>mpo(new URL(ee).pathname));(ee=>{(0,$Xn.default)(ee).forEach(function(me){typeof me=="string"&&R.includes(me)?this.remove():Array.isArray(me)&&this.update(me.filter(ve=>!(typeof ve=="string"&&R.includes(ve)))),typeof me=="string"&&/^https?:\/\//.test(me)?this.remove():Array.isArray(me)&&this.update(me.filter(ve=>!(typeof ve=="string"&&/^https?:\/\//.test(ve))))});let fe=!0;for(;fe;)fe=!1,(0,$Xn.default)(ee).forEach(function(me){Array.isArray(me)&&me.filter(Boolean).length===0&&(fe=!0,this.parent?this.parent.remove():this.remove())})})(f);let I=await CPs(),U=await yep(n),H=await Vap(n),te=await P1s(r,I);return{success:!0,data:{name:await zPs(n),logo:te,colors:H,favicon:U,navigation:f,tabs:i.tabs||[]}}}catch(w){return w instanceof Error?{success:!1,message:w.message}:{success:!1,message:"An unknown error occurred when scraping this site. Please try again."}}}async getNavigationBuilder({navItem:t,builder:r}){if(Object.keys(this.tabUrlToInfo).length>0){let i=vep({navItem:t});return i==="reference"?r.getNavigationBuilder():i==null?this.context.failAndThrow(`Failed to assign navigation item to a tab group: ${t.group}`):(this.tabUrlToInfo[i]??this.getDefaultDocumentationTab(r)).navigationBuilder}return r.getNavigationBuilder()}getDefaultDocumentationTab(t){return this.documentationTab==null&&(this.documentationTab={name:"Documentation",url:"documentation",navigationBuilder:t.getNavigationBuilder({tabId:"documentation",tabConfig:{displayName:"Documentation",slug:"documentation"}})}),this.documentationTab}};var Yap=require("fs/promises");async function j1s({readmeUrl:e,outputPath:t,taskContext:r,versionOfCli:i,organization:n}){let a=new wpo({context:r}),u=new rwi;await a.import({args:{readmeUrl:e,organization:n},builder:u}),await u.build({outputDirectory:t}),await(0,Yap.writeFile)(ku(Kl.of(t),yo.of(K9),yo.of($k)),JSON.stringify({version:i,organization:n},void 0,4))}var w1s=async({readmeUrl:e,organization:t,taskContext:r,versionOfCli:i})=>{if(!e||!fmi(e)){r.failAndThrow("Provide a URL to a readme-generated site");return}let n=Kl.of(Y9());await j1s({readmeUrl:e,outputPath:n,taskContext:r,versionOfCli:i,organization:t})};var Xap=require("fs/promises");var Zap=require("path"),kap=Ei(Jk(),1);async function eop({url:e,logger:t}){try{let r=await tPS({url:e,logger:t}),i=await kap.default.dir(),n=(0,Zap.join)(i.path,"openapi.yml");return t.debug("tmpDir",i.path),t.debug("filePath",n),await(0,Xap.writeFile)(n,r),{status:"success",filePath:n}}catch(r){return t.debug(`Encountered an error while loading OpenAPI spec: ${JSON.stringify(r)}`),{status:"failure",errorMessage:`Failed to load OpenAPI spec from ${e}`}}}async function tPS({url:e,logger:t}){let r=await zz.get(e),i=r.headers["content-type"]??"";return i.includes("json")?w8a(r.data):i.includes("yaml")?r.data:(t.warn(`Unrecognized Content-Type "${i}" from endpoint ${e}. Please ensure you're pointing to a URL that returns JSON or YAML and not HTML (e.g. Swagger UI webpage)`),w8a(r.data))}var Pei=e=>e.name==="up"||e.name==="k"||e.ctrl&&e.name==="p",Pfn=e=>e.name==="down"||e.name==="j"||e.ctrl&&e.name==="n",top=e=>e.name==="space",jfn=e=>e.name==="backspace",Spo=e=>"123456789".includes(e.name),y3=e=>e.name==="enter"||e.name==="return";var Dpo=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(t){super(),this.cause=t?.cause}},Epo=class extends Error{name="CancelPromptError";message="Prompt was canceled"},Apo=class extends Error{name="ExitPromptError"},Mpo=class extends Error{name="HookError"},jei=class extends Error{name="ValidationError"};var E1s=require("async_hooks");var qpo=require("async_hooks");var rop=new qpo.AsyncLocalStorage;function rPS(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function iop(e,t){let r=rPS(e);return rop.run(r,()=>{function i(n){r.handleChange=()=>{r.index=0,n()},r.handleChange()}return t(i)})}function H1i(){let e=rop.getStore();if(!e)throw new Mpo("[Inquirer] Hook functions can only be called from within a prompt");return e}function S1s(){return H1i().rl}function D1s(e){let t=(...r)=>{let i=H1i(),n=!1,a=i.handleChange;i.handleChange=()=>{n=!0};let u=e(...r);return n&&a(),i.handleChange=a,u};return qpo.AsyncResource.bind(t)}function wfn(e){let t=H1i(),{index:r}=t,i={get(){return t.hooks[r]},set(a){t.hooks[r]=a},initialized:r in t.hooks},n=e(i);return t.index++,n}function nop(){H1i().handleChange()}var $1i={queue(e){let t=H1i(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();let i=e(S1s());if(i!=null&&typeof i!="function")throw new jei("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=i})},run(){let e=H1i();D1s(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=H1i();e.hooksCleanup.forEach(t=>{t?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function Sb(e){return wfn(t=>{let r=n=>{t.get()!==n&&(t.set(n),nop())};if(t.initialized)return[t.get(),r];let i=typeof e=="function"?e():e;return t.set(i),[i,r]})}function z2t(e,t){wfn(r=>{let i=r.get();(!Array.isArray(i)||t.some((a,u)=>!Object.is(a,i[u])))&&$1i.queue(e),r.set(t)})}var IBe=Ei(wei(),1);var oop={prefix:{idle:IBe.default.blue("?"),done:IBe.default.green(r3.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>IBe.default.yellow(e))},style:{answer:IBe.default.cyan,message:IBe.default.bold,error:e=>IBe.default.red(`> ${e}`),defaultAnswer:e=>IBe.default.dim(`(${e})`),help:IBe.default.dim,highlight:IBe.default.cyan,key:e=>IBe.default.cyan(IBe.default.bold(`<${e}>`))}};function uop(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function sop(...e){let t={};for(let r of e)for(let[i,n]of Object.entries(r)){let a=t[i];t[i]=uop(a)&&uop(n)?sop(a,n):n}return t}function _I(...e){let t=[oop,...e.filter(r=>r!=null)];return sop(...t)}function sF({status:e="idle",theme:t}){let[r,i]=Sb(!1),[n,a]=Sb(0),{prefix:u,spinner:l}=_I(t);return z2t(()=>{if(e==="loading"){let s,o=-1,c=setTimeout(E1s.AsyncResource.bind(()=>{i(!0),s=setInterval(E1s.AsyncResource.bind(()=>{o=o+1,a(o%l.frames.length)}),l.interval)}),300);return()=>{clearTimeout(c),clearInterval(s)}}else i(!1)},[e]),r?l.frames[n]:typeof u=="string"?u:u[e==="loading"?"idle":e]??u.idle}function Cwe(e,t){return wfn(r=>{let i=r.get();if(!i||i.dependencies.length!==t.length||i.dependencies.some((n,a)=>n!==t[a])){let n=e();return r.set({value:n,dependencies:t}),n}return i.value})}function zBe(e){return Sb({current:e})[0]}function cF(e){let t=zBe(e);t.current=e,z2t(r=>{let i=!1,n=D1s((a,u)=>{i||t.current(u,r)});return r.input.on("keypress",n),()=>{i=!0,r.input.removeListener("keypress",n)}},[])}var cop=Ei($ls(),1),lop=Ei(Jls(),1);function GXn(e,t){return e.split(`
1885
+ `);return i.rootPath?n=new URL(i.rootPath,n.origin):n.origin===mfn(n.toString())&&(n=new URL("home",new URL(n).origin)),IPs(r,o,c,g),e.logger.debug(`Successfully parsed page ${u}`),{success:!0,data:i.rootPath?[mpo(new URL(u).pathname),i.rootPath]:void 0}}catch(b){return e.logger.debug(`Error parsing page ${u}: ${b}`),{success:!1,data:[u,""]}}}function*ZmS(e,t=16){let r=0;for(;r<e.length;)yield e.slice(r,r+t),r+=t}async function Ppo(e,t,r={externalLinks:!1}){let i=[];for(let n of ZmS(t)){let a=await Promise.all(n.map(async(u,l)=>{try{if(r.externalLinks)return e.logger.debug(`Scraping external link with URL: ${u}...`),m1s(e,`external-link-${l}`,u,{externalLink:!0});{let f=await YYn({url:u});return e.logger.debug(`Scraping internal link with URL: ${u}...`),m1s(e,f,u,{externalLink:!1,rootPath:r.rootPaths?r.rootPaths[l]:void 0})}}catch{return{success:!1,data:void 0}}}));i.push(...a)}return i}function Rap(e){let t;return Ff(e,"element",function(r){return r.tagName==="div"&&r.properties.className&&Array.isArray(r.properties.className)&&r.properties.className.includes("hub-sidebar-content")?(t=r,VP):e_}),t}function HXn({node:e,tagName:t}){let r;return Ff(e,"element",function(i){return i.tagName===t?(r=i,VP):e_}),r}function jpo(e){if(!e)return"";let t="";return Ff(e,"text",function(r){t+=r.value}),t}function Fap(e){let t=[];return Ff(e,"element",function(r){if(r.tagName==="section"&&r.properties.className&&Array.isArray(r.properties.className)&&r.properties.className.includes("rm-Sidebar-section")){let i=HXn({node:r,tagName:"h2"}),n=i?jpo(i):"",u=Nap(r).flatMap(l=>typeof l=="string"?l:l.pages);t.push({group:n,pages:u})}}),t}function Nap(e){let t=[],r="section",i="h2";return Ff(e,"element",function(n,a,u){if(n.tagName===r&&(n.tagName="li"),n.tagName!=="li")return e_;let l;n.children[0]&&n.children[1]&&n.children[0].type==="element"&&n.children[0].tagName==="div"&&n.children[1].type==="element"&&n.children[1].tagName==="ul"&&n.children[0].children.filter(s=>s.type==="text").length===n.children[0].children.length&&(l=PBe(n.children[0],{delete:!1})),n.children.length===2&&n.children[1]&&n.children[1].type==="element"&&n.children[1].tagName==="ul"&&typeof a=="number"&&u&&(n.children=[{type:"element",tagName:"div",properties:{},children:n.children}]);let f=kmS({node:n,sectionTagName:i,childListTagName:"ul",title:l});return f!==void 0?(t.push(f),u2t):e_}),t}function kmS({node:e,sectionTagName:t="section",childListTagName:r="ul",title:i}){let n=HXn({node:e,tagName:"a"});if(!n)return;let a;if(a=n.properties.href,a===void 0||a==="#")return;let u=!1;if(Ff(n,"element",function(b){return b.tagName==="span"&&Array.isArray(b.properties.className)&&b.properties.className.includes("rm-APIMethod")?(u=!0,VP):e_}),u)return;a.startsWith("/")&&(a=a.substring(1));let l=HXn({node:e,tagName:t}),f=HXn({node:e,tagName:r});if(!f)return a;let s=i;s||(s=jpo(n)||jpo(l)||"");let o=Nap(f),c=a;return a!=="#"&&(o.includes(a)&&o.forEach((b,g)=>{b===a&&(o[g]=c)}),o.includes(c)||o.unshift(c)),{group:s,pages:o}}function Lap(e){let t;if(Ff(e,"element",function(i){return i.tagName==="header"&&i.properties.className&&Array.isArray(i.properties.className)&&i.properties.className.includes("rm-Header")?(t=i,VP):e_}),!t)return;let r=[];return Ff(t,"element",function(i){return i.tagName!=="nav"&&!(i.tagName==="div"&&i.properties.className&&Array.isArray(i.properties.className)&&i.properties.className.includes("rm-Header-right"))?e_:(Ff(i,"element",function(n){if(n.tagName!=="a"||!n.properties.href||typeof n.properties.href!="string"||n.properties.href.startsWith("http"))return e_;let a=PBe(n);return r.push({name:a||Xfo(n.properties.href),url:n.properties.href}),e_}),e_)}),r}function Uap(e){if(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e))return e;e=e.trim().toLowerCase();let t,r,i;if(/^\d+\s+\d+\s+\d+(\s+[0-9.]+)?$/.test(e))[t,r,i]=e.split(/\s+/).map(Number);else{let a=e.match(/^rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)$/);if(!a)return;[,t,r,i]=a.map(Number)}if(!t||!r||!i||t<0||t>255||r<0||r>255||i<0||i>255)return;let n=a=>Math.round(a).toString(16).padStart(2,"0");return`#${n(t)}${n(r)}${n(i)}`.toUpperCase()}async function Vap(e){let t,r;return Ff(e,"element",function(i){if(i.tagName!=="style"||i.properties.title!=="rm-custom-css"||i.children.length!==1||!i.children[0]||i.children[0].type!=="text")return e_;let n=i.children[0].value,a="--color-link-primary",u=new RegExp(`${a}\\s*[:|,]\\s*([^;)]+)`,"i"),l=n.match(u)?.[1]?.trim(),f=n.match(u)?.[1]?.trim();return!l||!f?e_:(t=Uap(l),r=Uap(f),e_)}),t&&r?{accentPrimary:{dark:t,light:r},background:{dark:void 0,light:void 0}}:t?{accentPrimary:{dark:t,light:t},background:{dark:void 0,light:void 0}}:NQn}function ePS(e){let t=[];return Ff(e,"element",r=>{r.tagName==="img"&&Array.isArray(r.properties.className)&&r.properties.className.includes("rm-Logo-img")&&t.push(r)}),t.length>0?t:void 0}async function Wap(e,t){let r=mei(e),i=ePS(r);if(i!=null){let n=await Promise.all(i.map(async a=>{let u=await efn(a.properties.src);return u.success&&u.data?u.data[1]:""}));t.push(...n)}for(let n=t.length-1;n>=0;n--)t[n]||t.splice(n,1)}var Hap=28;async function P1s(e,t){e=new URL(e);let r=[];if(t){let n=[];try{let a=await t.newPage();await a.goto(e.toString(),{waitUntil:"networkidle2"}),n.push(await a.content()),await a.click(".rm-ThemeToggle"),n.push(await a.content())}catch{}await Promise.all(n.map(async a=>await Wap(a,r)))}let i=[...new Set(r).values()];if(i.length!==0){if(i.length===1&&i[0]!=null){let n=yo.of(HW(i[0]));return{light:n,dark:n,height:Hap}}if(i[0]!=null&&i[1]!=null){let n=yo.of(HW(i[0])),a=yo.of(HW(i[1]));return{light:n,dark:a,height:Hap}}}}function $ap(e,t){return e.flatMap(r=>Gap(r,t))}function Gap(e,t){return typeof e=="string"?[new URL(e,t)]:typeof e=="object"&&e!=null&&"pages"in e&&Array.isArray(e.pages)?e.pages.flatMap(r=>typeof r=="string"?new URL(r,t):Gap(r,t)):[]}var Qap=["Home","Introduction","Getting Started","Get Started","Welcome","Start","Docs"];function Jap(e,t){for(let r of e)if(!t.includes(r))return r;return""}var wpo=class extends twi{documentationTab=void 0;tabUrlToInfo={};async import({args:t,builder:r}){let i=new URL(t.readmeUrl),n=await YYn({url:i}),a=Kl.of((0,Kap.join)(process.cwd(),"fern"));this.context.logger.debug("Successfully fetched HTML from Readme Docs Site");let u=mei(n);if(!r8d(u)){this.context.logger.error("The provided URL is not a Readme Docs Site");return}let s=(await this.scrapeAllSiteTabs(n,i)).data;if(!s){this.context.logger.error("Failed to scrape site tabs");return}this.context.logger.debug("Successfully scraped all site tabs"),s.logo&&r.setLogo({logo:s.logo});let o=yo.of(s.favicon.substring(1));r.setFavicon({favicon:o}),s.colors!=null&&r.setColors({colors:s.colors}),r.setLayout({layout:bQn});for(let b of s.tabs??[]){let g=O1s(b.url);b.name!=="API Reference"&&(this.tabUrlToInfo[g]={name:b.name,url:g,navigationBuilder:r.getNavigationBuilder({tabId:g,tabConfig:{slug:g,displayName:b.name}})})}for(let b of s.navigation){let g=await nbs({absolutePathToOutput:a,item:b,builder:r,context:this.context}),O=await this.getNavigationBuilder({navItem:b,builder:r});g!=null&&O.addItem({item:g})}let c=r.setInstance({companyName:t.organization});this.context.logger.debug(`Added instance ${c} to docs.yml`)}async scrapeAllSiteTabs(t,r){this.context.logger.debug(`Initializing site scraper from URL: ${r}`);let i=new URL(r),n=mei(t),a=Lap(n);if(!a||!a.length||a.length===1&&a[0]&&a[0].url===i.pathname)return this.scrapeSite(t,i,{hast:n});a.find(w=>i.pathname.startsWith(w.url))||a.push({name:Xfo(i.pathname),url:i.pathname});let u=await Promise.all(a.map(async w=>{if(w.url.startsWith("/reference"))return{success:!1,data:void 0};let A=new URL(r);A.pathname=w.url;try{let M=await YYn({url:A});return await this.scrapeSite(M,A,{tabs:[w]})}catch{return{success:!1,data:void 0}}})),l=[],f=[],s=NQn,o="/favicon.svg";u.filter(w=>w.success).forEach(w=>{this.context.logger.debug(`Successfully scraped tab: ${w.data?.name}`),w.data&&(l.push(...w.data.navigation),w.data.tabs&&f.push(...w.data.tabs),w.data.favicon!=="/favicon.svg"&&(o=w.data.favicon),w.data.colors!==NQn&&(s=w.data.colors))}),u.filter(w=>!w.success).forEach(w=>{this.context.logger.info(`Failed to scrape tab: ${w.message}`)});let g=await CPs(),O=await P1s(i,g),m=await zPs(n);return g&&await g.close(),{success:!0,data:{name:m,logo:O,navigation:l,tabs:f,favicon:o,colors:s}}}async scrapeSite(t,r,i={}){this.context.logger.debug(`Scraping site with URL: ${r}`);let n=i.hast;n||(n=mei(t));let u=new URL(r).origin;if(u==="")return{success:!1,message:`Invalid URL: ${r}`};let l=Rap(n);if(!l)return{success:!1,message:`${r.toString()}: Failed to find sidebar element`};let f=Fap(l),s=f.flatMap(w=>w.pages),o=$ap(s,u);if(o.length===0)return{success:!1,message:`No navigation items found for URL: ${r}`};let c=o.filter(w=>w.origin!==u),b=o.filter(w=>w.origin===u&&mfn(w.toString())!==u),g=o.filter(w=>w.origin===u&&mfn(w.toString())===u),O=[...b.map(w=>w.toString()),...g.map(w=>w.toString())],m=g.map(()=>{let w=Jap(Qap,O);return O.push(w),w});try{let w=await Ppo(this.context,c,{externalLinks:!0}),A=await Ppo(this.context,b),M=await Ppo(this.context,g,{externalLinks:!1,rootPaths:m}),q=new Map(w.filter(ee=>ee.success).map(ee=>ee.data)),D=new Map(M.filter(ee=>ee.success).map(ee=>ee.data)),C=(ee,fe)=>typeof ee=="string"?fe.get(ee)??ee:Array.isArray(ee)?ee.map(me=>fe.get(me)??me):ee;for(let ee of f)(0,$Xn.default)(ee.pages).forEach(function(fe){q.has(fe)||Array.isArray(fe)&&fe.some(me=>q.has(me))?this.update(C(fe,q)):(D.has(fe)||Array.isArray(fe)&&fe.some(me=>D.has(me)))&&this.update(C(fe,D))});for(let ee of f)(0,$Xn.default)(ee.pages).forEach(function(fe){typeof fe=="string"?this.update(fe.replace("/overview","")):Array.isArray(fe)&&this.update(fe.map(me=>typeof me=="string"?me.replace("/overview",""):me))});let R=[...w,...A,...M].filter(ee=>!ee.success).map(ee=>ee.data?.[0]).filter(Boolean).map(ee=>mpo(new URL(ee).pathname));(ee=>{(0,$Xn.default)(ee).forEach(function(me){typeof me=="string"&&R.includes(me)?this.remove():Array.isArray(me)&&this.update(me.filter(ve=>!(typeof ve=="string"&&R.includes(ve)))),typeof me=="string"&&/^https?:\/\//.test(me)?this.remove():Array.isArray(me)&&this.update(me.filter(ve=>!(typeof ve=="string"&&/^https?:\/\//.test(ve))))});let fe=!0;for(;fe;)fe=!1,(0,$Xn.default)(ee).forEach(function(me){Array.isArray(me)&&me.filter(Boolean).length===0&&(fe=!0,this.parent?this.parent.remove():this.remove())})})(f);let I=await CPs(),U=await yep(n),H=await Vap(n),te=await P1s(r,I);return{success:!0,data:{name:await zPs(n),logo:te,colors:H,favicon:U,navigation:f,tabs:i.tabs||[]}}}catch(w){return w instanceof Error?{success:!1,message:w.message}:{success:!1,message:"An unknown error occurred when scraping this site. Please try again."}}}async getNavigationBuilder({navItem:t,builder:r}){if(Object.keys(this.tabUrlToInfo).length>0){let i=vep({navItem:t});return i==="reference"?r.getNavigationBuilder():i==null?this.context.failAndThrow(`Failed to assign navigation item to a tab group: ${t.group}`):(this.tabUrlToInfo[i]??this.getDefaultDocumentationTab(r)).navigationBuilder}return r.getNavigationBuilder()}getDefaultDocumentationTab(t){return this.documentationTab==null&&(this.documentationTab={name:"Documentation",url:"documentation",navigationBuilder:t.getNavigationBuilder({tabId:"documentation",tabConfig:{displayName:"Documentation",slug:"documentation"}})}),this.documentationTab}};var Yap=require("fs/promises");async function j1s({readmeUrl:e,outputPath:t,taskContext:r,versionOfCli:i,organization:n}){let a=new wpo({context:r}),u=new rwi;await a.import({args:{readmeUrl:e,organization:n},builder:u}),await u.build({outputDirectory:t}),await(0,Yap.writeFile)(ku(Kl.of(t),yo.of(K9),yo.of($k)),JSON.stringify({version:i,organization:n},void 0,4))}var w1s=async({readmeUrl:e,organization:t,taskContext:r,versionOfCli:i})=>{if(!e||!fmi(e)){r.failAndThrow("Provide a URL to a readme-generated site");return}let n=Kl.of(Y9());await j1s({readmeUrl:e,outputPath:n,taskContext:r,versionOfCli:i,organization:t})};var Xap=require("fs/promises");var Zap=require("path"),kap=Ei(Jk(),1);async function eop({url:e,logger:t}){try{let r=await tPS({url:e,logger:t}),i=await kap.default.dir(),n=(0,Zap.join)(i.path,e.endsWith(".json")?"openapi.json":"openapi.yaml");return t.debug("tmpDir",i.path),t.debug("filePath",n),await(0,Xap.writeFile)(n,r),{status:"success",filePath:n}}catch(r){return t.debug(`Encountered an error while loading OpenAPI spec: ${JSON.stringify(r)}`),{status:"failure",errorMessage:`Failed to load OpenAPI spec from ${e}`}}}async function tPS({url:e,logger:t}){let r=await zz.get(e),i=r.headers["content-type"]??"";return i.includes("json")||e.endsWith(".json")?typeof r.data=="string"?r.data:JSON.stringify(r.data,null,2):i.includes("yaml")||e.endsWith(".yml")||e.endsWith(".yaml")?typeof r.data=="string"?r.data:w8a(r.data):(t.warn(`Unrecognized Content-Type "${i}" from endpoint ${e}. Please ensure you're pointing to a URL that returns JSON or YAML and not HTML (e.g. Swagger UI webpage)`),w8a(r.data))}var Pei=e=>e.name==="up"||e.name==="k"||e.ctrl&&e.name==="p",Pfn=e=>e.name==="down"||e.name==="j"||e.ctrl&&e.name==="n",top=e=>e.name==="space",jfn=e=>e.name==="backspace",Spo=e=>"123456789".includes(e.name),y3=e=>e.name==="enter"||e.name==="return";var Dpo=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(t){super(),this.cause=t?.cause}},Epo=class extends Error{name="CancelPromptError";message="Prompt was canceled"},Apo=class extends Error{name="ExitPromptError"},Mpo=class extends Error{name="HookError"},jei=class extends Error{name="ValidationError"};var E1s=require("async_hooks");var qpo=require("async_hooks");var rop=new qpo.AsyncLocalStorage;function rPS(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function iop(e,t){let r=rPS(e);return rop.run(r,()=>{function i(n){r.handleChange=()=>{r.index=0,n()},r.handleChange()}return t(i)})}function H1i(){let e=rop.getStore();if(!e)throw new Mpo("[Inquirer] Hook functions can only be called from within a prompt");return e}function S1s(){return H1i().rl}function D1s(e){let t=(...r)=>{let i=H1i(),n=!1,a=i.handleChange;i.handleChange=()=>{n=!0};let u=e(...r);return n&&a(),i.handleChange=a,u};return qpo.AsyncResource.bind(t)}function wfn(e){let t=H1i(),{index:r}=t,i={get(){return t.hooks[r]},set(a){t.hooks[r]=a},initialized:r in t.hooks},n=e(i);return t.index++,n}function nop(){H1i().handleChange()}var $1i={queue(e){let t=H1i(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();let i=e(S1s());if(i!=null&&typeof i!="function")throw new jei("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=i})},run(){let e=H1i();D1s(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=H1i();e.hooksCleanup.forEach(t=>{t?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function Sb(e){return wfn(t=>{let r=n=>{t.get()!==n&&(t.set(n),nop())};if(t.initialized)return[t.get(),r];let i=typeof e=="function"?e():e;return t.set(i),[i,r]})}function z2t(e,t){wfn(r=>{let i=r.get();(!Array.isArray(i)||t.some((a,u)=>!Object.is(a,i[u])))&&$1i.queue(e),r.set(t)})}var IBe=Ei(wei(),1);var oop={prefix:{idle:IBe.default.blue("?"),done:IBe.default.green(r3.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>IBe.default.yellow(e))},style:{answer:IBe.default.cyan,message:IBe.default.bold,error:e=>IBe.default.red(`> ${e}`),defaultAnswer:e=>IBe.default.dim(`(${e})`),help:IBe.default.dim,highlight:IBe.default.cyan,key:e=>IBe.default.cyan(IBe.default.bold(`<${e}>`))}};function uop(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function sop(...e){let t={};for(let r of e)for(let[i,n]of Object.entries(r)){let a=t[i];t[i]=uop(a)&&uop(n)?sop(a,n):n}return t}function _I(...e){let t=[oop,...e.filter(r=>r!=null)];return sop(...t)}function sF({status:e="idle",theme:t}){let[r,i]=Sb(!1),[n,a]=Sb(0),{prefix:u,spinner:l}=_I(t);return z2t(()=>{if(e==="loading"){let s,o=-1,c=setTimeout(E1s.AsyncResource.bind(()=>{i(!0),s=setInterval(E1s.AsyncResource.bind(()=>{o=o+1,a(o%l.frames.length)}),l.interval)}),300);return()=>{clearTimeout(c),clearInterval(s)}}else i(!1)},[e]),r?l.frames[n]:typeof u=="string"?u:u[e==="loading"?"idle":e]??u.idle}function Cwe(e,t){return wfn(r=>{let i=r.get();if(!i||i.dependencies.length!==t.length||i.dependencies.some((n,a)=>n!==t[a])){let n=e();return r.set({value:n,dependencies:t}),n}return i.value})}function zBe(e){return Sb({current:e})[0]}function cF(e){let t=zBe(e);t.current=e,z2t(r=>{let i=!1,n=D1s((a,u)=>{i||t.current(u,r)});return r.input.on("keypress",n),()=>{i=!0,r.input.removeListener("keypress",n)}},[])}var cop=Ei($ls(),1),lop=Ei(Jls(),1);function GXn(e,t){return e.split(`
1886
1886
  `).flatMap(r=>(0,lop.default)(r,t,{trim:!1,hard:!0}).split(`
1887
1887
  `).map(i=>i.trimEnd())).join(`
1888
1888
  `)}function Tpo(){return(0,cop.default)({defaultWidth:80,output:S1s().output})}function aPS(e,t){return GXn(e,t).split(`
@@ -1922,7 +1922,7 @@ ${q}${M}${D}${qop.default.cursorHide}`});var JXn=Ei(rPi(),1);function W1s(e,t){i
1922
1922
  Run ${Mu.cyan("fern generator upgrade")} to upgrade your generators.`),n.length>2&&(r+=`
1923
1923
  Run ${Mu.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),Vun(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function eSs({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:i=!0}){if(!eup(e))return;let n=t??"",a=e.filter(l=>l.isUpgradeAvailable);r!=null&&(a=a.slice(0,r+1));let u=a.sort((l,f)=>l.generatorName.localeCompare(f.generatorName)||l.currentVersion.localeCompare(f.currentVersion));for(let l of u)n+=`
1924
1924
  ${await kPS(l.generatorName)} (${l.apiName!=null?"API: "+l.apiName+", ":""}Group: ${l.generatorGroup}) `+Mu.dim(l.currentVersion)+Mu.reset(" \u2192 ")+Mu.green(l.latestVersion);return n+=`
1925
- `,i?Vun(n,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):n}async function kPS(e){let r=await new kop.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new Error(`Generator ${e} not found`);return r.body.displayName}async function ejS({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){if(t.length===1){let l={type:"singleApi",versions:{}};return await rup({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(f,s,o,c)=>{l.versions[s]==null&&(l.versions[s]={});let b=qYr(o.name,c),g=await qWt({generatorName:b,cliVersion:e.environment.packageVersion,currentGeneratorVersion:o.version,channel:n,includeMajor:a,context:c});g!=null&&(l.versions[s][o.name]={previousVersion:o.version,latestVersion:g})},generatorFilter:r,groupFilter:i}),l}let u={type:"multiApi",versions:{}};return await rup({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(l,f,s,o)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][f]==null&&(u.versions[l][f]={});let c=qYr(s.name,o),b=await qWt({generatorName:c,cliVersion:e.environment.packageVersion,currentGeneratorVersion:s.version,channel:n,includeMajor:a,context:o});b!=null&&(u.versions[l][f][s.name]={previousVersion:s.version,latestVersion:b})},generatorFilter:r,groupFilter:i}),u}async function rup({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:i,groupFilter:n}){await Promise.all(t.map(async a=>{await e.runTaskForWorkspace(a,async u=>{let l=await T7t({absolutePathToWorkspace:a.absoluteFilePath,context:u});if(!(l==null||l.groups==null)){for(let f of l.groups)if(!(n!=null&&f.groupName!==n))for(let s of f.generators)i!=null&&s.name!==i||await r(a.workspaceName,f.groupName,s,u)}})}))}function iup(e,t,r){let i=[];for(let[n,a]of Object.entries(e))for(let[u,l]of Object.entries(a)){r.debug(`Checking if ${u} in group ${n} has an upgrade available...`);let f=Tte(l.latestVersion,l.previousVersion);r.debug(`Latest version: ${l.latestVersion}. `+(f?"Upgrade available.":"No upgrade available.")),i.push({generatorName:u,generatorGroup:n,apiName:t,isUpgradeAvailable:f,currentVersion:l.previousVersion,latestVersion:l.latestVersion})}return i}async function Vpo({project:e,cliContext:t,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){let u=[];if(e!=null){let l=await ejS({cliContext:t,project:e,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a});if(l.type==="multiApi")for(let[f,s]of Object.entries(l.versions))u.push(...iup(s,f,t.logger));else u.push(...iup(l.versions,void 0,t.logger))}return u}var rZn=class extends Error{response;request;options;constructor(t,r,i){let n=t.status||t.status===0?t.status:"",a=t.statusText||"",u=`${n} ${a}`.trim(),l=u?`status code ${u}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=i}};var Mfn=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};var qfn=e=>e!==null&&typeof e=="object";var iZn=(...e)=>{for(let t of e)if((!qfn(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return iSs({},...e)},tSs=(e={},t={})=>{let r=new globalThis.Headers(e),i=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(let[a,u]of n.entries())i&&u==="undefined"||u===void 0?r.delete(a):r.set(a,u);return r};function Wpo(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:iSs(e[r]??[],t[r]??[])}var rSs=(e={},t={})=>({beforeRequest:Wpo(e,t,"beforeRequest"),beforeRetry:Wpo(e,t,"beforeRetry"),afterResponse:Wpo(e,t,"afterResponse"),beforeError:Wpo(e,t,"beforeError")}),iSs=(...e)=>{let t={},r={},i={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(qfn(n)){for(let[a,u]of Object.entries(n))qfn(u)&&a in t&&(u=iSs(t[a],u)),t={...t,[a]:u};qfn(n.hooks)&&(i=rSs(i,n.hooks),t.hooks=i),qfn(n.headers)&&(r=tSs(r,n.headers),t.headers=r)}return t};var nup=(()=>{let e=!1,t=!1,r=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(r&&i)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(n){if(n instanceof Error&&n.message==="unsupported BodyInit type")return!1;throw n}return e&&!t})(),aup=typeof globalThis.AbortController=="function",oup=typeof globalThis.ReadableStream=="function",uup=typeof globalThis.FormData=="function",Hpo=["get","post","put","patch","head","delete"],tjS=()=>{};tjS();var sup={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},$po=2147483647,Gpo=Symbol("stop"),cup={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},lup={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var dup=e=>Hpo.includes(e)?e.toUpperCase():e,rjS=["get","put","head","delete","options","trace"],ijS=[408,413,429,500,502,503,504],njS=[413,429,503],fup={limit:2,methods:rjS,statusCodes:ijS,afterStatusCodes:njS,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},pup=(e={})=>{if(typeof e=="number")return{...fup,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...fup,...e}};async function nSs(e,t,r,i){return new Promise((n,a)=>{let u=setTimeout(()=>{r&&r.abort(),a(new Mfn(e))},i.timeout);i.fetch(e,t).then(n).catch(a).then(()=>{clearTimeout(u)})})}async function aSs(e,{signal:t}){return new Promise((r,i)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",n,{once:!0}));function n(){clearTimeout(a),i(t.reason)}let a=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e)})}var _up=(e,t)=>{let r={};for(let i in t)!(i in lup)&&!(i in cup)&&!(i in e)&&(r[i]=t[i]);return r};var nZn=class e{static create(t,r){let i=new e(t,r),n=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>$po)throw new RangeError(`The \`timeout\` option cannot be greater than ${$po}`);await Promise.resolve();let l=await i._fetch();for(let f of i._options.hooks.afterResponse){let s=await f(i.request,i._options,i._decorateResponse(l.clone()));s instanceof globalThis.Response&&(l=s)}if(i._decorateResponse(l),!l.ok&&i._options.throwHttpErrors){let f=new rZn(l,i.request,i._options);for(let s of i._options.hooks.beforeError)f=await s(f);throw f}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!oup)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return i._stream(l.clone(),i._options.onDownloadProgress)}return l},u=i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(n):n();for(let[l,f]of Object.entries(sup))u[l]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||f);let o=(await u).clone();if(l==="json"){if(o.status===204||(await o.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await o.text())}return o[l]()};return u}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:tSs(this._input.headers,r.headers),hooks:rSs({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:dup(r.method??this._input.method),prefixUrl:String(r.prefixUrl||""),retry:pup(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(aup){this.abortController=new globalThis.AbortController;let i=this._options.signal??this._input.signal;i?.addEventListener("abort",()=>{this.abortController.abort(i.reason)}),this._options.signal=this.abortController.signal}if(nup&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let n="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,n);(uup&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof Mfn)throw t;if(t instanceof rZn){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;let i=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(t.response.status)){let n=Number(i)*1e3;Number.isNaN(n)?n=Date.parse(i)-Date.now():n>=Date.parse("2024-01-01")&&(n-=Date.now());let a=this._options.retry.maxRetryAfter??n;return n<a?n:a}if(t.response.status===413)throw t}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){let i=Math.min(this._calculateRetryDelay(r),$po);if(this._retryCount<1)throw r;await aSs(i,{signal:this._options.signal});for(let n of this._options.hooks.beforeRetry)if(await n({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===Gpo)return;return this._retry(t)}}async _fetch(){for(let i of this._options.hooks.beforeRequest){let n=await i(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let t=_up(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):nSs(r,t,this.abortController,this._options)}_stream(t,r){let i=Number(t.headers.get("content-length"))||0,n=0;return t.status===204?(r&&r({percent:1,totalBytes:i,transferredBytes:n},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(a){let u=t.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:i},new Uint8Array);async function l(){let{done:f,value:s}=await u.read();if(f){a.close();return}if(r){n+=s.byteLength;let o=i===0?0:n/i;r({percent:o,transferredBytes:n,totalBytes:i},s)}a.enqueue(s),await l()}await l()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}};var oSs=e=>{let t=(r,i)=>nZn.create(r,iZn(e,i));for(let r of Hpo)t[r]=(i,n)=>nZn.create(i,iZn(e,n,{method:r}));return t.create=r=>oSs(iZn(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),oSs(iZn(e,r))),t.stop=Gpo,t},ajS=oSs(),hup=ajS;var Fup=Ei(Rup(),1);function fSs(e){let t=(0,Fup.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var Csp=Ei(Tsp(),1),Bsp=Ei(rPi(),1),SSs=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},DSs=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function ESs(e,t={}){let{version:r="latest"}=t,{omitDeprecated:i=!0}=t,n=e.split("/")[0],a=t.registryUrl??fSs(n),u=new URL(encodeURIComponent(e).replace(/^%40/,"@"),a),l=(0,Csp.default)(a.toString(),{recursive:!0}),f={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete f.accept,l&&(f.authorization=`${l.type} ${l.token}`);let s;try{s=await hup(u,{headers:f,keepalive:!0}).json()}catch(c){throw c?.response?.status===404?new SSs(e):c}if(t.allVersions)return s;let o=new DSs(e,r);if(s["dist-tags"][r]){let{time:c}=s;s=s.versions[s["dist-tags"][r]],s.time=c}else if(r){let c=!!s.versions[r];if(i&&!c)for(let[g,O]of Object.entries(s.versions))O.deprecated&&delete s.versions[g];if(!c){let g=Object.keys(s.versions);if(r=Bsp.default.maxSatisfying(g,r),!r)throw o}let{time:b}=s;if(s=s.versions[r],s.time=b,!s)throw o}return s}async function lZn(e,t){let{version:r}=await ESs(e.toLowerCase(),t);return r}async function Aei({cliEnvironment:e,includePreReleases:t=!1}){return e.packageVersion==="0.0.0"?e.packageVersion:lZn(e.packageName,{version:t?"prerelease":"latest"})}var xsp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],n_o=class{environment;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=k0.Info;constructor(t){this.ttyAwareLogger=new Upo(t);let r=this.getPackageName(),i=this.getPackageVersion(),n=this.getCliName();(r==null||i==null||n==null)&&this.exitProgram(),this.environment={packageName:r,packageVersion:i,cliName:n}}getPackageName(){return"fern-api"}getPackageVersion(){return"0.51.19"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logDebugInfo(){this.logger.debug(`Running ${Mu.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r){throw this.failWithoutThrowing(t,r),new Kk}failWithoutThrowing(t,r){this.didSucceed=!1,Rpo({message:t,error:r,logger:this.logger})}async exit(){this._suppressUpgradeMessage||await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish(),await(await Cun()).flush(),this.exitProgram()}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable(),new Promise((i,n)=>setTimeout(()=>n("Request timed out"),300))]),r=await tup({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
1925
+ `,i?Vun(n,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):n}async function kPS(e){let r=await new kop.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new Error(`Generator ${e} not found`);return r.body.displayName}async function ejS({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){if(t.length===1){let l={type:"singleApi",versions:{}};return await rup({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(f,s,o,c)=>{l.versions[s]==null&&(l.versions[s]={});let b=qYr(o.name,c),g=await qWt({generatorName:b,cliVersion:e.environment.packageVersion,currentGeneratorVersion:o.version,channel:n,includeMajor:a,context:c});g!=null&&(l.versions[s][o.name]={previousVersion:o.version,latestVersion:g})},generatorFilter:r,groupFilter:i}),l}let u={type:"multiApi",versions:{}};return await rup({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(l,f,s,o)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][f]==null&&(u.versions[l][f]={});let c=qYr(s.name,o),b=await qWt({generatorName:c,cliVersion:e.environment.packageVersion,currentGeneratorVersion:s.version,channel:n,includeMajor:a,context:o});b!=null&&(u.versions[l][f][s.name]={previousVersion:s.version,latestVersion:b})},generatorFilter:r,groupFilter:i}),u}async function rup({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:i,groupFilter:n}){await Promise.all(t.map(async a=>{await e.runTaskForWorkspace(a,async u=>{let l=await T7t({absolutePathToWorkspace:a.absoluteFilePath,context:u});if(!(l==null||l.groups==null)){for(let f of l.groups)if(!(n!=null&&f.groupName!==n))for(let s of f.generators)i!=null&&s.name!==i||await r(a.workspaceName,f.groupName,s,u)}})}))}function iup(e,t,r){let i=[];for(let[n,a]of Object.entries(e))for(let[u,l]of Object.entries(a)){r.debug(`Checking if ${u} in group ${n} has an upgrade available...`);let f=Tte(l.latestVersion,l.previousVersion);r.debug(`Latest version: ${l.latestVersion}. `+(f?"Upgrade available.":"No upgrade available.")),i.push({generatorName:u,generatorGroup:n,apiName:t,isUpgradeAvailable:f,currentVersion:l.previousVersion,latestVersion:l.latestVersion})}return i}async function Vpo({project:e,cliContext:t,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){let u=[];if(e!=null){let l=await ejS({cliContext:t,project:e,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a});if(l.type==="multiApi")for(let[f,s]of Object.entries(l.versions))u.push(...iup(s,f,t.logger));else u.push(...iup(l.versions,void 0,t.logger))}return u}var rZn=class extends Error{response;request;options;constructor(t,r,i){let n=t.status||t.status===0?t.status:"",a=t.statusText||"",u=`${n} ${a}`.trim(),l=u?`status code ${u}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=i}};var Mfn=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};var qfn=e=>e!==null&&typeof e=="object";var iZn=(...e)=>{for(let t of e)if((!qfn(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return iSs({},...e)},tSs=(e={},t={})=>{let r=new globalThis.Headers(e),i=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(let[a,u]of n.entries())i&&u==="undefined"||u===void 0?r.delete(a):r.set(a,u);return r};function Wpo(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:iSs(e[r]??[],t[r]??[])}var rSs=(e={},t={})=>({beforeRequest:Wpo(e,t,"beforeRequest"),beforeRetry:Wpo(e,t,"beforeRetry"),afterResponse:Wpo(e,t,"afterResponse"),beforeError:Wpo(e,t,"beforeError")}),iSs=(...e)=>{let t={},r={},i={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(qfn(n)){for(let[a,u]of Object.entries(n))qfn(u)&&a in t&&(u=iSs(t[a],u)),t={...t,[a]:u};qfn(n.hooks)&&(i=rSs(i,n.hooks),t.hooks=i),qfn(n.headers)&&(r=tSs(r,n.headers),t.headers=r)}return t};var nup=(()=>{let e=!1,t=!1,r=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(r&&i)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(n){if(n instanceof Error&&n.message==="unsupported BodyInit type")return!1;throw n}return e&&!t})(),aup=typeof globalThis.AbortController=="function",oup=typeof globalThis.ReadableStream=="function",uup=typeof globalThis.FormData=="function",Hpo=["get","post","put","patch","head","delete"],tjS=()=>{};tjS();var sup={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},$po=2147483647,Gpo=Symbol("stop"),cup={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},lup={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var dup=e=>Hpo.includes(e)?e.toUpperCase():e,rjS=["get","put","head","delete","options","trace"],ijS=[408,413,429,500,502,503,504],njS=[413,429,503],fup={limit:2,methods:rjS,statusCodes:ijS,afterStatusCodes:njS,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},pup=(e={})=>{if(typeof e=="number")return{...fup,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...fup,...e}};async function nSs(e,t,r,i){return new Promise((n,a)=>{let u=setTimeout(()=>{r&&r.abort(),a(new Mfn(e))},i.timeout);i.fetch(e,t).then(n).catch(a).then(()=>{clearTimeout(u)})})}async function aSs(e,{signal:t}){return new Promise((r,i)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",n,{once:!0}));function n(){clearTimeout(a),i(t.reason)}let a=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e)})}var _up=(e,t)=>{let r={};for(let i in t)!(i in lup)&&!(i in cup)&&!(i in e)&&(r[i]=t[i]);return r};var nZn=class e{static create(t,r){let i=new e(t,r),n=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>$po)throw new RangeError(`The \`timeout\` option cannot be greater than ${$po}`);await Promise.resolve();let l=await i._fetch();for(let f of i._options.hooks.afterResponse){let s=await f(i.request,i._options,i._decorateResponse(l.clone()));s instanceof globalThis.Response&&(l=s)}if(i._decorateResponse(l),!l.ok&&i._options.throwHttpErrors){let f=new rZn(l,i.request,i._options);for(let s of i._options.hooks.beforeError)f=await s(f);throw f}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!oup)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return i._stream(l.clone(),i._options.onDownloadProgress)}return l},u=i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(n):n();for(let[l,f]of Object.entries(sup))u[l]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||f);let o=(await u).clone();if(l==="json"){if(o.status===204||(await o.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await o.text())}return o[l]()};return u}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:tSs(this._input.headers,r.headers),hooks:rSs({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:dup(r.method??this._input.method),prefixUrl:String(r.prefixUrl||""),retry:pup(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(aup){this.abortController=new globalThis.AbortController;let i=this._options.signal??this._input.signal;i?.addEventListener("abort",()=>{this.abortController.abort(i.reason)}),this._options.signal=this.abortController.signal}if(nup&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let n="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,n);(uup&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof Mfn)throw t;if(t instanceof rZn){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;let i=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(t.response.status)){let n=Number(i)*1e3;Number.isNaN(n)?n=Date.parse(i)-Date.now():n>=Date.parse("2024-01-01")&&(n-=Date.now());let a=this._options.retry.maxRetryAfter??n;return n<a?n:a}if(t.response.status===413)throw t}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){let i=Math.min(this._calculateRetryDelay(r),$po);if(this._retryCount<1)throw r;await aSs(i,{signal:this._options.signal});for(let n of this._options.hooks.beforeRetry)if(await n({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===Gpo)return;return this._retry(t)}}async _fetch(){for(let i of this._options.hooks.beforeRequest){let n=await i(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let t=_up(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):nSs(r,t,this.abortController,this._options)}_stream(t,r){let i=Number(t.headers.get("content-length"))||0,n=0;return t.status===204?(r&&r({percent:1,totalBytes:i,transferredBytes:n},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(a){let u=t.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:i},new Uint8Array);async function l(){let{done:f,value:s}=await u.read();if(f){a.close();return}if(r){n+=s.byteLength;let o=i===0?0:n/i;r({percent:o,transferredBytes:n,totalBytes:i},s)}a.enqueue(s),await l()}await l()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}};var oSs=e=>{let t=(r,i)=>nZn.create(r,iZn(e,i));for(let r of Hpo)t[r]=(i,n)=>nZn.create(i,iZn(e,n,{method:r}));return t.create=r=>oSs(iZn(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),oSs(iZn(e,r))),t.stop=Gpo,t},ajS=oSs(),hup=ajS;var Fup=Ei(Rup(),1);function fSs(e){let t=(0,Fup.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var Csp=Ei(Tsp(),1),Bsp=Ei(rPi(),1),SSs=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},DSs=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function ESs(e,t={}){let{version:r="latest"}=t,{omitDeprecated:i=!0}=t,n=e.split("/")[0],a=t.registryUrl??fSs(n),u=new URL(encodeURIComponent(e).replace(/^%40/,"@"),a),l=(0,Csp.default)(a.toString(),{recursive:!0}),f={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete f.accept,l&&(f.authorization=`${l.type} ${l.token}`);let s;try{s=await hup(u,{headers:f,keepalive:!0}).json()}catch(c){throw c?.response?.status===404?new SSs(e):c}if(t.allVersions)return s;let o=new DSs(e,r);if(s["dist-tags"][r]){let{time:c}=s;s=s.versions[s["dist-tags"][r]],s.time=c}else if(r){let c=!!s.versions[r];if(i&&!c)for(let[g,O]of Object.entries(s.versions))O.deprecated&&delete s.versions[g];if(!c){let g=Object.keys(s.versions);if(r=Bsp.default.maxSatisfying(g,r),!r)throw o}let{time:b}=s;if(s=s.versions[r],s.time=b,!s)throw o}return s}async function lZn(e,t){let{version:r}=await ESs(e.toLowerCase(),t);return r}async function Aei({cliEnvironment:e,includePreReleases:t=!1}){return e.packageVersion==="0.0.0"?e.packageVersion:lZn(e.packageName,{version:t?"prerelease":"latest"})}var xsp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],n_o=class{environment;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=k0.Info;constructor(t){this.ttyAwareLogger=new Upo(t);let r=this.getPackageName(),i=this.getPackageVersion(),n=this.getCliName();(r==null||i==null||n==null)&&this.exitProgram(),this.environment={packageName:r,packageVersion:i,cliName:n}}getPackageName(){return"fern-api"}getPackageVersion(){return"0.51.21"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logDebugInfo(){this.logger.debug(`Running ${Mu.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r){throw this.failWithoutThrowing(t,r),new Kk}failWithoutThrowing(t,r){this.didSucceed=!1,Rpo({message:t,error:r,logger:this.logger})}async exit(){this._suppressUpgradeMessage||await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish(),await(await Cun()).flush(),this.exitProgram()}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable(),new Promise((i,n)=>setTimeout(()=>n("Request timed out"),300))]),r=await tup({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
1926
1926
  `)||(r+=`
1927
1927
  `),this.logger.info(r))}catch{}}async exitIfFailed(){this.didSucceed||await this.exit()}exitProgram(){process.exit(this.didSucceed?0:1)}longestWorkspaceName;registerWorkspaces(t){let r=S$u(t.map(i=>i.type==="docs"?"docs":i.workspaceName??"api"),i=>i.length);r!=null&&(this.longestWorkspaceName=r)}project;registerProject(t){this.project=t}runTask(t){return this.runTaskWithInit(this.constructTaskInit(),t)}addTask(){return this.addTaskWithInit(this.constructTaskInit())}async runTaskForWorkspace(t,r){await this.runTaskWithInit(this.constructTaskInitForWorkspace(t),r)}addTaskWithInit(t){let r=new KXn(t);return this.ttyAwareLogger.registerTask(r),r}USE_NODE_18_OR_ABOVE_MESSAGE="The Fern CLI requires Node 18+ or above.";async runTaskWithInit(t,r){let i=this.addTaskWithInit(t).start(),n;try{n=await r(i)}catch(a){throw a.message.includes("globalThis")?(i.logger.error(this.USE_NODE_18_OR_ABOVE_MESSAGE),i.failWithoutThrowing()):i.failWithoutThrowing(void 0,a),new Kk}finally{i.finish()}return n}async instrumentPostHogEvent(t){(await Cun()).sendEvent(t)}logger=_6r(this.log.bind(this));constructTaskInitForWorkspace(t){let r=Isp(t.type==="docs"?"docs":t.workspaceName??"api"),i=1+(this.longestWorkspaceName!=null?Isp(this.longestWorkspaceName):r).length,n=r.padEnd(i),a=xsp[this.numTasks++%xsp.length],u=Mu.hex(a)(n);return{...this.constructTaskInit(),logPrefix:u}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===IT.Failure&&(this.didSucceed=!1)},instrumentPostHogEvent:async t=>{await this.instrumentPostHogEvent(t)},shouldBufferLogs:!1}}log(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}])}logImmediately(t){let r=t.filter(i=>VKr.indexOf(i.level)>=VKr.indexOf(this.logLevel));this.ttyAwareLogger.log(r,{includeDebugInfo:this.logLevel===k0.Debug})}_suppressUpgradeMessage=!1;suppressUpgradeMessage(){this._suppressUpgradeMessage=!0}_isUpgradeAvailable;async isUpgradeAvailable({includePreReleases:t=!1}={}){if(this._isUpgradeAvailable==null){this.logger.debug(`Checking if ${this.environment.packageName} upgrade is available...`);let r=await Aei({cliEnvironment:this.environment,includePreReleases:t}),i=Tte(r,this.environment.packageVersion);this.logger.debug(`Latest version: ${r}. `+(i?"Upgrade available.":"No upgrade available."));let n={isUpgradeAvailable:i,latestVersion:r},a=await Vpo({project:this.project,cliContext:this});this._isUpgradeAvailable={cliUpgradeInfo:n,generatorUpgradeInfo:a}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){return await R1s({message:t,default:r})}async getInput(t){return await F1s({message:t.message,default:t.default})}};function Isp(e){return`[${e}]:`}var NEp=require("fs/promises");function NBe({breadcrumbs:e=[],title:t,subtitle:r}){let i=[];return e.length>0&&i.push(Mu.blue(e.join(" -> "))),i.push(t),r!=null&&i.push(Mu.dim(r)),i.join(`
1928
1928
  `)}var ujp=require("fs/promises");var F2t=class e{generatorsConfiguration;workspaceName;cliVersion;absoluteFilePath;changelog;type=e.Type;constructor({generatorsConfiguration:t,workspaceName:r,cliVersion:i,absoluteFilePath:n,changelog:a}){this.generatorsConfiguration=t,this.workspaceName=r,this.cliVersion=i,this.absoluteFilePath=n,this.changelog=a}};var xwe=class extends F2t{definition;sources;constructor({definition:t,sources:r,...i}){super(i),this.definition=t,this.sources=r??[]}async getDefinition(){return this.definition}async toFernWorkspace(){return this}getSources(){return this.sources}getAbsoluteFilePaths(){return[this.absoluteFilePath]}};var fZn=class{context;constructor(t){this.context=t}};var a_o=class e{files={};directories={};getAllFiles(){let t={},r=(i,n)=>{for(let[u,l]of Object.entries(i.files)){let f=n!=null?Wh.of(`${n}${K3t}${u}`):Wh.of(u);t[f]=l}let a=Object.keys(i.directories).sort();for(let u of a){let l=n!=null?`${n}${K3t}${u}`:u,f=i.directories[u];r(f,l)}};return r(this),t}getOrCreateFile(t){return this.getOrCreateFileRecursive(t.split(K3t))}getOrCreateFileRecursive(t){if(t.length===1)return this.files[Wh.of(t[0])]??={};let[r,...i]=t;if(r==null)throw new Error(`Internal error; cannot add file with path: ${t}`);return this.directories[r]||(this.directories[r]=new e),this.directories[r].getOrCreateFileRecursive(i)}};var iSi=class{enableUniqueErrorsPerEndpoint;root;rootApiFile;packageMarkerFile={};basePath=void 0;constructor(t){this.enableUniqueErrorsPerEndpoint=t,this.root=new a_o,this.rootApiFile={name:"api","error-discrimination":{strategy:"status-code"}}}setDisplayName({displayName:t}){this.rootApiFile["display-name"]=t}addNavigation({navigation:t}){this.packageMarkerFile.navigation=t}setServiceInfo(t,{auth:r,"base-path":i,"display-name":n,docs:a}){let u=this.getOrCreateFile(t);u.service==null&&(u.service={auth:!1,"base-path":"",endpoints:{}}),r!=null&&(u.service.auth=r),i!=null&&(u.service["base-path"]=i),n!=null&&(u.service["display-name"]=n),a!=null&&(u.docs=a)}addAudience(t){this.rootApiFile.audiences==null&&(this.rootApiFile.audiences=[]),this.rootApiFile.audiences.push(t)}setAuth(t){this.rootApiFile.auth=t}addAuthScheme({name:t,schema:r}){this.rootApiFile["auth-schemes"]==null&&(this.rootApiFile["auth-schemes"]={}),this.rootApiFile["auth-schemes"][t]==null&&(this.rootApiFile["auth-schemes"][t]=r)}setDefaultEnvironment(t){this.rootApiFile["default-environment"]=t}setDefaultUrl(t){this.rootApiFile["default-url"]=t}setBasePath(t){this.basePath=t}setApiVersion(t){this.rootApiFile.version=t}getEnvironmentType(){let t=Object.entries(this.rootApiFile.environments??{})[0];if(t!=null)return U6r(t[1],{singleBaseUrl:()=>"single",multipleBaseUrls:()=>"multi"})}addEnvironment({name:t,schema:r}){this.rootApiFile.environments==null&&(this.rootApiFile.environments={}),this.rootApiFile.environments[t]=r}getGlobalHeaderNames(){let t=Object.keys(this.rootApiFile.headers??{});if(this.rootApiFile["auth-schemes"]!=null)for(let i of Object.values(this.rootApiFile["auth-schemes"]))lwS(i)&&t.push(i.header);let r=this.getVersionHeader();return r!=null&&t.push(r),new Set(t)}addGlobalHeader({name:t,schema:r}){let i=this.getVersionHeader();i!=null&&i===t||(this.rootApiFile.headers==null&&(this.rootApiFile.headers={}),this.rootApiFile.headers[t]=r)}addIdempotencyHeader({name:t,schema:r}){this.rootApiFile["idempotency-headers"]==null&&(this.rootApiFile["idempotency-headers"]={}),this.rootApiFile["idempotency-headers"][t]=r}addVariable({name:t,schema:r}){this.rootApiFile.variables==null&&(this.rootApiFile.variables={}),this.rootApiFile.variables[t]=r}addImport({file:t,fileToImport:r,alias:i}){if(t===r)return;let n=i??pg((Kqe(r)+"/"+nmi(r,{stripExtension:!0})).replaceAll("__package__","root"));if(t===Wh.of(UN))return this.rootApiFile.imports==null&&(this.rootApiFile.imports={}),this.rootApiFile.imports[n]=z4a(Kqe(ztn.of(`/${t}`)),ztn.of(`/${r}`)),n;let a=this.getOrCreateFile(t);return a.imports==null&&(a.imports={}),a.imports[n]=z4a(Kqe(ztn.of(`/${t}`)),ztn.of(`/${r}`)),n}addType(t,{name:r,schema:i}){let n=this.getOrCreateFile(t);n.types==null&&(n.types={}),n.types[r]=i}addTypeExample(t,r,i){let n=this.getOrCreateFile(t);n.types==null&&(n.types={});let a=n.types[r];a!=null&&(typeof a=="string"?n.types[r]={type:a,examples:[i]}:(a.examples==null&&(a.examples=[]),a.examples.push(i)))}addError(t,{name:r,schema:i}){let n=this.getOrCreateFile(t);n.errors==null&&(n.errors={}),n.errors[r]==null?n.errors[r]=i:n.errors[r]?.type!==i.type&&(n.errors[r]={"status-code":i["status-code"],type:"unknown"})}addErrorExample(t,{name:r,example:i}){let n=this.getOrCreateFile(t);if(n.errors==null)return;let a=n.errors[r];if(a==null)return;a.examples==null&&(a.examples=[]),(a.examples.some(l=>N3t(l,i))??!1)||a.examples?.push(i)}addEndpoint(t,{name:r,schema:i,source:n}){let a=this.getOrCreateFile(t);a.service==null&&(a.service={auth:!1,"base-path":"",endpoints:{}}),n!=null&&(a.service.source=n),a.service.endpoints[r]=i}addWebhook(t,{name:r,schema:i}){let n=this.getOrCreateFile(t);n.webhooks==null&&(n.webhooks={}),n.webhooks[r]=i}addChannel(t,{channel:r}){let i=this.getOrCreateFile(t);i.channel=r;let n=this.basePath;n!=null&&(i.channel.path=Dz(n,r.path))}addChannelExample(t,{example:r}){let i=this.getOrCreateFile(t);i.channel==null&&(i.channel={path:"",auth:!1}),i.channel.messages==null&&(i.channel.messages={}),i.channel.examples==null&&(i.channel.examples=[]),i.channel.examples.push(r)}addChannelMessage(t,{messageId:r,message:i}){let n=this.getOrCreateFile(t);n.channel==null&&(n.channel={path:"",auth:!1}),n.channel.messages==null&&(n.channel.messages={}),n.channel.messages[r]=i}build(){let t=this.root.getAllFiles(),r=this.basePath;if(r!=null){this.packageMarkerFile.service!=null&&(this.packageMarkerFile.service={...this.packageMarkerFile.service,endpoints:Object.fromEntries(Object.entries(this.packageMarkerFile.service.endpoints).map(([n,a])=>[n,{...a,path:Dz(r,a.path)}]))});for(let n of Object.values(t))n.service!=null&&(n.service={...n.service,endpoints:Object.fromEntries(Object.entries(n.service.endpoints).map(([a,u])=>[a,{...u,path:Dz(r,u.path)}]))})}return{rootApiFile:this.rootApiFile,packageMarkerFile:this.packageMarkerFile,definitionFiles:t}}getOrCreateFile(t){return t===P1?this.packageMarkerFile:this.root.getOrCreateFile(t)}getVersionHeader(){if(this.rootApiFile.version!=null)return typeof this.rootApiFile.version.header=="string"?this.rootApiFile.version.header:this.rootApiFile.version.header.value}};function lwS(e){return e?.header!=null}var N2t={openapi:e=>({...e,type:"openapi",_visit:function(t){return N2t._visit(this,t)}}),protobuf:e=>({...e,type:"protobuf",_visit:function(t){return N2t._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"openapi":return t.openapi(e);case"protobuf":return t.protobuf(e);default:return t._other(e)}}};var Rfn={protobuf:e=>({...e,type:"protobuf",_visit:function(t){return Rfn._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"protobuf":return t.protobuf(e);default:return t._other(e)}}};var Z4={basic:e=>({...e,type:"basic",_visit:function(t){return Z4._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return Z4._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return Z4._visit(this,t)}}),query:e=>({...e,type:"query",_visit:function(t){return Z4._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return Z4._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"query":return t.query(e);case"oauth":return t.oauth(e);default:return t._other(e)}}};var A0={primitive:e=>({value:e,type:"primitive",_visit:function(t){return A0._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return A0._visit(this,t)}}),array:e=>({value:e,type:"array",_visit:function(t){return A0._visit(this,t)}}),map:e=>({value:e,type:"map",_visit:function(t){return A0._visit(this,t)}}),enum:e=>({value:e,type:"enum",_visit:function(t){return A0._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return A0._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return A0._visit(this,t)}}),unknown:e=>({value:e,type:"unknown",_visit:function(t){return A0._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e.value);case"object":return t.object(e);case"array":return t.array(e.value);case"map":return t.map(e.value);case"enum":return t.enum(e.value);case"literal":return t.literal(e.value);case"oneOf":return t.oneOf(e.value);case"unknown":return t.unknown(e.value);default:return t._other(e)}}};var Jp={int:e=>({value:e,type:"int",_visit:function(t){return Jp._visit(this,t)}}),int64:e=>({value:e,type:"int64",_visit:function(t){return Jp._visit(this,t)}}),uint:e=>({value:e,type:"uint",_visit:function(t){return Jp._visit(this,t)}}),uint64:e=>({value:e,type:"uint64",_visit:function(t){return Jp._visit(this,t)}}),float:e=>({value:e,type:"float",_visit:function(t){return Jp._visit(this,t)}}),double:e=>({value:e,type:"double",_visit:function(t){return Jp._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return Jp._visit(this,t)}}),datetime:e=>({value:e,type:"datetime",_visit:function(t){return Jp._visit(this,t)}}),date:e=>({value:e,type:"date",_visit:function(t){return Jp._visit(this,t)}}),base64:e=>({value:e,type:"base64",_visit:function(t){return Jp._visit(this,t)}}),boolean:e=>({value:e,type:"boolean",_visit:function(t){return Jp._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e.value);case"int64":return t.int64(e.value);case"uint":return t.uint(e.value);case"uint64":return t.uint64(e.value);case"float":return t.float(e.value);case"double":return t.double(e.value);case"string":return t.string(e.value);case"datetime":return t.datetime(e.value);case"date":return t.date(e.value);case"base64":return t.base64(e.value);case"boolean":return t.boolean(e.value);default:return t._other(e)}}};var Ffn={boolean:e=>({value:e,type:"boolean",_visit:function(t){return Ffn._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return Ffn._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}};var Mei={discriminated:e=>({value:e,type:"discriminated",_visit:function(t){return Mei._visit(this,t)}}),undiscriminated:e=>({value:e,type:"undiscriminated",_visit:function(t){return Mei._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e.value);case"undiscriminated":return t.undiscriminated(e.value);default:return t._other(e)}}};var GL={GenerallyAvailable:"GenerallyAvailable",Beta:"Beta",Deprecated:"Deprecated",_visit:(e,t)=>{switch(e){case GL.GenerallyAvailable:return t.generallyAvailable();case GL.Beta:return t.beta();case GL.Deprecated:return t.deprecated();default:return t._other()}}};var M8r={cursor:e=>({...e,type:"cursor",_visit:function(t){return M8r._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return M8r._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"cursor":return t.cursor(e);case"offset":return t.offset(e);default:return t._other(e)}}};var q8r={language:e=>({...e,type:"language",_visit:function(t){return q8r._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return q8r._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"language":return t.language(e);case"sdk":return t.sdk(e);default:return t._other(e)}}};var QL={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Js:"js",Node:"node",Ts:"ts",Nodets:"nodets",Golang:"golang",Dotnet:"dotnet",Jvm:"jvm",_visit:(e,t)=>{switch(e){case QL.Curl:return t.curl();case QL.Python:return t.python();case QL.Javascript:return t.javascript();case QL.Typescript:return t.typescript();case QL.Go:return t.go();case QL.Ruby:return t.ruby();case QL.Csharp:return t.csharp();case QL.Java:return t.java();case QL.Js:return t.js();case QL.Node:return t.node();case QL.Ts:return t.ts();case QL.Nodets:return t.nodets();case QL.Golang:return t.golang();case QL.Dotnet:return t.dotnet();case QL.Jvm:return t.jvm();default:return t._other()}}};var L2t={unknown:e=>({value:e,type:"unknown",_visit:function(t){return L2t._visit(this,t)}}),full:e=>({...e,type:"full",_visit:function(t){return L2t._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"unknown":return t.unknown(e.value);case"full":return t.full(e);default:return t._other(e)}}};var LBe={withStreaming:e=>({...e,type:"withStreaming",_visit:function(t){return LBe._visit(this,t)}}),withoutStreaming:e=>({value:e,type:"withoutStreaming",_visit:function(t){return LBe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"withStreaming":return t.withStreaming(e);case"withoutStreaming":return t.withoutStreaming(e.value);default:return t._other(e)}}};var RH={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",Options:"OPTIONS",Trace:"TRACE",_visit:(e,t)=>{switch(e){case RH.Get:return t.get();case RH.Post:return t.post();case RH.Put:return t.put();case RH.Patch:return t.patch();case RH.Delete:return t.delete();case RH.Head:return t.head();case RH.Options:return t.options();case RH.Trace:return t.trace();default:return t._other()}}};var qei={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return qei._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return qei._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return qei._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);default:return t._other(e)}}};var UBe={file:e=>({...e,type:"file",_visit:function(t){return UBe._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return UBe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e.value);default:return t._other(e)}}};var Cte={file:e=>({...e,type:"file",_visit:function(t){return Cte._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return Cte._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return Cte._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return Cte._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return Cte._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return Cte._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}};var ey={primitive:e=>({...e,type:"primitive",_visit:function(t){return ey._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return ey._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return ey._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return ey._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return ey._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return ey._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return ey._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return ey._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return ey._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return ey._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return ey._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}};var WP={int:e=>({...e,type:"int",_visit:function(t){return WP._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return WP._visit(this,t)}}),uint:()=>({type:"uint",_visit:function(e){return WP._visit(this,e)}}),uint64:()=>({type:"uint64",_visit:function(e){return WP._visit(this,e)}}),float:()=>({type:"float",_visit:function(e){return WP._visit(this,e)}}),double:e=>({...e,type:"double",_visit:function(t){return WP._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return WP._visit(this,t)}}),datetime:()=>({type:"datetime",_visit:function(e){return WP._visit(this,e)}}),date:()=>({type:"date",_visit:function(e){return WP._visit(this,e)}}),base64:()=>({type:"base64",_visit:function(e){return WP._visit(this,e)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return WP._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint();case"uint64":return t.uint64();case"float":return t.float();case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime();case"date":return t.date();case"base64":return t.base64();case"boolean":return t.boolean(e);default:return t._other(e)}}};var bB={boolean:e=>({value:e,type:"boolean",_visit:function(t){return bB._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return bB._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}};var T8r={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return T8r._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return T8r._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}};var Iwe={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return Iwe._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return Iwe._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return Iwe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);default:return t._other(e)}}};var gB={file:e=>({...e,type:"file",_visit:function(t){return gB._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return gB._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return gB._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return gB._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return gB._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return gB._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}};var Ul={primitive:e=>({...e,type:"primitive",_visit:function(t){return Ul._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Ul._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return Ul._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Ul._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Ul._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Ul._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Ul._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Ul._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return Ul._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Ul._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return Ul._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}};var dK={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return dK._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return dK._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}};var op={int:e=>({...e,type:"int",_visit:function(t){return op._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return op._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return op._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return op._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return op._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return op._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return op._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return op._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return op._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return op._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return op._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint(e);case"uint64":return t.uint64(e);case"float":return t.float(e);case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime(e);case"date":return t.date(e);case"base64":return t.base64(e);case"boolean":return t.boolean(e);default:return t._other(e)}}};var Uy={};Ro(Uy,{AllOfPropertyConflict:()=>odn,ArraySchema:()=>vho,ArraySchemaWithExample:()=>$ho,Availability:()=>h_o,Base64WithExample:()=>Lho,BasicSecurityScheme:()=>b_o,BearerSecurityScheme:()=>g_o,BooleanSchema:()=>fho,BooleanWithExample:()=>Uho,CasingOverrides:()=>P_o,CommonProperty:()=>Sho,CommonPropertyWithExample:()=>eyo,CursorPagination:()=>Z_o,CustomCodeSample:()=>Y_o,CustomCodeSampleLanguage:()=>Q_o,CustomCodeSampleSdk:()=>K_o,DateWithExample:()=>Nho,DatetimeWithExample:()=>Fho,DiscriminatedOneOfSchema:()=>jho,DiscriminatedOneOfSchemaWithExample:()=>Zho,DoubleSchema:()=>cho,DoubleWithExample:()=>zho,Encoding:()=>__o,Endpoint:()=>eho,EndpointExample:()=>tdn,EndpointResponseExample:()=>G_o,EndpointSdkName:()=>aQt,EndpointWithExample:()=>fcp,EnumSchema:()=>Vfn,EnumSchemaWithExample:()=>Who,EnumValue:()=>Bei,ErrorExample:()=>U_o,FernExample:()=>W_o,FileResponse:()=>Yfn,FileSchema:()=>I_o,FloatWithExample:()=>Iho,FullEndpointExample:()=>X_o,FullExample:()=>aM,FullObjectExample:()=>q_o,FullOneOfExample:()=>C_o,GlobalHeader:()=>pho,Header:()=>Iei,HeaderExample:()=>edn,HeaderSecurityScheme:()=>O_o,HeaderWithExample:()=>Fei,HttpEndpointServer:()=>Zfn,HttpError:()=>V_o,HttpErrorWithExample:()=>qho,HttpMethod:()=>$fn,IdempotencyHeader:()=>_ho,Int64WithExample:()=>Cho,IntSchema:()=>uho,IntWithExample:()=>Tho,JsonRequest:()=>F_o,JsonRequestWithExample:()=>Eho,JsonResponse:()=>Xfn,JsonResponseWithExample:()=>cdn,KeyValuePair:()=>T_o,LiteralExample:()=>M_o,LiteralSchema:()=>adn,LiteralSchemaValue:()=>hho,LongSchema:()=>sho,MapSchema:()=>bho,MapSchemaWithExample:()=>Gho,MultipartRequest:()=>Kfn,MultipartRequestProperty:()=>R_o,MultipartSchema:()=>z_o,NamedFullExample:()=>uQt,Namespace:()=>j_o,NamespaceId:()=>A_o,NullableSchema:()=>Oho,NullableSchemaWithExample:()=>Jho,OauthSecurityScheme:()=>S_o,ObjectProperty:()=>Pho,ObjectPropertyConflictInfo:()=>udn,ObjectPropertyWithExample:()=>Xho,ObjectSchema:()=>yho,ObjectSchemaWithExample:()=>Kho,OctetStreamRequest:()=>Jfn,OffsetPagination:()=>k_o,OneOfSchema:()=>mho,OneOfSchemaWithExample:()=>Yho,OpenApiIntermediateRepresentation:()=>ccp,OpenApiSource:()=>l_o,OptionalSchema:()=>gho,OptionalSchemaWithExample:()=>Qho,Pagination:()=>rdn,PathParameter:()=>Gfn,PathParameterExample:()=>H_o,PathParameterWithExample:()=>Dho,PrimitiveExample:()=>Hfn,PrimitiveSchema:()=>Rei,PrimitiveSchemaValue:()=>dho,PrimitiveSchemaValueWithExample:()=>Vho,PrimitiveSchemaWithExample:()=>ldn,PropertyKey:()=>Wfn,ProtobufEncoding:()=>p_o,ProtobufSource:()=>f_o,QueryParameter:()=>Qfn,QueryParameterExample:()=>kfn,QueryParameterWithExample:()=>sdn,QuerySecurityScheme:()=>m_o,ReferencedSchema:()=>oQt,Request:()=>N_o,RequestWithExample:()=>Aho,Response:()=>L_o,ResponseWithExample:()=>Mho,Schema:()=>uO,SchemaId:()=>pK,SchemaWithExample:()=>GE,Schemas:()=>oho,SdkGroup:()=>w_o,SdkGroupInfo:()=>B_o,SdkGroupName:()=>xei,SecurityScheme:()=>D_o,SecuritySchemeId:()=>v_o,Server:()=>E_o,Source:()=>d_o,StatusCode:()=>rQt,StreamingResponseExample:()=>$_o,StringSchema:()=>lho,StringSchemaWithExample:()=>Rho,SupportedSdkLanguage:()=>J_o,Tag:()=>y_o,TagId:()=>_K,Tags:()=>x_o,TextResponse:()=>zei,Uint64WithExample:()=>xho,UintWithExample:()=>Bho,UnDiscriminatedOneOfSchema:()=>who,UnDiscriminatedOneOfSchemaWithExample:()=>kho,UnknownSchemaWithExample:()=>Hho,Webhook:()=>tho,WebhookExampleCall:()=>ndn,WebhookHttpMethod:()=>idn,WebhookWithExample:()=>dcp,WebsocketChannel:()=>aho,WebsocketHandshake:()=>rho,WebsocketHandshakeWithExample:()=>lcp,WebsocketMessageExample:()=>iho,WebsocketSessionExample:()=>nho,WithAvailability:()=>Q_,WithDescription:()=>vf,WithEncoding:()=>Bte,WithInline:()=>MD,WithName:()=>Bb,WithNamespace:()=>nQt,WithSdkGroupName:()=>oO,WithSource:()=>$h,WithStatusCode:()=>iQt,WithTitle:()=>aO,commons:()=>CSs,example:()=>BSs,finalIr:()=>xSs,parseIr:()=>ISs});var CSs={};Ro(CSs,{BasicSecurityScheme:()=>b_o,BearerSecurityScheme:()=>g_o,Encoding:()=>__o,HeaderSecurityScheme:()=>O_o,Namespace:()=>j_o,NamespaceId:()=>A_o,OauthSecurityScheme:()=>S_o,OpenApiSource:()=>l_o,ProtobufEncoding:()=>p_o,ProtobufSource:()=>f_o,QuerySecurityScheme:()=>m_o,SchemaId:()=>pK,SdkGroup:()=>w_o,SdkGroupName:()=>xei,SecurityScheme:()=>D_o,SecuritySchemeId:()=>v_o,Server:()=>E_o,Source:()=>d_o,StatusCode:()=>rQt,Tag:()=>y_o,TagId:()=>_K,WithAvailability:()=>Q_,WithDescription:()=>vf,WithEncoding:()=>Bte,WithInline:()=>MD,WithName:()=>Bb,WithNamespace:()=>nQt,WithSdkGroupName:()=>oO,WithSource:()=>$h,WithStatusCode:()=>iQt,WithTitle:()=>aO});var Ct={};Ro(Ct,{JsonError:()=>Nfn,ParseError:()=>Lfn,any:()=>Ysp,bigint:()=>Rsp,boolean:()=>Xsp,booleanLiteral:()=>Ksp,date:()=>Fsp,discriminant:()=>ocp,enum_:()=>u_o,getObjectLikeUtils:()=>U2t,getObjectUtils:()=>nSi,getSchemaUtils:()=>nM,isProperty:()=>Cei,lazy:()=>Nsp,lazyObject:()=>Gsp,list:()=>c_o,number:()=>Zsp,object:()=>s_o,objectWithoutOptionalProperties:()=>$sp,optional:()=>ASs,property:()=>Usp,record:()=>rcp,set:()=>icp,string:()=>ksp,stringLiteral:()=>Jsp,transform:()=>MSs,undiscriminatedUnion:()=>acp,union:()=>scp,unknown:()=>ecp,withParsedProperties:()=>TSs});var PP={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",OPTIONAL:"optional"};function $E(e,t){return`Expected ${t}. Received ${fwS(e)}.`}function fwS(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}function k4(e){return{...e,json:zsp(e.json),parse:zsp(e.parse)}}function zsp(e){return(t,r)=>{let i=e(t,r),{skipValidation:n=!1}=r??{};return!i.ok&&n?(console.warn(["Failed to validate.",...i.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.51.19",
3
+ "version": "0.51.21",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",