const nr=function(){const e=document.createelement("link").rellist;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.queryselectorall('link[rel="modulepreload"]'))n(i);new mutationobserver(i=>{for(const o of i)if(o.type==="childlist")for(const s of o.addednodes)s.tagname==="link"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childlist:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerpolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}};nr();function ir(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return object.defineproperty(r,"__esmodule",{value:!0}),object.keys(t).foreach(function(n){var i=object.getownpropertydescriptor(t,n);object.defineproperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var ve={exports:{}},ct={exports:{}};(function(t){t.exports=e;function e(n){if(n)return r(n)}function r(n){for(var i in e.prototype)n[i]=e.prototype[i];return n}e.prototype.on=e.prototype.addeventlistener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this},e.prototype.once=function(n,i){function o(){this.off(n,o),i.apply(this,arguments)}return o.fn=i,this.on(n,o),this},e.prototype.off=e.prototype.removelistener=e.prototype.removealllisteners=e.prototype.removeeventlistener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+n];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,a=0;a"u"&&(n=kt()),qe(t,"",0,[],void 0,0,n);var i;try{te.length===0?i=json.stringify(t,e,r):i=json.stringify(t,lt(e),r)}catch{return json.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var o=ne.pop();o.length===4?object.defineproperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function ce(t,e,r,n){var i=object.getownpropertydescriptor(n,r);i.get!==void 0?i.configurable?(object.defineproperty(n,r,{value:t}),ne.push([n,r,e,i])):te.push([e,r,t]):(n[r]=t,ne.push([n,r,e]))}function qe(t,e,r,n,i,o,s){o+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;as.depthlimit){ce(pe,t,e,i);return}if(typeof s.edgeslimit<"u"&&r+1>s.edgeslimit){ce(pe,t,e,i);return}if(n.push(t),array.isarray(t))for(a=0;ae?1:0}function bt(t,e,r,n){typeof n>"u"&&(n=kt());var i=ke(t,"",0,[],void 0,0,n)||t,o;try{te.length===0?o=json.stringify(i,e,r):o=json.stringify(i,lt(e),r)}catch{return json.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var s=ne.pop();s.length===4?object.defineproperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function ke(t,e,r,n,i,o,s){o+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;as.depthlimit){ce(pe,t,e,i);return}if(typeof s.edgeslimit<"u"&&r+1>s.edgeslimit){ce(pe,t,e,i);return}if(n.push(t),array.isarray(t))for(a=0;a0)for(var n=0;n"u"?e:k(uint8array),ue={"%aggregateerror%":typeof aggregateerror>"u"?e:aggregateerror,"%array%":array,"%arraybuffer%":typeof arraybuffer>"u"?e:arraybuffer,"%arrayiteratorprototype%":se?k([][symbol.iterator]()):e,"%asyncfromsynciteratorprototype%":e,"%asyncfunction%":ae,"%asyncgenerator%":ae,"%asyncgeneratorfunction%":ae,"%asynciteratorprototype%":ae,"%atomics%":typeof atomics>"u"?e:atomics,"%bigint%":typeof bigint>"u"?e:bigint,"%boolean%":boolean,"%dataview%":typeof dataview>"u"?e:dataview,"%date%":date,"%decodeuri%":decodeuri,"%decodeuricomponent%":decodeuricomponent,"%encodeuri%":encodeuri,"%encodeuricomponent%":encodeuricomponent,"%error%":error,"%eval%":eval,"%evalerror%":evalerror,"%float32array%":typeof float32array>"u"?e:float32array,"%float64array%":typeof float64array>"u"?e:float64array,"%finalizationregistry%":typeof finalizationregistry>"u"?e:finalizationregistry,"%function%":dt,"%generatorfunction%":ae,"%int8array%":typeof int8array>"u"?e:int8array,"%int16array%":typeof int16array>"u"?e:int16array,"%int32array%":typeof int32array>"u"?e:int32array,"%isfinite%":isfinite,"%isnan%":isnan,"%iteratorprototype%":se?k(k([][symbol.iterator]())):e,"%json%":typeof json=="object"?json:e,"%map%":typeof map>"u"?e:map,"%mapiteratorprototype%":typeof map>"u"||!se?e:k(new map()[symbol.iterator]()),"%math%":math,"%number%":number,"%object%":object,"%parsefloat%":parsefloat,"%parseint%":parseint,"%promise%":typeof promise>"u"?e:promise,"%proxy%":typeof proxy>"u"?e:proxy,"%rangeerror%":rangeerror,"%referenceerror%":referenceerror,"%reflect%":typeof reflect>"u"?e:reflect,"%regexp%":regexp,"%set%":typeof set>"u"?e:set,"%setiteratorprototype%":typeof set>"u"||!se?e:k(new set()[symbol.iterator]()),"%sharedarraybuffer%":typeof sharedarraybuffer>"u"?e:sharedarraybuffer,"%string%":string,"%stringiteratorprototype%":se?k(""[symbol.iterator]()):e,"%symbol%":se?symbol:e,"%syntaxerror%":fe,"%throwtypeerror%":gr,"%typedarray%":vr,"%typeerror%":le,"%uint8array%":typeof uint8array>"u"?e:uint8array,"%uint8clampedarray%":typeof uint8clampedarray>"u"?e:uint8clampedarray,"%uint16array%":typeof uint16array>"u"?e:uint16array,"%uint32array%":typeof uint32array>"u"?e:uint32array,"%urierror%":urierror,"%weakmap%":typeof weakmap>"u"?e:weakmap,"%weakref%":typeof weakref>"u"?e:weakref,"%weakset%":typeof weakset>"u"?e:weakset},br=function t(e){var r;if(e==="%asyncfunction%")r=ke("async function () {}");else if(e==="%generatorfunction%")r=ke("function* () {}");else if(e==="%asyncgeneratorfunction%")r=ke("async function* () {}");else if(e==="%asyncgenerator%"){var n=t("%asyncgeneratorfunction%");n&&(r=n.prototype)}else if(e==="%asynciteratorprototype%"){var i=t("%asyncgenerator%");i&&(r=k(i.prototype))}return ue[e]=r,r},ht={"%arraybufferprototype%":["arraybuffer","prototype"],"%arrayprototype%":["array","prototype"],"%arrayproto_entries%":["array","prototype","entries"],"%arrayproto_foreach%":["array","prototype","foreach"],"%arrayproto_keys%":["array","prototype","keys"],"%arrayproto_values%":["array","prototype","values"],"%asyncfunctionprototype%":["asyncfunction","prototype"],"%asyncgenerator%":["asyncgeneratorfunction","prototype"],"%asyncgeneratorprototype%":["asyncgeneratorfunction","prototype","prototype"],"%booleanprototype%":["boolean","prototype"],"%dataviewprototype%":["dataview","prototype"],"%dateprototype%":["date","prototype"],"%errorprototype%":["error","prototype"],"%evalerrorprototype%":["evalerror","prototype"],"%float32arrayprototype%":["float32array","prototype"],"%float64arrayprototype%":["float64array","prototype"],"%functionprototype%":["function","prototype"],"%generator%":["generatorfunction","prototype"],"%generatorprototype%":["generatorfunction","prototype","prototype"],"%int8arrayprototype%":["int8array","prototype"],"%int16arrayprototype%":["int16array","prototype"],"%int32arrayprototype%":["int32array","prototype"],"%jsonparse%":["json","parse"],"%jsonstringify%":["json","stringify"],"%mapprototype%":["map","prototype"],"%numberprototype%":["number","prototype"],"%objectprototype%":["object","prototype"],"%objproto_tostring%":["object","prototype","tostring"],"%objproto_valueof%":["object","prototype","valueof"],"%promiseprototype%":["promise","prototype"],"%promiseproto_then%":["promise","prototype","then"],"%promise_all%":["promise","all"],"%promise_reject%":["promise","reject"],"%promise_resolve%":["promise","resolve"],"%rangeerrorprototype%":["rangeerror","prototype"],"%referenceerrorprototype%":["referenceerror","prototype"],"%regexpprototype%":["regexp","prototype"],"%setprototype%":["set","prototype"],"%sharedarraybufferprototype%":["sharedarraybuffer","prototype"],"%stringprototype%":["string","prototype"],"%symbolprototype%":["symbol","prototype"],"%syntaxerrorprototype%":["syntaxerror","prototype"],"%typedarrayprototype%":["typedarray","prototype"],"%typeerrorprototype%":["typeerror","prototype"],"%uint8arrayprototype%":["uint8array","prototype"],"%uint8clampedarrayprototype%":["uint8clampedarray","prototype"],"%uint16arrayprototype%":["uint16array","prototype"],"%uint32arrayprototype%":["uint32array","prototype"],"%urierrorprototype%":["urierror","prototype"],"%weakmapprototype%":["weakmap","prototype"],"%weaksetprototype%":["weakset","prototype"]},se=nt,me=mr,wr=se.call(function.call,array.prototype.concat),sr=se.call(function.apply,array.prototype.splice),dt=se.call(function.call,string.prototype.replace),xe=se.call(function.call,string.prototype.slice),er=se.call(function.call,regexp.prototype.exec),ar=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_r=/\\(\\)?/g,or=function(e){var r=xe(e,0,1),n=xe(e,-1);if(r==="%"&&n!=="%")throw new fe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fe("invalid intrinsic syntax, expected opening `%`");var i=[];return dt(e,ar,function(o,s,a,l){i[i.length]=a?dt(l,_r,"$1"):s||o}),i},pr=function(e,r){var n=e,i;if(me(ht,n)&&(i=ht[n],n="%"+i[0]+"%"),me(ue,n)){var o=ue[n];if(o===ae&&(o=br(n)),typeof o>"u"&&!r)throw new le("intrinsic "+e+" exists, but is not available. please file an issue!");return{alias:i,name:n,value:o}}throw new fe("intrinsic "+e+" does not exist!")},it=function(e,r){if(typeof e!="string"||e.length===0)throw new le("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new le('"allowmissing" argument must be a boolean');if(er(/^%?[^%]*%?$/,e)===null)throw new fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=or(e),i=n.length>0?n[0]:"",o=pr("%"+i+"%",r),s=o.name,a=o.value,l=!1,p=o.alias;p&&(i=p[0],sr(n,wr([0,1],p)));for(var d=1,v=!0;d=n.length){var x=re(a,g);v=!!x,v&&"get"in x&&!("originalvalue"in x.get)?a=x.get:a=a[g]}else v=me(a,g),a=a[g];v&&!l&&(ue[s]=a)}}return a},$t={exports:{}};(function(t){var e=nt,r=it,n=r("%function.prototype.apply%"),i=r("%function.prototype.call%"),o=r("%reflect.apply%",!0)||e.call(i,n),s=r("%object.getownpropertydescriptor%",!0),a=r("%object.defineproperty%",!0),l=r("%math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}t.exports=function(v){var g=o(e,i,arguments);if(s&&a){var s=s(g,"length");s.configurable&&a(g,"length",{value:1+l(0,v.length-(arguments.length-1))})}return g};var p=function(){return o(e,n,arguments)};a?a(t.exports,"apply",{value:p}):t.exports.apply=p})($t);var qt=it,zt=$t.exports,mr=zt(qt("string.prototype.indexof")),xr=function(e,r){var n=qt(e,!!r);return typeof n=="function"&&mr(e,".prototype.")>-1?zt(n):n};const tr={},fr=object.freeze(object.defineproperty({__proto__:null,default:tr},symbol.tostringtag,{value:"module"})),ut=ir(fr);var ot=typeof map=="function"&&map.prototype,le=object.getownpropertydescriptor&&ot?object.getownpropertydescriptor(map.prototype,"size"):null,te=ot&&le&&typeof le.get=="function"?le.get:null,ir=ot&&map.prototype.foreach,st=typeof set=="function"&&set.prototype,de=object.getownpropertydescriptor&&st?object.getownpropertydescriptor(set.prototype,"size"):null,fe=st&&de&&typeof de.get=="function"?de.get:null,rr=st&&set.prototype.foreach,cr=typeof weakmap=="function"&&weakmap.prototype,me=cr?weakmap.prototype.has:null,nr=typeof weakset=="function"&&weakset.prototype,ge=nr?weakset.prototype.has:null,kr=typeof weakref=="function"&&weakref.prototype,yt=kr?weakref.prototype.deref:null,br=boolean.prototype.valueof,lr=object.prototype.tostring,dr=function.prototype.tostring,$r=string.prototype.match,at=string.prototype.slice,x=string.prototype.replace,qr=string.prototype.touppercase,mt=string.prototype.tolowercase,ht=regexp.prototype.test,gt=array.prototype.concat,h=array.prototype.join,zr=array.prototype.slice,vt=math.floor,je=typeof bigint=="function"?bigint.prototype.valueof:null,$e=object.getownpropertysymbols,xe=typeof symbol=="function"&&typeof symbol.iterator=="symbol"?symbol.prototype.tostring:null,pe=typeof symbol=="function"&&typeof symbol.iterator=="object",r=typeof symbol=="function"&&symbol.tostringtag&&(typeof symbol.tostringtag===pe?"object":"symbol")?symbol.tostringtag:null,wt=object.prototype.propertyisenumerable,bt=(typeof reflect=="function"?reflect.getprototypeof:object.getprototypeof)||([].__proto__===array.prototype?function(t){return t.__proto__}:null);function wt(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||ht.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-vt(-t):vt(t);if(n!==t){var i=string(n),o=at.call(e,i.length+1);return x.call(i,r,"$&_")+"."+x.call(x.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(e,r,"$&_")}var ye=ut,st=ye.custom,et=gt(st)?st:null,ur=function t(e,r,n,i){var o=r||{};if(j(o,"quotestyle")&&o.quotestyle!=="single"&&o.quotestyle!=="double")throw new typeerror('option "quotestyle" must be "single" or "double"');if(j(o,"maxstringlength")&&(typeof o.maxstringlength=="number"?o.maxstringlength<0&&o.maxstringlength!==1/0:o.maxstringlength!==null))throw new typeerror('option "maxstringlength", if provided, must be a positive integer, infinity, or `null`');var s=j(o,"custominspect")?o.custominspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new typeerror("option \"custominspect\", if provided, must be `true`, `false`, or `'symbol'`");if(j(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseint(o.indent,10)===o.indent&&o.indent>0))throw new typeerror('option "indent" must be "\\t", an integer > 0, or `null`');if(j(o,"numericseparator")&&typeof o.numericseparator!="boolean")throw new typeerror('option "numericseparator", if provided, must be `true` or `false`');var a=o.numericseparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return qt(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=string(e);return a?wt(e,l):l}if(typeof e=="bigint"){var p=string(e)+"n";return a?wt(e,p):p}var d=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof e=="object")return ze(e)?"[array]":"[object]";var v=an(o,n);if(typeof i>"u")i=[];else if(vt(i,e)>=0)return"[circular]";function g(c,u,f){if(u&&(i=zr.call(i),i.push(u)),f){var y={depth:o.depth};return j(o,"quotestyle")&&(y.quotestyle=o.quotestyle),t(c,y,n+1,i)}return t(c,o,n+1,i)}if(typeof e=="function"&&!at(e)){var s=xr(e),o=ae(e,g);return"[function"+(s?": "+s:" (anonymous)")+"]"+(o.length>0?" { "+h.call(o,", ")+" }":"")}if(gt(e)){var x=pe?x.call(string(e),/^(symbol\(.*\))_[^)]*$/,"$1"):xe.call(e);return typeof e=="object"&&!pe?ye(x):x}if(nn(e)){for(var n="<"+mt.call(string(e.nodename)),m=e.attributes||[],k=0;k",n}if(ze(e)){if(e.length===0)return"[]";var b=ae(e,g);return v&&!sn(b)?"["+et(b,v)+"]":"[ "+h.call(b,", ")+" ]"}if(jr(e)){var d=ae(e,g);return!("cause"in error.prototype)&&"cause"in e&&!wt.call(e,"cause")?"{ ["+string(e)+"] "+h.call(gt.call("[cause]: "+g(e.cause),d),", ")+" }":d.length===0?"["+string(e)+"]":"{ ["+string(e)+"] "+h.call(d,", ")+" }"}if(typeof e=="object"&&s){if(et&&typeof e[et]=="function"&&ye)return ye(e,{depth:d-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(yr(e)){var g=[];return ir.call(e,function(c,u){g.push(g(u,e,!0)+" => "+g(c,e))}),_t("map",te.call(e),g,v)}if(tn(e)){var z=[];return rr.call(e,function(c){z.push(g(c,e))}),_t("set",fe.call(e),z,v)}if(zr(e))return qe("weakmap");if(rn(e))return qe("weakset");if(en(e))return qe("weakref");if(vr(e))return ye(g(number(e)));if(kr(e))return ye(g(je.call(e)));if(qr(e))return ye(br.call(e));if(gr(e))return ye(g(string(e)));if(!wr(e)&&!at(e)){var $=ae(e,g),l=bt?bt(e)===object.prototype:e instanceof object||e.constructor===object,a=e instanceof object?"":"null prototype",q=!l&&r&&object(e)===e&&r in e?at.call(y(e),8,-1):a?"object":"",z=l||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",w=z+(q||a?"["+h.call(gt.call([],q||[],a||[]),": ")+"] ":"");return $.length===0?w+"{}":v?w+"{"+et($,v)+"}":w+"{ "+h.call($,", ")+" }"}return string(e)};function jt(t,e,r){var n=(r.quotestyle||e)==="double"?'"':"'";return n+t+n}function hr(t){return x.call(string(t),/"/g,""")}function ze(t){return y(t)==="[object array]"&&(!r||!(typeof t=="object"&&r in t))}function wr(t){return y(t)==="[object date]"&&(!r||!(typeof t=="object"&&r in t))}function at(t){return y(t)==="[object regexp]"&&(!r||!(typeof t=="object"&&r in t))}function jr(t){return y(t)==="[object error]"&&(!r||!(typeof t=="object"&&r in t))}function gr(t){return y(t)==="[object string]"&&(!r||!(typeof t=="object"&&r in t))}function vr(t){return y(t)==="[object number]"&&(!r||!(typeof t=="object"&&r in t))}function qr(t){return y(t)==="[object boolean]"&&(!r||!(typeof t=="object"&&r in t))}function gt(t){if(pe)return t&&typeof t=="object"&&t instanceof symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!xe)return!1;try{return xe.call(t),!0}catch{}return!1}function kr(t){if(!t||typeof t!="object"||!je)return!1;try{return je.call(t),!0}catch{}return!1}var jr=object.prototype.hasownproperty||function(t){return t in this};function j(t,e){return jr.call(t,e)}function y(t){return lr.call(t)}function xr(t){if(t.name)return t.name;var e=$r.call(dr.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function vt(t,e){if(t.indexof)return t.indexof(e);for(var r=0,n=t.length;re.maxstringlength){var r=t.length-e.maxstringlength,n="... "+r+" more character"+(r>1?"s":"");return qt(at.call(t,0,e.maxstringlength),e)+n}var i=x.call(x.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,on);return jt(i,"single",e)}function on(t){var e=t.charcodeat(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+qr.call(e.tostring(16))}function ye(t){return"object("+t+")"}function qe(t){return t+" { ? }"}function _t(t,e,r,n){var i=n?et(r,n):h.call(r,", ");return t+" ("+e+") {"+i+"}"}function sn(t){for(var e=0;e=0)return!1;return!0}function an(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=h.call(array(t.indent+1)," ");else return null;return{base:r,prev:h.call(array(e+1),r)}}function et(t,e){if(t.length===0)return"";var r=` `+e.prev+e.base;return r+h.call(t,","+r)+` `+e.prev}function ae(t,e){var r=ze(t),n=[];if(r){n.length=t.length;for(var i=0;i1;){var r=e.pop(),n=r.obj[r.prop];if(ee(n)){for(var i=[],o=0;o=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||o===en.rfc1738&&(p===40||p===41)){a+=s.charat(l);continue}if(p<128){a=a+u[p];continue}if(p<2048){a=a+(u[192|p>>6]+u[128|p&63]);continue}if(p<55296||p>=57344){a=a+(u[224|p>>12]+u[128|p>>6&63]+u[128|p&63]);continue}l+=1,p=65536+((p&1023)<<10|s.charcodeat(l)&1023),a+=u[240|p>>18]+u[128|p>>12&63]+u[128|p>>6&63]+u[128|p&63]}return a},xn=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i"u"&&(b=0)}if(typeof l=="function"?m=l(r,m):m instanceof date?m=v(m):n==="comma"&&j(m)&&(m=tt.maybemap(m,function(i){return i instanceof date?v(i):i})),m===null){if(o)return a&&!o?a(r,f.encoder,x,"key",g):r;m=""}if(ln(m)||tt.isbuffer(m)){if(a){var z=o?r:a(r,f.encoder,x,"key",g);if(n==="comma"&&o){for(var $=nn.call(string(m),","),l="",a=0;a<$.length;++a)l+=(a===0?"":",")+s(a($[a],f.encoder,x,"value",g));return[s(z)+(i&&j(m)&&$.length===1?"[]":"")+"="+l]}return[s(z)+"="+s(a(m,f.encoder,x,"value",g))]}return[s(r)+"="+s(string(m))]}var q=[];if(typeof m>"u")return q;var z;if(n==="comma"&&j(m))z=[{value:m.length>0?m.join(",")||null:void 0}];else if(j(l))z=l;else{var w=object.keys(m);z=p?w.sort(p):w}for(var c=i&&j(m)&&m.length===1?r+"[]":r,u=0;u"u"?f.allowdots:!!e.allowdots,charset:r,charsetsentinel:typeof e.charsetsentinel=="boolean"?e.charsetsentinel:f.charsetsentinel,delimiter:typeof e.delimiter>"u"?f.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:f.encode,encoder:typeof e.encoder=="function"?e.encoder:f.encoder,encodevaluesonly:typeof e.encodevaluesonly=="boolean"?e.encodevaluesonly:f.encodevaluesonly,filter:o,format:n,formatter:i,serializedate:typeof e.serializedate=="function"?e.serializedate:f.serializedate,skipnulls:typeof e.skipnulls=="boolean"?e.skipnulls:f.skipnulls,sort:typeof e.sort=="function"?e.sort:null,strictnullhandling:typeof e.strictnullhandling=="boolean"?e.strictnullhandling:f.strictnullhandling}},qn=function(t,e){var r=t,n=$n(e),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):j(n.filter)&&(o=n.filter,i=o);var s=[];if(typeof r!="object"||r===null)return"";var a;e&&e.arrayformat in ot?a=e.arrayformat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var l=ot[a];if(e&&"commaroundtrip"in e&&typeof e.commaroundtrip!="boolean")throw new typeerror("`commaroundtrip` must be a boolean, or absent");var p=l==="comma"&&e&&e.commaroundtrip;i||(i=object.keys(r)),n.sort&&i.sort(n.sort);for(var d=xt(),v=0;v0?o+s:""},he=jt,rt=object.prototype.hasownproperty,zn=array.isarray,t={allowdots:!1,allowprototypes:!1,allowsparse:!1,arraylimit:20,charset:"utf-8",charsetsentinel:!1,comma:!1,decoder:he.decode,delimiter:"&",depth:5,ignorequeryprefix:!1,interpretnumericentities:!1,parameterlimit:1e3,parsearrays:!0,plainobjects:!1,strictnullhandling:!1},un=function(t){return t.replace(/&#(\d+);/g,function(e,r){return string.fromcharcode(parseint(r,10))})},zt=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexof(",")>-1?t.split(","):t},hn="utf8=%26%2310003%3b",wn="utf8=%e2%9c%93",jn=function(e,r){var n={},i=r.ignorequeryprefix?e.replace(/^\?/,""):e,o=r.parameterlimit===1/0?void 0:r.parameterlimit,s=i.split(r.delimiter,o),a=-1,l,p=r.charset;if(r.charsetsentinel)for(l=0;l-1&&(o=zn(o)?[o]:o),rt.call(n,s)?n[s]=he.combine(n[s],o):n[s]=o}return n},gn=function(t,e,r,n){for(var i=n?e:zt(e,r),o=t.length-1;o>=0;--o){var s,a=t[o];if(a==="[]"&&r.parsearrays)s=[].concat(i);else{s=r.plainobjects?object.create(null):{};var l=a.charat(0)==="["&&a.charat(a.length-1)==="]"?a.slice(1,-1):a,p=parseint(l,10);!r.parsearrays&&l===""?s={0:i}:!isnan(p)&&a!==l&&string(p)===l&&p>=0&&r.parsearrays&&p<=r.arraylimit?(s=[],s[p]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},vn=function(e,r,n,i){if(!!e){var o=n.allowdots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=n.depth>0&&s.exec(o),p=l?o.slice(0,l.index):o,d=[];if(p){if(!n.plainobjects&&rt.call(object.prototype,p)&&!n.allowprototypes)return;d.push(p)}for(var v=0;n.depth>0&&(l=a.exec(o))!==null&&v"u"?t.charset:e.charset;return{allowdots:typeof e.allowdots>"u"?t.allowdots:!!e.allowdots,allowprototypes:typeof e.allowprototypes=="boolean"?e.allowprototypes:t.allowprototypes,allowsparse:typeof e.allowsparse=="boolean"?e.allowsparse:t.allowsparse,arraylimit:typeof e.arraylimit=="number"?e.arraylimit:t.arraylimit,charset:r,charsetsentinel:typeof e.charsetsentinel=="boolean"?e.charsetsentinel:t.charsetsentinel,comma:typeof e.comma=="boolean"?e.comma:t.comma,decoder:typeof e.decoder=="function"?e.decoder:t.decoder,delimiter:typeof e.delimiter=="string"||he.isregexp(e.delimiter)?e.delimiter:t.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:t.depth,ignorequeryprefix:e.ignorequeryprefix===!0,interpretnumericentities:typeof e.interpretnumericentities=="boolean"?e.interpretnumericentities:t.interpretnumericentities,parameterlimit:typeof e.parameterlimit=="number"?e.parameterlimit:t.parameterlimit,parsearrays:e.parsearrays!==!1,plainobjects:typeof e.plainobjects=="boolean"?e.plainobjects:t.plainobjects,strictnullhandling:typeof e.strictnullhandling=="boolean"?e.strictnullhandling:t.strictnullhandling}},kn=function(t,e){var r=qn(e);if(t===""||t===null||typeof t>"u")return r.plainobjects?object.create(null):{};for(var n=typeof t=="string"?jn(t,r):t,i=r.plainobjects?object.create(null):{},o=object.keys(n),s=0;s=i.length?{done:!0}:{done:!1,value:i[a++]}},e:function(s){throw s},f:l}}throw new typeerror(`invalid attempt to iterate non-iterable instance. in order to be iterable, non-array objects must have a [symbol.iterator]() method.`)}var p=!0,d=!1,v;return{s:function(){s=s.call(i)},n:function(){var s=s.next();return p=s.done,s},e:function(s){d=!0,v=s},f:function(){try{!p&&s.return!=null&&s.return()}finally{if(d)throw v}}}}function r(i,o){if(!!i){if(typeof i=="string")return n(i,o);var s=object.prototype.tostring.call(i).slice(8,-1);if(s==="object"&&i.constructor&&(s=i.constructor.name),s==="map"||s==="set")return array.from(i);if(s==="arguments"||/^(?:ui|i)nt(?:8|16|32)(?:clamped)?array$/.test(s))return n(i,o)}}function n(i,o){(o==null||o>i.length)&&(o=i.length);for(var s=0,a=new array(o);si.split(/ *; */).shift(),t.params=i=>{const o={};var s=e(i.split(/ *; */)),a;try{for(s.s();!(a=s.n()).done;){const p=a.value.split(/ *= */),d=p.shift(),v=p.shift();d&&v&&(o[d]=v)}}catch(l){s.e(l)}finally{s.f()}return o},t.parselinks=i=>{const o={};var s=e(i.split(/ *, */)),a;try{for(s.s();!(a=s.n()).done;){const p=a.value.split(/ *; */),d=p[0].slice(1,-1),v=p[1].split(/ *= */)[1].slice(1,-1);o[v]=d}}catch(l){s.e(l)}finally{s.f()}return o},t.cleanheader=(i,o)=>(delete i["content-type"],delete i["content-length"],delete i["transfer-encoding"],delete i.host,o&&(delete i.authorization,delete i.cookie),i),t.isobject=i=>i!==null&&typeof i=="object",t.hasown=object.hasown||function(i,o){if(i==null)throw new typeerror("cannot convert undefined or null to object");return object.prototype.hasownproperty.call(new object(i),o)},t.mixin=(i,o)=>{for(const s in o)t.hasown(o,s)&&(i[s]=o[s])}})(re);const we=ut,er=re,ie=er.isobject,we=er.hasown;var ei=_;function _(){}_.prototype.cleartimeout=function(){return cleartimeout(this._timer),cleartimeout(this._responsetimeouttimer),cleartimeout(this._uploadtimeouttimer),delete this._timer,delete this._responsetimeouttimer,delete this._uploadtimeouttimer,this};_.prototype.parse=function(t){return this._parser=t,this};_.prototype.responsetype=function(t){return this._responsetype=t,this};_.prototype.serialize=function(t){return this._serializer=t,this};_.prototype.timeout=function(t){if(!t||typeof t!="object")return this._timeout=t,this._responsetimeout=0,this._uploadtimeout=0,this;for(const e in t)if(we(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responsetimeout=t.response;break;case"upload":this._uploadtimeout=t.upload;break;default:console.warn("unknown timeout option",e)}return this};_.prototype.retry=function(t,e){return(arguments.length===0||t===!0)&&(t=1),t<=0&&(t=0),this._maxretries=t,this._retries=0,this._retrycallback=e,this};const ti=new set(["etimedout","econnreset","eaddrinuse","econnrefused","epipe","enotfound","enetunreach","eai_again"]),ri=new set([408,413,429,500,502,503,504,521,522,524]);_.prototype._shouldretry=function(t,e){if(!this._maxretries||this._retries++>=this._maxretries)return!1;if(this._retrycallback)try{const r=this._retrycallback(t,e);if(r===!0)return!0;if(r===!1)return!1}catch(r){console.error(r)}return!!(e&&e.status&&ri.has(e.status)||t&&(t.code&&ti.has(t.code)||t.timeout&&t.code==="econnaborted"||t.crossdomain))};_.prototype._retry=function(){return this.cleartimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedouterror=null,this._end()};_.prototype.then=function(t,e){if(!this._fullfilledpromise){const r=this;this._endcalled&&console.warn("warning: superagent request was sent twice, because both .end() and .then() were called. never call .end() if you use promises"),this._fullfilledpromise=new promise((n,i)=>{r.on("abort",()=>{if(this._maxretries&&this._maxretries>this._retries)return;if(this.timedout&&this.timedouterror){i(this.timedouterror);return}const o=new error("aborted");o.code="aborted",o.status=this.status,o.method=this.method,o.url=this.url,i(o)}),r.end((o,s)=>{o?i(o):n(s)})})}return this._fullfilledpromise.then(t,e)};_.prototype.catch=function(t){return this.then(void 0,t)};_.prototype.use=function(t){return t(this),this};_.prototype.ok=function(t){if(typeof t!="function")throw new error("callback required");return this._okcallback=t,this};_.prototype._isresponseok=function(t){return t?this._okcallback?this._okcallback(t):t.status>=200&&t.status<300:!1};_.prototype.get=function(t){return this._header[t.tolowercase()]};_.prototype.getheader=_.prototype.get;_.prototype.set=function(t,e){if(ie(t)){for(const r in t)we(t,r)&&this.set(r,t[r]);return this}return this._header[t.tolowercase()]=e,this.header[t]=e,this};_.prototype.unset=function(t){return delete this._header[t.tolowercase()],delete this.header[t],this};_.prototype.field=function(t,e,r){if(t==null)throw new error(".field(name, val) name can not be empty");if(this._data)throw new error(".field() can't be used if .send() is used. please use only .send() or only .field() & .attach()");if(ie(t)){for(const n in t)we(t,n)&&this.field(n,t[n]);return this}if(array.isarray(e)){for(const n in e)we(e,n)&&this.field(t,e[n]);return this}if(e==null)throw new error(".field(name, val) val can not be empty");return typeof e=="boolean"&&(e=string(e)),r?this._getformdata().append(t,e,r):this._getformdata().append(t,e),this};_.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(we.gte(process.version,"v13.0.0")&&we.lt(process.version,"v14.0.0"))throw new error("superagent does not work in v13 properly with abort() due to node.js core changes");we.gte(process.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.cleartimeout(),this.emit("abort"),this};_.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("authorization",`basic ${n(`${t}:${e}`)}`);break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("authorization",`bearer ${t}`);break}return this};_.prototype.withcredentials=function(t){return t===void 0&&(t=!0),this._withcredentials=t,this};_.prototype.redirects=function(t){return this._maxredirects=t,this};_.prototype.maxresponsesize=function(t){if(typeof t!="number")throw new typeerror("invalid argument");return this._maxresponsesize=t,this};_.prototype.tojson=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}};_.prototype.send=function(t){const e=ie(t);let r=this._header["content-type"];if(this._formdata)throw new error(".send() can't be used if .attach() or .field() is used. please use only .send() or only .field() & .attach()");if(e&&!this._data)array.isarray(t)?this._data=[]:this._ishost(t)||(this._data={});else if(t&&this._data&&this._ishost(this._data))throw new error("can't merge these send calls");if(e&&ie(this._data))for(const n in t)we(t,n)&&(this._data[n]=t[n]);else typeof t=="string"?(r||this.type("form"),r=this._header["content-type"],r&&(r=r.tolowercase().trim()),r==="application/x-www-form-urlencoded"?this._data=this._data?`${this._data}&${t}`:t:this._data=(this._data||"")+t):this._data=t;return!e||this._ishost(t)?this:(r||this.type("json"),this)};_.prototype.sortquery=function(t){return this._sort=typeof t>"u"?!0:t,this};_.prototype._finalizequerystring=function(){const t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){const e=this.url.indexof("?");if(e>=0){const r=this.url.slice(e+1).split("&");typeof this._sort=="function"?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,e)+"?"+r.join("&")}}};_.prototype._appendquerystring=()=>{console.warn("unsupported")};_.prototype._timeouterror=function(t,e,r){if(this._aborted)return;const n=new error(`${t+e}ms exceeded`);n.timeout=e,n.code="econnaborted",n.errno=r,this.timedout=!0,this.timedouterror=n,this.abort(),this.callback(n)};_.prototype._settimeouts=function(){const t=this;this._timeout&&!this._timer&&(this._timer=settimeout(()=>{t._timeouterror("timeout of ",t._timeout,"etime")},this._timeout)),this._responsetimeout&&!this._responsetimeouttimer&&(this._responsetimeouttimer=settimeout(()=>{t._timeouterror("response timeout of ",t._responsetimeout,"etimedout")},this._responsetimeout))};const je=re;var ni=ce;function ce(){}ce.prototype.get=function(t){return this.header[t.tolowercase()]};ce.prototype._setheaderproperties=function(t){const e=t["content-type"]||"";this.type=je.type(e);const r=je.params(e);for(const n in r)object.prototype.hasownproperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=je.parselinks(t.link))}catch{}};ce.prototype._setstatusproperties=function(t){const e=math.trunc(t/100);this.statuscode=t,this.status=this.statuscode,this.statustype=e,this.info=e===1,this.ok=e===2,this.redirect=e===3,this.clienterror=e===4,this.servererror=e===5,this.error=e===4||e===5?this.toerror():!1,this.created=t===201,this.accepted=t===202,this.nocontent=t===204,this.badrequest=t===400,this.unauthorized=t===401,this.notacceptable=t===406,this.forbidden=t===403,this.notfound=t===404,this.unprocessableentity=t===422};function ii(t,e){var r=typeof symbol<"u"&&t[symbol.iterator]||t["@@iterator"];if(!r){if(array.isarray(t)||(r=oi(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(p){throw p},f:i}}throw new typeerror(`invalid attempt to iterate non-iterable instance. in order to be iterable, non-array objects must have a [symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var p=r.next();return o=p.done,p},e:function(p){s=!0,a=p},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function oi(t,e){if(!!t){if(typeof t=="string")return mt(t,e);var r=object.prototype.tostring.call(t).slice(8,-1);if(r==="object"&&t.constructor&&(r=t.constructor.name),r==="map"||r==="set")return array.from(t);if(r==="arguments"||/^(?:ui|i)nt(?:8|16|32)(?:clamped)?array$/.test(r))return mt(t,e)}}function mt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new array(e);r=c.length?{done:!0}:{done:!1,value:c[y++]}},e:function(oe){throw oe},f:b}}throw new typeerror(`invalid attempt to iterate non-iterable instance. in order to be iterable, non-array objects must have a [symbol.iterator]() method.`)}var w=!0,i=!1,ie;return{s:function(){f=f.call(c)},n:function(){var oe=f.next();return w=oe.done,oe},e:function(oe){i=!0,ie=oe},f:function(){try{!w&&f.return!=null&&f.return()}finally{if(i)throw ie}}}}function n(c,u){if(!!c){if(typeof c=="string")return i(c,u);var f=object.prototype.tostring.call(c).slice(8,-1);if(f==="object"&&c.constructor&&(f=c.constructor.name),f==="map"||f==="set")return array.from(c);if(f==="arguments"||/^(?:ui|i)nt(?:8|16|32)(?:clamped)?array$/.test(f))return i(c,u)}}function i(c,u){(u==null||u>c.length)&&(u=c.length);for(var f=0,y=new array(u);f"u"?(console.warn("using browser-only version of superagent in non-browser environment"),o=void 0):o=self;const s=ct.exports,a=or,l=zn,p=ei,d=re,v=d.isobject,g=d.mixin,s=d.hasown,o=ni,x=si;function n(){}t.exports=function(c,u){return typeof u=="function"?new e.request("get",c).end(u):arguments.length===1?new e.request("get",c):new e.request(c,u)},e=t.exports;const m=e;e.request=a,m.getxhr=()=>{if(o.xmlhttprequest)return new o.xmlhttprequest;throw new error("browser-only version of superagent could not find xhr")};const k="".trim?c=>c.trim():c=>c.replace(/(^\s*|\s*$)/g,"");function b(c){if(!v(c))return c;const u=[];for(const f in c)s(c,f)&&d(u,f,c[f]);return u.join("&")}function d(c,u,f){if(f!==void 0){if(f===null){c.push(encodeuri(u));return}if(array.isarray(f)){var y=r(f),b;try{for(y.s();!(b=y.n()).done;){const w=b.value;d(c,u,w)}}catch(w){y.e(w)}finally{y.f()}}else if(v(f))for(const w in f)s(f,w)&&d(c,`${u}[${w}]`,f[w]);else c.push(encodeuri(u)+"="+encodeuricomponent(f))}}m.serializeobject=b;function g(c){const u={},f=c.split("&");let y,b;for(let w=0,i=f.length;w"u"?this.xhr.responsetext:null,this.statustext=this.req.xhr.statustext;let u=this.xhr.status;u===1223&&(u=204),this._setstatusproperties(u),this.headers=z(this.xhr.getallresponseheaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getresponseheader("content-type"),this._setheaderproperties(this.header),this.text===null&&c._responsetype?this.body=this.xhr.response:this.body=this.req.method==="head"?null:this._parsebody(this.text?this.text:this.xhr.response)}g(l.prototype,o.prototype),l.prototype._parsebody=function(c){let u=m.parse[this.type];return this.req._parser?this.req._parser(this,c):(!u&&$(this.type)&&(u=m.parse["application/json"]),u&&c&&(c.length>0||c instanceof object)?u(c):null)},l.prototype.toerror=function(){const c=this.req,u=c.method,f=c.url,y=`cannot ${u} ${f} (${this.status})`,b=new error(y);return b.status=this.status,b.method=u,b.url=f,b},m.response=l;function a(c,u){const f=this;this._query=this._query||[],this.method=c,this.url=u,this.header={},this._header={},this.on("end",()=>{let y=null,b=null;try{b=new l(f)}catch(i){return y=new error("parser is unable to parse the response"),y.parse=!0,y.original=i,f.xhr?(y.rawresponse=typeof f.xhr.responsetype>"u"?f.xhr.responsetext:f.xhr.response,y.status=f.xhr.status?f.xhr.status:null,y.statuscode=y.status):(y.rawresponse=null,y.status=null),f.callback(y)}f.emit("response",b);let w;try{f._isresponseok(b)||(w=new error(b.statustext||b.text||"unsuccessful http response"))}catch(i){w=i}w?(w.original=y,w.response=b,w.status=w.status||b.status,f.callback(w,b)):f.callback(null,b)})}s(a.prototype),g(a.prototype,p.prototype),a.prototype.type=function(c){return this.set("content-type",m.types[c]||c),this},a.prototype.accept=function(c){return this.set("accept",m.types[c]||c),this},a.prototype.auth=function(c,u,f){arguments.length===1&&(u=""),typeof u=="object"&&u!==null&&(f=u,u=""),f||(f={type:typeof btoa=="function"?"basic":"auto"});const y=f.encoder?f.encoder:b=>{if(typeof btoa=="function")return btoa(b);throw new error("cannot use basic auth, btoa is not a function")};return this._auth(c,u,f,y)},a.prototype.query=function(c){return typeof c!="string"&&(c=b(c)),c&&this._query.push(c),this},a.prototype.attach=function(c,u,f){if(u){if(this._data)throw new error("superagent can't mix .send() and .attach()");this._getformdata().append(c,u,f||u.name)}return this},a.prototype._getformdata=function(){return this._formdata||(this._formdata=new o.formdata),this._formdata},a.prototype.callback=function(c,u){if(this._shouldretry(c,u))return this._retry();const f=this._callback;this.cleartimeout(),c&&(this._maxretries&&(c.retries=this._retries-1),this.emit("error",c)),f(c,u)},a.prototype.crossdomainerror=function(){const c=new error(`request has been terminated possible causes: the network is offline, origin is not allowed by access-control-allow-origin, the page is being unloaded, etc.`);c.crossdomain=!0,c.status=this.status,c.method=this.method,c.url=this.url,this.callback(c)},a.prototype.agent=function(){return console.warn("this is not supported in browser version of superagent"),this},a.prototype.ca=a.prototype.agent,a.prototype.buffer=a.prototype.ca,a.prototype.write=()=>{throw new error("streaming is not supported in browser version of superagent")},a.prototype.pipe=a.prototype.write,a.prototype._ishost=function(c){return c&&typeof c=="object"&&!array.isarray(c)&&object.prototype.tostring.call(c)!=="[object object]"},a.prototype.end=function(c){this._endcalled&&console.warn("warning: .end() was called twice. this is not supported in superagent"),this._endcalled=!0,this._callback=c||n,this._finalizequerystring(),this._end()},a.prototype._setuploadtimeout=function(){const c=this;this._uploadtimeout&&!this._uploadtimeouttimer&&(this._uploadtimeouttimer=settimeout(()=>{c._timeouterror("upload timeout of ",c._uploadtimeout,"etimedout")},this._uploadtimeout))},a.prototype._end=function(){if(this._aborted)return this.callback(new error("the request has been aborted even before .end() was called"));const c=this;this.xhr=m.getxhr();const u=this.xhr;let f=this._formdata||this._data;this._settimeouts(),u.addeventlistener("readystatechange",()=>{const b=u.readystate;if(b>=2&&c._responsetimeouttimer&&cleartimeout(c._responsetimeouttimer),b!==4)return;let w;try{w=u.status}catch{w=0}if(!w)return c.timedout||c._aborted?void 0:c.crossdomainerror();c.emit("end")});const y=(b,w)=>{w.total>0&&(w.percent=w.loaded/w.total*100,w.percent===100&&cleartimeout(c._uploadtimeouttimer)),w.direction=b,c.emit("progress",w)};if(this.haslisteners("progress"))try{u.addeventlistener("progress",y.bind(null,"download")),u.upload&&u.upload.addeventlistener("progress",y.bind(null,"upload"))}catch{}u.upload&&this._setuploadtimeout();try{this.username&&this.password?u.open(this.method,this.url,!0,this.username,this.password):u.open(this.method,this.url,!0)}catch(b){return this.callback(b)}if(this._withcredentials&&(u.withcredentials=!0),!this._formdata&&this.method!=="get"&&this.method!=="head"&&typeof f!="string"&&!this._ishost(f)){const b=this._header["content-type"];let w=this._serializer||m.serialize[b?b.split(";")[0]:""];!w&&$(b)&&(w=m.serialize["application/json"]),w&&(f=w(f))}for(const b in this.header)this.header[b]!==null&&s(this.header,b)&&u.setrequestheader(b,this.header[b]);this._responsetype&&(u.responsetype=this._responsetype),this.emit("request",this),u.send(typeof f>"u"?null:f)},m.agent=()=>new x;for(var q=0,z=["get","post","options","patch","put","delete"];q{const y=m("get",c);return typeof u=="function"&&(f=u,u=null),u&&y.query(u),f&&y.end(f),y},m.head=(c,u,f)=>{const y=m("head",c);return typeof u=="function"&&(f=u,u=null),u&&y.query(u),f&&y.end(f),y},m.options=(c,u,f)=>{const y=m("options",c);return typeof u=="function"&&(f=u,u=null),u&&y.send(u),f&&y.end(f),y};function w(c,u,f){const y=m("delete",c);return typeof u=="function"&&(f=u,u=null),u&&y.send(u),f&&y.end(f),y}m.del=w,m.delete=w,m.patch=(c,u,f)=>{const y=m("patch",c);return typeof u=="function"&&(f=u,u=null),u&&y.send(u),f&&y.end(f),y},m.post=(c,u,f)=>{const y=m("post",c);return typeof u=="function"&&(f=u,u=null),u&&y.send(u),f&&y.end(f),y},m.put=(c,u,f)=>{const y=m("put",c);return typeof u=="function"&&(f=u,u=null),u&&y.send(u),f&&y.end(f),y}})(ve,ve.exports);const ai=ve.exports;function ci(t,e){const r=new urlsearchparams(window.location.search);e==null?r.delete(t):r.set(t,e),history.pushstate(null,null,"?"+r.tostring())}function li(t){const e=t||{};return location.search.replace("?","").split("&").filter(r=>r).foreach(r=>{const[n,i]=r.split("=");e[n]=i}),e}const ui={"amazon silk":"amazon_silk","android browser":"android",bada:"bada",blackberry:"blackberry",chrome:"chrome",chromium:"chromium",electron:"electron",epiphany:"epiphany",firefox:"firefox",focus:"focus",generic:"generic","google search":"google_search",googlebot:"googlebot","internet explorer":"ie","k-meleon":"k_meleon",maxthon:"maxthon","microsoft edge":"edge","mz browser":"mz","naver whale browser":"naver",opera:"opera","opera coast":"opera_coast",phantomjs:"phantomjs",puffin:"puffin",qupzilla:"qupzilla",qq:"qq",qqlite:"qqlite",safari:"safari",sailfish:"sailfish","samsung internet for android":"samsung_internet",seamonkey:"seamonkey",sleipnir:"sleipnir",swing:"swing",tizen:"tizen","uc browser":"uc",vivaldi:"vivaldi","webos browser":"webos",wechat:"wechat","yandex browser":"yandex",roku:"roku"},tr={amazon_silk:"amazon silk",android:"android browser",bada:"bada",blackberry:"blackberry",chrome:"chrome",chromium:"chromium",electron:"electron",epiphany:"epiphany",firefox:"firefox",focus:"focus",generic:"generic",googlebot:"googlebot",google_search:"google search",ie:"internet explorer",k_meleon:"k-meleon",maxthon:"maxthon",edge:"microsoft edge",mz:"mz browser",naver:"naver whale browser",opera:"opera",opera_coast:"opera coast",phantomjs:"phantomjs",puffin:"puffin",qupzilla:"qupzilla",qq:"qq browser",qqlite:"qq browser lite",safari:"safari",sailfish:"sailfish",samsung_internet:"samsung internet for android",seamonkey:"seamonkey",sleipnir:"sleipnir",swing:"swing",tizen:"tizen",uc:"uc browser",vivaldi:"vivaldi",webos:"webos browser",wechat:"wechat",yandex:"yandex browser"},m={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},c={windowsphone:"windows phone",windows:"windows",macos:"macos",ios:"ios",android:"android",webos:"webos",blackberry:"blackberry",bada:"bada",tizen:"tizen",linux:"linux",chromeos:"chrome os",playstation4:"playstation 4",roku:"roku"},q={edgehtml:"edgehtml",blink:"blink",trident:"trident",presto:"presto",gecko:"gecko",webkit:"webkit"};class h{static getfirstmatch(e,r){const n=r.match(e);return n&&n.length>0&&n[1]||""}static getsecondmatch(e,r){const n=r.match(e);return n&&n.length>1&&n[2]||""}static matchandreturnconst(e,r,n){if(e.test(r))return n}static getwindowsversionname(e){switch(e){case"nt":return"nt";case"xp":return"xp";case"nt 5.0":return"2000";case"nt 5.1":return"xp";case"nt 5.2":return"2003";case"nt 6.0":return"vista";case"nt 6.1":return"7";case"nt 6.2":return"8";case"nt 6.3":return"8.1";case"nt 10.0":return"10";default:return}}static getmacosversionname(e){const r=e.split(".").splice(0,2).map(n=>parseint(n,10)||0);if(r.push(0),r[0]===10)switch(r[1]){case 5:return"leopard";case 6:return"snow leopard";case 7:return"lion";case 8:return"mountain lion";case 9:return"mavericks";case 10:return"yosemite";case 11:return"el capitan";case 12:return"sierra";case 13:return"high sierra";case 14:return"mojave";case 15:return"catalina";default:return}}static getandroidversionname(e){const r=e.split(".").splice(0,2).map(n=>parseint(n,10)||0);if(r.push(0),!(r[0]===1&&r[1]<5)){if(r[0]===1&&r[1]<6)return"cupcake";if(r[0]===1&&r[1]>=6)return"donut";if(r[0]===2&&r[1]<2)return"eclair";if(r[0]===2&&r[1]===2)return"froyo";if(r[0]===2&&r[1]>2)return"gingerbread";if(r[0]===3)return"honeycomb";if(r[0]===4&&r[1]<1)return"ice cream sandwich";if(r[0]===4&&r[1]<4)return"jelly bean";if(r[0]===4&&r[1]>=4)return"kitkat";if(r[0]===5)return"lollipop";if(r[0]===6)return"marshmallow";if(r[0]===7)return"nougat";if(r[0]===8)return"oreo";if(r[0]===9)return"pie"}}static getversionprecision(e){return e.split(".").length}static compareversions(e,r,n=!1){const i=h.getversionprecision(e),o=h.getversionprecision(r);let s=math.max(i,o),a=0;const l=h.map([e,r],p=>{const d=s-h.getversionprecision(p),v=p+new array(d+1).join(".0");return h.map(v.split("."),g=>new array(20-g.length).join("0")+g).reverse()});for(n&&(a=s-math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{n[l]=s[l]})}return e}static getbrowseralias(e){return ui[e]}static getbrowsertypebyalias(e){return tr[e]||""}}const p=/version\/(\d+(\.?_?\d+)+)/i,fi=[{test:[/googlebot/i],describe(t){const e={name:"googlebot"},r=h.getfirstmatch(/googlebot\/(\d+(\.\d+))/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"opera"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"opera"},r=h.getfirstmatch(/(?:opr|opios)[\s/](\s+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/samsungbrowser/i],describe(t){const e={name:"samsung internet for android"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:samsungbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/whale/i],describe(t){const e={name:"naver whale browser"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/mzbrowser/i],describe(t){const e={name:"mz browser"},r=h.getfirstmatch(/(?:mzbrowser)[\s/](\d+(?:\.\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"focus"},r=h.getfirstmatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"swing"},r=h.getfirstmatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"opera coast"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"opera touch"},r=h.getfirstmatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"yandex browser"},r=h.getfirstmatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"uc browser"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/maxthon|mxios/i],describe(t){const e={name:"maxthon"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"epiphany"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"puffin"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"sleipnir"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"k-meleon"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"wechat"},r=h.getfirstmatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"qq browser lite":"qq browser"},r=h.getfirstmatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"internet explorer"},r=h.getfirstmatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"microsoft edge"},r=h.getfirstmatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"microsoft edge"},r=h.getsecondmatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"vivaldi"},r=h.getfirstmatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"seamonkey"},r=h.getfirstmatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"sailfish"},r=h.getfirstmatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"amazon silk"},r=h.getfirstmatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"phantomjs"},r=h.getfirstmatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"slimerjs"},r=h.getfirstmatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"blackberry"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"webos browser"},r=h.getfirstmatch(p,t)||h.getfirstmatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"bada"},r=h.getfirstmatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"tizen"},r=h.getfirstmatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"qupzilla"},r=h.getfirstmatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"firefox"},r=h.getfirstmatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"electron"},r=h.getfirstmatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/miuibrowser/i],describe(t){const e={name:"miui"},r=h.getfirstmatch(/(?:miuibrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"chromium"},r=h.getfirstmatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"chrome"},r=h.getfirstmatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/gsa/i],describe(t){const e={name:"google search"},r=h.getfirstmatch(/(?:gsa)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"android browser"},r=h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"playstation 4"},r=h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"safari"},r=h.getfirstmatch(p,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,r=/^(.*)\/(.*)[ \t]\((.*)/,i=t.search("\\(")!==-1?r:e;return{name:h.getfirstmatch(i,t),version:h.getsecondmatch(i,t)}}}],pi=[{test:[/roku\/dvp/],describe(t){const e=h.getfirstmatch(/roku\/dvp-(\d+\.\d+)/i,t);return{name:c.roku,version:e}}},{test:[/windows phone/i],describe(t){const e=h.getfirstmatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:c.windowsphone,version:e}}},{test:[/windows /i],describe(t){const e=h.getfirstmatch(/windows ((nt|xp)( \d\d?.\d)?)/i,t),r=h.getwindowsversionname(e);return{name:c.windows,version:e,versionname:r}}},{test:[/macintosh(.*?) fxios(.*?)\//],describe(t){const e={name:c.ios},r=h.getsecondmatch(/(version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=h.getfirstmatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=h.getmacosversionname(e),n={name:c.macos,version:e};return r&&(n.versionname=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=h.getfirstmatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:c.ios,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=h.getfirstmatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=h.getandroidversionname(e),n={name:c.android,version:e};return r&&(n.versionname=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=h.getfirstmatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:c.webos};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=h.getfirstmatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||h.getfirstmatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||h.getfirstmatch(/\bbb(\d+)/i,t);return{name:c.blackberry,version:e}}},{test:[/bada/i],describe(t){const e=h.getfirstmatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:c.bada,version:e}}},{test:[/tizen/i],describe(t){const e=h.getfirstmatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:c.tizen,version:e}}},{test:[/linux/i],describe(){return{name:c.linux}}},{test:[/cros/],describe(){return{name:c.chromeos}}},{test:[/playstation 4/],describe(t){const e=h.getfirstmatch(/playstation 4[/\s](\d+(\.\d+)*)/i,t);return{name:c.playstation4,version:e}}}],hi=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"google"}}},{test:[/huawei/i],describe(t){const e=h.getfirstmatch(/(can-l01)/i,t)&&"nova",r={type:m.mobile,vendor:"huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:m.tablet,vendor:"nexus"}}},{test:[/ipad/i],describe(){return{type:m.tablet,vendor:"apple",model:"ipad"}}},{test:[/macintosh(.*?) fxios(.*?)\//],describe(){return{type:m.tablet,vendor:"apple",model:"ipad"}}},{test:[/kftt build/i],describe(){return{type:m.tablet,vendor:"amazon",model:"kindle fire hd 7"}}},{test:[/silk/i],describe(){return{type:m.tablet,vendor:"amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:m.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=h.getfirstmatch(/(ipod|iphone)/i,t);return{type:m.mobile,vendor:"apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:m.mobile,vendor:"nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:m.mobile}}},{test(t){return t.getbrowsername(!0)==="blackberry"},describe(){return{type:m.mobile,vendor:"blackberry"}}},{test(t){return t.getbrowsername(!0)==="bada"},describe(){return{type:m.mobile}}},{test(t){return t.getbrowsername()==="windows phone"},describe(){return{type:m.mobile,vendor:"microsoft"}}},{test(t){const e=number(string(t.getosversion()).split(".")[0]);return t.getosname(!0)==="android"&&e>=3},describe(){return{type:m.tablet}}},{test(t){return t.getosname(!0)==="android"},describe(){return{type:m.mobile}}},{test(t){return t.getosname(!0)==="macos"},describe(){return{type:m.desktop,vendor:"apple"}}},{test(t){return t.getosname(!0)==="windows"},describe(){return{type:m.desktop}}},{test(t){return t.getosname(!0)==="linux"},describe(){return{type:m.desktop}}},{test(t){return t.getosname(!0)==="playstation 4"},describe(){return{type:m.tv}}},{test(t){return t.getosname(!0)==="roku"},describe(){return{type:m.tv}}}],di=[{test(t){return t.getbrowsername(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:q.blink};const r=h.getfirstmatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:q.edgehtml,version:r}}},{test:[/trident/i],describe(t){const e={name:q.trident},r=h.getfirstmatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:q.presto},r=h.getfirstmatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:q.gecko},r=h.getfirstmatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:q.blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:q.webkit},r=h.getfirstmatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class tt{constructor(e,r=!1){if(e==null||e==="")throw new error("useragent parameter can't be empty");this._ua=e,this.parsedresult={},r!==!0&&this.parse()}getua(){return this._ua}test(e){return e.test(this._ua)}parsebrowser(){this.parsedresult.browser={};const e=h.find(fi,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof array)return r.test.some(n=>this.test(n));throw new error("browser's test function is not valid")});return e&&(this.parsedresult.browser=e.describe(this.getua())),this.parsedresult.browser}getbrowser(){return this.parsedresult.browser?this.parsedresult.browser:this.parsebrowser()}getbrowsername(e){return e?string(this.getbrowser().name).tolowercase()||"":this.getbrowser().name||""}getbrowserversion(){return this.getbrowser().version}getos(){return this.parsedresult.os?this.parsedresult.os:this.parseos()}parseos(){this.parsedresult.os={};const e=h.find(pi,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof array)return r.test.some(n=>this.test(n));throw new error("browser's test function is not valid")});return e&&(this.parsedresult.os=e.describe(this.getua())),this.parsedresult.os}getosname(e){const{name:r}=this.getos();return e?string(r).tolowercase()||"":r||""}getosversion(){return this.getos().version}getplatform(){return this.parsedresult.platform?this.parsedresult.platform:this.parseplatform()}getplatformtype(e=!1){const{type:r}=this.getplatform();return e?string(r).tolowercase()||"":r||""}parseplatform(){this.parsedresult.platform={};const e=h.find(hi,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof array)return r.test.some(n=>this.test(n));throw new error("browser's test function is not valid")});return e&&(this.parsedresult.platform=e.describe(this.getua())),this.parsedresult.platform}getengine(){return this.parsedresult.engine?this.parsedresult.engine:this.parseengine()}getenginename(e){return e?string(this.getengine().name).tolowercase()||"":this.getengine().name||""}parseengine(){this.parsedresult.engine={};const e=h.find(di,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof array)return r.test.some(n=>this.test(n));throw new error("browser's test function is not valid")});return e&&(this.parsedresult.engine=e.describe(this.getua())),this.parsedresult.engine}parse(){return this.parsebrowser(),this.parseos(),this.parseplatform(),this.parseengine(),this}getresult(){return h.assign({},this.parsedresult)}satisfies(e){const r={};let n=0;const i={};let o=0;if(object.keys(e).foreach(a=>{const l=e[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(r[a]=l,n+=1)}),n>0){const a=object.keys(r),l=h.find(a,d=>this.isos(d));if(l){const d=this.satisfies(r[l]);if(d!==void 0)return d}const p=h.find(a,d=>this.isplatform(d));if(p){const d=this.satisfies(r[p]);if(d!==void 0)return d}}if(o>0){const a=object.keys(i),l=h.find(a,p=>this.isbrowser(p,!0));if(l!==void 0)return this.compareversion(i[l])}}isbrowser(e,r=!1){const n=this.getbrowsername().tolowercase();let i=e.tolowercase();const o=h.getbrowsertypebyalias(i);return r&&o&&(i=o.tolowercase()),i===n}compareversion(e){let r=[0],n=e,i=!1;const o=this.getbrowserversion();if(typeof o=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(i=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(i=!0,n=e.substr(1)),r.indexof(h.compareversions(o,n,i))>-1}isos(e){return this.getosname(!0)===string(e).tolowercase()}isplatform(e){return this.getplatformtype(!0)===string(e).tolowercase()}isengine(e){return this.getenginename(!0)===string(e).tolowercase()}is(e,r=!1){return this.isbrowser(e,r)||this.isos(e)||this.isplatform(e)}some(e=[]){return e.some(r=>this.is(r))}}/*! * bowser - a browser detector * https://github.com/lancedikson/bowser * mit license | (c) dustin diaz 2012-2015 * mit license | (c) denis demchenko 2015-2019 */class yi{static getparser(e,r=!1){if(typeof e!="string")throw new error("useragent should be a string");return new tt(e,r)}static parse(e){return new tt(e).getresult()}static get browser_map(){return tr}static get engine_map(){return q}static get os_map(){return c}static get platforms_map(){return m}}class rr{constructor(){this.handlers_={}}gethandlerkey(e){return"_"+mi(e.tostring())}gethandlerscount(e){return e?object.values(e).length:0}on(e,r){const n=this.handlers_[e]||{},i=this.gethandlerkey(r);n[i]=r,this.handlers_[e]=n}once(e,r){this.off(e,r),r.isonce=!0,this.on(e,r)}async emit(e,r){const n=this.handlers_[e];if(this.gethandlerscount(n)){const i=await promise.all(object.values(n).map(s=>{const a=new event(e);a.detail=r;const l=promise.resolve(s(a));return s.isonce&&this.off(e,s),l}));return[i.filter(s=>s===!1).length===0,i]}}off(e,r){let n=this.handlers_[e];if(this.gethandlerscount(n)!==0){if(!r)n=null;else{const i=this.gethandlerkey(r);delete n[i]}this.handlers_[e]=n}}}function mi(t){let e=0;if(t.length==0)return e;for(let r=0;r{e(r.detail)})}}class ee extends rr{constructor(e){super(),this.element=e.element,this.state=new gi(e.defaultstate),this.state.subscribe(r=>{this.update(),this.emit("change",r)})}update(){console.log("cpcomponent update")}}class vi extends ee{constructor(e){super({element:e.element,defaultstate:{isloading:!1}}),this.init()}init(){this.element.addeventlistener("scroll",()=>{const e=this.element.document&&this.element.document.body?bi(this.element):wi(this.element);this.getisloading()||e>=-200&&e<100&&(this.setisloading(!0),this.emit("start-load"))})}getisloading(){return this.state.getitem("isloading")}setisloading(e){this.state.setitem("isloading",!!e)}}function bi(t){return t.document.body.clientheight-t.innerheight-t.scrolly}function wi(t){return t.scrollheight-t.clientheight-t.scrolltop}class ft extends ee{constructor(e){super({element:e.element,defaultstate:{openkeys:e.openkeys||[],selectedkey:e.selectedkey||""}}),this.mode=e.mode||"inline",this.triggersubmenuaction=e.triggersubmenuaction||"click",this.timer,this.delay=300,this.init()}init(){this.items=this.element.queryselectorall("[role=item]"),this.items.foreach((e,r)=>{const n=e.queryselector("[role=menu]");if(!n){e.addeventlistener("click",i=>{i.stoppropagation();const o=e.getattribute("key");console.log(1,o,e),o&&this.select(o)});return}this.triggersubmenuaction==="click"&&e.addeventlistener("click",()=>{console.log(0,e),e.hasattribute("expanded")?this.hidesubmenu(e):this.displaysubmenu(e)}),this.triggersubmenuaction==="hover"&&(n.addeventlistener("mouseover",()=>{this.timer&&cleartimeout(this.timer)}),e.addeventlistener("mouseenter",()=>{this.displaysubmenu(e)}),e.addeventlistener("mouseleave",()=>{this.hidesubmenu(e)}),e.addeventlistener("click",()=>{this.setindex(r)}))}),this.update()}getselectedkey(){return this.state.getitem("selectedkey")}select(e){this.state.setitem("selectedkey",e)}update(){const{openkeys:e,selectedkey:r}=this.state.getdata();this.items.foreach((n,i)=>{const o=n.getattribute("key");e.indexof(o)>=0?n.setattribute("expanded",""):n.removeattribute("expanded"),r===o?n.setattribute("active",""):n.removeattribute("active")})}displaysubmenu(e){const r=e.getattribute("key");if(!r){e.setattribute("expanded","");return}const n=this.state.getitem("openkeys");n.push(r),this.state.setitem("openkeys",n)}hidesubmenu(e){this.timer=settimeout(()=>{const r=e.getattribute("key");if(!r){e.removeattribute("expanded");return}const n=this.state.getitem("openkeys");this.state.setitem("openkeys",n.filter(i=>i!==r))},this.triggersubmenuaction==="hover"?this.delay:0)}}class si extends ee{constructor(e){super({element:e.element,defaultstate:{current:e.current||1,pagesize:e.pagesize||10,total:e.total||100}}),this.debug=!!e.debug,this.items=[],this.itemscount=5,this.init()}init(){this.update()}getcurrent(){return this.state.getitem("current")}setcurrent(e){const r=this.state.getitem("current"),n=this.getpages();e===r||e<1||e>n||this.state.setitem("current",e)}getpages(){const{pagesize:e,total:r}=this.state.getdata();return math.ceil(r/e)}update(){const{current:e,pagesize:r,total:n}=this.state.getdata(),i=this.getpages();let o=e-math.floor(this.itemscount/2);o=math.max(1,o);let s=o+this.itemscount-1;s=math.min(i,s),o=s-this.itemscount+1,o=math.max(1,o),this.debug&&console.log({current:e,pagesize:r,total:n,pages:i,start:o,end:s}),this.items.foreach(d=>{d.remove()}),this.items=[];const a=this.createitem({target:e-1,text:"\u524d\u4e00\u9875",disabled:e==1});if(this.items.push(a),this.element.appendchild(a),o>1){const d=this.createitem({target:1});this.items.push(d),this.element.appendchild(d);const v=this.createitem({target:e-this.itemscount,text:"..."});this.items.push(v),this.element.appendchild(v)}for(let d=o;d<=s;d++){const v=this.createitem({target:d,active:d===e});this.items.push(v),this.element.appendchild(v)}if(s${n||r}`,s.addeventlistener("click",()=>{o||this.state.setitem("current",r)}),s}createinfoitem(e){const r=document.createelement("li");return r.classname="cp-pagination-item",r.innerhtml=e.map(n=>`${n}`).join(""),r}}class it extends ee{constructor(e){super({element:e.element,defaultstate:{active:e.active||!1}}),this.init()}init(){this.element.addeventlistener("click",()=>{const e=this.state.getitem("active");this.state.setitem("active",!e)}),this.update()}update(){this.state.getitem("active")?this.element.setattribute("active",""):this.element.removeattribute("active")}}const{parsedresult:rt}=yi.getparser(window.navigator.useragent);class ei{constructor(){this.ismobile=rt.platform.type==="mobile",this.isdesktop=rt.platform.type==="desktop"}run(){this.inittopmenu(),this.inittopmenutoggle(),this.tryinitfloatpanel(),this.initdttopmenu()}inittopmenutoggle(){const e=document.queryselector("#topmenu"),r=document.queryselector("#topmenutoggle");if(!e||!r){console.warn("#topmenu or #topmenutoggle not found");return}new it({element:r}).on("change",i=>{const{active:o}=i.detail;o?e.setattribute("active",""):e.removeattribute("active")})}initpagenavfixed(){const e=document.queryselector(".topnav[mobile]"),r=document.queryselector(".topnav[desktop]"),n=document.queryselector(".topbanner"),i=document.queryselector(".pagenav"),o=document.queryselector(".pagenavplaceholder"),{height:s,y:a}=n.getboundingclientrect(),{height:l}=i.getboundingclientrect(),p=i.currentstyle||window.getcomputedstyle(i),d=parseint(p.marginbottom.replace("px"));window.addeventlistener("scroll",()=>{window.scrolly>=a?(e.style.display="none",r.style.display="none"):(e.style.display="",r.style.display=""),window.scrolly>=s+a?(i.setattribute("fixed",""),i.style.top=0,o.style.height=l+d+"px"):(i.removeattribute("fixed"),o.style.height=0)})}inittopmenu(){new ft({element:document.queryselector("#topmenu")})}initdttopmenu(){new ft({element:document.queryselector("#dttopmenu"),triggersubmenuaction:"hover"})}tryinitfloatpanel(){const e=document.queryselector(".floatpanel");if(!e)return;const r=e.queryselector(".toggle"),n=e.queryselector(".group");r&&n&&(n.children.length===0&&r.parentnode.removechild(r),n.setattribute("active",""),new it({active:!0,element:r}).on("change",s=>{const{active:a}=s.detail;a?n.setattribute("active",""):n.removeattribute("active")}));const i=document.queryselector("#totopbutton");i.addeventlistener("click",()=>{window.scrollto({left:0,top,behavior:"smooth"})}),window.addeventlistener("scroll",()=>{window.scrolly>=600?i.setattribute("active",""):i.removeattribute("active")})}}class ai extends ee{constructor(e){super({element:e.element,defaultstate:{page:e.page||1,isactive:e.isactive||!0}}),this.listelement=e.listelement,this.paginationelement=e.paginationelement,this.pagesize=e.pagesize||10,this.total=e.total||0,this.fetchlist=e.fetchlist,this.useinfinitescroll=e.useinfinitescroll||!1,this.usepagination=e.usepagination||!1,this.init()}init(){this.listelement=this.listelement||this.element.queryselector("[role=list]"),this.paginationelement=this.paginationelement||this.element.queryselector("[role=pagination]"),this.useinfinitescroll&&this.initinfinitescroll(),this.usepagination&&this.initpagination()}initinfinitescroll(){const e=new vi({element:window});e.on("start-load",async()=>{try{await this.setpage(this.getpage()+1),e.setisloading(!1)}catch(r){console.log("error",r)}})}initpagination(){(this.pagination=new si({element:this.paginationelement,current:this.getpage(),pagesize:this.pagesize,total:this.total})).on("change",r=>{r.detail.current!==this.getpage()&&this.setpage(r.detail.current,!0)})}getpage(){return this.state.getitem("page")}async setpage(e,r){try{const n=await this.fetchlist(e);this.updatelistelement(n,r),this.state.setitem("page",e)}catch(n){console.warn(n),this.emit("error",n)}}getisactive(){return this.state.getitem("isactive")}setisactive(e){this.state.setitem("isactive",!!e)}update(){this.pagination&&this.pagination.setcurrent(this.getpage())}updatelistelement(e,r){r?this.listelement.innerhtml=e:this.listelement.innerhtml+=e}}class _i extends ei{constructor(e){super(e),this.id=e.id,this.element=e.element,this.listelement=e.listelement,this.paginationelement=e.paginationelement,this.pagesize=e.pagesize||10,this.total=e.total||0,this.listapiurl=e.listapiurl}run(){super.run();const e=li({page:1}),r=parseint(e.page)||1;this.initlist(),this.isdesktop&&r>1&&this.list&&this.list.setpage(r,!0)}initlist(){const e=this.list=new ai({element:this.element,listelement:this.listelement,paginationelement:this.paginationelement,fetchlist:this.fetchlist.bind(this),page:1,pagesize:this.pagesize,total:this.total,useinfinitescroll:this.ismobile,usepagination:this.isdesktop});e.on("change",r=>{const{page:n}=r.detail;ci("page",n),this.isdesktop&&this.scrolltolisttop()}),e.on("error",r=>{const n=r.detail;alert(n.message)})}async fetchlist(e){const r={id:this.id,pagesize:this.pagesize,page:e};return this.fetchdata(this.listapiurl,r)}async fetchdata(e,r){return console.log("fetchdata",e,r),new promise((n,i)=>{ai.get(e).query(r).end((o,s)=>{if(o){i(o);return}n(s.text)})})}scrolltolisttop(){const e=document.queryselector(".topnav[desktop]"),{top:r}=oi(this.element),n=this.element.offsettop-r-e.offsetheight;window.scrollto({left:0,top:n,behavior:"smooth"})}}function oi(t){const e=t.currentstyle||window.getcomputedstyle(t);return{top:parseint(e.margintop.replace("xp",""))||0,right:parseint(e.marginright.replace("xp",""))||0,bottom:parseint(e.marginbottom.replace("xp",""))||0,left:parseint(e.marginleft.replace("xp",""))||0}}const{id:pi,listapiurl:mi,pagesize:xi,total:ti}={listapiurl:"http://mock.wangdi.design/airport/news",pagesize:10,...window.options||{}};window.addeventlistener("domcontentloaded",()=>{fi()});function fi(){const t=document.queryselector(".newssection"),e=t.queryselector(".newsgroup"),r=t.queryselector(".pagination");new _i({id:pi,element:t,listelement:e,paginationelement:r,pagesize:xi,total:ti,listapiurl:mi}).run()}