hs-admin-ui 16.2.4 → 16.2.6

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.
@@ -84,7 +84,7 @@ Pn.version="2.30.1";mBe(Wi);Pn.fn=bn;Pn.min=r$e;Pn.max=i$e;Pn.now=o$e;Pn.utc=eu;
84
84
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[MG]=this[MG]={accessors:{}}).accessors,s=this.prototype;function l(u){const d=b4(u);o[d]||(GWe(s,u),o[d]=!0)}return qt.isArray(t)?t.forEach(l):l(t),this}};sl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);qt.reduceDescriptors(sl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});qt.freezeMethods(sl);function ZR(e,t){const n=this||Qy,o=t||n,s=sl.from(o.headers);let l=o.data;return qt.forEach(e,function(d){l=d.call(n,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function Fte(e){return!!(e&&e.__CANCEL__)}function e3(e,t,n){ui.call(this,e??"canceled",ui.ERR_CANCELED,t,n),this.name="CanceledError"}qt.inherits(e3,ui,{__CANCEL__:!0});function qWe(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new ui("Request failed with status code "+n.status,[ui.ERR_BAD_REQUEST,ui.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const YWe=Uc.hasStandardBrowserEnv?{write(e,t,n,o,s,l){const u=[e+"="+encodeURIComponent(t)];qt.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),qt.isString(o)&&u.push("path="+o),qt.isString(s)&&u.push("domain="+s),l===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const 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(){}};function KWe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function XWe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $te(e,t){return e&&!KWe(t)?XWe(e,t):t}const JWe=Uc.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function s(l){let u=l;return t&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=s(window.location.href),function(u){const d=qt.isString(u)?s(u):u;return d.protocol===o.protocol&&d.host===o.host}}():function(){return function(){return!0}}();function ZWe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QWe(e,t){e=e||10;const n=new Array(e),o=new Array(e);let s=0,l=0,u;return t=t!==void 0?t:1e3,function(p){const h=Date.now(),v=o[l];u||(u=h),n[s]=p,o[s]=h;let _=l,y=0;for(;_!==s;)y+=n[_++],_=_%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),h-u<t)return;const b=v&&h-v;return b?Math.round(y*1e3/b):void 0}}function PG(e,t){let n=0;const o=QWe(50,250);return s=>{const l=s.loaded,u=s.lengthComputable?s.total:void 0,d=l-n,p=o(d),h=l<=u;n=l;const v={loaded:l,total:u,progress:u?l/u:void 0,bytes:d,rate:p||void 0,estimated:p&&u&&h?(u-l)/p:void 0,event:s};v[t?"download":"upload"]=!0,e(v)}}const eje=typeof XMLHttpRequest<"u",tje=eje&&function(e){return new Promise(function(n,o){let s=e.data;const l=sl.from(e.headers).normalize();let{responseType:u,withXSRFToken:d}=e,p;function h(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}let v;if(qt.isFormData(s)){if(Uc.hasStandardBrowserEnv||Uc.hasStandardBrowserWebWorkerEnv)l.setContentType(!1);else if((v=l.getContentType())!==!1){const[C,...T]=v?v.split(";").map(I=>I.trim()).filter(Boolean):[];l.setContentType([C||"multipart/form-data",...T].join("; "))}}let _=new XMLHttpRequest;if(e.auth){const C=e.auth.username||"",T=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";l.set("Authorization","Basic "+btoa(C+":"+T))}const y=$te(e.baseURL,e.url);_.open(e.method.toUpperCase(),Pte(y,e.params,e.paramsSerializer),!0),_.timeout=e.timeout;function b(){if(!_)return;const C=sl.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),I={data:!u||u==="text"||u==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:C,config:e,request:_};qWe(function(k){n(k),h()},function(k){o(k),h()},I),_=null}if("onloadend"in _?_.onloadend=b:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(b)},_.onabort=function(){_&&(o(new ui("Request aborted",ui.ECONNABORTED,e,_)),_=null)},_.onerror=function(){o(new ui("Network Error",ui.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let T=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const I=e.transitional||Vte;e.timeoutErrorMessage&&(T=e.timeoutErrorMessage),o(new ui(T,I.clarifyTimeoutError?ui.ETIMEDOUT:ui.ECONNABORTED,e,_)),_=null},Uc.hasStandardBrowserEnv&&(d&&qt.isFunction(d)&&(d=d(e)),d||d!==!1&&JWe(y))){const C=e.xsrfHeaderName&&e.xsrfCookieName&&YWe.read(e.xsrfCookieName);C&&l.set(e.xsrfHeaderName,C)}s===void 0&&l.setContentType(null),"setRequestHeader"in _&&qt.forEach(l.toJSON(),function(T,I){_.setRequestHeader(I,T)}),qt.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),u&&u!=="json"&&(_.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&_.addEventListener("progress",PG(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",PG(e.onUploadProgress)),(e.cancelToken||e.signal)&&(p=C=>{_&&(o(!C||C.type?new e3(null,e,_):C),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p)));const w=ZWe(y);if(w&&Uc.protocols.indexOf(w)===-1){o(new ui("Unsupported protocol "+w+":",ui.ERR_BAD_REQUEST,e));return}_.send(s||null)})},DM={http:TWe,xhr:tje};qt.forEach(DM,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const VG=e=>`- ${e}`,nje=e=>qt.isFunction(e)||e===null||e===!1,Ute={getAdapter:e=>{e=qt.isArray(e)?e:[e];const{length:t}=e;let n,o;const s={};for(let l=0;l<t;l++){n=e[l];let u;if(o=n,!nje(n)&&(o=DM[(u=String(n)).toLowerCase()],o===void 0))throw new ui(`Unknown adapter '${u}'`);if(o)break;s[u||"#"+l]=o}if(!o){const l=Object.entries(s).map(([d,p])=>`adapter ${d} `+(p===!1?"is not supported by the environment":"is not available in the build"));let u=t?l.length>1?`since :
85
85
  `+l.map(VG).join(`
86
86
  `):" "+VG(l[0]):"as no adapter specified";throw new ui("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return o},adapters:DM};function QR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new e3(null,e)}function LG(e){return QR(e),e.headers=sl.from(e.headers),e.data=ZR.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ute.getAdapter(e.adapter||Qy.adapter)(e).then(function(o){return QR(e),o.data=ZR.call(e,e.transformResponse,o),o.headers=sl.from(o.headers),o},function(o){return Fte(o)||(QR(e),o&&o.response&&(o.response.data=ZR.call(e,e.transformResponse,o.response),o.response.headers=sl.from(o.response.headers))),Promise.reject(o)})}const BG=e=>e instanceof sl?{...e}:e;function Bg(e,t){t=t||{};const n={};function o(h,v,_){return qt.isPlainObject(h)&&qt.isPlainObject(v)?qt.merge.call({caseless:_},h,v):qt.isPlainObject(v)?qt.merge({},v):qt.isArray(v)?v.slice():v}function s(h,v,_){if(qt.isUndefined(v)){if(!qt.isUndefined(h))return o(void 0,h,_)}else return o(h,v,_)}function l(h,v){if(!qt.isUndefined(v))return o(void 0,v)}function u(h,v){if(qt.isUndefined(v)){if(!qt.isUndefined(h))return o(void 0,h)}else return o(void 0,v)}function d(h,v,_){if(_ in t)return o(h,v);if(_ in e)return o(void 0,h)}const p={url:l,method:l,data:l,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:d,headers:(h,v)=>s(BG(h),BG(v),!0)};return qt.forEach(Object.keys(Object.assign({},e,t)),function(v){const _=p[v]||s,y=_(e[v],t[v],v);qt.isUndefined(y)&&_!==d||(n[v]=y)}),n}const zte="1.6.8",W7={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{W7[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const FG={};W7.transitional=function(t,n,o){function s(l,u){return"[Axios v"+zte+"] Transitional option '"+l+"'"+u+(o?". "+o:"")}return(l,u,d)=>{if(t===!1)throw new ui(s(u," has been removed"+(n?" in "+n:"")),ui.ERR_DEPRECATED);return n&&!FG[u]&&(FG[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,u,d):!0}};function rje(e,t,n){if(typeof e!="object")throw new ui("options must be an object",ui.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let s=o.length;for(;s-- >0;){const l=o[s],u=t[l];if(u){const d=e[l],p=d===void 0||u(d,l,e);if(p!==!0)throw new ui("option "+l+" must be "+p,ui.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ui("Unknown option "+l,ui.ERR_BAD_OPTION)}}const NM={assertOptions:rje,validators:W7},Df=NM.validators;let Sp=class{constructor(t){this.defaults=t,this.interceptors={request:new OG,response:new OG}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const l=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?l&&!String(o.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(o.stack+=`
87
- `+l):o.stack=l}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bg(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:l}=n;o!==void 0&&NM.assertOptions(o,{silentJSONParsing:Df.transitional(Df.boolean),forcedJSONParsing:Df.transitional(Df.boolean),clarifyTimeoutError:Df.transitional(Df.boolean)},!1),s!=null&&(qt.isFunction(s)?n.paramsSerializer={serialize:s}:NM.assertOptions(s,{encode:Df.function,serialize:Df.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&qt.merge(l.common,l[n.method]);l&&qt.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),n.headers=sl.concat(u,l);const d=[];let p=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(p=p&&C.synchronous,d.unshift(C.fulfilled,C.rejected))});const h=[];this.interceptors.response.forEach(function(C){h.push(C.fulfilled,C.rejected)});let v,_=0,y;if(!p){const w=[LG.bind(this),void 0];for(w.unshift.apply(w,d),w.push.apply(w,h),y=w.length,v=Promise.resolve(n);_<y;)v=v.then(w[_++],w[_++]);return v}y=d.length;let b=n;for(_=0;_<y;){const w=d[_++],C=d[_++];try{b=w(b)}catch(T){C.call(this,T);break}}try{v=LG.call(this,b)}catch(w){return Promise.reject(w)}for(_=0,y=h.length;_<y;)v=v.then(h[_++],h[_++]);return v}getUri(t){t=Bg(this.defaults,t);const n=$te(t.baseURL,t.url);return Pte(n,t.params,t.paramsSerializer)}};qt.forEach(["delete","get","head","options"],function(t){Sp.prototype[t]=function(n,o){return this.request(Bg(o||{},{method:t,url:n,data:(o||{}).data}))}});qt.forEach(["post","put","patch"],function(t){function n(o){return function(l,u,d){return this.request(Bg(d||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:l,data:u}))}}Sp.prototype[t]=n(),Sp.prototype[t+"Form"]=n(!0)});let ije=class Hte{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const o=this;this.promise.then(s=>{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](s);o._listeners=null}),this.promise.then=s=>{let l;const u=new Promise(d=>{o.subscribe(d),l=d}).then(s);return u.cancel=function(){o.unsubscribe(l)},u},t(function(l,u,d){o.reason||(o.reason=new e3(l,u,d),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Hte(function(s){t=s}),cancel:t}}};function oje(e){return function(n){return e.apply(null,n)}}function aje(e){return qt.isObject(e)&&e.isAxiosError===!0}const RM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(RM).forEach(([e,t])=>{RM[t]=e});function Wte(e){const t=new Sp(e),n=wte(Sp.prototype.request,t);return qt.extend(n,Sp.prototype,t,{allOwnKeys:!0}),qt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Wte(Bg(e,s))},n}const yo=Wte(Qy);yo.Axios=Sp;yo.CanceledError=e3;yo.CancelToken=ije;yo.isCancel=Fte;yo.VERSION=zte;yo.toFormData=PT;yo.AxiosError=ui;yo.Cancel=yo.CanceledError;yo.all=function(t){return Promise.all(t)};yo.spread=oje;yo.isAxiosError=aje;yo.mergeConfig=Bg;yo.AxiosHeaders=sl;yo.formToJSON=e=>Bte(qt.isHTMLForm(e)?new FormData(e):e);yo.getAdapter=Ute.getAdapter;yo.HttpStatusCode=RM;yo.default=yo;const{Axios:rtt,AxiosError:itt,CanceledError:ott,isCancel:att,CancelToken:stt,VERSION:ltt,all:ctt,Cancel:utt,isAxiosError:dtt,spread:ftt,toFormData:htt,AxiosHeaders:ptt,HttpStatusCode:mtt,formToJSON:vtt,getAdapter:gtt,mergeConfig:_tt}=yo;var l2=TypeError,j7=typeof Map=="function"&&Map.prototype,eO=Object.getOwnPropertyDescriptor&&j7?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,H8=j7&&eO&&typeof eO.get=="function"?eO.get:null,$G=j7&&Map.prototype.forEach,G7=typeof Set=="function"&&Set.prototype,tO=Object.getOwnPropertyDescriptor&&G7?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,W8=G7&&tO&&typeof tO.get=="function"?tO.get:null,UG=G7&&Set.prototype.forEach,sje=typeof WeakMap=="function"&&WeakMap.prototype,Z4=sje?WeakMap.prototype.has:null,lje=typeof WeakSet=="function"&&WeakSet.prototype,Q4=lje?WeakSet.prototype.has:null,cje=typeof WeakRef=="function"&&WeakRef.prototype,zG=cje?WeakRef.prototype.deref:null,uje=Boolean.prototype.valueOf,dje=Object.prototype.toString,fje=Function.prototype.toString,hje=String.prototype.match,q7=String.prototype.slice,qf=String.prototype.replace,pje=String.prototype.toUpperCase,HG=String.prototype.toLowerCase,jte=RegExp.prototype.test,WG=Array.prototype.concat,Mc=Array.prototype.join,mje=Array.prototype.slice,jG=Math.floor,OM=typeof BigInt=="function"?BigInt.prototype.valueOf:null,nO=Object.getOwnPropertySymbols,MM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ey=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Fg||!0)?Symbol.toStringTag:null,Gte=Object.prototype.propertyIsEnumerable,GG=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function qG(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||jte.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var o=e<0?-jG(-e):jG(e);if(o!==e){var s=String(o),l=q7.call(t,s.length+1);return qf.call(s,n,"$&_")+"."+qf.call(qf.call(l,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qf.call(t,n,"$&_")}var PM=bte,YG=PM.custom,KG=Kte(YG)?YG:null,qte={__proto__:null,double:'"',single:"'"},vje={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},VT=function e(t,n,o,s){var l=n||{};if(Zu(l,"quoteStyle")&&!Zu(qte,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Zu(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Zu(l,"customInspect")?l.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Zu(l,"indent")&&l.indent!==null&&l.indent!==" "&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Zu(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=l.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Jte(t,l);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var p=String(t);return d?qG(t,p):p}if(typeof t=="bigint"){var h=String(t)+"n";return d?qG(t,h):h}var v=typeof l.depth>"u"?5:l.depth;if(typeof o>"u"&&(o=0),o>=v&&v>0&&typeof t=="object")return VM(t)?"[Array]":"[Object]";var _=Mje(l,o);if(typeof s>"u")s=[];else if(Xte(s,t)>=0)return"[Circular]";function y(X,le,ye){if(le&&(s=mje.call(s),s.push(le)),ye){var ue={depth:l.depth};return Zu(l,"quoteStyle")&&(ue.quoteStyle=l.quoteStyle),e(X,ue,o+1,s)}return e(X,l,o+1,s)}if(typeof t=="function"&&!XG(t)){var b=Cje(t),w=WE(t,y);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(w.length>0?" { "+Mc.call(w,", ")+" }":"")}if(Kte(t)){var C=Fg?qf.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):MM.call(t);return typeof t=="object"&&!Fg?x4(C):C}if(Nje(t)){for(var T="<"+HG.call(String(t.nodeName)),I=t.attributes||[],D=0;D<I.length;D++)T+=" "+I[D].name+"="+Yte(gje(I[D].value),"double",l);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+HG.call(String(t.nodeName))+">",T}if(VM(t)){if(t.length===0)return"[]";var k=WE(t,y);return _&&!Oje(k)?"["+LM(k,_)+"]":"[ "+Mc.call(k,", ")+" ]"}if(yje(t)){var O=WE(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!Gte.call(t,"cause")?"{ ["+String(t)+"] "+Mc.call(WG.call("[cause]: "+y(t.cause),O),", ")+" }":O.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Mc.call(O,", ")+" }"}if(typeof t=="object"&&u){if(KG&&typeof t[KG]=="function"&&PM)return PM(t,{depth:v-o});if(u!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Tje(t)){var L=[];return $G&&$G.call(t,function(X,le){L.push(y(le,t,!0)+" => "+y(X,t))}),JG("Map",H8.call(t),L,_)}if(Aje(t)){var P=[];return UG&&UG.call(t,function(X){P.push(y(X,t))}),JG("Set",W8.call(t),P,_)}if(Ije(t))return rO("WeakMap");if(Dje(t))return rO("WeakSet");if(kje(t))return rO("WeakRef");if(xje(t))return x4(y(Number(t)));if(wje(t))return x4(y(OM.call(t)));if(Eje(t))return x4(uje.call(t));if(bje(t))return x4(y(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ir<"u"&&t===ir)return"{ [object globalThis] }";if(!_je(t)&&!XG(t)){var V=WE(t,y),$=GG?GG(t)===Object.prototype:t instanceof Object||t.constructor===Object,Y=t instanceof Object?"":"null prototype",F=!$&&ey&&Object(t)===t&&ey in t?q7.call(_h(t),8,-1):Y?"Object":"",U=$||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Q=U+(F||Y?"["+Mc.call(WG.call([],F||[],Y||[]),": ")+"] ":"");return V.length===0?Q+"{}":_?Q+"{"+LM(V,_)+"}":Q+"{ "+Mc.call(V,", ")+" }"}return String(t)};function Yte(e,t,n){var o=n.quoteStyle||t,s=qte[o];return s+e+s}function gje(e){return qf.call(String(e),/"/g,"&quot;")}function Gp(e){return!ey||!(typeof e=="object"&&(ey in e||typeof e[ey]<"u"))}function VM(e){return _h(e)==="[object Array]"&&Gp(e)}function _je(e){return _h(e)==="[object Date]"&&Gp(e)}function XG(e){return _h(e)==="[object RegExp]"&&Gp(e)}function yje(e){return _h(e)==="[object Error]"&&Gp(e)}function bje(e){return _h(e)==="[object String]"&&Gp(e)}function xje(e){return _h(e)==="[object Number]"&&Gp(e)}function Eje(e){return _h(e)==="[object Boolean]"&&Gp(e)}function Kte(e){if(Fg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!MM)return!1;try{return MM.call(e),!0}catch{}return!1}function wje(e){if(!e||typeof e!="object"||!OM)return!1;try{return OM.call(e),!0}catch{}return!1}var Sje=Object.prototype.hasOwnProperty||function(e){return e in this};function Zu(e,t){return Sje.call(e,t)}function _h(e){return dje.call(e)}function Cje(e){if(e.name)return e.name;var t=hje.call(fje.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Xte(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}function Tje(e){if(!H8||!e||typeof e!="object")return!1;try{H8.call(e);try{W8.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Ije(e){if(!Z4||!e||typeof e!="object")return!1;try{Z4.call(e,Z4);try{Q4.call(e,Q4)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function kje(e){if(!zG||!e||typeof e!="object")return!1;try{return zG.call(e),!0}catch{}return!1}function Aje(e){if(!W8||!e||typeof e!="object")return!1;try{W8.call(e);try{H8.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Dje(e){if(!Q4||!e||typeof e!="object")return!1;try{Q4.call(e,Q4);try{Z4.call(e,Z4)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Nje(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Jte(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return Jte(q7.call(e,0,t.maxStringLength),t)+o}var s=vje[t.quoteStyle||"single"];s.lastIndex=0;var l=qf.call(qf.call(e,s,"\\$1"),/[\x00-\x1f]/g,Rje);return Yte(l,"single",t)}function Rje(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+pje.call(t.toString(16))}function x4(e){return"Object("+e+")"}function rO(e){return e+" { ? }"}function JG(e,t,n,o){var s=o?LM(n,o):Mc.call(n,", ");return e+" ("+t+") {"+s+"}"}function Oje(e){for(var t=0;t<e.length;t++)if(Xte(e[t],`
87
+ `+l):o.stack=l}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bg(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:l}=n;o!==void 0&&NM.assertOptions(o,{silentJSONParsing:Df.transitional(Df.boolean),forcedJSONParsing:Df.transitional(Df.boolean),clarifyTimeoutError:Df.transitional(Df.boolean)},!1),s!=null&&(qt.isFunction(s)?n.paramsSerializer={serialize:s}:NM.assertOptions(s,{encode:Df.function,serialize:Df.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&qt.merge(l.common,l[n.method]);l&&qt.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),n.headers=sl.concat(u,l);const d=[];let p=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(p=p&&C.synchronous,d.unshift(C.fulfilled,C.rejected))});const h=[];this.interceptors.response.forEach(function(C){h.push(C.fulfilled,C.rejected)});let v,_=0,y;if(!p){const w=[LG.bind(this),void 0];for(w.unshift.apply(w,d),w.push.apply(w,h),y=w.length,v=Promise.resolve(n);_<y;)v=v.then(w[_++],w[_++]);return v}y=d.length;let b=n;for(_=0;_<y;){const w=d[_++],C=d[_++];try{b=w(b)}catch(T){C.call(this,T);break}}try{v=LG.call(this,b)}catch(w){return Promise.reject(w)}for(_=0,y=h.length;_<y;)v=v.then(h[_++],h[_++]);return v}getUri(t){t=Bg(this.defaults,t);const n=$te(t.baseURL,t.url);return Pte(n,t.params,t.paramsSerializer)}};qt.forEach(["delete","get","head","options"],function(t){Sp.prototype[t]=function(n,o){return this.request(Bg(o||{},{method:t,url:n,data:(o||{}).data}))}});qt.forEach(["post","put","patch"],function(t){function n(o){return function(l,u,d){return this.request(Bg(d||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:l,data:u}))}}Sp.prototype[t]=n(),Sp.prototype[t+"Form"]=n(!0)});let ije=class Hte{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const o=this;this.promise.then(s=>{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](s);o._listeners=null}),this.promise.then=s=>{let l;const u=new Promise(d=>{o.subscribe(d),l=d}).then(s);return u.cancel=function(){o.unsubscribe(l)},u},t(function(l,u,d){o.reason||(o.reason=new e3(l,u,d),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Hte(function(s){t=s}),cancel:t}}};function oje(e){return function(n){return e.apply(null,n)}}function aje(e){return qt.isObject(e)&&e.isAxiosError===!0}const RM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(RM).forEach(([e,t])=>{RM[t]=e});function Wte(e){const t=new Sp(e),n=wte(Sp.prototype.request,t);return qt.extend(n,Sp.prototype,t,{allOwnKeys:!0}),qt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Wte(Bg(e,s))},n}const yo=Wte(Qy);yo.Axios=Sp;yo.CanceledError=e3;yo.CancelToken=ije;yo.isCancel=Fte;yo.VERSION=zte;yo.toFormData=PT;yo.AxiosError=ui;yo.Cancel=yo.CanceledError;yo.all=function(t){return Promise.all(t)};yo.spread=oje;yo.isAxiosError=aje;yo.mergeConfig=Bg;yo.AxiosHeaders=sl;yo.formToJSON=e=>Bte(qt.isHTMLForm(e)?new FormData(e):e);yo.getAdapter=Ute.getAdapter;yo.HttpStatusCode=RM;yo.default=yo;const{Axios:itt,AxiosError:ott,CanceledError:att,isCancel:stt,CancelToken:ltt,VERSION:ctt,all:utt,Cancel:dtt,isAxiosError:ftt,spread:htt,toFormData:ptt,AxiosHeaders:mtt,HttpStatusCode:vtt,formToJSON:gtt,getAdapter:_tt,mergeConfig:ytt}=yo;var l2=TypeError,j7=typeof Map=="function"&&Map.prototype,eO=Object.getOwnPropertyDescriptor&&j7?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,H8=j7&&eO&&typeof eO.get=="function"?eO.get:null,$G=j7&&Map.prototype.forEach,G7=typeof Set=="function"&&Set.prototype,tO=Object.getOwnPropertyDescriptor&&G7?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,W8=G7&&tO&&typeof tO.get=="function"?tO.get:null,UG=G7&&Set.prototype.forEach,sje=typeof WeakMap=="function"&&WeakMap.prototype,Z4=sje?WeakMap.prototype.has:null,lje=typeof WeakSet=="function"&&WeakSet.prototype,Q4=lje?WeakSet.prototype.has:null,cje=typeof WeakRef=="function"&&WeakRef.prototype,zG=cje?WeakRef.prototype.deref:null,uje=Boolean.prototype.valueOf,dje=Object.prototype.toString,fje=Function.prototype.toString,hje=String.prototype.match,q7=String.prototype.slice,qf=String.prototype.replace,pje=String.prototype.toUpperCase,HG=String.prototype.toLowerCase,jte=RegExp.prototype.test,WG=Array.prototype.concat,Mc=Array.prototype.join,mje=Array.prototype.slice,jG=Math.floor,OM=typeof BigInt=="function"?BigInt.prototype.valueOf:null,nO=Object.getOwnPropertySymbols,MM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ey=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Fg||!0)?Symbol.toStringTag:null,Gte=Object.prototype.propertyIsEnumerable,GG=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function qG(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||jte.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var o=e<0?-jG(-e):jG(e);if(o!==e){var s=String(o),l=q7.call(t,s.length+1);return qf.call(s,n,"$&_")+"."+qf.call(qf.call(l,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qf.call(t,n,"$&_")}var PM=bte,YG=PM.custom,KG=Kte(YG)?YG:null,qte={__proto__:null,double:'"',single:"'"},vje={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},VT=function e(t,n,o,s){var l=n||{};if(Zu(l,"quoteStyle")&&!Zu(qte,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Zu(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Zu(l,"customInspect")?l.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Zu(l,"indent")&&l.indent!==null&&l.indent!==" "&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Zu(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=l.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Jte(t,l);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var p=String(t);return d?qG(t,p):p}if(typeof t=="bigint"){var h=String(t)+"n";return d?qG(t,h):h}var v=typeof l.depth>"u"?5:l.depth;if(typeof o>"u"&&(o=0),o>=v&&v>0&&typeof t=="object")return VM(t)?"[Array]":"[Object]";var _=Mje(l,o);if(typeof s>"u")s=[];else if(Xte(s,t)>=0)return"[Circular]";function y(X,le,ye){if(le&&(s=mje.call(s),s.push(le)),ye){var ue={depth:l.depth};return Zu(l,"quoteStyle")&&(ue.quoteStyle=l.quoteStyle),e(X,ue,o+1,s)}return e(X,l,o+1,s)}if(typeof t=="function"&&!XG(t)){var b=Cje(t),w=WE(t,y);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(w.length>0?" { "+Mc.call(w,", ")+" }":"")}if(Kte(t)){var C=Fg?qf.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):MM.call(t);return typeof t=="object"&&!Fg?x4(C):C}if(Nje(t)){for(var T="<"+HG.call(String(t.nodeName)),I=t.attributes||[],D=0;D<I.length;D++)T+=" "+I[D].name+"="+Yte(gje(I[D].value),"double",l);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+HG.call(String(t.nodeName))+">",T}if(VM(t)){if(t.length===0)return"[]";var k=WE(t,y);return _&&!Oje(k)?"["+LM(k,_)+"]":"[ "+Mc.call(k,", ")+" ]"}if(yje(t)){var O=WE(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!Gte.call(t,"cause")?"{ ["+String(t)+"] "+Mc.call(WG.call("[cause]: "+y(t.cause),O),", ")+" }":O.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Mc.call(O,", ")+" }"}if(typeof t=="object"&&u){if(KG&&typeof t[KG]=="function"&&PM)return PM(t,{depth:v-o});if(u!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Tje(t)){var L=[];return $G&&$G.call(t,function(X,le){L.push(y(le,t,!0)+" => "+y(X,t))}),JG("Map",H8.call(t),L,_)}if(Aje(t)){var P=[];return UG&&UG.call(t,function(X){P.push(y(X,t))}),JG("Set",W8.call(t),P,_)}if(Ije(t))return rO("WeakMap");if(Dje(t))return rO("WeakSet");if(kje(t))return rO("WeakRef");if(xje(t))return x4(y(Number(t)));if(wje(t))return x4(y(OM.call(t)));if(Eje(t))return x4(uje.call(t));if(bje(t))return x4(y(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ir<"u"&&t===ir)return"{ [object globalThis] }";if(!_je(t)&&!XG(t)){var V=WE(t,y),$=GG?GG(t)===Object.prototype:t instanceof Object||t.constructor===Object,Y=t instanceof Object?"":"null prototype",F=!$&&ey&&Object(t)===t&&ey in t?q7.call(_h(t),8,-1):Y?"Object":"",U=$||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Q=U+(F||Y?"["+Mc.call(WG.call([],F||[],Y||[]),": ")+"] ":"");return V.length===0?Q+"{}":_?Q+"{"+LM(V,_)+"}":Q+"{ "+Mc.call(V,", ")+" }"}return String(t)};function Yte(e,t,n){var o=n.quoteStyle||t,s=qte[o];return s+e+s}function gje(e){return qf.call(String(e),/"/g,"&quot;")}function Gp(e){return!ey||!(typeof e=="object"&&(ey in e||typeof e[ey]<"u"))}function VM(e){return _h(e)==="[object Array]"&&Gp(e)}function _je(e){return _h(e)==="[object Date]"&&Gp(e)}function XG(e){return _h(e)==="[object RegExp]"&&Gp(e)}function yje(e){return _h(e)==="[object Error]"&&Gp(e)}function bje(e){return _h(e)==="[object String]"&&Gp(e)}function xje(e){return _h(e)==="[object Number]"&&Gp(e)}function Eje(e){return _h(e)==="[object Boolean]"&&Gp(e)}function Kte(e){if(Fg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!MM)return!1;try{return MM.call(e),!0}catch{}return!1}function wje(e){if(!e||typeof e!="object"||!OM)return!1;try{return OM.call(e),!0}catch{}return!1}var Sje=Object.prototype.hasOwnProperty||function(e){return e in this};function Zu(e,t){return Sje.call(e,t)}function _h(e){return dje.call(e)}function Cje(e){if(e.name)return e.name;var t=hje.call(fje.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Xte(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}function Tje(e){if(!H8||!e||typeof e!="object")return!1;try{H8.call(e);try{W8.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Ije(e){if(!Z4||!e||typeof e!="object")return!1;try{Z4.call(e,Z4);try{Q4.call(e,Q4)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function kje(e){if(!zG||!e||typeof e!="object")return!1;try{return zG.call(e),!0}catch{}return!1}function Aje(e){if(!W8||!e||typeof e!="object")return!1;try{W8.call(e);try{H8.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Dje(e){if(!Q4||!e||typeof e!="object")return!1;try{Q4.call(e,Q4);try{Z4.call(e,Z4)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Nje(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Jte(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return Jte(q7.call(e,0,t.maxStringLength),t)+o}var s=vje[t.quoteStyle||"single"];s.lastIndex=0;var l=qf.call(qf.call(e,s,"\\$1"),/[\x00-\x1f]/g,Rje);return Yte(l,"single",t)}function Rje(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+pje.call(t.toString(16))}function x4(e){return"Object("+e+")"}function rO(e){return e+" { ? }"}function JG(e,t,n,o){var s=o?LM(n,o):Mc.call(n,", ");return e+" ("+t+") {"+s+"}"}function Oje(e){for(var t=0;t<e.length;t++)if(Xte(e[t],`
88
88
  `)>=0)return!1;return!0}function Mje(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Mc.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Mc.call(Array(t+1),n)}}function LM(e,t){if(e.length===0)return"";var n=`
89
89
  `+t.prev+t.base;return n+Mc.call(e,","+n)+`
90
90
  `+t.prev}function WE(e,t){var n=VM(e),o=[];if(n){o.length=e.length;for(var s=0;s<e.length;s++)o[s]=Zu(e,s)?t(e[s],e):""}var l=typeof nO=="function"?nO(e):[],u;if(Fg){u={};for(var d=0;d<l.length;d++)u["$"+l[d]]=l[d]}for(var p in e)Zu(e,p)&&(n&&String(Number(p))===p&&p<e.length||Fg&&u["$"+p]instanceof Symbol||(jte.call(/[^\w$]/,p)?o.push(t(p,e)+": "+t(e[p],e)):o.push(p+": "+t(e[p],e))));if(typeof nO=="function")for(var h=0;h<l.length;h++)Gte.call(e,l[h])&&o.push("["+t(l[h])+"]: "+t(e[l[h]],e));return o}var Pje=VT,Vje=l2,LT=function(e,t,n){for(var o=e,s;(s=o.next)!=null;o=s)if(s.key===t)return o.next=s.next,n||(s.next=e.next,e.next=s),s},Lje=function(e,t){if(e){var n=LT(e,t);return n&&n.value}},Bje=function(e,t,n){var o=LT(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}},Fje=function(e,t){return e?!!LT(e,t):!1},$je=function(e,t){if(e)return LT(e,t,!0)},Uje=function(){var t,n={assert:function(o){if(!n.has(o))throw new Vje("Side channel does not contain "+Pje(o))},delete:function(o){var s=t&&t.next,l=$je(t,o);return l&&s&&s===l&&(t=void 0),!!l},get:function(o){return Lje(t,o)},has:function(o){return Fje(t,o)},set:function(o,s){t||(t={next:void 0}),Bje(t,o,s)}};return n},Zte=Object,zje=Error,Hje=EvalError,Wje=RangeError,jje=ReferenceError,Gje=SyntaxError,qje=URIError,Yje=Math.abs,Kje=Math.floor,Xje=Math.max,Jje=Math.min,Zje=Math.pow,Qje=Math.round,eGe=Number.isNaN||function(t){return t!==t},tGe=eGe,nGe=function(t){return tGe(t)||t===0?t:t<0?-1:1},rGe=Object.getOwnPropertyDescriptor,u8=rGe;if(u8)try{u8([],"length")}catch{u8=null}var Qte=u8,d8=Object.defineProperty||!1;if(d8)try{d8({},"a",{value:1})}catch{d8=!1}var iGe=d8,iO,ZG;function oGe(){return ZG||(ZG=1,iO=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(var l in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,n);if(d.value!==s||d.enumerable!==!0)return!1}return!0}),iO}var oO,QG;function aGe(){if(QG)return oO;QG=1;var e=typeof Symbol<"u"&&Symbol,t=oGe();return oO=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},oO}var aO,eq;function ene(){return eq||(eq=1,aO=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),aO}var sO,tq;function tne(){if(tq)return sO;tq=1;var e=Zte;return sO=e.getPrototypeOf||null,sO}var lO,nq;function sGe(){if(nq)return lO;nq=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,o="[object Function]",s=function(p,h){for(var v=[],_=0;_<p.length;_+=1)v[_]=p[_];for(var y=0;y<h.length;y+=1)v[y+p.length]=h[y];return v},l=function(p,h){for(var v=[],_=h,y=0;_<p.length;_+=1,y+=1)v[y]=p[_];return v},u=function(d,p){for(var h="",v=0;v<d.length;v+=1)h+=d[v],v+1<d.length&&(h+=p);return h};return lO=function(p){var h=this;if(typeof h!="function"||t.apply(h)!==o)throw new TypeError(e+h);for(var v=l(arguments,1),_,y=function(){if(this instanceof _){var I=h.apply(this,s(v,arguments));return Object(I)===I?I:this}return h.apply(p,s(v,arguments))},b=n(0,h.length-v.length),w=[],C=0;C<b;C++)w[C]="$"+C;if(_=Function("binder","return function ("+u(w,",")+"){ return binder.apply(this,arguments); }")(y),h.prototype){var T=function(){};T.prototype=h.prototype,_.prototype=new T,T.prototype=null}return _},lO}var cO,rq;function BT(){if(rq)return cO;rq=1;var e=sGe();return cO=Function.prototype.bind||e,cO}var uO,iq;function Y7(){return iq||(iq=1,uO=Function.prototype.call),uO}var dO,oq;function nne(){return oq||(oq=1,dO=Function.prototype.apply),dO}var lGe=typeof Reflect<"u"&&Reflect&&Reflect.apply,cGe=BT(),uGe=nne(),dGe=Y7(),fGe=lGe,hGe=fGe||cGe.call(dGe,uGe),pGe=BT(),mGe=l2,vGe=Y7(),gGe=hGe,rne=function(t){if(t.length<1||typeof t[0]!="function")throw new mGe("a function is required");return gGe(pGe,vGe,t)},fO,aq;function _Ge(){if(aq)return fO;aq=1;var e=rne,t=Qte,n;try{n=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var o=!!n&&t&&t(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;return fO=o&&typeof o.get=="function"?e([o.get]):typeof l=="function"?function(d){return l(d==null?d:s(d))}:!1,fO}var hO,sq;function yGe(){if(sq)return hO;sq=1;var e=ene(),t=tne(),n=_Ge();return hO=e?function(s){return e(s)}:t?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return t(s)}:n?function(s){return n(s)}:null,hO}var pO,lq;function bGe(){if(lq)return pO;lq=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=BT();return pO=n.call(e,t),pO}var Jr,xGe=Zte,EGe=zje,wGe=Hje,SGe=Wje,CGe=jje,$g=Gje,yg=l2,TGe=qje,IGe=Yje,kGe=Kje,AGe=Xje,DGe=Jje,NGe=Zje,RGe=Qje,OGe=nGe,ine=Function,mO=function(e){try{return ine('"use strict"; return ('+e+").constructor;")()}catch{}},xy=Qte,MGe=iGe,vO=function(){throw new yg},PGe=xy?function(){try{return arguments.callee,vO}catch{try{return xy(arguments,"callee").get}catch{return vO}}}():vO,jv=aGe()(),Ko=yGe(),VGe=tne(),LGe=ene(),one=nne(),t3=Y7(),Zv={},BGe=typeof Uint8Array>"u"||!Ko?Jr:Ko(Uint8Array),Cp={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Jr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Jr:ArrayBuffer,"%ArrayIteratorPrototype%":jv&&Ko?Ko([][Symbol.iterator]()):Jr,"%AsyncFromSyncIteratorPrototype%":Jr,"%AsyncFunction%":Zv,"%AsyncGenerator%":Zv,"%AsyncGeneratorFunction%":Zv,"%AsyncIteratorPrototype%":Zv,"%Atomics%":typeof Atomics>"u"?Jr:Atomics,"%BigInt%":typeof BigInt>"u"?Jr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Jr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Jr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Jr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":EGe,"%eval%":eval,"%EvalError%":wGe,"%Float16Array%":typeof Float16Array>"u"?Jr:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Jr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Jr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Jr:FinalizationRegistry,"%Function%":ine,"%GeneratorFunction%":Zv,"%Int8Array%":typeof Int8Array>"u"?Jr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Jr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Jr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":jv&&Ko?Ko(Ko([][Symbol.iterator]())):Jr,"%JSON%":typeof JSON=="object"?JSON:Jr,"%Map%":typeof Map>"u"?Jr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!jv||!Ko?Jr:Ko(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xGe,"%Object.getOwnPropertyDescriptor%":xy,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Jr:Promise,"%Proxy%":typeof Proxy>"u"?Jr:Proxy,"%RangeError%":SGe,"%ReferenceError%":CGe,"%Reflect%":typeof Reflect>"u"?Jr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Jr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!jv||!Ko?Jr:Ko(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Jr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":jv&&Ko?Ko(""[Symbol.iterator]()):Jr,"%Symbol%":jv?Symbol:Jr,"%SyntaxError%":$g,"%ThrowTypeError%":PGe,"%TypedArray%":BGe,"%TypeError%":yg,"%Uint8Array%":typeof Uint8Array>"u"?Jr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Jr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Jr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Jr:Uint32Array,"%URIError%":TGe,"%WeakMap%":typeof WeakMap>"u"?Jr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Jr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Jr:WeakSet,"%Function.prototype.call%":t3,"%Function.prototype.apply%":one,"%Object.defineProperty%":MGe,"%Object.getPrototypeOf%":VGe,"%Math.abs%":IGe,"%Math.floor%":kGe,"%Math.max%":AGe,"%Math.min%":DGe,"%Math.pow%":NGe,"%Math.round%":RGe,"%Math.sign%":OGe,"%Reflect.getPrototypeOf%":LGe};if(Ko)try{null.error}catch(e){var FGe=Ko(Ko(e));Cp["%Error.prototype%"]=FGe}var $Ge=function e(t){var n;if(t==="%AsyncFunction%")n=mO("async function () {}");else if(t==="%GeneratorFunction%")n=mO("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=mO("async function* () {}");else if(t==="%AsyncGenerator%"){var o=e("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&Ko&&(n=Ko(s.prototype))}return Cp[t]=n,n},cq={__proto__:null,"%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"]},n3=BT(),j8=bGe(),UGe=n3.call(t3,Array.prototype.concat),zGe=n3.call(one,Array.prototype.splice),uq=n3.call(t3,String.prototype.replace),G8=n3.call(t3,String.prototype.slice),HGe=n3.call(t3,RegExp.prototype.exec),WGe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,jGe=/\\(\\)?/g,GGe=function(t){var n=G8(t,0,1),o=G8(t,-1);if(n==="%"&&o!=="%")throw new $g("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new $g("invalid intrinsic syntax, expected opening `%`");var s=[];return uq(t,WGe,function(l,u,d,p){s[s.length]=d?uq(p,jGe,"$1"):u||l}),s},qGe=function(t,n){var o=t,s;if(j8(cq,o)&&(s=cq[o],o="%"+s[0]+"%"),j8(Cp,o)){var l=Cp[o];if(l===Zv&&(l=$Ge(o)),typeof l>"u"&&!n)throw new yg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:o,value:l}}throw new $g("intrinsic "+t+" does not exist!")},K7=function(t,n){if(typeof t!="string"||t.length===0)throw new yg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new yg('"allowMissing" argument must be a boolean');if(HGe(/^%?[^%]*%?$/,t)===null)throw new $g("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=GGe(t),s=o.length>0?o[0]:"",l=qGe("%"+s+"%",n),u=l.name,d=l.value,p=!1,h=l.alias;h&&(s=h[0],zGe(o,UGe([0,1],h)));for(var v=1,_=!0;v<o.length;v+=1){var y=o[v],b=G8(y,0,1),w=G8(y,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new $g("property names with quotes must have matching quotes");if((y==="constructor"||!_)&&(p=!0),s+="."+y,u="%"+s+"%",j8(Cp,u))d=Cp[u];else if(d!=null){if(!(y in d)){if(!n)throw new yg("base intrinsic for "+t+" exists, but the property is not available.");return}if(xy&&v+1>=o.length){var C=xy(d,y);_=!!C,_&&"get"in C&&!("originalValue"in C.get)?d=C.get:d=d[y]}else _=j8(d,y),d=d[y];_&&!p&&(Cp[u]=d)}}return d},ane=K7,sne=rne,YGe=sne([ane("%String.prototype.indexOf%")]),lne=function(t,n){var o=ane(t,!!n);return typeof o=="function"&&YGe(t,".prototype.")>-1?sne([o]):o},KGe=K7,r3=lne,XGe=VT,JGe=l2,dq=KGe("%Map%",!0),ZGe=r3("Map.prototype.get",!0),QGe=r3("Map.prototype.set",!0),eqe=r3("Map.prototype.has",!0),tqe=r3("Map.prototype.delete",!0),nqe=r3("Map.prototype.size",!0),cne=!!dq&&function(){var t,n={assert:function(o){if(!n.has(o))throw new JGe("Side channel does not contain "+XGe(o))},delete:function(o){if(t){var s=tqe(t,o);return nqe(t)===0&&(t=void 0),s}return!1},get:function(o){if(t)return ZGe(t,o)},has:function(o){return t?eqe(t,o):!1},set:function(o,s){t||(t=new dq),QGe(t,o,s)}};return n},rqe=K7,FT=lne,iqe=VT,jE=cne,oqe=l2,Gv=rqe("%WeakMap%",!0),aqe=FT("WeakMap.prototype.get",!0),sqe=FT("WeakMap.prototype.set",!0),lqe=FT("WeakMap.prototype.has",!0),cqe=FT("WeakMap.prototype.delete",!0),uqe=Gv?function(){var t,n,o={assert:function(s){if(!o.has(s))throw new oqe("Side channel does not contain "+iqe(s))},delete:function(s){if(Gv&&s&&(typeof s=="object"||typeof s=="function")){if(t)return cqe(t,s)}else if(jE&&n)return n.delete(s);return!1},get:function(s){return Gv&&s&&(typeof s=="object"||typeof s=="function")&&t?aqe(t,s):n&&n.get(s)},has:function(s){return Gv&&s&&(typeof s=="object"||typeof s=="function")&&t?lqe(t,s):!!n&&n.has(s)},set:function(s,l){Gv&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Gv),sqe(t,s,l)):jE&&(n||(n=jE()),n.set(s,l))}};return o}:jE,dqe=l2,fqe=VT,hqe=Uje,pqe=cne,mqe=uqe,vqe=mqe||pqe||hqe,gqe=function(){var t,n={assert:function(o){if(!n.has(o))throw new dqe("Side channel does not contain "+fqe(o))},delete:function(o){return!!t&&t.delete(o)},get:function(o){return t&&t.get(o)},has:function(o){return!!t&&t.has(o)},set:function(o,s){t||(t=vqe()),t.set(o,s)}};return n},_qe=String.prototype.replace,yqe=/%20/g,gO={RFC1738:"RFC1738",RFC3986:"RFC3986"},X7={default:gO.RFC3986,formatters:{RFC1738:function(e){return _qe.call(e,yqe,"+")},RFC3986:function(e){return String(e)}},RFC1738:gO.RFC1738,RFC3986:gO.RFC3986},bqe=X7,_O=Object.prototype.hasOwnProperty,Q0=Array.isArray,kc=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),xqe=function(t){for(;t.length>1;){var n=t.pop(),o=n.obj[n.prop];if(Q0(o)){for(var s=[],l=0;l<o.length;++l)typeof o[l]<"u"&&s.push(o[l]);n.obj[n.prop]=s}}},une=function(t,n){for(var o=n&&n.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(o[s]=t[s]);return o},Eqe=function e(t,n,o){if(!n)return t;if(typeof n!="object"){if(Q0(t))t.push(n);else if(t&&typeof t=="object")(o&&(o.plainObjects||o.allowPrototypes)||!_O.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var s=t;return Q0(t)&&!Q0(n)&&(s=une(t,o)),Q0(t)&&Q0(n)?(n.forEach(function(l,u){if(_O.call(t,u)){var d=t[u];d&&typeof d=="object"&&l&&typeof l=="object"?t[u]=e(d,l,o):t.push(l)}else t[u]=l}),t):Object.keys(n).reduce(function(l,u){var d=n[u];return _O.call(l,u)?l[u]=e(l[u],d,o):l[u]=d,l},s)},wqe=function(t,n){return Object.keys(n).reduce(function(o,s){return o[s]=n[s],o},t)},Sqe=function(e,t,n){var o=e.replace(/\+/g," ");if(n==="iso-8859-1")return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch{return o}},Cqe=function(t,n,o,s,l){if(t.length===0)return t;var u=t;if(typeof t=="symbol"?u=Symbol.prototype.toString.call(t):typeof t!="string"&&(u=String(t)),o==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(v){return"%26%23"+parseInt(v.slice(2),16)+"%3B"});for(var d="",p=0;p<u.length;++p){var h=u.charCodeAt(p);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||l===bqe.RFC1738&&(h===40||h===41)){d+=u.charAt(p);continue}if(h<128){d=d+kc[h];continue}if(h<2048){d=d+(kc[192|h>>6]+kc[128|h&63]);continue}if(h<55296||h>=57344){d=d+(kc[224|h>>12]+kc[128|h>>6&63]+kc[128|h&63]);continue}p+=1,h=65536+((h&1023)<<10|u.charCodeAt(p)&1023),d+=kc[240|h>>18]+kc[128|h>>12&63]+kc[128|h>>6&63]+kc[128|h&63]}return d},Tqe=function(t){for(var n=[{obj:{o:t},prop:"o"}],o=[],s=0;s<n.length;++s)for(var l=n[s],u=l.obj[l.prop],d=Object.keys(u),p=0;p<d.length;++p){var h=d[p],v=u[h];typeof v=="object"&&v!==null&&o.indexOf(v)===-1&&(n.push({obj:u,prop:h}),o.push(v))}return xqe(n),t},Iqe=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},kqe=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Aqe=function(t,n){return[].concat(t,n)},Dqe=function(t,n){if(Q0(t)){for(var o=[],s=0;s<t.length;s+=1)o.push(n(t[s]));return o}return n(t)},dne={arrayToObject:une,assign:wqe,combine:Aqe,compact:Tqe,decode:Sqe,encode:Cqe,isBuffer:kqe,isRegExp:Iqe,maybeMap:Dqe,merge:Eqe},fne=gqe,f8=dne,ty=X7,Nqe=Object.prototype.hasOwnProperty,hne={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Nc=Array.isArray,Rqe=Array.prototype.push,pne=function(e,t){Rqe.apply(e,Nc(t)?t:[t])},Oqe=Date.prototype.toISOString,fq=ty.default,Vo={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:f8.encode,encodeValuesOnly:!1,format:fq,formatter:ty.formatters[fq],indices:!1,serializeDate:function(t){return Oqe.call(t)},skipNulls:!1,strictNullHandling:!1},Mqe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},yO={},Pqe=function e(t,n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D){for(var k=t,O=D,L=0,P=!1;(O=O.get(yO))!==void 0&&!P;){var V=O.get(t);if(L+=1,typeof V<"u"){if(V===L)throw new RangeError("Cyclic object value");P=!0}typeof O.get(yO)>"u"&&(L=0)}if(typeof v=="function"?k=v(n,k):k instanceof Date?k=b(k):o==="comma"&&Nc(k)&&(k=f8.maybeMap(k,function(oe){return oe instanceof Date?b(oe):oe})),k===null){if(u)return h&&!T?h(n,Vo.encoder,I,"key",w):n;k=""}if(Mqe(k)||f8.isBuffer(k)){if(h){var $=T?n:h(n,Vo.encoder,I,"key",w);return[C($)+"="+C(h(k,Vo.encoder,I,"value",w))]}return[C(n)+"="+C(String(k))]}var Y=[];if(typeof k>"u")return Y;var F;if(o==="comma"&&Nc(k))T&&h&&(k=f8.maybeMap(k,h)),F=[{value:k.length>0?k.join(",")||null:void 0}];else if(Nc(v))F=v;else{var U=Object.keys(k);F=_?U.sort(_):U}var Q=p?n.replace(/\./g,"%2E"):n,X=s&&Nc(k)&&k.length===1?Q+"[]":Q;if(l&&Nc(k)&&k.length===0)return X+"[]";for(var le=0;le<F.length;++le){var ye=F[le],ue=typeof ye=="object"&&typeof ye.value<"u"?ye.value:k[ye];if(!(d&&ue===null)){var G=y&&p?ye.replace(/\./g,"%2E"):ye,ee=Nc(k)?typeof o=="function"?o(X,G):X:X+(y?"."+G:"["+G+"]");D.set(t,L);var ne=fne();ne.set(yO,D),pne(Y,e(ue,ee,o,s,l,u,d,p,o==="comma"&&T&&Nc(k)?null:h,v,_,y,b,w,C,T,I,ne))}}return Y},Vqe=function(t){if(!t)return Vo;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Vo.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=ty.default;if(typeof t.format<"u"){if(!Nqe.call(ty.formatters,t.format))throw new TypeError("Unknown format option provided.");o=t.format}var s=ty.formatters[o],l=Vo.filter;(typeof t.filter=="function"||Nc(t.filter))&&(l=t.filter);var u;if(t.arrayFormat in hne?u=t.arrayFormat:"indices"in t?u=t.indices?"indices":"repeat":u=Vo.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Vo.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Vo.addQueryPrefix,allowDots:d,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Vo.allowEmptyArrays,arrayFormat:u,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Vo.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Vo.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Vo.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Vo.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Vo.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Vo.encodeValuesOnly,filter:l,format:o,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Vo.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Vo.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Vo.strictNullHandling}},Lqe=function(e,t){var n=e,o=Vqe(t),s,l;typeof o.filter=="function"?(l=o.filter,n=l("",n)):Nc(o.filter)&&(l=o.filter,s=l);var u=[];if(typeof n!="object"||n===null)return"";var d=hne[o.arrayFormat],p=d==="comma"&&o.commaRoundTrip;s||(s=Object.keys(n)),o.sort&&s.sort(o.sort);for(var h=fne(),v=0;v<s.length;++v){var _=s[v];o.skipNulls&&n[_]===null||pne(u,Pqe(n[_],_,d,p,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,h))}var y=u.join(o.delimiter),b=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),y.length>0?b+y:""},Ug=dne,BM=Object.prototype.hasOwnProperty,Bqe=Array.isArray,go={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!0,decoder:Ug.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Fqe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},mne=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},$qe="utf8=%26%2310003%3B",Uqe="utf8=%E2%9C%93",zqe=function(t,n){var o={__proto__:null},s=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,l=n.parameterLimit===1/0?void 0:n.parameterLimit,u=s.split(n.delimiter,l),d=-1,p,h=n.charset;if(n.charsetSentinel)for(p=0;p<u.length;++p)u[p].indexOf("utf8=")===0&&(u[p]===Uqe?h="utf-8":u[p]===$qe&&(h="iso-8859-1"),d=p,p=u.length);for(p=0;p<u.length;++p)if(p!==d){var v=u[p],_=v.indexOf("]="),y=_===-1?v.indexOf("="):_+1,b,w;y===-1?(b=n.decoder(v,go.decoder,h,"key"),w=n.strictNullHandling?null:""):(b=n.decoder(v.slice(0,y),go.decoder,h,"key"),w=Ug.maybeMap(mne(v.slice(y+1),n),function(T){return n.decoder(T,go.decoder,h,"value")})),w&&n.interpretNumericEntities&&h==="iso-8859-1"&&(w=Fqe(w)),v.indexOf("[]=")>-1&&(w=Bqe(w)?[w]:w);var C=BM.call(o,b);C&&n.duplicates==="combine"?o[b]=Ug.combine(o[b],w):(!C||n.duplicates==="last")&&(o[b]=w)}return o},Hqe=function(e,t,n,o){for(var s=o?t:mne(t,n),l=e.length-1;l>=0;--l){var u,d=e[l];if(d==="[]"&&n.parseArrays)u=n.allowEmptyArrays&&s===""?[]:[].concat(s);else{u=n.plainObjects?Object.create(null):{};var p=d.charAt(0)==="["&&d.charAt(d.length-1)==="]"?d.slice(1,-1):d,h=n.decodeDotInKeys?p.replace(/%2E/g,"."):p,v=parseInt(h,10);!n.parseArrays&&h===""?u={0:s}:!isNaN(v)&&d!==h&&String(v)===h&&v>=0&&n.parseArrays&&v<=n.arrayLimit?(u=[],u[v]=s):h!=="__proto__"&&(u[h]=s)}s=u}return s},Wqe=function(t,n,o,s){if(t){var l=o.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,u=/(\[[^[\]]*])/,d=/(\[[^[\]]*])/g,p=o.depth>0&&u.exec(l),h=p?l.slice(0,p.index):l,v=[];if(h){if(!o.plainObjects&&BM.call(Object.prototype,h)&&!o.allowPrototypes)return;v.push(h)}for(var _=0;o.depth>0&&(p=d.exec(l))!==null&&_<o.depth;){if(_+=1,!o.plainObjects&&BM.call(Object.prototype,p[1].slice(1,-1))&&!o.allowPrototypes)return;v.push(p[1])}return p&&v.push("["+l.slice(p.index)+"]"),Hqe(v,n,o,s)}},jqe=function(t){if(!t)return go;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?go.charset:t.charset,o=typeof t.duplicates>"u"?go.duplicates:t.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var s=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:go.allowDots:!!t.allowDots;return{allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:go.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:go.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:go.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:go.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:go.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:go.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:go.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:go.decoder,delimiter:typeof t.delimiter=="string"||Ug.isRegExp(t.delimiter)?t.delimiter:go.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:go.depth,duplicates:o,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:go.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:go.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:go.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:go.strictNullHandling}},Gqe=function(e,t){var n=jqe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var o=typeof e=="string"?zqe(e,n):e,s=n.plainObjects?Object.create(null):{},l=Object.keys(o),u=0;u<l.length;++u){var d=l[u],p=Wqe(d,o[d],n,typeof e=="string");s=Ug.merge(s,p,n)}return n.allowSparse===!0?s:Ug.compact(s)},qqe=Lqe,Yqe=Gqe,Kqe=X7,Xqe={formats:Kqe,parse:Yqe,stringify:qqe};const vne=fh(Xqe);async function Jqe(e,t){const n=new FormData;return $t.isArray(e)?await Promise.all(e.map(o=>(n.append(t,o),!0))):await n.append(t,e),n}const Zqe=[async function(e){let t={...e};if(e.headers["Content-Type"]==="application/x-www-form-urlencoded"&&(t.data=vne.stringify(t.data)),e.headers["Content-Type"]==="multipart/form-data"){const[n,...o]=Object.keys(t.data),s=t.data[n],l=await Jqe(s,n);o==null||o.forEach(u=>{l.append(u,typeof t.data[u]=="object"?JSON.stringify(t.data[u]):t.data[u])}),t.data=l}return t},function(e){throw e}];/*!
@@ -109,7 +109,7 @@ Pn.version="2.30.1";mBe(Wi);Pn.fn=bn;Pn.min=r$e;Pn.max=i$e;Pn.now=o$e;Pn.utc=eu;
109
109
  ${s[p]}
110
110
  ${p}`}).replaceAll(",",";").replaceAll('"',"").replaceAll("\\","");n+=`
111
111
  export interface ${o.baseData.tableName} ${d}
112
- `}),console.debug(n)}function sXe(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(s){s(n)}),(o=e.get("*"))&&o.slice().map(function(s){s(t,n)})}}}const h8=sXe();function lXe(){const e=i.getCurrentScope(),t=new Map;let n={};function o(p,h){t.set(p,h),h8.on(p,h),n[p]&&(n[p].forEach(v=>h(v)),delete n[p])}function s(p,h){const v=(..._)=>{u(p,v),h(..._)};o(p,v)}function l(p,h){n[p]||(n[p]=[]),n[p].push(h),h8.emit(p,h)}function u(p,h){t.delete(p),h8.off(p,h)}function d(){for(const[p,h]of t.entries())u(p,h);n={}}return e&&i.onScopeDispose(d),{on:o,once:s,emit:l,off:u,clear:d}}function nV(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function cXe(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function uXe(e){let t=nV(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function dXe(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function fXe(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function hXe(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function pXe(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function mXe(e){let t=nV(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function vXe(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function gXe(e,t="仟佰拾亿仟佰拾万仟佰拾元角分",n=""){e+="00";let o=e.indexOf(".");o>=0&&(e=e.substring(0,o)+e.substr(o+1,2)),t=t.substr(t.length-e.length);for(let s=0;s<e.length;s++)n+="零壹贰叁肆伍陆柒捌玖".substr(e.substr(s,1),1)+t.substr(s,1);return n=n.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元"),n}function _Xe(e){return!!/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/.test(e)}function yXe(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function bXe(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function xXe(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function EXe(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function wXe(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="强"),t}function SXe(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function CXe(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function TXe(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function IXe(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function kXe(e){return!!/^[1-9][0-9]{5}$/.test(e)}function Tne(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function AXe(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}const DXe=i.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./bcIcon-BnzU9Y20.cjs")));function Ine(e){const t=n6e;for(const n in t)e.component(`ele-${t[n].name}`,t[n]);e.component("SvgIcon",DXe)}function kne(e){document.title=e}function Ane(e){let t="";const{query:n,params:o,meta:s}=e;return n!=null&&n.tagsViewName||o!=null&&o.tagsViewName?t=(n==null?void 0:n.tagsViewName)||(o==null?void 0:o.tagsViewName):t=s.title,t}const Dne=(e,t)=>{const n=new IntersectionObserver(o=>{o.forEach(s=>{if(s.isIntersecting){const{img:l,key:u}=s.target.dataset;s.target.src=l,s.target.onload=()=>{n.unobserve(s.target),t[u].loading=!1}}})});i.nextTick(()=>{document.querySelectorAll(e).forEach(o=>n.observe(o))})},Nne=()=>"",Rne=$t.cloneDeep;function One(){return!!navigator.userAgent.match(/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i)}function Mne(e){const t=[];for(const n in e){const o=[];for(const l in e[n])o.push(e[n][l]);o.filter(l=>l==="").length!==o.length&&t.push(e[n])}return t}function Pne(e){var o;const{origin:t,pathname:n}=window.location;if(e.link&&!((o=e==null?void 0:e.meta)!=null&&o.isIframe))return Mr.get("userInfo").then(s=>{var u;const l=yne(`${location.origin}${e.link}`,{isIframe:(u=e.meta)==null?void 0:u.isIframe,jti:s.jti});window.open(l,s.jti)});Tne(e.link)?window.open(e.link):window.open(`${t}${n}`)}const NXe={elSvg:e=>{Ine(e)},useTitle:e=>{kne(e)},setTagsViewNameI18n(e){return Ane(e)},lazyImg:(e,t)=>{Dne(e,t)},globalComponentSize:()=>Nne(),deepClone:e=>Rne(e),isMobile:()=>One(),handleEmpty:e=>Mne(e),handleOpenLink:e=>{Pne(e)}},vq={success(e){return Sa({message:e,type:"success"})},warning(e){return Sa({message:e,type:"warning"})},info(e){return Sa({message:e,type:"info"})},error(e){return Sa({message:e,type:"error"})}},Vc=new Proxy(Sa,{get(e,t){return t in vq?vq[t]:e[t]}}),RXe={install(e){e.config.globalProperties.$message=Vc}},ny={alert(e,t,n){const o=Rs.value;return Rs.value="",lg.alert(e,t,{...n,callback:s=>{typeof(n==null?void 0:n.callback)=="function"&&(Rs.value=o,n.callback(s,s))}})},confirm(e,t,n){const o=Rs.value;return Rs.value="",lg.confirm(e,t,n).finally(()=>{Rs.value=o})},prompt(e,t,n){const o=Rs.value;return Rs.value="",lg.prompt(e,t,n).finally(()=>{Rs.value=o})}},Y8=new Proxy(lg,{get(e,t){return t in ny?ny[t]:e[t]}}),OXe={install(e){e.config.globalProperties.$MessageBox=Y8,e.config.globalProperties.$messageBox=Y8,e.config.globalProperties.$confirm=ny.confirm,e.config.globalProperties.$alert=ny.alert,e.config.globalProperties.$prompt=ny.prompt}},gq={success(e){return S4({...e,type:"success"})},warning(e){return S4({...e,type:"warning"})},info(e){return S4({...e,type:"info"})},error(e){return S4({...e,type:"error"})}},Vne=new Proxy(S4,{get(e,t){return t in gq?gq[t]:e[t]}}),MXe={install(e){e.config.globalProperties.$notification=Vne}},PXe={class:"popup-wrapper"},VXe={class:"content"},LXe={key:0},BXe=i.defineComponent({__name:"showPopup",props:{closeLoading:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!0},confirmButtonText:{type:String,default:"确定"},cancelButtonText:{type:String,default:"取消"}},emits:["success"],setup(e){const t=i.ref(0),n=i.computed({get:()=>t.value>0,set:s=>{t.value+=s,t.value=Math.max(0,t.value)}});function o(s){n.value=s?1:-1}return i.provide("popupApi",{setLoading:o}),(s,l)=>{const u=i.resolveComponent("hs-button"),d=i.resolveDirective("loading");return i.withDirectives((i.openBlock(),i.createElementBlock("div",PXe,[i.createElementVNode("div",VXe,[i.createVNode(i.unref(zX),{locale:i.unref(aJ)},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3},8,["locale"])]),e.showFooter?(i.openBlock(),i.createElementBlock("footer",LXe,[i.createVNode(u,{size:"default",onClick:l[0]||(l[0]=p=>s.$emit("success","cancel"))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.cancelButtonText),1)]),_:1}),i.createVNode(u,{type:"primary",size:"default",onClick:l[1]||(l[1]=p=>s.$emit("success","confirm"))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.confirmButtonText),1)]),_:1})])):i.createCommentVNode("",!0)])),[[d,!e.closeLoading&&n.value]])}}}),FXe=p7(BXe,[["__scopeId","data-v-304dce2d"]]);function i3(e){return i.getCurrentScope()?(i.onScopeDispose(e),!0):!1}function dd(e){return typeof e=="function"?e():i.unref(e)}const UT=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $Xe=e=>e!=null,UXe=Object.prototype.toString,zXe=e=>UXe.call(e)==="[object Object]",p8=()=>{},HXe=WXe();function WXe(){var e,t;return UT&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function jXe(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const o=t;t=void 0,o&&await o},n}function GXe(e){return i.getCurrentInstance()}function Lne(e,t=!0,n){GXe()?i.onMounted(e,n):t?e():i.nextTick(e)}function qXe(e,t,n){const o=i.watch(e,(...s)=>(i.nextTick(()=>o()),t(...s)),n);return o}const hl=UT?window:void 0,YXe=UT?window.document:void 0,rV=UT?window.navigator:void 0;function cs(e){var t;const n=dd(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Zi(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=hl):[t,n,o,s]=e,!t)return p8;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const l=[],u=()=>{l.forEach(v=>v()),l.length=0},d=(v,_,y,b)=>(v.addEventListener(_,y,b),()=>v.removeEventListener(_,y,b)),p=i.watch(()=>[cs(t),dd(s)],([v,_])=>{if(u(),!v)return;const y=zXe(_)?{..._}:_;l.push(...n.flatMap(b=>o.map(w=>d(v,b,w,y))))},{immediate:!0,flush:"post"}),h=()=>{p(),u()};return i3(h),h}let _q=!1;function KXe(e,t,n={}){const{window:o=hl,ignore:s=[],capture:l=!0,detectIframe:u=!1}=n;if(!o)return p8;HXe&&!_q&&(_q=!0,Array.from(o.document.body.children).forEach(C=>C.addEventListener("click",p8)),o.document.documentElement.addEventListener("click",p8));let d=!0;const p=C=>dd(s).some(T=>{if(typeof T=="string")return Array.from(o.document.querySelectorAll(T)).some(I=>I===C.target||C.composedPath().includes(I));{const I=cs(T);return I&&(C.target===I||C.composedPath().includes(I))}});function h(C){const T=dd(C);return T&&T.$.subTree.shapeFlag===16}function v(C,T){const I=dd(C),D=I.$.subTree&&I.$.subTree.children;return D==null||!Array.isArray(D)?!1:D.some(k=>k.el===T.target||T.composedPath().includes(k.el))}const _=C=>{const T=cs(e);if(C.target!=null&&!(!(T instanceof Element)&&h(e)&&v(e,C))&&!(!T||T===C.target||C.composedPath().includes(T))){if(C.detail===0&&(d=!p(C)),!d){d=!0;return}t(C)}};let y=!1;const b=[Zi(o,"click",C=>{y||(y=!0,setTimeout(()=>{y=!1},0),_(C))},{passive:!0,capture:l}),Zi(o,"pointerdown",C=>{const T=cs(e);d=!p(C)&&!!(T&&!C.composedPath().includes(T))},{passive:!0}),u&&Zi(o,"blur",C=>{setTimeout(()=>{var T;const I=cs(e);((T=o.document.activeElement)==null?void 0:T.tagName)==="IFRAME"&&!(I!=null&&I.contains(o.document.activeElement))&&t(C)},0)})].filter(Boolean);return()=>b.forEach(C=>C())}function XXe(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function FM(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=hl,eventName:l="keydown",passive:u=!1,dedupe:d=!1}=o,p=XXe(t);return Zi(s,l,v=>{v.repeat&&dd(d)||p(v)&&n(v)},u)}function JXe(){const e=i.ref(!1),t=i.getCurrentInstance();return t&&i.onMounted(()=>{e.value=!0},t),e}function d2(e){const t=JXe();return i.computed(()=>(t.value,!!e()))}function ZXe(e,t,n={}){const{window:o=hl,...s}=n;let l;const u=d2(()=>o&&"MutationObserver"in o),d=()=>{l&&(l.disconnect(),l=void 0)},p=i.computed(()=>{const y=dd(e),b=(Array.isArray(y)?y:[y]).map(cs).filter($Xe);return new Set(b)}),h=i.watch(()=>p.value,y=>{d(),u.value&&y.size&&(l=new MutationObserver(t),y.forEach(b=>l.observe(b,s)))},{immediate:!0,flush:"post"}),v=()=>l==null?void 0:l.takeRecords(),_=()=>{h(),d()};return i3(_),{isSupported:u,stop:_,takeRecords:v}}function QXe(e={}){var t;const{window:n=hl,deep:o=!0,triggerOnRemoval:s=!1}=e,l=(t=e.document)!=null?t:n==null?void 0:n.document,u=()=>{var h;let v=l==null?void 0:l.activeElement;if(o)for(;v!=null&&v.shadowRoot;)v=(h=v==null?void 0:v.shadowRoot)==null?void 0:h.activeElement;return v},d=i.ref(),p=()=>{d.value=u()};return n&&(Zi(n,"blur",h=>{h.relatedTarget===null&&p()},!0),Zi(n,"focus",p,!0)),s&&ZXe(l,h=>{h.filter(v=>v.removedNodes.length).map(v=>Array.from(v.removedNodes)).flat().forEach(v=>{v===d.value&&p()})},{childList:!0,subtree:!0}),p(),d}function eJe(e,t={}){const{window:n=hl}=t,o=d2(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const l=i.ref(!1),u=h=>{l.value=h.matches},d=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",u):s.removeListener(u))},p=i.watchEffect(()=>{o.value&&(d(),s=n.matchMedia(dd(e)),"addEventListener"in s?s.addEventListener("change",u):s.addListener(u),l.value=s.matches)});return i3(()=>{p(),d(),s=void 0}),l}function tJe(e,t={}){const{controls:n=!1,navigator:o=rV}=t,s=d2(()=>o&&"permissions"in o),l=i.shallowRef(),u={name:e},d=i.shallowRef(),p=()=>{var v,_;d.value=(_=(v=l.value)==null?void 0:v.state)!=null?_:"prompt"};Zi(l,"change",p);const h=jXe(async()=>{if(s.value){if(!l.value)try{l.value=await o.permissions.query(u)}catch{l.value=void 0}finally{p()}if(n)return i.toRaw(l.value)}});return h(),n?{state:d,isSupported:s,query:h}:d}function nJe(e={}){const{navigator:t=rV,requestPermissions:n=!1,constraints:o={audio:!0,video:!0},onUpdated:s}=e,l=i.ref([]),u=i.computed(()=>l.value.filter(w=>w.kind==="videoinput")),d=i.computed(()=>l.value.filter(w=>w.kind==="audioinput")),p=i.computed(()=>l.value.filter(w=>w.kind==="audiooutput")),h=d2(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),v=i.ref(!1);let _;async function y(){h.value&&(l.value=await t.mediaDevices.enumerateDevices(),s==null||s(l.value),_&&(_.getTracks().forEach(w=>w.stop()),_=null))}async function b(){if(!h.value)return!1;if(v.value)return!0;const{state:w,query:C}=tJe("camera",{controls:!0});if(await C(),w.value!=="granted"){let T=!0;try{_=await t.mediaDevices.getUserMedia(o)}catch{_=null,T=!1}y(),v.value=T}else v.value=!0;return v.value}return h.value&&(n&&b(),Zi(t.mediaDevices,"devicechange",y),y()),{devices:l,ensurePermissions:b,permissionGranted:v,videoInputs:u,audioInputs:d,audioOutputs:p,isSupported:h}}function rJe(e={}){const{document:t=YXe}=e;if(!t)return i.ref("visible");const n=i.ref(t.visibilityState);return Zi(t,"visibilitychange",()=>{n.value=t.visibilityState}),n}function iJe(e,t,n={}){const{window:o=hl,...s}=n;let l;const u=d2(()=>o&&"ResizeObserver"in o),d=()=>{l&&(l.disconnect(),l=void 0)},p=i.computed(()=>{const _=dd(e);return Array.isArray(_)?_.map(y=>cs(y)):[cs(_)]}),h=i.watch(p,_=>{if(d(),u.value&&o){l=new ResizeObserver(t);for(const y of _)y&&l.observe(y,s)}},{immediate:!0,flush:"post"}),v=()=>{d(),h()};return i3(v),{isSupported:u,stop:v}}function oJe(e,t={width:0,height:0},n={}){const{window:o=hl,box:s="content-box"}=n,l=i.computed(()=>{var _,y;return(y=(_=cs(e))==null?void 0:_.namespaceURI)==null?void 0:y.includes("svg")}),u=i.ref(t.width),d=i.ref(t.height),{stop:p}=iJe(e,([_])=>{const y=s==="border-box"?_.borderBoxSize:s==="content-box"?_.contentBoxSize:_.devicePixelContentBoxSize;if(o&&l.value){const b=cs(e);if(b){const w=b.getBoundingClientRect();u.value=w.width,d.value=w.height}}else if(y){const b=Array.isArray(y)?y:[y];u.value=b.reduce((w,{inlineSize:C})=>w+C,0),d.value=b.reduce((w,{blockSize:C})=>w+C,0)}else u.value=_.contentRect.width,d.value=_.contentRect.height},n);Lne(()=>{const _=cs(e);_&&(u.value="offsetWidth"in _?_.offsetWidth:t.width,d.value="offsetHeight"in _?_.offsetHeight:t.height)});const h=i.watch(()=>cs(e),_=>{u.value=_?t.width:0,d.value=_?t.height:0});function v(){p(),h()}return{width:u,height:d,stop:v}}const aJe={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function sJe(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:o=!1,initialValue:s={x:0,y:0},window:l=hl,target:u=l,scroll:d=!0,eventFilter:p}=e;let h=null,v=0,_=0;const y=i.ref(s.x),b=i.ref(s.y),w=i.ref(null),C=typeof t=="function"?t:aJe[t],T=V=>{const $=C(V);h=V,$&&([y.value,b.value]=$,w.value="mouse"),l&&(v=l.scrollX,_=l.scrollY)},I=V=>{if(V.touches.length>0){const $=C(V.touches[0]);$&&([y.value,b.value]=$,w.value="touch")}},D=()=>{if(!h||!l)return;const V=C(h);h instanceof MouseEvent&&V&&(y.value=V[0]+l.scrollX-v,b.value=V[1]+l.scrollY-_)},k=()=>{y.value=s.x,b.value=s.y},O=p?V=>p(()=>T(V),{}):V=>T(V),L=p?V=>p(()=>I(V),{}):V=>I(V),P=p?()=>p(()=>D(),{}):()=>D();if(u){const V={passive:!0};Zi(u,["mousemove","dragover"],O,V),n&&t!=="movement"&&(Zi(u,["touchstart","touchmove"],L,V),o&&Zi(u,"touchend",k,V)),d&&t==="page"&&Zi(l,"scroll",P,{passive:!0})}return{x:y,y:b,sourceType:w}}function lJe(e,t={}){const{handleOutside:n=!0,window:o=hl}=t,s=t.type||"page",{x:l,y:u,sourceType:d}=sJe(t),p=i.ref(e??(o==null?void 0:o.document.body)),h=i.ref(0),v=i.ref(0),_=i.ref(0),y=i.ref(0),b=i.ref(0),w=i.ref(0),C=i.ref(!0);let T=()=>{};return o&&(T=i.watch([p,l,u],()=>{const I=cs(p);if(!I||!(I instanceof Element))return;const{left:D,top:k,width:O,height:L}=I.getBoundingClientRect();_.value=D+(s==="page"?o.pageXOffset:0),y.value=k+(s==="page"?o.pageYOffset:0),b.value=L,w.value=O;const P=l.value-_.value,V=u.value-y.value;C.value=O===0||L===0||P<0||V<0||P>O||V>L,(n||!C.value)&&(h.value=P,v.value=V)},{immediate:!0}),Zi(document,"mouseleave",()=>{C.value=!0})),{x:l,y:u,sourceType:d,elementX:h,elementY:v,elementPositionX:_,elementPositionY:y,elementHeight:b,elementWidth:w,isOutside:C,stop:T}}function cJe(e={}){const{touch:t=!0,drag:n=!0,capture:o=!1,initialValue:s=!1,window:l=hl}=e,u=i.ref(s),d=i.ref(null);if(!l)return{pressed:u,sourceType:d};const p=_=>()=>{u.value=!0,d.value=_},h=()=>{u.value=!1,d.value=null},v=i.computed(()=>cs(e.target)||l);return Zi(v,"mousedown",p("mouse"),{passive:!0,capture:o}),Zi(l,"mouseleave",h,{passive:!0,capture:o}),Zi(l,"mouseup",h,{passive:!0,capture:o}),n&&(Zi(v,"dragstart",p("mouse"),{passive:!0,capture:o}),Zi(l,"drop",h,{passive:!0,capture:o}),Zi(l,"dragend",h,{passive:!0,capture:o})),t&&(Zi(v,"touchstart",p("touch"),{passive:!0,capture:o}),Zi(l,"touchend",h,{passive:!0,capture:o}),Zi(l,"touchcancel",h,{passive:!0,capture:o})),{pressed:u,sourceType:d}}function uJe(e={}){var t,n;const o=i.ref((t=e.enabled)!=null?t:!1),s=i.ref((n=e.autoSwitch)!=null?n:!0),l=i.ref(e.constraints),{navigator:u=rV}=e,d=d2(()=>{var C;return(C=u==null?void 0:u.mediaDevices)==null?void 0:C.getUserMedia}),p=i.shallowRef();function h(C){switch(C){case"video":{if(l.value)return l.value.video||!1;break}case"audio":{if(l.value)return l.value.audio||!1;break}}}async function v(){if(!(!d.value||p.value))return p.value=await u.mediaDevices.getUserMedia({video:h("video"),audio:h("audio")}),p.value}function _(){var C;(C=p.value)==null||C.getTracks().forEach(T=>T.stop()),p.value=void 0}function y(){_(),o.value=!1}async function b(){return await v(),p.value&&(o.value=!0),p.value}async function w(){return _(),await b()}return i.watch(o,C=>{C?v():_()},{immediate:!0}),i.watch(l,()=>{s.value&&p.value&&w()},{immediate:!0}),i3(()=>{y()}),{isSupported:d,stream:p,start:b,stop:y,restart:w,constraints:l,enabled:o,autoSwitch:s}}function dJe(e={}){const{window:t=hl,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:l=!0,type:u="inner"}=e,d=i.ref(n),p=i.ref(o),h=()=>{t&&(u==="outer"?(d.value=t.outerWidth,p.value=t.outerHeight):l?(d.value=t.innerWidth,p.value=t.innerHeight):(d.value=t.document.documentElement.clientWidth,p.value=t.document.documentElement.clientHeight))};if(h(),Lne(h),Zi("resize",h,{passive:!0}),s){const v=eJe("(orientation: portrait)");i.watch(v,()=>h())}return{width:d,height:p}}const Ey=i.ref(1);function fJe(e="code",t=!0){const n=i.ref();let o=[],s={};const l=rJe(),u=i.watch(Ey,(_,y)=>{_>y?h(y):p(_)}),d=i.watch(l,_=>{_==="hidden"&&(o=[])});function p(_){h();const y=FM(w=>{o.push(w[e]),v(w)},{dedupe:!0,eventName:"keydown"}),b=FM(w=>{o=o.filter(C=>C!==w[e])},{dedupe:!0,eventName:"keyup"});$t.set(s,_??Ey.value,{onKeydown:y,onKeyup:b})}function h(_=-1){var w;if(o=[],_===-1){(w=Object.values(s))==null||w.forEach(C=>{var T,I;typeof C.onKeydown=="function"&&((T=C==null?void 0:C.onKeydown)==null||T.call(C)),typeof C.onKeyup=="function"&&((I=C==null?void 0:C.onKeyup)==null||I.call(C))}),s={};return}const{onKeydown:y,onKeyup:b}=$t.get(s,_,{});typeof y=="function"&&(y==null||y()),typeof b=="function"&&(b==null||b()),delete s[_],u(),d()}function v(_){var w,C,T,I,D,k;const y=(w=n.value)==null?void 0:w.querySelectorAll("[shortcut]");if(!y)return;let b;for(let O in y)if((((C=y[O])==null?void 0:C.getAttribute)&&((T=y[O])==null?void 0:T.getAttribute("shortcut"))||"")===String(o)){b=y[O];break}if(!(!b||b!=null&&b.disabled||b!=null&&b.readOnly||(I=b==null?void 0:b.className)!=null&&I.includes("disabled"))){if(_.preventDefault(),(D=b==null?void 0:b.className)!=null&&D.includes("el-select")){if(b.querySelector(".is-disabled"))return;(k=b.querySelector("input"))==null||k.click();return}if((b==null?void 0:b.tagName)==="TEXTAREA"){typeof(b==null?void 0:b.focus)=="function"&&(b==null||b.focus()),typeof(b==null?void 0:b.click)=="function"&&(b==null||b.click());return}typeof(b==null?void 0:b.click)=="function"&&(b==null||b.click())}}return i.onMounted(()=>{t&&p()}),i.onBeforeUnmount(()=>{h()}),i.onDeactivated(()=>{o=[]}),{bcBoxRef:n,start:p,end:h}}let $M,Bne;function Fne(e,t,n){var b;const o=Rs.value;Rs.value="";let s,l=()=>{};const u={...n.slots,title:((b=n.slots)==null?void 0:b.title)||(()=>n.title),default:()=>i.h(FXe,{onSuccess:_,showFooter:n.showFooter,closeLoading:n.closeLoading,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText},{default:()=>i.h(e,{...t,onVnodeMounted:v,onReady:y,close:h})})},d=i.h(n2,Object.assign({},Bne,{...$t.omit(n,["success"]),className:"custom-popup ".concat((n==null?void 0:n.className)||""),modelValue:!0,onHide(w){s(),typeof(n==null?void 0:n.onHide)=="function"&&n.onHide(w)},slots:u}));$M&&(d.appContext=$M);function p(){Ey.value++;const w=document.createDocumentFragment();return i.render(d,w),document.body.appendChild(w),setTimeout(()=>{if(!$t.isEmpty(n==null?void 0:n.position)){const C=n.position;if(/%/.test(C==null?void 0:C.top)||/%/.test(C==null?void 0:C.left)){/%/.test(C==null?void 0:C.top)&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${C.top}`),/%/.test(C==null?void 0:C.left)&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${C.left}`);return}(C==null?void 0:C.top)>-1&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${C.top}px`),(C==null?void 0:C.left)>-1&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.left=`${C.left}px`)}},100),()=>{Ey.value--,Rs.value=o,i.render(null,w)}}s=p(),i.watch(()=>{var w;return(w=Z7.value)==null?void 0:w.value.path},()=>{s()});async function h(w){s(),typeof n.success=="function"&&n.success({type:w,data:w})}function v(w){var C;l=(C=w.component.exposed)==null?void 0:C.getData}async function _(w){const C=await l();typeof n.success=="function"&&n.success({type:w,data:C,close:s})}function y(w){typeof n.onReady=="function"&&n.onReady(w)}return s}const hJe={install(e,t){$M=e._context,Bne=t}};function pJe({option:e,row:t}){return t.field1===Number(e.data)}const mJe=(e,t)=>{const n={},o=(t==null?void 0:t.reduce((s,l)=>(s[l.data.field]=!!l.data.formatAmount,$t.set(n,l.data.field,!!l.data.formatFooter),s),{}))||{};return[e.columns.map((s,l)=>{if(l===0)return"合计";if(!$t.isEmpty(e.data,"0.customTotal")){const u=$t.get(e.data,`0.customTotal.${s.field}`,"");return($t.get(o,s.field)||$t.get(n,s.field))&&u!==""?B7(u):u}return""})]};function vJe(e){console.debug("params.$table.getData()",e.$table.getData())}function gJe(e,t){console.debug("form =>> 表单单击",e,t)}const UM={filterAgeMethod:pJe,footerMethod:mJe,cellDetailMethod:vJe,formBtnMethod:gJe},Rs=i.ref(""),zM=i.ref({}),Ds=i.ref({}),zg=i.ref(!1),zc=i.ref({}),$ne=i.ref({}),_Je=i.ref({}),yJe=i.ref(!0),Une=i.ref({}),bJe=["checkbox","radio","expand","seq","html"],K8="system_params",zT="custome_field_",X8="query_field_",iV="_REGEXP_",zne="force_update_list",Hne={},xJe=["hs-select","bc-tree-search","hs-tree-select","hs-radio","hs-checkbox","hs-upload","hs-date-picker"],EJe="Home,PrevJump,PrevPage,JumpNumber,NextPage,NextJump,End,Sizes,FullJump,Total".split(","),k4=(e,t)=>e.isSimulate&&!e.requestUrl||e.isGetCanche?Xne(e,t):Pi(t);function oV(e){return Une.value[e.uniqueId]?!e.isShow||!e.fieldShow?!1:e.userFieldShow:!0}function wJe(e){return JSON.stringify(e,function(t,n){return n instanceof RegExp?`${iV}${n.toString()}`:n})}function Ip(e){const t=/method=/,n=/functionBody=/,o=/string=/;function s(l){for(let u in l){if(l[`${u}_1`])l[u]=UM[l[`${u}_1`]];else if(t.test(l[u])&&l[u].split("=")[1]){const d=l[u].replace(t,"");l[`${u}_1`]=d,l[u]=UM[d]}if(l[`${u}_2`])l[u]=new Function("return "+l[`${u}_2`])();else if(n.test(l[u])&&l[u].split("=")[1]){const d=l[u].replace(n,"");l[`${u}_2`]=d,l[u]=new Function("return "+d)()}if(o.test(l[u]))if(l[u].split("=")[1]){const d=l[u].replace(o,"");l[u]=new Function("return "+d)()}else l[u]=[];if(typeof l[u]=="string"&&l[u].startsWith(iV)){const d=l[u].slice(9).replace(/\/$/,"");l[u]=new RegExp(d)}u==="formatAmount"&&l[u]&&$t.set(l,"formatter",function(d){var p,h;return B7((h=d==null?void 0:d.row)==null?void 0:h[(p=d==null?void 0:d.column)==null?void 0:p.field])}),$t.isObject(l[u])&&!$t.isEmpty(l[u])&&s(l[u]),$t.isEmpty($t.get(l,`${u}.children`))||s($t.get(l,`${u}.children`))}}return s(e),e}function Wne(e){return e.groupMark?(e.el2=e.el,e.groupField=zT+e.groupMark,"bc-group"):jne(e.el)}function jne(e){return{"hs-select":"bc-select","hs-tree-select":"bc-tree-select","hs-radio":"bc-radio","hs-checkbox":"bc-checkbox","hs-upload":"bc-upload"}[e]||e}async function Gne(e){if(!e.form)return Promise.resolve({});const t=e.form,n=t==null?void 0:t.formConfig.map(l=>{const u=Ip(l.data.elData);return l.data.elData={...u==null?void 0:u.attrs,...$t.omit(u,"attrs")},l.data.baseData.el=Wne(l.data.baseData),l}),o=$t.omit(Ip(e.form.baseData),["inline","gutter","justify","align"]),s=$t.cloneDeep($t.get(zc.value,`${e==null?void 0:e.config_unique_id}`));return zg.value&&s&&(e!=null&&e.form)&&(e.form.formData=$t.cloneDeep(s)),{id:e.form.id,baseData:o,formConfig:n,formData:e.form.formData}}function SJe(e){return Promise.all(e.tables.map(t=>CJe(t,e)))}async function CJe(e,t){var p,h,v,_,y,b,w,C;const n=$t.cloneDeep(e);if(n.baseData=Ip($t.omit(n.baseData,"data")),n.baseData.mid=t.mid,n.baseData.config_unique_id=t.config_unique_id,n.baseData.is_apply_page){const T=await Mr.get(K8),I=n.baseData.uuid?`${n.baseData.uuid}${n.baseData.id}`:n.baseData.id,D=$t.get(T,`_user_pageSize.${I}`,T==null?void 0:T._sys_pageSize);n.baseData.table_page_data.pageSize=Number(D??((p=n.baseData.table_page_data)==null?void 0:p.pageSize)??20),$t.isEmpty((h=n.baseData.table_page_data)==null?void 0:h.layouts)&&(n.baseData.table_page_data.layouts=EJe),$t.isEmpty(T==null?void 0:T._sys_pageSize_s)||(n.baseData.table_page_data.pageSizes=T._sys_pageSize_s)}n.tableConfig=n.tableConfig.map(T=>($t.isEmpty(T==null?void 0:T.children)?T.data=Ip(T.data):T.children=Ip(T.children),T));let o={};const s=$t.get($ne.value,`query.${n.id}`)||[],l=$t.get(zc.value,`${(v=n==null?void 0:n.baseData)==null?void 0:v.config_unique_id}`);zg.value&&((y=(_=t==null?void 0:t.form)==null?void 0:_.baseData)!=null&&y.isShowQuerySearch)&&l?s.forEach(T=>{o[T]=l[T]}):o=$t.cloneDeep((b=t==null?void 0:t.form)==null?void 0:b.formData);const u=await aV(n.baseData,o,(C=(w=t==null?void 0:t.form)==null?void 0:w.baseData)==null?void 0:C.isShowQuerySearch),d=T=>{var I;return(I=T.treeConfig)!=null&&I.transform?delete T.stripe:delete T.treeConfig,$t.has(T==null?void 0:T.rowConfig,"height")&&($t.set(T,"cellConfig.height",$t.get(T,"rowConfig.height")),$t.unset(T,"rowConfig.height")),T};return{id:n.id,baseData:d(n.baseData),tableConfig:n.tableConfig,tableData:u}}async function aV(e,t,n=!1){let o=t&&$t.cloneDeep(t);if(typeof zM.value[e.id]=="function"){const l=await zM.value[e.id](o,e);$t.isEmpty(l)?n||(o=zc.value[e.config_unique_id]):o=l}const s=await qne(e,o,n);if(!e.isSimulate&&!e.requestUrl){console.log("未配置接口,不请求数据");const l=$t.get(Hne,e.id,[]);return e.is_apply_page&&(e.table_page_data.total=l.length),l}return e.isCloseInitData&&zg.value&&(e.isCloseInitData=!1),e.isCloseInitData&&!zg.value?(e.isCloseInitData=!1,[]):(e.loading=!0,e.isSplitInterface?k4(e,{...s,params:{...s.params,url_type:"data"}}).then(l=>{var u,d;if(e.is_apply_page){const p=((u=l.data)==null?void 0:u.pageList)??((d=l.data)==null?void 0:d.customPageList)??[];return typeof Ds.value[e.id]=="function"?Ds.value[e.id](p):p}else{const p=l.data||[];return typeof Ds.value[e.id]=="function"?Ds.value[e.id](p):p}}).finally(()=>{e.loading=!1}):e.isRemoteTotal?Promise.all([k4(e,{...s,params:{...s.params,url_type:"total"}}),k4(e,{...s,params:{...s.params,url_type:"data"}})]).then(([l,u])=>{var p,h,v;let d=((p=l==null?void 0:l.data)==null?void 0:p.customTotal)||{};if(e.is_apply_page){const y=(((h=u.data)==null?void 0:h.pageList)??((v=u.data)==null?void 0:v.customPageList)??[]).map(b=>Object.assign(b,{customTotal:d}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](y):y}else{const y=((u==null?void 0:u.data)||[]).map(b=>Object.assign(b,{customTotal:d}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](y):y}}).finally(()=>{e.loading=!1}):k4(e,s).then(l=>{var d,p,h;const u=((d=l==null?void 0:l.data)==null?void 0:d.customTotal)||{};if(e.is_apply_page){e.table_page_data.currentPage=l.data.page.currentPage||1,e.table_page_data.pageSize=l.data.page.pageSize,e.table_page_data.total=l.data.page.totalItem;const _=(((p=l.data)==null?void 0:p.pageList)??((h=l.data)==null?void 0:h.customPageList)??[]).map(y=>Object.assign(y,{customTotal:u}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](_):_}else{const _=(l.data||[]).map(y=>Object.assign(y,{customTotal:u}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](_):_}}).finally(()=>{e.loading=!1}))}function TJe(e,t,n){const o=n&&$t.cloneDeep(n),s=async(l,u)=>{if(l.baseData.isRemoteTotal||l.baseData.isSplitInterface){const d=await qne(l.baseData,o);return Promise.all([l.baseData.is_apply_page?k4(l.baseData,{...d,params:{...d.params,url_type:"count"}}):Promise.resolve(null)]).then(async p=>{var h,v,_,y,b,w,C,T,I;if(l.baseData.is_apply_page){const[D]=p;l.baseData.table_page_data.currentPage!==((v=(h=D==null?void 0:D.data)==null?void 0:h.page)==null?void 0:v.currentPage)&&(l.baseData.table_page_data.currentPage=((y=(_=D==null?void 0:D.data)==null?void 0:_.page)==null?void 0:y.currentPage)||1,l.tableData=await aV(l.baseData,o,(C=(w=(b=u.value)==null?void 0:b.form)==null?void 0:w.baseData)==null?void 0:C.isShowQuerySearch)),l.baseData.table_page_data.currentPage=((I=(T=D==null?void 0:D.data)==null?void 0:T.page)==null?void 0:I.currentPage)||1,l.baseData.table_page_data.pageSize=D.data.page.pageSize,l.baseData.table_page_data.total=D.data.page.totalItem}return p})}};return t?Promise.all(e.value.tables.filter(l=>l.id===t).map(l=>s(l,e))):Promise.all(e.value.tables.map(l=>s(l,e)))}async function qne(e,t,n=!1){var b,w;const o=(e==null?void 0:e.proxy)||"scmp-web",s=e.method||"get",l={url:"/"+o+e.requestUrl,method:s},u={currentPage:((b=e.table_page_data)==null?void 0:b.currentPage)||1,pageSize:((w=e.table_page_data)==null?void 0:w.pageSize)||10};$t.set(e,"scrollX.enabled",u.pageSize>=50),$t.set(e,"scrollX.gt",0),$t.set(e,"scrollY.enabled",u.pageSize>=50),$t.set(e,"scrollY.gt",0);const d=Yne(e,t,!0,!0,n),p=e.requestParams?new Function("return "+e.requestParams)():{},h=$t.cloneDeep(Object.assign({},d,e.is_apply_page?u:{},p)),v=Object.keys(h).filter(C=>C.startsWith("_")).map(C=>{const[T,I,D]=C.split("|");return{type:T.slice(1),key:I,code:D,value:h[C]}}),_=Object.keys(h).filter(C=>!C.startsWith("_")).reduce((C,T)=>($t.set(C,T,h[T]),C),{}),y=v.length>0?Object.assign({qry_json_data:JSON.stringify(v)},_):_;return s==="get"?l.params=y:l.data=y,l}function Yne(e,t,n=!0,o=!0,s=!1){const l=Jne(e.config_unique_id);s&&t&&Object.keys(t).forEach(v=>{zc.value[e.config_unique_id]||(zc.value[e.config_unique_id]={}),zc.value[e.config_unique_id][v]=t[v]});const u=s?t||{}:zc.value[e.config_unique_id]||{},d=$t.cloneDeep(zg.value?Object.assign(l,t||{},u):Object.assign(u,l,t||{}));if($t.isEmpty(d))return{};const p=new RegExp(zT),h=new RegExp(X8);for(let v in d){Array.isArray(d[v])&&(d[v]=String(d[v]));const _=p.test(v),y=h.test(v),b=d[`${X8}${e.id}`];if(y&&b&&o){const C=Object.keys(b).reduce((T,I)=>(b[I]&&(typeof b[I]=="string"?T[I]=b[I].trim():T[I]=b[I]),T),{});Object.assign(d,C)}(_||y)&&delete d[v],(typeof d[v]=="string"&&d[v]===""||d[v]===void 0)&&n&&delete d[v]}return d}async function IJe(e){const t=$t.cloneDeep(e);if(t.preParsing)return t;const n=await Gne(t),o=(await SJe(t)).filter(Boolean);return u2.value==!0&&Cne(o),{...t,form:n,tables:o}}function kJe(e){var l;const t=$t.cloneDeep(e);if(t.preParsing)return t;const n=Ip(t.data),o=Kne(t);for(let u in n)$t.isEmpty(n[u])||$t.set(n,`${u}.${zne}`,o);const s=((l=t.form)==null?void 0:l.map(u=>(u.config=Ip(u.config),u)))||[];return u2.value==!0&&console.debug(Sne(t)),{...t,data:n,form:s}}function Kne(e){var t,n,o,s;return((s=(o=(n=(t=e==null?void 0:e.form)==null?void 0:t.filter(l=>l.formItemType==="form"))==null?void 0:n.map(l=>l.config.map(d=>d.config.filter(p=>oV({...p.baseData,uniqueId:e.config_unique_id})).map(p=>p.baseData.prop).toString())))==null?void 0:o.flat(2))==null?void 0:s.filter(Boolean))||[]}function AJe({mid:e,id:t,uid:n,tableId:o,uuid:s,data:l,pageSize:u,is_apply_page:d}){const p=s?`cache_${o}_${s}`:`cache_${o}`;return tV({mid:e,id:t,uid:n},$t.cloneDeep(l),p).then(()=>{const h=Math.ceil(l.length/u);return{currentPage:h,totalPage:l.length,data:d?l.slice((h-1)*u,h*u):l,currentData:d?l.slice(0,u):l}})}async function Xne(e,t){const n=e.uuid,o=n?`cache_${e.id}_${n}`:`cache_${e.id}`,s=e.mid||Qo().mid;return eV({mid:s,id:e.config_unique_id},o).then(l=>{if(!t)return l||[];let u=l||[];const d=u.length,p=t.method.toLocaleLowerCase()==="get"?"params":"data";let h=t[p].currentPage||1,v=t[p].pageSize;const _=(b,w,C)=>{const T=(I,D)=>I[w]<D[w]?C==="asc"?-1:1:I[w]>D[w]?C==="asc"?1:-1:0;return b.sort(T)};if($t.get(t,`${p}.query_order_by`)){const[b,w]=$t.get(t,`${p}.query_order_by`).split(" ");u=_(u,b,w)}return e.is_apply_page?{code:1,data:{customPageList:u.slice((h-1)*v,h*v),page:{currentPage:h,pageSize:v,totalItem:d}}}:{code:1,data:u}})}function DJe(e,t){var u,d,p;const n=t||$t.omit((u=e==null?void 0:e.form)==null?void 0:u.formData,["currentPage","pageSize"]),o=((p=(d=e==null?void 0:e.form)==null?void 0:d.formConfig)==null?void 0:p.reduce((h,v)=>(oV({...v.data.baseData,uniqueId:e==null?void 0:e.config_unique_id})&&Object.assign(h,{[v.data.baseData.prop]:""}),h),{}))||{};if($t.isEmpty(o))return{};const s=new RegExp(zT),l=new Set(Object.keys(o));return Object.keys(n).forEach(h=>{s.test(h)?n[h].some(v=>l.has(v))&&n[h].map(v=>{Object.assign(o,{[v]:n[v]})}):Reflect.has(o,h)&&(o[h]=n[h])}),o}function Jne(e){const t=new RegExp(X8),n=$t.get(zc.value,e,{});return Object.keys(n).reduce((o,s)=>(t.test(s)&&Object.assign(o,{[s]:$t.get(n,s,{})}),o),{})}class To{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,n=!1){return this.onePassHasher.start().appendStr(t).end(n)}static hashAsciiStr(t,n=!1){return this.onePassHasher.start().appendAsciiStr(t).end(n)}static _hex(t){const n=To.hexChars,o=To.hexOut;let s,l,u,d;for(d=0;d<4;d+=1)for(l=d*8,s=t[d],u=0;u<8;u+=2)o[l+1+u]=n.charAt(s&15),s>>>=4,o[l+0+u]=n.charAt(s&15),s>>>=4;return o.join("")}static _md5cycle(t,n){let o=t[0],s=t[1],l=t[2],u=t[3];o+=(s&l|~s&u)+n[0]-680876936|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[1]-389564586|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[2]+606105819|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[3]-1044525330|0,s=(s<<22|s>>>10)+l|0,o+=(s&l|~s&u)+n[4]-176418897|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[5]+1200080426|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[6]-1473231341|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[7]-45705983|0,s=(s<<22|s>>>10)+l|0,o+=(s&l|~s&u)+n[8]+1770035416|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[9]-1958414417|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[10]-42063|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[11]-1990404162|0,s=(s<<22|s>>>10)+l|0,o+=(s&l|~s&u)+n[12]+1804603682|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[13]-40341101|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[14]-1502002290|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[15]+1236535329|0,s=(s<<22|s>>>10)+l|0,o+=(s&u|l&~u)+n[1]-165796510|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[6]-1069501632|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[11]+643717713|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[0]-373897302|0,s=(s<<20|s>>>12)+l|0,o+=(s&u|l&~u)+n[5]-701558691|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[10]+38016083|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[15]-660478335|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[4]-405537848|0,s=(s<<20|s>>>12)+l|0,o+=(s&u|l&~u)+n[9]+568446438|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[14]-1019803690|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[3]-187363961|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[8]+1163531501|0,s=(s<<20|s>>>12)+l|0,o+=(s&u|l&~u)+n[13]-1444681467|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[2]-51403784|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[7]+1735328473|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[12]-1926607734|0,s=(s<<20|s>>>12)+l|0,o+=(s^l^u)+n[5]-378558|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[8]-2022574463|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[11]+1839030562|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[14]-35309556|0,s=(s<<23|s>>>9)+l|0,o+=(s^l^u)+n[1]-1530992060|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[4]+1272893353|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[7]-155497632|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[10]-1094730640|0,s=(s<<23|s>>>9)+l|0,o+=(s^l^u)+n[13]+681279174|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[0]-358537222|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[3]-722521979|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[6]+76029189|0,s=(s<<23|s>>>9)+l|0,o+=(s^l^u)+n[9]-640364487|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[12]-421815835|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[15]+530742520|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[2]-995338651|0,s=(s<<23|s>>>9)+l|0,o+=(l^(s|~u))+n[0]-198630844|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[7]+1126891415|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[14]-1416354905|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[5]-57434055|0,s=(s<<21|s>>>11)+l|0,o+=(l^(s|~u))+n[12]+1700485571|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[3]-1894986606|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[10]-1051523|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[1]-2054922799|0,s=(s<<21|s>>>11)+l|0,o+=(l^(s|~u))+n[8]+1873313359|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[15]-30611744|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[6]-1560198380|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[13]+1309151649|0,s=(s<<21|s>>>11)+l|0,o+=(l^(s|~u))+n[4]-145523070|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[11]-1120210379|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[2]+718787259|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[9]-343485551|0,s=(s<<21|s>>>11)+l|0,t[0]=o+t[0]|0,t[1]=s+t[1]|0,t[2]=l+t[2]|0,t[3]=u+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(To.stateIdentity),this}appendStr(t){const n=this._buffer8,o=this._buffer32;let s=this._bufferLength,l,u;for(u=0;u<t.length;u+=1){if(l=t.charCodeAt(u),l<128)n[s++]=l;else if(l<2048)n[s++]=(l>>>6)+192,n[s++]=l&63|128;else if(l<55296||l>56319)n[s++]=(l>>>12)+224,n[s++]=l>>>6&63|128,n[s++]=l&63|128;else{if(l=(l-55296)*1024+(t.charCodeAt(++u)-56320)+65536,l>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[s++]=(l>>>18)+240,n[s++]=l>>>12&63|128,n[s++]=l>>>6&63|128,n[s++]=l&63|128}s>=64&&(this._dataLength+=64,To._md5cycle(this._state,o),s-=64,o[0]=o[16])}return this._bufferLength=s,this}appendAsciiStr(t){const n=this._buffer8,o=this._buffer32;let s=this._bufferLength,l,u=0;for(;;){for(l=Math.min(t.length-u,64-s);l--;)n[s++]=t.charCodeAt(u++);if(s<64)break;this._dataLength+=64,To._md5cycle(this._state,o),s=0}return this._bufferLength=s,this}appendByteArray(t){const n=this._buffer8,o=this._buffer32;let s=this._bufferLength,l,u=0;for(;;){for(l=Math.min(t.length-u,64-s);l--;)n[s++]=t[u++];if(s<64)break;this._dataLength+=64,To._md5cycle(this._state,o),s=0}return this._bufferLength=s,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const n=t.buffer,o=t.state,s=this._state;let l;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],l=0;l<n.length;l+=1)this._buffer8[l]=n.charCodeAt(l)}end(t=!1){const n=this._bufferLength,o=this._buffer8,s=this._buffer32,l=(n>>2)+1;this._dataLength+=n;const u=this._dataLength*8;if(o[n]=128,o[n+1]=o[n+2]=o[n+3]=0,s.set(To.buffer32Identity.subarray(l),l),n>55&&(To._md5cycle(this._state,s),s.set(To.buffer32Identity)),u<=4294967295)s[14]=u;else{const d=u.toString(16).match(/(.*?)(.{0,8})$/);if(d===null)return;const p=parseInt(d[2],16),h=parseInt(d[1],16)||0;s[14]=p,s[15]=h}return To._md5cycle(this._state,s),t?this._state:To._hex(this._state)}}To.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]);To.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);To.hexChars="0123456789abcdef";To.hexOut=[];To.onePassHasher=new To;if(To.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");const NJe=i.reactive({rowIndex:{},columnIndex:{}});function RJe(e,t){const n=i.inject("bcTableApi"),o=i.watch(e,l);i.onBeforeUnmount(()=>{o()});async function s(v){var T,I;const _=t.data.tables.find(D=>D.id===e.value);_.baseData.table_page_data.currentPage=v.currentPage,_.baseData.table_page_data.pageSize=v.pageSize;const y=await Mr.get(K8)||{},b=t.data.uuid?`${t.data.uuid}${_.id}`:_.id;y._user_pageSize={...y._user_pageSize,[b]:v.pageSize},await Mr.set(K8,y);const w=$t.cloneDeep(((I=(T=t.data)==null?void 0:T.form)==null?void 0:I.formData)||{}),C=$t.cloneDeep(zc.value[t.data.config_unique_id]);return $t.isEmpty(C)||$t.merge(w,C),n==null?void 0:n.setQueryData(Object.assign(w,{currentPage:v.currentPage,pageSize:v.pageSize})).then(()=>n.search(n.getActiveTab(),n.getQueryData(!1)))}function l(){return i.nextTick().then(()=>{var _;const v=(_=t.data)==null?void 0:_.btns.find(y=>["exportSelect","exportSelectedData"].includes(y.data.key));if(v){const{data:y}=n.getCheckboxRow();v.data.disabled=$t.isEmpty(y)}})}function u(v){const _=n==null?void 0:n.getApi(),y=_==null?void 0:_.getCheckboxRecords();if(!$t.isEmpty(y))n==null||n.setCheckboxRow(y,v.checked);else{const b=t.data.tables.find(w=>w.id===e.value).tableData;n==null||n.setCheckboxRow(b,v.checked)}l()}function d(v){n==null||n.setCheckboxRow([v.row],v.checked),l()}function p(v,_){return eV({mid:t.data.mid,id:t.data.config_unique_id,uid:t.data.uid},t.data.batch_id?`batch_${t.data.batch_id}`:"").then(async y=>{const b=t.data.batch_id?`table.${t.data.config_unique_id}`:"table",{tableConfig:w}=$t.get(y,b).tables.find(I=>I.id===_),C=w.find(I=>I.data.field===v.column.field);C&&(C.data.width=v.column.resizeWidth.toString()),await tV({mid:t.data.mid,id:t.data.config_unique_id,uid:t.data.uid},y,t.data.batch_id?`batch_${t.data.batch_id}`:"");const T=w.reduce((I,D)=>(I[D.data.field]=D.data.width,I),{});await xne({table_id:_,uid:t.data.uid},T)})}function h(){setTimeout(()=>{n==null||n.search(n.getActiveTab(),n==null?void 0:n.getQueryData(!1))},16)}return{onPageChange:s,onTabClick:h,onCheckboxAll:u,onCheckboxChange:d,onResizableChange:p,onCheckboxSelect:l}}/*!
112
+ `}),console.debug(n)}function sXe(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(s){s(n)}),(o=e.get("*"))&&o.slice().map(function(s){s(t,n)})}}}const h8=sXe();function lXe(){const e=i.getCurrentScope(),t=new Map;let n={};function o(p,h){t.set(p,h),h8.on(p,h),n[p]&&(n[p].forEach(v=>h(v)),delete n[p])}function s(p,h){const v=(..._)=>{u(p,v),h(..._)};o(p,v)}function l(p,h){n[p]||(n[p]=[]),n[p].push(h),h8.emit(p,h)}function u(p,h){t.delete(p),h8.off(p,h)}function d(){for(const[p,h]of t.entries())u(p,h);n={}}return e&&i.onScopeDispose(d),{on:o,once:s,emit:l,off:u,clear:d}}function nV(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function cXe(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function uXe(e){let t=nV(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function dXe(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function fXe(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function hXe(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function pXe(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function mXe(e){let t=nV(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function vXe(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function gXe(e,t="仟佰拾亿仟佰拾万仟佰拾元角分",n=""){e+="00";let o=e.indexOf(".");o>=0&&(e=e.substring(0,o)+e.substr(o+1,2)),t=t.substr(t.length-e.length);for(let s=0;s<e.length;s++)n+="零壹贰叁肆伍陆柒捌玖".substr(e.substr(s,1),1)+t.substr(s,1);return n=n.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元"),n}function _Xe(e){return!!/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/.test(e)}function yXe(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function bXe(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function xXe(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function EXe(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function wXe(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="强"),t}function SXe(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function CXe(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function TXe(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function IXe(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function kXe(e){return!!/^[1-9][0-9]{5}$/.test(e)}function Tne(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function AXe(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}const DXe=i.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./bcIcon-BnzU9Y20.cjs")));function Ine(e){const t=n6e;for(const n in t)e.component(`ele-${t[n].name}`,t[n]);e.component("SvgIcon",DXe)}function kne(e){document.title=e}function Ane(e){let t="";const{query:n,params:o,meta:s}=e;return n!=null&&n.tagsViewName||o!=null&&o.tagsViewName?t=(n==null?void 0:n.tagsViewName)||(o==null?void 0:o.tagsViewName):t=s.title,t}const Dne=(e,t)=>{const n=new IntersectionObserver(o=>{o.forEach(s=>{if(s.isIntersecting){const{img:l,key:u}=s.target.dataset;s.target.src=l,s.target.onload=()=>{n.unobserve(s.target),t[u].loading=!1}}})});i.nextTick(()=>{document.querySelectorAll(e).forEach(o=>n.observe(o))})},Nne=()=>"",Rne=$t.cloneDeep;function One(){return!!navigator.userAgent.match(/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i)}function Mne(e){const t=[];for(const n in e){const o=[];for(const l in e[n])o.push(e[n][l]);o.filter(l=>l==="").length!==o.length&&t.push(e[n])}return t}function Pne(e){var o;const{origin:t,pathname:n}=window.location;if(e.link&&!((o=e==null?void 0:e.meta)!=null&&o.isIframe))return Mr.get("userInfo").then(s=>{var u;const l=yne(`${location.origin}${e.link}`,{isIframe:(u=e.meta)==null?void 0:u.isIframe,jti:s.jti});window.open(l,s.jti)});Tne(e.link)?window.open(e.link):window.open(`${t}${n}`)}const NXe={elSvg:e=>{Ine(e)},useTitle:e=>{kne(e)},setTagsViewNameI18n(e){return Ane(e)},lazyImg:(e,t)=>{Dne(e,t)},globalComponentSize:()=>Nne(),deepClone:e=>Rne(e),isMobile:()=>One(),handleEmpty:e=>Mne(e),handleOpenLink:e=>{Pne(e)}},vq={success(e){return Sa({message:e,type:"success"})},warning(e){return Sa({message:e,type:"warning"})},info(e){return Sa({message:e,type:"info"})},error(e){return Sa({message:e,type:"error"})}},Vc=new Proxy(Sa,{get(e,t){return t in vq?vq[t]:e[t]}}),RXe={install(e){e.config.globalProperties.$message=Vc}},ny={alert(e,t,n){const o=Rs.value;return Rs.value="",lg.alert(e,t,{...n,callback:s=>{typeof(n==null?void 0:n.callback)=="function"&&(Rs.value=o,n.callback(s,s))}})},confirm(e,t,n){const o=Rs.value;return Rs.value="",lg.confirm(e,t,n).finally(()=>{Rs.value=o})},prompt(e,t,n){const o=Rs.value;return Rs.value="",lg.prompt(e,t,n).finally(()=>{Rs.value=o})}},Y8=new Proxy(lg,{get(e,t){return t in ny?ny[t]:e[t]}}),OXe={install(e){e.config.globalProperties.$MessageBox=Y8,e.config.globalProperties.$messageBox=Y8,e.config.globalProperties.$confirm=ny.confirm,e.config.globalProperties.$alert=ny.alert,e.config.globalProperties.$prompt=ny.prompt}},gq={success(e){return S4({...e,type:"success"})},warning(e){return S4({...e,type:"warning"})},info(e){return S4({...e,type:"info"})},error(e){return S4({...e,type:"error"})}},Vne=new Proxy(S4,{get(e,t){return t in gq?gq[t]:e[t]}}),MXe={install(e){e.config.globalProperties.$notification=Vne}},PXe={class:"popup-wrapper"},VXe={class:"content"},LXe={key:0},BXe=i.defineComponent({__name:"showPopup",props:{closeLoading:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!0},confirmButtonText:{type:String,default:"确定"},cancelButtonText:{type:String,default:"取消"}},emits:["success"],setup(e){const t=i.ref(0),n=i.computed({get:()=>t.value>0,set:s=>{t.value+=s,t.value=Math.max(0,t.value)}});function o(s){n.value=s?1:-1}return i.provide("popupApi",{setLoading:o}),(s,l)=>{const u=i.resolveComponent("hs-button"),d=i.resolveDirective("loading");return i.withDirectives((i.openBlock(),i.createElementBlock("div",PXe,[i.createElementVNode("div",VXe,[i.createVNode(i.unref(zX),{locale:i.unref(aJ)},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3},8,["locale"])]),e.showFooter?(i.openBlock(),i.createElementBlock("footer",LXe,[i.createVNode(u,{size:"default",onClick:l[0]||(l[0]=p=>s.$emit("success","cancel"))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.cancelButtonText),1)]),_:1}),i.createVNode(u,{type:"primary",size:"default",onClick:l[1]||(l[1]=p=>s.$emit("success","confirm"))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.confirmButtonText),1)]),_:1})])):i.createCommentVNode("",!0)])),[[d,!e.closeLoading&&n.value]])}}}),FXe=p7(BXe,[["__scopeId","data-v-304dce2d"]]);function i3(e){return i.getCurrentScope()?(i.onScopeDispose(e),!0):!1}function dd(e){return typeof e=="function"?e():i.unref(e)}const UT=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $Xe=e=>e!=null,UXe=Object.prototype.toString,zXe=e=>UXe.call(e)==="[object Object]",p8=()=>{},HXe=WXe();function WXe(){var e,t;return UT&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function jXe(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const o=t;t=void 0,o&&await o},n}function GXe(e){return i.getCurrentInstance()}function Lne(e,t=!0,n){GXe()?i.onMounted(e,n):t?e():i.nextTick(e)}function qXe(e,t,n){const o=i.watch(e,(...s)=>(i.nextTick(()=>o()),t(...s)),n);return o}const hl=UT?window:void 0,YXe=UT?window.document:void 0,rV=UT?window.navigator:void 0;function cs(e){var t;const n=dd(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Zi(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=hl):[t,n,o,s]=e,!t)return p8;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const l=[],u=()=>{l.forEach(v=>v()),l.length=0},d=(v,_,y,b)=>(v.addEventListener(_,y,b),()=>v.removeEventListener(_,y,b)),p=i.watch(()=>[cs(t),dd(s)],([v,_])=>{if(u(),!v)return;const y=zXe(_)?{..._}:_;l.push(...n.flatMap(b=>o.map(w=>d(v,b,w,y))))},{immediate:!0,flush:"post"}),h=()=>{p(),u()};return i3(h),h}let _q=!1;function KXe(e,t,n={}){const{window:o=hl,ignore:s=[],capture:l=!0,detectIframe:u=!1}=n;if(!o)return p8;HXe&&!_q&&(_q=!0,Array.from(o.document.body.children).forEach(C=>C.addEventListener("click",p8)),o.document.documentElement.addEventListener("click",p8));let d=!0;const p=C=>dd(s).some(T=>{if(typeof T=="string")return Array.from(o.document.querySelectorAll(T)).some(I=>I===C.target||C.composedPath().includes(I));{const I=cs(T);return I&&(C.target===I||C.composedPath().includes(I))}});function h(C){const T=dd(C);return T&&T.$.subTree.shapeFlag===16}function v(C,T){const I=dd(C),D=I.$.subTree&&I.$.subTree.children;return D==null||!Array.isArray(D)?!1:D.some(k=>k.el===T.target||T.composedPath().includes(k.el))}const _=C=>{const T=cs(e);if(C.target!=null&&!(!(T instanceof Element)&&h(e)&&v(e,C))&&!(!T||T===C.target||C.composedPath().includes(T))){if(C.detail===0&&(d=!p(C)),!d){d=!0;return}t(C)}};let y=!1;const b=[Zi(o,"click",C=>{y||(y=!0,setTimeout(()=>{y=!1},0),_(C))},{passive:!0,capture:l}),Zi(o,"pointerdown",C=>{const T=cs(e);d=!p(C)&&!!(T&&!C.composedPath().includes(T))},{passive:!0}),u&&Zi(o,"blur",C=>{setTimeout(()=>{var T;const I=cs(e);((T=o.document.activeElement)==null?void 0:T.tagName)==="IFRAME"&&!(I!=null&&I.contains(o.document.activeElement))&&t(C)},0)})].filter(Boolean);return()=>b.forEach(C=>C())}function XXe(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function FM(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=hl,eventName:l="keydown",passive:u=!1,dedupe:d=!1}=o,p=XXe(t);return Zi(s,l,v=>{v.repeat&&dd(d)||p(v)&&n(v)},u)}function JXe(){const e=i.ref(!1),t=i.getCurrentInstance();return t&&i.onMounted(()=>{e.value=!0},t),e}function d2(e){const t=JXe();return i.computed(()=>(t.value,!!e()))}function ZXe(e,t,n={}){const{window:o=hl,...s}=n;let l;const u=d2(()=>o&&"MutationObserver"in o),d=()=>{l&&(l.disconnect(),l=void 0)},p=i.computed(()=>{const y=dd(e),b=(Array.isArray(y)?y:[y]).map(cs).filter($Xe);return new Set(b)}),h=i.watch(()=>p.value,y=>{d(),u.value&&y.size&&(l=new MutationObserver(t),y.forEach(b=>l.observe(b,s)))},{immediate:!0,flush:"post"}),v=()=>l==null?void 0:l.takeRecords(),_=()=>{h(),d()};return i3(_),{isSupported:u,stop:_,takeRecords:v}}function QXe(e={}){var t;const{window:n=hl,deep:o=!0,triggerOnRemoval:s=!1}=e,l=(t=e.document)!=null?t:n==null?void 0:n.document,u=()=>{var h;let v=l==null?void 0:l.activeElement;if(o)for(;v!=null&&v.shadowRoot;)v=(h=v==null?void 0:v.shadowRoot)==null?void 0:h.activeElement;return v},d=i.ref(),p=()=>{d.value=u()};return n&&(Zi(n,"blur",h=>{h.relatedTarget===null&&p()},!0),Zi(n,"focus",p,!0)),s&&ZXe(l,h=>{h.filter(v=>v.removedNodes.length).map(v=>Array.from(v.removedNodes)).flat().forEach(v=>{v===d.value&&p()})},{childList:!0,subtree:!0}),p(),d}function eJe(e,t={}){const{window:n=hl}=t,o=d2(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const l=i.ref(!1),u=h=>{l.value=h.matches},d=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",u):s.removeListener(u))},p=i.watchEffect(()=>{o.value&&(d(),s=n.matchMedia(dd(e)),"addEventListener"in s?s.addEventListener("change",u):s.addListener(u),l.value=s.matches)});return i3(()=>{p(),d(),s=void 0}),l}function tJe(e,t={}){const{controls:n=!1,navigator:o=rV}=t,s=d2(()=>o&&"permissions"in o),l=i.shallowRef(),u={name:e},d=i.shallowRef(),p=()=>{var v,_;d.value=(_=(v=l.value)==null?void 0:v.state)!=null?_:"prompt"};Zi(l,"change",p);const h=jXe(async()=>{if(s.value){if(!l.value)try{l.value=await o.permissions.query(u)}catch{l.value=void 0}finally{p()}if(n)return i.toRaw(l.value)}});return h(),n?{state:d,isSupported:s,query:h}:d}function nJe(e={}){const{navigator:t=rV,requestPermissions:n=!1,constraints:o={audio:!0,video:!0},onUpdated:s}=e,l=i.ref([]),u=i.computed(()=>l.value.filter(w=>w.kind==="videoinput")),d=i.computed(()=>l.value.filter(w=>w.kind==="audioinput")),p=i.computed(()=>l.value.filter(w=>w.kind==="audiooutput")),h=d2(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),v=i.ref(!1);let _;async function y(){h.value&&(l.value=await t.mediaDevices.enumerateDevices(),s==null||s(l.value),_&&(_.getTracks().forEach(w=>w.stop()),_=null))}async function b(){if(!h.value)return!1;if(v.value)return!0;const{state:w,query:C}=tJe("camera",{controls:!0});if(await C(),w.value!=="granted"){let T=!0;try{_=await t.mediaDevices.getUserMedia(o)}catch{_=null,T=!1}y(),v.value=T}else v.value=!0;return v.value}return h.value&&(n&&b(),Zi(t.mediaDevices,"devicechange",y),y()),{devices:l,ensurePermissions:b,permissionGranted:v,videoInputs:u,audioInputs:d,audioOutputs:p,isSupported:h}}function rJe(e={}){const{document:t=YXe}=e;if(!t)return i.ref("visible");const n=i.ref(t.visibilityState);return Zi(t,"visibilitychange",()=>{n.value=t.visibilityState}),n}function iJe(e,t,n={}){const{window:o=hl,...s}=n;let l;const u=d2(()=>o&&"ResizeObserver"in o),d=()=>{l&&(l.disconnect(),l=void 0)},p=i.computed(()=>{const _=dd(e);return Array.isArray(_)?_.map(y=>cs(y)):[cs(_)]}),h=i.watch(p,_=>{if(d(),u.value&&o){l=new ResizeObserver(t);for(const y of _)y&&l.observe(y,s)}},{immediate:!0,flush:"post"}),v=()=>{d(),h()};return i3(v),{isSupported:u,stop:v}}function oJe(e,t={width:0,height:0},n={}){const{window:o=hl,box:s="content-box"}=n,l=i.computed(()=>{var _,y;return(y=(_=cs(e))==null?void 0:_.namespaceURI)==null?void 0:y.includes("svg")}),u=i.ref(t.width),d=i.ref(t.height),{stop:p}=iJe(e,([_])=>{const y=s==="border-box"?_.borderBoxSize:s==="content-box"?_.contentBoxSize:_.devicePixelContentBoxSize;if(o&&l.value){const b=cs(e);if(b){const w=b.getBoundingClientRect();u.value=w.width,d.value=w.height}}else if(y){const b=Array.isArray(y)?y:[y];u.value=b.reduce((w,{inlineSize:C})=>w+C,0),d.value=b.reduce((w,{blockSize:C})=>w+C,0)}else u.value=_.contentRect.width,d.value=_.contentRect.height},n);Lne(()=>{const _=cs(e);_&&(u.value="offsetWidth"in _?_.offsetWidth:t.width,d.value="offsetHeight"in _?_.offsetHeight:t.height)});const h=i.watch(()=>cs(e),_=>{u.value=_?t.width:0,d.value=_?t.height:0});function v(){p(),h()}return{width:u,height:d,stop:v}}const aJe={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function sJe(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:o=!1,initialValue:s={x:0,y:0},window:l=hl,target:u=l,scroll:d=!0,eventFilter:p}=e;let h=null,v=0,_=0;const y=i.ref(s.x),b=i.ref(s.y),w=i.ref(null),C=typeof t=="function"?t:aJe[t],T=V=>{const $=C(V);h=V,$&&([y.value,b.value]=$,w.value="mouse"),l&&(v=l.scrollX,_=l.scrollY)},I=V=>{if(V.touches.length>0){const $=C(V.touches[0]);$&&([y.value,b.value]=$,w.value="touch")}},D=()=>{if(!h||!l)return;const V=C(h);h instanceof MouseEvent&&V&&(y.value=V[0]+l.scrollX-v,b.value=V[1]+l.scrollY-_)},k=()=>{y.value=s.x,b.value=s.y},O=p?V=>p(()=>T(V),{}):V=>T(V),L=p?V=>p(()=>I(V),{}):V=>I(V),P=p?()=>p(()=>D(),{}):()=>D();if(u){const V={passive:!0};Zi(u,["mousemove","dragover"],O,V),n&&t!=="movement"&&(Zi(u,["touchstart","touchmove"],L,V),o&&Zi(u,"touchend",k,V)),d&&t==="page"&&Zi(l,"scroll",P,{passive:!0})}return{x:y,y:b,sourceType:w}}function lJe(e,t={}){const{handleOutside:n=!0,window:o=hl}=t,s=t.type||"page",{x:l,y:u,sourceType:d}=sJe(t),p=i.ref(e??(o==null?void 0:o.document.body)),h=i.ref(0),v=i.ref(0),_=i.ref(0),y=i.ref(0),b=i.ref(0),w=i.ref(0),C=i.ref(!0);let T=()=>{};return o&&(T=i.watch([p,l,u],()=>{const I=cs(p);if(!I||!(I instanceof Element))return;const{left:D,top:k,width:O,height:L}=I.getBoundingClientRect();_.value=D+(s==="page"?o.pageXOffset:0),y.value=k+(s==="page"?o.pageYOffset:0),b.value=L,w.value=O;const P=l.value-_.value,V=u.value-y.value;C.value=O===0||L===0||P<0||V<0||P>O||V>L,(n||!C.value)&&(h.value=P,v.value=V)},{immediate:!0}),Zi(document,"mouseleave",()=>{C.value=!0})),{x:l,y:u,sourceType:d,elementX:h,elementY:v,elementPositionX:_,elementPositionY:y,elementHeight:b,elementWidth:w,isOutside:C,stop:T}}function cJe(e={}){const{touch:t=!0,drag:n=!0,capture:o=!1,initialValue:s=!1,window:l=hl}=e,u=i.ref(s),d=i.ref(null);if(!l)return{pressed:u,sourceType:d};const p=_=>()=>{u.value=!0,d.value=_},h=()=>{u.value=!1,d.value=null},v=i.computed(()=>cs(e.target)||l);return Zi(v,"mousedown",p("mouse"),{passive:!0,capture:o}),Zi(l,"mouseleave",h,{passive:!0,capture:o}),Zi(l,"mouseup",h,{passive:!0,capture:o}),n&&(Zi(v,"dragstart",p("mouse"),{passive:!0,capture:o}),Zi(l,"drop",h,{passive:!0,capture:o}),Zi(l,"dragend",h,{passive:!0,capture:o})),t&&(Zi(v,"touchstart",p("touch"),{passive:!0,capture:o}),Zi(l,"touchend",h,{passive:!0,capture:o}),Zi(l,"touchcancel",h,{passive:!0,capture:o})),{pressed:u,sourceType:d}}function uJe(e={}){var t,n;const o=i.ref((t=e.enabled)!=null?t:!1),s=i.ref((n=e.autoSwitch)!=null?n:!0),l=i.ref(e.constraints),{navigator:u=rV}=e,d=d2(()=>{var C;return(C=u==null?void 0:u.mediaDevices)==null?void 0:C.getUserMedia}),p=i.shallowRef();function h(C){switch(C){case"video":{if(l.value)return l.value.video||!1;break}case"audio":{if(l.value)return l.value.audio||!1;break}}}async function v(){if(!(!d.value||p.value))return p.value=await u.mediaDevices.getUserMedia({video:h("video"),audio:h("audio")}),p.value}function _(){var C;(C=p.value)==null||C.getTracks().forEach(T=>T.stop()),p.value=void 0}function y(){_(),o.value=!1}async function b(){return await v(),p.value&&(o.value=!0),p.value}async function w(){return _(),await b()}return i.watch(o,C=>{C?v():_()},{immediate:!0}),i.watch(l,()=>{s.value&&p.value&&w()},{immediate:!0}),i3(()=>{y()}),{isSupported:d,stream:p,start:b,stop:y,restart:w,constraints:l,enabled:o,autoSwitch:s}}function dJe(e={}){const{window:t=hl,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:l=!0,type:u="inner"}=e,d=i.ref(n),p=i.ref(o),h=()=>{t&&(u==="outer"?(d.value=t.outerWidth,p.value=t.outerHeight):l?(d.value=t.innerWidth,p.value=t.innerHeight):(d.value=t.document.documentElement.clientWidth,p.value=t.document.documentElement.clientHeight))};if(h(),Lne(h),Zi("resize",h,{passive:!0}),s){const v=eJe("(orientation: portrait)");i.watch(v,()=>h())}return{width:d,height:p}}const Ey=i.ref(1);function fJe(e="code",t=!0){const n=i.ref();let o=[],s={};const l=rJe(),u=i.watch(Ey,(_,y)=>{_>y?h(y):p(_)}),d=i.watch(l,_=>{_==="hidden"&&(o=[])});function p(_){h();const y=FM(w=>{o.push(w[e]),v(w)},{dedupe:!0,eventName:"keydown"}),b=FM(w=>{o=o.filter(C=>C!==w[e])},{dedupe:!0,eventName:"keyup"});$t.set(s,_??Ey.value,{onKeydown:y,onKeyup:b})}function h(_=-1){var w;if(o=[],_===-1){(w=Object.values(s))==null||w.forEach(C=>{var T,I;typeof C.onKeydown=="function"&&((T=C==null?void 0:C.onKeydown)==null||T.call(C)),typeof C.onKeyup=="function"&&((I=C==null?void 0:C.onKeyup)==null||I.call(C))}),s={};return}const{onKeydown:y,onKeyup:b}=$t.get(s,_,{});typeof y=="function"&&(y==null||y()),typeof b=="function"&&(b==null||b()),delete s[_],u(),d()}function v(_){var w,C,T,I,D,k;const y=(w=n.value)==null?void 0:w.querySelectorAll("[shortcut]");if(!y)return;let b;for(let O in y)if((((C=y[O])==null?void 0:C.getAttribute)&&((T=y[O])==null?void 0:T.getAttribute("shortcut"))||"")===String(o)){b=y[O];break}if(!(!b||b!=null&&b.disabled||b!=null&&b.readOnly||(I=b==null?void 0:b.className)!=null&&I.includes("disabled"))){if(_.preventDefault(),(D=b==null?void 0:b.className)!=null&&D.includes("el-select")){if(b.querySelector(".is-disabled"))return;(k=b.querySelector("input"))==null||k.click();return}if((b==null?void 0:b.tagName)==="TEXTAREA"){typeof(b==null?void 0:b.focus)=="function"&&(b==null||b.focus()),typeof(b==null?void 0:b.click)=="function"&&(b==null||b.click());return}typeof(b==null?void 0:b.click)=="function"&&(b==null||b.click())}}return i.onMounted(()=>{t&&p()}),i.onBeforeUnmount(()=>{h()}),i.onDeactivated(()=>{o=[]}),{bcBoxRef:n,start:p,end:h}}let $M,Bne;function Fne(e,t,n){var b;const o=Rs.value;Rs.value="";let s,l=()=>{};const u={...n.slots,title:((b=n.slots)==null?void 0:b.title)||(()=>n.title),default:()=>i.h(FXe,{onSuccess:_,showFooter:n.showFooter,closeLoading:n.closeLoading,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText},{default:()=>i.h(e,{...t,onVnodeMounted:v,onReady:y,close:h})})},d=i.h(n2,Object.assign({},Bne,{...$t.omit(n,["success"]),className:"custom-popup ".concat((n==null?void 0:n.className)||""),modelValue:!0,onHide(w){s(),typeof(n==null?void 0:n.onHide)=="function"&&n.onHide(w)},slots:u}));$M&&(d.appContext=$M);function p(){Ey.value++;const w=document.createDocumentFragment();return i.render(d,w),document.body.appendChild(w),setTimeout(()=>{if(!$t.isEmpty(n==null?void 0:n.position)){const C=n.position;if(/%/.test(C==null?void 0:C.top)||/%/.test(C==null?void 0:C.left)){/%/.test(C==null?void 0:C.top)&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${C.top}`),/%/.test(C==null?void 0:C.left)&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${C.left}`);return}(C==null?void 0:C.top)>-1&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${C.top}px`),(C==null?void 0:C.left)>-1&&(d.el.nextSibling.querySelector(".vxe-modal--box").style.left=`${C.left}px`)}},100),()=>{Ey.value--,Rs.value=o,i.render(null,w)}}s=p(),i.watch(()=>{var w;return(w=Z7.value)==null?void 0:w.value.path},()=>{s()});async function h(w){s(),typeof n.success=="function"&&n.success({type:w,data:w})}function v(w){var C;l=(C=w.component.exposed)==null?void 0:C.getData}async function _(w){const C=await l();typeof n.success=="function"&&n.success({type:w,data:C,close:s})}function y(w){typeof n.onReady=="function"&&n.onReady(w)}return s}const hJe={install(e,t){$M=e._context,Bne=t}};function pJe({option:e,row:t}){return t.field1===Number(e.data)}const mJe=(e,t)=>{const n={},o=(t==null?void 0:t.reduce((s,l)=>(s[l.data.field]=!!l.data.formatAmount,$t.set(n,l.data.field,!!l.data.formatFooter),s),{}))||{};return[e.columns.map((s,l)=>{if(l===0)return"合计";if(!$t.isEmpty(e.data,"0.customTotal")){const u=$t.get(e.data,`0.customTotal.${s.field}`,"");return($t.get(o,s.field)||$t.get(n,s.field))&&u!==""?B7(u):u}return""})]};function vJe(e){console.debug("params.$table.getData()",e.$table.getData())}function gJe(e,t){console.debug("form =>> 表单单击",e,t)}const UM={filterAgeMethod:pJe,footerMethod:mJe,cellDetailMethod:vJe,formBtnMethod:gJe},Rs=i.ref(""),zM=i.ref({}),Ds=i.ref({}),zg=i.ref(!1),zc=i.ref({}),$ne=i.ref({}),_Je=i.ref({}),yJe=i.ref(!0),Une=i.ref({}),bJe=["checkbox","radio","expand","seq","html"],K8="system_params",zT="custome_field_",X8="query_field_",xJe="column_field_",iV="_REGEXP_",zne="force_update_list",Hne={},EJe=["hs-select","bc-tree-search","hs-tree-select","hs-radio","hs-checkbox","hs-upload","hs-date-picker"],wJe="Home,PrevJump,PrevPage,JumpNumber,NextPage,NextJump,End,Sizes,FullJump,Total".split(","),k4=(e,t)=>e.isSimulate&&!e.requestUrl||e.isGetCanche?Xne(e,t):Pi(t);function oV(e){return Une.value[e.uniqueId]?!e.isShow||!e.fieldShow?!1:e.userFieldShow:!0}function SJe(e){return JSON.stringify(e,function(t,n){return n instanceof RegExp?`${iV}${n.toString()}`:n})}function Ip(e){const t=/method=/,n=/functionBody=/,o=/string=/;function s(l){for(let u in l){if(l[`${u}_1`])l[u]=UM[l[`${u}_1`]];else if(t.test(l[u])&&l[u].split("=")[1]){const d=l[u].replace(t,"");l[`${u}_1`]=d,l[u]=UM[d]}if(l[`${u}_2`])l[u]=new Function("return "+l[`${u}_2`])();else if(n.test(l[u])&&l[u].split("=")[1]){const d=l[u].replace(n,"");l[`${u}_2`]=d,l[u]=new Function("return "+d)()}if(o.test(l[u]))if(l[u].split("=")[1]){const d=l[u].replace(o,"");l[u]=new Function("return "+d)()}else l[u]=[];if(typeof l[u]=="string"&&l[u].startsWith(iV)){const d=l[u].slice(9).replace(/\/$/,"");l[u]=new RegExp(d)}u==="formatAmount"&&l[u]&&$t.set(l,"formatter",function(d){var p,h;return B7((h=d==null?void 0:d.row)==null?void 0:h[(p=d==null?void 0:d.column)==null?void 0:p.field])}),$t.isObject(l[u])&&!$t.isEmpty(l[u])&&s(l[u]),$t.isEmpty($t.get(l,`${u}.children`))||s($t.get(l,`${u}.children`))}}return s(e),e}function Wne(e){return e.groupMark?(e.el2=e.el,e.groupField=zT+e.groupMark,"bc-group"):jne(e.el)}function jne(e){return{"hs-select":"bc-select","hs-tree-select":"bc-tree-select","hs-radio":"bc-radio","hs-checkbox":"bc-checkbox","hs-upload":"bc-upload"}[e]||e}async function Gne(e){if(!e.form)return Promise.resolve({});const t=e.form,n=t==null?void 0:t.formConfig.map(l=>{const u=Ip(l.data.elData);return l.data.elData={...u==null?void 0:u.attrs,...$t.omit(u,"attrs")},l.data.baseData.el=Wne(l.data.baseData),l}),o=$t.omit(Ip(e.form.baseData),["inline","gutter","justify","align"]),s=$t.cloneDeep($t.get(zc.value,`${e==null?void 0:e.config_unique_id}`));return zg.value&&s&&(e!=null&&e.form)&&(e.form.formData=$t.cloneDeep(s)),{id:e.form.id,baseData:o,formConfig:n,formData:e.form.formData}}function CJe(e){return Promise.all(e.tables.map(t=>TJe(t,e)))}async function TJe(e,t){var p,h,v,_,y,b,w,C;const n=$t.cloneDeep(e);if(n.baseData=Ip($t.omit(n.baseData,"data")),n.baseData.mid=t.mid,n.baseData.config_unique_id=t.config_unique_id,n.baseData.is_apply_page){const T=await Mr.get(K8),I=n.baseData.uuid?`${n.baseData.uuid}${n.baseData.id}`:n.baseData.id,D=$t.get(T,`_user_pageSize.${I}`,T==null?void 0:T._sys_pageSize);n.baseData.table_page_data.pageSize=Number(D??((p=n.baseData.table_page_data)==null?void 0:p.pageSize)??20),$t.isEmpty((h=n.baseData.table_page_data)==null?void 0:h.layouts)&&(n.baseData.table_page_data.layouts=wJe),$t.isEmpty(T==null?void 0:T._sys_pageSize_s)||(n.baseData.table_page_data.pageSizes=T._sys_pageSize_s)}n.tableConfig=n.tableConfig.map(T=>($t.isEmpty(T==null?void 0:T.children)?T.data=Ip(T.data):T.children=Ip(T.children),T));let o={};const s=$t.get($ne.value,`query.${n.id}`)||[],l=$t.get(zc.value,`${(v=n==null?void 0:n.baseData)==null?void 0:v.config_unique_id}`);zg.value&&((y=(_=t==null?void 0:t.form)==null?void 0:_.baseData)!=null&&y.isShowQuerySearch)&&l?s.forEach(T=>{o[T]=l[T]}):o=$t.cloneDeep((b=t==null?void 0:t.form)==null?void 0:b.formData);const u=await aV(n.baseData,o,(C=(w=t==null?void 0:t.form)==null?void 0:w.baseData)==null?void 0:C.isShowQuerySearch),d=T=>{var I;return(I=T.treeConfig)!=null&&I.transform?delete T.stripe:delete T.treeConfig,$t.has(T==null?void 0:T.rowConfig,"height")&&($t.set(T,"cellConfig.height",$t.get(T,"rowConfig.height")),$t.unset(T,"rowConfig.height")),T};return{id:n.id,baseData:d(n.baseData),tableConfig:n.tableConfig,tableData:u}}async function aV(e,t,n=!1){let o=t&&$t.cloneDeep(t);if(typeof zM.value[e.id]=="function"){const l=await zM.value[e.id](o,e);$t.isEmpty(l)?n||(o=zc.value[e.config_unique_id]):o=l}const s=await qne(e,o,n);if(!e.isSimulate&&!e.requestUrl){console.log("未配置接口,不请求数据");const l=$t.get(Hne,e.id,[]);return e.is_apply_page&&(e.table_page_data.total=l.length),l}return e.isCloseInitData&&zg.value&&(e.isCloseInitData=!1),e.isCloseInitData&&!zg.value?(e.isCloseInitData=!1,[]):(e.loading=!0,e.isSplitInterface?k4(e,{...s,params:{...s.params,url_type:"data"}}).then(l=>{var u,d;if(e.is_apply_page){const p=((u=l.data)==null?void 0:u.pageList)??((d=l.data)==null?void 0:d.customPageList)??[];return typeof Ds.value[e.id]=="function"?Ds.value[e.id](p):p}else{const p=l.data||[];return typeof Ds.value[e.id]=="function"?Ds.value[e.id](p):p}}).finally(()=>{e.loading=!1}):e.isRemoteTotal?Promise.all([k4(e,{...s,params:{...s.params,url_type:"total"}}),k4(e,{...s,params:{...s.params,url_type:"data"}})]).then(([l,u])=>{var p,h,v;let d=((p=l==null?void 0:l.data)==null?void 0:p.customTotal)||{};if(e.is_apply_page){const y=(((h=u.data)==null?void 0:h.pageList)??((v=u.data)==null?void 0:v.customPageList)??[]).map(b=>Object.assign(b,{customTotal:d}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](y):y}else{const y=((u==null?void 0:u.data)||[]).map(b=>Object.assign(b,{customTotal:d}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](y):y}}).finally(()=>{e.loading=!1}):k4(e,s).then(l=>{var d,p,h;const u=((d=l==null?void 0:l.data)==null?void 0:d.customTotal)||{};if(e.is_apply_page){e.table_page_data.currentPage=l.data.page.currentPage||1,e.table_page_data.pageSize=l.data.page.pageSize,e.table_page_data.total=l.data.page.totalItem;const _=(((p=l.data)==null?void 0:p.pageList)??((h=l.data)==null?void 0:h.customPageList)??[]).map(y=>Object.assign(y,{customTotal:u}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](_):_}else{const _=(l.data||[]).map(y=>Object.assign(y,{customTotal:u}));return typeof Ds.value[e.id]=="function"?Ds.value[e.id](_):_}}).finally(()=>{e.loading=!1}))}function IJe(e,t,n){const o=n&&$t.cloneDeep(n),s=async(l,u)=>{if(l.baseData.isRemoteTotal||l.baseData.isSplitInterface){const d=await qne(l.baseData,o);return Promise.all([l.baseData.is_apply_page?k4(l.baseData,{...d,params:{...d.params,url_type:"count"}}):Promise.resolve(null)]).then(async p=>{var h,v,_,y,b,w,C,T,I;if(l.baseData.is_apply_page){const[D]=p;l.baseData.table_page_data.currentPage!==((v=(h=D==null?void 0:D.data)==null?void 0:h.page)==null?void 0:v.currentPage)&&(l.baseData.table_page_data.currentPage=((y=(_=D==null?void 0:D.data)==null?void 0:_.page)==null?void 0:y.currentPage)||1,l.tableData=await aV(l.baseData,o,(C=(w=(b=u.value)==null?void 0:b.form)==null?void 0:w.baseData)==null?void 0:C.isShowQuerySearch)),l.baseData.table_page_data.currentPage=((I=(T=D==null?void 0:D.data)==null?void 0:T.page)==null?void 0:I.currentPage)||1,l.baseData.table_page_data.pageSize=D.data.page.pageSize,l.baseData.table_page_data.total=D.data.page.totalItem}return p})}};return t?Promise.all(e.value.tables.filter(l=>l.id===t).map(l=>s(l,e))):Promise.all(e.value.tables.map(l=>s(l,e)))}async function qne(e,t,n=!1){var b,w;const o=(e==null?void 0:e.proxy)||"scmp-web",s=e.method||"get",l={url:"/"+o+e.requestUrl,method:s},u={currentPage:((b=e.table_page_data)==null?void 0:b.currentPage)||1,pageSize:((w=e.table_page_data)==null?void 0:w.pageSize)||10};$t.set(e,"scrollX.enabled",u.pageSize>=50),$t.set(e,"scrollX.gt",0),$t.set(e,"scrollY.enabled",u.pageSize>=50),$t.set(e,"scrollY.gt",0);const d=Yne(e,t,!0,!0,n),p=e.requestParams?new Function("return "+e.requestParams)():{},h=$t.cloneDeep(Object.assign({},d,e.is_apply_page?u:{},p)),v=Object.keys(h).filter(C=>C.startsWith("_")).map(C=>{const[T,I,D]=C.split("|");return{type:T.slice(1),key:I,code:D,value:h[C]}}),_=Object.keys(h).filter(C=>!C.startsWith("_")).reduce((C,T)=>($t.set(C,T,h[T]),C),{}),y=v.length>0?Object.assign({qry_json_data:JSON.stringify(v)},_):_;return s==="get"?l.params=y:l.data=y,l}function Yne(e,t,n=!0,o=!0,s=!1){const l=Jne(e.config_unique_id);s&&t&&Object.keys(t).forEach(v=>{zc.value[e.config_unique_id]||(zc.value[e.config_unique_id]={}),zc.value[e.config_unique_id][v]=t[v]});const u=s?t||{}:zc.value[e.config_unique_id]||{},d=$t.cloneDeep(zg.value?Object.assign(l,t||{},u):Object.assign(u,l,t||{}));if($t.isEmpty(d))return{};const p=new RegExp(zT),h=new RegExp(X8);for(let v in d){Array.isArray(d[v])&&(d[v]=String(d[v]));const _=p.test(v),y=h.test(v),b=d[`${X8}${e.id}`];if(y&&b&&o){const C=Object.keys(b).reduce((T,I)=>(b[I]&&(typeof b[I]=="string"?T[I]=b[I].trim():T[I]=b[I]),T),{});Object.assign(d,C)}(_||y)&&delete d[v],(typeof d[v]=="string"&&d[v]===""||d[v]===void 0)&&n&&delete d[v]}return d}async function kJe(e){const t=$t.cloneDeep(e);if(t.preParsing)return t;const n=await Gne(t),o=(await CJe(t)).filter(Boolean);return u2.value==!0&&Cne(o),{...t,form:n,tables:o}}function AJe(e){var l;const t=$t.cloneDeep(e);if(t.preParsing)return t;const n=Ip(t.data),o=Kne(t);for(let u in n)$t.isEmpty(n[u])||$t.set(n,`${u}.${zne}`,o);const s=((l=t.form)==null?void 0:l.map(u=>(u.config=Ip(u.config),u)))||[];return u2.value==!0&&console.debug(Sne(t)),{...t,data:n,form:s}}function Kne(e){var t,n,o,s;return((s=(o=(n=(t=e==null?void 0:e.form)==null?void 0:t.filter(l=>l.formItemType==="form"))==null?void 0:n.map(l=>l.config.map(d=>d.config.filter(p=>oV({...p.baseData,uniqueId:e.config_unique_id})).map(p=>p.baseData.prop).toString())))==null?void 0:o.flat(2))==null?void 0:s.filter(Boolean))||[]}function DJe({mid:e,id:t,uid:n,tableId:o,uuid:s,data:l,pageSize:u,is_apply_page:d}){const p=s?`cache_${o}_${s}`:`cache_${o}`;return tV({mid:e,id:t,uid:n},$t.cloneDeep(l),p).then(()=>{const h=Math.ceil(l.length/u);return{currentPage:h,totalPage:l.length,data:d?l.slice((h-1)*u,h*u):l,currentData:d?l.slice(0,u):l}})}async function Xne(e,t){const n=e.uuid,o=n?`cache_${e.id}_${n}`:`cache_${e.id}`,s=e.mid||Qo().mid;return eV({mid:s,id:e.config_unique_id},o).then(l=>{if(!t)return l||[];let u=l||[];const d=u.length,p=t.method.toLocaleLowerCase()==="get"?"params":"data";let h=t[p].currentPage||1,v=t[p].pageSize;const _=(b,w,C)=>{const T=(I,D)=>I[w]<D[w]?C==="asc"?-1:1:I[w]>D[w]?C==="asc"?1:-1:0;return b.sort(T)};if($t.get(t,`${p}.query_order_by`)){const[b,w]=$t.get(t,`${p}.query_order_by`).split(" ");u=_(u,b,w)}return e.is_apply_page?{code:1,data:{customPageList:u.slice((h-1)*v,h*v),page:{currentPage:h,pageSize:v,totalItem:d}}}:{code:1,data:u}})}function NJe(e,t){var u,d,p;const n=t||$t.omit((u=e==null?void 0:e.form)==null?void 0:u.formData,["currentPage","pageSize"]),o=((p=(d=e==null?void 0:e.form)==null?void 0:d.formConfig)==null?void 0:p.reduce((h,v)=>(oV({...v.data.baseData,uniqueId:e==null?void 0:e.config_unique_id})&&Object.assign(h,{[v.data.baseData.prop]:""}),h),{}))||{};if($t.isEmpty(o))return{};const s=new RegExp(zT),l=new Set(Object.keys(o));return Object.keys(n).forEach(h=>{s.test(h)?n[h].some(v=>l.has(v))&&n[h].map(v=>{Object.assign(o,{[v]:n[v]})}):Reflect.has(o,h)&&(o[h]=n[h])}),o}function Jne(e){const t=new RegExp(X8),n=$t.get(zc.value,e,{});return Object.keys(n).reduce((o,s)=>(t.test(s)&&Object.assign(o,{[s]:$t.get(n,s,{})}),o),{})}class To{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,n=!1){return this.onePassHasher.start().appendStr(t).end(n)}static hashAsciiStr(t,n=!1){return this.onePassHasher.start().appendAsciiStr(t).end(n)}static _hex(t){const n=To.hexChars,o=To.hexOut;let s,l,u,d;for(d=0;d<4;d+=1)for(l=d*8,s=t[d],u=0;u<8;u+=2)o[l+1+u]=n.charAt(s&15),s>>>=4,o[l+0+u]=n.charAt(s&15),s>>>=4;return o.join("")}static _md5cycle(t,n){let o=t[0],s=t[1],l=t[2],u=t[3];o+=(s&l|~s&u)+n[0]-680876936|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[1]-389564586|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[2]+606105819|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[3]-1044525330|0,s=(s<<22|s>>>10)+l|0,o+=(s&l|~s&u)+n[4]-176418897|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[5]+1200080426|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[6]-1473231341|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[7]-45705983|0,s=(s<<22|s>>>10)+l|0,o+=(s&l|~s&u)+n[8]+1770035416|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[9]-1958414417|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[10]-42063|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[11]-1990404162|0,s=(s<<22|s>>>10)+l|0,o+=(s&l|~s&u)+n[12]+1804603682|0,o=(o<<7|o>>>25)+s|0,u+=(o&s|~o&l)+n[13]-40341101|0,u=(u<<12|u>>>20)+o|0,l+=(u&o|~u&s)+n[14]-1502002290|0,l=(l<<17|l>>>15)+u|0,s+=(l&u|~l&o)+n[15]+1236535329|0,s=(s<<22|s>>>10)+l|0,o+=(s&u|l&~u)+n[1]-165796510|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[6]-1069501632|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[11]+643717713|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[0]-373897302|0,s=(s<<20|s>>>12)+l|0,o+=(s&u|l&~u)+n[5]-701558691|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[10]+38016083|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[15]-660478335|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[4]-405537848|0,s=(s<<20|s>>>12)+l|0,o+=(s&u|l&~u)+n[9]+568446438|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[14]-1019803690|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[3]-187363961|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[8]+1163531501|0,s=(s<<20|s>>>12)+l|0,o+=(s&u|l&~u)+n[13]-1444681467|0,o=(o<<5|o>>>27)+s|0,u+=(o&l|s&~l)+n[2]-51403784|0,u=(u<<9|u>>>23)+o|0,l+=(u&s|o&~s)+n[7]+1735328473|0,l=(l<<14|l>>>18)+u|0,s+=(l&o|u&~o)+n[12]-1926607734|0,s=(s<<20|s>>>12)+l|0,o+=(s^l^u)+n[5]-378558|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[8]-2022574463|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[11]+1839030562|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[14]-35309556|0,s=(s<<23|s>>>9)+l|0,o+=(s^l^u)+n[1]-1530992060|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[4]+1272893353|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[7]-155497632|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[10]-1094730640|0,s=(s<<23|s>>>9)+l|0,o+=(s^l^u)+n[13]+681279174|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[0]-358537222|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[3]-722521979|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[6]+76029189|0,s=(s<<23|s>>>9)+l|0,o+=(s^l^u)+n[9]-640364487|0,o=(o<<4|o>>>28)+s|0,u+=(o^s^l)+n[12]-421815835|0,u=(u<<11|u>>>21)+o|0,l+=(u^o^s)+n[15]+530742520|0,l=(l<<16|l>>>16)+u|0,s+=(l^u^o)+n[2]-995338651|0,s=(s<<23|s>>>9)+l|0,o+=(l^(s|~u))+n[0]-198630844|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[7]+1126891415|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[14]-1416354905|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[5]-57434055|0,s=(s<<21|s>>>11)+l|0,o+=(l^(s|~u))+n[12]+1700485571|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[3]-1894986606|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[10]-1051523|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[1]-2054922799|0,s=(s<<21|s>>>11)+l|0,o+=(l^(s|~u))+n[8]+1873313359|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[15]-30611744|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[6]-1560198380|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[13]+1309151649|0,s=(s<<21|s>>>11)+l|0,o+=(l^(s|~u))+n[4]-145523070|0,o=(o<<6|o>>>26)+s|0,u+=(s^(o|~l))+n[11]-1120210379|0,u=(u<<10|u>>>22)+o|0,l+=(o^(u|~s))+n[2]+718787259|0,l=(l<<15|l>>>17)+u|0,s+=(u^(l|~o))+n[9]-343485551|0,s=(s<<21|s>>>11)+l|0,t[0]=o+t[0]|0,t[1]=s+t[1]|0,t[2]=l+t[2]|0,t[3]=u+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(To.stateIdentity),this}appendStr(t){const n=this._buffer8,o=this._buffer32;let s=this._bufferLength,l,u;for(u=0;u<t.length;u+=1){if(l=t.charCodeAt(u),l<128)n[s++]=l;else if(l<2048)n[s++]=(l>>>6)+192,n[s++]=l&63|128;else if(l<55296||l>56319)n[s++]=(l>>>12)+224,n[s++]=l>>>6&63|128,n[s++]=l&63|128;else{if(l=(l-55296)*1024+(t.charCodeAt(++u)-56320)+65536,l>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[s++]=(l>>>18)+240,n[s++]=l>>>12&63|128,n[s++]=l>>>6&63|128,n[s++]=l&63|128}s>=64&&(this._dataLength+=64,To._md5cycle(this._state,o),s-=64,o[0]=o[16])}return this._bufferLength=s,this}appendAsciiStr(t){const n=this._buffer8,o=this._buffer32;let s=this._bufferLength,l,u=0;for(;;){for(l=Math.min(t.length-u,64-s);l--;)n[s++]=t.charCodeAt(u++);if(s<64)break;this._dataLength+=64,To._md5cycle(this._state,o),s=0}return this._bufferLength=s,this}appendByteArray(t){const n=this._buffer8,o=this._buffer32;let s=this._bufferLength,l,u=0;for(;;){for(l=Math.min(t.length-u,64-s);l--;)n[s++]=t[u++];if(s<64)break;this._dataLength+=64,To._md5cycle(this._state,o),s=0}return this._bufferLength=s,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const n=t.buffer,o=t.state,s=this._state;let l;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],l=0;l<n.length;l+=1)this._buffer8[l]=n.charCodeAt(l)}end(t=!1){const n=this._bufferLength,o=this._buffer8,s=this._buffer32,l=(n>>2)+1;this._dataLength+=n;const u=this._dataLength*8;if(o[n]=128,o[n+1]=o[n+2]=o[n+3]=0,s.set(To.buffer32Identity.subarray(l),l),n>55&&(To._md5cycle(this._state,s),s.set(To.buffer32Identity)),u<=4294967295)s[14]=u;else{const d=u.toString(16).match(/(.*?)(.{0,8})$/);if(d===null)return;const p=parseInt(d[2],16),h=parseInt(d[1],16)||0;s[14]=p,s[15]=h}return To._md5cycle(this._state,s),t?this._state:To._hex(this._state)}}To.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]);To.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);To.hexChars="0123456789abcdef";To.hexOut=[];To.onePassHasher=new To;if(To.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");const RJe=i.reactive({rowIndex:{},columnIndex:{}});function OJe(e,t){const n=i.inject("bcTableApi"),o=i.watch(e,l);i.onBeforeUnmount(()=>{o()});async function s(v){var T,I;const _=t.data.tables.find(D=>D.id===e.value);_.baseData.table_page_data.currentPage=v.currentPage,_.baseData.table_page_data.pageSize=v.pageSize;const y=await Mr.get(K8)||{},b=t.data.uuid?`${t.data.uuid}${_.id}`:_.id;y._user_pageSize={...y._user_pageSize,[b]:v.pageSize},await Mr.set(K8,y);const w=$t.cloneDeep(((I=(T=t.data)==null?void 0:T.form)==null?void 0:I.formData)||{}),C=$t.cloneDeep(zc.value[t.data.config_unique_id]);return $t.isEmpty(C)||$t.merge(w,C),n==null?void 0:n.setQueryData(Object.assign(w,{currentPage:v.currentPage,pageSize:v.pageSize})).then(()=>n.search(n.getActiveTab(),n.getQueryData(!1)))}function l(){return i.nextTick().then(()=>{var _;const v=(_=t.data)==null?void 0:_.btns.find(y=>["exportSelect","exportSelectedData"].includes(y.data.key));if(v){const{data:y}=n.getCheckboxRow();v.data.disabled=$t.isEmpty(y)}})}function u(v){const _=n==null?void 0:n.getApi(),y=_==null?void 0:_.getCheckboxRecords();if(!$t.isEmpty(y))n==null||n.setCheckboxRow(y,v.checked);else{const b=t.data.tables.find(w=>w.id===e.value).tableData;n==null||n.setCheckboxRow(b,v.checked)}l()}function d(v){n==null||n.setCheckboxRow([v.row],v.checked),l()}function p(v,_){return eV({mid:t.data.mid,id:t.data.config_unique_id,uid:t.data.uid},t.data.batch_id?`batch_${t.data.batch_id}`:"").then(async y=>{const b=t.data.batch_id?`table.${t.data.config_unique_id}`:"table",{tableConfig:w}=$t.get(y,b).tables.find(I=>I.id===_),C=w.find(I=>I.data.field===v.column.field);C&&(C.data.width=v.column.resizeWidth.toString()),await tV({mid:t.data.mid,id:t.data.config_unique_id,uid:t.data.uid},y,t.data.batch_id?`batch_${t.data.batch_id}`:"");const T=w.reduce((I,D)=>(I[D.data.field]=D.data.width,I),{});await xne({table_id:_,uid:t.data.uid},T)})}function h(){setTimeout(()=>{n==null||n.search(n.getActiveTab(),n==null?void 0:n.getQueryData(!1))},16)}return{onPageChange:s,onTabClick:h,onCheckboxAll:u,onCheckboxChange:d,onResizableChange:p,onCheckboxSelect:l}}/*!
113
113
  * better-scroll / core
114
114
  * (c) 2016-2023 ustbhuangyi
115
115
  * Released under the MIT License.
@@ -126,7 +126,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
126
126
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
127
127
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
128
128
  PERFORMANCE OF THIS SOFTWARE.
129
- ***************************************************************************** */var HM=function(e,t){return HM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},HM(e,t)};function HT(e,t){HM(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var wy=function(){return wy=Object.assign||function(t){for(var n,o=1,s=arguments.length;o<s;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},wy.apply(this,arguments)};function Zne(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),s=0,t=0;t<n;t++)for(var l=arguments[t],u=0,d=l.length;u<d;u++,s++)o[s]=l[u];return o}var OJe=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function m8(e){console.error("[BScroll warn]: "+e)}var ru=typeof window<"u",Hg=ru&&navigator.userAgent.toLowerCase(),MJe=!!(Hg&&/wechatdevtools/.test(Hg)),PJe=Hg&&Hg.indexOf("android")>0,VJe=function(){if(typeof Hg=="string"){var e=/os (\d\d?_\d(_\d)?)/,t=e.exec(Hg);if(!t)return!1;var n=t[1].split("_").map(function(o){return parseInt(o,10)});return n[0]===13&&n[1]>=4}return!1}(),Qne=!1;if(ru){var LJe="test-passive";try{var yq={};Object.defineProperty(yq,"passive",{get:function(){Qne=!0}}),window.addEventListener(LJe,function(){},yq)}catch{}}function kp(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var WM=function(e,t){for(var n in t)e[n]=t[n];return e};function jM(e){return e==null}function bq(e,t,n){return e<t?t:e>n?n:e}var sV=ru&&document.createElement("div").style,bg=function(){if(!ru)return!1;for(var e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,n=e;t<n.length;t++){var o=n[t];if(sV[o.value]!==void 0)return o.key}return!1}();function ed(e){return bg===!1?e:bg==="standard"?e==="transitionEnd"?"transitionend":e:bg+e.charAt(0).toUpperCase()+e.substr(1)}function ere(e){return typeof e=="string"?document.querySelector(e):e}function BJe(e,t,n,o){var s=Qne?{passive:!1,capture:!!o}:!!o;e.addEventListener(t,n,s)}function FJe(e,t,n,o){e.removeEventListener(t,n,{capture:!!o})}function tre(e){e.cancelable&&e.preventDefault()}function xq(e){for(var t=0,n=0;e;)t-=e.offsetLeft,n-=e.offsetTop,e=e.offsetParent;return{left:t,top:n}}bg&&bg!=="standard"&&""+bg.toLowerCase();var $Je=ed("transform"),UJe=ed("transition"),zJe=ru&&ed("perspective")in sV,Eq=ru&&("ontouchstart"in window||MJe),HJe=ru&&UJe in sV,ap={transform:$Je,transitionTimingFunction:ed("transitionTimingFunction"),transitionDuration:ed("transitionDuration"),transitionDelay:ed("transitionDelay"),transformOrigin:ed("transformOrigin"),transitionEnd:ed("transitionEnd"),transitionProperty:ed("transitionProperty")},bO={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function wq(e){if(e instanceof window.SVGElement){var t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}else return{top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}}function Sy(e,t){for(var n in t)if(t[n].test(e[n]))return!0;return!1}var WJe=Sy;function jJe(e,t){var n=document.createEvent("Event");n.initEvent(t,!0,!0),n.pageX=e.pageX,n.pageY=e.pageY,e.target.dispatchEvent(n)}function nre(e,t){t===void 0&&(t="click");var n;e.type==="mouseup"?n=e:(e.type==="touchend"||e.type==="touchcancel")&&(n=e.changedTouches[0]);var o={};n&&(o.screenX=n.screenX||0,o.screenY=n.screenY||0,o.clientX=n.clientX||0,o.clientY=n.clientY||0);var s,l=!0,u=!0,d=e.ctrlKey,p=e.shiftKey,h=e.altKey,v=e.metaKey,_={ctrlKey:d,shiftKey:p,altKey:h,metaKey:v};if(typeof MouseEvent<"u")try{s=new MouseEvent(t,WM(wy({bubbles:l,cancelable:u},_),o))}catch{y()}else y();function y(){s=document.createEvent("Event"),s.initEvent(t,l,u),WM(s,o)}s.forwardedTouchEvent=!0,s._constructed=!0,e.target.dispatchEvent(s)}function GJe(e){nre(e,"dblclick")}var q0={swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(e){return 1- --e*e*e*e}}},qJe=1e3/60,Yf=ru&&window;function rre(){}var ire=function(){return ru?Yf.requestAnimationFrame||Yf.webkitRequestAnimationFrame||Yf.mozRequestAnimationFrame||Yf.oRequestAnimationFrame||function(e){return window.setTimeout(e,e.interval||qJe)}:rre}(),Lp=function(){return ru?Yf.cancelAnimationFrame||Yf.webkitCancelAnimationFrame||Yf.mozCancelAnimationFrame||Yf.oCancelAnimationFrame||function(e){window.clearTimeout(e)}:rre}(),Sq=function(e){},xO={enumerable:!0,configurable:!0,get:Sq,set:Sq},YJe=function(e,t){for(var n=t.split("."),o=0;o<n.length-1;o++)if(e=e[n[o]],typeof e!="object"||!e)return;var s=n.pop();return typeof e[s]=="function"?function(){return e[s].apply(e,arguments)}:e[s]},KJe=function(e,t,n){for(var o=t.split("."),s,l=0;l<o.length-1;l++)s=o[l],e[s]||(e[s]={}),e=e[s];e[o.pop()]=n};function XJe(e,t,n){xO.get=function(){return YJe(this,t)},xO.set=function(s){KJe(this,t,s)},Object.defineProperty(e,n,xO)}var ch=function(){function e(t){this.events={},this.eventTypes={},this.registerType(t)}return e.prototype.on=function(t,n,o){return o===void 0&&(o=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([n,o]),this},e.prototype.once=function(t,n,o){var s=this;o===void 0&&(o=this),this.hasType(t);var l=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];s.off(t,l);var p=n.apply(o,u);if(p===!0)return p};return l.fn=n,this.on(t,l),this},e.prototype.off=function(t,n){if(!t&&!n)return this.events={},this;if(t){if(this.hasType(t),!n)return this.events[t]=[],this;var o=this.events[t];if(!o)return this;for(var s=o.length;s--;)(o[s][0]===n||o[s][0]&&o[s][0].fn===n)&&o.splice(s,1);return this}},e.prototype.trigger=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];this.hasType(t);var s=this.events[t];if(s)for(var l=s.length,u=Zne(s),d,p=0;p<l;p++){var h=u[p],v=h[0],_=h[1];if(v&&(d=v.apply(_,n),d===!0))return d}},e.prototype.registerType=function(t){var n=this;t.forEach(function(o){n.eventTypes[o]=o})},e.prototype.destroy=function(){this.events={},this.eventTypes={}},e.prototype.hasType=function(t){var n=this.eventTypes,o=n[t]===t;o||m8('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+(""+Object.keys(n).map(function(s){return JSON.stringify(s)}))+"]")},e}(),J8=function(){function e(t,n){this.wrapper=t,this.events=n,this.addDOMEvents()}return e.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},e.prototype.addDOMEvents=function(){this.handleDOMEvents(BJe)},e.prototype.removeDOMEvents=function(){this.handleDOMEvents(FJe)},e.prototype.handleDOMEvents=function(t){var n=this,o=this.wrapper;this.events.forEach(function(s){t(o,s.name,n,!!s.capture)})},e.prototype.handleEvent=function(t){var n=t.type;this.events.some(function(o){return o.name===n?(o.handler(t),!0):!1})},e}(),JJe=function(){function e(){}return e}(),ZJe=function(e){HT(t,e);function t(){var n=e.call(this)||this;return n.startX=0,n.startY=0,n.scrollX=!1,n.scrollY=!0,n.freeScroll=!1,n.directionLockThreshold=0,n.eventPassthrough="",n.click=!1,n.dblclick=!1,n.tap="",n.bounce={top:!0,bottom:!0,left:!0,right:!0},n.bounceTime=800,n.momentum=!0,n.momentumLimitTime=300,n.momentumLimitDistance=15,n.swipeTime=2500,n.swipeBounceTime=500,n.deceleration=.0015,n.flickLimitTime=200,n.flickLimitDistance=100,n.resizePolling=60,n.probeType=0,n.stopPropagation=!1,n.preventDefault=!0,n.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},n.tagException={tagName:/^TEXTAREA$/},n.HWCompositing=!0,n.useTransition=!0,n.bindToWrapper=!1,n.bindToTarget=!1,n.disableMouse=Eq,n.disableTouch=!Eq,n.autoBlur=!0,n.autoEndDistance=5,n.outOfBoundaryDampingFactor=1/3,n.specifiedIndexAsContent=0,n.quadrant=1,n}return t.prototype.merge=function(n){if(!n)return this;for(var o in n){if(o==="bounce"){this.bounce=this.resolveBounce(n[o]);continue}this[o]=n[o]}return this},t.prototype.process=function(){return this.translateZ=this.HWCompositing&&zJe?" translateZ(1px)":"",this.useTransition=this.useTransition&&HJe,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough==="horizontal"?!1:this.scrollX,this.scrollY=this.eventPassthrough==="vertical"?!1:this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=this.freeScroll?!0:this.scrollX,this.scrollY=this.freeScroll?!0:this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},t.prototype.resolveBounce=function(n){var o={top:!0,right:!0,bottom:!0,left:!0},s={top:!1,right:!1,bottom:!1,left:!1},l;return typeof n=="object"?l=WM(o,n):l=n?o:s,l},t}(JJe),QJe=function(){function e(t,n){this.wrapper=t,this.options=n,this.hooks=new ch(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return e.prototype.handleDOMEvents=function(){var t=this.options,n=t.bindToWrapper,o=t.disableMouse,s=t.disableTouch,l=t.click,u=this.wrapper,d=n?u:window,p=[],h=[],v=!s,_=!o;l&&p.push({name:"click",handler:this.click.bind(this),capture:!0}),v&&(p.push({name:"touchstart",handler:this.start.bind(this)}),h.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),_&&(p.push({name:"mousedown",handler:this.start.bind(this)}),h.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new J8(u,p),this.targetEventRegister=new J8(d,h)},e.prototype.beforeHandler=function(t,n){var o=this.options,s=o.preventDefault,l=o.stopPropagation,u=o.preventDefaultException,d={start:function(){return s&&!Sy(t.target,u)},end:function(){return s&&!Sy(t.target,u)},move:function(){return s}};d[n]()&&t.preventDefault(),l&&t.stopPropagation()},e.prototype.setInitiated=function(t){t===void 0&&(t=0),this.initiated=t},e.prototype.start=function(t){var n=bO[t.type];if(!(this.initiated&&this.initiated!==n)){if(this.setInitiated(n),WJe(t.target,this.options.tagException)){this.setInitiated();return}if(!(n===2&&t.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var o=t.touches?t.touches[0]:t;this.pointX=o.pageX,this.pointY=o.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}}},e.prototype.move=function(t){if(bO[t.type]===this.initiated){this.beforeHandler(t,"move");var n=t.touches?t.touches[0]:t,o=n.pageX-this.pointX,s=n.pageY-this.pointY;if(this.pointX=n.pageX,this.pointY=n.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:s,e:t})){var l=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,u=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,d=this.pointX-l,p=this.pointY-u,h=this.options.autoEndDistance;(d>document.documentElement.clientWidth-h||p>document.documentElement.clientHeight-h||d<h||p<h)&&this.end(t)}}},e.prototype.end=function(t){bO[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},e.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},e.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},e.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},e.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},e}(),EO={x:["translateX","px"],y:["translateY","px"]},eZe=function(){function e(t){this.setContent(t),this.hooks=new ch(["beforeTranslate","translate"])}return e.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),n=t[ap.transform].split(")")[0].split(", "),o=+(n[12]||n[4])||0,s=+(n[13]||n[5])||0;return{x:o,y:s}},e.prototype.translate=function(t){var n=[];Object.keys(t).forEach(function(o){if(EO[o]){var s=EO[o][0];if(s){var l=EO[o][1],u=t[o];n.push(s+"("+u+l+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,n,t),this.style[ap.transform]=n.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},e.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},e.prototype.destroy=function(){this.hooks.destroy()},e}(),ore=function(){function e(t,n,o){this.translater=n,this.options=o,this.timer=0,this.hooks=new ch(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return e.prototype.translate=function(t){this.translater.translate(t)},e.prototype.setPending=function(t){this.pending=t},e.prototype.setForceStopped=function(t){this.forceStopped=t},e.prototype.setCallStop=function(t){this.callStopWhenPending=t},e.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},e.prototype.clearTimer=function(){this.timer&&(Lp(this.timer),this.timer=0)},e.prototype.destroy=function(){this.hooks.destroy(),Lp(this.timer)},e}(),tZe=function(e,t,n,o){var s=function(h,v){var _=h-v,y=_>0?-1:_<0?1:0;return y},l=s(t.x,e.x),u=s(t.y,e.y),d=n.x-o.x,p=n.y-o.y;return l*d<=0&&u*p<=0},nZe=function(e){HT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.startProbe=function(n,o){var s=this,l=n,u=function(){var d=s.translater.getComputedPosition();tZe(n,o,d,l)&&s.hooks.trigger(s.hooks.eventTypes.move,d),s.pending||(s.callStopWhenPending?s.callStopWhenPending=!1:s.hooks.trigger(s.hooks.eventTypes.end,d)),l=d,s.pending&&(s.timer=ire(u))};this.callStopWhenPending&&this.setCallStop(!1),Lp(this.timer),u()},t.prototype.transitionTime=function(n){n===void 0&&(n=0),this.style[ap.transitionDuration]=n+"ms",this.hooks.trigger(this.hooks.eventTypes.time,n)},t.prototype.transitionTimingFunction=function(n){this.style[ap.transitionTimingFunction]=n,this.hooks.trigger(this.hooks.eventTypes.timeFunction,n)},t.prototype.transitionProperty=function(){this.style[ap.transitionProperty]=ap.transform},t.prototype.move=function(n,o,s,l){this.setPending(s>0),this.transitionTimingFunction(l),this.transitionProperty(),this.transitionTime(s),this.translate(o);var u=this.options.probeType===3;s&&u&&this.startProbe(n,o),s||(this._reflow=this.content.offsetHeight,u&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o))},t.prototype.doStop=function(){var n=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),n){this.setPending(!1),Lp(this.timer);var o=this.translater.getComputedPosition(),s=o.x,l=o.y;this.transitionTime(),this.translate({x:s,y:l}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:s,y:l})}return n},t.prototype.stop=function(){var n=this.doStop();n&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(ore),rZe=function(e){HT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.move=function(n,o,s,l){if(!s){this.translate(o),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o);return}this.animate(n,o,s,l)},t.prototype.animate=function(n,o,s,l){var u=this,d=kp(),p=d+s,h=this.options.probeType===3,v=function(){var _=kp();if(_>=p){u.translate(o),h&&u.hooks.trigger(u.hooks.eventTypes.move,o),u.hooks.trigger(u.hooks.eventTypes.end,o);return}_=(_-d)/s;var y=l(_),b={};Object.keys(o).forEach(function(w){var C=n[w],T=o[w];b[w]=(T-C)*y+C}),u.translate(b),h&&u.hooks.trigger(u.hooks.eventTypes.move,b),u.pending&&(u.timer=ire(v)),u.pending||(u.callStopWhenPending?u.callStopWhenPending=!1:u.hooks.trigger(u.hooks.eventTypes.end,o))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),Lp(this.timer),v()},t.prototype.doStop=function(){var n=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),n){this.setPending(!1),Lp(this.timer);var o=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,o)}return n},t.prototype.stop=function(){var n=this.doStop();n&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(ore);function iZe(e,t,n){var o=n.useTransition,s={};return Object.defineProperty(s,"probeType",{enumerable:!0,configurable:!1,get:function(){return n.probeType}}),o?new nZe(e,t,s):new rZe(e,t,s)}var Cq=function(){function e(t,n,o){this.wrapper=t,this.options=o,this.hooks=new ch(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(n)}return e.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},e.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},e.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},e.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},e.prototype.performDampingAlgorithm=function(t,n){var o=this.currentPos+t;return(o>this.minScrollPos||o<this.maxScrollPos)&&(o>this.minScrollPos&&this.options.bounces[0]||o<this.maxScrollPos&&this.options.bounces[1]?o=this.currentPos+t*n:o=o>this.minScrollPos?this.minScrollPos:this.maxScrollPos),o},e.prototype.end=function(t){var n={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&o>this.options.momentumLimitDistance){var s=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;n=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,s,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,n);return n},e.prototype.momentum=function(t,n,o,s,l,u,d){d===void 0&&(d=this.options);var p=t-n,h=Math.abs(p)/o,v=d.deceleration,_=d.swipeBounceTime,y=d.swipeTime,b=Math.min(y,h*2/v),w={destination:t+h*h/v*(p<0?-1:1),duration:b,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,w,p),w.destination<s?(w.destination=u?Math.max(s-u/4,s-u/w.rate*h):s,w.duration=_):w.destination>l&&(w.destination=u?Math.min(l+u/4,l+u/w.rate*h):l,w.duration=_),w.destination=Math.round(w.destination),w},e.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},e.prototype.refresh=function(t){var n=this.options.rect,o=n.size,s=n.position,l=window.getComputedStyle(this.wrapper,null).position==="static",u=wq(this.wrapper);this.wrapperSize=this.wrapper[o==="width"?"clientWidth":"clientHeight"],this.setContent(t);var d=wq(this.content);this.contentSize=d[o],this.relativeOffset=d[s],l&&(this.relativeOffset-=u[s]),this.computeBoundary(),this.setDirection(0)},e.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},e.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},e.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},e.prototype.updatePosition=function(t){this.currentPos=t},e.prototype.getCurrentPos=function(){return this.currentPos},e.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos),n=t===this.getCurrentPos();return{position:t,inBoundary:n}},e.prototype.adjustPosition=function(t){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t=this.minScrollPos:t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos),t},e.prototype.updateStartPos=function(){this.startPos=this.currentPos},e.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},e.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},e.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},e.prototype.destroy=function(){this.hooks.destroy()},e}(),GE,qE,YE,KE,Tq=(GE={},GE.yes=function(e){return!0},GE.no=function(e){return tre(e),!1},GE),oZe=(qE={},qE.horizontal=(YE={},YE.yes="horizontal",YE.no="vertical",YE),qE.vertical=(KE={},KE.yes="vertical",KE.no="horizontal",KE),qE),aZe=function(){function e(t,n,o){this.directionLockThreshold=t,this.freeScroll=n,this.eventPassthrough=o,this.reset()}return e.prototype.reset=function(){this.directionLocked=""},e.prototype.checkMovingDirection=function(t,n,o){return this.computeDirectionLock(t,n),this.handleEventPassthrough(o)},e.prototype.adjustDelta=function(t,n){return this.directionLocked==="horizontal"?n=0:this.directionLocked==="vertical"&&(t=0),{deltaX:t,deltaY:n}},e.prototype.computeDirectionLock=function(t,n){this.directionLocked===""&&!this.freeScroll&&(t>n+this.directionLockThreshold?this.directionLocked="horizontal":n>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},e.prototype.handleEventPassthrough=function(t){var n=oZe[this.directionLocked];if(n){if(this.eventPassthrough===n.yes)return Tq.yes(t);if(this.eventPassthrough===n.no)return Tq.no(t)}return!1},e}(),sZe=function(e,t,n){return n===2?[t,-e]:n===3?[-e,-t]:n===4?[-t,e]:[e,t]},lZe=function(){function e(t,n,o,s,l){this.hooks=new ch(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=n,this.actionsHandler=o,this.animater=s,this.options=l,this.directionLockAction=new aZe(l.directionLockThreshold,l.freeScroll,l.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return e.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(n){return t.enabled?t.handleStart(n):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(n){var o=n.deltaX,s=n.deltaY,l=n.e;if(!t.enabled)return!0;var u=sZe(o,s,t.options.quadrant),d=u[0],p=u[1],h={deltaX:d,deltaY:p};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,h),t.handleMove(h.deltaX,h.deltaY,l)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(n){return t.enabled?t.handleEnd(n):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(n){t.enabled&&!n._constructed&&t.handleClick(n)})},e.prototype.handleStart=function(t){var n=kp();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=n,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},e.prototype.handleMove=function(t,n,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var s=this.scrollBehaviorX.getAbsDist(t),l=this.scrollBehaviorY.getAbsDist(n),u=kp();if(this.checkMomentum(s,l,u))return!0;if(this.directionLockAction.checkMovingDirection(s,l,o))return this.actionsHandler.setInitiated(),!0;var d=this.directionLockAction.adjustDelta(t,n),p=this.scrollBehaviorX.getCurrentPos(),h=this.scrollBehaviorX.move(d.deltaX),v=this.scrollBehaviorY.getCurrentPos(),_=this.scrollBehaviorY.move(d.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var y=h!==p||_!==v;!this.contentMoved&&!y&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&y&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&y&&(this.animater.translate({x:h,y:_}),this.dispatchScroll(u))}}},e.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},e.prototype.checkMomentum=function(t,n,o){return o-this.endTime>this.options.momentumLimitTime&&n<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},e.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var n=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,n))return!0;n=this.ensureIntegerPos(n),this.animater.translate(n),this.endTime=kp();var o=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,n,o)}},e.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var n=t.x,o=t.y,s=this.scrollBehaviorX,l=s.minScrollPos,u=s.maxScrollPos,d=this.scrollBehaviorY,p=d.minScrollPos,h=d.maxScrollPos;return n=n>0?Math.ceil(n):Math.floor(n),o=o>0?Math.ceil(o):Math.floor(o),n=bq(n,u,l),o=bq(o,h,p),{x:n,y:o}},e.prototype.handleClick=function(t){Sy(t.target,this.options.preventDefaultException)||(tre(t),t.stopPropagation())},e.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},e.prototype.refresh=function(){this.endTime=0},e.prototype.destroy=function(){this.hooks.destroy()},e}();function cZe(e){var t=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(n,o){return n[o]=e[o],n},{});return t}function Iq(e,t,n,o){var s=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(l,u){return l[u]=e[u],l},{});return s.scrollable=!!e[t],s.bounces=n,s.rect=o,s}function GM(e,t,n){n.forEach(function(o){var s,l;typeof o=="string"?s=l=o:(s=o.source,l=o.target),e.on(s,function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return t.trigger.apply(t,Zne([l],u))})})}function uZe(e,t){for(var n=Object.keys(e),o=0,s=n;o<s.length;o++){var l=s[o];if(e[l]!==t[l])return!1}return!0}var kq=1,dZe=function(){function e(t,n,o){this.wrapper=t,this.content=n,this.resizeTimeout=0,this.hooks=new ch(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var s=this.options.bounce,l=s.left,u=s.right,d=s.top,p=s.bottom;this.scrollBehaviorX=new Cq(t,n,Iq(o,"scrollX",[l,u],{size:"width",position:"left"})),this.scrollBehaviorY=new Cq(t,n,Iq(o,"scrollY",[d,p],{size:"height",position:"top"})),this.translater=new eZe(this.content),this.animater=iZe(this.content,this.translater,this.options),this.actionsHandler=new QJe(this.options.bindToTarget?this.content:t,cZe(this.options)),this.actions=new lZe(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var h=this.resize.bind(this);this.resizeRegister=new J8(window,[{name:"orientationchange",handler:h},{name:"resize",handler:h}]),this.registerTransitionEnd(),this.init()}return e.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){t.togglePointerEvents(!0)})},e.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new J8(this.content,[{name:ap.transitionEnd,handler:this.transitionEnd.bind(this)}])},e.prototype.bindTranslater=function(){var t=this,n=this.translater.hooks;n.on(n.eventTypes.beforeTranslate,function(o){t.options.translateZ&&o.push(t.options.translateZ)}),n.on(n.eventTypes.translate,function(o){var s=t.getCurrentPos();if(t.updatePositions(o),t.actions.ensuringInteger===!0){t.actions.ensuringInteger=!1;return}(o.x!==s.x||o.y!==s.y)&&t.togglePointerEvents(!1)})},e.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(n){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,n))}),GM(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},e.prototype.bindActions=function(){var t=this,n=this.actions;GM(n.hooks,this.hooks,[{source:n.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:n.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:n.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:n.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:n.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:n.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),n.hooks.on(n.hooks.eventTypes.end,function(o,s){if(t.hooks.trigger(t.hooks.eventTypes.touchEnd,s),t.hooks.trigger(t.hooks.eventTypes.end,s)||!n.fingerMoved&&(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),t.checkClick(o)))return!0;if(t.resetPosition(t.options.bounceTime,q0.bounce))return t.animater.setForceStopped(!1),!0}),n.hooks.on(n.hooks.eventTypes.scrollEnd,function(o,s){var l=Math.abs(o.x-t.scrollBehaviorX.startPos),u=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(s,l,u)){t.animater.setForceStopped(!1),t.hooks.trigger(t.hooks.eventTypes.flick);return}if(t.momentum(o,s)){t.animater.setForceStopped(!1);return}n.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,o),t.animater.forceStopped&&t.animater.setForceStopped(!1)})},e.prototype.checkFlick=function(t,n,o){var s=1;if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&n<this.options.flickLimitDistance&&o<this.options.flickLimitDistance&&(o>s||n>s))return!0},e.prototype.momentum=function(t,n){var o={time:0,easing:q0.swiper,newX:t.x,newY:t.y},s=this.scrollBehaviorX.end(n),l=this.scrollBehaviorY.end(n);if(o.newX=jM(s.destination)?o.newX:s.destination,o.newY=jM(l.destination)?o.newY:l.destination,o.time=Math.max(s.duration,l.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newX<this.scrollBehaviorX.maxScrollPos||o.newY>this.scrollBehaviorY.minScrollPos||o.newY<this.scrollBehaviorY.maxScrollPos)&&(o.easing=q0.swipeBounce),this.scrollTo(o.newX,o.newY,o.time,o.easing),!0},e.prototype.checkClick=function(t){var n={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!n.preventClick){var o=this.options.dblclick,s=!1;if(o&&this.lastClickTime){var l=o.delay,u=l===void 0?300:l;kp()-this.lastClickTime<u&&(s=!0,GJe(t))}return this.options.tap&&jJe(t,this.options.tap),this.options.click&&!Sy(t.target,this.options.preventDefaultException)&&nre(t),this.lastClickTime=s?null:kp(),!0}return!1},e.prototype.resize=function(){var t=this;this.actions.enabled&&(PJe&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(function(){t.hooks.trigger(t.hooks.eventTypes.resize)},this.options.resizePolling))},e.prototype.transitionEnd=function(t){if(!(t.target!==this.content||!this.animater.pending)){var n=this.animater;n.transitionTime(),this.resetPosition(this.options.bounceTime,q0.bounce)||(this.animater.setPending(!1),this.options.probeType!==3&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos()))}},e.prototype.togglePointerEvents=function(t){t===void 0&&(t=!0);for(var n=this.content.children.length?this.content.children:[this.content],o=t?"auto":"none",s=0;s<n.length;s++){var l=n[s];l.isBScrollContainer||(l.style.pointerEvents=o)}},e.prototype.refresh=function(t){var n=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),n&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=xq(this.wrapper)},e.prototype.setContent=function(t){var n=t!==this.content;return n&&(this.content=t),n},e.prototype.scrollBy=function(t,n,o,s){o===void 0&&(o=0);var l=this.getCurrentPos(),u=l.x,d=l.y;s=s||q0.bounce,t+=u,n+=d,this.scrollTo(t,n,o,s)},e.prototype.scrollTo=function(t,n,o,s,l){o===void 0&&(o=0),s===void 0&&(s=q0.bounce),l===void 0&&(l={start:{},end:{}});var u=this.options.useTransition?s.style:s.fn,d=this.getCurrentPos(),p=wy({x:d.x,y:d.y},l.start),h=wy({x:t,y:n},l.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,h),!uZe(p,h)){var v=Math.abs(h.x-p.x),_=Math.abs(h.y-p.y);v<kq&&_<kq&&(o=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(p,h,o,u)}},e.prototype.scrollToElement=function(t,n,o,s,l){var u=ere(t),d=xq(u),p=function(v,_,y){return typeof v=="number"?v:v?Math.round(_/2-y/2):0};o=p(o,u.offsetWidth,this.wrapper.offsetWidth),s=p(s,u.offsetHeight,this.wrapper.offsetHeight);var h=function(v,_,y,b){return v-=_,v=b.adjustPosition(v-y),v};d.left=h(d.left,this.wrapperOffset.left,o,this.scrollBehaviorX),d.top=h(d.top,this.wrapperOffset.top,s,this.scrollBehaviorY),!this.hooks.trigger(this.hooks.eventTypes.scrollToElement,u,d)&&this.scrollTo(d.left,d.top,n,l)},e.prototype.resetPosition=function(t,n){t===void 0&&(t=0),n===void 0&&(n=q0.bounce);var o=this.scrollBehaviorX.checkInBoundary(),s=o.position,l=o.inBoundary,u=this.scrollBehaviorY.checkInBoundary(),d=u.position,p=u.inBoundary;return l&&p?!1:(VJe&&this.reflow(),this.scrollTo(s,d,t,n),!0)},e.prototype.reflow=function(){this._reflow=this.content.offsetHeight},e.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},e.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},e.prototype.enable=function(){this.actions.enabled=!0},e.prototype.disable=function(){Lp(this.animater.timer),this.actions.enabled=!1},e.prototype.destroy=function(){var t=this,n=["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"];n.forEach(function(o){return t[o].destroy()})},e}(),WT=function(e){HT(t,e);function t(n,o){var s=e.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,l=ere(n);return l?(s.plugins={},s.options=new ZJe().merge(o).process(),s.setContent(l).valid&&(s.hooks=new ch(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),s.init(l)),s):(m8("Can not resolve the wrapper DOM."),s)}return t.use=function(n){var o=n.pluginName,s=t.plugins.some(function(l){return n===l.ctor});return s?t:jM(o)?(m8("Plugin Class must specify plugin's name in static property by 'pluginName' field."),t):(t.pluginsMap[o]=!0,t.plugins.push({name:o,applyOrder:n.applyOrder,ctor:n}),t)},t.prototype.setContent=function(n){var o=!1,s=!0,l=n.children[this.options.specifiedIndexAsContent];return l?(o=this.content!==l,o&&(this.content=l)):(m8("The wrapper need at least one child element to be content element to scroll."),s=!1),{valid:s,contentChanged:o}},t.prototype.init=function(n){var o=this;this.wrapper=n,n.isBScrollContainer=!0,this.scroller=new dZe(n,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,function(){o.refresh()}),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(OJe),this.applyPlugins(),this.refreshWithoutReset(this.content);var s=this.options,l=s.startX,u=s.startY,d={x:l,y:u};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,d)||this.scroller.scrollTo(d.x,d.y)},t.prototype.applyPlugins=function(){var n=this,o=this.options;t.plugins.sort(function(s,l){var u,d=(u={},u.pre=-1,u.post=1,u),p=s.applyOrder?d[s.applyOrder]:0,h=l.applyOrder?d[l.applyOrder]:0;return p-h}).forEach(function(s){var l=s.ctor;o[s.name]&&typeof l=="function"&&(n.plugins[s.name]=new l(n))})},t.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,function(){var n=document.activeElement;n&&(n.tagName==="INPUT"||n.tagName==="TEXTAREA")&&n.blur()})},t.prototype.eventBubbling=function(){GM(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},t.prototype.refreshWithoutReset=function(n){this.scroller.refresh(n),this.hooks.trigger(this.hooks.eventTypes.refresh,n),this.trigger(this.eventTypes.refresh,n)},t.prototype.proxy=function(n){var o=this;n.forEach(function(s){var l=s.key,u=s.sourceKey;XJe(o,u,l)})},t.prototype.refresh=function(){var n=this.setContent(this.wrapper),o=n.contentChanged,s=n.valid;if(s){var l=this.content;this.refreshWithoutReset(l),o&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,l),this.trigger(this.eventTypes.contentChanged,l)),this.scroller.resetPosition()}},t.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},t.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},t.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},t.prototype.eventRegister=function(n){this.registerType(n)},t.plugins=[],t.pluginsMap={},t}(ch);function jT(e,t){var n=new WT(e,t);return n}jT.use=WT.use;jT.plugins=WT.plugins;jT.pluginsMap=WT.pluginsMap;var fZe=jT;const hZe=i.defineComponent({name:"bcGroup",props:{value:{type:Object,required:!0},elComponent:{type:String,required:!0},fieldComponent:{type:String,required:!0}},emits:["change"],setup(e,{emit:t,expose:n}){const o=i.useAttrs(),s=i.inject("bcTableApi"),l=i.inject("setItemInstance",()=>{}),u=i.ref(),[d,p]=$t.get(e,`value.${e.fieldComponent}`,[]),h=i.ref({[d]:"",[p]:""}),v=i.ref([e.value[d],e.value[p]]);i.watch(()=>e.value,()=>{v.value=[e.value[d],e.value[p]]});function _(T){var O,L,P;const I=e.elComponent==="hs-date-picker",D=o.format==="YYYY-MM-DD",k=o["value-format"]==="YYYY-MM-DD HH:mm:ss";if(Array.isArray(T)){let[V,$]=T;I&&D&&k&&($=$?Pn($).format("YYYY-MM-DD")+" 23:59:59":""),h.value[d]=V,h.value[p]=$}else if(T!=null&&T.target&&((L=(O=T==null?void 0:T.target)==null?void 0:O.value)==null?void 0:L.length)===8&&e.elComponent==="hs-date-picker"){const V=((P=T==null?void 0:T.target)==null?void 0:P.value)||"";Array.from(T.target.parentNode.querySelectorAll("input")).findIndex(Y=>Y===T.target)===0?h.value[d]=V?Pn(V).format("YYYY-MM-DD")+" 00:00:00":"":D&&k?h.value[p]=V?Pn(V).format("YYYY-MM-DD")+" 23:59:59":"":h.value[p]=V?Pn(V).format("YYYY-MM-DD"):"",v.value=[h.value[d],h.value[p]]}else h.value[d]="",h.value[p]="";s==null||s.updateSearchForm(h.value),t("change",T)}function y(){_(["",""]),v.value=["",""]}function b(){var T,I,D;return typeof((T=u.value)==null?void 0:T.activeElement)=="function"?(I=u.value)==null?void 0:I.activeElement():(D=u.value)==null?void 0:D.$el}function w(){var T;(T=u.value)==null||T.focus()}function C(){return e.fieldComponent}return i.onMounted(()=>{var D,k,O;const T=(D=b())==null?void 0:D.closest(".el-form-item"),I=(O=(k=T==null?void 0:T.className)==null?void 0:k.match(/query_[a-zA-Z0-9_]+/))==null?void 0:O[0];I&&l({clearData:y,getField:C,focus:w,activeElement:b},I.replace("query_",""))}),n({clearData:y,getField:C,focus:w,activeElement:b}),{elRef:u,groupData:v,focus:w,onChange:_}}}),hr=i.reactive({id:"",tab:"config",active:"table",activeId:"",typeId:"btns",tableId:"",menu:[],menuFlat:[],company:[],company_id:"",role:[],role_id:"",menu_id:"",table:[],form:[],dictAuthName:{},dictAuth:{},dataAuthName:{},dataAuth:{}}),XE=i.reactive({table:[],form:[]});async function pZe({role_id:e,menu_id:t,dict_json:n,data_json:o}){var _,y,b,w;hr.id="";const s=await Mr.get("userInfo"),l=Wa.value||s.project_code,u=await Pi({url:`/${l}-web/pri/v2/perminssion/get_menu_prminssion_info`,method:"get",params:{role_id:e,menu_id:t,other_log_info:{title:"获取权限,(权限设置时,使用)"}}}),d={};hr.id=((_=u==null?void 0:u.data)==null?void 0:_.id)||"";const p=(y=u.data)!=null&&y.config_functions?JSON.parse(u.data.config_functions):[],h=Aq((b=u==null?void 0:u.data)==null?void 0:b.dict_functions),v=Aq((w=u==null?void 0:u.data)==null?void 0:w.data_functions);return EZe({dict_json:n,data_json:o,dict_functions:h,data_functions:v}),p.forEach(C=>{d[C.config_unique_id]=mZe(C)}),Pi({url:`/${l}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:t,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(C=>{var D;const T=[],I=[];return(D=C.data)==null||D.forEach(k=>{k.config_type==="1"&&T.push(k),k.config_type==="2"&&I.push(k)}),hr.tab="config",hr.active="table",hr.activeId=$t.get(T,"0.config_unique_id"),hr.typeId="btns",hr.tableId=$t.get(T,"0.tables.0.id"),hr.table=Dq(T,d),hr.form=Dq(I,d),hr})}function Aq(e){return e?e?JSON.parse(e).reduce((t,n)=>(t[n.code]=n.json_data,t),{}):{}:{}}function Dq(e,t){return $t.isEmpty(t)?e:e.map(n=>(n.btns.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.btns.${o.fieldProp}.fieldShow`,!1)),o)),n.form.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.form.${o.fieldProp}.fieldShow`,!1)),o)),n.tables.map(o=>{var l;if(!t[n.config_unique_id])return n;const s=$t.get(t,`${n.config_unique_id}.tables.${o.id}`,{});return o.data=((l=o.data)==null?void 0:l.map(u=>{var p;const d=s[u.fieldProp];return d&&(u.fieldShow=d.fieldShow,u.option=((p=u.option)==null?void 0:p.map(h=>{var _;const v=d.option||[];return h.fieldShow=((_=v==null?void 0:v.find(y=>y.fieldProp===h.fieldProp))==null?void 0:_.fieldShow)??!1,h}))||[]),u}))||[],o}),n))}function mZe(e){const t={btns:wO(e.btns),form:wO(e.form),tables:{}};return e.tables.forEach(n=>{t.tables[n.id]=wO(n.data)}),t}function wO(e){const t={auth_data_func_01_000:[]};return e.forEach(n=>{t[n.fieldProp]=n}),t}async function Nq(e,t){const{table:n,form:o,menu_id:s,company_id:l,role_id:u,id:d}=hr,p=[...n,...o];let h={dict_functions:vZe(),config_functions:JSON.stringify(p),data_functions:gZe(),is_effect:e,menu_id:s,role_id:u};d&&(h.id=d),l&&(h.company_id=l),t&&(h={...h,...t});const v=await Mr.get("userInfo"),_=Wa.value||v.project_code;return Pi({url:`/${_}-web/pri/v2/perminssion/save_prminssion`,method:"post",data:{...h,other_log_info:{title:"保存权限"}}})}function vZe(){const e=[];for(let t in hr.dictAuth){const n=t;e.push({name:hr.dictAuthName[n],code:n,json_data:hr.dictAuth[n]})}return JSON.stringify(e)}function gZe(){const e=[];for(let t in hr.dataAuth){const n=t;e.push({name:hr.dataAuthName[n],code:n,json_data:hr.dataAuth[n]})}return JSON.stringify(e)}async function _Ze(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(n=>{const o=n;hr.menu=o.data,hr.menuFlat=yZe(o.data)})}function yZe(e){const t=[];function n(o,s=[]){return o.reduce((l,u)=>(l.push(u),u.children&&u.children.length&&l.push(...n(u.children)),l),s)}return n($t.cloneDeep(e),t),t}async function bZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/company/get_company_dict`,method:"get",params:{other_log_info:{title:"查询所有门店"}}}).then(n=>{var s;const o=n;return hr.company=$t.get(o,"data",[]),hr.company_id=((s=Qo())==null?void 0:s.companyId)||(e==null?void 0:e.company_id)||$t.get(o,"data.0.company_id"),$t.get(o,"data",[])})}async function SO(e){var s;const t=await Mr.get("userInfo"),n=Wa.value||t.project_code,o=((s=t.roleList[0])==null?void 0:s.id)||lV.value;return Pi({url:`/${n}-web/pri/role/${e?"list_role_by_company_id":"list_all_role"}`,method:"get",params:Object.assign({other_log_info:{title:"查询所有角色"}},e?{company_id:hr.company_id}:{})}).then(l=>{var u;return hr.role=$t.get(l,"data",[]),e||(hr.role_id=((u=Qo())==null?void 0:u.roleId)||o||$t.get(l,"data.0.id")),$t.get(l,"data",[])})}async function xZe(){hr.table=[],hr.form=[];const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/perminssion/get_menu_list_by_pervalue`,method:"get",params:{role_id:hr.role_id,other_log_info:{title:"根据角色id,获取菜单"}}}).then(n=>n.data)}async function EZe({dict_json:e,data_json:t,dict_functions:n,data_functions:o}){const s={},l={};for(let v in e){const{name:_,code:y}=e[v];s[y]=_}for(let v in t){const{label:_,value:y}=t[v];l[y]=_}hr.dictAuthName=s,hr.dataAuthName=l;const u=e.map(v=>v.code).join(",");hr.dictAuth={};const d=await Mr.get("userInfo"),p=Wa.value||d.project_code;u?Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:u,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;hr.dictAuth=wZe(_.data,n)}):console.error("pri/v2/perminssion/get_menu_prminssion_info返回的【dict_functions】为空");const h=t.map(v=>v.value).join(",");hr.dataAuth={},h?Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:h,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;hr.dataAuth=SZe(_.data,o)}):console.error("pri/v2/perminssion/get_menu_prminssion_info返回的【data_functions】为空")}function wZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.id]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.id}.show`,!1)}),o[l]=e[l]}return o}function SZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.dict_child_code]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.dict_child_code}.show`,!1)}),o[l]=e[l]}return o}const Cr=i.reactive({id:"",tab:"config",active:"table",activeId:"",typeId:"btns",tableId:"",menu:[],menuFlat:[],company:[],company_id:"",role:[],role_id:"",menu_id:"",table:[],form:[],dictAuthName:{},dictAuth:{},dataAuthName:{},dataAuth:{}});i.reactive({table:[],form:[]});async function CZe({role_id:e,menu_id:t,dict_json:n,data_json:o}){var _,y,b,w;Cr.id="";const s=await Mr.get("userInfo"),l=Wa.value||s.project_code,u=await Pi({url:`/${l}-web/pri/v2/perminssion/get_menu_prminssion_info`,method:"get",params:{role_id:e,menu_id:t,other_log_info:{title:"获取权限,(权限设置时,使用)"}}}),d={};Cr.id=((_=u==null?void 0:u.data)==null?void 0:_.id)||"";const p=(y=u.data)!=null&&y.config_functions?JSON.parse(u.data.config_functions):[],h=Rq((b=u==null?void 0:u.data)==null?void 0:b.dict_functions),v=Rq((w=u==null?void 0:u.data)==null?void 0:w.data_functions);return NZe({dict_json:n,data_json:o,dict_functions:h,data_functions:v}),p.forEach(C=>{d[C.config_unique_id]=TZe(C)}),Pi({url:`/${l}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:t,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(C=>{var D;const T=[],I=[];return(D=C.data)==null||D.forEach(k=>{k.config_type==="1"&&T.push(k),k.config_type==="2"&&I.push(k)}),Cr.tab="config",Cr.active="table",Cr.activeId=$t.get(T,"0.config_unique_id"),Cr.typeId="btns",Cr.tableId=$t.get(T,"0.tables.0.id"),Cr.table=Oq(T,d),Cr.form=Oq(I,d),Cr})}function Rq(e){return e?e?JSON.parse(e).reduce((t,n)=>(t[n.code]=n.json_data,t),{}):{}:{}}function Oq(e,t){return $t.isEmpty(t)?e:e.map(n=>(n.btns.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.btns.${o.fieldProp}.fieldShow`,!1)),o)),n.form.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.form.${o.fieldProp}.fieldShow`,!1)),o)),n.tables.map(o=>{var l;if(!t[n.config_unique_id])return n;const s=$t.get(t,`${n.config_unique_id}.tables.${o.id}`,{});return o.data=((l=o.data)==null?void 0:l.map(u=>{var p;const d=s[u.fieldProp];return d&&(u.fieldShow=d.fieldShow,u.option=((p=u.option)==null?void 0:p.map(h=>{var _;const v=d.option||[];return h.fieldShow=((_=v==null?void 0:v.find(y=>y.fieldProp===h.fieldProp))==null?void 0:_.fieldShow)??!1,h}))||[]),u}))||[],o}),n))}function TZe(e){const t={btns:CO(e.btns),form:CO(e.form),tables:{}};return e.tables.forEach(n=>{t.tables[n.id]=CO(n.data)}),t}function CO(e){const t={auth_data_func_01_000:[]};return e.forEach(n=>{t[n.fieldProp]=n}),t}async function IZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(n=>{const o=n;Cr.menu=o.data,Cr.menuFlat=kZe(o.data)})}function kZe(e){const t=[];function n(o,s=[]){return o.reduce((l,u)=>(l.push(u),u.children&&u.children.length&&l.push(...n(u.children)),l),s)}return n($t.cloneDeep(e),t),t}async function AZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/company/get_company_dict`,method:"get",params:{other_log_info:{title:"查询所有门店"}}}).then(n=>{var s;const o=n;return Cr.company=$t.get(o,"data",[]),Cr.company_id=((s=Qo())==null?void 0:s.companyId)||(e==null?void 0:e.company_id)||$t.get(o,"data.0.company_id"),$t.get(o,"data",[])})}async function TO(e){var s;const t=await Mr.get("userInfo"),n=Wa.value||t.project_code,o=((s=t.roleList[0])==null?void 0:s.id)||lV.value;return Pi({url:`/${n}-web/pri/role/${e?"list_role_by_company_id":"list_all_role"}`,method:"get",params:Object.assign({other_log_info:{title:"查询所有角色"}},e?{company_id:Cr.company_id}:{})}).then(l=>{var u;return Cr.role=$t.get(l,"data",[]),e||(Cr.role_id=((u=Qo())==null?void 0:u.roleId)||o||$t.get(l,"data.0.id")),$t.get(l,"data",[])})}async function DZe(){Cr.table=[],Cr.form=[];const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/perminssion/get_menu_list_by_pervalue`,method:"get",params:{role_id:Cr.role_id,other_log_info:{title:"根据角色id,获取菜单"}}}).then(n=>n.data)}async function NZe({dict_json:e,data_json:t,dict_functions:n,data_functions:o}){const s={},l={};for(let v in e){const{name:_,code:y}=e[v];s[y]=_}for(let v in t){const{label:_,value:y}=t[v];l[y]=_}Cr.dictAuthName=s,Cr.dataAuthName=l;const u=e.map(v=>v.code).join(",");Cr.dictAuth={};const d=await Mr.get("userInfo"),p=Wa.value||d.project_code;u&&Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:u,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;Cr.dictAuth=RZe(_.data,n)});const h=t.map(v=>v.value).join(",");Cr.dataAuth={},h&&Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:h,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;Cr.dataAuth=OZe(_.data,o)})}function RZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.id]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.id}.show`,!1)}),o[l]=e[l]}return o}function OZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.dict_child_code]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.dict_child_code}.show`,!1)}),o[l]=e[l]}return o}const MZe={class:"flex flex-col h-full overflow-hidden"},PZe={class:"flex flex-1 dialog-bottom"},VZe={class:"flex overflow-y-auto dialog-left"},LZe={class:"flex-1"},BZe={class:"auth_box"},FZe={class:"flex flex-wrap flex-1 border-top-1",style:{padding:"14px"}},$Ze={class:"flex items-center justify-center h-16"},UZe=i.defineComponent({__name:"popup",props:{close:{type:Function},row:{type:Object}},setup(e){const t=e,n=i.ref(),o=i.ref(!1),s=i.ref([]);i.onMounted(()=>{var y,b;IZe(),l(),(y=t.row)!=null&&y.showCompany?AZe().then(()=>{var w;TO((w=t.row)==null?void 0:w.showCompany).then(()=>{var C;Cr.role_id=((C=Qo())==null?void 0:C.roleId)||$t.get(Cr.role,"0.id",""),d()})}):TO((b=t.row)==null?void 0:b.showCompany).then(()=>{d()})});async function l(){const b=(await Mr.get("userInfo")).project_code;Pi({url:`/${b}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:"drugstore",other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(w=>{s.value=w.data.drugstore.map(C=>({...C,show:!1}))})}function u(){var y;TO((y=t.row)==null?void 0:y.showCompany).then(()=>{var b;Cr.role_id=$t.get(Cr.role,"0.id",(b=Qo())==null?void 0:b.roleId),d()})}function d(y=[]){DZe().then(b=>{if(n.value&&(n.value.setCheckedKeys(b,!1),Cr.menu_id)){const w=Cr.menuFlat.find(C=>C.id===Cr.menu_id);w&&p(w)}})}async function p(y){if(!$t.isEmpty(y.children))return;const b=y.dict_json?JSON.parse(y.dict_json):[],w=y.data_json?JSON.parse(y.data_json):[];Cr.menu_id=y.id,n.value.setCurrentKey(y.id);const{role_id:C,menu_id:T}=Cr;if(!C){Vc.warning("请选择角色!");return}CZe({role_id:C,menu_id:T,dict_json:b,data_json:w})}function h(){if(!n.value)return[];const y=n.value.getCheckedKeys(!1),b=n.value.store.nodesMap;return y.filter(C=>{const T=b[C];return T&&(!T.childNodes||T.childNodes.length===0)})}function v(){Y8({title:"提示",message:"快速设置是将【当前用户】所拥有的页面权限,快速设置给指定的角色,请谨慎操作,是否继续?",closeOnClickModal:!1,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",beforeClose:async(y,b,w)=>{if(y!=="confirm")return w();b.confirmButtonLoading=!0,_().finally(()=>{w()})}})}async function _(){let b={menu_id_str:h().join(),role_id:Cr.role_id,company_data:JSON.stringify(s.value)};const C=(await Mr.get("userInfo")).project_code;return Pi({url:`/${C}-web/pri/v2/perminssion/set_prminssion`,method:"post",data:{...b,other_log_info:{title:"保存权限"}}}).then(T=>{T.code==1&&(Vc.success("保存成功"),t.close("confirm"))})}return(y,b)=>{const w=i.resolveComponent("el-option"),C=i.resolveComponent("el-select"),T=i.resolveComponent("el-form-item"),I=i.resolveComponent("el-form"),D=i.resolveComponent("bc-icon"),k=i.resolveComponent("el-tree"),O=i.resolveComponent("el-checkbox"),L=i.resolveComponent("el-button"),P=i.resolveComponent("bc-button"),V=i.resolveDirective("loading");return i.openBlock(),i.createElementBlock("div",MZe,[i.createVNode(I,{size:"small",class:"flex el-form",style:{gap:"20px"}},{default:i.withCtx(()=>[i.createVNode(T,{label:"门店"},{default:i.withCtx(()=>[i.createVNode(C,{modelValue:i.unref(Cr).company_id,"onUpdate:modelValue":b[0]||(b[0]=$=>i.unref(Cr).company_id=$),placeholder:"请选择",filterable:"",onChange:u,style:{width:"200px"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Cr).company,$=>(i.openBlock(),i.createBlock(w,{key:$.company_id,label:$.company_name,value:$.company_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),i.createVNode(T,{label:"角色"},{default:i.withCtx(()=>[i.createVNode(C,{modelValue:i.unref(Cr).role_id,"onUpdate:modelValue":b[1]||(b[1]=$=>i.unref(Cr).role_id=$),placeholder:"请选择",filterable:"",onChange:d,style:{width:"200px"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Cr).role,$=>(i.openBlock(),i.createBlock(w,{key:$.id,label:$.role_name,value:$.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),i.withDirectives((i.openBlock(),i.createElementBlock("div",PZe,[i.createElementVNode("div",VZe,[i.createVNode(k,{"highlight-current":"","show-checkbox":"",style:{width:"240px",flex:"1"},ref_key:"treeRef",ref:n,"node-key":"id","empty-text":"暂无数据",data:i.unref(Cr).menu,"current-node-key":i.unref(Cr).menu_id,onNodeClick:p,onCheck:p},{default:i.withCtx(({data:$})=>[i.createVNode(D,{class:"mr-1",name:$.meta.icon},null,8,["name"]),i.createElementVNode("span",null,i.toDisplayString($.meta.title),1)]),_:1},8,["data","current-node-key"])]),i.createElementVNode("div",LZe,[i.createElementVNode("div",BZe,[b[3]||(b[3]=i.createElementVNode("div",{class:"auth_box-title"},"数据权限",-1)),i.createElementVNode("div",null,[i.createElementVNode("div",FZe,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,$=>(i.openBlock(),i.createBlock(O,{key:$.dict_child_code,modelValue:$.show,"onUpdate:modelValue":Y=>$.show=Y},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString($.show_name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])])])])])),[[V,o.value]]),i.createElementVNode("footer",$Ze,[i.createVNode(L,{size:"default",onClick:b[2]||(b[2]=$=>e.close("cancel"))},{default:i.withCtx(()=>[...b[4]||(b[4]=[i.createTextVNode("关闭",-1)])]),_:1}),i.createVNode(P,{type:"primary",size:"default",onClick:v},{default:i.withCtx(()=>[...b[5]||(b[5]=[i.createTextVNode("保存设置",-1)])]),_:1})])])}}}),zZe=p7(UZe,[["__scopeId","data-v-7072eb9d"]]);function HZe(e){return new Promise(t=>{Fne(zZe,{row:e},{title:"快速设置权限",width:"900px",height:"80%",success:({data:n})=>t(n),showFooter:!1})})}const Wa=i.ref(""),lV=i.ref("");function WZe(e,t){Wa.value=e.projectCode,lV.value=e.roleId||"";const n=i.ref(!1),o=i.ref(!1),s=i.ref(""),l=i.ref(),u=i.ref(!1),d=i.ref(),p=i.ref();i.onActivated(()=>{_Ze(),e.showCompany?(y(),bZe().then(()=>{SO(e.showCompany).then(()=>{var P;hr.role_id=((P=Qo())==null?void 0:P.roleId)||$t.get(hr.role,"0.id",""),T()})})):SO(e.showCompany).then(()=>{T()})});const h=()=>{s.value="",l.value=""},v=()=>{o.value=!1,h()};function _(P){var V;P&&(s.value=P,l.value=(V=p.value.find($=>$.code==P))==null?void 0:V.name)}async function y(){const P=await Mr.get("userInfo"),V=Wa.value||P.project_code;Pi({url:`/${V}-web/pri/role/list_role_name`,method:"get",data:{other_log_info:{title:"获取用户信息"}}}).then($=>{$.code===1&&(p.value=$.data||[])})}function b(){HZe(e)}function w(){o.value=!0}function C(){SO(e.showCompany).then(()=>{var P;hr.role_id=$t.get(hr.role,"0.id",(P=Qo())==null?void 0:P.roleId),T()})}function T(){xZe().then(P=>{if(d.value.getInstance().setCheckedKeys(P,!1),hr.menu_id){const V=hr.menuFlat.find($=>$.id===hr.menu_id);V&&I(V),t("ready")}})}async function I(P){if(!$t.isEmpty(P.children))return;const V=P.dict_json?JSON.parse(P.dict_json):[],$=P.data_json?JSON.parse(P.data_json):[];hr.menu_id=P.id,d.value.getInstance().setCurrentKey(P.id);const{role_id:Y,menu_id:F}=hr;if(!Y){Vc.warning("请选择角色!");return}u.value=!0,pZe({role_id:Y,menu_id:F,dict_json:V,data_json:$}).finally(()=>{u.value=!1})}function D(){const P=d.value.getInstance().getNode(hr.menu_id);if(!P){Vc.warning("请选择授权菜单!");return}return u.value=!0,Nq(P.checked?1:0,{is_batch:1,role_name:l.value,role_id:s.value}).then(V=>{V.code===1&&(o.value=!1,Vc.success("保存成功!"),h())}).finally(()=>{u.value=!1})}function k(){const P=d.value.getInstance().getNode(hr.menu_id);if(!P){Vc.warning("请选择授权菜单!");return}return u.value=!0,Nq(P.checked?1:0).then(V=>{hr.id=V.data.id,V.code===1&&Vc.success("保存成功!")}).finally(()=>{u.value=!1})}function O(){XE.form=hr.form,XE.table=hr.table,n.value=!0}function L(P){P==="cancel"&&(hr.form=XE.form,hr.table=XE.table),n.value=!1}return{isShowPopup:n,loading:u,treeRef:d,submit:L,nodeClick:I,saveData:k,setSelelctAll:O,onCompanyChange:C,onRoleChange:T,onPermissionSync:w,onFastSet:b,isShowAsync:o,get_async_role_id:_,async_role_id:s,onSaveAsync:D,role_name_list:p,onClose:h,oncancel:v}}const Zo=i.reactive({id:"",active:"table",activeId:"",typeId:"form",tableId:"",menu:[],menu_id:"",table:[],form:[]}),JE=i.reactive({table:[],form:[]});async function jZe({menu_id:e}){const t=await Mr.get("userInfo"),n=GT.value||t.project_code;return Pi({url:`/${n}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:e,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(o=>{var u;const s=[],l=[];return(u=o.data)==null||u.forEach(d=>{d.config_type==="1"&&s.push(d),d.config_type==="2"&&l.push(d)}),Zo.active="table",Zo.activeId=$t.get(s,"0.config_unique_id"),Zo.tableId=$t.get(s,"0.tables.0.id"),Zo.table=s,Zo.form=l,Zo})}async function GZe(){const{table:e,form:t}=Zo,n=[...e,...t],o={json_data:JSON.stringify(n),menu_id:Zo.menu_id};Zo.id&&(o.id=Zo.id);const s=await Mr.get("userInfo"),l=GT.value||s.project_code;return Pi({url:`/${l}-web/pri/v2/field/add_field_batch`,method:"post",data:{...o,other_log_info:{title:"添加页面字段信息_批量"}}})}async function qZe(){const e=await Mr.get("userInfo"),t=GT.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(n=>{const o=n;Zo.menu=o.data})}const GT=i.ref("");function YZe(e){GT.value=e.projectCode;const t=i.ref(!1),n=i.ref(!1),o=i.ref();i.onMounted(()=>{qZe()});async function s(p){if(!$t.isEmpty(p.children))return;Zo.menu_id=p.id;const{menu_id:h}=Zo;n.value=!0,jZe({menu_id:h}).finally(()=>{n.value=!1})}function l(){return n.value=!0,GZe().then(p=>{p.code===1&&Vc.success("保存成功!")}).finally(()=>{n.value=!1})}function u(){JE.form=Zo.form,JE.table=Zo.table,t.value=!0}function d(p){p==="cancel"&&(Zo.form=JE.form,Zo.table=JE.table),t.value=!1}return{isShowPopup:t,loading:n,treeRef:o,submit:d,nodeClick:s,saveData:l,setSelelctAll:u}}var are={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(ir,function(){function n(r,a){return a.forEach(function(c){c&&typeof c!="string"&&!Array.isArray(c)&&Object.keys(c).forEach(function(f){if(f!=="default"&&!(f in r)){var m=Object.getOwnPropertyDescriptor(c,f);Object.defineProperty(r,f,m.get?m:{enumerable:!0,get:function(){return c[f]}})}})}),Object.freeze(r)}var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof ir<"u"?ir:typeof self<"u"?self:{},s=function(r){try{return!!r()}catch{return!0}},l=!s(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),u=l,d=Function.prototype,p=d.call,h=u&&d.bind.bind(p,p),v=u?h:function(r){return function(){return p.apply(r,arguments)}},_=v,y=_({}.toString),b=_("".slice),w=function(r){return b(y(r),8,-1)},C=s,T=w,I=Object,D=v("".split),k=C(function(){return!I("z").propertyIsEnumerable(0)})?function(r){return T(r)=="String"?D(r,""):I(r)}:I,O=function(r){return r==null},L=O,P=TypeError,V=function(r){if(L(r))throw P("Can't call method on "+r);return r},$=k,Y=V,F=function(r){return $(Y(r))},U=function(r){return r&&r.Math==Math&&r},Q=U(typeof globalThis=="object"&&globalThis)||U(typeof window=="object"&&window)||U(typeof self=="object"&&self)||U(typeof o=="object"&&o)||function(){return this}()||Function("return this")(),X={},le={get exports(){return X},set exports(r){X=r}},ye=Q,ue=Object.defineProperty,G=function(r,a){try{ue(ye,r,{value:a,configurable:!0,writable:!0})}catch{ye[r]=a}return a},ee=G,ne="__core-js_shared__",oe=Q[ne]||ee(ne,{}),Z=oe;(le.exports=function(r,a){return Z[r]||(Z[r]=a!==void 0?a:{})})("versions",[]).push({version:"3.30.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"});var J,H,W=V,ce=Object,ge=function(r){return ce(W(r))},de=ge,te=v({}.hasOwnProperty),fe=Object.hasOwn||function(r,a){return te(de(r),a)},Ie=v,De=0,Ge=Math.random(),ot=Ie(1 .toString),Ce=function(r){return"Symbol("+(r===void 0?"":r)+")_"+ot(++De+Ge,36)},et=typeof navigator<"u"&&String(navigator.userAgent)||"",St=Q,Tt=et,Nt=St.process,vn=St.Deno,hn=Nt&&Nt.versions||vn&&vn.version,nn=hn&&hn.v8;nn&&(H=(J=nn.split("."))[0]>0&&J[0]<4?1:+(J[0]+J[1])),!H&&Tt&&(!(J=Tt.match(/Edge\/(\d+)/))||J[1]>=74)&&(J=Tt.match(/Chrome\/(\d+)/))&&(H=+J[1]);var Xt=H,Yt=Xt,kn=s,mt=!!Object.getOwnPropertySymbols&&!kn(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Yt&&Yt<41}),nt=mt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ye=X,xt=fe,Dt=Ce,Ee=mt,He=nt,ct=Q.Symbol,ve=Ye("wks"),Te=He?ct.for||ct:ct&&ct.withoutSetter||Dt,Oe=function(r){return xt(ve,r)||(ve[r]=Ee&&xt(ct,r)?ct[r]:Te("Symbol."+r)),ve[r]},qe=typeof document=="object"&&document.all,je={all:qe,IS_HTMLDDA:qe===void 0&&qe!==void 0},at=je.all,K=je.IS_HTMLDDA?function(r){return typeof r=="function"||r===at}:function(r){return typeof r=="function"},pe=K,Ae=je.all,Be=je.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:pe(r)||r===Ae}:function(r){return typeof r=="object"?r!==null:pe(r)},Je=Be,Ze=String,we=TypeError,Me=function(r){if(Je(r))return r;throw we(Ze(r)+" is not an object")},Fe={},Ue=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),vt=Ue&&s(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),pt={},Mt=Be,yt=Q.document,Pt=Mt(yt)&&Mt(yt.createElement),ln=function(r){return Pt?yt.createElement(r):{}},Ne=ln,st=!Ue&&!s(function(){return Object.defineProperty(Ne("div"),"a",{get:function(){return 7}}).a!=7}),Bt=l,Zt=Function.prototype.call,Kt=Bt?Zt.bind(Zt):function(){return Zt.apply(Zt,arguments)},wn=Q,xn=K,Dn=function(r,a){return arguments.length<2?(c=wn[r],xn(c)?c:void 0):wn[r]&&wn[r][a];var c},on=v({}.isPrototypeOf),En=Dn,zn=K,Un=on,Bn=Object,tr=nt?function(r){return typeof r=="symbol"}:function(r){var a=En("Symbol");return zn(a)&&Un(a.prototype,Bn(r))},Ri=String,xi=function(r){try{return Ri(r)}catch{return"Object"}},Kr=K,$i=xi,Bi=TypeError,Ci=function(r){if(Kr(r))return r;throw Bi($i(r)+" is not a function")},bo=Ci,na=O,Uo=function(r,a){var c=r[a];return na(c)?void 0:bo(c)},Ao=Kt,da=K,Da=Be,gs=TypeError,be=Kt,ze=Be,ke=tr,Qe=Uo,lt=function(r,a){var c,f;if(a==="string"&&da(c=r.toString)&&!Da(f=Ao(c,r))||da(c=r.valueOf)&&!Da(f=Ao(c,r))||a!=="string"&&da(c=r.toString)&&!Da(f=Ao(c,r)))return f;throw gs("Can't convert object to primitive value")},rt=TypeError,Rt=Oe("toPrimitive"),en=function(r,a){if(!ze(r)||ke(r))return r;var c,f=Qe(r,Rt);if(f){if(a===void 0&&(a="default"),c=be(f,r,a),!ze(c)||ke(c))return c;throw rt("Can't convert object to primitive value")}return a===void 0&&(a="number"),lt(r,a)},dn=en,cn=tr,mn=function(r){var a=dn(r,"string");return cn(a)?a:a+""},Vn=Ue,mr=st,Er=vt,Dr=Me,Ei=mn,si=TypeError,eo=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,_s="enumerable",me="configurable",We="writable";pt.f=Vn?Er?function(r,a,c){if(Dr(r),a=Ei(a),Dr(c),typeof r=="function"&&a==="prototype"&&"value"in c&&We in c&&!c[We]){var f=Ga(r,a);f&&f[We]&&(r[a]=c.value,c={configurable:me in c?c[me]:f[me],enumerable:_s in c?c[_s]:f[_s],writable:!1})}return eo(r,a,c)}:eo:function(r,a,c){if(Dr(r),a=Ei(a),Dr(c),mr)try{return eo(r,a,c)}catch{}if("get"in c||"set"in c)throw si("Accessors not supported");return"value"in c&&(r[a]=c.value),r};var it=Math.ceil,kt=Math.floor,an=Math.trunc||function(r){var a=+r;return(a>0?kt:it)(a)},Ut=an,Cn=function(r){var a=+r;return a!=a||a===0?0:Ut(a)},Sn=Cn,At=Math.max,tn=Math.min,An=function(r,a){var c=Sn(r);return c<0?At(c+a,0):tn(c,a)},pr=Cn,wr=Math.min,jr=function(r){return r>0?wr(pr(r),9007199254740991):0},co=jr,fi=function(r){return co(r.length)},mi=F,to=An,vi=fi,wi=function(r){return function(a,c,f){var m,x=mi(a),S=vi(x),R=to(f,S);if(r&&c!=c){for(;S>R;)if((m=x[R++])!=m)return!0}else for(;S>R;R++)if((r||R in x)&&x[R]===c)return r||R||0;return!r&&-1}},qp={includes:wi(!0),indexOf:wi(!1)},yh={},bh=fe,h2=F,p2=qp.indexOf,c3=yh,xh=v([].push),re=function(r,a){var c,f=h2(r),m=0,x=[];for(c in f)!bh(c3,c)&&bh(f,c)&&xh(x,c);for(;a.length>m;)bh(f,c=a[m++])&&(~p2(x,c)||xh(x,c));return x},Ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tt=re,_t=Ve,Jt=Object.keys||function(r){return tt(r,_t)},Qt=Ue,_n=vt,yn=pt,dt=Me,fn=F,Qn=Jt;Fe.f=Qt&&!_n?Object.defineProperties:function(r,a){dt(r);for(var c,f=fn(a),m=Qn(a),x=m.length,S=0;x>S;)yn.f(r,c=m[S++],f[c]);return r};var Wn,ti=Dn("document","documentElement"),Ti=Ce,fa=X("keys"),Ii=function(r){return fa[r]||(fa[r]=Ti(r))},Gi=Me,ha=Fe,zo=Ve,xd=yh,Eh=ti,Oi=ln,Na="prototype",nc="script",wh=Ii("IE_PROTO"),Sh=function(){},u3=function(r){return"<"+nc+">"+r+"</"+nc+">"},d3=function(r){r.write(u3("")),r.close();var a=r.parentWindow.Object;return r=null,a},Yp=function(){try{Wn=new ActiveXObject("htmlfile")}catch{}var r,a,c;Yp=typeof document<"u"?document.domain&&Wn?d3(Wn):(a=Oi("iframe"),c="java"+nc+":",a.style.display="none",Eh.appendChild(a),a.src=String(c),(r=a.contentWindow.document).open(),r.write(u3("document.F=Object")),r.close(),r.F):d3(Wn);for(var f=zo.length;f--;)delete Yp[Na][zo[f]];return Yp()};xd[wh]=!0;var Ed=Object.create||function(r,a){var c;return r!==null?(Sh[Na]=Gi(r),c=new Sh,Sh[Na]=null,c[wh]=r):c=Yp(),a===void 0?c:ha.f(c,a)},Kp=Oe,wd=Ed,YT=pt.f,Xp=Kp("unscopables"),Jp=Array.prototype;Jp[Xp]==null&&YT(Jp,Xp,{configurable:!0,value:wd(null)});var Sd,iu,Ch,f3=function(r){Jp[Xp][r]=!0},ou={},m2=K,h3=Q.WeakMap,p3=m2(h3)&&/native code/.test(String(h3)),xo=function(r,a){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:a}},v2=pt,Th=xo,$s=Ue?function(r,a,c){return v2.f(r,a,Th(1,c))}:function(r,a,c){return r[a]=c,r},m3=p3,v3=Q,KT=Be,XT=$s,g2=fe,_2=oe,Cd=Ii,JT=yh,g3="Object already initialized",Ih=v3.TypeError,_3=v3.WeakMap;if(m3||_2.state){var Do=_2.state||(_2.state=new _3);Do.get=Do.get,Do.has=Do.has,Do.set=Do.set,Sd=function(r,a){if(Do.has(r))throw Ih(g3);return a.facade=r,Do.set(r,a),a},iu=function(r){return Do.get(r)||{}},Ch=function(r){return Do.has(r)}}else{var pl=Cd("state");JT[pl]=!0,Sd=function(r,a){if(g2(r,pl))throw Ih(g3);return a.facade=r,XT(r,pl,a),a},iu=function(r){return g2(r,pl)?r[pl]:{}},Ch=function(r){return g2(r,pl)}}var pa={set:Sd,get:iu,has:Ch,enforce:function(r){return Ch(r)?iu(r):Sd(r,{})},getterFor:function(r){return function(a){var c;if(!KT(a)||(c=iu(a)).type!==r)throw Ih("Incompatible receiver, "+r+" required");return c}}},kh={},y2={},au={}.propertyIsEnumerable,qa=Object.getOwnPropertyDescriptor,y3=qa&&!au.call({1:2},1);y2.f=y3?function(r){var a=qa(this,r);return!!a&&a.enumerable}:au;var ZT=Ue,QT=Kt,e5=y2,t5=xo,n5=F,Td=mn,ut=fe,Ot=st,Et=Object.getOwnPropertyDescriptor;kh.f=ZT?Et:function(r,a){if(r=n5(r),a=Td(a),Ot)try{return Et(r,a)}catch{}if(ut(r,a))return t5(!QT(e5.f,r,a),r[a])};var Fn={},gr={get exports(){return Fn},set exports(r){Fn=r}},ni=Ue,po=fe,ki=Function.prototype,b2=ni&&Object.getOwnPropertyDescriptor,b3=po(ki,"name"),Ho={PROPER:b3&&(function(){}).name==="something",CONFIGURABLE:b3&&(!ni||ni&&b2(ki,"name").configurable)},Zp=K,x2=oe,Id=v(Function.toString);Zp(x2.inspectSource)||(x2.inspectSource=function(r){return Id(r)});var kd=x2.inspectSource,Ad=v,Si=s,r5=K,Ah=fe,Dd=Ue,i5=Ho.CONFIGURABLE,o5=kd,a5=pa.enforce,Qp=pa.get,ml=String,su=Object.defineProperty,x3=Ad("".slice),em=Ad("".replace),E3=Ad([].join),w3=Dd&&!Si(function(){return su(function(){},"length",{value:8}).length!==8}),tm=String(String).split("String"),S3=gr.exports=function(r,a,c){x3(ml(a),0,7)==="Symbol("&&(a="["+em(ml(a),/^Symbol\(([^)]*)\)/,"$1")+"]"),c&&c.getter&&(a="get "+a),c&&c.setter&&(a="set "+a),(!Ah(r,"name")||i5&&r.name!==a)&&(Dd?su(r,"name",{value:a,configurable:!0}):r.name=a),w3&&c&&Ah(c,"arity")&&r.length!==c.arity&&su(r,"length",{value:c.arity});try{c&&Ah(c,"constructor")&&c.constructor?Dd&&su(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch{}var f=a5(r);return Ah(f,"source")||(f.source=E3(tm,typeof a=="string"?a:"")),r};Function.prototype.toString=S3(function(){return r5(this)&&Qp(this).source||o5(this)},"toString");var Dh=K,lu=pt,nm=Fn,s5=G,Ya=function(r,a,c,f){f||(f={});var m=f.enumerable,x=f.name!==void 0?f.name:a;if(Dh(c)&&nm(c,x,f),f.global)m?r[a]=c:s5(a,c);else{try{f.unsafe?r[a]&&(m=!0):delete r[a]}catch{}m?r[a]=c:lu.f(r,a,{value:c,enumerable:!1,configurable:!f.nonConfigurable,writable:!f.nonWritable})}return r},Nh={},rm=re,im=Ve.concat("length","prototype");Nh.f=Object.getOwnPropertyNames||function(r){return rm(r,im)};var Rh={};Rh.f=Object.getOwnPropertySymbols;var cu,E2,C3,l5=Dn,mo=Nh,Wo=Rh,c5=Me,u5=v([].concat),T3=l5("Reflect","ownKeys")||function(r){var a=mo.f(c5(r)),c=Wo.f;return c?u5(a,c(r)):a},I3=fe,w2=T3,Oh=kh,S2=pt,uu=function(r,a,c){for(var f=w2(a),m=S2.f,x=Oh.f,S=0;S<f.length;S++){var R=f[S];I3(r,R)||c&&I3(c,R)||m(r,R,x(a,R))}},Mh=s,Ph=K,om=/#|\.prototype\./,Us=function(r,a){var c=f5[d5(r)];return c==p5||c!=h5&&(Ph(a)?Mh(a):!!a)},d5=Us.normalize=function(r){return String(r).replace(om,".").toLowerCase()},f5=Us.data={},h5=Us.NATIVE="N",p5=Us.POLYFILL="P",C2=Us,Nd=Q,Vh=kh.f,k3=$s,_e=Ya,Rd=G,am=uu,Ka=C2,Zn=function(r,a){var c,f,m,x,S,R=r.target,A=r.global,B=r.stat;if(c=A?Nd:B?Nd[R]||Rd(R,{}):(Nd[R]||{}).prototype)for(f in a){if(x=a[f],m=r.dontCallGetSet?(S=Vh(c,f))&&S.value:c[f],!Ka(A?f:R+(B?".":"#")+f,r.forced)&&m!==void 0){if(typeof x==typeof m)continue;am(x,m)}(r.sham||m&&m.sham)&&k3(x,"sham",!0),_e(c,f,x,r)}},m5=!s(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),v5=fe,g5=K,du=ge,_5=m5,A3=Ii("IE_PROTO"),T2=Object,y5=T2.prototype,sm=_5?T2.getPrototypeOf:function(r){var a=du(r);if(v5(a,A3))return a[A3];var c=a.constructor;return g5(c)&&a instanceof c?c.prototype:a instanceof T2?y5:null},vl=s,b5=K,x5=Be,D3=sm,E5=Ya,I2=Oe("iterator"),zs=!1;[].keys&&("next"in(C3=[].keys())?(E2=D3(D3(C3)))!==Object.prototype&&(cu=E2):zs=!0);var w5=!x5(cu)||vl(function(){var r={};return cu[I2].call(r)!==r});w5&&(cu={}),b5(cu[I2])||E5(cu,I2,function(){return this});var k2={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:zs},S5=pt.f,C5=fe,N3=Oe("toStringTag"),Xa=function(r,a,c){r&&!c&&(r=r.prototype),r&&!C5(r,N3)&&S5(r,N3,{configurable:!0,value:a})},T5=k2.IteratorPrototype,I5=Ed,ys=xo,k5=Xa,A5=ou,D5=function(){return this},R3=function(r,a,c,f){var m=a+" Iterator";return r.prototype=I5(T5,{next:ys(+!f,c)}),k5(r,m,!1),A5[m]=D5,r},N5=v,O3=Ci,M3=K,R5=String,O5=TypeError,A2=function(r,a,c){try{return N5(O3(Object.getOwnPropertyDescriptor(r,a)[c]))}catch{}},Lh=Me,lm=function(r){if(typeof r=="object"||M3(r))return r;throw O5("Can't set "+R5(r)+" as a prototype")},Od=Object.setPrototypeOf||("__proto__"in{}?function(){var r,a=!1,c={};try{(r=A2(Object.prototype,"__proto__","set"))(c,[]),a=c instanceof Array}catch{}return function(f,m){return Lh(f),lm(m),a?r(f,m):f.__proto__=m,f}}():void 0),P3=Zn,M5=Kt,gl=K,D2=R3,rc=sm,Ra=Od,P5=Xa,V3=$s,cm=Ya,Bh=ou,ic=Ho.PROPER,L3=Ho.CONFIGURABLE,B3=k2.IteratorPrototype,fu=k2.BUGGY_SAFARI_ITERATORS,Fh=Oe("iterator"),N2="keys",no="values",um="entries",F3=function(){return this},bs=function(r,a,c,f,m,x,S){D2(c,a,f);var R,A,B,q=function(Vt){if(Vt===m&&ht)return ht;if(!fu&&Vt in xe)return xe[Vt];switch(Vt){case N2:case no:case um:return function(){return new c(this,Vt)}}return function(){return new c(this)}},j=a+" Iterator",he=!1,xe=r.prototype,Pe=xe[Fh]||xe["@@iterator"]||m&&xe[m],ht=!fu&&Pe||q(m),Ft=a=="Array"&&xe.entries||Pe;if(Ft&&(R=rc(Ft.call(new r)))!==Object.prototype&&R.next&&(rc(R)!==B3&&(Ra?Ra(R,B3):gl(R[Fh])||cm(R,Fh,F3)),P5(R,j,!0)),ic&&m==no&&Pe&&Pe.name!==no&&(L3?V3(xe,"name",no):(he=!0,ht=function(){return M5(Pe,this)})),m)if(A={values:q(no),keys:x?ht:q(N2),entries:q(um)},S)for(B in A)(fu||he||!(B in xe))&&cm(xe,B,A[B]);else P3({target:a,proto:!0,forced:fu||he},A);return xe[Fh]!==ht&&cm(xe,Fh,ht,{name:m}),Bh[a]=ht,A},dm=function(r,a){return{value:r,done:a}},fm=F,_l=f3,R2=ou,jo=pa,O2=pt.f,V5=bs,$3=dm,L5=Ue,hm="Array Iterator",B5=jo.set,$h=jo.getterFor(hm),U3=V5(Array,"Array",function(r,a){B5(this,{type:hm,target:fm(r),index:0,kind:a})},function(){var r=$h(this),a=r.target,c=r.kind,f=r.index++;return!a||f>=a.length?(r.target=void 0,$3(void 0,!0)):$3(c=="keys"?f:c=="values"?a[f]:[f,a[f]],!1)},"values"),z3=R2.Arguments=R2.Array;if(_l("keys"),_l("values"),_l("entries"),L5&&z3.name!=="values")try{O2(z3,"name",{value:"values"})}catch{}var H3={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},hu=ln("span").classList,W3=hu&&hu.constructor&&hu.constructor.prototype,j3=W3===Object.prototype?void 0:W3,pm=Q,M2=H3,F5=j3,Uh=U3,P2=$s,V2=Oe,zh=V2("iterator"),G3=V2("toStringTag"),Hh=Uh.values,L2=function(r,a){if(r){if(r[zh]!==Hh)try{P2(r,zh,Hh)}catch{r[zh]=Hh}if(r[G3]||P2(r,G3,a),M2[a]){for(var c in Uh)if(r[c]!==Uh[c])try{P2(r,c,Uh[c])}catch{r[c]=Uh[c]}}}};for(var mm in M2)L2(pm[mm]&&pm[mm].prototype,mm);L2(F5,"DOMTokenList");var Md=typeof process<"u"&&w(process)=="process",Wh=Fn,$5=pt,oc=function(r,a,c){return c.get&&Wh(c.get,a,{getter:!0}),c.set&&Wh(c.set,a,{setter:!0}),$5.f(r,a,c)},q3=Dn,U5=oc,Y3=Ue,K3=Oe("species"),Pd=function(r){var a=q3(r);Y3&&a&&!a[K3]&&U5(a,K3,{configurable:!0,get:function(){return this}})},X3=on,B2=TypeError,jh=function(r,a){if(X3(a,r))return r;throw B2("Incorrect invocation")},vm={};vm[Oe("toStringTag")]="z";var Pr=String(vm)==="[object z]",z5=K,gm=w,Gh=Oe("toStringTag"),J3=Object,H5=gm(function(){return arguments}())=="Arguments",ac=Pr?gm:function(r){var a,c,f;return r===void 0?"Undefined":r===null?"Null":typeof(c=function(m,x){try{return m[x]}catch{}}(a=J3(r),Gh))=="string"?c:H5?gm(a):(f=gm(a))=="Object"&&z5(a.callee)?"Arguments":f},Ja=v,W5=s,qh=K,F2=ac,Z3=kd,$2=function(){},Oa=[],yl=Dn("Reflect","construct"),Yh=/^\s*(?:class|function)\b/,Q3=Ja(Yh.exec),_m=!Yh.exec($2),Vd=function(r){if(!qh(r))return!1;try{return yl($2,Oa,r),!0}catch{return!1}},ym=function(r){if(!qh(r))return!1;switch(F2(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _m||!!Q3(Yh,Z3(r))}catch{return!0}};ym.sham=!0;var Ld,sc,bm,Hs,U2=!yl||W5(function(){var r;return Vd(Vd.call)||!Vd(Object)||!Vd(function(){r=!0})||r})?ym:Vd,lc=U2,e6=xi,t6=TypeError,xm=function(r){if(lc(r))return r;throw t6(e6(r)+" is not a constructor")},n6=Me,j5=xm,G5=O,r6=Oe("species"),Em=function(r,a){var c,f=n6(r).constructor;return f===void 0||G5(c=n6(f)[r6])?a:j5(c)},q5=l,z2=Function.prototype,H2=z2.apply,ra=z2.call,xs=typeof Reflect=="object"&&Reflect.apply||(q5?ra.bind(H2):function(){return ra.apply(H2,arguments)}),Y5=w,K5=v,cc=function(r){if(Y5(r)==="Function")return K5(r)},Bd=Ci,i6=l,o6=cc(cc.bind),uc=function(r,a){return Bd(r),a===void 0?r:i6?o6(r,a):function(){return r.apply(a,arguments)}},a6=v([].slice),Fd=TypeError,pu=function(r,a){if(r<a)throw Fd("Not enough arguments");return r},s6=/(?:ipad|iphone|ipod).*applewebkit/i.test(et),ma=Q,l6=xs,wm=uc,W2=K,Sm=fe,Cm=s,Kh=ti,X5=a6,j2=ln,Tm=pu,c6=s6,G2=Md,q2=ma.setImmediate,Y2=ma.clearImmediate,bl=ma.process,Im=ma.Dispatch,u6=ma.Function,d6=ma.MessageChannel,f6=ma.String,K2=0,Xh={},Ws="onreadystatechange";Cm(function(){Ld=ma.location});var Jh=function(r){if(Sm(Xh,r)){var a=Xh[r];delete Xh[r],a()}},Zh=function(r){return function(){Jh(r)}},km=function(r){Jh(r.data)},Qh=function(r){ma.postMessage(f6(r),Ld.protocol+"//"+Ld.host)};q2&&Y2||(q2=function(r){Tm(arguments.length,1);var a=W2(r)?r:u6(r),c=X5(arguments,1);return Xh[++K2]=function(){l6(a,void 0,c)},sc(K2),K2},Y2=function(r){delete Xh[r]},G2?sc=function(r){bl.nextTick(Zh(r))}:Im&&Im.now?sc=function(r){Im.now(Zh(r))}:d6&&!c6?(Hs=(bm=new d6).port2,bm.port1.onmessage=km,sc=wm(Hs.postMessage,Hs)):ma.addEventListener&&W2(ma.postMessage)&&!ma.importScripts&&Ld&&Ld.protocol!=="file:"&&!Cm(Qh)?(sc=Qh,ma.addEventListener("message",km,!1)):sc=Ws in j2("script")?function(r){Kh.appendChild(j2("script"))[Ws]=function(){Kh.removeChild(this),Jh(r)}}:function(r){setTimeout(Zh(r),0)});var mu={set:q2},ar=function(){this.head=null,this.tail=null};ar.prototype={add:function(r){var a={item:r,next:null},c=this.tail;c?c.next=a:this.head=a,this.tail=a},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}};var xl,e0,El,X2,Am,J2=ar,Go=/ipad|iphone|ipod/i.test(et)&&typeof Pebble<"u",J5=/web0s(?!.*chrome)/i.test(et),vu=Q,Z2=uc,Z5=kh.f,Dm=mu.set,Q5=J2,eI=s6,tI=Go,wl=J5,No=Md,Nm=vu.MutationObserver||vu.WebKitMutationObserver,h6=vu.document,Rm=vu.process,Om=vu.Promise,p6=Z5(vu,"queueMicrotask"),gu=p6&&p6.value;if(!gu){var t0=new Q5,n0=function(){var r,a;for(No&&(r=Rm.domain)&&r.exit();a=t0.get();)try{a()}catch(c){throw t0.head&&xl(),c}r&&r.enter()};eI||No||wl||!Nm||!h6?!tI&&Om&&Om.resolve?((X2=Om.resolve(void 0)).constructor=Om,Am=Z2(X2.then,X2),xl=function(){Am(n0)}):No?xl=function(){Rm.nextTick(n0)}:(Dm=Z2(Dm,vu),xl=function(){Dm(n0)}):(e0=!0,El=h6.createTextNode(""),new Nm(n0).observe(El,{characterData:!0}),xl=function(){El.data=e0=!e0}),gu=function(r){t0.head||xl(),t0.add(r)}}var nI=gu,Q2=function(r){try{return{error:!1,value:r()}}catch(a){return{error:!0,value:a}}},r0=Q.Promise,m6=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",v6=!m6&&!Md&&typeof window=="object"&&typeof document=="object",g6=Q,i0=r0,e1=K,_6=C2,o0=kd,t1=Oe,y6=v6,b6=m6,$d=Xt;i0&&i0.prototype;var x6=t1("species"),Es=!1,dc=e1(g6.PromiseRejectionEvent),rI=_6("Promise",function(){var r=o0(i0),a=r!==String(i0);if(!a&&$d===66)return!0;if(!$d||$d<51||!/native code/.test(r)){var c=new i0(function(m){m(1)}),f=function(m){m(function(){},function(){})};if((c.constructor={})[x6]=f,!(Es=c.then(function(){})instanceof f))return!0}return!a&&(y6||b6)&&!dc}),fc={CONSTRUCTOR:rI,REJECTION_EVENT:dc,SUBCLASSING:Es},Ud={},E6=Ci,iI=TypeError,oI=function(r){var a,c;this.promise=new r(function(f,m){if(a!==void 0||c!==void 0)throw iI("Bad Promise constructor");a=f,c=m}),this.resolve=E6(a),this.reject=E6(c)};Ud.f=function(r){return new oI(r)};var n1,w6,S6,aI=Zn,Mm=Md,hc=Q,zd=Kt,r1=Ya,i1=Od,C6=Xa,sI=Pd,lI=Ci,Pm=K,T6=Be,cI=jh,uI=Em,I6=mu.set,o1=nI,dI=function(r,a){try{arguments.length==1?console.error(r):console.error(r,a)}catch{}},fI=Q2,Za=J2,k6=pa,Vm=r0,A6=Ud,a0="Promise",D6=fc.CONSTRUCTOR,hI=fc.REJECTION_EVENT,pI=fc.SUBCLASSING,a1=k6.getterFor(a0),s1=k6.set,Hd=Vm&&Vm.prototype,Wd=Vm,Lm=Hd,N6=hc.TypeError,l1=hc.document,c1=hc.process,u1=A6.f,mI=u1,vI=!!(l1&&l1.createEvent&&hc.dispatchEvent),R6="unhandledrejection",O6=function(r){var a;return!(!T6(r)||!Pm(a=r.then))&&a},M6=function(r,a){var c,f,m,x=a.value,S=a.state==1,R=S?r.ok:r.fail,A=r.resolve,B=r.reject,q=r.domain;try{R?(S||(a.rejection===2&&_I(a),a.rejection=1),R===!0?c=x:(q&&q.enter(),c=R(x),q&&(q.exit(),m=!0)),c===r.promise?B(N6("Promise-chain cycle")):(f=O6(c))?zd(f,c,A,B):A(c)):B(x)}catch(j){q&&!m&&q.exit(),B(j)}},P6=function(r,a){r.notified||(r.notified=!0,o1(function(){for(var c,f=r.reactions;c=f.get();)M6(c,r);r.notified=!1,a&&!r.rejection&&gI(r)}))},V6=function(r,a,c){var f,m;vI?((f=l1.createEvent("Event")).promise=a,f.reason=c,f.initEvent(r,!1,!0),hc.dispatchEvent(f)):f={promise:a,reason:c},!hI&&(m=hc["on"+r])?m(f):r===R6&&dI("Unhandled promise rejection",c)},gI=function(r){zd(I6,hc,function(){var a,c=r.facade,f=r.value;if(L6(r)&&(a=fI(function(){Mm?c1.emit("unhandledRejection",f,c):V6(R6,c,f)}),r.rejection=Mm||L6(r)?2:1,a.error))throw a.value})},L6=function(r){return r.rejection!==1&&!r.parent},_I=function(r){zd(I6,hc,function(){var a=r.facade;Mm?c1.emit("rejectionHandled",a):V6("rejectionhandled",a,r.value)})},jd=function(r,a,c){return function(f){r(a,f,c)}},Gd=function(r,a,c){r.done||(r.done=!0,c&&(r=c),r.value=a,r.state=2,P6(r,!0))},d1=function(r,a,c){if(!r.done){r.done=!0,c&&(r=c);try{if(r.facade===a)throw N6("Promise can't be resolved itself");var f=O6(a);f?o1(function(){var m={done:!1};try{zd(f,a,jd(d1,m,r),jd(Gd,m,r))}catch(x){Gd(m,x,r)}}):(r.value=a,r.state=1,P6(r,!1))}catch(m){Gd({done:!1},m,r)}}};if(D6&&(Lm=(Wd=function(r){cI(this,Lm),lI(r),zd(n1,this);var a=a1(this);try{r(jd(d1,a),jd(Gd,a))}catch(c){Gd(a,c)}}).prototype,(n1=function(r){s1(this,{type:a0,done:!1,notified:!1,parent:!1,reactions:new Za,rejection:!1,state:0,value:void 0})}).prototype=r1(Lm,"then",function(r,a){var c=a1(this),f=u1(uI(this,Wd));return c.parent=!0,f.ok=!Pm(r)||r,f.fail=Pm(a)&&a,f.domain=Mm?c1.domain:void 0,c.state==0?c.reactions.add(f):o1(function(){M6(f,c)}),f.promise}),w6=function(){var r=new n1,a=a1(r);this.promise=r,this.resolve=jd(d1,a),this.reject=jd(Gd,a)},A6.f=u1=function(r){return r===Wd||r===void 0?new w6(r):mI(r)},Pm(Vm)&&Hd!==Object.prototype)){S6=Hd.then,pI||r1(Hd,"then",function(r,a){var c=this;return new Wd(function(f,m){zd(S6,c,f,m)}).then(r,a)},{unsafe:!0});try{delete Hd.constructor}catch{}i1&&i1(Hd,Lm)}aI({global:!0,constructor:!0,wrap:!0,forced:D6},{Promise:Wd}),C6(Wd,a0,!1),sI(a0);var f1=ou,B6=Oe("iterator"),yI=Array.prototype,h1=function(r){return r!==void 0&&(f1.Array===r||yI[B6]===r)},bI=ac,F6=Uo,xI=O,EI=ou,wI=Oe("iterator"),s0=function(r){if(!xI(r))return F6(r,wI)||F6(r,"@@iterator")||EI[bI(r)]},$6=Kt,SI=Ci,Bm=Me,CI=xi,TI=s0,II=TypeError,Fm=function(r,a){var c=arguments.length<2?TI(r):a;if(SI(c))return Bm($6(c,r));throw II(CI(r)+" is not iterable")},kI=Kt,U6=Me,AI=Uo,z6=function(r,a,c){var f,m;U6(r);try{if(!(f=AI(r,"return"))){if(a==="throw")throw c;return c}f=kI(f,r)}catch(x){m=!0,f=x}if(a==="throw")throw c;if(m)throw f;return U6(f),c},DI=uc,NI=Kt,RI=Me,OI=xi,MI=h1,PI=fi,H6=on,VI=Fm,W6=s0,p1=z6,LI=TypeError,$m=function(r,a){this.stopped=r,this.result=a},j6=$m.prototype,G6=function(r,a,c){var f,m,x,S,R,A,B,q=c&&c.that,j=!(!c||!c.AS_ENTRIES),he=!(!c||!c.IS_RECORD),xe=!(!c||!c.IS_ITERATOR),Pe=!(!c||!c.INTERRUPTED),ht=DI(a,q),Ft=function(wt){return f&&p1(f,"normal",wt),new $m(!0,wt)},Vt=function(wt){return j?(RI(wt),Pe?ht(wt[0],wt[1],Ft):ht(wt[0],wt[1])):Pe?ht(wt,Ft):ht(wt)};if(he)f=r.iterator;else if(xe)f=r;else{if(!(m=W6(r)))throw LI(OI(r)+" is not iterable");if(MI(m)){for(x=0,S=PI(r);S>x;x++)if((R=Vt(r[x]))&&H6(j6,R))return R;return new $m(!1)}f=VI(r,m)}for(A=he?r.next:f.next;!(B=NI(A,f)).done;){try{R=Vt(B.value)}catch(wt){p1(f,"throw",wt)}if(typeof R=="object"&&R&&H6(j6,R))return R}return new $m(!1)},l0=Oe("iterator"),q6=!1;try{var BI=0,Y6={next:function(){return{done:!!BI++}},return:function(){q6=!0}};Y6[l0]=function(){return this},Array.from(Y6,function(){throw 2})}catch{}var K6=function(r,a){if(!a&&!q6)return!1;var c=!1;try{var f={};f[l0]=function(){return{next:function(){return{done:c=!0}}}},r(f)}catch{}return c},FI=r0,X6=fc.CONSTRUCTOR||!K6(function(r){FI.all(r).then(void 0,function(){})}),$I=Kt,UI=Ci,zI=Ud,HI=Q2,WI=G6;Zn({target:"Promise",stat:!0,forced:X6},{all:function(r){var a=this,c=zI.f(a),f=c.resolve,m=c.reject,x=HI(function(){var S=UI(a.resolve),R=[],A=0,B=1;WI(r,function(q){var j=A++,he=!1;B++,$I(S,a,q).then(function(xe){he||(he=!0,R[j]=xe,--B||f(R))},m)}),--B||f(R)});return x.error&&m(x.value),c.promise}});var Um=Zn,jI=fc.CONSTRUCTOR,zm=r0,J6=Dn,m1=K,Z6=Ya,v1=zm&&zm.prototype;if(Um({target:"Promise",proto:!0,forced:jI,real:!0},{catch:function(r){return this.then(void 0,r)}}),m1(zm)){var g1=J6("Promise").prototype.catch;v1.catch!==g1&&Z6(v1,"catch",g1,{unsafe:!0})}var Q6=Kt,GI=Ci,qI=Ud,YI=Q2,Hm=G6;Zn({target:"Promise",stat:!0,forced:X6},{race:function(r){var a=this,c=qI.f(a),f=c.reject,m=YI(function(){var x=GI(a.resolve);Hm(r,function(S){Q6(x,a,S).then(c.resolve,f)})});return m.error&&f(m.value),c.promise}});var Wm=Kt,KI=Ud;Zn({target:"Promise",stat:!0,forced:fc.CONSTRUCTOR},{reject:function(r){var a=KI.f(this);return Wm(a.reject,void 0,r),a.promise}});var XI=Me,_1=Be,eb=Ud,tb=function(r,a){if(XI(r),_1(a)&&a.constructor===r)return a;var c=eb.f(r);return(0,c.resolve)(a),c.promise},JI=Zn,ZI=fc.CONSTRUCTOR,QI=tb;Dn("Promise"),JI({target:"Promise",stat:!0,forced:ZI},{resolve:function(r){return QI(this,r)}});var ek=K,tk=Be,nb=Od,rb=function(r,a,c){var f,m;return nb&&ek(f=a.constructor)&&f!==c&&tk(m=f.prototype)&&m!==c.prototype&&nb(r,m),r},nk=Be,rk=w,ik=Oe("match"),ib=function(r){var a;return nk(r)&&((a=r[ik])!==void 0?!!a:rk(r)=="RegExp")},ws=ac,ok=String,Ma=function(r){if(ws(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ok(r)},_u=Me,_r=function(){var r=_u(this),a="";return r.hasIndices&&(a+="d"),r.global&&(a+="g"),r.ignoreCase&&(a+="i"),r.multiline&&(a+="m"),r.dotAll&&(a+="s"),r.unicode&&(a+="u"),r.unicodeSets&&(a+="v"),r.sticky&&(a+="y"),a},ak=Kt,va=fe,ro=on,sk=_r,Sl=RegExp.prototype,ob=function(r){var a=r.flags;return a!==void 0||"flags"in Sl||va(r,"flags")||!ro(Sl,r)?a:ak(sk,r)},y1=s,b1=Q.RegExp,x1=y1(function(){var r=b1("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),lk=x1||y1(function(){return!b1("a","y").sticky}),E1=x1||y1(function(){var r=b1("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),ab={BROKEN_CARET:E1,MISSED_STICKY:lk,UNSUPPORTED_Y:x1},Cl=pt.f,sb=s,jm=Q.RegExp,Ui=sb(function(){var r=jm(".","s");return!(r.dotAll&&r.exec(`
129
+ ***************************************************************************** */var HM=function(e,t){return HM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},HM(e,t)};function HT(e,t){HM(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var wy=function(){return wy=Object.assign||function(t){for(var n,o=1,s=arguments.length;o<s;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},wy.apply(this,arguments)};function Zne(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),s=0,t=0;t<n;t++)for(var l=arguments[t],u=0,d=l.length;u<d;u++,s++)o[s]=l[u];return o}var MJe=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function m8(e){console.error("[BScroll warn]: "+e)}var ru=typeof window<"u",Hg=ru&&navigator.userAgent.toLowerCase(),PJe=!!(Hg&&/wechatdevtools/.test(Hg)),VJe=Hg&&Hg.indexOf("android")>0,LJe=function(){if(typeof Hg=="string"){var e=/os (\d\d?_\d(_\d)?)/,t=e.exec(Hg);if(!t)return!1;var n=t[1].split("_").map(function(o){return parseInt(o,10)});return n[0]===13&&n[1]>=4}return!1}(),Qne=!1;if(ru){var BJe="test-passive";try{var yq={};Object.defineProperty(yq,"passive",{get:function(){Qne=!0}}),window.addEventListener(BJe,function(){},yq)}catch{}}function kp(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var WM=function(e,t){for(var n in t)e[n]=t[n];return e};function jM(e){return e==null}function bq(e,t,n){return e<t?t:e>n?n:e}var sV=ru&&document.createElement("div").style,bg=function(){if(!ru)return!1;for(var e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,n=e;t<n.length;t++){var o=n[t];if(sV[o.value]!==void 0)return o.key}return!1}();function ed(e){return bg===!1?e:bg==="standard"?e==="transitionEnd"?"transitionend":e:bg+e.charAt(0).toUpperCase()+e.substr(1)}function ere(e){return typeof e=="string"?document.querySelector(e):e}function FJe(e,t,n,o){var s=Qne?{passive:!1,capture:!!o}:!!o;e.addEventListener(t,n,s)}function $Je(e,t,n,o){e.removeEventListener(t,n,{capture:!!o})}function tre(e){e.cancelable&&e.preventDefault()}function xq(e){for(var t=0,n=0;e;)t-=e.offsetLeft,n-=e.offsetTop,e=e.offsetParent;return{left:t,top:n}}bg&&bg!=="standard"&&""+bg.toLowerCase();var UJe=ed("transform"),zJe=ed("transition"),HJe=ru&&ed("perspective")in sV,Eq=ru&&("ontouchstart"in window||PJe),WJe=ru&&zJe in sV,ap={transform:UJe,transitionTimingFunction:ed("transitionTimingFunction"),transitionDuration:ed("transitionDuration"),transitionDelay:ed("transitionDelay"),transformOrigin:ed("transformOrigin"),transitionEnd:ed("transitionEnd"),transitionProperty:ed("transitionProperty")},bO={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function wq(e){if(e instanceof window.SVGElement){var t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}else return{top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}}function Sy(e,t){for(var n in t)if(t[n].test(e[n]))return!0;return!1}var jJe=Sy;function GJe(e,t){var n=document.createEvent("Event");n.initEvent(t,!0,!0),n.pageX=e.pageX,n.pageY=e.pageY,e.target.dispatchEvent(n)}function nre(e,t){t===void 0&&(t="click");var n;e.type==="mouseup"?n=e:(e.type==="touchend"||e.type==="touchcancel")&&(n=e.changedTouches[0]);var o={};n&&(o.screenX=n.screenX||0,o.screenY=n.screenY||0,o.clientX=n.clientX||0,o.clientY=n.clientY||0);var s,l=!0,u=!0,d=e.ctrlKey,p=e.shiftKey,h=e.altKey,v=e.metaKey,_={ctrlKey:d,shiftKey:p,altKey:h,metaKey:v};if(typeof MouseEvent<"u")try{s=new MouseEvent(t,WM(wy({bubbles:l,cancelable:u},_),o))}catch{y()}else y();function y(){s=document.createEvent("Event"),s.initEvent(t,l,u),WM(s,o)}s.forwardedTouchEvent=!0,s._constructed=!0,e.target.dispatchEvent(s)}function qJe(e){nre(e,"dblclick")}var q0={swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(e){return 1- --e*e*e*e}}},YJe=1e3/60,Yf=ru&&window;function rre(){}var ire=function(){return ru?Yf.requestAnimationFrame||Yf.webkitRequestAnimationFrame||Yf.mozRequestAnimationFrame||Yf.oRequestAnimationFrame||function(e){return window.setTimeout(e,e.interval||YJe)}:rre}(),Lp=function(){return ru?Yf.cancelAnimationFrame||Yf.webkitCancelAnimationFrame||Yf.mozCancelAnimationFrame||Yf.oCancelAnimationFrame||function(e){window.clearTimeout(e)}:rre}(),Sq=function(e){},xO={enumerable:!0,configurable:!0,get:Sq,set:Sq},KJe=function(e,t){for(var n=t.split("."),o=0;o<n.length-1;o++)if(e=e[n[o]],typeof e!="object"||!e)return;var s=n.pop();return typeof e[s]=="function"?function(){return e[s].apply(e,arguments)}:e[s]},XJe=function(e,t,n){for(var o=t.split("."),s,l=0;l<o.length-1;l++)s=o[l],e[s]||(e[s]={}),e=e[s];e[o.pop()]=n};function JJe(e,t,n){xO.get=function(){return KJe(this,t)},xO.set=function(s){XJe(this,t,s)},Object.defineProperty(e,n,xO)}var ch=function(){function e(t){this.events={},this.eventTypes={},this.registerType(t)}return e.prototype.on=function(t,n,o){return o===void 0&&(o=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([n,o]),this},e.prototype.once=function(t,n,o){var s=this;o===void 0&&(o=this),this.hasType(t);var l=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];s.off(t,l);var p=n.apply(o,u);if(p===!0)return p};return l.fn=n,this.on(t,l),this},e.prototype.off=function(t,n){if(!t&&!n)return this.events={},this;if(t){if(this.hasType(t),!n)return this.events[t]=[],this;var o=this.events[t];if(!o)return this;for(var s=o.length;s--;)(o[s][0]===n||o[s][0]&&o[s][0].fn===n)&&o.splice(s,1);return this}},e.prototype.trigger=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];this.hasType(t);var s=this.events[t];if(s)for(var l=s.length,u=Zne(s),d,p=0;p<l;p++){var h=u[p],v=h[0],_=h[1];if(v&&(d=v.apply(_,n),d===!0))return d}},e.prototype.registerType=function(t){var n=this;t.forEach(function(o){n.eventTypes[o]=o})},e.prototype.destroy=function(){this.events={},this.eventTypes={}},e.prototype.hasType=function(t){var n=this.eventTypes,o=n[t]===t;o||m8('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+(""+Object.keys(n).map(function(s){return JSON.stringify(s)}))+"]")},e}(),J8=function(){function e(t,n){this.wrapper=t,this.events=n,this.addDOMEvents()}return e.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},e.prototype.addDOMEvents=function(){this.handleDOMEvents(FJe)},e.prototype.removeDOMEvents=function(){this.handleDOMEvents($Je)},e.prototype.handleDOMEvents=function(t){var n=this,o=this.wrapper;this.events.forEach(function(s){t(o,s.name,n,!!s.capture)})},e.prototype.handleEvent=function(t){var n=t.type;this.events.some(function(o){return o.name===n?(o.handler(t),!0):!1})},e}(),ZJe=function(){function e(){}return e}(),QJe=function(e){HT(t,e);function t(){var n=e.call(this)||this;return n.startX=0,n.startY=0,n.scrollX=!1,n.scrollY=!0,n.freeScroll=!1,n.directionLockThreshold=0,n.eventPassthrough="",n.click=!1,n.dblclick=!1,n.tap="",n.bounce={top:!0,bottom:!0,left:!0,right:!0},n.bounceTime=800,n.momentum=!0,n.momentumLimitTime=300,n.momentumLimitDistance=15,n.swipeTime=2500,n.swipeBounceTime=500,n.deceleration=.0015,n.flickLimitTime=200,n.flickLimitDistance=100,n.resizePolling=60,n.probeType=0,n.stopPropagation=!1,n.preventDefault=!0,n.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},n.tagException={tagName:/^TEXTAREA$/},n.HWCompositing=!0,n.useTransition=!0,n.bindToWrapper=!1,n.bindToTarget=!1,n.disableMouse=Eq,n.disableTouch=!Eq,n.autoBlur=!0,n.autoEndDistance=5,n.outOfBoundaryDampingFactor=1/3,n.specifiedIndexAsContent=0,n.quadrant=1,n}return t.prototype.merge=function(n){if(!n)return this;for(var o in n){if(o==="bounce"){this.bounce=this.resolveBounce(n[o]);continue}this[o]=n[o]}return this},t.prototype.process=function(){return this.translateZ=this.HWCompositing&&HJe?" translateZ(1px)":"",this.useTransition=this.useTransition&&WJe,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough==="horizontal"?!1:this.scrollX,this.scrollY=this.eventPassthrough==="vertical"?!1:this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=this.freeScroll?!0:this.scrollX,this.scrollY=this.freeScroll?!0:this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},t.prototype.resolveBounce=function(n){var o={top:!0,right:!0,bottom:!0,left:!0},s={top:!1,right:!1,bottom:!1,left:!1},l;return typeof n=="object"?l=WM(o,n):l=n?o:s,l},t}(ZJe),eZe=function(){function e(t,n){this.wrapper=t,this.options=n,this.hooks=new ch(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return e.prototype.handleDOMEvents=function(){var t=this.options,n=t.bindToWrapper,o=t.disableMouse,s=t.disableTouch,l=t.click,u=this.wrapper,d=n?u:window,p=[],h=[],v=!s,_=!o;l&&p.push({name:"click",handler:this.click.bind(this),capture:!0}),v&&(p.push({name:"touchstart",handler:this.start.bind(this)}),h.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),_&&(p.push({name:"mousedown",handler:this.start.bind(this)}),h.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new J8(u,p),this.targetEventRegister=new J8(d,h)},e.prototype.beforeHandler=function(t,n){var o=this.options,s=o.preventDefault,l=o.stopPropagation,u=o.preventDefaultException,d={start:function(){return s&&!Sy(t.target,u)},end:function(){return s&&!Sy(t.target,u)},move:function(){return s}};d[n]()&&t.preventDefault(),l&&t.stopPropagation()},e.prototype.setInitiated=function(t){t===void 0&&(t=0),this.initiated=t},e.prototype.start=function(t){var n=bO[t.type];if(!(this.initiated&&this.initiated!==n)){if(this.setInitiated(n),jJe(t.target,this.options.tagException)){this.setInitiated();return}if(!(n===2&&t.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var o=t.touches?t.touches[0]:t;this.pointX=o.pageX,this.pointY=o.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}}},e.prototype.move=function(t){if(bO[t.type]===this.initiated){this.beforeHandler(t,"move");var n=t.touches?t.touches[0]:t,o=n.pageX-this.pointX,s=n.pageY-this.pointY;if(this.pointX=n.pageX,this.pointY=n.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:s,e:t})){var l=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,u=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,d=this.pointX-l,p=this.pointY-u,h=this.options.autoEndDistance;(d>document.documentElement.clientWidth-h||p>document.documentElement.clientHeight-h||d<h||p<h)&&this.end(t)}}},e.prototype.end=function(t){bO[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},e.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},e.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},e.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},e.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},e}(),EO={x:["translateX","px"],y:["translateY","px"]},tZe=function(){function e(t){this.setContent(t),this.hooks=new ch(["beforeTranslate","translate"])}return e.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),n=t[ap.transform].split(")")[0].split(", "),o=+(n[12]||n[4])||0,s=+(n[13]||n[5])||0;return{x:o,y:s}},e.prototype.translate=function(t){var n=[];Object.keys(t).forEach(function(o){if(EO[o]){var s=EO[o][0];if(s){var l=EO[o][1],u=t[o];n.push(s+"("+u+l+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,n,t),this.style[ap.transform]=n.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},e.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},e.prototype.destroy=function(){this.hooks.destroy()},e}(),ore=function(){function e(t,n,o){this.translater=n,this.options=o,this.timer=0,this.hooks=new ch(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return e.prototype.translate=function(t){this.translater.translate(t)},e.prototype.setPending=function(t){this.pending=t},e.prototype.setForceStopped=function(t){this.forceStopped=t},e.prototype.setCallStop=function(t){this.callStopWhenPending=t},e.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},e.prototype.clearTimer=function(){this.timer&&(Lp(this.timer),this.timer=0)},e.prototype.destroy=function(){this.hooks.destroy(),Lp(this.timer)},e}(),nZe=function(e,t,n,o){var s=function(h,v){var _=h-v,y=_>0?-1:_<0?1:0;return y},l=s(t.x,e.x),u=s(t.y,e.y),d=n.x-o.x,p=n.y-o.y;return l*d<=0&&u*p<=0},rZe=function(e){HT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.startProbe=function(n,o){var s=this,l=n,u=function(){var d=s.translater.getComputedPosition();nZe(n,o,d,l)&&s.hooks.trigger(s.hooks.eventTypes.move,d),s.pending||(s.callStopWhenPending?s.callStopWhenPending=!1:s.hooks.trigger(s.hooks.eventTypes.end,d)),l=d,s.pending&&(s.timer=ire(u))};this.callStopWhenPending&&this.setCallStop(!1),Lp(this.timer),u()},t.prototype.transitionTime=function(n){n===void 0&&(n=0),this.style[ap.transitionDuration]=n+"ms",this.hooks.trigger(this.hooks.eventTypes.time,n)},t.prototype.transitionTimingFunction=function(n){this.style[ap.transitionTimingFunction]=n,this.hooks.trigger(this.hooks.eventTypes.timeFunction,n)},t.prototype.transitionProperty=function(){this.style[ap.transitionProperty]=ap.transform},t.prototype.move=function(n,o,s,l){this.setPending(s>0),this.transitionTimingFunction(l),this.transitionProperty(),this.transitionTime(s),this.translate(o);var u=this.options.probeType===3;s&&u&&this.startProbe(n,o),s||(this._reflow=this.content.offsetHeight,u&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o))},t.prototype.doStop=function(){var n=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),n){this.setPending(!1),Lp(this.timer);var o=this.translater.getComputedPosition(),s=o.x,l=o.y;this.transitionTime(),this.translate({x:s,y:l}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:s,y:l})}return n},t.prototype.stop=function(){var n=this.doStop();n&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(ore),iZe=function(e){HT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.move=function(n,o,s,l){if(!s){this.translate(o),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o);return}this.animate(n,o,s,l)},t.prototype.animate=function(n,o,s,l){var u=this,d=kp(),p=d+s,h=this.options.probeType===3,v=function(){var _=kp();if(_>=p){u.translate(o),h&&u.hooks.trigger(u.hooks.eventTypes.move,o),u.hooks.trigger(u.hooks.eventTypes.end,o);return}_=(_-d)/s;var y=l(_),b={};Object.keys(o).forEach(function(w){var C=n[w],T=o[w];b[w]=(T-C)*y+C}),u.translate(b),h&&u.hooks.trigger(u.hooks.eventTypes.move,b),u.pending&&(u.timer=ire(v)),u.pending||(u.callStopWhenPending?u.callStopWhenPending=!1:u.hooks.trigger(u.hooks.eventTypes.end,o))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),Lp(this.timer),v()},t.prototype.doStop=function(){var n=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),n){this.setPending(!1),Lp(this.timer);var o=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,o)}return n},t.prototype.stop=function(){var n=this.doStop();n&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(ore);function oZe(e,t,n){var o=n.useTransition,s={};return Object.defineProperty(s,"probeType",{enumerable:!0,configurable:!1,get:function(){return n.probeType}}),o?new rZe(e,t,s):new iZe(e,t,s)}var Cq=function(){function e(t,n,o){this.wrapper=t,this.options=o,this.hooks=new ch(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(n)}return e.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},e.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},e.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},e.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},e.prototype.performDampingAlgorithm=function(t,n){var o=this.currentPos+t;return(o>this.minScrollPos||o<this.maxScrollPos)&&(o>this.minScrollPos&&this.options.bounces[0]||o<this.maxScrollPos&&this.options.bounces[1]?o=this.currentPos+t*n:o=o>this.minScrollPos?this.minScrollPos:this.maxScrollPos),o},e.prototype.end=function(t){var n={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&o>this.options.momentumLimitDistance){var s=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;n=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,s,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,n);return n},e.prototype.momentum=function(t,n,o,s,l,u,d){d===void 0&&(d=this.options);var p=t-n,h=Math.abs(p)/o,v=d.deceleration,_=d.swipeBounceTime,y=d.swipeTime,b=Math.min(y,h*2/v),w={destination:t+h*h/v*(p<0?-1:1),duration:b,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,w,p),w.destination<s?(w.destination=u?Math.max(s-u/4,s-u/w.rate*h):s,w.duration=_):w.destination>l&&(w.destination=u?Math.min(l+u/4,l+u/w.rate*h):l,w.duration=_),w.destination=Math.round(w.destination),w},e.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},e.prototype.refresh=function(t){var n=this.options.rect,o=n.size,s=n.position,l=window.getComputedStyle(this.wrapper,null).position==="static",u=wq(this.wrapper);this.wrapperSize=this.wrapper[o==="width"?"clientWidth":"clientHeight"],this.setContent(t);var d=wq(this.content);this.contentSize=d[o],this.relativeOffset=d[s],l&&(this.relativeOffset-=u[s]),this.computeBoundary(),this.setDirection(0)},e.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},e.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},e.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},e.prototype.updatePosition=function(t){this.currentPos=t},e.prototype.getCurrentPos=function(){return this.currentPos},e.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos),n=t===this.getCurrentPos();return{position:t,inBoundary:n}},e.prototype.adjustPosition=function(t){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t=this.minScrollPos:t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos),t},e.prototype.updateStartPos=function(){this.startPos=this.currentPos},e.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},e.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},e.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},e.prototype.destroy=function(){this.hooks.destroy()},e}(),GE,qE,YE,KE,Tq=(GE={},GE.yes=function(e){return!0},GE.no=function(e){return tre(e),!1},GE),aZe=(qE={},qE.horizontal=(YE={},YE.yes="horizontal",YE.no="vertical",YE),qE.vertical=(KE={},KE.yes="vertical",KE.no="horizontal",KE),qE),sZe=function(){function e(t,n,o){this.directionLockThreshold=t,this.freeScroll=n,this.eventPassthrough=o,this.reset()}return e.prototype.reset=function(){this.directionLocked=""},e.prototype.checkMovingDirection=function(t,n,o){return this.computeDirectionLock(t,n),this.handleEventPassthrough(o)},e.prototype.adjustDelta=function(t,n){return this.directionLocked==="horizontal"?n=0:this.directionLocked==="vertical"&&(t=0),{deltaX:t,deltaY:n}},e.prototype.computeDirectionLock=function(t,n){this.directionLocked===""&&!this.freeScroll&&(t>n+this.directionLockThreshold?this.directionLocked="horizontal":n>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},e.prototype.handleEventPassthrough=function(t){var n=aZe[this.directionLocked];if(n){if(this.eventPassthrough===n.yes)return Tq.yes(t);if(this.eventPassthrough===n.no)return Tq.no(t)}return!1},e}(),lZe=function(e,t,n){return n===2?[t,-e]:n===3?[-e,-t]:n===4?[-t,e]:[e,t]},cZe=function(){function e(t,n,o,s,l){this.hooks=new ch(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=n,this.actionsHandler=o,this.animater=s,this.options=l,this.directionLockAction=new sZe(l.directionLockThreshold,l.freeScroll,l.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return e.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(n){return t.enabled?t.handleStart(n):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(n){var o=n.deltaX,s=n.deltaY,l=n.e;if(!t.enabled)return!0;var u=lZe(o,s,t.options.quadrant),d=u[0],p=u[1],h={deltaX:d,deltaY:p};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,h),t.handleMove(h.deltaX,h.deltaY,l)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(n){return t.enabled?t.handleEnd(n):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(n){t.enabled&&!n._constructed&&t.handleClick(n)})},e.prototype.handleStart=function(t){var n=kp();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=n,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},e.prototype.handleMove=function(t,n,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var s=this.scrollBehaviorX.getAbsDist(t),l=this.scrollBehaviorY.getAbsDist(n),u=kp();if(this.checkMomentum(s,l,u))return!0;if(this.directionLockAction.checkMovingDirection(s,l,o))return this.actionsHandler.setInitiated(),!0;var d=this.directionLockAction.adjustDelta(t,n),p=this.scrollBehaviorX.getCurrentPos(),h=this.scrollBehaviorX.move(d.deltaX),v=this.scrollBehaviorY.getCurrentPos(),_=this.scrollBehaviorY.move(d.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var y=h!==p||_!==v;!this.contentMoved&&!y&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&y&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&y&&(this.animater.translate({x:h,y:_}),this.dispatchScroll(u))}}},e.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},e.prototype.checkMomentum=function(t,n,o){return o-this.endTime>this.options.momentumLimitTime&&n<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},e.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var n=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,n))return!0;n=this.ensureIntegerPos(n),this.animater.translate(n),this.endTime=kp();var o=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,n,o)}},e.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var n=t.x,o=t.y,s=this.scrollBehaviorX,l=s.minScrollPos,u=s.maxScrollPos,d=this.scrollBehaviorY,p=d.minScrollPos,h=d.maxScrollPos;return n=n>0?Math.ceil(n):Math.floor(n),o=o>0?Math.ceil(o):Math.floor(o),n=bq(n,u,l),o=bq(o,h,p),{x:n,y:o}},e.prototype.handleClick=function(t){Sy(t.target,this.options.preventDefaultException)||(tre(t),t.stopPropagation())},e.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},e.prototype.refresh=function(){this.endTime=0},e.prototype.destroy=function(){this.hooks.destroy()},e}();function uZe(e){var t=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(n,o){return n[o]=e[o],n},{});return t}function Iq(e,t,n,o){var s=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(l,u){return l[u]=e[u],l},{});return s.scrollable=!!e[t],s.bounces=n,s.rect=o,s}function GM(e,t,n){n.forEach(function(o){var s,l;typeof o=="string"?s=l=o:(s=o.source,l=o.target),e.on(s,function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return t.trigger.apply(t,Zne([l],u))})})}function dZe(e,t){for(var n=Object.keys(e),o=0,s=n;o<s.length;o++){var l=s[o];if(e[l]!==t[l])return!1}return!0}var kq=1,fZe=function(){function e(t,n,o){this.wrapper=t,this.content=n,this.resizeTimeout=0,this.hooks=new ch(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var s=this.options.bounce,l=s.left,u=s.right,d=s.top,p=s.bottom;this.scrollBehaviorX=new Cq(t,n,Iq(o,"scrollX",[l,u],{size:"width",position:"left"})),this.scrollBehaviorY=new Cq(t,n,Iq(o,"scrollY",[d,p],{size:"height",position:"top"})),this.translater=new tZe(this.content),this.animater=oZe(this.content,this.translater,this.options),this.actionsHandler=new eZe(this.options.bindToTarget?this.content:t,uZe(this.options)),this.actions=new cZe(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var h=this.resize.bind(this);this.resizeRegister=new J8(window,[{name:"orientationchange",handler:h},{name:"resize",handler:h}]),this.registerTransitionEnd(),this.init()}return e.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){t.togglePointerEvents(!0)})},e.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new J8(this.content,[{name:ap.transitionEnd,handler:this.transitionEnd.bind(this)}])},e.prototype.bindTranslater=function(){var t=this,n=this.translater.hooks;n.on(n.eventTypes.beforeTranslate,function(o){t.options.translateZ&&o.push(t.options.translateZ)}),n.on(n.eventTypes.translate,function(o){var s=t.getCurrentPos();if(t.updatePositions(o),t.actions.ensuringInteger===!0){t.actions.ensuringInteger=!1;return}(o.x!==s.x||o.y!==s.y)&&t.togglePointerEvents(!1)})},e.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(n){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,n))}),GM(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},e.prototype.bindActions=function(){var t=this,n=this.actions;GM(n.hooks,this.hooks,[{source:n.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:n.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:n.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:n.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:n.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:n.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),n.hooks.on(n.hooks.eventTypes.end,function(o,s){if(t.hooks.trigger(t.hooks.eventTypes.touchEnd,s),t.hooks.trigger(t.hooks.eventTypes.end,s)||!n.fingerMoved&&(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),t.checkClick(o)))return!0;if(t.resetPosition(t.options.bounceTime,q0.bounce))return t.animater.setForceStopped(!1),!0}),n.hooks.on(n.hooks.eventTypes.scrollEnd,function(o,s){var l=Math.abs(o.x-t.scrollBehaviorX.startPos),u=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(s,l,u)){t.animater.setForceStopped(!1),t.hooks.trigger(t.hooks.eventTypes.flick);return}if(t.momentum(o,s)){t.animater.setForceStopped(!1);return}n.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,o),t.animater.forceStopped&&t.animater.setForceStopped(!1)})},e.prototype.checkFlick=function(t,n,o){var s=1;if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&n<this.options.flickLimitDistance&&o<this.options.flickLimitDistance&&(o>s||n>s))return!0},e.prototype.momentum=function(t,n){var o={time:0,easing:q0.swiper,newX:t.x,newY:t.y},s=this.scrollBehaviorX.end(n),l=this.scrollBehaviorY.end(n);if(o.newX=jM(s.destination)?o.newX:s.destination,o.newY=jM(l.destination)?o.newY:l.destination,o.time=Math.max(s.duration,l.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newX<this.scrollBehaviorX.maxScrollPos||o.newY>this.scrollBehaviorY.minScrollPos||o.newY<this.scrollBehaviorY.maxScrollPos)&&(o.easing=q0.swipeBounce),this.scrollTo(o.newX,o.newY,o.time,o.easing),!0},e.prototype.checkClick=function(t){var n={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!n.preventClick){var o=this.options.dblclick,s=!1;if(o&&this.lastClickTime){var l=o.delay,u=l===void 0?300:l;kp()-this.lastClickTime<u&&(s=!0,qJe(t))}return this.options.tap&&GJe(t,this.options.tap),this.options.click&&!Sy(t.target,this.options.preventDefaultException)&&nre(t),this.lastClickTime=s?null:kp(),!0}return!1},e.prototype.resize=function(){var t=this;this.actions.enabled&&(VJe&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(function(){t.hooks.trigger(t.hooks.eventTypes.resize)},this.options.resizePolling))},e.prototype.transitionEnd=function(t){if(!(t.target!==this.content||!this.animater.pending)){var n=this.animater;n.transitionTime(),this.resetPosition(this.options.bounceTime,q0.bounce)||(this.animater.setPending(!1),this.options.probeType!==3&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos()))}},e.prototype.togglePointerEvents=function(t){t===void 0&&(t=!0);for(var n=this.content.children.length?this.content.children:[this.content],o=t?"auto":"none",s=0;s<n.length;s++){var l=n[s];l.isBScrollContainer||(l.style.pointerEvents=o)}},e.prototype.refresh=function(t){var n=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),n&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=xq(this.wrapper)},e.prototype.setContent=function(t){var n=t!==this.content;return n&&(this.content=t),n},e.prototype.scrollBy=function(t,n,o,s){o===void 0&&(o=0);var l=this.getCurrentPos(),u=l.x,d=l.y;s=s||q0.bounce,t+=u,n+=d,this.scrollTo(t,n,o,s)},e.prototype.scrollTo=function(t,n,o,s,l){o===void 0&&(o=0),s===void 0&&(s=q0.bounce),l===void 0&&(l={start:{},end:{}});var u=this.options.useTransition?s.style:s.fn,d=this.getCurrentPos(),p=wy({x:d.x,y:d.y},l.start),h=wy({x:t,y:n},l.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,h),!dZe(p,h)){var v=Math.abs(h.x-p.x),_=Math.abs(h.y-p.y);v<kq&&_<kq&&(o=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(p,h,o,u)}},e.prototype.scrollToElement=function(t,n,o,s,l){var u=ere(t),d=xq(u),p=function(v,_,y){return typeof v=="number"?v:v?Math.round(_/2-y/2):0};o=p(o,u.offsetWidth,this.wrapper.offsetWidth),s=p(s,u.offsetHeight,this.wrapper.offsetHeight);var h=function(v,_,y,b){return v-=_,v=b.adjustPosition(v-y),v};d.left=h(d.left,this.wrapperOffset.left,o,this.scrollBehaviorX),d.top=h(d.top,this.wrapperOffset.top,s,this.scrollBehaviorY),!this.hooks.trigger(this.hooks.eventTypes.scrollToElement,u,d)&&this.scrollTo(d.left,d.top,n,l)},e.prototype.resetPosition=function(t,n){t===void 0&&(t=0),n===void 0&&(n=q0.bounce);var o=this.scrollBehaviorX.checkInBoundary(),s=o.position,l=o.inBoundary,u=this.scrollBehaviorY.checkInBoundary(),d=u.position,p=u.inBoundary;return l&&p?!1:(LJe&&this.reflow(),this.scrollTo(s,d,t,n),!0)},e.prototype.reflow=function(){this._reflow=this.content.offsetHeight},e.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},e.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},e.prototype.enable=function(){this.actions.enabled=!0},e.prototype.disable=function(){Lp(this.animater.timer),this.actions.enabled=!1},e.prototype.destroy=function(){var t=this,n=["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"];n.forEach(function(o){return t[o].destroy()})},e}(),WT=function(e){HT(t,e);function t(n,o){var s=e.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,l=ere(n);return l?(s.plugins={},s.options=new QJe().merge(o).process(),s.setContent(l).valid&&(s.hooks=new ch(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),s.init(l)),s):(m8("Can not resolve the wrapper DOM."),s)}return t.use=function(n){var o=n.pluginName,s=t.plugins.some(function(l){return n===l.ctor});return s?t:jM(o)?(m8("Plugin Class must specify plugin's name in static property by 'pluginName' field."),t):(t.pluginsMap[o]=!0,t.plugins.push({name:o,applyOrder:n.applyOrder,ctor:n}),t)},t.prototype.setContent=function(n){var o=!1,s=!0,l=n.children[this.options.specifiedIndexAsContent];return l?(o=this.content!==l,o&&(this.content=l)):(m8("The wrapper need at least one child element to be content element to scroll."),s=!1),{valid:s,contentChanged:o}},t.prototype.init=function(n){var o=this;this.wrapper=n,n.isBScrollContainer=!0,this.scroller=new fZe(n,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,function(){o.refresh()}),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(MJe),this.applyPlugins(),this.refreshWithoutReset(this.content);var s=this.options,l=s.startX,u=s.startY,d={x:l,y:u};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,d)||this.scroller.scrollTo(d.x,d.y)},t.prototype.applyPlugins=function(){var n=this,o=this.options;t.plugins.sort(function(s,l){var u,d=(u={},u.pre=-1,u.post=1,u),p=s.applyOrder?d[s.applyOrder]:0,h=l.applyOrder?d[l.applyOrder]:0;return p-h}).forEach(function(s){var l=s.ctor;o[s.name]&&typeof l=="function"&&(n.plugins[s.name]=new l(n))})},t.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,function(){var n=document.activeElement;n&&(n.tagName==="INPUT"||n.tagName==="TEXTAREA")&&n.blur()})},t.prototype.eventBubbling=function(){GM(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},t.prototype.refreshWithoutReset=function(n){this.scroller.refresh(n),this.hooks.trigger(this.hooks.eventTypes.refresh,n),this.trigger(this.eventTypes.refresh,n)},t.prototype.proxy=function(n){var o=this;n.forEach(function(s){var l=s.key,u=s.sourceKey;JJe(o,u,l)})},t.prototype.refresh=function(){var n=this.setContent(this.wrapper),o=n.contentChanged,s=n.valid;if(s){var l=this.content;this.refreshWithoutReset(l),o&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,l),this.trigger(this.eventTypes.contentChanged,l)),this.scroller.resetPosition()}},t.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},t.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},t.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},t.prototype.eventRegister=function(n){this.registerType(n)},t.plugins=[],t.pluginsMap={},t}(ch);function jT(e,t){var n=new WT(e,t);return n}jT.use=WT.use;jT.plugins=WT.plugins;jT.pluginsMap=WT.pluginsMap;var hZe=jT;const pZe=i.defineComponent({name:"bcGroup",props:{value:{type:Object,required:!0},elComponent:{type:String,required:!0},fieldComponent:{type:String,required:!0}},emits:["change"],setup(e,{emit:t,expose:n}){const o=i.useAttrs(),s=i.inject("bcTableApi"),l=i.inject("setItemInstance",()=>{}),u=i.ref(),[d,p]=$t.get(e,`value.${e.fieldComponent}`,[]),h=i.ref({[d]:"",[p]:""}),v=i.ref([e.value[d],e.value[p]]);i.watch(()=>e.value,()=>{v.value=[e.value[d],e.value[p]]});function _(T){var O,L,P;const I=e.elComponent==="hs-date-picker",D=o.format==="YYYY-MM-DD",k=o["value-format"]==="YYYY-MM-DD HH:mm:ss";if(Array.isArray(T)){let[V,$]=T;I&&D&&k&&($=$?Pn($).format("YYYY-MM-DD")+" 23:59:59":""),h.value[d]=V,h.value[p]=$}else if(T!=null&&T.target&&((L=(O=T==null?void 0:T.target)==null?void 0:O.value)==null?void 0:L.length)===8&&e.elComponent==="hs-date-picker"){const V=((P=T==null?void 0:T.target)==null?void 0:P.value)||"";Array.from(T.target.parentNode.querySelectorAll("input")).findIndex(Y=>Y===T.target)===0?h.value[d]=V?Pn(V).format("YYYY-MM-DD")+" 00:00:00":"":D&&k?h.value[p]=V?Pn(V).format("YYYY-MM-DD")+" 23:59:59":"":h.value[p]=V?Pn(V).format("YYYY-MM-DD"):"",v.value=[h.value[d],h.value[p]]}else h.value[d]="",h.value[p]="";s==null||s.updateSearchForm(h.value),t("change",T)}function y(){_(["",""]),v.value=["",""]}function b(){var T,I,D;return typeof((T=u.value)==null?void 0:T.activeElement)=="function"?(I=u.value)==null?void 0:I.activeElement():(D=u.value)==null?void 0:D.$el}function w(){var T;(T=u.value)==null||T.focus()}function C(){return e.fieldComponent}return i.onMounted(()=>{var D,k,O;const T=(D=b())==null?void 0:D.closest(".el-form-item"),I=(O=(k=T==null?void 0:T.className)==null?void 0:k.match(/query_[a-zA-Z0-9_]+/))==null?void 0:O[0];I&&l({clearData:y,getField:C,focus:w,activeElement:b},I.replace("query_",""))}),n({clearData:y,getField:C,focus:w,activeElement:b}),{elRef:u,groupData:v,focus:w,onChange:_}}}),hr=i.reactive({id:"",tab:"config",active:"table",activeId:"",typeId:"btns",tableId:"",menu:[],menuFlat:[],company:[],company_id:"",role:[],role_id:"",menu_id:"",table:[],form:[],dictAuthName:{},dictAuth:{},dataAuthName:{},dataAuth:{}}),XE=i.reactive({table:[],form:[]});async function mZe({role_id:e,menu_id:t,dict_json:n,data_json:o}){var _,y,b,w;hr.id="";const s=await Mr.get("userInfo"),l=Wa.value||s.project_code,u=await Pi({url:`/${l}-web/pri/v2/perminssion/get_menu_prminssion_info`,method:"get",params:{role_id:e,menu_id:t,other_log_info:{title:"获取权限,(权限设置时,使用)"}}}),d={};hr.id=((_=u==null?void 0:u.data)==null?void 0:_.id)||"";const p=(y=u.data)!=null&&y.config_functions?JSON.parse(u.data.config_functions):[],h=Aq((b=u==null?void 0:u.data)==null?void 0:b.dict_functions),v=Aq((w=u==null?void 0:u.data)==null?void 0:w.data_functions);return wZe({dict_json:n,data_json:o,dict_functions:h,data_functions:v}),p.forEach(C=>{d[C.config_unique_id]=vZe(C)}),Pi({url:`/${l}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:t,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(C=>{var D;const T=[],I=[];return(D=C.data)==null||D.forEach(k=>{k.config_type==="1"&&T.push(k),k.config_type==="2"&&I.push(k)}),hr.tab="config",hr.active="table",hr.activeId=$t.get(T,"0.config_unique_id"),hr.typeId="btns",hr.tableId=$t.get(T,"0.tables.0.id"),hr.table=Dq(T,d),hr.form=Dq(I,d),hr})}function Aq(e){return e?e?JSON.parse(e).reduce((t,n)=>(t[n.code]=n.json_data,t),{}):{}:{}}function Dq(e,t){return $t.isEmpty(t)?e:e.map(n=>(n.btns.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.btns.${o.fieldProp}.fieldShow`,!1)),o)),n.form.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.form.${o.fieldProp}.fieldShow`,!1)),o)),n.tables.map(o=>{var l;if(!t[n.config_unique_id])return n;const s=$t.get(t,`${n.config_unique_id}.tables.${o.id}`,{});return o.data=((l=o.data)==null?void 0:l.map(u=>{var p;const d=s[u.fieldProp];return d&&(u.fieldShow=d.fieldShow,u.option=((p=u.option)==null?void 0:p.map(h=>{var _;const v=d.option||[];return h.fieldShow=((_=v==null?void 0:v.find(y=>y.fieldProp===h.fieldProp))==null?void 0:_.fieldShow)??!1,h}))||[]),u}))||[],o}),n))}function vZe(e){const t={btns:wO(e.btns),form:wO(e.form),tables:{}};return e.tables.forEach(n=>{t.tables[n.id]=wO(n.data)}),t}function wO(e){const t={auth_data_func_01_000:[]};return e.forEach(n=>{t[n.fieldProp]=n}),t}async function Nq(e,t){const{table:n,form:o,menu_id:s,company_id:l,role_id:u,id:d}=hr,p=[...n,...o];let h={dict_functions:gZe(),config_functions:JSON.stringify(p),data_functions:_Ze(),is_effect:e,menu_id:s,role_id:u};d&&(h.id=d),l&&(h.company_id=l),t&&(h={...h,...t});const v=await Mr.get("userInfo"),_=Wa.value||v.project_code;return Pi({url:`/${_}-web/pri/v2/perminssion/save_prminssion`,method:"post",data:{...h,other_log_info:{title:"保存权限"}}})}function gZe(){const e=[];for(let t in hr.dictAuth){const n=t;e.push({name:hr.dictAuthName[n],code:n,json_data:hr.dictAuth[n]})}return JSON.stringify(e)}function _Ze(){const e=[];for(let t in hr.dataAuth){const n=t;e.push({name:hr.dataAuthName[n],code:n,json_data:hr.dataAuth[n]})}return JSON.stringify(e)}async function yZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(n=>{const o=n;hr.menu=o.data,hr.menuFlat=bZe(o.data)})}function bZe(e){const t=[];function n(o,s=[]){return o.reduce((l,u)=>(l.push(u),u.children&&u.children.length&&l.push(...n(u.children)),l),s)}return n($t.cloneDeep(e),t),t}async function xZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/company/get_company_dict`,method:"get",params:{other_log_info:{title:"查询所有门店"}}}).then(n=>{var s;const o=n;return hr.company=$t.get(o,"data",[]),hr.company_id=((s=Qo())==null?void 0:s.companyId)||(e==null?void 0:e.company_id)||$t.get(o,"data.0.company_id"),$t.get(o,"data",[])})}async function SO(e){var s;const t=await Mr.get("userInfo"),n=Wa.value||t.project_code,o=((s=t.roleList[0])==null?void 0:s.id)||lV.value;return Pi({url:`/${n}-web/pri/role/${e?"list_role_by_company_id":"list_all_role"}`,method:"get",params:Object.assign({other_log_info:{title:"查询所有角色"}},e?{company_id:hr.company_id}:{})}).then(l=>{var u;return hr.role=$t.get(l,"data",[]),e||(hr.role_id=((u=Qo())==null?void 0:u.roleId)||o||$t.get(l,"data.0.id")),$t.get(l,"data",[])})}async function EZe(){hr.table=[],hr.form=[];const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/perminssion/get_menu_list_by_pervalue`,method:"get",params:{role_id:hr.role_id,other_log_info:{title:"根据角色id,获取菜单"}}}).then(n=>n.data)}async function wZe({dict_json:e,data_json:t,dict_functions:n,data_functions:o}){const s={},l={};for(let v in e){const{name:_,code:y}=e[v];s[y]=_}for(let v in t){const{label:_,value:y}=t[v];l[y]=_}hr.dictAuthName=s,hr.dataAuthName=l;const u=e.map(v=>v.code).join(",");hr.dictAuth={};const d=await Mr.get("userInfo"),p=Wa.value||d.project_code;u?Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:u,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;hr.dictAuth=SZe(_.data,n)}):console.error("pri/v2/perminssion/get_menu_prminssion_info返回的【dict_functions】为空");const h=t.map(v=>v.value).join(",");hr.dataAuth={},h?Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:h,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;hr.dataAuth=CZe(_.data,o)}):console.error("pri/v2/perminssion/get_menu_prminssion_info返回的【data_functions】为空")}function SZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.id]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.id}.show`,!1)}),o[l]=e[l]}return o}function CZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.dict_child_code]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.dict_child_code}.show`,!1)}),o[l]=e[l]}return o}const Cr=i.reactive({id:"",tab:"config",active:"table",activeId:"",typeId:"btns",tableId:"",menu:[],menuFlat:[],company:[],company_id:"",role:[],role_id:"",menu_id:"",table:[],form:[],dictAuthName:{},dictAuth:{},dataAuthName:{},dataAuth:{}});i.reactive({table:[],form:[]});async function TZe({role_id:e,menu_id:t,dict_json:n,data_json:o}){var _,y,b,w;Cr.id="";const s=await Mr.get("userInfo"),l=Wa.value||s.project_code,u=await Pi({url:`/${l}-web/pri/v2/perminssion/get_menu_prminssion_info`,method:"get",params:{role_id:e,menu_id:t,other_log_info:{title:"获取权限,(权限设置时,使用)"}}}),d={};Cr.id=((_=u==null?void 0:u.data)==null?void 0:_.id)||"";const p=(y=u.data)!=null&&y.config_functions?JSON.parse(u.data.config_functions):[],h=Rq((b=u==null?void 0:u.data)==null?void 0:b.dict_functions),v=Rq((w=u==null?void 0:u.data)==null?void 0:w.data_functions);return RZe({dict_json:n,data_json:o,dict_functions:h,data_functions:v}),p.forEach(C=>{d[C.config_unique_id]=IZe(C)}),Pi({url:`/${l}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:t,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(C=>{var D;const T=[],I=[];return(D=C.data)==null||D.forEach(k=>{k.config_type==="1"&&T.push(k),k.config_type==="2"&&I.push(k)}),Cr.tab="config",Cr.active="table",Cr.activeId=$t.get(T,"0.config_unique_id"),Cr.typeId="btns",Cr.tableId=$t.get(T,"0.tables.0.id"),Cr.table=Oq(T,d),Cr.form=Oq(I,d),Cr})}function Rq(e){return e?e?JSON.parse(e).reduce((t,n)=>(t[n.code]=n.json_data,t),{}):{}:{}}function Oq(e,t){return $t.isEmpty(t)?e:e.map(n=>(n.btns.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.btns.${o.fieldProp}.fieldShow`,!1)),o)),n.form.map(o=>(t[n.config_unique_id]&&(o.fieldShow=$t.get(t,`${n.config_unique_id}.form.${o.fieldProp}.fieldShow`,!1)),o)),n.tables.map(o=>{var l;if(!t[n.config_unique_id])return n;const s=$t.get(t,`${n.config_unique_id}.tables.${o.id}`,{});return o.data=((l=o.data)==null?void 0:l.map(u=>{var p;const d=s[u.fieldProp];return d&&(u.fieldShow=d.fieldShow,u.option=((p=u.option)==null?void 0:p.map(h=>{var _;const v=d.option||[];return h.fieldShow=((_=v==null?void 0:v.find(y=>y.fieldProp===h.fieldProp))==null?void 0:_.fieldShow)??!1,h}))||[]),u}))||[],o}),n))}function IZe(e){const t={btns:CO(e.btns),form:CO(e.form),tables:{}};return e.tables.forEach(n=>{t.tables[n.id]=CO(n.data)}),t}function CO(e){const t={auth_data_func_01_000:[]};return e.forEach(n=>{t[n.fieldProp]=n}),t}async function kZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(n=>{const o=n;Cr.menu=o.data,Cr.menuFlat=AZe(o.data)})}function AZe(e){const t=[];function n(o,s=[]){return o.reduce((l,u)=>(l.push(u),u.children&&u.children.length&&l.push(...n(u.children)),l),s)}return n($t.cloneDeep(e),t),t}async function DZe(){const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/company/get_company_dict`,method:"get",params:{other_log_info:{title:"查询所有门店"}}}).then(n=>{var s;const o=n;return Cr.company=$t.get(o,"data",[]),Cr.company_id=((s=Qo())==null?void 0:s.companyId)||(e==null?void 0:e.company_id)||$t.get(o,"data.0.company_id"),$t.get(o,"data",[])})}async function TO(e){var s;const t=await Mr.get("userInfo"),n=Wa.value||t.project_code,o=((s=t.roleList[0])==null?void 0:s.id)||lV.value;return Pi({url:`/${n}-web/pri/role/${e?"list_role_by_company_id":"list_all_role"}`,method:"get",params:Object.assign({other_log_info:{title:"查询所有角色"}},e?{company_id:Cr.company_id}:{})}).then(l=>{var u;return Cr.role=$t.get(l,"data",[]),e||(Cr.role_id=((u=Qo())==null?void 0:u.roleId)||o||$t.get(l,"data.0.id")),$t.get(l,"data",[])})}async function NZe(){Cr.table=[],Cr.form=[];const e=await Mr.get("userInfo"),t=Wa.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/perminssion/get_menu_list_by_pervalue`,method:"get",params:{role_id:Cr.role_id,other_log_info:{title:"根据角色id,获取菜单"}}}).then(n=>n.data)}async function RZe({dict_json:e,data_json:t,dict_functions:n,data_functions:o}){const s={},l={};for(let v in e){const{name:_,code:y}=e[v];s[y]=_}for(let v in t){const{label:_,value:y}=t[v];l[y]=_}Cr.dictAuthName=s,Cr.dataAuthName=l;const u=e.map(v=>v.code).join(",");Cr.dictAuth={};const d=await Mr.get("userInfo"),p=Wa.value||d.project_code;u&&Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:u,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;Cr.dictAuth=OZe(_.data,n)});const h=t.map(v=>v.value).join(",");Cr.dataAuth={},h&&Pi({url:`/${p}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:h,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(v=>{const _=v;Cr.dataAuth=MZe(_.data,o)})}function OZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.id]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.id}.show`,!1)}),o[l]=e[l]}return o}function MZe(e,t){const n={};for(let s in t){const l=s,u={};t[l].forEach(d=>{u[d.dict_child_code]=d}),n[l]=u}const o={};for(let s in e){const l=s;e[l].forEach(u=>{u.show=$t.get(n,`${l}.${u.dict_child_code}.show`,!1)}),o[l]=e[l]}return o}const PZe={class:"flex flex-col h-full overflow-hidden"},VZe={class:"flex flex-1 dialog-bottom"},LZe={class:"flex overflow-y-auto dialog-left"},BZe={class:"flex-1"},FZe={class:"auth_box"},$Ze={class:"flex flex-wrap flex-1 border-top-1",style:{padding:"14px"}},UZe={class:"flex items-center justify-center h-16"},zZe=i.defineComponent({__name:"popup",props:{close:{type:Function},row:{type:Object}},setup(e){const t=e,n=i.ref(),o=i.ref(!1),s=i.ref([]);i.onMounted(()=>{var y,b;kZe(),l(),(y=t.row)!=null&&y.showCompany?DZe().then(()=>{var w;TO((w=t.row)==null?void 0:w.showCompany).then(()=>{var C;Cr.role_id=((C=Qo())==null?void 0:C.roleId)||$t.get(Cr.role,"0.id",""),d()})}):TO((b=t.row)==null?void 0:b.showCompany).then(()=>{d()})});async function l(){const b=(await Mr.get("userInfo")).project_code;Pi({url:`/${b}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:"drugstore",other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(w=>{s.value=w.data.drugstore.map(C=>({...C,show:!1}))})}function u(){var y;TO((y=t.row)==null?void 0:y.showCompany).then(()=>{var b;Cr.role_id=$t.get(Cr.role,"0.id",(b=Qo())==null?void 0:b.roleId),d()})}function d(y=[]){NZe().then(b=>{if(n.value&&(n.value.setCheckedKeys(b,!1),Cr.menu_id)){const w=Cr.menuFlat.find(C=>C.id===Cr.menu_id);w&&p(w)}})}async function p(y){if(!$t.isEmpty(y.children))return;const b=y.dict_json?JSON.parse(y.dict_json):[],w=y.data_json?JSON.parse(y.data_json):[];Cr.menu_id=y.id,n.value.setCurrentKey(y.id);const{role_id:C,menu_id:T}=Cr;if(!C){Vc.warning("请选择角色!");return}TZe({role_id:C,menu_id:T,dict_json:b,data_json:w})}function h(){if(!n.value)return[];const y=n.value.getCheckedKeys(!1),b=n.value.store.nodesMap;return y.filter(C=>{const T=b[C];return T&&(!T.childNodes||T.childNodes.length===0)})}function v(){Y8({title:"提示",message:"快速设置是将【当前用户】所拥有的页面权限,快速设置给指定的角色,请谨慎操作,是否继续?",closeOnClickModal:!1,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",beforeClose:async(y,b,w)=>{if(y!=="confirm")return w();b.confirmButtonLoading=!0,_().finally(()=>{w()})}})}async function _(){let b={menu_id_str:h().join(),role_id:Cr.role_id,company_data:JSON.stringify(s.value)};const C=(await Mr.get("userInfo")).project_code;return Pi({url:`/${C}-web/pri/v2/perminssion/set_prminssion`,method:"post",data:{...b,other_log_info:{title:"保存权限"}}}).then(T=>{T.code==1&&(Vc.success("保存成功"),t.close("confirm"))})}return(y,b)=>{const w=i.resolveComponent("el-option"),C=i.resolveComponent("el-select"),T=i.resolveComponent("el-form-item"),I=i.resolveComponent("el-form"),D=i.resolveComponent("bc-icon"),k=i.resolveComponent("el-tree"),O=i.resolveComponent("el-checkbox"),L=i.resolveComponent("el-button"),P=i.resolveComponent("bc-button"),V=i.resolveDirective("loading");return i.openBlock(),i.createElementBlock("div",PZe,[i.createVNode(I,{size:"small",class:"flex el-form",style:{gap:"20px"}},{default:i.withCtx(()=>[i.createVNode(T,{label:"门店"},{default:i.withCtx(()=>[i.createVNode(C,{modelValue:i.unref(Cr).company_id,"onUpdate:modelValue":b[0]||(b[0]=$=>i.unref(Cr).company_id=$),placeholder:"请选择",filterable:"",onChange:u,style:{width:"200px"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Cr).company,$=>(i.openBlock(),i.createBlock(w,{key:$.company_id,label:$.company_name,value:$.company_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),i.createVNode(T,{label:"角色"},{default:i.withCtx(()=>[i.createVNode(C,{modelValue:i.unref(Cr).role_id,"onUpdate:modelValue":b[1]||(b[1]=$=>i.unref(Cr).role_id=$),placeholder:"请选择",filterable:"",onChange:d,style:{width:"200px"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Cr).role,$=>(i.openBlock(),i.createBlock(w,{key:$.id,label:$.role_name,value:$.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),i.withDirectives((i.openBlock(),i.createElementBlock("div",VZe,[i.createElementVNode("div",LZe,[i.createVNode(k,{"highlight-current":"","show-checkbox":"",style:{width:"240px",flex:"1"},ref_key:"treeRef",ref:n,"node-key":"id","empty-text":"暂无数据",data:i.unref(Cr).menu,"current-node-key":i.unref(Cr).menu_id,onNodeClick:p,onCheck:p},{default:i.withCtx(({data:$})=>[i.createVNode(D,{class:"mr-1",name:$.meta.icon},null,8,["name"]),i.createElementVNode("span",null,i.toDisplayString($.meta.title),1)]),_:1},8,["data","current-node-key"])]),i.createElementVNode("div",BZe,[i.createElementVNode("div",FZe,[b[3]||(b[3]=i.createElementVNode("div",{class:"auth_box-title"},"数据权限",-1)),i.createElementVNode("div",null,[i.createElementVNode("div",$Ze,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,$=>(i.openBlock(),i.createBlock(O,{key:$.dict_child_code,modelValue:$.show,"onUpdate:modelValue":Y=>$.show=Y},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString($.show_name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])])])])])),[[V,o.value]]),i.createElementVNode("footer",UZe,[i.createVNode(L,{size:"default",onClick:b[2]||(b[2]=$=>e.close("cancel"))},{default:i.withCtx(()=>[...b[4]||(b[4]=[i.createTextVNode("关闭",-1)])]),_:1}),i.createVNode(P,{type:"primary",size:"default",onClick:v},{default:i.withCtx(()=>[...b[5]||(b[5]=[i.createTextVNode("保存设置",-1)])]),_:1})])])}}}),HZe=p7(zZe,[["__scopeId","data-v-7072eb9d"]]);function WZe(e){return new Promise(t=>{Fne(HZe,{row:e},{title:"快速设置权限",width:"900px",height:"80%",success:({data:n})=>t(n),showFooter:!1})})}const Wa=i.ref(""),lV=i.ref("");function jZe(e,t){Wa.value=e.projectCode,lV.value=e.roleId||"";const n=i.ref(!1),o=i.ref(!1),s=i.ref(""),l=i.ref(),u=i.ref(!1),d=i.ref(),p=i.ref();i.onActivated(()=>{yZe(),e.showCompany?(y(),xZe().then(()=>{SO(e.showCompany).then(()=>{var P;hr.role_id=((P=Qo())==null?void 0:P.roleId)||$t.get(hr.role,"0.id",""),T()})})):SO(e.showCompany).then(()=>{T()})});const h=()=>{s.value="",l.value=""},v=()=>{o.value=!1,h()};function _(P){var V;P&&(s.value=P,l.value=(V=p.value.find($=>$.code==P))==null?void 0:V.name)}async function y(){const P=await Mr.get("userInfo"),V=Wa.value||P.project_code;Pi({url:`/${V}-web/pri/role/list_role_name`,method:"get",data:{other_log_info:{title:"获取用户信息"}}}).then($=>{$.code===1&&(p.value=$.data||[])})}function b(){WZe(e)}function w(){o.value=!0}function C(){SO(e.showCompany).then(()=>{var P;hr.role_id=$t.get(hr.role,"0.id",(P=Qo())==null?void 0:P.roleId),T()})}function T(){EZe().then(P=>{if(d.value.getInstance().setCheckedKeys(P,!1),hr.menu_id){const V=hr.menuFlat.find($=>$.id===hr.menu_id);V&&I(V),t("ready")}})}async function I(P){if(!$t.isEmpty(P.children))return;const V=P.dict_json?JSON.parse(P.dict_json):[],$=P.data_json?JSON.parse(P.data_json):[];hr.menu_id=P.id,d.value.getInstance().setCurrentKey(P.id);const{role_id:Y,menu_id:F}=hr;if(!Y){Vc.warning("请选择角色!");return}u.value=!0,mZe({role_id:Y,menu_id:F,dict_json:V,data_json:$}).finally(()=>{u.value=!1})}function D(){const P=d.value.getInstance().getNode(hr.menu_id);if(!P){Vc.warning("请选择授权菜单!");return}return u.value=!0,Nq(P.checked?1:0,{is_batch:1,role_name:l.value,role_id:s.value}).then(V=>{V.code===1&&(o.value=!1,Vc.success("保存成功!"),h())}).finally(()=>{u.value=!1})}function k(){const P=d.value.getInstance().getNode(hr.menu_id);if(!P){Vc.warning("请选择授权菜单!");return}return u.value=!0,Nq(P.checked?1:0).then(V=>{hr.id=V.data.id,V.code===1&&Vc.success("保存成功!")}).finally(()=>{u.value=!1})}function O(){XE.form=hr.form,XE.table=hr.table,n.value=!0}function L(P){P==="cancel"&&(hr.form=XE.form,hr.table=XE.table),n.value=!1}return{isShowPopup:n,loading:u,treeRef:d,submit:L,nodeClick:I,saveData:k,setSelelctAll:O,onCompanyChange:C,onRoleChange:T,onPermissionSync:w,onFastSet:b,isShowAsync:o,get_async_role_id:_,async_role_id:s,onSaveAsync:D,role_name_list:p,onClose:h,oncancel:v}}const Zo=i.reactive({id:"",active:"table",activeId:"",typeId:"form",tableId:"",menu:[],menu_id:"",table:[],form:[]}),JE=i.reactive({table:[],form:[]});async function GZe({menu_id:e}){const t=await Mr.get("userInfo"),n=GT.value||t.project_code;return Pi({url:`/${n}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:e,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(o=>{var u;const s=[],l=[];return(u=o.data)==null||u.forEach(d=>{d.config_type==="1"&&s.push(d),d.config_type==="2"&&l.push(d)}),Zo.active="table",Zo.activeId=$t.get(s,"0.config_unique_id"),Zo.tableId=$t.get(s,"0.tables.0.id"),Zo.table=s,Zo.form=l,Zo})}async function qZe(){const{table:e,form:t}=Zo,n=[...e,...t],o={json_data:JSON.stringify(n),menu_id:Zo.menu_id};Zo.id&&(o.id=Zo.id);const s=await Mr.get("userInfo"),l=GT.value||s.project_code;return Pi({url:`/${l}-web/pri/v2/field/add_field_batch`,method:"post",data:{...o,other_log_info:{title:"添加页面字段信息_批量"}}})}async function YZe(){const e=await Mr.get("userInfo"),t=GT.value||e.project_code;return Pi({url:`/${t}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(n=>{const o=n;Zo.menu=o.data})}const GT=i.ref("");function KZe(e){GT.value=e.projectCode;const t=i.ref(!1),n=i.ref(!1),o=i.ref();i.onMounted(()=>{YZe()});async function s(p){if(!$t.isEmpty(p.children))return;Zo.menu_id=p.id;const{menu_id:h}=Zo;n.value=!0,GZe({menu_id:h}).finally(()=>{n.value=!1})}function l(){return n.value=!0,qZe().then(p=>{p.code===1&&Vc.success("保存成功!")}).finally(()=>{n.value=!1})}function u(){JE.form=Zo.form,JE.table=Zo.table,t.value=!0}function d(p){p==="cancel"&&(Zo.form=JE.form,Zo.table=JE.table),t.value=!1}return{isShowPopup:t,loading:n,treeRef:o,submit:d,nodeClick:s,saveData:l,setSelelctAll:u}}var are={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(ir,function(){function n(r,a){return a.forEach(function(c){c&&typeof c!="string"&&!Array.isArray(c)&&Object.keys(c).forEach(function(f){if(f!=="default"&&!(f in r)){var m=Object.getOwnPropertyDescriptor(c,f);Object.defineProperty(r,f,m.get?m:{enumerable:!0,get:function(){return c[f]}})}})}),Object.freeze(r)}var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof ir<"u"?ir:typeof self<"u"?self:{},s=function(r){try{return!!r()}catch{return!0}},l=!s(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),u=l,d=Function.prototype,p=d.call,h=u&&d.bind.bind(p,p),v=u?h:function(r){return function(){return p.apply(r,arguments)}},_=v,y=_({}.toString),b=_("".slice),w=function(r){return b(y(r),8,-1)},C=s,T=w,I=Object,D=v("".split),k=C(function(){return!I("z").propertyIsEnumerable(0)})?function(r){return T(r)=="String"?D(r,""):I(r)}:I,O=function(r){return r==null},L=O,P=TypeError,V=function(r){if(L(r))throw P("Can't call method on "+r);return r},$=k,Y=V,F=function(r){return $(Y(r))},U=function(r){return r&&r.Math==Math&&r},Q=U(typeof globalThis=="object"&&globalThis)||U(typeof window=="object"&&window)||U(typeof self=="object"&&self)||U(typeof o=="object"&&o)||function(){return this}()||Function("return this")(),X={},le={get exports(){return X},set exports(r){X=r}},ye=Q,ue=Object.defineProperty,G=function(r,a){try{ue(ye,r,{value:a,configurable:!0,writable:!0})}catch{ye[r]=a}return a},ee=G,ne="__core-js_shared__",oe=Q[ne]||ee(ne,{}),Z=oe;(le.exports=function(r,a){return Z[r]||(Z[r]=a!==void 0?a:{})})("versions",[]).push({version:"3.30.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"});var J,H,W=V,ce=Object,ge=function(r){return ce(W(r))},de=ge,te=v({}.hasOwnProperty),fe=Object.hasOwn||function(r,a){return te(de(r),a)},Ie=v,De=0,Ge=Math.random(),ot=Ie(1 .toString),Ce=function(r){return"Symbol("+(r===void 0?"":r)+")_"+ot(++De+Ge,36)},et=typeof navigator<"u"&&String(navigator.userAgent)||"",St=Q,Tt=et,Nt=St.process,vn=St.Deno,hn=Nt&&Nt.versions||vn&&vn.version,nn=hn&&hn.v8;nn&&(H=(J=nn.split("."))[0]>0&&J[0]<4?1:+(J[0]+J[1])),!H&&Tt&&(!(J=Tt.match(/Edge\/(\d+)/))||J[1]>=74)&&(J=Tt.match(/Chrome\/(\d+)/))&&(H=+J[1]);var Xt=H,Yt=Xt,kn=s,mt=!!Object.getOwnPropertySymbols&&!kn(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Yt&&Yt<41}),nt=mt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ye=X,xt=fe,Dt=Ce,Ee=mt,He=nt,ct=Q.Symbol,ve=Ye("wks"),Te=He?ct.for||ct:ct&&ct.withoutSetter||Dt,Oe=function(r){return xt(ve,r)||(ve[r]=Ee&&xt(ct,r)?ct[r]:Te("Symbol."+r)),ve[r]},qe=typeof document=="object"&&document.all,je={all:qe,IS_HTMLDDA:qe===void 0&&qe!==void 0},at=je.all,K=je.IS_HTMLDDA?function(r){return typeof r=="function"||r===at}:function(r){return typeof r=="function"},pe=K,Ae=je.all,Be=je.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:pe(r)||r===Ae}:function(r){return typeof r=="object"?r!==null:pe(r)},Je=Be,Ze=String,we=TypeError,Me=function(r){if(Je(r))return r;throw we(Ze(r)+" is not an object")},Fe={},Ue=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),vt=Ue&&s(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),pt={},Mt=Be,yt=Q.document,Pt=Mt(yt)&&Mt(yt.createElement),ln=function(r){return Pt?yt.createElement(r):{}},Ne=ln,st=!Ue&&!s(function(){return Object.defineProperty(Ne("div"),"a",{get:function(){return 7}}).a!=7}),Bt=l,Zt=Function.prototype.call,Kt=Bt?Zt.bind(Zt):function(){return Zt.apply(Zt,arguments)},wn=Q,xn=K,Dn=function(r,a){return arguments.length<2?(c=wn[r],xn(c)?c:void 0):wn[r]&&wn[r][a];var c},on=v({}.isPrototypeOf),En=Dn,zn=K,Un=on,Bn=Object,tr=nt?function(r){return typeof r=="symbol"}:function(r){var a=En("Symbol");return zn(a)&&Un(a.prototype,Bn(r))},Ri=String,xi=function(r){try{return Ri(r)}catch{return"Object"}},Kr=K,$i=xi,Bi=TypeError,Ci=function(r){if(Kr(r))return r;throw Bi($i(r)+" is not a function")},bo=Ci,na=O,Uo=function(r,a){var c=r[a];return na(c)?void 0:bo(c)},Ao=Kt,da=K,Da=Be,gs=TypeError,be=Kt,ze=Be,ke=tr,Qe=Uo,lt=function(r,a){var c,f;if(a==="string"&&da(c=r.toString)&&!Da(f=Ao(c,r))||da(c=r.valueOf)&&!Da(f=Ao(c,r))||a!=="string"&&da(c=r.toString)&&!Da(f=Ao(c,r)))return f;throw gs("Can't convert object to primitive value")},rt=TypeError,Rt=Oe("toPrimitive"),en=function(r,a){if(!ze(r)||ke(r))return r;var c,f=Qe(r,Rt);if(f){if(a===void 0&&(a="default"),c=be(f,r,a),!ze(c)||ke(c))return c;throw rt("Can't convert object to primitive value")}return a===void 0&&(a="number"),lt(r,a)},dn=en,cn=tr,mn=function(r){var a=dn(r,"string");return cn(a)?a:a+""},Vn=Ue,mr=st,Er=vt,Dr=Me,Ei=mn,si=TypeError,eo=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,_s="enumerable",me="configurable",We="writable";pt.f=Vn?Er?function(r,a,c){if(Dr(r),a=Ei(a),Dr(c),typeof r=="function"&&a==="prototype"&&"value"in c&&We in c&&!c[We]){var f=Ga(r,a);f&&f[We]&&(r[a]=c.value,c={configurable:me in c?c[me]:f[me],enumerable:_s in c?c[_s]:f[_s],writable:!1})}return eo(r,a,c)}:eo:function(r,a,c){if(Dr(r),a=Ei(a),Dr(c),mr)try{return eo(r,a,c)}catch{}if("get"in c||"set"in c)throw si("Accessors not supported");return"value"in c&&(r[a]=c.value),r};var it=Math.ceil,kt=Math.floor,an=Math.trunc||function(r){var a=+r;return(a>0?kt:it)(a)},Ut=an,Cn=function(r){var a=+r;return a!=a||a===0?0:Ut(a)},Sn=Cn,At=Math.max,tn=Math.min,An=function(r,a){var c=Sn(r);return c<0?At(c+a,0):tn(c,a)},pr=Cn,wr=Math.min,jr=function(r){return r>0?wr(pr(r),9007199254740991):0},co=jr,fi=function(r){return co(r.length)},mi=F,to=An,vi=fi,wi=function(r){return function(a,c,f){var m,x=mi(a),S=vi(x),R=to(f,S);if(r&&c!=c){for(;S>R;)if((m=x[R++])!=m)return!0}else for(;S>R;R++)if((r||R in x)&&x[R]===c)return r||R||0;return!r&&-1}},qp={includes:wi(!0),indexOf:wi(!1)},yh={},bh=fe,h2=F,p2=qp.indexOf,c3=yh,xh=v([].push),re=function(r,a){var c,f=h2(r),m=0,x=[];for(c in f)!bh(c3,c)&&bh(f,c)&&xh(x,c);for(;a.length>m;)bh(f,c=a[m++])&&(~p2(x,c)||xh(x,c));return x},Ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tt=re,_t=Ve,Jt=Object.keys||function(r){return tt(r,_t)},Qt=Ue,_n=vt,yn=pt,dt=Me,fn=F,Qn=Jt;Fe.f=Qt&&!_n?Object.defineProperties:function(r,a){dt(r);for(var c,f=fn(a),m=Qn(a),x=m.length,S=0;x>S;)yn.f(r,c=m[S++],f[c]);return r};var Wn,ti=Dn("document","documentElement"),Ti=Ce,fa=X("keys"),Ii=function(r){return fa[r]||(fa[r]=Ti(r))},Gi=Me,ha=Fe,zo=Ve,xd=yh,Eh=ti,Oi=ln,Na="prototype",nc="script",wh=Ii("IE_PROTO"),Sh=function(){},u3=function(r){return"<"+nc+">"+r+"</"+nc+">"},d3=function(r){r.write(u3("")),r.close();var a=r.parentWindow.Object;return r=null,a},Yp=function(){try{Wn=new ActiveXObject("htmlfile")}catch{}var r,a,c;Yp=typeof document<"u"?document.domain&&Wn?d3(Wn):(a=Oi("iframe"),c="java"+nc+":",a.style.display="none",Eh.appendChild(a),a.src=String(c),(r=a.contentWindow.document).open(),r.write(u3("document.F=Object")),r.close(),r.F):d3(Wn);for(var f=zo.length;f--;)delete Yp[Na][zo[f]];return Yp()};xd[wh]=!0;var Ed=Object.create||function(r,a){var c;return r!==null?(Sh[Na]=Gi(r),c=new Sh,Sh[Na]=null,c[wh]=r):c=Yp(),a===void 0?c:ha.f(c,a)},Kp=Oe,wd=Ed,YT=pt.f,Xp=Kp("unscopables"),Jp=Array.prototype;Jp[Xp]==null&&YT(Jp,Xp,{configurable:!0,value:wd(null)});var Sd,iu,Ch,f3=function(r){Jp[Xp][r]=!0},ou={},m2=K,h3=Q.WeakMap,p3=m2(h3)&&/native code/.test(String(h3)),xo=function(r,a){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:a}},v2=pt,Th=xo,$s=Ue?function(r,a,c){return v2.f(r,a,Th(1,c))}:function(r,a,c){return r[a]=c,r},m3=p3,v3=Q,KT=Be,XT=$s,g2=fe,_2=oe,Cd=Ii,JT=yh,g3="Object already initialized",Ih=v3.TypeError,_3=v3.WeakMap;if(m3||_2.state){var Do=_2.state||(_2.state=new _3);Do.get=Do.get,Do.has=Do.has,Do.set=Do.set,Sd=function(r,a){if(Do.has(r))throw Ih(g3);return a.facade=r,Do.set(r,a),a},iu=function(r){return Do.get(r)||{}},Ch=function(r){return Do.has(r)}}else{var pl=Cd("state");JT[pl]=!0,Sd=function(r,a){if(g2(r,pl))throw Ih(g3);return a.facade=r,XT(r,pl,a),a},iu=function(r){return g2(r,pl)?r[pl]:{}},Ch=function(r){return g2(r,pl)}}var pa={set:Sd,get:iu,has:Ch,enforce:function(r){return Ch(r)?iu(r):Sd(r,{})},getterFor:function(r){return function(a){var c;if(!KT(a)||(c=iu(a)).type!==r)throw Ih("Incompatible receiver, "+r+" required");return c}}},kh={},y2={},au={}.propertyIsEnumerable,qa=Object.getOwnPropertyDescriptor,y3=qa&&!au.call({1:2},1);y2.f=y3?function(r){var a=qa(this,r);return!!a&&a.enumerable}:au;var ZT=Ue,QT=Kt,e5=y2,t5=xo,n5=F,Td=mn,ut=fe,Ot=st,Et=Object.getOwnPropertyDescriptor;kh.f=ZT?Et:function(r,a){if(r=n5(r),a=Td(a),Ot)try{return Et(r,a)}catch{}if(ut(r,a))return t5(!QT(e5.f,r,a),r[a])};var Fn={},gr={get exports(){return Fn},set exports(r){Fn=r}},ni=Ue,po=fe,ki=Function.prototype,b2=ni&&Object.getOwnPropertyDescriptor,b3=po(ki,"name"),Ho={PROPER:b3&&(function(){}).name==="something",CONFIGURABLE:b3&&(!ni||ni&&b2(ki,"name").configurable)},Zp=K,x2=oe,Id=v(Function.toString);Zp(x2.inspectSource)||(x2.inspectSource=function(r){return Id(r)});var kd=x2.inspectSource,Ad=v,Si=s,r5=K,Ah=fe,Dd=Ue,i5=Ho.CONFIGURABLE,o5=kd,a5=pa.enforce,Qp=pa.get,ml=String,su=Object.defineProperty,x3=Ad("".slice),em=Ad("".replace),E3=Ad([].join),w3=Dd&&!Si(function(){return su(function(){},"length",{value:8}).length!==8}),tm=String(String).split("String"),S3=gr.exports=function(r,a,c){x3(ml(a),0,7)==="Symbol("&&(a="["+em(ml(a),/^Symbol\(([^)]*)\)/,"$1")+"]"),c&&c.getter&&(a="get "+a),c&&c.setter&&(a="set "+a),(!Ah(r,"name")||i5&&r.name!==a)&&(Dd?su(r,"name",{value:a,configurable:!0}):r.name=a),w3&&c&&Ah(c,"arity")&&r.length!==c.arity&&su(r,"length",{value:c.arity});try{c&&Ah(c,"constructor")&&c.constructor?Dd&&su(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch{}var f=a5(r);return Ah(f,"source")||(f.source=E3(tm,typeof a=="string"?a:"")),r};Function.prototype.toString=S3(function(){return r5(this)&&Qp(this).source||o5(this)},"toString");var Dh=K,lu=pt,nm=Fn,s5=G,Ya=function(r,a,c,f){f||(f={});var m=f.enumerable,x=f.name!==void 0?f.name:a;if(Dh(c)&&nm(c,x,f),f.global)m?r[a]=c:s5(a,c);else{try{f.unsafe?r[a]&&(m=!0):delete r[a]}catch{}m?r[a]=c:lu.f(r,a,{value:c,enumerable:!1,configurable:!f.nonConfigurable,writable:!f.nonWritable})}return r},Nh={},rm=re,im=Ve.concat("length","prototype");Nh.f=Object.getOwnPropertyNames||function(r){return rm(r,im)};var Rh={};Rh.f=Object.getOwnPropertySymbols;var cu,E2,C3,l5=Dn,mo=Nh,Wo=Rh,c5=Me,u5=v([].concat),T3=l5("Reflect","ownKeys")||function(r){var a=mo.f(c5(r)),c=Wo.f;return c?u5(a,c(r)):a},I3=fe,w2=T3,Oh=kh,S2=pt,uu=function(r,a,c){for(var f=w2(a),m=S2.f,x=Oh.f,S=0;S<f.length;S++){var R=f[S];I3(r,R)||c&&I3(c,R)||m(r,R,x(a,R))}},Mh=s,Ph=K,om=/#|\.prototype\./,Us=function(r,a){var c=f5[d5(r)];return c==p5||c!=h5&&(Ph(a)?Mh(a):!!a)},d5=Us.normalize=function(r){return String(r).replace(om,".").toLowerCase()},f5=Us.data={},h5=Us.NATIVE="N",p5=Us.POLYFILL="P",C2=Us,Nd=Q,Vh=kh.f,k3=$s,_e=Ya,Rd=G,am=uu,Ka=C2,Zn=function(r,a){var c,f,m,x,S,R=r.target,A=r.global,B=r.stat;if(c=A?Nd:B?Nd[R]||Rd(R,{}):(Nd[R]||{}).prototype)for(f in a){if(x=a[f],m=r.dontCallGetSet?(S=Vh(c,f))&&S.value:c[f],!Ka(A?f:R+(B?".":"#")+f,r.forced)&&m!==void 0){if(typeof x==typeof m)continue;am(x,m)}(r.sham||m&&m.sham)&&k3(x,"sham",!0),_e(c,f,x,r)}},m5=!s(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),v5=fe,g5=K,du=ge,_5=m5,A3=Ii("IE_PROTO"),T2=Object,y5=T2.prototype,sm=_5?T2.getPrototypeOf:function(r){var a=du(r);if(v5(a,A3))return a[A3];var c=a.constructor;return g5(c)&&a instanceof c?c.prototype:a instanceof T2?y5:null},vl=s,b5=K,x5=Be,D3=sm,E5=Ya,I2=Oe("iterator"),zs=!1;[].keys&&("next"in(C3=[].keys())?(E2=D3(D3(C3)))!==Object.prototype&&(cu=E2):zs=!0);var w5=!x5(cu)||vl(function(){var r={};return cu[I2].call(r)!==r});w5&&(cu={}),b5(cu[I2])||E5(cu,I2,function(){return this});var k2={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:zs},S5=pt.f,C5=fe,N3=Oe("toStringTag"),Xa=function(r,a,c){r&&!c&&(r=r.prototype),r&&!C5(r,N3)&&S5(r,N3,{configurable:!0,value:a})},T5=k2.IteratorPrototype,I5=Ed,ys=xo,k5=Xa,A5=ou,D5=function(){return this},R3=function(r,a,c,f){var m=a+" Iterator";return r.prototype=I5(T5,{next:ys(+!f,c)}),k5(r,m,!1),A5[m]=D5,r},N5=v,O3=Ci,M3=K,R5=String,O5=TypeError,A2=function(r,a,c){try{return N5(O3(Object.getOwnPropertyDescriptor(r,a)[c]))}catch{}},Lh=Me,lm=function(r){if(typeof r=="object"||M3(r))return r;throw O5("Can't set "+R5(r)+" as a prototype")},Od=Object.setPrototypeOf||("__proto__"in{}?function(){var r,a=!1,c={};try{(r=A2(Object.prototype,"__proto__","set"))(c,[]),a=c instanceof Array}catch{}return function(f,m){return Lh(f),lm(m),a?r(f,m):f.__proto__=m,f}}():void 0),P3=Zn,M5=Kt,gl=K,D2=R3,rc=sm,Ra=Od,P5=Xa,V3=$s,cm=Ya,Bh=ou,ic=Ho.PROPER,L3=Ho.CONFIGURABLE,B3=k2.IteratorPrototype,fu=k2.BUGGY_SAFARI_ITERATORS,Fh=Oe("iterator"),N2="keys",no="values",um="entries",F3=function(){return this},bs=function(r,a,c,f,m,x,S){D2(c,a,f);var R,A,B,q=function(Vt){if(Vt===m&&ht)return ht;if(!fu&&Vt in xe)return xe[Vt];switch(Vt){case N2:case no:case um:return function(){return new c(this,Vt)}}return function(){return new c(this)}},j=a+" Iterator",he=!1,xe=r.prototype,Pe=xe[Fh]||xe["@@iterator"]||m&&xe[m],ht=!fu&&Pe||q(m),Ft=a=="Array"&&xe.entries||Pe;if(Ft&&(R=rc(Ft.call(new r)))!==Object.prototype&&R.next&&(rc(R)!==B3&&(Ra?Ra(R,B3):gl(R[Fh])||cm(R,Fh,F3)),P5(R,j,!0)),ic&&m==no&&Pe&&Pe.name!==no&&(L3?V3(xe,"name",no):(he=!0,ht=function(){return M5(Pe,this)})),m)if(A={values:q(no),keys:x?ht:q(N2),entries:q(um)},S)for(B in A)(fu||he||!(B in xe))&&cm(xe,B,A[B]);else P3({target:a,proto:!0,forced:fu||he},A);return xe[Fh]!==ht&&cm(xe,Fh,ht,{name:m}),Bh[a]=ht,A},dm=function(r,a){return{value:r,done:a}},fm=F,_l=f3,R2=ou,jo=pa,O2=pt.f,V5=bs,$3=dm,L5=Ue,hm="Array Iterator",B5=jo.set,$h=jo.getterFor(hm),U3=V5(Array,"Array",function(r,a){B5(this,{type:hm,target:fm(r),index:0,kind:a})},function(){var r=$h(this),a=r.target,c=r.kind,f=r.index++;return!a||f>=a.length?(r.target=void 0,$3(void 0,!0)):$3(c=="keys"?f:c=="values"?a[f]:[f,a[f]],!1)},"values"),z3=R2.Arguments=R2.Array;if(_l("keys"),_l("values"),_l("entries"),L5&&z3.name!=="values")try{O2(z3,"name",{value:"values"})}catch{}var H3={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},hu=ln("span").classList,W3=hu&&hu.constructor&&hu.constructor.prototype,j3=W3===Object.prototype?void 0:W3,pm=Q,M2=H3,F5=j3,Uh=U3,P2=$s,V2=Oe,zh=V2("iterator"),G3=V2("toStringTag"),Hh=Uh.values,L2=function(r,a){if(r){if(r[zh]!==Hh)try{P2(r,zh,Hh)}catch{r[zh]=Hh}if(r[G3]||P2(r,G3,a),M2[a]){for(var c in Uh)if(r[c]!==Uh[c])try{P2(r,c,Uh[c])}catch{r[c]=Uh[c]}}}};for(var mm in M2)L2(pm[mm]&&pm[mm].prototype,mm);L2(F5,"DOMTokenList");var Md=typeof process<"u"&&w(process)=="process",Wh=Fn,$5=pt,oc=function(r,a,c){return c.get&&Wh(c.get,a,{getter:!0}),c.set&&Wh(c.set,a,{setter:!0}),$5.f(r,a,c)},q3=Dn,U5=oc,Y3=Ue,K3=Oe("species"),Pd=function(r){var a=q3(r);Y3&&a&&!a[K3]&&U5(a,K3,{configurable:!0,get:function(){return this}})},X3=on,B2=TypeError,jh=function(r,a){if(X3(a,r))return r;throw B2("Incorrect invocation")},vm={};vm[Oe("toStringTag")]="z";var Pr=String(vm)==="[object z]",z5=K,gm=w,Gh=Oe("toStringTag"),J3=Object,H5=gm(function(){return arguments}())=="Arguments",ac=Pr?gm:function(r){var a,c,f;return r===void 0?"Undefined":r===null?"Null":typeof(c=function(m,x){try{return m[x]}catch{}}(a=J3(r),Gh))=="string"?c:H5?gm(a):(f=gm(a))=="Object"&&z5(a.callee)?"Arguments":f},Ja=v,W5=s,qh=K,F2=ac,Z3=kd,$2=function(){},Oa=[],yl=Dn("Reflect","construct"),Yh=/^\s*(?:class|function)\b/,Q3=Ja(Yh.exec),_m=!Yh.exec($2),Vd=function(r){if(!qh(r))return!1;try{return yl($2,Oa,r),!0}catch{return!1}},ym=function(r){if(!qh(r))return!1;switch(F2(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _m||!!Q3(Yh,Z3(r))}catch{return!0}};ym.sham=!0;var Ld,sc,bm,Hs,U2=!yl||W5(function(){var r;return Vd(Vd.call)||!Vd(Object)||!Vd(function(){r=!0})||r})?ym:Vd,lc=U2,e6=xi,t6=TypeError,xm=function(r){if(lc(r))return r;throw t6(e6(r)+" is not a constructor")},n6=Me,j5=xm,G5=O,r6=Oe("species"),Em=function(r,a){var c,f=n6(r).constructor;return f===void 0||G5(c=n6(f)[r6])?a:j5(c)},q5=l,z2=Function.prototype,H2=z2.apply,ra=z2.call,xs=typeof Reflect=="object"&&Reflect.apply||(q5?ra.bind(H2):function(){return ra.apply(H2,arguments)}),Y5=w,K5=v,cc=function(r){if(Y5(r)==="Function")return K5(r)},Bd=Ci,i6=l,o6=cc(cc.bind),uc=function(r,a){return Bd(r),a===void 0?r:i6?o6(r,a):function(){return r.apply(a,arguments)}},a6=v([].slice),Fd=TypeError,pu=function(r,a){if(r<a)throw Fd("Not enough arguments");return r},s6=/(?:ipad|iphone|ipod).*applewebkit/i.test(et),ma=Q,l6=xs,wm=uc,W2=K,Sm=fe,Cm=s,Kh=ti,X5=a6,j2=ln,Tm=pu,c6=s6,G2=Md,q2=ma.setImmediate,Y2=ma.clearImmediate,bl=ma.process,Im=ma.Dispatch,u6=ma.Function,d6=ma.MessageChannel,f6=ma.String,K2=0,Xh={},Ws="onreadystatechange";Cm(function(){Ld=ma.location});var Jh=function(r){if(Sm(Xh,r)){var a=Xh[r];delete Xh[r],a()}},Zh=function(r){return function(){Jh(r)}},km=function(r){Jh(r.data)},Qh=function(r){ma.postMessage(f6(r),Ld.protocol+"//"+Ld.host)};q2&&Y2||(q2=function(r){Tm(arguments.length,1);var a=W2(r)?r:u6(r),c=X5(arguments,1);return Xh[++K2]=function(){l6(a,void 0,c)},sc(K2),K2},Y2=function(r){delete Xh[r]},G2?sc=function(r){bl.nextTick(Zh(r))}:Im&&Im.now?sc=function(r){Im.now(Zh(r))}:d6&&!c6?(Hs=(bm=new d6).port2,bm.port1.onmessage=km,sc=wm(Hs.postMessage,Hs)):ma.addEventListener&&W2(ma.postMessage)&&!ma.importScripts&&Ld&&Ld.protocol!=="file:"&&!Cm(Qh)?(sc=Qh,ma.addEventListener("message",km,!1)):sc=Ws in j2("script")?function(r){Kh.appendChild(j2("script"))[Ws]=function(){Kh.removeChild(this),Jh(r)}}:function(r){setTimeout(Zh(r),0)});var mu={set:q2},ar=function(){this.head=null,this.tail=null};ar.prototype={add:function(r){var a={item:r,next:null},c=this.tail;c?c.next=a:this.head=a,this.tail=a},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}};var xl,e0,El,X2,Am,J2=ar,Go=/ipad|iphone|ipod/i.test(et)&&typeof Pebble<"u",J5=/web0s(?!.*chrome)/i.test(et),vu=Q,Z2=uc,Z5=kh.f,Dm=mu.set,Q5=J2,eI=s6,tI=Go,wl=J5,No=Md,Nm=vu.MutationObserver||vu.WebKitMutationObserver,h6=vu.document,Rm=vu.process,Om=vu.Promise,p6=Z5(vu,"queueMicrotask"),gu=p6&&p6.value;if(!gu){var t0=new Q5,n0=function(){var r,a;for(No&&(r=Rm.domain)&&r.exit();a=t0.get();)try{a()}catch(c){throw t0.head&&xl(),c}r&&r.enter()};eI||No||wl||!Nm||!h6?!tI&&Om&&Om.resolve?((X2=Om.resolve(void 0)).constructor=Om,Am=Z2(X2.then,X2),xl=function(){Am(n0)}):No?xl=function(){Rm.nextTick(n0)}:(Dm=Z2(Dm,vu),xl=function(){Dm(n0)}):(e0=!0,El=h6.createTextNode(""),new Nm(n0).observe(El,{characterData:!0}),xl=function(){El.data=e0=!e0}),gu=function(r){t0.head||xl(),t0.add(r)}}var nI=gu,Q2=function(r){try{return{error:!1,value:r()}}catch(a){return{error:!0,value:a}}},r0=Q.Promise,m6=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",v6=!m6&&!Md&&typeof window=="object"&&typeof document=="object",g6=Q,i0=r0,e1=K,_6=C2,o0=kd,t1=Oe,y6=v6,b6=m6,$d=Xt;i0&&i0.prototype;var x6=t1("species"),Es=!1,dc=e1(g6.PromiseRejectionEvent),rI=_6("Promise",function(){var r=o0(i0),a=r!==String(i0);if(!a&&$d===66)return!0;if(!$d||$d<51||!/native code/.test(r)){var c=new i0(function(m){m(1)}),f=function(m){m(function(){},function(){})};if((c.constructor={})[x6]=f,!(Es=c.then(function(){})instanceof f))return!0}return!a&&(y6||b6)&&!dc}),fc={CONSTRUCTOR:rI,REJECTION_EVENT:dc,SUBCLASSING:Es},Ud={},E6=Ci,iI=TypeError,oI=function(r){var a,c;this.promise=new r(function(f,m){if(a!==void 0||c!==void 0)throw iI("Bad Promise constructor");a=f,c=m}),this.resolve=E6(a),this.reject=E6(c)};Ud.f=function(r){return new oI(r)};var n1,w6,S6,aI=Zn,Mm=Md,hc=Q,zd=Kt,r1=Ya,i1=Od,C6=Xa,sI=Pd,lI=Ci,Pm=K,T6=Be,cI=jh,uI=Em,I6=mu.set,o1=nI,dI=function(r,a){try{arguments.length==1?console.error(r):console.error(r,a)}catch{}},fI=Q2,Za=J2,k6=pa,Vm=r0,A6=Ud,a0="Promise",D6=fc.CONSTRUCTOR,hI=fc.REJECTION_EVENT,pI=fc.SUBCLASSING,a1=k6.getterFor(a0),s1=k6.set,Hd=Vm&&Vm.prototype,Wd=Vm,Lm=Hd,N6=hc.TypeError,l1=hc.document,c1=hc.process,u1=A6.f,mI=u1,vI=!!(l1&&l1.createEvent&&hc.dispatchEvent),R6="unhandledrejection",O6=function(r){var a;return!(!T6(r)||!Pm(a=r.then))&&a},M6=function(r,a){var c,f,m,x=a.value,S=a.state==1,R=S?r.ok:r.fail,A=r.resolve,B=r.reject,q=r.domain;try{R?(S||(a.rejection===2&&_I(a),a.rejection=1),R===!0?c=x:(q&&q.enter(),c=R(x),q&&(q.exit(),m=!0)),c===r.promise?B(N6("Promise-chain cycle")):(f=O6(c))?zd(f,c,A,B):A(c)):B(x)}catch(j){q&&!m&&q.exit(),B(j)}},P6=function(r,a){r.notified||(r.notified=!0,o1(function(){for(var c,f=r.reactions;c=f.get();)M6(c,r);r.notified=!1,a&&!r.rejection&&gI(r)}))},V6=function(r,a,c){var f,m;vI?((f=l1.createEvent("Event")).promise=a,f.reason=c,f.initEvent(r,!1,!0),hc.dispatchEvent(f)):f={promise:a,reason:c},!hI&&(m=hc["on"+r])?m(f):r===R6&&dI("Unhandled promise rejection",c)},gI=function(r){zd(I6,hc,function(){var a,c=r.facade,f=r.value;if(L6(r)&&(a=fI(function(){Mm?c1.emit("unhandledRejection",f,c):V6(R6,c,f)}),r.rejection=Mm||L6(r)?2:1,a.error))throw a.value})},L6=function(r){return r.rejection!==1&&!r.parent},_I=function(r){zd(I6,hc,function(){var a=r.facade;Mm?c1.emit("rejectionHandled",a):V6("rejectionhandled",a,r.value)})},jd=function(r,a,c){return function(f){r(a,f,c)}},Gd=function(r,a,c){r.done||(r.done=!0,c&&(r=c),r.value=a,r.state=2,P6(r,!0))},d1=function(r,a,c){if(!r.done){r.done=!0,c&&(r=c);try{if(r.facade===a)throw N6("Promise can't be resolved itself");var f=O6(a);f?o1(function(){var m={done:!1};try{zd(f,a,jd(d1,m,r),jd(Gd,m,r))}catch(x){Gd(m,x,r)}}):(r.value=a,r.state=1,P6(r,!1))}catch(m){Gd({done:!1},m,r)}}};if(D6&&(Lm=(Wd=function(r){cI(this,Lm),lI(r),zd(n1,this);var a=a1(this);try{r(jd(d1,a),jd(Gd,a))}catch(c){Gd(a,c)}}).prototype,(n1=function(r){s1(this,{type:a0,done:!1,notified:!1,parent:!1,reactions:new Za,rejection:!1,state:0,value:void 0})}).prototype=r1(Lm,"then",function(r,a){var c=a1(this),f=u1(uI(this,Wd));return c.parent=!0,f.ok=!Pm(r)||r,f.fail=Pm(a)&&a,f.domain=Mm?c1.domain:void 0,c.state==0?c.reactions.add(f):o1(function(){M6(f,c)}),f.promise}),w6=function(){var r=new n1,a=a1(r);this.promise=r,this.resolve=jd(d1,a),this.reject=jd(Gd,a)},A6.f=u1=function(r){return r===Wd||r===void 0?new w6(r):mI(r)},Pm(Vm)&&Hd!==Object.prototype)){S6=Hd.then,pI||r1(Hd,"then",function(r,a){var c=this;return new Wd(function(f,m){zd(S6,c,f,m)}).then(r,a)},{unsafe:!0});try{delete Hd.constructor}catch{}i1&&i1(Hd,Lm)}aI({global:!0,constructor:!0,wrap:!0,forced:D6},{Promise:Wd}),C6(Wd,a0,!1),sI(a0);var f1=ou,B6=Oe("iterator"),yI=Array.prototype,h1=function(r){return r!==void 0&&(f1.Array===r||yI[B6]===r)},bI=ac,F6=Uo,xI=O,EI=ou,wI=Oe("iterator"),s0=function(r){if(!xI(r))return F6(r,wI)||F6(r,"@@iterator")||EI[bI(r)]},$6=Kt,SI=Ci,Bm=Me,CI=xi,TI=s0,II=TypeError,Fm=function(r,a){var c=arguments.length<2?TI(r):a;if(SI(c))return Bm($6(c,r));throw II(CI(r)+" is not iterable")},kI=Kt,U6=Me,AI=Uo,z6=function(r,a,c){var f,m;U6(r);try{if(!(f=AI(r,"return"))){if(a==="throw")throw c;return c}f=kI(f,r)}catch(x){m=!0,f=x}if(a==="throw")throw c;if(m)throw f;return U6(f),c},DI=uc,NI=Kt,RI=Me,OI=xi,MI=h1,PI=fi,H6=on,VI=Fm,W6=s0,p1=z6,LI=TypeError,$m=function(r,a){this.stopped=r,this.result=a},j6=$m.prototype,G6=function(r,a,c){var f,m,x,S,R,A,B,q=c&&c.that,j=!(!c||!c.AS_ENTRIES),he=!(!c||!c.IS_RECORD),xe=!(!c||!c.IS_ITERATOR),Pe=!(!c||!c.INTERRUPTED),ht=DI(a,q),Ft=function(wt){return f&&p1(f,"normal",wt),new $m(!0,wt)},Vt=function(wt){return j?(RI(wt),Pe?ht(wt[0],wt[1],Ft):ht(wt[0],wt[1])):Pe?ht(wt,Ft):ht(wt)};if(he)f=r.iterator;else if(xe)f=r;else{if(!(m=W6(r)))throw LI(OI(r)+" is not iterable");if(MI(m)){for(x=0,S=PI(r);S>x;x++)if((R=Vt(r[x]))&&H6(j6,R))return R;return new $m(!1)}f=VI(r,m)}for(A=he?r.next:f.next;!(B=NI(A,f)).done;){try{R=Vt(B.value)}catch(wt){p1(f,"throw",wt)}if(typeof R=="object"&&R&&H6(j6,R))return R}return new $m(!1)},l0=Oe("iterator"),q6=!1;try{var BI=0,Y6={next:function(){return{done:!!BI++}},return:function(){q6=!0}};Y6[l0]=function(){return this},Array.from(Y6,function(){throw 2})}catch{}var K6=function(r,a){if(!a&&!q6)return!1;var c=!1;try{var f={};f[l0]=function(){return{next:function(){return{done:c=!0}}}},r(f)}catch{}return c},FI=r0,X6=fc.CONSTRUCTOR||!K6(function(r){FI.all(r).then(void 0,function(){})}),$I=Kt,UI=Ci,zI=Ud,HI=Q2,WI=G6;Zn({target:"Promise",stat:!0,forced:X6},{all:function(r){var a=this,c=zI.f(a),f=c.resolve,m=c.reject,x=HI(function(){var S=UI(a.resolve),R=[],A=0,B=1;WI(r,function(q){var j=A++,he=!1;B++,$I(S,a,q).then(function(xe){he||(he=!0,R[j]=xe,--B||f(R))},m)}),--B||f(R)});return x.error&&m(x.value),c.promise}});var Um=Zn,jI=fc.CONSTRUCTOR,zm=r0,J6=Dn,m1=K,Z6=Ya,v1=zm&&zm.prototype;if(Um({target:"Promise",proto:!0,forced:jI,real:!0},{catch:function(r){return this.then(void 0,r)}}),m1(zm)){var g1=J6("Promise").prototype.catch;v1.catch!==g1&&Z6(v1,"catch",g1,{unsafe:!0})}var Q6=Kt,GI=Ci,qI=Ud,YI=Q2,Hm=G6;Zn({target:"Promise",stat:!0,forced:X6},{race:function(r){var a=this,c=qI.f(a),f=c.reject,m=YI(function(){var x=GI(a.resolve);Hm(r,function(S){Q6(x,a,S).then(c.resolve,f)})});return m.error&&f(m.value),c.promise}});var Wm=Kt,KI=Ud;Zn({target:"Promise",stat:!0,forced:fc.CONSTRUCTOR},{reject:function(r){var a=KI.f(this);return Wm(a.reject,void 0,r),a.promise}});var XI=Me,_1=Be,eb=Ud,tb=function(r,a){if(XI(r),_1(a)&&a.constructor===r)return a;var c=eb.f(r);return(0,c.resolve)(a),c.promise},JI=Zn,ZI=fc.CONSTRUCTOR,QI=tb;Dn("Promise"),JI({target:"Promise",stat:!0,forced:ZI},{resolve:function(r){return QI(this,r)}});var ek=K,tk=Be,nb=Od,rb=function(r,a,c){var f,m;return nb&&ek(f=a.constructor)&&f!==c&&tk(m=f.prototype)&&m!==c.prototype&&nb(r,m),r},nk=Be,rk=w,ik=Oe("match"),ib=function(r){var a;return nk(r)&&((a=r[ik])!==void 0?!!a:rk(r)=="RegExp")},ws=ac,ok=String,Ma=function(r){if(ws(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ok(r)},_u=Me,_r=function(){var r=_u(this),a="";return r.hasIndices&&(a+="d"),r.global&&(a+="g"),r.ignoreCase&&(a+="i"),r.multiline&&(a+="m"),r.dotAll&&(a+="s"),r.unicode&&(a+="u"),r.unicodeSets&&(a+="v"),r.sticky&&(a+="y"),a},ak=Kt,va=fe,ro=on,sk=_r,Sl=RegExp.prototype,ob=function(r){var a=r.flags;return a!==void 0||"flags"in Sl||va(r,"flags")||!ro(Sl,r)?a:ak(sk,r)},y1=s,b1=Q.RegExp,x1=y1(function(){var r=b1("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),lk=x1||y1(function(){return!b1("a","y").sticky}),E1=x1||y1(function(){var r=b1("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),ab={BROKEN_CARET:E1,MISSED_STICKY:lk,UNSUPPORTED_Y:x1},Cl=pt.f,sb=s,jm=Q.RegExp,Ui=sb(function(){var r=jm(".","s");return!(r.dotAll&&r.exec(`
130
130
  `)&&r.flags==="s")}),qi=s,lb=Q.RegExp,cb=qi(function(){var r=lb("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),ck=Ue,w1=Q,c0=v,uk=C2,dk=rb,ub=$s,u0=Nh.f,Gm=on,fk=ib,S1=Ma,qm=ob,ga=ab,qd=function(r,a,c){c in r||Cl(r,c,{configurable:!0,get:function(){return a[c]},set:function(f){a[c]=f}})},hk=Ya,pk=s,mk=fe,vk=pa.enforce,gk=Pd,C1=Ui,js=cb,Tr=Oe("match"),Tl=w1.RegExp,Ro=Tl.prototype,db=w1.SyntaxError,_k=c0(Ro.exec),ri=c0("".charAt),fb=c0("".replace),T1=c0("".indexOf),Ym=c0("".slice),yk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,yu=/a/g,I1=/a/g,bk=new Tl(yu)!==yu,hb=ga.MISSED_STICKY,xk=ga.UNSUPPORTED_Y,Ek=ck&&(!bk||hb||C1||js||pk(function(){return I1[Tr]=!1,Tl(yu)!=yu||Tl(I1)==I1||Tl(yu,"i")!="/a/i"}));if(uk("RegExp",Ek)){for(var bu=function(r,a){var c,f,m,x,S,R,A=Gm(Ro,this),B=fk(r),q=a===void 0,j=[],he=r;if(!A&&B&&q&&r.constructor===bu)return r;if((B||Gm(Ro,r))&&(r=r.source,q&&(a=qm(he))),r=r===void 0?"":S1(r),a=a===void 0?"":S1(a),he=r,C1&&"dotAll"in yu&&(f=!!a&&T1(a,"s")>-1)&&(a=fb(a,/s/g,"")),c=a,hb&&"sticky"in yu&&(m=!!a&&T1(a,"y")>-1)&&xk&&(a=fb(a,/y/g,"")),js&&(x=function(xe){for(var Pe,ht=xe.length,Ft=0,Vt="",wt=[],qn={},sr=!1,qr=!1,Hr=0,br="";Ft<=ht;Ft++){if((Pe=ri(xe,Ft))==="\\")Pe+=ri(xe,++Ft);else if(Pe==="]")sr=!1;else if(!sr)switch(!0){case Pe==="[":sr=!0;break;case Pe==="(":_k(yk,Ym(xe,Ft+1))&&(Ft+=2,qr=!0),Vt+=Pe,Hr++;continue;case(Pe===">"&&qr):if(br===""||mk(qn,br))throw new db("Invalid capture group name");qn[br]=!0,wt[wt.length]=[br,Hr],qr=!1,br="";continue}qr?br+=Pe:Vt+=Pe}return[Vt,wt]}(r),r=x[0],j=x[1]),S=dk(Tl(r,a),A?this:Ro,bu),(f||m||j.length)&&(R=vk(S),f&&(R.dotAll=!0,R.raw=bu(function(xe){for(var Pe,ht=xe.length,Ft=0,Vt="",wt=!1;Ft<=ht;Ft++)(Pe=ri(xe,Ft))!=="\\"?wt||Pe!=="."?(Pe==="["?wt=!0:Pe==="]"&&(wt=!1),Vt+=Pe):Vt+="[\\s\\S]":Vt+=Pe+ri(xe,++Ft);return Vt}(r),c)),m&&(R.sticky=!0),j.length&&(R.groups=j)),r!==he)try{ub(S,"source",he===""?"(?:)":he)}catch{}return S},pb=u0(Tl),mb=0;pb.length>mb;)qd(bu,Tl,pb[mb++]);Ro.constructor=bu,bu.prototype=Ro,hk(w1,"RegExp",bu,{constructor:!0})}gk("RegExp");var Yd=Kt,Km=v,wk=Ma,k1=_r,Sk=ab,A1=Ed,Ck=pa.get,Tk=Ui,Ik=cb,Eo=X("native-string-replace",String.prototype.replace),Oo=RegExp.prototype.exec,D1=Oo,kk=Km("".charAt),Ak=Km("".indexOf),vb=Km("".replace),N1=Km("".slice),R1=function(){var r=/a/,a=/b*/g;return Yd(Oo,r,"a"),Yd(Oo,a,"a"),r.lastIndex!==0||a.lastIndex!==0}(),gb=Sk.BROKEN_CARET,Xm=/()??/.exec("")[1]!==void 0;(R1||Xm||gb||Tk||Ik)&&(D1=function(r){var a,c,f,m,x,S,R,A=this,B=Ck(A),q=wk(r),j=B.raw;if(j)return j.lastIndex=A.lastIndex,a=Yd(D1,j,q),A.lastIndex=j.lastIndex,a;var he=B.groups,xe=gb&&A.sticky,Pe=Yd(k1,A),ht=A.source,Ft=0,Vt=q;if(xe&&(Pe=vb(Pe,"y",""),Ak(Pe,"g")===-1&&(Pe+="g"),Vt=N1(q,A.lastIndex),A.lastIndex>0&&(!A.multiline||A.multiline&&kk(q,A.lastIndex-1)!==`
131
131
  `)&&(ht="(?: "+ht+")",Vt=" "+Vt,Ft++),c=new RegExp("^(?:"+ht+")",Pe)),Xm&&(c=new RegExp("^"+ht+"$(?!\\s)",Pe)),R1&&(f=A.lastIndex),m=Yd(Oo,xe?c:A,Vt),xe?m?(m.input=N1(m.input,Ft),m[0]=N1(m[0],Ft),m.index=A.lastIndex,A.lastIndex+=m[0].length):A.lastIndex=0:R1&&m&&(A.lastIndex=A.global?m.index+m[0].length:f),Xm&&m&&m.length>1&&Yd(Eo,m[0],c,function(){for(x=1;x<arguments.length-2;x++)arguments[x]===void 0&&(m[x]=void 0)}),m&&he)for(m.groups=S=A1(null),x=0;x<he.length;x++)S[(R=he[x])[0]]=m[R[1]];return m});var Jm=D1;Zn({target:"RegExp",proto:!0,forced:/./.exec!==Jm},{exec:Jm});var Dk=w,_b=Array.isArray||function(r){return Dk(r)=="Array"},O1=_b,yb=U2,Nk=Be,Rk=Oe("species"),bb=Array,Ok=function(r){var a;return O1(r)&&(a=r.constructor,(yb(a)&&(a===bb||O1(a.prototype))||Nk(a)&&(a=a[Rk])===null)&&(a=void 0)),a===void 0?bb:a},Kd=uc,Mk=k,Pk=ge,Vk=fi,Lk=function(r,a){return new(Ok(r))(a===0?0:a)},xb=v([].push),Eb=function(r){var a=r==1,c=r==2,f=r==3,m=r==4,x=r==6,S=r==7,R=r==5||x;return function(A,B,q,j){for(var he,xe,Pe=Pk(A),ht=Mk(Pe),Ft=Kd(B,q),Vt=Vk(ht),wt=0,qn=j||Lk,sr=a?qn(A,Vt):c||S?qn(A,0):void 0;Vt>wt;wt++)if((R||wt in ht)&&(xe=Ft(he=ht[wt],wt,Pe),r))if(a)sr[wt]=xe;else if(xe)switch(r){case 3:return!0;case 5:return he;case 6:return wt;case 2:xb(sr,he)}else switch(r){case 4:return!1;case 7:xb(sr,he)}return x?-1:f||m?m:sr}},M1={forEach:Eb(0)},Bk=s,P1=function(r,a){var c=[][r];return!!c&&Bk(function(){c.call(null,a||function(){return 1},1)})},Fk=M1.forEach,$k=P1("forEach")?[].forEach:function(r){return Fk(this,r,arguments.length>1?arguments[1]:void 0)},wb=Q,Sb=H3,Uk=j3,V1=$k,zk=$s,Cb=function(r){if(r&&r.forEach!==V1)try{zk(r,"forEach",V1)}catch{r.forEach=V1}};for(var L1 in Sb)Sb[L1]&&Cb(wb[L1]&&wb[L1].prototype);Cb(Uk);var Hk=Ci,Wk=ge,jk=k,Gk=fi,qk=TypeError,Yk=function(r){return function(a,c,f,m){Hk(c);var x=Wk(a),S=jk(x),R=Gk(x),A=r?R-1:0,B=r?-1:1;if(f<2)for(;;){if(A in S){m=S[A],A+=B;break}if(A+=B,r?A<0:R<=A)throw qk("Reduce of empty array with no initial value")}for(;r?A>=0:R>A;A+=B)A in S&&(m=c(m,S[A],A,x));return m}},Kk={left:Yk(!1)}.left;Zn({target:"Array",proto:!0,forced:!Md&&Xt>79&&Xt<83||!P1("reduce")},{reduce:function(r){var a=arguments.length;return Kk(this,r,a,a>1?arguments[1]:void 0)}});var Tb=cc,Ib=Ya,Xk=Jm,kb=s,Ab=Oe,Jk=Ab("species"),Db=RegExp.prototype,d0=v,Nb=Cn,Rb=Ma,Zk=V,Qk=d0("".charAt),Ob=d0("".charCodeAt),B1=d0("".slice),Mb=function(r){return function(a,c){var f,m,x=Rb(Zk(a)),S=Nb(c),R=x.length;return S<0||S>=R?r?"":void 0:(f=Ob(x,S))<55296||f>56319||S+1===R||(m=Ob(x,S+1))<56320||m>57343?r?Qk(x,S):f:r?B1(x,S,S+2):m-56320+(f-55296<<10)+65536}},F1={codeAt:Mb(!1),charAt:Mb(!0)},eA=F1.charAt,qo=v,$1=ge,tA=Math.floor,U1=qo("".charAt),nA=qo("".replace),z1=qo("".slice),H1=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,rA=/\$([$&'`]|\d{1,2})/g,Zm=function(r,a,c,f,m,x){var S=c+r.length,R=f.length,A=rA;return m!==void 0&&(m=$1(m),A=H1),nA(x,A,function(B,q){var j;switch(U1(q,0)){case"$":return"$";case"&":return r;case"`":return z1(a,0,c);case"'":return z1(a,S);case"<":j=m[z1(q,1,-1)];break;default:var he=+q;if(he===0)return B;if(he>R){var xe=tA(he/10);return xe===0?B:xe<=R?f[xe-1]===void 0?U1(q,1):f[xe-1]+U1(q,1):B}j=f[he-1]}return j===void 0?"":j})},Pb=Kt,iA=Me,oA=K,aA=w,Vb=Jm,sA=TypeError,lA=xs,Lb=Kt,Xd=v,W1=function(r,a,c,f){var m=Ab(r),x=!kb(function(){var B={};return B[m]=function(){return 7},""[r](B)!=7}),S=x&&!kb(function(){var B=!1,q=/a/;return r==="split"&&((q={}).constructor={},q.constructor[Jk]=function(){return q},q.flags="",q[m]=/./[m]),q.exec=function(){return B=!0,null},q[m](""),!B});if(!x||!S||c){var R=Tb(/./[m]),A=a(m,""[r],function(B,q,j,he,xe){var Pe=Tb(B),ht=q.exec;return ht===Xk||ht===Db.exec?x&&!xe?{done:!0,value:R(q,j,he)}:{done:!0,value:Pe(j,q,he)}:{done:!1}});Ib(String.prototype,r,A[0]),Ib(Db,m,A[1])}},cA=s,uA=Me,dA=K,fA=O,hA=Cn,pA=jr,Jd=Ma,mA=V,vA=function(r,a,c){return a+(c?eA(r,a).length:1)},gA=Uo,_A=Zm,yA=function(r,a){var c=r.exec;if(oA(c)){var f=Pb(c,r,a);return f!==null&&iA(f),f}if(aA(r)==="RegExp")return Pb(Vb,r,a);throw sA("RegExp#exec called on incompatible receiver")},j1=Oe("replace"),bA=Math.max,xA=Math.min,EA=Xd([].concat),G1=Xd([].push),Bb=Xd("".indexOf),Fb=Xd("".slice),wA=function(r){return r===void 0?r:String(r)},SA="a".replace(/./,"$0")==="$0",g=!!/./[j1]&&/./[j1]("a","$0")==="",E=!cA(function(){var r=/./;return r.exec=function(){var a=[];return a.groups={a:"7"},a},"".replace(r,"$<a>")!=="7"});W1("replace",function(r,a,c){var f=g?"$":"$0";return[function(m,x){var S=mA(this),R=fA(m)?void 0:gA(m,j1);return R?Lb(R,m,S,x):Lb(a,Jd(S),m,x)},function(m,x){var S=uA(this),R=Jd(m);if(typeof x=="string"&&Bb(x,f)===-1&&Bb(x,"$<")===-1){var A=c(a,S,R,x);if(A.done)return A.value}var B=dA(x);B||(x=Jd(x));var q=S.global;if(q){var j=S.unicode;S.lastIndex=0}for(var he=[];;){var xe=yA(S,R);if(xe===null||(G1(he,xe),!q))break;Jd(xe[0])===""&&(S.lastIndex=vA(R,pA(S.lastIndex),j))}for(var Pe="",ht=0,Ft=0;Ft<he.length;Ft++){for(var Vt=Jd((xe=he[Ft])[0]),wt=bA(xA(hA(xe.index),R.length),0),qn=[],sr=1;sr<xe.length;sr++)G1(qn,wA(xe[sr]));var qr=xe.groups;if(B){var Hr=EA([Vt],qn,wt,R);qr!==void 0&&G1(Hr,qr);var br=Jd(lA(x,void 0,Hr))}else br=_A(Vt,R,wt,qn,qr,x);wt>=ht&&(Pe+=Fb(R,ht,wt)+br,ht=wt+Vt.length)}return Pe+Fb(R,ht)}]},!E||!SA||g);var M=qp.includes,z=f3;Zn({target:"Array",proto:!0,forced:s(function(){return!Array(1).includes()})},{includes:function(r){return M(this,r,arguments.length>1?arguments[1]:void 0)}}),z("includes");var ae=Cn,Se=Ma,$e=V,Xe=RangeError,ft=v,Ht=jr,Wt=Ma,sn=function(r){var a=Se($e(this)),c="",f=ae(r);if(f<0||f==1/0)throw Xe("Wrong number of repetitions");for(;f>0;(f>>>=1)&&(a+=a))1&f&&(c+=a);return c},Nn=V,Kn=ft(sn),lr=ft("".slice),Nr=Math.ceil,cr=function(r){return function(a,c,f){var m,x,S=Wt(Nn(a)),R=Ht(c),A=S.length,B=f===void 0?" ":Wt(f);return R<=A||B==""?S:((x=Kn(B,Nr((m=R-A)/B.length))).length>m&&(x=lr(x,0,m)),r?S+x:x+S)}},Fr={start:cr(!1)},Xr=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(et),Pa=Fr.start;Zn({target:"String",proto:!0,forced:Xr},{padStart:function(r){return Pa(this,r,arguments.length>1?arguments[1]:void 0)}});var ia=s,Va=Ue,io=Oe("iterator"),Qa=!ia(function(){var r=new URL("b?a=1&b=2&c=3","http://a"),a=r.searchParams,c="";return r.pathname="c%20d",a.forEach(function(f,m){a.delete("b"),c+=m+f}),!a.size&&!Va||!a.sort||r.href!=="http://a/c%20d?a=1&c=3"||a.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!a[io]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||c!=="a1c3"||new URL("http://x",void 0).host!=="x"}),Il=Ya,q1=function(r,a,c){for(var f in a)Il(r,f,a[f],c);return r},eie=mn,tie=pt,nie=xo,SV=function(r,a,c){var f=eie(a);f in r?tie.f(r,f,nie(0,c)):r[f]=c},CV=An,rie=fi,iie=SV,oie=Array,aie=Math.max,CA=function(r,a,c){for(var f=rie(r),m=CV(a,f),x=CV(c===void 0?f:c,f),S=oie(aie(x-m,0)),R=0;m<x;m++,R++)iie(S,R,r[m]);return S.length=R,S},TV=CA,sie=Math.floor,TA=function(r,a){var c=r.length,f=sie(c/2);return c<8?lie(r,a):cie(r,TA(TV(r,0,f),a),TA(TV(r,f),a),a)},lie=function(r,a){for(var c,f,m=r.length,x=1;x<m;){for(f=x,c=r[x];f&&a(r[f-1],c)>0;)r[f]=r[--f];f!==x++&&(r[f]=c)}return r},cie=function(r,a,c,f){for(var m=a.length,x=c.length,S=0,R=0;S<m||R<x;)r[S+R]=S<m&&R<x?f(a[S],c[R])<=0?a[S++]:c[R++]:S<m?a[S++]:c[R++];return r},IA=TA,kA=Zn,Qm=Q,$b=Kt,pc=v,ev=Ue,IV=Qa,kV=Ya,uie=oc,die=q1,fie=Xa,hie=R3,AA=pa,AV=jh,DA=K,pie=fe,mie=uc,vie=ac,gie=Me,DV=Be,Ss=Ma,_ie=Ed,NV=xo,NA=Fm,yie=s0,tv=pu,bie=IA,xie=Oe("iterator"),Y1="URLSearchParams",RV=Y1+"Iterator",OV=AA.set,Gs=AA.getterFor(Y1),Eie=AA.getterFor(RV),wie=Object.getOwnPropertyDescriptor,RA=function(r){if(!ev)return Qm[r];var a=wie(Qm,r);return a&&a.value},MV=RA("fetch"),Ub=RA("Request"),K1=RA("Headers"),OA=Ub&&Ub.prototype,PV=K1&&K1.prototype,Sie=Qm.RegExp,Cie=Qm.TypeError,VV=Qm.decodeURIComponent,Tie=Qm.encodeURIComponent,Iie=pc("".charAt),LV=pc([].join),f0=pc([].push),MA=pc("".replace),kie=pc([].shift),BV=pc([].splice),FV=pc("".split),Aie=pc("".slice),Die=/\+/g,$V=Array(4),Nie=function(r){return $V[r-1]||($V[r-1]=Sie("((?:%[\\da-f]{2}){"+r+"})","gi"))},Rie=function(r){try{return VV(r)}catch{return r}},UV=function(r){var a=MA(r,Die," "),c=4;try{return VV(a)}catch{for(;c;)a=MA(a,Nie(c--),Rie);return a}},Oie=/[!'()~]|%20/g,Mie={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pie=function(r){return Mie[r]},zV=function(r){return MA(Tie(r),Oie,Pie)},PA=hie(function(r,a){OV(this,{type:RV,iterator:NA(Gs(r).entries),kind:a})},"Iterator",function(){var r=Eie(this),a=r.kind,c=r.iterator.next(),f=c.value;return c.done||(c.value=a==="keys"?f.key:a==="values"?f.value:[f.key,f.value]),c},!0),HV=function(r){this.entries=[],this.url=null,r!==void 0&&(DV(r)?this.parseObject(r):this.parseQuery(typeof r=="string"?Iie(r,0)==="?"?Aie(r,1):r:Ss(r)))};HV.prototype={type:Y1,bindURL:function(r){this.url=r,this.update()},parseObject:function(r){var a,c,f,m,x,S,R,A=yie(r);if(A)for(c=(a=NA(r,A)).next;!(f=$b(c,a)).done;){if(x=(m=NA(gie(f.value))).next,(S=$b(x,m)).done||(R=$b(x,m)).done||!$b(x,m).done)throw Cie("Expected sequence with length 2");f0(this.entries,{key:Ss(S.value),value:Ss(R.value)})}else for(var B in r)pie(r,B)&&f0(this.entries,{key:B,value:Ss(r[B])})},parseQuery:function(r){if(r)for(var a,c,f=FV(r,"&"),m=0;m<f.length;)(a=f[m++]).length&&(c=FV(a,"="),f0(this.entries,{key:UV(kie(c)),value:UV(LV(c,"="))}))},serialize:function(){for(var r,a=this.entries,c=[],f=0;f<a.length;)r=a[f++],f0(c,zV(r.key)+"="+zV(r.value));return LV(c,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var zb=function(){AV(this,nv);var r=OV(this,new HV(arguments.length>0?arguments[0]:void 0));ev||(this.length=r.entries.length)},nv=zb.prototype;if(die(nv,{append:function(r,a){tv(arguments.length,2);var c=Gs(this);f0(c.entries,{key:Ss(r),value:Ss(a)}),ev||this.length++,c.updateURL()},delete:function(r){tv(arguments.length,1);for(var a=Gs(this),c=a.entries,f=Ss(r),m=0;m<c.length;)c[m].key===f?BV(c,m,1):m++;ev||(this.length=c.length),a.updateURL()},get:function(r){tv(arguments.length,1);for(var a=Gs(this).entries,c=Ss(r),f=0;f<a.length;f++)if(a[f].key===c)return a[f].value;return null},getAll:function(r){tv(arguments.length,1);for(var a=Gs(this).entries,c=Ss(r),f=[],m=0;m<a.length;m++)a[m].key===c&&f0(f,a[m].value);return f},has:function(r){tv(arguments.length,1);for(var a=Gs(this).entries,c=Ss(r),f=0;f<a.length;)if(a[f++].key===c)return!0;return!1},set:function(r,a){tv(arguments.length,1);for(var c,f=Gs(this),m=f.entries,x=!1,S=Ss(r),R=Ss(a),A=0;A<m.length;A++)(c=m[A]).key===S&&(x?BV(m,A--,1):(x=!0,c.value=R));x||f0(m,{key:S,value:R}),ev||(this.length=m.length),f.updateURL()},sort:function(){var r=Gs(this);bie(r.entries,function(a,c){return a.key>c.key?1:-1}),r.updateURL()},forEach:function(r){for(var a,c=Gs(this).entries,f=mie(r,arguments.length>1?arguments[1]:void 0),m=0;m<c.length;)f((a=c[m++]).value,a.key,this)},keys:function(){return new PA(this,"keys")},values:function(){return new PA(this,"values")},entries:function(){return new PA(this,"entries")}},{enumerable:!0}),kV(nv,xie,nv.entries,{name:"entries"}),kV(nv,"toString",function(){return Gs(this).serialize()},{enumerable:!0}),ev&&uie(nv,"size",{get:function(){return Gs(this).entries.length},configurable:!0,enumerable:!0}),fie(zb,Y1),kA({global:!0,constructor:!0,forced:!IV},{URLSearchParams:zb}),!IV&&DA(K1)){var Vie=pc(PV.has),Lie=pc(PV.set),WV=function(r){if(DV(r)){var a,c=r.body;if(vie(c)===Y1)return a=r.headers?new K1(r.headers):new K1,Vie(a,"content-type")||Lie(a,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_ie(r,{body:NV(0,Ss(c)),headers:NV(0,a)})}return r};if(DA(MV)&&kA({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(r){return MV(r,arguments.length>1?WV(arguments[1]):{})}}),DA(Ub)){var VA=function(r){return AV(this,OA),new Ub(r,arguments.length>1?WV(arguments[1]):{})};OA.constructor=VA,VA.prototype=OA,kA({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:VA})}}var Bie={URLSearchParams:zb,getState:Gs},Fie=Zn,Hb=r0,$ie=s,jV=Dn,GV=K,Uie=Em,qV=tb,zie=Ya,LA=Hb&&Hb.prototype;if(Fie({target:"Promise",proto:!0,real:!0,forced:!!Hb&&$ie(function(){LA.finally.call({then:function(){}},function(){})})},{finally:function(r){var a=Uie(this,jV("Promise")),c=GV(r);return this.then(c?function(f){return qV(a,r()).then(function(){return f})}:r,c?function(f){return qV(a,r()).then(function(){throw f})}:r)}}),GV(Hb)){var YV=jV("Promise").prototype.finally;LA.finally!==YV&&zie(LA,"finally",YV,{unsafe:!0})}var KV=`
132
132
  \v\f\r                 \u2028\u2029\uFEFF`,Hie=V,Wie=Ma,BA=KV,XV=v("".replace),jie=RegExp("^["+BA+"]+"),Gie=RegExp("(^|[^"+BA+"])["+BA+"]+$"),qie=function(r){return function(a){var c=Wie(Hie(a));return 1&r&&(c=XV(c,jie,"")),2&r&&(c=XV(c,Gie,"$1")),c}},Yie={trim:qie(3)},Kie=Ho.PROPER,Xie=s,JV=KV,Jie=Yie.trim;Zn({target:"String",proto:!0,forced:function(r){return Xie(function(){return!!JV[r]()||"​…᠎"[r]()!=="​…᠎"||Kie&&JV[r].name!==r})}("trim")},{trim:function(){return Jie(this)}});var Zie=Zn,Qie=Ue,Wb=v,eoe=fe,toe=K,noe=on,roe=Ma,ioe=oc,ooe=uu,xu=Q.Symbol,h0=xu&&xu.prototype;if(Qie&&toe(xu)&&(!("description"in h0)||xu().description!==void 0)){var ZV={},jb=function(){var r=arguments.length<1||arguments[0]===void 0?void 0:roe(arguments[0]),a=noe(h0,this)?new xu(r):r===void 0?xu():xu(r);return r===""&&(ZV[a]=!0),a};ooe(jb,xu),jb.prototype=h0,h0.constructor=jb;var aoe=String(xu("test"))=="Symbol(test)",soe=Wb(h0.valueOf),loe=Wb(h0.toString),coe=/^Symbol\((.*)\)[^)]+$/,uoe=Wb("".replace),doe=Wb("".slice);ioe(h0,"description",{configurable:!0,get:function(){var r=soe(this);if(eoe(ZV,r))return"";var a=loe(r),c=aoe?doe(a,7,-1):uoe(a,coe,"$1");return c===""?void 0:c}}),Zie({global:!0,constructor:!0,forced:!0},{Symbol:jb})}var foe=F1.charAt,hoe=Ma,QV=pa,poe=bs,eL=dm,tL="String Iterator",moe=QV.set,voe=QV.getterFor(tL);poe(String,"String",function(r){moe(this,{type:tL,string:hoe(r),index:0})},function(){var r,a=voe(this),c=a.string,f=a.index;return f>=c.length?eL(void 0,!0):(r=foe(c,f),a.index+=r.length,eL(r,!1))});var qs,nL=Ue,goe=v,_oe=Kt,yoe=s,FA=Jt,boe=Rh,xoe=y2,Eoe=ge,woe=k,rv=Object.assign,rL=Object.defineProperty,Soe=goe([].concat),Coe=!rv||yoe(function(){if(nL&&rv({b:1},rv(rL({},"a",{enumerable:!0,get:function(){rL(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},a={},c=Symbol(),f="abcdefghijklmnopqrst";return r[c]=7,f.split("").forEach(function(m){a[m]=m}),rv({},r)[c]!=7||FA(rv({},a)).join("")!=f})?function(r,a){for(var c=Eoe(r),f=arguments.length,m=1,x=boe.f,S=xoe.f;f>m;)for(var R,A=woe(arguments[m++]),B=x?Soe(FA(A),x(A)):FA(A),q=B.length,j=0;q>j;)R=B[j++],nL&&!_oe(S,A,R)||(c[R]=A[R]);return c}:rv,Toe=Me,Ioe=z6,koe=uc,Aoe=Kt,Doe=ge,Noe=function(r,a,c,f){try{return f?a(Toe(c)[0],c[1]):a(c)}catch(m){Ioe(r,"throw",m)}},Roe=h1,Ooe=U2,Moe=fi,iL=SV,Poe=Fm,Voe=s0,oL=Array,p0=v,$A=2147483647,Loe=/[^\0-\u007E]/,aL=/[.\u3002\uFF0E\uFF61]/g,sL="Overflow: input needs wider integers to process",lL=RangeError,Boe=p0(aL.exec),iv=Math.floor,UA=String.fromCharCode,cL=p0("".charCodeAt),uL=p0([].join),Zd=p0([].push),Foe=p0("".replace),$oe=p0("".split),Uoe=p0("".toLowerCase),dL=function(r){return r+22+75*(r<26)},zoe=function(r,a,c){var f=0;for(r=c?iv(r/700):r>>1,r+=iv(r/a);r>455;)r=iv(r/35),f+=36;return iv(f+36*r/(r+38))},Hoe=function(r){var a=[];r=function(Vt){for(var wt=[],qn=0,sr=Vt.length;qn<sr;){var qr=cL(Vt,qn++);if(qr>=55296&&qr<=56319&&qn<sr){var Hr=cL(Vt,qn++);(64512&Hr)==56320?Zd(wt,((1023&qr)<<10)+(1023&Hr)+65536):(Zd(wt,qr),qn--)}else Zd(wt,qr)}return wt}(r);var c,f,m=r.length,x=128,S=0,R=72;for(c=0;c<r.length;c++)(f=r[c])<128&&Zd(a,UA(f));var A=a.length,B=A;for(A&&Zd(a,"-");B<m;){var q=$A;for(c=0;c<r.length;c++)(f=r[c])>=x&&f<q&&(q=f);var j=B+1;if(q-x>iv(($A-S)/j))throw lL(sL);for(S+=(q-x)*j,x=q,c=0;c<r.length;c++){if((f=r[c])<x&&++S>$A)throw lL(sL);if(f==x){for(var he=S,xe=36;;){var Pe=xe<=R?1:xe>=R+26?26:xe-R;if(he<Pe)break;var ht=he-Pe,Ft=36-Pe;Zd(a,UA(dL(Pe+ht%Ft))),he=iv(ht/Ft),xe+=36}Zd(a,UA(dL(he))),R=zoe(S,j,B==A),S=0,B++}}S++,x++}return uL(a,"")},Woe=Zn,zA=Ue,joe=Qa,HA=Q,fL=uc,Ys=v,Gb=Ya,Ks=oc,Goe=jh,WA=fe,jA=Coe,ov=function(r){var a=Doe(r),c=Ooe(this),f=arguments.length,m=f>1?arguments[1]:void 0,x=m!==void 0;x&&(m=koe(m,f>2?arguments[2]:void 0));var S,R,A,B,q,j,he=Voe(a),xe=0;if(!he||this===oL&&Roe(he))for(S=Moe(a),R=c?new this(S):oL(S);S>xe;xe++)j=x?m(a[xe],xe):a[xe],iL(R,xe,j);else for(q=(B=Poe(a,he)).next,R=c?new this:[];!(A=Aoe(q,B)).done;xe++)j=x?Noe(B,m,[A.value,xe],!0):A.value,iL(R,xe,j);return R.length=xe,R},kl=CA,qoe=F1.codeAt,Yoe=function(r){var a,c,f=[],m=$oe(Foe(Uoe(r),aL,"."),".");for(a=0;a<m.length;a++)c=m[a],Zd(f,Boe(Loe,c)?"xn--"+Hoe(c):c);return uL(f,".")},Eu=Ma,Koe=Xa,Xoe=pu,hL=Bie,pL=pa,Joe=pL.set,qb=pL.getterFor("URL"),Zoe=hL.URLSearchParams,Qoe=hL.getState,X1=HA.URL,GA=HA.TypeError,Yb=HA.parseInt,eae=Math.floor,mL=Math.pow,Xs=Ys("".charAt),Al=Ys(/./.exec),J1=Ys([].join),tae=Ys(1 .toString),nae=Ys([].pop),av=Ys([].push),qA=Ys("".replace),rae=Ys([].shift),iae=Ys("".split),Z1=Ys("".slice),Kb=Ys("".toLowerCase),oae=Ys([].unshift),YA="Invalid scheme",m0="Invalid host",vL="Invalid port",gL=/[a-z]/i,aae=/[\d+-.a-z]/i,KA=/\d/,sae=/^0x/i,lae=/^[0-7]+$/,cae=/^\d+$/,_L=/^[\da-f]+$/i,uae=/[\0\t\n\r #%/:<>?@[\\\]^|]/,dae=/[\0\t\n\r #/:<>?@[\\\]^|]/,fae=/^[\u0000-\u0020]+/,hae=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,pae=/[\t\n\r]/g,Q1=function(r){var a,c,f,m;if(typeof r=="number"){for(a=[],c=0;c<4;c++)oae(a,r%256),r=eae(r/256);return J1(a,".")}if(typeof r=="object"){for(a="",f=function(x){for(var S=null,R=1,A=null,B=0,q=0;q<8;q++)x[q]!==0?(B>R&&(S=A,R=B),A=null,B=0):(A===null&&(A=q),++B);return B>R&&(S=A,R=B),S}(r),c=0;c<8;c++)m&&r[c]===0||(m&&(m=!1),f===c?(a+=c?":":"::",m=!0):(a+=tae(r[c],16),c<7&&(a+=":")));return"["+a+"]"}return r},Xb={},yL=jA({},Xb,{" ":1,'"':1,"<":1,">":1,"`":1}),bL=jA({},yL,{"#":1,"?":1,"{":1,"}":1}),XA=jA({},bL,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qd=function(r,a){var c=qoe(r,0);return c>32&&c<127&&!WA(a,r)?r:encodeURIComponent(r)},Jb={ftp:21,file:null,http:80,https:443,ws:80,wss:443},e_=function(r,a){var c;return r.length==2&&Al(gL,Xs(r,0))&&((c=Xs(r,1))==":"||!a&&c=="|")},xL=function(r){var a;return r.length>1&&e_(Z1(r,0,2))&&(r.length==2||(a=Xs(r,2))==="/"||a==="\\"||a==="?"||a==="#")},mae=function(r){return r==="."||Kb(r)==="%2e"},JA={},EL={},ZA={},wL={},SL={},QA={},CL={},TL={},Zb={},Qb={},eD={},tD={},nD={},rD={},IL={},iD={},sv={},mc={},kL={},v0={},wu={},oD=function(r,a,c){var f,m,x,S=Eu(r);if(a){if(m=this.parse(S))throw GA(m);this.searchParams=null}else{if(c!==void 0&&(f=new oD(c,!0)),m=this.parse(S,null,f))throw GA(m);(x=Qoe(new Zoe)).bindURL(this),this.searchParams=x}};oD.prototype={type:"URL",parse:function(r,a,c){var f,m,x,S,R,A=this,B=a||JA,q=0,j="",he=!1,xe=!1,Pe=!1;for(r=Eu(r),a||(A.scheme="",A.username="",A.password="",A.host=null,A.port=null,A.path=[],A.query=null,A.fragment=null,A.cannotBeABaseURL=!1,r=qA(r,fae,""),r=qA(r,hae,"$1")),r=qA(r,pae,""),f=ov(r);q<=f.length;){switch(m=f[q],B){case JA:if(!m||!Al(gL,m)){if(a)return YA;B=ZA;continue}j+=Kb(m),B=EL;break;case EL:if(m&&(Al(aae,m)||m=="+"||m=="-"||m=="."))j+=Kb(m);else{if(m!=":"){if(a)return YA;j="",B=ZA,q=0;continue}if(a&&(A.isSpecial()!=WA(Jb,j)||j=="file"&&(A.includesCredentials()||A.port!==null)||A.scheme=="file"&&!A.host))return;if(A.scheme=j,a)return void(A.isSpecial()&&Jb[A.scheme]==A.port&&(A.port=null));j="",A.scheme=="file"?B=rD:A.isSpecial()&&c&&c.scheme==A.scheme?B=wL:A.isSpecial()?B=TL:f[q+1]=="/"?(B=SL,q++):(A.cannotBeABaseURL=!0,av(A.path,""),B=kL)}break;case ZA:if(!c||c.cannotBeABaseURL&&m!="#")return YA;if(c.cannotBeABaseURL&&m=="#"){A.scheme=c.scheme,A.path=kl(c.path),A.query=c.query,A.fragment="",A.cannotBeABaseURL=!0,B=wu;break}B=c.scheme=="file"?rD:QA;continue;case wL:if(m!="/"||f[q+1]!="/"){B=QA;continue}B=Zb,q++;break;case SL:if(m=="/"){B=Qb;break}B=mc;continue;case QA:if(A.scheme=c.scheme,m==qs)A.username=c.username,A.password=c.password,A.host=c.host,A.port=c.port,A.path=kl(c.path),A.query=c.query;else if(m=="/"||m=="\\"&&A.isSpecial())B=CL;else if(m=="?")A.username=c.username,A.password=c.password,A.host=c.host,A.port=c.port,A.path=kl(c.path),A.query="",B=v0;else{if(m!="#"){A.username=c.username,A.password=c.password,A.host=c.host,A.port=c.port,A.path=kl(c.path),A.path.length--,B=mc;continue}A.username=c.username,A.password=c.password,A.host=c.host,A.port=c.port,A.path=kl(c.path),A.query=c.query,A.fragment="",B=wu}break;case CL:if(!A.isSpecial()||m!="/"&&m!="\\"){if(m!="/"){A.username=c.username,A.password=c.password,A.host=c.host,A.port=c.port,B=mc;continue}B=Qb}else B=Zb;break;case TL:if(B=Zb,m!="/"||Xs(j,q+1)!="/")continue;q++;break;case Zb:if(m!="/"&&m!="\\"){B=Qb;continue}break;case Qb:if(m=="@"){he&&(j="%40"+j),he=!0,x=ov(j);for(var ht=0;ht<x.length;ht++){var Ft=x[ht];if(Ft!=":"||Pe){var Vt=Qd(Ft,XA);Pe?A.password+=Vt:A.username+=Vt}else Pe=!0}j=""}else if(m==qs||m=="/"||m=="?"||m=="#"||m=="\\"&&A.isSpecial()){if(he&&j=="")return"Invalid authority";q-=ov(j).length+1,j="",B=eD}else j+=m;break;case eD:case tD:if(a&&A.scheme=="file"){B=iD;continue}if(m!=":"||xe){if(m==qs||m=="/"||m=="?"||m=="#"||m=="\\"&&A.isSpecial()){if(A.isSpecial()&&j=="")return m0;if(a&&j==""&&(A.includesCredentials()||A.port!==null))return;if(S=A.parseHost(j))return S;if(j="",B=sv,a)return;continue}m=="["?xe=!0:m=="]"&&(xe=!1),j+=m}else{if(j=="")return m0;if(S=A.parseHost(j))return S;if(j="",B=nD,a==tD)return}break;case nD:if(!Al(KA,m)){if(m==qs||m=="/"||m=="?"||m=="#"||m=="\\"&&A.isSpecial()||a){if(j!=""){var wt=Yb(j,10);if(wt>65535)return vL;A.port=A.isSpecial()&&wt===Jb[A.scheme]?null:wt,j=""}if(a)return;B=sv;continue}return vL}j+=m;break;case rD:if(A.scheme="file",m=="/"||m=="\\")B=IL;else{if(!c||c.scheme!="file"){B=mc;continue}if(m==qs)A.host=c.host,A.path=kl(c.path),A.query=c.query;else if(m=="?")A.host=c.host,A.path=kl(c.path),A.query="",B=v0;else{if(m!="#"){xL(J1(kl(f,q),""))||(A.host=c.host,A.path=kl(c.path),A.shortenPath()),B=mc;continue}A.host=c.host,A.path=kl(c.path),A.query=c.query,A.fragment="",B=wu}}break;case IL:if(m=="/"||m=="\\"){B=iD;break}c&&c.scheme=="file"&&!xL(J1(kl(f,q),""))&&(e_(c.path[0],!0)?av(A.path,c.path[0]):A.host=c.host),B=mc;continue;case iD:if(m==qs||m=="/"||m=="\\"||m=="?"||m=="#"){if(!a&&e_(j))B=mc;else if(j==""){if(A.host="",a)return;B=sv}else{if(S=A.parseHost(j))return S;if(A.host=="localhost"&&(A.host=""),a)return;j="",B=sv}continue}j+=m;break;case sv:if(A.isSpecial()){if(B=mc,m!="/"&&m!="\\")continue}else if(a||m!="?")if(a||m!="#"){if(m!=qs&&(B=mc,m!="/"))continue}else A.fragment="",B=wu;else A.query="",B=v0;break;case mc:if(m==qs||m=="/"||m=="\\"&&A.isSpecial()||!a&&(m=="?"||m=="#")){if((R=Kb(R=j))===".."||R==="%2e."||R===".%2e"||R==="%2e%2e"?(A.shortenPath(),m=="/"||m=="\\"&&A.isSpecial()||av(A.path,"")):mae(j)?m=="/"||m=="\\"&&A.isSpecial()||av(A.path,""):(A.scheme=="file"&&!A.path.length&&e_(j)&&(A.host&&(A.host=""),j=Xs(j,0)+":"),av(A.path,j)),j="",A.scheme=="file"&&(m==qs||m=="?"||m=="#"))for(;A.path.length>1&&A.path[0]==="";)rae(A.path);m=="?"?(A.query="",B=v0):m=="#"&&(A.fragment="",B=wu)}else j+=Qd(m,bL);break;case kL:m=="?"?(A.query="",B=v0):m=="#"?(A.fragment="",B=wu):m!=qs&&(A.path[0]+=Qd(m,Xb));break;case v0:a||m!="#"?m!=qs&&(m=="'"&&A.isSpecial()?A.query+="%27":A.query+=m=="#"?"%23":Qd(m,Xb)):(A.fragment="",B=wu);break;case wu:m!=qs&&(A.fragment+=Qd(m,yL))}q++}},parseHost:function(r){var a,c,f;if(Xs(r,0)=="["){if(Xs(r,r.length-1)!="]"||(a=function(m){var x,S,R,A,B,q,j,he=[0,0,0,0,0,0,0,0],xe=0,Pe=null,ht=0,Ft=function(){return Xs(m,ht)};if(Ft()==":"){if(Xs(m,1)!=":")return;ht+=2,Pe=++xe}for(;Ft();){if(xe==8)return;if(Ft()!=":"){for(x=S=0;S<4&&Al(_L,Ft());)x=16*x+Yb(Ft(),16),ht++,S++;if(Ft()=="."){if(S==0||(ht-=S,xe>6))return;for(R=0;Ft();){if(A=null,R>0){if(!(Ft()=="."&&R<4))return;ht++}if(!Al(KA,Ft()))return;for(;Al(KA,Ft());){if(B=Yb(Ft(),10),A===null)A=B;else{if(A==0)return;A=10*A+B}if(A>255)return;ht++}he[xe]=256*he[xe]+A,++R!=2&&R!=4||xe++}if(R!=4)return;break}if(Ft()==":"){if(ht++,!Ft())return}else if(Ft())return;he[xe++]=x}else{if(Pe!==null)return;ht++,Pe=++xe}}if(Pe!==null)for(q=xe-Pe,xe=7;xe!=0&&q>0;)j=he[xe],he[xe--]=he[Pe+q-1],he[Pe+--q]=j;else if(xe!=8)return;return he}(Z1(r,1,-1)),!a))return m0;this.host=a}else if(this.isSpecial()){if(r=Yoe(r),Al(uae,r)||(a=function(m){var x,S,R,A,B,q,j,he=iae(m,".");if(he.length&&he[he.length-1]==""&&he.length--,(x=he.length)>4)return m;for(S=[],R=0;R<x;R++){if((A=he[R])=="")return m;if(B=10,A.length>1&&Xs(A,0)=="0"&&(B=Al(sae,A)?16:8,A=Z1(A,B==8?1:2)),A==="")q=0;else{if(!Al(B==10?cae:B==8?lae:_L,A))return m;q=Yb(A,B)}av(S,q)}for(R=0;R<x;R++)if(q=S[R],R==x-1){if(q>=mL(256,5-x))return null}else if(q>255)return null;for(j=nae(S),R=0;R<S.length;R++)j+=S[R]*mL(256,3-R);return j}(r),a===null))return m0;this.host=a}else{if(Al(dae,r))return m0;for(a="",c=ov(r),f=0;f<c.length;f++)a+=Qd(c[f],Xb);this.host=a}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme=="file"},includesCredentials:function(){return this.username!=""||this.password!=""},isSpecial:function(){return WA(Jb,this.scheme)},shortenPath:function(){var r=this.path,a=r.length;!a||this.scheme=="file"&&a==1&&e_(r[0],!0)||r.length--},serialize:function(){var r=this,a=r.scheme,c=r.username,f=r.password,m=r.host,x=r.port,S=r.path,R=r.query,A=r.fragment,B=a+":";return m!==null?(B+="//",r.includesCredentials()&&(B+=c+(f?":"+f:"")+"@"),B+=Q1(m),x!==null&&(B+=":"+x)):a=="file"&&(B+="//"),B+=r.cannotBeABaseURL?S[0]:S.length?"/"+J1(S,"/"):"",R!==null&&(B+="?"+R),A!==null&&(B+="#"+A),B},setHref:function(r){var a=this.parse(r);if(a)throw GA(a);this.searchParams.update()},getOrigin:function(){var r=this.scheme,a=this.port;if(r=="blob")try{return new lv(r.path[0]).origin}catch{return"null"}return r!="file"&&this.isSpecial()?r+"://"+Q1(this.host)+(a!==null?":"+a:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(r){this.parse(Eu(r)+":",JA)},getUsername:function(){return this.username},setUsername:function(r){var a=ov(Eu(r));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var c=0;c<a.length;c++)this.username+=Qd(a[c],XA)}},getPassword:function(){return this.password},setPassword:function(r){var a=ov(Eu(r));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var c=0;c<a.length;c++)this.password+=Qd(a[c],XA)}},getHost:function(){var r=this.host,a=this.port;return r===null?"":a===null?Q1(r):Q1(r)+":"+a},setHost:function(r){this.cannotBeABaseURL||this.parse(r,eD)},getHostname:function(){var r=this.host;return r===null?"":Q1(r)},setHostname:function(r){this.cannotBeABaseURL||this.parse(r,tD)},getPort:function(){var r=this.port;return r===null?"":Eu(r)},setPort:function(r){this.cannotHaveUsernamePasswordPort()||((r=Eu(r))==""?this.port=null:this.parse(r,nD))},getPathname:function(){var r=this.path;return this.cannotBeABaseURL?r[0]:r.length?"/"+J1(r,"/"):""},setPathname:function(r){this.cannotBeABaseURL||(this.path=[],this.parse(r,sv))},getSearch:function(){var r=this.query;return r?"?"+r:""},setSearch:function(r){(r=Eu(r))==""?this.query=null:(Xs(r,0)=="?"&&(r=Z1(r,1)),this.query="",this.parse(r,v0)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var r=this.fragment;return r?"#"+r:""},setHash:function(r){(r=Eu(r))!=""?(Xs(r,0)=="#"&&(r=Z1(r,1)),this.fragment="",this.parse(r,wu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var lv=function(r){var a=Goe(this,La),c=Xoe(arguments.length,1)>1?arguments[1]:void 0,f=Joe(a,new oD(r,!1,c));zA||(a.href=f.serialize(),a.origin=f.getOrigin(),a.protocol=f.getProtocol(),a.username=f.getUsername(),a.password=f.getPassword(),a.host=f.getHost(),a.hostname=f.getHostname(),a.port=f.getPort(),a.pathname=f.getPathname(),a.search=f.getSearch(),a.searchParams=f.getSearchParams(),a.hash=f.getHash())},La=lv.prototype,Js=function(r,a){return{get:function(){return qb(this)[r]()},set:a&&function(c){return qb(this)[a](c)},configurable:!0,enumerable:!0}};if(zA&&(Ks(La,"href",Js("serialize","setHref")),Ks(La,"origin",Js("getOrigin")),Ks(La,"protocol",Js("getProtocol","setProtocol")),Ks(La,"username",Js("getUsername","setUsername")),Ks(La,"password",Js("getPassword","setPassword")),Ks(La,"host",Js("getHost","setHost")),Ks(La,"hostname",Js("getHostname","setHostname")),Ks(La,"port",Js("getPort","setPort")),Ks(La,"pathname",Js("getPathname","setPathname")),Ks(La,"search",Js("getSearch","setSearch")),Ks(La,"searchParams",Js("getSearchParams")),Ks(La,"hash",Js("getHash","setHash"))),Gb(La,"toJSON",function(){return qb(this).serialize()},{enumerable:!0}),Gb(La,"toString",function(){return qb(this).serialize()},{enumerable:!0}),X1){var AL=X1.createObjectURL,DL=X1.revokeObjectURL;AL&&Gb(lv,"createObjectURL",fL(AL,X1)),DL&&Gb(lv,"revokeObjectURL",fL(DL,X1))}Koe(lv,"URL"),Woe({global:!0,constructor:!0,forced:!joe,sham:!zA},{URL:lv});var NL=typeof ArrayBuffer<"u"&&typeof DataView<"u",vae=Cn,gae=jr,_ae=RangeError,RL=function(r){if(r===void 0)return 0;var a=vae(r),c=gae(a);if(a!==c)throw _ae("Wrong length or index");return c},yae=Array,bae=Math.abs,Su=Math.pow,xae=Math.floor,Eae=Math.log,wae=Math.LN2,Sae={pack:function(r,a,c){var f,m,x,S=yae(c),R=8*c-a-1,A=(1<<R)-1,B=A>>1,q=a===23?Su(2,-24)-Su(2,-77):0,j=r<0||r===0&&1/r<0?1:0,he=0;for((r=bae(r))!=r||r===1/0?(m=r!=r?1:0,f=A):(f=xae(Eae(r)/wae),r*(x=Su(2,-f))<1&&(f--,x*=2),(r+=f+B>=1?q/x:q*Su(2,1-B))*x>=2&&(f++,x/=2),f+B>=A?(m=0,f=A):f+B>=1?(m=(r*x-1)*Su(2,a),f+=B):(m=r*Su(2,B-1)*Su(2,a),f=0));a>=8;)S[he++]=255&m,m/=256,a-=8;for(f=f<<a|m,R+=a;R>0;)S[he++]=255&f,f/=256,R-=8;return S[--he]|=128*j,S},unpack:function(r,a){var c,f=r.length,m=8*f-a-1,x=(1<<m)-1,S=x>>1,R=m-7,A=f-1,B=r[A--],q=127&B;for(B>>=7;R>0;)q=256*q+r[A--],R-=8;for(c=q&(1<<-R)-1,q>>=-R,R+=a;R>0;)c=256*c+r[A--],R-=8;if(q===0)q=1-S;else{if(q===x)return c?NaN:B?-1/0:1/0;c+=Su(2,a),q-=S}return(B?-1:1)*c*Su(2,q-a)}},Cae=ge,OL=An,Tae=fi,ML=function(r){for(var a=Cae(this),c=Tae(a),f=arguments.length,m=OL(f>1?arguments[1]:void 0,c),x=f>2?arguments[2]:void 0,S=x===void 0?c:OL(x,c);S>m;)a[m++]=r;return a},ex=Q,aD=v,sD=Ue,Iae=NL,PL=Ho,VL=$s,kae=oc,LL=q1,lD=s,tx=jh,Aae=Cn,Dae=jr,nx=RL,BL=Sae,Nae=sm,FL=Od,Rae=Nh.f,Oae=ML,Mae=CA,$L=Xa,cD=pa,Pae=PL.PROPER,UL=PL.CONFIGURABLE,cv="ArrayBuffer",rx="DataView",uv="prototype",zL="Wrong index",HL=cD.getterFor(cv),t_=cD.getterFor(rx),WL=cD.set,Zs=ex[cv],Dl=Zs,dv=Dl&&Dl[uv],Cu=ex[rx],g0=Cu&&Cu[uv],jL=Object.prototype,Vae=ex.Array,ix=ex.RangeError,Lae=aD(Oae),Bae=aD([].reverse),GL=BL.pack,qL=BL.unpack,YL=function(r){return[255&r]},KL=function(r){return[255&r,r>>8&255]},XL=function(r){return[255&r,r>>8&255,r>>16&255,r>>24&255]},JL=function(r){return r[3]<<24|r[2]<<16|r[1]<<8|r[0]},Fae=function(r){return GL(r,23,4)},$ae=function(r){return GL(r,52,8)},ox=function(r,a,c){kae(r[uv],a,{configurable:!0,get:function(){return c(this)[a]}})},ef=function(r,a,c,f){var m=nx(c),x=t_(r);if(m+a>x.byteLength)throw ix(zL);var S=x.bytes,R=m+x.byteOffset,A=Mae(S,R,R+a);return f?A:Bae(A)},tf=function(r,a,c,f,m,x){var S=nx(c),R=t_(r);if(S+a>R.byteLength)throw ix(zL);for(var A=R.bytes,B=S+R.byteOffset,q=f(+m),j=0;j<a;j++)A[B+j]=q[x?j:a-j-1]};if(Iae){var ZL=Pae&&Zs.name!==cv;if(lD(function(){Zs(1)})&&lD(function(){new Zs(-1)})&&!lD(function(){return new Zs,new Zs(1.5),new Zs(NaN),Zs.length!=1||ZL&&!UL}))ZL&&UL&&VL(Zs,"name",cv);else{(Dl=function(r){return tx(this,dv),new Zs(nx(r))})[uv]=dv;for(var uD,QL=Rae(Zs),eB=0;QL.length>eB;)(uD=QL[eB++])in Dl||VL(Dl,uD,Zs[uD]);dv.constructor=Dl}FL&&Nae(g0)!==jL&&FL(g0,jL);var ax=new Cu(new Dl(2)),tB=aD(g0.setInt8);ax.setInt8(0,2147483648),ax.setInt8(1,2147483649),!ax.getInt8(0)&&ax.getInt8(1)||LL(g0,{setInt8:function(r,a){tB(this,r,a<<24>>24)},setUint8:function(r,a){tB(this,r,a<<24>>24)}},{unsafe:!0})}else dv=(Dl=function(r){tx(this,dv);var a=nx(r);WL(this,{type:cv,bytes:Lae(Vae(a),0),byteLength:a}),sD||(this.byteLength=a,this.detached=!1)})[uv],g0=(Cu=function(r,a,c){tx(this,g0),tx(r,dv);var f=HL(r),m=f.byteLength,x=Aae(a);if(x<0||x>m)throw ix("Wrong offset");if(x+(c=c===void 0?m-x:Dae(c))>m)throw ix("Wrong length");WL(this,{type:rx,buffer:r,byteLength:c,byteOffset:x,bytes:f.bytes}),sD||(this.buffer=r,this.byteLength=c,this.byteOffset=x)})[uv],sD&&(ox(Dl,"byteLength",HL),ox(Cu,"buffer",t_),ox(Cu,"byteLength",t_),ox(Cu,"byteOffset",t_)),LL(g0,{getInt8:function(r){return ef(this,1,r)[0]<<24>>24},getUint8:function(r){return ef(this,1,r)[0]},getInt16:function(r){var a=ef(this,2,r,arguments.length>1?arguments[1]:void 0);return(a[1]<<8|a[0])<<16>>16},getUint16:function(r){var a=ef(this,2,r,arguments.length>1?arguments[1]:void 0);return a[1]<<8|a[0]},getInt32:function(r){return JL(ef(this,4,r,arguments.length>1?arguments[1]:void 0))},getUint32:function(r){return JL(ef(this,4,r,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(r){return qL(ef(this,4,r,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(r){return qL(ef(this,8,r,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(r,a){tf(this,1,r,YL,a)},setUint8:function(r,a){tf(this,1,r,YL,a)},setInt16:function(r,a){tf(this,2,r,KL,a,arguments.length>2?arguments[2]:void 0)},setUint16:function(r,a){tf(this,2,r,KL,a,arguments.length>2?arguments[2]:void 0)},setInt32:function(r,a){tf(this,4,r,XL,a,arguments.length>2?arguments[2]:void 0)},setUint32:function(r,a){tf(this,4,r,XL,a,arguments.length>2?arguments[2]:void 0)},setFloat32:function(r,a){tf(this,4,r,Fae,a,arguments.length>2?arguments[2]:void 0)},setFloat64:function(r,a){tf(this,8,r,$ae,a,arguments.length>2?arguments[2]:void 0)}});$L(Dl,cv),$L(Cu,rx);var sx={ArrayBuffer:Dl,DataView:Cu},Uae=Zn,dD=cc,zae=s,nB=Me,rB=An,Hae=jr,Wae=Em,fD=sx.ArrayBuffer,hD=sx.DataView,iB=hD.prototype,oB=dD(fD.prototype.slice),jae=dD(iB.getUint8),Gae=dD(iB.setUint8);Uae({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:zae(function(){return!new fD(2).slice(1,void 0).byteLength})},{slice:function(r,a){if(oB&&a===void 0)return oB(nB(this),r);for(var c=nB(this).byteLength,f=rB(r,c),m=rB(a===void 0?c:a,c),x=new(Wae(this,fD))(Hae(m-f)),S=new hD(this),R=new hD(x),A=0;f<m;)Gae(R,A++,jae(S,f++));return x}});var es,fv,lx,cx={},aB={get exports(){return cx},set exports(r){cx=r}},qae=NL,pD=Ue,Ba=Q,sB=K,lB=Be,n_=fe,cB=ac,Yae=xi,Kae=$s,mD=Ya,Xae=oc,Jae=on,vD=sm,hv=Od,Zae=Oe,Qae=Ce,uB=pa.enforce,ux=Ba.Int8Array,gD=ux&&ux.prototype,dB=Ba.Uint8ClampedArray,fB=dB&&dB.prototype,vc=ux&&vD(ux),Nl=gD&&vD(gD),ese=Object.prototype,_D=Ba.TypeError,hB=Zae("toStringTag"),yD=Qae("TYPED_ARRAY_TAG"),pB="TypedArrayConstructor",Tu=qae&&!!hv&&cB(Ba.opera)!=="Opera",mB=!1,nf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},vB={BigInt64Array:8,BigUint64Array:8},gB=function(r){if(!lB(r))return!1;var a=cB(r);return n_(nf,a)||n_(vB,a)};for(es in nf)(lx=(fv=Ba[es])&&fv.prototype)?uB(lx)[pB]=fv:Tu=!1;for(es in vB)(lx=(fv=Ba[es])&&fv.prototype)&&(uB(lx)[pB]=fv);if((!Tu||!sB(vc)||vc===Function.prototype)&&(vc=function(){throw _D("Incorrect invocation")},Tu))for(es in nf)Ba[es]&&hv(Ba[es],vc);if((!Tu||!Nl||Nl===ese)&&(Nl=vc.prototype,Tu))for(es in nf)Ba[es]&&hv(Ba[es].prototype,Nl);if(Tu&&vD(fB)!==Nl&&hv(fB,Nl),pD&&!n_(Nl,hB))for(es in mB=!0,Xae(Nl,hB,{configurable:!0,get:function(){return lB(this)?this[yD]:void 0}}),nf)Ba[es]&&Kae(Ba[es],yD,es);var Iu={NATIVE_ARRAY_BUFFER_VIEWS:Tu,TYPED_ARRAY_TAG:mB&&yD,aTypedArray:function(r){if(gB(r))return r;throw _D("Target is not a typed array")},aTypedArrayConstructor:function(r){if(sB(r)&&(!hv||Jae(vc,r)))return r;throw _D(Yae(r)+" is not a typed array constructor")},exportTypedArrayMethod:function(r,a,c,f){if(pD){if(c)for(var m in nf){var x=Ba[m];if(x&&n_(x.prototype,r))try{delete x.prototype[r]}catch{try{x.prototype[r]=a}catch{}}}Nl[r]&&!c||mD(Nl,r,c?a:Tu&&gD[r]||a,f)}},exportTypedArrayStaticMethod:function(r,a,c){var f,m;if(pD){if(hv){if(c){for(f in nf)if((m=Ba[f])&&n_(m,r))try{delete m[r]}catch{}}if(vc[r]&&!c)return;try{return mD(vc,r,c?a:Tu&&vc[r]||a)}catch{}}for(f in nf)!(m=Ba[f])||m[r]&&!c||mD(m,r,a)}},isTypedArray:gB,TypedArray:vc,TypedArrayPrototype:Nl},_B=Q,bD=s,tse=K6,nse=Iu.NATIVE_ARRAY_BUFFER_VIEWS,rse=_B.ArrayBuffer,_0=_B.Int8Array,yB=!nse||!bD(function(){_0(1)})||!bD(function(){new _0(-1)})||!tse(function(r){new _0,new _0(null),new _0(1.5),new _0(r)},!0)||bD(function(){return new _0(new rse(2),1,void 0).length!==1}),ise=Be,ose=Math.floor,ase=Number.isInteger||function(r){return!ise(r)&&isFinite(r)&&ose(r)===r},sse=Cn,lse=RangeError,cse=function(r){var a=sse(r);if(a<0)throw lse("The argument can't be less than 0");return a},use=RangeError,bB=function(r,a){var c=cse(r);if(c%a)throw use("Wrong offset");return c},dse=ac,fse=en,hse=TypeError,xB=function(r){var a=fse(r,"number");if(typeof a=="number")throw hse("Can't convert number to bigint");return BigInt(a)},pse=uc,mse=Kt,vse=xm,gse=ge,_se=fi,yse=Fm,bse=s0,xse=h1,Ese=function(r){var a=dse(r);return a=="BigInt64Array"||a=="BigUint64Array"},wse=Iu.aTypedArrayConstructor,Sse=xB,EB=function(r){var a,c,f,m,x,S,R,A,B=vse(this),q=gse(r),j=arguments.length,he=j>1?arguments[1]:void 0,xe=he!==void 0,Pe=bse(q);if(Pe&&!xse(Pe))for(A=(R=yse(q,Pe)).next,q=[];!(S=mse(A,R)).done;)q.push(S.value);for(xe&&j>2&&(he=pse(he,arguments[2])),c=_se(q),f=new(wse(B))(c),m=Ese(f),a=0;c>a;a++)x=xe?he(q[a],a):q[a],f[a]=m?Sse(x):+x;return f},wB=Zn,SB=Q,CB=Kt,Cse=Ue,Tse=yB,pv=Iu,TB=sx,IB=jh,Ise=xo,r_=$s,kse=ase,Ase=jr,kB=RL,xD=bB,AB=mn,i_=fe,Dse=ac,ED=Be,Nse=tr,Rse=Ed,Ose=on,dx=Od,Mse=Nh.f,DB=EB,Pse=M1.forEach,Vse=Pd,Lse=oc,NB=pt,RB=kh,Bse=rb,wD=pa.get,Fse=pa.set,$se=pa.enforce,OB=NB.f,Use=RB.f,zse=Math.round,SD=SB.RangeError,MB=TB.ArrayBuffer,Hse=MB.prototype,Wse=TB.DataView,fx=pv.NATIVE_ARRAY_BUFFER_VIEWS,PB=pv.TYPED_ARRAY_TAG,VB=pv.TypedArray,o_=pv.TypedArrayPrototype,jse=pv.aTypedArrayConstructor,CD=pv.isTypedArray,hx="BYTES_PER_ELEMENT",TD="Wrong length",LB=function(r,a){jse(r);for(var c=0,f=a.length,m=new r(f);f>c;)m[c]=a[c++];return m},px=function(r,a){Lse(r,a,{configurable:!0,get:function(){return wD(this)[a]}})},BB=function(r){var a;return Ose(Hse,r)||(a=Dse(r))=="ArrayBuffer"||a=="SharedArrayBuffer"},FB=function(r,a){return CD(r)&&!Nse(a)&&a in r&&kse(+a)&&a>=0},$B=function(r,a){return a=AB(a),FB(r,a)?Ise(2,r[a]):Use(r,a)},UB=function(r,a,c){return a=AB(a),!(FB(r,a)&&ED(c)&&i_(c,"value"))||i_(c,"get")||i_(c,"set")||c.configurable||i_(c,"writable")&&!c.writable||i_(c,"enumerable")&&!c.enumerable?OB(r,a,c):(r[a]=c.value,r)};Cse?(fx||(RB.f=$B,NB.f=UB,px(o_,"buffer"),px(o_,"byteOffset"),px(o_,"byteLength"),px(o_,"length")),wB({target:"Object",stat:!0,forced:!fx},{getOwnPropertyDescriptor:$B,defineProperty:UB}),aB.exports=function(r,a,c){var f=r.match(/\d+/)[0]/8,m=r+(c?"Clamped":"")+"Array",x="get"+r,S="set"+r,R=SB[m],A=R,B=A&&A.prototype,q={},j=function(xe,Pe){OB(xe,Pe,{get:function(){return function(ht,Ft){var Vt=wD(ht);return Vt.view[x](Ft*f+Vt.byteOffset,!0)}(this,Pe)},set:function(ht){return function(Ft,Vt,wt){var qn=wD(Ft);c&&(wt=(wt=zse(wt))<0?0:wt>255?255:255&wt),qn.view[S](Vt*f+qn.byteOffset,wt,!0)}(this,Pe,ht)},enumerable:!0})};fx?Tse&&(A=a(function(xe,Pe,ht,Ft){return IB(xe,B),Bse(ED(Pe)?BB(Pe)?Ft!==void 0?new R(Pe,xD(ht,f),Ft):ht!==void 0?new R(Pe,xD(ht,f)):new R(Pe):CD(Pe)?LB(A,Pe):CB(DB,A,Pe):new R(kB(Pe)),xe,A)}),dx&&dx(A,VB),Pse(Mse(R),function(xe){xe in A||r_(A,xe,R[xe])}),A.prototype=B):(A=a(function(xe,Pe,ht,Ft){IB(xe,B);var Vt,wt,qn,sr=0,qr=0;if(ED(Pe)){if(!BB(Pe))return CD(Pe)?LB(A,Pe):CB(DB,A,Pe);Vt=Pe,qr=xD(ht,f);var Hr=Pe.byteLength;if(Ft===void 0){if(Hr%f||(wt=Hr-qr)<0)throw SD(TD)}else if((wt=Ase(Ft)*f)+qr>Hr)throw SD(TD);qn=wt/f}else qn=kB(Pe),Vt=new MB(wt=qn*f);for(Fse(xe,{buffer:Vt,byteOffset:qr,byteLength:wt,length:qn,view:new Wse(Vt)});sr<qn;)j(xe,sr++)}),dx&&dx(A,VB),B=A.prototype=Rse(o_)),B.constructor!==A&&r_(B,"constructor",A),$se(B).TypedArrayConstructor=A,PB&&r_(B,PB,m);var he=A!=R;q[m]=A,wB({global:!0,constructor:!0,forced:he,sham:!fx},q),hx in A||r_(A,hx,f),hx in B||r_(B,hx,f),Vse(m)}):aB.exports=function(){},cx("Uint8",function(r){return function(a,c,f){return r(this,a,c,f)}});var Gse=ML,qse=xB,Yse=ac,Kse=Kt,Xse=s,Jse=Iu.aTypedArray,Zse=Iu.exportTypedArrayMethod,Qse=v("".slice);Zse("fill",function(r){var a=arguments.length;Jse(this);var c=Qse(Yse(this),0,3)==="Big"?qse(r):+r;return Kse(Gse,this,c,a>1?arguments[1]:void 0,a>2?arguments[2]:void 0)},Xse(function(){var r=0;return new Int8Array(2).fill({valueOf:function(){return r++}}),r!==1}));var zB=Q,HB=Kt,ID=Iu,ele=fi,tle=bB,nle=ge,WB=s,rle=zB.RangeError,kD=zB.Int8Array,jB=kD&&kD.prototype,GB=jB&&jB.set,ile=ID.aTypedArray,ole=ID.exportTypedArrayMethod,AD=!WB(function(){var r=new Uint8ClampedArray(2);return HB(GB,r,{length:1,0:3},1),r[1]!==3}),ale=AD&&ID.NATIVE_ARRAY_BUFFER_VIEWS&&WB(function(){var r=new kD(2);return r.set(1),r.set("2",1),r[0]!==0||r[1]!==2});ole("set",function(r){ile(this);var a=tle(arguments.length>1?arguments[1]:void 0,1),c=nle(r);if(AD)return HB(GB,this,c,a);var f=this.length,m=ele(c),x=0;if(m+a>f)throw rle("Wrong length");for(;x<m;)this[a+x]=c[x++]},!AD||ale);var qB=et.match(/firefox\/(\d+)/i),YB=!!qB&&+qB[1],KB=/MSIE|Trident/.test(et),XB=et.match(/AppleWebKit\/(\d+)\./),JB=!!XB&&+XB[1],sle=cc,DD=s,lle=Ci,cle=IA,ZB=YB,ule=KB,QB=Xt,eF=JB,dle=Iu.aTypedArray,fle=Iu.exportTypedArrayMethod,a_=Q.Uint16Array,mv=a_&&sle(a_.prototype.sort),hle=!(!mv||DD(function(){mv(new a_(2),null)})&&DD(function(){mv(new a_(2),{})})),tF=!!mv&&!DD(function(){if(QB)return QB<74;if(ZB)return ZB<67;if(ule)return!0;if(eF)return eF<602;var r,a,c=new a_(516),f=Array(516);for(r=0;r<516;r++)a=r%4,c[r]=515-r,f[r]=r-2*a+3;for(mv(c,function(m,x){return(m/4|0)-(x/4|0)}),r=0;r<516;r++)if(c[r]!==f[r])return!0});fle("sort",function(r){return r!==void 0&&lle(r),tF?mv(this,r):cle(dle(this),function(a){return function(c,f){return a!==void 0?+a(c,f)||0:f!=f?-1:c!=c?1:c===0&&f===0?1/c>0&&1/f<0?1:-1:c>f}}(r))},!tF||hle),cx("Float32",function(r){return function(a,c,f){return r(this,a,c,f)}});var ple=Pd,ND="ArrayBuffer",nF=sx[ND];Zn({global:!0,constructor:!0,forced:Q[ND]!==nF},{ArrayBuffer:nF}),ple(ND);var mle=Zn,vle=_b,gle=v([].reverse),rF=[1,2];mle({target:"Array",proto:!0,forced:String(rF)===String(rF.reverse())},{reverse:function(){return vle(this)&&(this.length=this.length),gle(this)}});var iF=xi,_le=TypeError,yle=Zn,oF=v,ble=Ci,xle=ge,aF=fi,Ele=function(r,a){if(!delete r[a])throw _le("Cannot delete property "+iF(a)+" of "+iF(r))},sF=Ma,RD=s,wle=IA,Sle=P1,lF=YB,Cle=KB,cF=Xt,uF=JB,rf=[],dF=oF(rf.sort),Tle=oF(rf.push),Ile=RD(function(){rf.sort(void 0)}),kle=RD(function(){rf.sort(null)}),Ale=Sle("sort"),fF=!RD(function(){if(cF)return cF<70;if(!(lF&&lF>3)){if(Cle)return!0;if(uF)return uF<603;var r,a,c,f,m="";for(r=65;r<76;r++){switch(a=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:c=3;break;case 68:case 71:c=4;break;default:c=2}for(f=0;f<47;f++)rf.push({k:a+f,v:c})}for(rf.sort(function(x,S){return S.v-x.v}),f=0;f<rf.length;f++)a=rf[f].k.charAt(0),m.charAt(m.length-1)!==a&&(m+=a);return m!=="DGBEFHACIJK"}});yle({target:"Array",proto:!0,forced:Ile||!kle||!Ale||!fF},{sort:function(r){r!==void 0&&ble(r);var a=xle(this);if(fF)return r===void 0?dF(a):dF(a,r);var c,f,m=[],x=aF(a);for(f=0;f<x;f++)f in a&&Tle(m,a[f]);for(wle(m,function(S){return function(R,A){return A===void 0?-1:R===void 0?1:S!==void 0?+S(R,A)||0:sF(R)>sF(A)?1:-1}}(r)),c=aF(m),f=0;f<c;)a[f]=m[f++];for(;f<x;)Ele(a,f++);return a}});var Dle=Zn,Nle=Kt,OD=v,hF=V,Rle=K,Ole=O,Mle=ib,s_=Ma,Ple=Uo,Vle=ob,Lle=Zm,Ble=Oe("replace"),Fle=TypeError,pF=OD("".indexOf);OD("".replace);var mF=OD("".slice),$le=Math.max,vF=function(r,a,c){return c>r.length?-1:a===""?c:pF(r,a,c)};Dle({target:"String",proto:!0},{replaceAll:function(r,a){var c,f,m,x,S,R,A,B,q=hF(this),j=0,he=0,xe="";if(!Ole(r)){if(Mle(r)&&(c=s_(hF(Vle(r))),!~pF(c,"g")))throw Fle("`.replaceAll` does not allow non-global regexes");if(f=Ple(r,Ble))return Nle(f,r,q,a)}for(m=s_(q),x=s_(r),(S=Rle(a))||(a=s_(a)),R=x.length,A=$le(1,R),j=vF(m,x,0);j!==-1;)B=S?s_(a(x,j,m)):Lle(x,m,j,[],void 0,a),xe+=mF(m,he,j)+B,he=j+R,j=vF(m,x,j+A);return he<m.length&&(xe+=mF(m,he)),xe}}),(0,Iu.exportTypedArrayStaticMethod)("from",EB,yB);let gF=!0,_F=!0;function mx(r,a,c){const f=r.match(a);return f&&f.length>=c&&parseInt(f[c],10)}function y0(r,a,c){if(!r.RTCPeerConnection)return;const f=r.RTCPeerConnection.prototype,m=f.addEventListener;f.addEventListener=function(S,R){if(S!==a)return m.apply(this,arguments);const A=B=>{const q=c(B);q&&(R.handleEvent?R.handleEvent(q):R(q))};return this._eventMap=this._eventMap||{},this._eventMap[a]||(this._eventMap[a]=new Map),this._eventMap[a].set(R,A),m.apply(this,[S,A])};const x=f.removeEventListener;f.removeEventListener=function(S,R){if(S!==a||!this._eventMap||!this._eventMap[a])return x.apply(this,arguments);if(!this._eventMap[a].has(R))return x.apply(this,arguments);const A=this._eventMap[a].get(R);return this._eventMap[a].delete(R),this._eventMap[a].size===0&&delete this._eventMap[a],Object.keys(this._eventMap).length===0&&delete this._eventMap,x.apply(this,[S,A])},Object.defineProperty(f,"on"+a,{get(){return this["_on"+a]},set(S){this["_on"+a]&&(this.removeEventListener(a,this["_on"+a]),delete this["_on"+a]),S&&this.addEventListener(a,this["_on"+a]=S)},enumerable:!0,configurable:!0})}function Ule(r){return typeof r!="boolean"?new Error("Argument type: "+typeof r+". Please use a boolean."):(gF=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function zle(r){return typeof r!="boolean"?new Error("Argument type: "+typeof r+". Please use a boolean."):(_F=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function yF(){if(typeof window=="object"){if(gF)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function MD(r,a){_F&&console.warn(r+" is deprecated, please use "+a+" instead.")}function bF(r){return Object.prototype.toString.call(r)==="[object Object]"}function xF(r){return bF(r)?Object.keys(r).reduce(function(a,c){const f=bF(r[c]),m=f?xF(r[c]):r[c],x=f&&!Object.keys(m).length;return m===void 0||x?a:Object.assign(a,{[c]:m})},{}):r}function PD(r,a,c){a&&!c.has(a.id)&&(c.set(a.id,a),Object.keys(a).forEach(f=>{f.endsWith("Id")?PD(r,r.get(a[f]),c):f.endsWith("Ids")&&a[f].forEach(m=>{PD(r,r.get(m),c)})}))}function EF(r,a,c){const f=c?"outbound-rtp":"inbound-rtp",m=new Map;if(a===null)return m;const x=[];return r.forEach(S=>{S.type==="track"&&S.trackIdentifier===a.id&&x.push(S)}),x.forEach(S=>{r.forEach(R=>{R.type===f&&R.trackId===S.id&&PD(r,R,m)})}),m}const wF=yF;function SF(r,a){const c=r&&r.navigator;if(!c.mediaDevices)return;const f=function(S){if(typeof S!="object"||S.mandatory||S.optional)return S;const R={};return Object.keys(S).forEach(A=>{if(A==="require"||A==="advanced"||A==="mediaSource")return;const B=typeof S[A]=="object"?S[A]:{ideal:S[A]};B.exact!==void 0&&typeof B.exact=="number"&&(B.min=B.max=B.exact);const q=function(j,he){return j?j+he.charAt(0).toUpperCase()+he.slice(1):he==="deviceId"?"sourceId":he};if(B.ideal!==void 0){R.optional=R.optional||[];let j={};typeof B.ideal=="number"?(j[q("min",A)]=B.ideal,R.optional.push(j),j={},j[q("max",A)]=B.ideal,R.optional.push(j)):(j[q("",A)]=B.ideal,R.optional.push(j))}B.exact!==void 0&&typeof B.exact!="number"?(R.mandatory=R.mandatory||{},R.mandatory[q("",A)]=B.exact):["min","max"].forEach(j=>{B[j]!==void 0&&(R.mandatory=R.mandatory||{},R.mandatory[q(j,A)]=B[j])})}),S.advanced&&(R.optional=(R.optional||[]).concat(S.advanced)),R},m=function(S,R){if(a.version>=61)return R(S);if((S=JSON.parse(JSON.stringify(S)))&&typeof S.audio=="object"){const A=function(B,q,j){q in B&&!(j in B)&&(B[j]=B[q],delete B[q])};A((S=JSON.parse(JSON.stringify(S))).audio,"autoGainControl","googAutoGainControl"),A(S.audio,"noiseSuppression","googNoiseSuppression"),S.audio=f(S.audio)}if(S&&typeof S.video=="object"){let A=S.video.facingMode;A=A&&(typeof A=="object"?A:{ideal:A});const B=a.version<66;if(A&&(A.exact==="user"||A.exact==="environment"||A.ideal==="user"||A.ideal==="environment")&&(!c.mediaDevices.getSupportedConstraints||!c.mediaDevices.getSupportedConstraints().facingMode||B)){let q;if(delete S.video.facingMode,A.exact==="environment"||A.ideal==="environment"?q=["back","rear"]:A.exact!=="user"&&A.ideal!=="user"||(q=["front"]),q)return c.mediaDevices.enumerateDevices().then(j=>{let he=(j=j.filter(xe=>xe.kind==="videoinput")).find(xe=>q.some(Pe=>xe.label.toLowerCase().includes(Pe)));return!he&&j.length&&q.includes("back")&&(he=j[j.length-1]),he&&(S.video.deviceId=A.exact?{exact:he.deviceId}:{ideal:he.deviceId}),S.video=f(S.video),wF("chrome: "+JSON.stringify(S)),R(S)})}S.video=f(S.video)}return wF("chrome: "+JSON.stringify(S)),R(S)},x=function(S){return a.version>=64?S:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[S.name]||S.name,message:S.message,constraint:S.constraint||S.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(c.getUserMedia=(function(S,R,A){m(S,B=>{c.webkitGetUserMedia(B,R,q=>{A&&A(x(q))})})}).bind(c),c.mediaDevices.getUserMedia){const S=c.mediaDevices.getUserMedia.bind(c.mediaDevices);c.mediaDevices.getUserMedia=function(R){return m(R,A=>S(A).then(B=>{if(A.audio&&!B.getAudioTracks().length||A.video&&!B.getVideoTracks().length)throw B.getTracks().forEach(q=>{q.stop()}),new DOMException("","NotFoundError");return B},B=>Promise.reject(x(B))))}}}function CF(r){r.MediaStream=r.MediaStream||r.webkitMediaStream}function TF(r){if(typeof r=="object"&&r.RTCPeerConnection&&!("ontrack"in r.RTCPeerConnection.prototype)){Object.defineProperty(r.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(c){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=c)},enumerable:!0,configurable:!0});const a=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=c=>{c.stream.addEventListener("addtrack",f=>{let m;m=r.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(S=>S.track&&S.track.id===f.track.id):{track:f.track};const x=new Event("track");x.track=f.track,x.receiver=m,x.transceiver={receiver:m},x.streams=[c.stream],this.dispatchEvent(x)}),c.stream.getTracks().forEach(f=>{let m;m=r.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(S=>S.track&&S.track.id===f.id):{track:f};const x=new Event("track");x.track=f,x.receiver=m,x.transceiver={receiver:m},x.streams=[c.stream],this.dispatchEvent(x)})},this.addEventListener("addstream",this._ontrackpoly)),a.apply(this,arguments)}}else y0(r,"track",a=>(a.transceiver||Object.defineProperty(a,"transceiver",{value:{receiver:a.receiver}}),a))}function IF(r){if(typeof r=="object"&&r.RTCPeerConnection&&!("getSenders"in r.RTCPeerConnection.prototype)&&"createDTMFSender"in r.RTCPeerConnection.prototype){const a=function(m,x){return{track:x,get dtmf(){return this._dtmf===void 0&&(x.kind==="audio"?this._dtmf=m.createDTMFSender(x):this._dtmf=null),this._dtmf},_pc:m}};if(!r.RTCPeerConnection.prototype.getSenders){r.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const m=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addTrack=function(S,R){let A=m.apply(this,arguments);return A||(A=a(this,S),this._senders.push(A)),A};const x=r.RTCPeerConnection.prototype.removeTrack;r.RTCPeerConnection.prototype.removeTrack=function(S){x.apply(this,arguments);const R=this._senders.indexOf(S);R!==-1&&this._senders.splice(R,1)}}const c=r.RTCPeerConnection.prototype.addStream;r.RTCPeerConnection.prototype.addStream=function(m){this._senders=this._senders||[],c.apply(this,[m]),m.getTracks().forEach(x=>{this._senders.push(a(this,x))})};const f=r.RTCPeerConnection.prototype.removeStream;r.RTCPeerConnection.prototype.removeStream=function(m){this._senders=this._senders||[],f.apply(this,[m]),m.getTracks().forEach(x=>{const S=this._senders.find(R=>R.track===x);S&&this._senders.splice(this._senders.indexOf(S),1)})}}else if(typeof r=="object"&&r.RTCPeerConnection&&"getSenders"in r.RTCPeerConnection.prototype&&"createDTMFSender"in r.RTCPeerConnection.prototype&&r.RTCRtpSender&&!("dtmf"in r.RTCRtpSender.prototype)){const a=r.RTCPeerConnection.prototype.getSenders;r.RTCPeerConnection.prototype.getSenders=function(){const c=a.apply(this,[]);return c.forEach(f=>f._pc=this),c},Object.defineProperty(r.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function kF(r){if(!r.RTCPeerConnection)return;const a=r.RTCPeerConnection.prototype.getStats;r.RTCPeerConnection.prototype.getStats=function(){const[c,f,m]=arguments;if(arguments.length>0&&typeof c=="function")return a.apply(this,arguments);if(a.length===0&&(arguments.length===0||typeof c!="function"))return a.apply(this,[]);const x=function(R){const A={};return R.result().forEach(B=>{const q={id:B.id,timestamp:B.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[B.type]||B.type};B.names().forEach(j=>{q[j]=B.stat(j)}),A[q.id]=q}),A},S=function(R){return new Map(Object.keys(R).map(A=>[A,R[A]]))};if(arguments.length>=2){const R=function(A){f(S(x(A)))};return a.apply(this,[R,c])}return new Promise((R,A)=>{a.apply(this,[function(B){R(S(x(B)))},A])}).then(f,m)}}function AF(r){if(!(typeof r=="object"&&r.RTCPeerConnection&&r.RTCRtpSender&&r.RTCRtpReceiver))return;if(!("getStats"in r.RTCRtpSender.prototype)){const c=r.RTCPeerConnection.prototype.getSenders;c&&(r.RTCPeerConnection.prototype.getSenders=function(){const m=c.apply(this,[]);return m.forEach(x=>x._pc=this),m});const f=r.RTCPeerConnection.prototype.addTrack;f&&(r.RTCPeerConnection.prototype.addTrack=function(){const m=f.apply(this,arguments);return m._pc=this,m}),r.RTCRtpSender.prototype.getStats=function(){const m=this;return this._pc.getStats().then(x=>EF(x,m.track,!0))}}if(!("getStats"in r.RTCRtpReceiver.prototype)){const c=r.RTCPeerConnection.prototype.getReceivers;c&&(r.RTCPeerConnection.prototype.getReceivers=function(){const f=c.apply(this,[]);return f.forEach(m=>m._pc=this),f}),y0(r,"track",f=>(f.receiver._pc=f.srcElement,f)),r.RTCRtpReceiver.prototype.getStats=function(){const f=this;return this._pc.getStats().then(m=>EF(m,f.track,!1))}}if(!("getStats"in r.RTCRtpSender.prototype)||!("getStats"in r.RTCRtpReceiver.prototype))return;const a=r.RTCPeerConnection.prototype.getStats;r.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof r.MediaStreamTrack){const c=arguments[0];let f,m,x;return this.getSenders().forEach(S=>{S.track===c&&(f?x=!0:f=S)}),this.getReceivers().forEach(S=>(S.track===c&&(m?x=!0:m=S),S.track===c)),x||f&&m?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):f?f.getStats():m?m.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return a.apply(this,arguments)}}function DF(r){r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(x=>this._shimmedLocalStreams[x][0])};const a=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addTrack=function(x,S){if(!S)return a.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const R=a.apply(this,arguments);return this._shimmedLocalStreams[S.id]?this._shimmedLocalStreams[S.id].indexOf(R)===-1&&this._shimmedLocalStreams[S.id].push(R):this._shimmedLocalStreams[S.id]=[S,R],R};const c=r.RTCPeerConnection.prototype.addStream;r.RTCPeerConnection.prototype.addStream=function(x){this._shimmedLocalStreams=this._shimmedLocalStreams||{},x.getTracks().forEach(A=>{if(this.getSenders().find(B=>B.track===A))throw new DOMException("Track already exists.","InvalidAccessError")});const S=this.getSenders();c.apply(this,arguments);const R=this.getSenders().filter(A=>S.indexOf(A)===-1);this._shimmedLocalStreams[x.id]=[x].concat(R)};const f=r.RTCPeerConnection.prototype.removeStream;r.RTCPeerConnection.prototype.removeStream=function(x){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[x.id],f.apply(this,arguments)};const m=r.RTCPeerConnection.prototype.removeTrack;r.RTCPeerConnection.prototype.removeTrack=function(x){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},x&&Object.keys(this._shimmedLocalStreams).forEach(S=>{const R=this._shimmedLocalStreams[S].indexOf(x);R!==-1&&this._shimmedLocalStreams[S].splice(R,1),this._shimmedLocalStreams[S].length===1&&delete this._shimmedLocalStreams[S]}),m.apply(this,arguments)}}function NF(r,a){if(!r.RTCPeerConnection)return;if(r.RTCPeerConnection.prototype.addTrack&&a.version>=65)return DF(r);const c=r.RTCPeerConnection.prototype.getLocalStreams;r.RTCPeerConnection.prototype.getLocalStreams=function(){const A=c.apply(this);return this._reverseStreams=this._reverseStreams||{},A.map(B=>this._reverseStreams[B.id])};const f=r.RTCPeerConnection.prototype.addStream;r.RTCPeerConnection.prototype.addStream=function(A){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},A.getTracks().forEach(B=>{if(this.getSenders().find(q=>q.track===B))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[A.id]){const B=new r.MediaStream(A.getTracks());this._streams[A.id]=B,this._reverseStreams[B.id]=A,A=B}f.apply(this,[A])};const m=r.RTCPeerConnection.prototype.removeStream;function x(A,B){let q=B.sdp;return Object.keys(A._reverseStreams||[]).forEach(j=>{const he=A._reverseStreams[j],xe=A._streams[he.id];q=q.replace(new RegExp(xe.id,"g"),he.id)}),new RTCSessionDescription({type:B.type,sdp:q})}r.RTCPeerConnection.prototype.removeStream=function(A){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},m.apply(this,[this._streams[A.id]||A]),delete this._reverseStreams[this._streams[A.id]?this._streams[A.id].id:A.id],delete this._streams[A.id]},r.RTCPeerConnection.prototype.addTrack=function(A,B){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const q=[].slice.call(arguments,1);if(q.length!==1||!q[0].getTracks().find(he=>he===A))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(he=>he.track===A))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const j=this._streams[B.id];if(j)j.addTrack(A),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const he=new r.MediaStream([A]);this._streams[B.id]=he,this._reverseStreams[he.id]=B,this.addStream(he)}return this.getSenders().find(he=>he.track===A)},["createOffer","createAnswer"].forEach(function(A){const B=r.RTCPeerConnection.prototype[A],q={[A](){const j=arguments;return arguments.length&&typeof arguments[0]=="function"?B.apply(this,[he=>{const xe=x(this,he);j[0].apply(null,[xe])},he=>{j[1]&&j[1].apply(null,he)},arguments[2]]):B.apply(this,arguments).then(he=>x(this,he))}};r.RTCPeerConnection.prototype[A]=q[A]});const S=r.RTCPeerConnection.prototype.setLocalDescription;r.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(A,B){let q=B.sdp;return Object.keys(A._reverseStreams||[]).forEach(j=>{const he=A._reverseStreams[j],xe=A._streams[he.id];q=q.replace(new RegExp(he.id,"g"),xe.id)}),new RTCSessionDescription({type:B.type,sdp:q})}(this,arguments[0]),S.apply(this,arguments)):S.apply(this,arguments)};const R=Object.getOwnPropertyDescriptor(r.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(r.RTCPeerConnection.prototype,"localDescription",{get(){const A=R.get.apply(this);return A.type===""?A:x(this,A)}}),r.RTCPeerConnection.prototype.removeTrack=function(A){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!A._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(A._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let B;this._streams=this._streams||{},Object.keys(this._streams).forEach(q=>{this._streams[q].getTracks().find(j=>A.track===j)&&(B=this._streams[q])}),B&&(B.getTracks().length===1?this.removeStream(this._reverseStreams[B.id]):B.removeTrack(A.track),this.dispatchEvent(new Event("negotiationneeded")))}}function VD(r,a){!r.RTCPeerConnection&&r.webkitRTCPeerConnection&&(r.RTCPeerConnection=r.webkitRTCPeerConnection),r.RTCPeerConnection&&a.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(c){const f=r.RTCPeerConnection.prototype[c],m={[c](){return arguments[0]=new(c==="addIceCandidate"?r.RTCIceCandidate:r.RTCSessionDescription)(arguments[0]),f.apply(this,arguments)}};r.RTCPeerConnection.prototype[c]=m[c]})}function RF(r,a){y0(r,"negotiationneeded",c=>{const f=c.target;if(!(a.version<72||f.getConfiguration&&f.getConfiguration().sdpSemantics==="plan-b")||f.signalingState==="stable")return c})}var OF=Object.freeze({__proto__:null,shimMediaStream:CF,shimOnTrack:TF,shimGetSendersWithDtmf:IF,shimGetStats:kF,shimSenderReceiverGetStats:AF,shimAddTrackRemoveTrackWithNative:DF,shimAddTrackRemoveTrack:NF,shimPeerConnection:VD,fixNegotiationNeeded:RF,shimGetUserMedia:SF,shimGetDisplayMedia:function(r,a){r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices||r.navigator.mediaDevices&&(typeof a=="function"?r.navigator.mediaDevices.getDisplayMedia=function(c){return a(c).then(f=>{const m=c.video&&c.video.width,x=c.video&&c.video.height,S=c.video&&c.video.frameRate;return c.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:f,maxFrameRate:S||3}},m&&(c.video.mandatory.maxWidth=m),x&&(c.video.mandatory.maxHeight=x),r.navigator.mediaDevices.getUserMedia(c)})}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}});function MF(r,a){const c=r&&r.navigator,f=r&&r.MediaStreamTrack;if(c.getUserMedia=function(m,x,S){MD("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),c.mediaDevices.getUserMedia(m).then(x,S)},!(a.version>55&&"autoGainControl"in c.mediaDevices.getSupportedConstraints())){const m=function(S,R,A){R in S&&!(A in S)&&(S[A]=S[R],delete S[R])},x=c.mediaDevices.getUserMedia.bind(c.mediaDevices);if(c.mediaDevices.getUserMedia=function(S){return typeof S=="object"&&typeof S.audio=="object"&&(S=JSON.parse(JSON.stringify(S)),m(S.audio,"autoGainControl","mozAutoGainControl"),m(S.audio,"noiseSuppression","mozNoiseSuppression")),x(S)},f&&f.prototype.getSettings){const S=f.prototype.getSettings;f.prototype.getSettings=function(){const R=S.apply(this,arguments);return m(R,"mozAutoGainControl","autoGainControl"),m(R,"mozNoiseSuppression","noiseSuppression"),R}}if(f&&f.prototype.applyConstraints){const S=f.prototype.applyConstraints;f.prototype.applyConstraints=function(R){return this.kind==="audio"&&typeof R=="object"&&(R=JSON.parse(JSON.stringify(R)),m(R,"autoGainControl","mozAutoGainControl"),m(R,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[R])}}}}function PF(r){typeof r=="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function LD(r,a){if(typeof r!="object"||!r.RTCPeerConnection&&!r.mozRTCPeerConnection)return;!r.RTCPeerConnection&&r.mozRTCPeerConnection&&(r.RTCPeerConnection=r.mozRTCPeerConnection),a.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(m){const x=r.RTCPeerConnection.prototype[m],S={[m](){return arguments[0]=new(m==="addIceCandidate"?r.RTCIceCandidate:r.RTCSessionDescription)(arguments[0]),x.apply(this,arguments)}};r.RTCPeerConnection.prototype[m]=S[m]});const c={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},f=r.RTCPeerConnection.prototype.getStats;r.RTCPeerConnection.prototype.getStats=function(){const[m,x,S]=arguments;return f.apply(this,[m||null]).then(R=>{if(a.version<53&&!x)try{R.forEach(A=>{A.type=c[A.type]||A.type})}catch(A){if(A.name!=="TypeError")throw A;R.forEach((B,q)=>{R.set(q,Object.assign({},B,{type:c[B.type]||B.type}))})}return R}).then(x,S)}}function VF(r){if(typeof r!="object"||!r.RTCPeerConnection||!r.RTCRtpSender||r.RTCRtpSender&&"getStats"in r.RTCRtpSender.prototype)return;const a=r.RTCPeerConnection.prototype.getSenders;a&&(r.RTCPeerConnection.prototype.getSenders=function(){const f=a.apply(this,[]);return f.forEach(m=>m._pc=this),f});const c=r.RTCPeerConnection.prototype.addTrack;c&&(r.RTCPeerConnection.prototype.addTrack=function(){const f=c.apply(this,arguments);return f._pc=this,f}),r.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function LF(r){if(typeof r!="object"||!r.RTCPeerConnection||!r.RTCRtpSender||r.RTCRtpSender&&"getStats"in r.RTCRtpReceiver.prototype)return;const a=r.RTCPeerConnection.prototype.getReceivers;a&&(r.RTCPeerConnection.prototype.getReceivers=function(){const c=a.apply(this,[]);return c.forEach(f=>f._pc=this),c}),y0(r,"track",c=>(c.receiver._pc=c.srcElement,c)),r.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function BF(r){r.RTCPeerConnection&&!("removeStream"in r.RTCPeerConnection.prototype)&&(r.RTCPeerConnection.prototype.removeStream=function(a){MD("removeStream","removeTrack"),this.getSenders().forEach(c=>{c.track&&a.getTracks().includes(c.track)&&this.removeTrack(c)})})}function FF(r){r.DataChannel&&!r.RTCDataChannel&&(r.RTCDataChannel=r.DataChannel)}function $F(r){if(typeof r!="object"||!r.RTCPeerConnection)return;const a=r.RTCPeerConnection.prototype.addTransceiver;a&&(r.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let c=arguments[1]&&arguments[1].sendEncodings;c===void 0&&(c=[]),c=[...c];const f=c.length>0;f&&c.forEach(x=>{if("rid"in x&&!/^[a-z0-9]{0,16}$/i.test(x.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in x&&!(parseFloat(x.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in x&&!(parseFloat(x.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const m=a.apply(this,arguments);if(f){const{sender:x}=m,S=x.getParameters();(!("encodings"in S)||S.encodings.length===1&&Object.keys(S.encodings[0]).length===0)&&(S.encodings=c,x.sendEncodings=c,this.setParametersPromises.push(x.setParameters(S).then(()=>{delete x.sendEncodings}).catch(()=>{delete x.sendEncodings})))}return m})}function UF(r){if(typeof r!="object"||!r.RTCRtpSender)return;const a=r.RTCRtpSender.prototype.getParameters;a&&(r.RTCRtpSender.prototype.getParameters=function(){const c=a.apply(this,arguments);return"encodings"in c||(c.encodings=[].concat(this.sendEncodings||[{}])),c})}function zF(r){if(typeof r!="object"||!r.RTCPeerConnection)return;const a=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>a.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):a.apply(this,arguments)}}function HF(r){if(typeof r!="object"||!r.RTCPeerConnection)return;const a=r.RTCPeerConnection.prototype.createAnswer;r.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>a.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):a.apply(this,arguments)}}var WF=Object.freeze({__proto__:null,shimOnTrack:PF,shimPeerConnection:LD,shimSenderGetStats:VF,shimReceiverGetStats:LF,shimRemoveStream:BF,shimRTCDataChannel:FF,shimAddTransceiver:$F,shimGetParameters:UF,shimCreateOffer:zF,shimCreateAnswer:HF,shimGetUserMedia:MF,shimGetDisplayMedia:function(r,a){r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices||r.navigator.mediaDevices&&(r.navigator.mediaDevices.getDisplayMedia=function(c){if(!c||!c.video){const f=new DOMException("getDisplayMedia without video constraints is undefined");return f.name="NotFoundError",f.code=8,Promise.reject(f)}return c.video===!0?c.video={mediaSource:a}:c.video.mediaSource=a,r.navigator.mediaDevices.getUserMedia(c)})}});function jF(r){if(typeof r=="object"&&r.RTCPeerConnection){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){const a=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(c){this._localStreams||(this._localStreams=[]),this._localStreams.includes(c)||this._localStreams.push(c),c.getAudioTracks().forEach(f=>a.call(this,f,c)),c.getVideoTracks().forEach(f=>a.call(this,f,c))},r.RTCPeerConnection.prototype.addTrack=function(c,...f){return f&&f.forEach(m=>{this._localStreams?this._localStreams.includes(m)||this._localStreams.push(m):this._localStreams=[m]}),a.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){this._localStreams||(this._localStreams=[]);const c=this._localStreams.indexOf(a);if(c===-1)return;this._localStreams.splice(c,1);const f=a.getTracks();this.getSenders().forEach(m=>{f.includes(m.track)&&this.removeTrack(m)})})}}function GF(r){if(typeof r=="object"&&r.RTCPeerConnection&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(c){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=c),this.addEventListener("track",this._onaddstreampoly=f=>{f.streams.forEach(m=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(m))return;this._remoteStreams.push(m);const x=new Event("addstream");x.stream=m,this.dispatchEvent(x)})})}});const a=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){const c=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(m=>{if(c._remoteStreams||(c._remoteStreams=[]),c._remoteStreams.indexOf(m)>=0)return;c._remoteStreams.push(m);const x=new Event("addstream");x.stream=m,c.dispatchEvent(x)})}),a.apply(c,arguments)}}}function qF(r){if(typeof r!="object"||!r.RTCPeerConnection)return;const a=r.RTCPeerConnection.prototype,c=a.createOffer,f=a.createAnswer,m=a.setLocalDescription,x=a.setRemoteDescription,S=a.addIceCandidate;a.createOffer=function(A,B){const q=arguments.length>=2?arguments[2]:arguments[0],j=c.apply(this,[q]);return B?(j.then(A,B),Promise.resolve()):j},a.createAnswer=function(A,B){const q=arguments.length>=2?arguments[2]:arguments[0],j=f.apply(this,[q]);return B?(j.then(A,B),Promise.resolve()):j};let R=function(A,B,q){const j=m.apply(this,[A]);return q?(j.then(B,q),Promise.resolve()):j};a.setLocalDescription=R,R=function(A,B,q){const j=x.apply(this,[A]);return q?(j.then(B,q),Promise.resolve()):j},a.setRemoteDescription=R,R=function(A,B,q){const j=S.apply(this,[A]);return q?(j.then(B,q),Promise.resolve()):j},a.addIceCandidate=R}function YF(r){const a=r&&r.navigator;if(a.mediaDevices&&a.mediaDevices.getUserMedia){const c=a.mediaDevices,f=c.getUserMedia.bind(c);a.mediaDevices.getUserMedia=m=>f(KF(m))}!a.getUserMedia&&a.mediaDevices&&a.mediaDevices.getUserMedia&&(a.getUserMedia=(function(c,f,m){a.mediaDevices.getUserMedia(c).then(f,m)}).bind(a))}function KF(r){return r&&r.video!==void 0?Object.assign({},r,{video:xF(r.video)}):r}function XF(r){if(!r.RTCPeerConnection)return;const a=r.RTCPeerConnection;r.RTCPeerConnection=function(c,f){if(c&&c.iceServers){const m=[];for(let x=0;x<c.iceServers.length;x++){let S=c.iceServers[x];S.urls===void 0&&S.url?(MD("RTCIceServer.url","RTCIceServer.urls"),S=JSON.parse(JSON.stringify(S)),S.urls=S.url,delete S.url,m.push(S)):m.push(c.iceServers[x])}c.iceServers=m}return new a(c,f)},r.RTCPeerConnection.prototype=a.prototype,"generateCertificate"in a&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:()=>a.generateCertificate})}function JF(r){typeof r=="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function ZF(r){const a=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(c){if(c){c.offerToReceiveAudio!==void 0&&(c.offerToReceiveAudio=!!c.offerToReceiveAudio);const f=this.getTransceivers().find(x=>x.receiver.track.kind==="audio");c.offerToReceiveAudio===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):c.offerToReceiveAudio!==!0||f||this.addTransceiver("audio",{direction:"recvonly"}),c.offerToReceiveVideo!==void 0&&(c.offerToReceiveVideo=!!c.offerToReceiveVideo);const m=this.getTransceivers().find(x=>x.receiver.track.kind==="video");c.offerToReceiveVideo===!1&&m?m.direction==="sendrecv"?m.setDirection?m.setDirection("sendonly"):m.direction="sendonly":m.direction==="recvonly"&&(m.setDirection?m.setDirection("inactive"):m.direction="inactive"):c.offerToReceiveVideo!==!0||m||this.addTransceiver("video",{direction:"recvonly"})}return a.apply(this,arguments)}}function QF(r){typeof r!="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}var e$=Object.freeze({__proto__:null,shimLocalStreamsAPI:jF,shimRemoteStreamsAPI:GF,shimCallbacksAPI:qF,shimGetUserMedia:YF,shimConstraints:KF,shimRTCIceServerUrls:XF,shimTrackEventTransceiver:JF,shimCreateOfferLegacy:ZF,shimAudioContext:QF}),vx={};(function(r){const a={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};a.localCName=a.generateIdentifier(),a.splitLines=function(c){return c.trim().split(`
@@ -256,7 +256,7 @@ offer: `).concat(a==null?void 0:a.sdp)),c}})}connect(r){let a=arguments.length>1
256
256
  next offer: `).concat(this.filterSDPDirection(r==null?void 0:r.sdp))),this._log.warn("current answer: ".concat(this.filterSDPDirection((x=this._peerConnection.remoteDescription)==null?void 0:x.sdp),`
257
257
  next answer: `).concat(this.filterSDPDirection(a))),this._log.warn("offer: ".concat(r==null?void 0:r.sdp)),this._log.warn("answer: ".concat(a)),this._log.warn("transceivers: ".concat(JSON.stringify(this._peerConnection.getTransceivers().map(R=>{let{mid:A,currentDirection:B,direction:q,stopped:j}=R;return{mid:A,currentDirection:B,direction:q,stopped:j}})))),this._log.warn("parsedAnswer: ".concat(JSON.stringify(this._parsedAnswer))),this._isSDPLogged=!0),this._updateSDPPromise=null,f(S)}})),this._updateSDPPromise}filterSDPDirection(){return Po(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").media.map(r=>r.direction)}setOffer(r){return this._log.info("setting offer"),this._log.debug(r.sdp),this._peerConnection.setLocalDescription({type:"offer",sdp:ife(r.sdp,this.clientAbility,this._serverAbility)})}setAnswer(r){return this._log.info("setting answer"),this._log.debug(r.sdp),this._room.enableHWEncoder&&r.sdp&&(r.sdp=r.sdp.replaceAll("42e01f","42001f")),this._peerConnection.setRemoteDescription(r)}sendDataChannelMessage(r){var a;(a=this._datachannel)==null||a.send(r)}reset(){var r;(r=this._peerConnection)==null||r.close(),this._waitForPCConnectedPromise=null,this._parsedAnswer=null}close(){this._log.info("close pc"),this.abortMap.forEach(r=>typeof r.abort=="function"&&r.abort("destroy")),this.abortMap.clear(),this.reset(),this.emitConnectionStateChangedEvent("DISCONNECTED"),this._downlinkMIDMap.clear(),this.stopReconnection(),this.removeAllListeners()}getReceiversByUserId(r){if(!this._peerConnection)return[];let a=this._peerConnection.getReceivers();return(this._downlinkMIDMap.get(r)||[]).map(c=>a[c])}};Ln([WU("reconnect")],a4.prototype,"startReconnection"),Ln([Dv(r=>r.userId)],a4.prototype,"addDownlink"),Ln([Dv(r=>r)],a4.prototype,"removeDownlink"),Ln([Av(!0)],a4.prototype,"updateSDP");var sfe=class{constructor(r){se(this,"tag"),se(this,"len"),se(this,"data");let a=new DataView(r);this.tag=a.getUint16(),this.len=a.getUint16(2),this.data=new Uint8Array(r).slice(4,4+this.len).buffer}},lfe=class{constructor(r){se(this,"tinyId"),se(this,"data");let a=new DataView(r),c=0,f=[];for(;c<a.byteLength;){let m=a.getUint16(c+2),x=new sfe(new Uint8Array(r).slice(c,c+2+2+m).buffer);f.push(x),c+=4+m}f.forEach(m=>{m.tag===1?this.tinyId=new TextDecoder().decode(m.data):m.tag===2&&(this.data=m.data)})}},$z=new Set;function Lv(){let r=Math.floor(4294967296*Math.random());return $z.has(r)?Lv():($z.add(r),r)}var cfe=oa(ts()),Uz=class extends cfe.default{constructor(r){super(),se(this,"userId"),se(this,"tinyId"),se(this,"_sdpSemantics"),se(this,"_isUplink"),se(this,"_room"),se(this,"_log"),se(this,"_signalChannel"),se(this,"_currentState","DISCONNECTED"),se(this,"_prevTime",-1),se(this,"_enableSEI"),this.userId=r.userId,this.tinyId=r.tinyId,this._room=r.room,this._sdpSemantics=r.room.sdpSemantics,this._isUplink=r.isUplink,this._log=Rn.createLogger({id:"n",userId:this._room.userId,remoteUserId:this._isUplink?void 0:this.userId,sdkAppId:this._room.sdkAppId,isLocal:this._isUplink}),this._signalChannel=r.signalChannel,this._enableSEI=r.enableSEI}get _peerConnection(){var r;return((r=this.singlePC)==null?void 0:r.getPeerConnection())||null}get singlePC(){return this._room.singlePC}close(r){this._log.info("close connection"),this.emit("closed",r)}emitConnectionStateChangedEvent(r){return r!==this._currentState&&(un.emit(Gt.PEER_CONNECTION_STATE_CHANGED,{room:this._room,prevState:this._currentState,state:r,remoteUserId:this._isUplink?void 0:this.userId}),this.emit("connection-state-changed",{prevState:this._currentState,state:r}),this._currentState=r,!0)}getPeerConnection(){return this._peerConnection}getRoom(){return this._room}getUserId(){return this.userId}getTinyId(){return this.tinyId}getCurrentState(){return this._currentState}get isH264(){var r,a;return!((a=(r=this._peerConnection)==null?void 0:r.remoteDescription)==null||!a.sdp.includes("H264"))}},ON=class extends Uz{constructor(r){super($r(Jn({},r),{isUplink:!0})),se(this,"localMainAudioTrack",null),se(this,"localMainVideoTrack",null),se(this,"localAuxAudioTrack",null),se(this,"localAuxVideoTrack",null),se(this,"_isPublishingAux",!1),se(this,"_publishingLocalAudioTrack"),se(this,"_publishingLocalVideoTrack"),se(this,"_mediaSettings",{videoCodec:"",videoWidth:0,videoHeight:0,videoBps:0,videoFps:0,audioCodec:"opus",audioFs:0,audioChannel:0,audioBps:0,smallVideoWidth:0,smallVideoHeight:0,smallVideoFps:0,smallVideoBps:0,auxVideoWidth:0,auxVideoHeight:0,auxVideoFps:0,auxVideoBps:0}),se(this,"_flag",0),se(this,"_checkPublishStateTimeoutId",-1),this.initialize()}get videoCodec(){var r;return((r=this.singlePC)==null?void 0:r.videoCodec)||"h264"}get ssrc(){if(!this.singlePC)return{audio:0,video:0,videoRtx:0,small:0,smallRtx:0,auxiliary:0,auxiliaryRtx:0};let{audioSsrc:r,bigVideoSsrc:a,bigVideoRtxSsrc:c,smallVideoSsrc:f,smallVideoRtxSsrc:m,auxVideoSsrc:x,auxVideoRtxSsrc:S}=this.singlePC.uplinkSSRC;return{audio:r||0,video:a||0,videoRtx:c||0,small:f||0,smallRtx:m||0,auxiliary:x||0,auxiliaryRtx:S||0}}get flag(){return this._flag}set flag(r){this._flag!==r&&(this._flag=r,this.checkPublishState())}checkPublishState(){let r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!r&&this._checkPublishStateTimeoutId>0)return;let{publishState:a,serverPublishState:c}=this,f=Object.keys(a).find(m=>a[m]!==c[m]);if(f){if(!r)return void(this._checkPublishStateTimeoutId=vo.run(b_,()=>this.checkPublishState(!0),{delay:1e4,count:1}));this._log.warn("publish state not matched, ".concat(f," local:").concat(a[f]," server:").concat(c[f]," ").concat(D9()," ").concat(U$())),ur.addCount({key:521e3})}vo.clearTask(this._checkPublishStateTimeoutId),this._checkPublishStateTimeoutId=-1}get isMainStreamPublished(){return!(!this.localMainAudioTrack&&!this.localMainVideoTrack)}get isAuxStreamPublished(){return!(!this.localAuxVideoTrack&&!this.localAuxAudioTrack)}get publishState(){var r,a,c,f;let m={audio:!1,bigVideo:!1,smallVideo:!1,auxVideo:!1};if(this._peerConnection){let x=this._peerConnection.getSenders();x&&(hf()?(m.audio=!((r=x[0])==null||!r.track),m.bigVideo=!((a=x[1])==null||!a.track),m.smallVideo=!((c=x[2])==null||!c.track),m.auxVideo=!((f=x[3])==null||!f.track)):x.forEach(S=>{S.track&&(S.track.kind===Re.AUDIO?m.audio=!0:(m.bigVideo=!0,this._room.videoManager.hasSmall&&(m.smallVideo=!0)))}))}return m}get serverPublishState(){return{audio:!!(this.flag&p_),bigVideo:!!(this.flag&h_),smallVideo:!!(this.flag&e9),auxVideo:!!(this.flag&Sx)}}get muteState(){var r,a,c;return{audio:!((r=this.localMainAudioTrack)==null||!r.muted),bigVideo:!((a=this.localMainVideoTrack)==null||!a.muted),auxVideo:!((c=this.localAuxVideoTrack)==null||!c.muted)}}initialize(){this.installEvents()}reset(){this.uninstallEvents(),this.uninstallTrackMuteEvents(this.localMainAudioTrack,this.localMainVideoTrack,this.localAuxVideoTrack)}close(r){var a;let c=((a=this._peerConnection)==null?void 0:a.getSenders())||[];for(let f of c)f.replaceTrack(null);super.close(r),this.reset(),this.emitConnectionStateChangedEvent("DISCONNECTED")}installEvents(){var r,a;this.listeners("connection-state-changed").includes(this.handleConnectionStateChange)||this.on("connection-state-changed",this.handleConnectionStateChange,this),(r=this.singlePC)!=null&&r.listeners("spc-reconnected").includes(this.onSinglePCReconnected)||(a=this.singlePC)==null||a.on("spc-reconnected",this.onSinglePCReconnected,this)}uninstallEvents(){var r;this.off("connection-state-changed",this.handleConnectionStateChange,this),(r=this.singlePC)==null||r.off("spc-reconnected",this.onSinglePCReconnected,this)}emitConnectionStateChangedEvent(r,a){var c,f,m;let x=this._currentState,S=super.emitConnectionStateChangedEvent(r);return S&&x!==r&&(a?a.emit("connection-state-changed",{prevState:x,state:r}):((c=this.localMainVideoTrack)==null||c.emit("connection-state-changed",{prevState:x,state:r}),(f=this.localAuxVideoTrack)==null||f.emit("connection-state-changed",{prevState:x,state:r}),(m=this._publishingLocalVideoTrack)==null||m.emit("connection-state-changed",{prevState:x,state:r}))),S}publish(r){return Ke(this,arguments,function(a){var c=this;let{localAudioTrack:f,localVideoTrack:m,isAuxiliary:x}=a;return function*(){var S,R,A,B,q,j;if(!c.singlePC)return;yield c.singlePC.waitForPeerConnectionConnected();let he,{publishState:xe,muteState:Pe}=c;if(f&&(c._publishingLocalAudioTrack=f,xe.audio=!0,Pe.audio=f.muted),m){if(!c.singlePC.isH264EncodeSupported&&!c.singlePC.isVP8EncodeSupported)throw new Gn({code:Tn.NOT_SUPPORTED_H264,message:Rr({key:Ir.NOT_SUPPORTED_H264ENCODE})});ns&&A_()===115&&m.profile.width*m.profile.height<=230400&&(c._log.warn("fallback video to 480p"),m.setProfile(yc["480p_2"]),yield m.applyProfile()),c._publishingLocalVideoTrack=m,x?(xe.auxVideo=!0,Pe.auxVideo=m.muted):(xe.bigVideo=!0,Pe.bigVideo=m.muted)}if(c._isPublishingAux=x,m&&!x&&m.small&&(he=c._room.videoManager.smallTrack,xe.smallVideo=!0),yield c._signalChannel.sendWaitForResponseWithRetry({command:Mde,responseCommand:zr.SPC_PUBLISH_RESULT,data:$r(Jn({},c.singlePC.uplinkSSRC),{state:xe,muteState:Pe}),retries:3}),yield c.publishByTransceiver({localAudioTrack:f,localVideoTrack:m,smallTrack:he,isAuxiliary:x}),c._publishingLocalAudioTrack=null,c._publishingLocalVideoTrack=null,c._isPublishingAux=!1,x)m&&(c.localAuxVideoTrack=m),f&&(c.localAuxAudioTrack=f);else{if(m){c.localMainVideoTrack=m;let{scaleResolutionDownBy:ht}=m;ht>1&&(c._log.warn("setScaleResolutionDownBy main ".concat(ht)),yield c.singlePC.setScaleResolutionDownBy(c._peerConnection.getSenders()[1],ht))}f&&(c.localMainAudioTrack=f)}yield c.singlePC.setBandwidth({audio:((S=c.localMainAudioTrack)==null?void 0:S.profile.bitrate)||((R=c.localAuxAudioTrack)==null?void 0:R.profile.bitrate),bigVideo:(A=c.localMainVideoTrack)==null?void 0:A.profile.bitrate,smallVideo:(q=(B=c.localMainVideoTrack)==null?void 0:B.small)==null?void 0:q.bitrate,auxVideo:(j=c.localAuxVideoTrack)==null?void 0:j.profile.bitrate}),c.sendMediaSettings(),c.installTrackMuteEvents(f,m)}()})}publishByTransceiver(r){let{localAudioTrack:a,localVideoTrack:c,smallTrack:f,isAuxiliary:m}=r;if(!Mu())return;this._log.info("publish by transceiver");let x=c==null?void 0:c.outMediaTrack,S=a==null?void 0:a.outMediaTrack,R=this._peerConnection.getTransceivers(),A=[],B=[],q=(he,xe,Pe)=>{var ht;let Ft=R[xe].sender.replaceTrack(Pe);B.push(xe),(ht=this.singlePC)!=null&&ht.enableInsertableStreams&&Ft.then(()=>this.createEncodedStreams(R[xe].sender,he)),A.push(Ft)};S&&q(a.mediaType,0,S),x&&q(c.mediaType,m?3:1,x),f&&q(8,2,f);let j=this.setTransceiverDirection(Gr.SENDONLY,B);return A.push(j),Promise.all(A)}getTrackByMeidaType(r){switch(r){case 1:return this.localMainAudioTrack||this._publishingLocalAudioTrack;case 4:case 8:return this.localMainVideoTrack||this._publishingLocalVideoTrack;case 2:return this.localAuxVideoTrack||this._publishingLocalVideoTrack;default:throw new Error("mediaType error")}}createEncodedStreams(r,a){var c,f;if(this.singlePC.abortMap.has(r))return;let m=r.createEncodedStreams(),x=new AbortController;(c=this.singlePC)==null||c.addAbortController(r,x),((f=this.getTrackByMeidaType(a))!=null&&f.enableEncodeFrame?m.readable.pipeThrough(new TransformStream({transform:(S,R)=>{var A;return R.enqueue((A=this.singlePC)!=null&&A.isUsingH264?this.getTrackByMeidaType(a).encodeFrame(S,a===8):S)}}),x):m.readable).pipeTo(m.writable,x).catch(S=>{this._log.debug("encoded stream error",S),S!=="destory"&&this._log.warn(S)})}enableSmall(r){return Ke(this,null,function*(){if(!this.singlePC)return;let a=this._peerConnection.getTransceivers();r?this._room.videoManager.smallTrack&&(yield a[2].sender.replaceTrack(this._room.videoManager.smallTrack),yield this.setTransceiverDirection(Gr.SENDONLY,[2])):(yield a[2].sender.replaceTrack(null),yield this.setTransceiverDirection(Gr.INACTIVE,[2])),this.updateMediaSettings(),yield this.doPublishChange()})}installTrackMuteEvents(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];a.forEach(f=>{f&&(f==null||f.on("mute",this.sendMutedFlag,this),f==null||f.on("unmute",this.sendMutedFlag,this))})}uninstallTrackMuteEvents(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];a.forEach(f=>{f&&(f==null||f.off("mute",this.sendMutedFlag,this),f==null||f.off("unmute",this.sendMutedFlag,this))})}unpublish(r){return Ke(this,arguments,function(a){var c=this;let{localAudioTrack:f,localVideoTrack:m}=a;return function*(){let x=m&&m===c.localAuxVideoTrack,S=m==null?void 0:m.outMediaTrack,R=c._peerConnection.getSenders(),A=[];f&&(yield R[0].replaceTrack(null),A.push(0),x?c.localAuxAudioTrack=null:c.localMainAudioTrack=null),S&&(x?(yield R[3].replaceTrack(null),c.localAuxVideoTrack=null,c._mediaSettings=$r(Jn({},c._mediaSettings),{auxVideoBps:0,auxVideoFps:0,auxVideoWidth:0,auxVideoHeight:0}),A.push(3)):(yield R[1].replaceTrack(null),yield R[2].replaceTrack(null),c.localMainVideoTrack=null,c._mediaSettings=$r(Jn({},c._mediaSettings),{videoWidth:0,videoHeight:0,videoBps:0,videoFps:0,audioFs:0,audioChannel:0,audioBps:0,smallVideoWidth:0,smallVideoHeight:0,smallVideoFps:0,smallVideoBps:0}),A.push(1,2))),c.isMainStreamPublished||c.isAuxStreamPublished?(yield c.setTransceiverDirection(Gr.INACTIVE,A),yield c.doPublishChange(!1)):yield c.doUnpublish(),c.uninstallTrackMuteEvents(f,m),m==null||m.emit("connection-state-changed",{prevState:c._currentState,state:"DISCONNECTED"})}()})}doPublishChange(){let r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Ke(this,null,function*(){let a={state:this.publishState,constraintConfig:this._mediaSettings},c=yield this._signalChannel.sendWaitForResponseWithRetry({command:Ez,data:a,responseCommand:zr.PUBLISH_STATE_CHANGE_RESULT,enableLog:r,retries:3});this.checkPublishResultCode(c.data.code,c.data.message)})}doUnpublish(){let r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return this._signalChannel.sendWaitForResponse({command:SN,commandDesc:"unpublish",responseCommand:zr.UNPUBLISH_RESULT,enableLog:r}).catch(a=>{if(a.getCode()===Tn.API_CALL_TIMEOUT)return Promise.resolve();throw a})}updateMediaSettings(){let{detail:{isH264EncodeSupported:r,isVp8EncodeSupported:a}}=this._room.checkSystemResult;r?this._mediaSettings.videoCodec="H264":a&&(this._mediaSettings.videoCodec="VP8");let c=this._publishingLocalAudioTrack||this.localMainAudioTrack||this.localAuxAudioTrack,{localMainVideoTrack:f,localAuxVideoTrack:m}=this;if(this._publishingLocalVideoTrack&&(this._isPublishingAux?m=this._publishingLocalVideoTrack:f=this._publishingLocalVideoTrack),Sv){if(c&&c.outMediaTrack){let x=c.outMediaTrack.getSettings();this._mediaSettings.audioChannel=x.channelCount||1,this._mediaSettings.audioBps=1e3*c.profile.bitrate,this._mediaSettings.audioFs=x.sampleRate||0}if(f&&f.outMediaTrack){let x=f.outMediaTrack.getSettings();this._mediaSettings.videoWidth=x.width||0,this._mediaSettings.videoHeight=x.height||0,this._mediaSettings.videoFps=x.frameRate||0,this._mediaSettings.videoBps=1e3*f.profile.bitrate,f.small&&(this._mediaSettings.smallVideoWidth=f.small.width,this._mediaSettings.smallVideoHeight=f.small.height,this._mediaSettings.smallVideoFps=f.small.frameRate,this._mediaSettings.smallVideoBps=1e3*f.small.bitrate)}if(m&&m.outMediaTrack){let x=m.outMediaTrack.getSettings();this._mediaSettings.auxVideoWidth=x.width||0,this._mediaSettings.auxVideoHeight=x.height||0,this._mediaSettings.auxVideoFps=x.frameRate||0,this._mediaSettings.auxVideoBps=1e3*m.profile.bitrate}}else c&&c.outMediaTrack&&(this._mediaSettings.audioChannel=c.profile.channelCount,this._mediaSettings.audioBps=1e3*c.profile.bitrate,this._mediaSettings.audioFs=c.profile.sampleRate),f&&f.outMediaTrack&&(this._mediaSettings.videoWidth=f.profile.width,this._mediaSettings.videoHeight=f.profile.height,this._mediaSettings.videoFps=f.profile.frameRate,this._mediaSettings.videoBps=1e3*f.profile.bitrate);this._log.info("updateMediaSettings: ".concat(JSON.stringify(this._mediaSettings)))}sendMediaSettings(){this.updateMediaSettings(),this._signalChannel.sendWaitForResponse({command:Cz,data:this._mediaSettings,responseCommand:zr.UPDATE_CONSTRAINT_CONFIG_RES}).then(r=>{r.data.code!==0&&this._log.warn(r.data.message)}).catch(()=>{})}addTrack(r){return Ke(this,null,function*(){if(!this._peerConnection)return;let a=r===this.localAuxAudioTrack||r===this.localAuxVideoTrack;this._log.info("is adding ".concat(r.kind," track to current published local ").concat(a?Re.AUXILIARY:Re.MAIN," stream")),hf()&&(yield this.addTrackByTransceiver(r,a))})}addTrackByTransceiver(r,a){return Ke(this,null,function*(){var c;if(!r.mediaTrack)return;let f=this._peerConnection.getTransceivers();if(r.kind===Re.AUDIO)yield f[0].sender.replaceTrack(r.outMediaTrack);else{let m=a?3:1;yield f[m].sender.replaceTrack(r.outMediaTrack),m===1&&((c=this.localMainVideoTrack)!=null&&c.small)&&(yield f[2].sender.replaceTrack(this._room.videoManager.smallTrack)),f[m].direction===Gr.INACTIVE&&(yield this.setTransceiverDirection(Gr.SENDONLY,[m]))}this.updateMediaSettings(),yield this.doPublishChange()})}removeTrack(r){return Ke(this,null,function*(){if(!this._peerConnection)return;let a=r===this.localAuxAudioTrack||r===this.localAuxVideoTrack;this._log.info("is removing ".concat(r.kind," track from current published local ").concat(a?Re.AUXILIARY:Re.MAIN," stream")),hf()&&(yield this.removeTrackByTransceiver(r,a))})}removeTrackByTransceiver(r,a){return Ke(this,null,function*(){if(!r.mediaTrack)return;let c=this._peerConnection.getTransceivers();if(r.kind===Re.AUDIO)yield c[0].sender.replaceTrack(null);else{let f=a?3:1;yield c[f].sender.replaceTrack(null),f===1&&this._room.videoManager.hasSmall&&(yield c[2].sender.replaceTrack(null)),yield this.setTransceiverDirection(Gr.INACTIVE,[f])}this.updateMediaSettings(),yield this.doPublishChange()})}setTransceiverDirection(r,a){return Ke(this,null,function*(){if(!oo)return;let c=!1,f=!1;this._log.info("setting transceiver ".concat(a.join(",")," direction to ").concat(r));let m=this._peerConnection.getTransceivers();if(a.forEach(R=>{m[R].direction!==r&&(m[R].direction=r,c=!0)}),c){this._log.info("updating offer");let R=yield this._peerConnection.createOffer();yield this._peerConnection.setLocalDescription(R)}let x=-1,S=this._peerConnection.remoteDescription.sdp.split(`\r
258
258
  `).map(R=>{if(R.match(new RegExp("a=(".concat(Gr.INACTIVE,"|").concat(Gr.RECVONLY,"|").concat(Gr.SENDONLY,")")))&&x++,a.includes(x)){if(r===Gr.INACTIVE&&R.includes("a=".concat(Gr.RECVONLY)))return f=!0,"a=".concat(r);if(r===Gr.SENDONLY&&R.includes("a=".concat(Gr.INACTIVE)))return f=!0,"a=".concat(Gr.RECVONLY)}return R}).join(`\r
259
- `);f&&(this._log.info("updating answer"),yield this._peerConnection.setRemoteDescription({type:"answer",sdp:S}))})}replaceTrack(r){return Ke(this,null,function*(){var a;let c=(a=this._peerConnection)==null?void 0:a.getSenders(),f=r.outMediaTrack||r.mediaTrack;if(!c||c.length===0||!f||c.find(x=>x.track===f))return!1;let m=r===this.localAuxAudioTrack||r===this.localAuxVideoTrack;return this._log.info("is replacing ".concat(f.kind," track ").concat(f.id," on ").concat(m?Re.AUXILIARY:Re.MAIN," stream")),f.kind===Re.AUDIO&&c[0]&&(yield c[0].replaceTrack(f)),f.kind===Re.VIDEO&&(!m&&c[1]&&(yield c[1].replaceTrack(f)),m&&c[3]&&(yield c[3].replaceTrack(f))),!0})}setBandwidth(r){return Ke(this,arguments,function(a){var c=this;let{bandwidth:f,type:m,videoType:x}=a;return function*(){if(c.singlePC){let S={};m===Re.AUDIO?S.audio=f:x==="big"?S.bigVideo=f:x==="small"?S.smallVideo=f:S.auxVideo=f,yield c.singlePC.setBandwidth(S)}}()})}sendMutedFlag(r){r===this.localAuxAudioTrack||r===this.localAuxVideoTrack||(this._log.info("send muted state: ".concat(JSON.stringify(this.muteState))),this._signalChannel.sendWaitForResponseWithRetry({command:xz,responseCommand:zr.MUTE_RESULT,data:this.muteState,retries:3}).catch(()=>{}))}handleConnectionStateChange(r){r.state==="CONNECTED"&&(this.localMainVideoTrack||this._publishingLocalVideoTrack&&!this._isPublishingAux)&&un.emit(Gt.SEND_FIRST_VIDEO_FRAME,{room:this._room})}getVideoTrackId(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Re.VIDEO;if(this._peerConnection){let a=this._peerConnection.getSenders();if(r===Re.AUXILIARY&&a[3]&&a[3].track)return a[3].track.id;if(r===Re.VIDEO&&a[1]&&a[1].track)return a[1].track.id}if(this.localMainVideoTrack&&r===Re.VIDEO){let a=this.localMainVideoTrack.mediaTrack;if(a)return a.id}if(this.localAuxVideoTrack&&r===Re.AUXILIARY){let a=this.localAuxVideoTrack.mediaTrack;if(a)return a.id}return""}getSSRC(){return this.ssrc}checkPublishResultCode(r,a){if(r!==0)throw r===Ix?(this._log.error(Rl.NOT_SUPPORTED_H264ENCODE),new Gn({code:Tn.NOT_SUPPORTED_H264,message:Rr({key:Ir.NOT_SUPPORTED_H264ENCODE})})):new Gn({code:Tn.UNKNOWN,message:Rr({key:Ir.SIGNAL_RESPONSE_FAILED,data:{signalResponse:zr.PUBLISH_RESULT,code:r,message:a}})})}onSinglePCReconnected(){return Ke(this,null,function*(){this.isMainStreamPublished&&(this._log.warn("republish main stream"),yield this.publish({localAudioTrack:this.localMainAudioTrack,localVideoTrack:this.localMainVideoTrack,isAuxiliary:!1})),this.isAuxStreamPublished&&(this._log.warn("republish aux stream"),yield this.publish({localAudioTrack:this.localAuxAudioTrack,localVideoTrack:this.localAuxVideoTrack,isAuxiliary:!0}))})}};function zz(r){return Object.keys(r).filter(a=>r[a])}var xE=class extends Uz{constructor(r){super($r(Jn({},r),{isUplink:!1})),se(this,"_flag",0),se(this,"role","anchor"),se(this,"remoteAudioTrack"),se(this,"remoteVideoTrack"),se(this,"remoteAuxiliaryTrack"),se(this,"ssrc",{audio:0,video:0,videoRtx:0,auxiliary:0,auxiliaryRtx:0}),this.flag=r.flag,this.remoteAudioTrack=new mN(this._room,this),this.remoteVideoTrack=new K_(this._room,this),this.remoteAuxiliaryTrack=new tz(this._room,this),this.initialize()}get videoCodec(){var r;return((r=this.singlePC)==null?void 0:r.downlinkVideoCodec)||"h264"}get subscribeState(){return{audio:this.remoteAudioTrack.isSubscribed||this.remoteAudioTrack.isSubscribing,video:this.remoteVideoTrack.isBig&&(this.remoteVideoTrack.isSubscribed||this.remoteVideoTrack.isSubscribing),smallVideo:this.remoteVideoTrack.isSmall&&(this.remoteVideoTrack.isSubscribed||this.remoteVideoTrack.isSubscribing),auxiliary:this.remoteAuxiliaryTrack.isSubscribed||this.remoteAuxiliaryTrack.isSubscribing}}get muteState(){return P_(this.flag,this.userId)}get flag(){return this._flag}set flag(r){var a,c,f;r!==this._flag&&(this._flag=r,(a=this.remoteAudioTrack)==null||a.onFlagChanged(),(c=this.remoteVideoTrack)==null||c.onFlagChanged(),(f=this.remoteAuxiliaryTrack)==null||f.onFlagChanged())}get hasMainStream(){return this.muteState.hasAudio||this.muteState.hasVideo||this.muteState.hasSmall}get hasAuxStream(){return this.muteState.hasAuxiliary}get isMainStreamSubscribed(){return(this.subscribeState.audio||this.subscribeState.video||this.subscribeState.smallVideo)&&(this.muteState.hasAudio||this.muteState.hasVideo||this.muteState.hasSmall)}get isAuxStreamSubscribed(){return this.subscribeState.auxiliary&&this.muteState.hasAuxiliary}get isSmallStreamSubscribed(){return this.subscribeState.smallVideo&&this.muteState.hasSmall}get isBigStreamSubscribed(){return this.subscribeState.video&&this.muteState.hasVideo}isStreamUnpublished(r){return r===Re.MAIN?!this.muteState.hasAudio&&!this.muteState.hasVideo:!this.muteState.hasAuxiliary}initialize(){this.installEvents()}close(r){super.close(r),this.emitConnectionStateChangedEvent("DISCONNECTED"),this.remoteAudioTrack.close(),this.remoteVideoTrack.close(),this.remoteAuxiliaryTrack.close(),this.uninstallEvents(),this.removeDownlink()}installEvents(){!this.singlePC||(this.listeners("track").includes(this.onTrack)||this.singlePC.on("track",this.onTrack,this),this.listeners("spc-reconnected").includes(this.onSinglePCReconnected)||this.singlePC.on("spc-reconnected",this.onSinglePCReconnected,this))}uninstallEvents(){!this.singlePC||(this.singlePC.off("track",this.onTrack,this),this.singlePC.off("spc-reconnected",this.onSinglePCReconnected,this))}emitConnectionStateChangedEvent(r){var a,c;let f=this._currentState,m=super.emitConnectionStateChangedEvent(r);return m&&f!==r&&((a=this.remoteVideoTrack)==null||a.emit("connection-state-changed",{prevState:f,state:r}),(c=this.remoteAuxiliaryTrack)==null||c.emit("connection-state-changed",{prevState:f,state:r})),m}onTrack(r){let a=r.streams[0],{track:c,receiver:f}=r;if(!a.id.includes(this.tinyId))return;let m=a.id.includes("aux")?"auxiliary":"main";this._log.debug("ontrack ".concat(m," ").concat(c.kind));let x=Re.AUDIO;c.kind===Re.VIDEO&&(x=m===Re.MAIN?Re.VIDEO:Re.AUXILIARY);let S=this.remoteAudioTrack;x===Re.VIDEO?S=this.remoteVideoTrack:x===Re.AUXILIARY&&(S=this.remoteAuxiliaryTrack),this.singlePC.enableInsertableStreams&&this.createEncodedStreams(S,f),S.setInputMediaStreamTrack(c)}createEncodedStreams(r,a){if(!this.singlePC.abortMap.has(a)){let c=a.createEncodedStreams(),f=new AbortController,m={abortController:f,enqueue:x=>{var S;return(S=this.singlePC)!=null&&S.isUsingH264?r.decodeFrame(x):x}};(r.enableDecodeFrame?c.readable.pipeThrough(new TransformStream({transform:(x,S)=>S.enqueue(m.enqueue(x))})):c.readable).pipeTo(c.writable,f).catch(x=>{x!=="destory"&&this._log.warn(x)}),this.singlePC.addAbortController(a,f)}}subscribe(r,a){return Ke(this,null,function*(){try{if(this._log.info("subscribe ".concat(a," ").concat(zz(r))),this.hasSSRC){let c="subscribe_change";Object.values(r).find(f=>f===!0)||(c="unsubscribe"),yield this.sendSubscription(c,r)}else yield this.doSubscribe(r),this.checkTrackEnded(r)}catch(c){throw this._room.isJoined&&this.isStreamUnpublished(a)?(this._log.warn("".concat(c.message," ").concat(JSON.stringify(this.muteState))),new Gn({code:Tn.REMOTE_STREAM_NOT_EXIST,message:"remote user ".concat(this.userId," unpublished stream")})):c}})}checkTrackEnded(r){var a,c,f;if((r.audio&&((a=this.remoteAudioTrack.mediaTrack)==null?void 0:a.readyState)==="ended"||r.video&&((c=this.remoteVideoTrack.mediaTrack)==null?void 0:c.readyState)==="ended"||r.auxiliary&&((f=this.remoteAuxiliaryTrack.mediaTrack)==null?void 0:f.readState)==="ended")&&this.singlePC&&!this.singlePC.isReconnecting){if(this._log.warn("remote track ended start spc reconnect"),S0&&C0<92)return;this.singlePC.startReconnection()}}unsubscribe(r){return Ke(this,arguments,function(a){var c=this;let{remoteTracks:f,streamType:m}=a;return function*(){var x;if(m==="main"&&!c.isMainStreamSubscribed||m==="auxiliary"&&!c.isAuxStreamSubscribed)return void c._log.info("".concat(m," stream already unsubscribed"));let S=Jn({},c.subscribeState);f.forEach(A=>{switch(A.mediaType){case 1:S.audio=!1;break;case 4:S.video=!1;break;case 8:S.smallVideo=!1;break;case 2:S.auxiliary=!1}});let R="subscribe_change";Object.values(S).find(A=>A===!0)||(R="unsubscribe"),c._log.info("".concat(R==="unsubscribe"?R:"subscribe"," ").concat(m," [").concat(zz(S),"]")),R==="unsubscribe"&&((x=c.singlePC)==null||x.removeDownlinkQueue.add(c.tinyId)),yield c.sendSubscription(R,S),R==="unsubscribe"&&(yield c.removeDownlink())}()})}sendSubscription(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.subscribeState,c={srcTinyId:this.tinyId,srcUserId:this.userId},f=wz,m=zr.UNSUBSCRIBE_RESULT;return r==="subscribe_change"&&(c={audio:a.audio,bigVideo:a.video,auxVideo:a.auxiliary,smallVideo:a.smallVideo,srcTinyId:this.tinyId},f=Sz,m=zr.SUBSCRIBE_CHANGE_RESULT),this._signalChannel.sendWaitForResponseWithRetry({command:f,data:c,responseCommand:m,timeout:1e4,retries:3}).then(x=>{let{data:S}=x;if(S.code!==0){let R=new Gn({code:S.code,message:Rr({key:Ir.ERROR_MESSAGE,data:{type:r,message:S.message}})});throw this._log.error(R),R}})}getMainStreamVideoTrackId(){return this.remoteVideoTrack&&this.remoteVideoTrack.mediaTrack?this.remoteVideoTrack.mediaTrack.id:""}getAuxStreamVideoTrackId(){return this.remoteAuxiliaryTrack&&this.remoteAuxiliaryTrack.mediaTrack?this.remoteAuxiliaryTrack.mediaTrack.id:""}setDelay(r){let{audioDelay:a,videoDelay:c}=r;this.remoteAudioTrack.stat.end2EndDelay=a,this.remoteVideoTrack.stat.end2EndDelay=c}onSinglePCReconnected(){(this.ssrc.audio||this.ssrc.video||this.ssrc.auxiliary)&&(this._log.warn("resubscribe ".concat(JSON.stringify(this.subscribeState))),this.doSubscribe(this.subscribeState))}get hasSSRC(){return this.ssrc.audio&&this.ssrc.video&&this.ssrc.auxiliary}doSubscribe(){return Ke(this,arguments,function(){var r=this;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.subscribeState,c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return function*(){if(r.singlePC){r.singlePC.addDownlinkQueue.add(r.tinyId),yield r.singlePC.waitForPeerConnectionConnected();try{if(c||!r.hasSSRC){let f={audioSsrc:Lv(),bigVideoSsrc:Lv(),bigVideoRtxSsrc:Lv(),auxVideoSsrc:Lv(),auxVideoRtxSsrc:Lv()},{audioSsrc:m,bigVideoSsrc:x,bigVideoRtxSsrc:S,auxVideoSsrc:R,auxVideoRtxSsrc:A}=f;r.ssrc={audio:m,video:x,videoRtx:S,auxiliary:R,auxiliaryRtx:A},r.singlePC.addDownlinkQueue.delete(r.tinyId),yield r.singlePC.addDownlink({userId:r.userId,tinyId:r.tinyId,ssrc:r.ssrc});try{let B=yield r._signalChannel.sendWaitForResponseWithRetry({command:Pde,responseCommand:zr.SPC_SUBSCRIBE_RESULT,data:{srcUserId:r.userId,srcTinyId:r.tinyId,audio:a.audio,bigVideo:a.video,auxVideo:a.auxiliary,smallVideo:a.smallVideo,customData:!1,ssrc:f},retries:3,retryTimeout:0});if(B.data.code!==0)throw new Gn({code:B.data.code,message:B.data.message})}catch(B){throw yield r.removeDownlink(),B}return}r.singlePC.addDownlinkQueue.delete(r.tinyId),yield r.singlePC.addDownlink({userId:r.userId,tinyId:r.tinyId,ssrc:r.ssrc})}finally{let f=r._room.scheduleResult.config;(f!=null&&f.jitterDelay||f!=null&&f.jitterDelayAux)&&r.setJitterBufferDelay({mainDelay:f.jitterDelay,auxDelay:f.jitterDelayAux})}}}()})}removeDownlink(){return Ke(this,null,function*(){if(!this.singlePC)return;this.ssrc={audio:0,video:0,videoRtx:0,auxiliary:0,auxiliaryRtx:0},this.singlePC.removeDownlinkQueue.delete(this.tinyId);let r=this._room.scheduleResult.config;(r!=null&&r.jitterDelay||r!=null&&r.jitterDelayAux)&&this.setJitterBufferDelay({mainDelay:0,auxDelay:0}),yield this.singlePC.removeDownlink(this.userId)})}setJitterBufferDelay(r){let{mainDelay:a,auxDelay:c}=r;if(!this.singlePC||!this._peerConnection||D0(a)&&D0(c))return Promise.resolve();this._log.info("set jitterBuffer main: ".concat(a," aux: ").concat(c));let f=this.singlePC.getReceiversByUserId(this.userId);return So(a)&&(this.remoteAudioTrack.jitterBufferDelay=a,this.remoteVideoTrack.jitterBufferDelay=a),So(c)&&(this.remoteAuxiliaryTrack.jitterBufferDelay=c,D0(a)&&(this.remoteAudioTrack.jitterBufferDelay=c)),new Promise(m=>{this.doSetJitterBufferDelay({mainDelay:a,auxDelay:c,receivers:f,resolve:m})})}doSetJitterBufferDelay(r){let{mainDelay:a,auxDelay:c,receivers:f,resolve:m}=r,x=-1;try{if(a===0&&c===0)return f.forEach(S=>S.jitterBufferTarget=0),m();if(f.forEach(S=>{var R;let A=S.track===this.remoteAuxiliaryTrack.outMediaTrack||D0(a)&&S.track===this.remoteAudioTrack.outMediaTrack;if(A&&D0(c)||!A&&D0(a))return;let B=A?c||0:a,q=(S.jitterBufferTarget||0)+100;q>B||(S.jitterBufferTarget=q,this._log.debug("set ".concat(A?"aux ":"").concat((R=S==null?void 0:S.track)==null?void 0:R.kind," jitterBuffer delay ").concat(q," -> ").concat(B)))}),!f.find(S=>{let R=S.track===this.remoteAuxiliaryTrack.outMediaTrack?c||0:a;return S.jitterBufferTarget<R}))return this._log.info("set jitterBuffer main: ".concat(a," aux: ").concat(c," done")),m();x=setTimeout(()=>{this.doSetJitterBufferDelay({mainDelay:a,auxDelay:c,receivers:f,resolve:m})},1e3)}catch(S){this._log.warn("set jitterBuffer delay error: ".concat(S)),clearTimeout(x),m()}}};Ln([Av(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];return new Promise((m,x)=>{let S=R=>{this.off("closed",S),x(new Gn({code:Tn.API_CALL_ABORTED,message:Rr({key:Ir.CONNECTION_ABORTED,data:R})}))};this.on("closed",S),r.apply(this,c).then(m,x).finally(()=>{this.off("closed",S)})})})],xE.prototype,"subscribe"),Ln([Av()],xE.prototype,"unsubscribe"),Ln([Dv(()=>"jitter")],xE.prototype,"setJitterBufferDelay");var ufe=xE,dfe=oa(ts()),Hz=class extends dfe.EventEmitter{constructor(r,a){super(),this.room=r,this.signalChannel=a,se(this,"log"),se(this,"cmdIdSeqMap",new Map),se(this,"messageMap",new Map),this.log=Rn.createLogger({id:"cmm",userId:r.userId}),this.onReceiveMsg=this.onReceiveMsg.bind(this),a.on(zr.RECEIVE_CUSTOM_MSG,this.onReceiveMsg)}send(r){let{cmdId:a,data:c}=r,f=this.cmdIdSeqMap.get(a)||Math.floor(16383*Math.random()),m={cmdId:a,msg:btoa(String.fromCharCode(...new Uint8Array(c))),ordered:!0,reliable:!0,streamSeq:f};this.cmdIdSeqMap.set(a,f+1),this.signalChannel.send(Bde,m)}onReceiveMsg(r){let{data:a}=r.data,c=this.room.tinyIdToUserIdMap.get(a.srcTinyId);if(c){let f={userId:c,cmdId:a.cmdId,seq:a.streamSeq,data:Uint8Array.from(atob(a.msg),m=>m.charCodeAt(0)).buffer};if(a.ordered){let m="".concat(c,"_").concat(f.cmdId),x=this.messageMap.get(m);if(!x||Math.abs(x.lastSeq-f.seq)>Hz.SEQ_INTERVAL)this.messageMap.set(m,{lastSeq:f.seq,cachedMessageMap:new Map}),this.emitMessage(f);else if(f.seq>x.lastSeq){if(f.seq===x.lastSeq+1)this.emitMessage(f);else if(!x.cachedMessageMap.has(f.seq)){let S=setTimeout(()=>this.emitMessage(f,!0),5e3);x.cachedMessageMap.set(f.seq,{message:f,timeoutId:S})}}else this.log.debug("drop message ".concat(f.userId,"-").concat(f.cmdId,"-").concat(f.seq))}else this.emit("message",f)}}emitMessage(r){let a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];var c;let f=this.messageMap.get("".concat(r.userId,"_").concat(r.cmdId)),m=r;if(f){if(a){let S=[...f.cachedMessageMap.values()].sort((R,A)=>R.message.seq-A.message.seq);S[0]&&(m=S[0].message)}m.seq-f.lastSeq>1&&this.log.debug("msg lost userId: ".concat(m.userId," seq: ").concat(f.lastSeq," -> ").concat(m.seq)),f.lastSeq=m.seq,clearTimeout((c=f.cachedMessageMap.get(m.seq))==null?void 0:c.timeoutId),f.cachedMessageMap.delete(m.seq)}this.emit("message",m);let x=f==null?void 0:f.cachedMessageMap.get(m.seq+1);x&&this.emitMessage(x.message)}},Wz=Hz;se(Wz,"SEQ_INTERVAL",300);var jz,{isString:Gz,isUndefined:Bv,getNetworkType:ffe,isEmpty:s4}=gc,wf=class extends efe{constructor(r){super(r),this._heartbeat=-1,this._lastHeartBeatTime=-1,this._joinTimeout=-1,this._firstPublishedList=null,this._joinReject=null,this._isRelayChanged=!1,this._signalChannel=null,this.uplinkConnection=null,this.singlePC=null,this.enableSPC=$_,this._changeBigSmallRecords=new Map,this._networkQuality=null,this._turnServers=[],this._syncUserListInterval=-1,this._smallStreamConfig={bitrate:100,frameRate:15,height:120,width:160},this.enableSEI=!1,this._enableAudioVolumeEvaluation=!1,this._audioVolumeIntervalId=0,this._enableMultiAuxStream=!1,this._pureAudioPushMode=!1,this.enableHWEncoder=!1,this._stats=new $de(this,this._log),this.userManager=new Que(this.userId,this._log),this._version=_c,this.sdpSemantics=Tx,Bv(r.sdpSemantics)?L_.isUnifiedPlanDefault()&&(this.sdpSemantics=m_):this.sdpSemantics=r.sdpSemantics,this._log.info("sdpSemantics: ".concat(this.sdpSemantics,", netType: ").concat(ffe())),r.iceTransportPolicy&&(this._iceTransportPolicy=r.iceTransportPolicy),this._enableMultiAuxStream=!Bv(r.enableMultiAuxStream)&&r.enableMultiAuxStream,this.enableSEI=r.enableSEI&&$_,!Bv(r.enableSPC)&&$_&&(this.enableSPC=r.enableSPC),this.enableHWEncoder=r.enableHWEncoder||!1,this._initBusinessInfo(r)}get isMainStreamPublished(){var r;return!((r=this.uplinkConnection)==null||!r.isMainStreamPublished)}get isMainAudioPublished(){var r;return!((r=this.uplinkConnection)==null||!r.localMainAudioTrack)}get isAuxStreamPublished(){var r;return!((r=this.uplinkConnection)==null||!r.isAuxStreamPublished)}get hasAuxStream(){return[...this.remotePublishedUserMap.values()].findIndex(r=>r.muteState.hasAuxiliary)>=0}get userMap(){return this.userManager.userMap}get remotePublishedUserMap(){return this.userManager.remotePublishedUserMap}get tinyIdToUserIdMap(){return new Map([...this.userMap.values()].map(r=>[r.tinyId,r.userId]))}join(r,a,c){return Ke(this,null,function*(){return this.userManager.mySelfId=this.userId,this.userManager.on("1",f=>{this.emit("peer-join",f)}),this.userManager.on("2",f=>{this.closeDownLinkConnection(f,"remote user exitRoom"),this.emit("peer-leave",f)}),this.userManager.on("3",this.createDownlinkConnection,this),this.userManager.on("5",this.closeDownLinkConnection,this),this.userManager.on("6",f=>{var m=((x,S)=>{var R={};for(var A in x)UD.call(x,A)&&S.indexOf(A)<0&&(R[A]=x[A]);if(x!=null&&Ex)for(var A of Ex(x))S.indexOf(A)<0&&r$.call(x,A)&&(R[A]=x[A]);return R})(f,[]);un.emit(Gt.REMOTE_PUBLISH_STATE_CHANGED,Jn({room:this},m)),this.emit("remote-publish-state-changed",Jn({},m))}),this.joinParams=r,new Promise((f,m)=>Ke(this,null,function*(){var x,S;this._joinReject=m;try{this.checkDestroy();try{yield Promise.all([this.initialize(),this.initSinglePC()])}catch(R){if(!(R instanceof Gn&&R.code===Tn.SPC_INITIALIZED_FAILED))return m(R);(x=this._signalChannel)==null||x.destroy(),yield this.initialize()}yield this.doJoin(r,(S=this.singlePC)==null?void 0:S.clientAbility),f(),this._firstPublishedList&&this.onPublishedUserList({data:{userList:this._firstPublishedList}})}catch(R){m(R)}this._joinReject=null}))})}initSinglePC(){return Ke(this,null,function*(){if(this.enableSPC&&!this.singlePC){this.singlePC=new a4({signalChannel:this._signalChannel,room:this,enableCustomMessage:!1}),this.singlePC.on("sei-message",r=>this.emit("sei-message",r)),this.singlePC.once("error",()=>this.fallbackToMPC());try{return yield this.singlePC.initialize()}catch(r){throw this.fallbackToMPC(),new Gn({code:Tn.SPC_INITIALIZED_FAILED,message:r==null?void 0:r.message})}}})}doJoin(r,a){return new Promise((c,f)=>Ke(this,null,function*(){var m,x,S;r.privateMapKey&&(this.privateMapKey=r.privateMapKey),r.latencyLevel&&(this.latencyLevel=r.latencyLevel),this._signalChannel.once(bz,B=>{this.clearJoinTimeout(),un.emit(Gt.JOIN_SIGNAL_CONNECTION_END,{room:this,error:B}),f(B)}),Ts((x=(m=this.scheduleResult)==null?void 0:m.config)==null?void 0:x.singlePC)&&$_&&(this.enableSPC=this.scheduleResult.config.singlePC),this.keyPointManager.setConnectionType(this.singlePC?1:2);let R={roomId:String(r.roomId||r.strRoomId),useStringRoomId:this.useStringRoomId,privateMapKey:this.privateMapKey,latencyLevel:this.latencyLevel,trtcRole:r.role,trtcScene:this.scene==="live"?2:1,sdpSemantics:this.sdpSemantics,version:this._version,ua:navigator&&navigator.userAgent||"",terminalType:H$(),netType:Wx(),bussinessInfo:this._businessInfo,ability:a,sdkType:this._sdkType,userSig:this.userSig};this._log.debug("join room signal data: ".concat(JSON.stringify(R)));let A=5e3;(S=this.scheduleResult.config)!=null&&S.enterRoomTimeout&&this.scheduleResult.config.enterRoomTimeout>=1&&(A=1e3*this.scheduleResult.config.enterRoomTimeout),this._joinTimeout=window.setTimeout(()=>{f(new Gn({code:Tn.JOIN_ROOM_FAILED,message:Rr({key:Ir.JOIN_ROOM_TIMEOUT})}))},A),un.emit(Gt.JOIN_SEND_CMD,{room:this}),this._signalChannel.send(this.singlePC?Ode:yde,R),this._signalChannel.once(zr.JOIN_ROOM_RESULT,B=>{this.clearJoinTimeout();let{code:q,message:j,data:he,tinyId:xe}=B.data;un.emit(Gt.JOIN_RECEIVED_CMD_RES,{room:this,code:q}),q===0?(this._log.info("Join room success, start heartbeat"),xe&&(this.tinyId=xe),this.startHeartbeat(),this.syncUserList(),this.startSyncUserListInterval(),this._firstPublishedList=he.publishers,this.singlePC&&this.singlePC.connect(he.ability).catch(()=>{}),c()):(this._log.error("Join room failed result: ".concat(q," error: ").concat(j)),f(new Gn({code:Tn.JOIN_ROOM_FAILED,extraCode:q,message:Rr({key:Ir.JOIN_ROOM_FAILED,data:{error:j,code:q}})})))})}))}reJoin(){let r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Ke(this,null,function*(){if(this.isJoined)try{this._log.warn("reJoin pending: ".concat(this.joinParams.roomId));let a,c=[];if(this.singlePC&&(this.singlePC.close(),this.singlePC=null,c.push(this.initSinglePC().then(f=>(a=f,f)))),this._signalChannel&&(this._signalChannel.race=r,this._signalChannel.close(),c.push(this._signalChannel.connect())),yield Promise.all(c),yield this.doJoin($r(Jn({},this.joinParams),{role:this.role==="anchor"?20:21,privateMapKey:this.privateMapKey,latencyLevel:this.latencyLevel}),a),this._log.warn("reJoin success"),ao.logSuccessEvent({userId:this.userId,eventType:Au.REJOIN}),this.singlePC){let f=m=>{var x;m.state==="CONNECTED"&&((x=this.singlePC)==null||x.off(H0.CONNECTION_STATE_CHANGED,f),this.uplinkConnection instanceof ON&&(this.uplinkConnection.installEvents(),this.uplinkConnection.onSinglePCReconnected()),this.remotePublishedUserMap.forEach(S=>{S.installEvents(),S.onSinglePCReconnected()}))};this.singlePC.on(H0.CONNECTION_STATE_CHANGED,f),this.checkConnectionsToReconnect(),this.uplinkConnection instanceof DN&&!this.uplinkConnection.getIsReconnecting()&&this.uplinkConnection.startReconnection()}}catch(a){this._log.warn("reJoin fail ".concat(a)),this.reset(),ao.logFailedEvent({userId:this.userId,eventType:Au.REJOIN,error:a}),this.emit("error",new Gn({code:Tn.JOIN_ROOM_FAILED,message:Rr({key:Ir.REJOIN_ROOM_FAILED,data:{roomId:this.joinParams.roomId}})}))}else this._log.warn("reJoin abort")})}initialize(){return Ke(this,null,function*(){let r,{mainUrl:a,backupUrl:c}=this.getSignalChannelUrl(),f=this._signalChannel||function(x){return[...gE.values()].find(R=>R.room.userId===x&&!R.room.isJoined)||null}(this.userId),m=!!(f&&f.isConnected&&f.keepAlive);return Array.isArray(this.scheduleResult.domains)&&this.scheduleResult.domains.length>0&&(r=this.scheduleResult.domains[0]),this._log.info("".concat(m?"reuse":"setup"," signal channel")),m?(f.url=a,f.backupUrl=c,f.room=this,this._signalChannel=f):(this._signalChannel=new Tz({sdkAppId:this.sdkAppId,userId:this.userId,userSig:this.userSig,url:a,backupUrl:c,race:this.enableSPC&&!this.proxy_ws,room:this,signalDomainWhenUnifiedProxy:this.proxy_unified?r:void 0}),this._customMessageManager=new Wz(this,this._signalChannel),this._customMessageManager.on("message",x=>{this.emit("custom-message",x)})),this._networkQuality||(this._networkQuality=new NN({signalChannel:this._signalChannel,room:this}),this._networkQuality.on(NN.EVENT_NETWORK_QUALITY,x=>{this.emit("network-quality",x)})),Ml(this,this._signalChannel).add(wN,x=>{un.emit(Gt.SIGNAL_CONNECTION_STATE_CHANGED,Jn({room:this},x)),this.emit("signal-connection-state-changed",x)}).add(vde,x=>{this.reset(),this.emit("error",x)}).add(zr.PEER_JOIN,x=>{let{srcTinyId:S,userId:R,role:A}=x.data.data;this.userManager.addUser({userId:R,tinyId:S,role:A})}).add(zr.PEER_LEAVE,x=>{let{userId:S,reason:R=0}=x.data.data;this.userManager.deleteUser(S,R)}).add(zr.UPDATE_REMOTE_MUTE_STAT,x=>{this._lastHeartBeatTime>0&&Date.now()-this._lastHeartBeatTime>=1e4&&this.doHeartbeat(),this.onPublishedUserList(x.data)}).add(zr.CLIENT_BANNED,x=>{let S=x.data.data,{reason:R}=S;if(ao.uploadEvent({log:"stat-banned:".concat(R),userId:this.userId}),R==="user_time_out")return this._log.warn("".concat(R," last heart beat time: ").concat(this._lastHeartBeatTime," interval: ").concat(Date.now()-this._lastHeartBeatTime,", visibility: ").concat(document.visibilityState)),void this.reJoin();this._log[R==="kick"?"error":"info"]("user was banned because of [".concat(R,"]")),this.reset(),this.emit("banned",{reason:R})}),this._signalChannel.once(yz,x=>{this.tinyId=x.signalInfo.tinyId,un.emit(Gt.JOIN_SIGNAL_CONNECTION_END,{room:this})}),un.emit(Gt.JOIN_SIGNAL_CONNECTION_START,{room:this}),yield this._signalChannel.connect(),m&&un.emit(Gt.JOIN_SIGNAL_CONNECTION_END,{room:this}),m})}setSignalChannel(r){this._signalChannel=r,r||Fa(this)}leave(){return Ke(this,null,function*(){var r;try{yield this.doHeartbeat()}catch{}this._log.info("leave() => leaving room"),un.emit(Gt.LEAVE_SEND_CMD,{room:this}),(r=this._signalChannel)==null||r.send(bde)})}clearNetworkQuality(){this._networkQuality&&(this._networkQuality.stop(),this._networkQuality=null)}closeConnections(){this.remotePublishedUserMap.forEach(r=>{this.closeDownLinkConnection(r.userId,"you exitRoom")})}clearJoinTimeout(){clearTimeout(this._joinTimeout),this._joinTimeout=-1}startHeartbeat(){this._heartbeat===-1&&(this._heartbeat=vo.run(y_,this.doHeartbeat.bind(this),{delay:2e3}))}stopHeartbeat(){this._heartbeat!==-1&&(this._log.info("stopHeartbeat"),vo.clearTask(this._heartbeat),this._heartbeat=-1,this._lastHeartBeatTime=-1)}doHeartbeat(){return Ke(this,null,function*(){var r;let a=this.badCaseDetector.getMonitorFreeze(),c=yield this._stats.getStatsReport({uplinkConnection:this.uplinkConnection,downlinkConnections:this.remotePublishedUserMap,freezeMap:a});if(this.badCaseDetector.resetMonitor(),(r=this._signalChannel)==null||!r.isConnected)return;let f=this._signalChannel.isConnected?function(S){if(Nv.has(S)){let R=Nv.get(S).map(A=>({uint32_event_id:A.eventId,uint64_date:A.timestamp,str_userid:A.remoteUserId,uint32_param1:A.param1,uint32_param2:A.param2,uint32_video_stream_type:A.streamType}));return Nv.delete(S),R}return[]}(this.userId):[],m=$r(Jn({str_sdk_version:GD,uint64_datetime:new Date().getTime(),msg_user_info:{str_identifier:this.userId,uint64_tinyid:this.tinyId},msg_event_msg:f,str_acc_ip:this.getSignalInfo().relayIp,str_client_ip:this.getSignalInfo().clientIp},c),{msg_device_info:Jn({uint32_terminal_type:15,str_device_name:navigator.platform,str_os_version:"",uint32_net_type:Wx()},c.msg_device_info)});this.heartbeatReport=m,un.emit(Gt.HEARTBEAT_REPORT,{room:this,report:m}),this._signalChannel.send(xde,m),this.emit("heartbeat-report",$r(Jn({},m),{bytes_sent:this._stats.totalBytesSent+this._signalChannel.bytesSent,bytes_received:this._stats.totalBytesReceived+this._signalChannel.bytesReceived}));let x=Date.now();this._lastHeartBeatTime>0&&x-this._lastHeartBeatTime>1e4&&this._log.warn("heartbeat took ".concat(x-this._lastHeartBeatTime)),this._signalChannel.isConnected&&(this._lastHeartBeatTime=x),!this._isRelayChanged&&this.isRelayMaybeFailed()&&(this.reJoin(),this._isRelayChanged=!0)})}onPublishedUserList(r){if(!this.isJoined)return;let a=r.data.userList.map(c=>{let{userId:f,srcTinyId:m,flag:x}=c;f===this.userId&&this.uplinkConnection&&(this.uplinkConnection.flag=x);let S=this.remotePublishedUserMap.get(f);return S&&this.checkSubscribeBigSmallVideo(S),{userId:f,tinyId:m,flag:x}});un.emit(Gt.RECEIVED_PUBLISHED_USER_LIST,{room:this,publishedUserList:a}),this.userManager.setRemotePublishedUserList(a)}closeUplink(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"you unpublished";this.uplinkConnection&&(this.localTracks.size>0&&this.uplinkConnection.doUnpublish(),this.uplinkConnection.close(r),this.uplinkConnection=null),this.localTracks.forEach(a=>a.unpublish()),this.localTracks.clear()}createDownlinkConnection(r){let{userId:a,tinyId:c,flag:f}=r,m=new(this.singlePC?ufe:Dz)({userId:a,tinyId:c,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,flag:f});this.userManager.addRemotePublishedUser(m),this.installDownlinkEvents(m,a),this.emit("remote-published",m)}closeDownLinkConnection(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"remote user unpublished",c=this.remotePublishedUserMap.get(r);c&&(c.close(a),this.emit("remote-unpublished",c))}installDownlinkEvents(r,a){r.on("error",c=>{let f=c.getCode();f!==Tn.ICE_TRANSPORT_ERROR&&(f===Tn.DOWNLINK_RECONNECTION_FAILED&&this.closeDownLinkConnection(a),this.emit("error",c))}),r.on("connection-state-changed",c=>{this.emit("media-connection-state-changed",$r(Jn({},c),{userId:r.userId}))}),r.on("firewall-restriction",()=>{this.emit("firewall-restriction")})}startSyncUserListInterval(){this._syncUserListInterval===-1&&(this._syncUserListInterval=vo.run(y_,this.syncUserList.bind(this)))}stopSyncUserListInterval(){vo.clearTask(this._syncUserListInterval),this._syncUserListInterval=-1}syncUserList(){return this.getUserList().then(r=>{this.userManager.setUserList(r)}).catch(r=>{this._log.debug("sync user list failed: ".concat(r))})}getUserList(){var r;return(r=this._signalChannel)!=null&&r.isConnected?this._signalChannel.sendWaitForResponse({command:Dde,responseCommand:zr.USER_LIST_RES,enableLog:!1,timeout:2e3}).then(a=>{let{data:c}=a,{code:f,message:m}=c;if(f===0)return(c.data&&c.data.userList||[]).map(x=>{let{userId:S,srcTinyId:R,role:A}=x;return{userId:S,tinyId:R,role:A}});throw Rr({key:Ir.SIGNAL_RESPONSE_FAILED,data:{signalResponse:zr.USER_LIST_RES,code:f,message:m}})}):Promise.reject("not connected")}getAllConnections(){let r=[...this.remotePublishedUserMap.values()];return this.uplinkConnection&&r.push(this.uplinkConnection),r}isRelayMaybeFailed(){if(this._signalChannel&&!this._signalChannel.isOnline||!Iz)return!1;if(this.singlePC)return this.singlePC.reconnectionCount>6;let r=this.getAllConnections();if(r.length===0)return!1;for(let a=0;a<r.length;a++)if(r[a].getReconnectionCount()<6)return!1;return!0}checkConnectionsToReconnect(){var r;this.singlePC?((r=this.singlePC.getPeerConnection())==null?void 0:r.connectionState)===wo.CLOSED&&!this.singlePC.isReconnecting&&(this._log.warn("spc pc is closed but not reconnect"),this.singlePC.startReconnection()):this.getAllConnections().forEach(a=>{if(a instanceof U0&&!a.getIsReconnecting()){let c=a.getPeerConnection();c&&c.connectionState===wo.CLOSED&&(this._log.warn("[".concat(a.getUserId(),"] pc is closed but not reconnect")),a.startReconnection())}})}fallbackToMPC(){return Ke(this,null,function*(){var r;if(this._log.warn("fallback to multi pc"),ao.uploadEvent({log:"stat-fallback",userId:this.userId}),this.enableSPC=!1,(r=this.singlePC)==null||r.close(),this.singlePC=null,this.isJoined&&(yield this.reJoin(!1)),this.uplinkConnection){let a=this.uplinkConnection;this.uplinkConnection=new DN({userId:this.userId,tinyId:this.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,audioManager:this.audioManager}),a.isMainStreamPublished&&(yield this.uplinkConnection.publish({localAudioTrack:a.localMainAudioTrack,localVideoTrack:a.localMainVideoTrack,isAuxiliary:!1})),a.isAuxStreamPublished&&(yield this.uplinkConnection.publish({localAudioTrack:a.localAuxAudioTrack,localVideoTrack:a.localAuxVideoTrack,isAuxiliary:!0})),a.close()}this.remotePublishedUserMap.forEach(a=>{let c=new Dz({userId:a.userId,tinyId:a.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,flag:a.flag,remoteAudioTrack:a.remoteAudioTrack,remoteVideoTrack:a.remoteVideoTrack,remoteAuxiliaryTrack:a.remoteAuxiliaryTrack});this.installDownlinkEvents(c,a.userId),this.remotePublishedUserMap.set(a.userId,c),a.isMainStreamSubscribed&&c.subscribe(a.subscribeState,"main"),a.isAuxStreamSubscribed&&c.subscribe(a.subscribeState,"auxiliary")})})}destroy(){this.isDestroyed||(this._signalChannel&&(this._log.info("destroying SignalChannel"),this._signalChannel.close(),this._signalChannel=null),super.destroy(),this._joinReject&&(this._joinReject(new Gn({code:Tn.INVALID_OPERATION,message:Rr({key:Ir.CLIENT_DESTROYED,data:{funName:"join"}})})),this.clearJoinTimeout(),this.reset()),this.removeAllListeners())}switchRole(r){return Ke(this,null,function*(){this.role!==r&&(r==="audience"&&this.uplinkConnection&&this.closeUplink("you switch role to audience"),yield this.doSwitchRole(r))})}doSwitchRole(r){let a={command:Nde,data:{role:r==="anchor"?20:21,privateMapKey:this.privateMapKey,latencyLevel:this.latencyLevel},responseCommand:zr.SWITCH_ROLE_RES,retries:1};return this._log.info("switchRole signal data: ".concat(JSON.stringify(a.data))),this._signalChannel.sendWaitForResponseWithRetry(a).then(c=>{let{code:f,message:m}=c.data;if(f!==0)throw new Gn({code:Tn.SWITCH_ROLE_FAILED,message:Rr({key:Ir.SWITCH_ROLE_FAILED,data:{message:m,code:f}})});this.role=r}).catch(c=>{throw c instanceof Gn&&c.getCode()===Tn.API_CALL_TIMEOUT&&(c=new Gn({code:Tn.SWITCH_ROLE_FAILED,message:Rr({key:Ir.SWITCH_ROLE_TIMEOUT})})),this._log.error(c),c})}publish(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){let f={},m={};a.forEach(A=>{A instanceof Lu&&(A instanceof Y_?m.audio=A:f.audio=A),A instanceof Is&&(A instanceof V0&&A.mediaType===2?m.video=A:f.video=A)});let x=s4(f),S=s4(m);(!x||!S)&&!this.uplinkConnection&&(this.singlePC?this.uplinkConnection=new ON({userId:this.userId,tinyId:this.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,audioManager:this.audioManager}):this.uplinkConnection=new DN({userId:this.userId,tinyId:this.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,audioManager:this.audioManager}),this.uplinkConnection.on("connection-state-changed",A=>{this.emit("media-connection-state-changed",$r(Jn({},A),{userId:this.userId}))}),this.uplinkConnection.on("firewall-restriction",()=>{this.emit("firewall-restriction")}),this.uplinkConnection.on("error",A=>{let B=A.getCode();B!==Tn.ICE_TRANSPORT_ERROR&&(B===Tn.UPLINK_RECONNECTION_FAILED&&this.closeUplink(),this.emit("error",A))}));let R=a.map(A=>A.kind).join(",");x||(this._log.info("publish() => main ".concat(R)),yield this.uplinkConnection.publish({localAudioTrack:f.audio,localVideoTrack:f.video,isAuxiliary:!1}),this._log.info("main is published")),S||(this._log.info("publish() => aux ".concat(R)),yield this.uplinkConnection.publish({localAudioTrack:m.audio,localVideoTrack:m.video,isAuxiliary:!0}),this._log.info("aux is published"))})}unpublish(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){if(this.scene==="live"&&this.role!=="anchor"||!this.isMainStreamPublished&&!this.isAuxStreamPublished||!this.uplinkConnection)return;let f={},m={};a.forEach(x=>{!x.mediaTrack||!x.isPublished||(x instanceof Lu&&(x instanceof Y_?m.audio=x:f.audio=x),x instanceof Is&&(x instanceof V0&&x.mediaType===2?m.video=x:f.video=x))});try{let x=a.map(S=>S.kind).join(",");s4(f)||(this._log.info("unpublish() => main ".concat(x)),yield this.uplinkConnection.unpublish({localAudioTrack:f.audio,localVideoTrack:f.video})),s4(m)||(this._log.info("unpublish() => aux ".concat(x)),yield this.uplinkConnection.unpublish({localAudioTrack:m.audio,localVideoTrack:m.video}))}catch{}this.localTracks.size===0&&this.closeUplink("you unpublished")})}addTrack(r){if(!this.uplinkConnection||!r.mediaTrack)return Promise.resolve();let a=this.uplinkConnection.addTrack(r);return r.publish(this,a),a}removeTrack(r){return this.uplinkConnection&&r.mediaTrack?this.uplinkConnection.removeTrack(r).then(a=>(r.unpublish(),a)):Promise.resolve()}replaceTrack(r){return this.uplinkConnection&&r.mediaTrack&&vU()?this.uplinkConnection.replaceTrack(r).then(a=>{a&&un.emit(Gt.LOCAL_TRACK_REPLACED,{track:r})}):Promise.resolve()}setBandWidth(r){return Ke(this,null,function*(){!this.uplinkConnection||(yield this.uplinkConnection.setBandwidth(r),yield this.uplinkConnection.sendMediaSettings())})}enableSmall(r){return Ke(this,null,function*(){if(!this.uplinkConnection||!this.uplinkConnection.localMainVideoTrack)return Promise.resolve();r&&this.uplinkConnection.localMainVideoTrack.small&&(yield this.setBandWidth({type:Re.VIDEO,videoType:Re.SMALL,bandwidth:this.uplinkConnection.localMainVideoTrack.small.bitrate})),yield this.uplinkConnection.enableSmall(r)})}subscribe(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){if(a=a.filter(S=>!S.isSubscribed),a.length===0)return;let{userId:f}=a[0],m=this.remotePublishedUserMap.get(f);if(!m)return;let x=a.find(S=>S.mediaType===2)?"auxiliary":"main";try{let S=Jn({},m.subscribeState);a.forEach(A=>{switch(A.mediaType){case 1:S.audio=!0;break;case 4:S.video=!0;break;case 8:S.smallVideo=!0;break;case 2:S.auxiliary=!0}});let R=this._changeBigSmallRecords.get(f);R&&R.options.smallVideo&&m.muteState.hasSmall&&S.video&&(S.video=!1,S.smallVideo=!0),un.emit(Gt.SUBSCRIBE_START,{room:this,streamType:x,remotePublishedUser:m,subscribeState:S}),this._log.info("subscribe() => ".concat(f," ").concat(x," [").concat(IN(S),"] prev: [").concat(IN(m.subscribeState),"]")),yield m.subscribe(S,x),this._log.info("subscribe ".concat(f," ").concat(x," done"));for(let A of a)A.mediaTrack||(yield A.waitHasMediaTrack());un.emit(Gt.SUBSCRIBE_SUCCESS,{room:this,streamType:x,remotePublishedUser:m})}catch(S){let R=S instanceof Gn?S.getCode():Tn.UNKNOWN,A=S;throw S instanceof Gn?R===Tn.REMOTE_STREAM_NOT_EXIST&&(A=new Gn({code:Tn.API_CALL_ABORTED,message:Rr({key:Ir.API_CALL_ABORTED,data:{message:S.message,userId:f,streamType:x}})}),this._log.warn(A)):(A=new Gn({code:R,message:Rr({key:Ir.SUBSCRIBE_FAILED,data:{message:S.message,userId:f,streamType:x}})}),this._log.error(A)),A}})}unsubscribe(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){let{userId:f}=a[0],m=this.remotePublishedUserMap.get(f);if(!m)return;let x=a.find(S=>S.mediaType===2)?"auxiliary":"main";this._log.info("unsubscribe() => ".concat(f," ").concat(x));try{yield m.unsubscribe({remoteTracks:a,streamType:x})}catch(S){this._log.warn("unsubscribe() => failed ".concat(S))}a.forEach(S=>{S.unsubscribe(),S.mediaType===8&&S.setMediaType(4)}),un.emit(Gt.UNSUBSCRIBE_SUCCESS,{room:this,streamType:x,remotePublishedUser:m})})}setEncodedDataProcessingListener(r){throw new Error("Method not implemented.")}enableAudioVolumeEvaluation(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:2e3,a=arguments.length>1?arguments[1]:void 0;if(r<=0)return this._enableAudioVolumeEvaluation=!1,void vo.clearTask(this._audioVolumeIntervalId);r=Math.floor(Math.max(r,100)),un.emit(Gt.AUDIO_LEVEL_INTERVAL,{interval:r}),this._audioVolumeIntervalId&&vo.clearTask(this._audioVolumeIntervalId),this._enableAudioVolumeEvaluation=!0,this._audioVolumeIntervalId=vo.run(o9,()=>{var c;let f=[];(c=this.remotePublishedUserMap)==null||c.forEach(m=>{if(m.muteState.hasAudio){let x=Math.floor(100*m.remoteAudioTrack.getAudioLevel());f.push({userId:m.userId,volume:x})}}),this.emit("audio-volume",f)},{fps:1e3/r,backgroundTask:a})}getLocalAudioStats(){return Ke(this,null,function*(){let r={};if(r[this.userId]={bytesSent:0,packetsSent:0},this.uplinkConnection){let a=yield this._stats.getSenderStats(this.uplinkConnection);r[this.userId]={bytesSent:a.audio.bytesSent,packetsSent:a.audio.packetsSent}}return r})}getLocalVideoStats(){return Ke(this,null,function*(){let r={};if(r[this.userId]={bytesSent:0,packetsSent:0,framesEncoded:0,framesSent:0,frameWidth:0,frameHeight:0},this.uplinkConnection){let{video:{bytesSent:a,packetsSent:c,framesEncoded:f,framesSent:m,frameWidth:x,frameHeight:S}}=yield this._stats.getSenderStats(this.uplinkConnection);r[this.userId]={bytesSent:a,packetsSent:c,framesEncoded:f,framesSent:m,frameWidth:x,frameHeight:S}}return r})}getTransportStats(){return Ke(this,null,function*(){let r={rtt:0,downlinksRTT:{}};if(this.uplinkConnection){let a=yield this._stats.getSenderStats(this.uplinkConnection);r.rtt=a.rtt}for(let[,a]of this.remotePublishedUserMap){let c=yield this._stats.getReceiverStats(a);r.downlinksRTT[c.userId]=c.rtt}return r})}getRemoteVideoStats(r){return Ke(this,null,function*(){let a={};for(let[c,f]of this.remotePublishedUserMap)r==="main"&&f.muteState.hasVideo&&(a[c]=f.remoteVideoTrack.stat),r==="auxiliary"&&f.muteState.hasAuxiliary&&(a[c]=f.remoteAuxiliaryTrack.stat);return a})}getRemoteAudioStats(){return Ke(this,null,function*(){let r={};for(let[a,c]of this.remotePublishedUserMap)c.muteState.hasAudio&&(r[a]=c.remoteAudioTrack.stat);return r})}setTurnServer(r,a){this._log.info("set turn server: ".concat(JSON.stringify(r)," ").concat(a||""));let c=[];Array.isArray(r)?r.forEach(f=>c.push(gc.getTurnServer(f))):gc.isPlainObject(r)&&c.push(gc.getTurnServer(r)),this._turnServers=c,a&&(this._iceTransportPolicy=a)}sendStartMixTranscode(r){return this._signalChannel.sendWaitForResponse({command:kde,data:r,timeout:5e3,responseCommand:zr.START_MIX_TRANSCODE_RES,commandDesc:"startMixTranscode"})}sendStopMixTranscode(r){return this._signalChannel.sendWaitForResponse({command:Ade,data:r,timeout:5e3,responseCommand:zr.STOP_MIX_TRANSCODE_RES,commandDesc:"stopMixTranscode"})}sendStartPublishCDN(r){let a=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._signalChannel.sendWaitForResponse({command:a?Sde:Tde,data:r,timeout:5e3,responseCommand:a?zr.START_PUBLISH_TENCENT_CDN_RES:zr.START_PUBLISH_GIVEN_CDN_RES,commandDesc:"startPublishCDN"})}sendStopPublishCDN(r){let a=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._signalChannel.sendWaitForResponse({command:a?Cde:Ide,data:r,timeout:5e3,responseCommand:a?zr.STOP_PUBLISH_TENCENT_CDN_RES:zr.STOP_PUBLISH_GIVEN_CDN_RES,commandDesc:"stopPublishCDN"})}sendAbilityStatus(r){var a;(a=this._signalChannel)==null||a.sendWaitForResponse({command:Vde,data:r,timeout:5e3,responseCommand:zr.ABILITY_STATUS_REPORT_RESULT,commandDesc:"ability status report"}).catch(c=>{})}getIceServers(){return this._turnServers.length===0&&this.scheduleResult.iceServers?this.scheduleResult.iceServers:this._turnServers}getIceTransportPolicy(){return this._iceTransportPolicy||this.scheduleResult.iceTransportPolicy||"all"}getLogger(){return this._log}enableAIVoice(){throw new Error("Method not implemented.")}getSignalChannelUrl(){let r={mainUrl:"",backupUrl:""},a=gc.getEnv();return a?(r.mainUrl="wss://".concat(a,".rtc.qq.com"),r.backupUrl=r.mainUrl):this.proxy_ws?(r.mainUrl=this.proxy_ws,r.backupUrl=r.mainUrl):this.proxy_unified?(r.mainUrl="wss://".concat(this.proxy_unified),r.backupUrl=r.mainUrl):Array.isArray(this.scheduleResult.domains)&&this.scheduleResult.domains.length>0&&(r.mainUrl="wss://".concat(this.scheduleResult.domains[0]),r.backupUrl=r.mainUrl,this.scheduleResult.domains[1]&&(r.backupUrl="wss://".concat(this.scheduleResult.domains[1]))),r}getSignalInfo(){var r;return((r=this._signalChannel)==null?void 0:r.getSignalInfo())||{clientIp:"",relayIp:""}}reset(){let r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.stopSyncUserListInterval(),this.stopHeartbeat(),this.closeConnections(),this.clearNetworkQuality(),this.closeUplink("you exitRoom"),this._signalChannel&&(r&&this._signalChannel.keepAlive&&this._signalChannel.isConnected?this._signalChannel.stopKeepAliveIn(3600):this._signalChannel.close(),this.setSignalChannel(null)),this._stats.reset(),this.userManager.clear(),this.userManager.removeAllListeners(),this.singlePC&&(this.singlePC.close(),this.singlePC=null),this.scheduleResult={domains:null,iceServers:null,iceTransportPolicy:null,trtcAutoConf:null}}checkSubscribeBigSmallVideo(r){return Ke(this,null,function*(){let{subscribeState:a,userId:c,muteState:{hasSmall:f,hasVideo:m}}=r;if(!f&&!m||!a.video&&!a.smallVideo)return;let x=this._changeBigSmallRecords.get(c);if(!x||x.isSubscribing||x.reSubscribeCount<=0)return;let{options:S,reSubscribeCount:R}=x;if(S.video&&a.video||S.smallVideo&&a.smallVideo&&f)return;let A={audio:r.remoteAudioTrack.isSubscribed||r.remoteAudioTrack.isSubscribing,auxiliary:r.remoteAuxiliaryTrack.isSubscribed||r.remoteAuxiliaryTrack.isSubscribing,video:S.video,smallVideo:S.smallVideo};try{if(!f&&A.smallVideo&&(A.video=!0,A.smallVideo=!1),A.smallVideo===a.smallVideo&&A.video===a.video)return;x.isSubscribing=!0,x.reSubscribeCount=R-1,yield r.subscribe(A,"main"),r.remoteVideoTrack.setMediaType(A.smallVideo?8:4),this._log.info("change [".concat(c,"] to ").concat(A.smallVideo?"small":"big"," video successfully. count ").concat(g_-x.reSubscribeCount,".")),x.isSubscribing=!1,x.reSubscribeCount=g_}catch{this._log.info("change [".concat(c,"] to ").concat(A.smallVideo?"small":"big"," video failed. count ").concat(g_-x.reSubscribeCount,".")),x.isSubscribing=!1,x.reSubscribeCount===0&&this._changeBigSmallRecords.delete(c)}})}changeType(r,a){let c={options:{video:!r,smallVideo:r},isSubscribing:!1,reSubscribeCount:g_};this._changeBigSmallRecords.set(a.userId,c),this._log.info("set [".concat(a.userId,"] video prefer type: ").concat(r?"small":"big"))}get smallStreamConfig(){return this._smallStreamConfig}_initBusinessInfo(r){this._businessInfo=r.businessInfo;let a={};if(Gz(r.businessInfo)&&(a=JSON.parse(r.businessInfo)),!Bv(r.pureAudioPushMode)){if(!Number.isInteger(Number(r.pureAudioPushMode)))throw new Gn({code:Tn.INVALID_PARAMETER,message:Rr({key:Ir.INVALID_PURE_AUDIO})});this._pureAudioPushMode=r.pureAudioPushMode,a.Str_uc_params||(a.Str_uc_params={}),a.Str_uc_params.pure_audio_push_mod=this._pureAudioPushMode}if(!Bv(r.userDefineRecordId)){let c=/^[A-Za-z0-9_-]{1,64}$/gi;if(r.userDefineRecordId.match(c)===null)throw new Gn({code:Tn.INVALID_PARAMETER,message:Rr({key:Ir.INVALID_USER_DEFINE_RECORDID})});a.Str_uc_params||(a.Str_uc_params={}),a.Str_uc_params.userdefine_record_id=r.userDefineRecordId}if(!Bv(r.userDefinePushArgs)){if(!(Gz(r.userDefinePushArgs)&&String(r.userDefinePushArgs)&&String(r.userDefinePushArgs).length<=256))throw new Gn({code:Tn.INVALID_PARAMETER,message:Rr({key:Ir.INVALID_USER_DEFINE_PUSH_ARGS})});a.Str_uc_params||(a.Str_uc_params={}),a.Str_uc_params.userdefine_push_args=r.userDefinePushArgs}s4(a)||(this._businessInfo=JSON.stringify(a))}sendSEI(r,a){var c,f;this.uplinkConnection instanceof ON&&(a!=null&&a.toSubStream?(c=this.uplinkConnection.localAuxVideoTrack)==null||c.sendSEI(r,a):(f=this.uplinkConnection.localMainVideoTrack)==null||f.sendSEI(r,a))}sendCustomMessage(r){var a;(a=this._customMessageManager)==null||a.send(r)}enableInsertableStreams(){if(this.singlePC&&!this.singlePC.enableInsertableStreams)return this.singlePC.enableInsertableStreams=!0,this.singlePC.startReconnection()}};return Ln([_z(["left",so.INIT],"joined"),O0({settings:{retries:1,timeout:0},onError(r,a,c){this._isUsingCachedSchedule&&!this.isDestroyed?(this._log.warn("is using cached schedule, retry join"),cf(!0),this.reset(),a()):this._signalChannel&&this._signalChannel.isConnected&&this._signalChannel.keepAlive?(this._log.warn("is using keepAlive ws, retry join"),this._signalChannel.close(),this.reset(),a()):(this.reset(),this._log.error(r),c(r))}}),Yi(r=>{let a=new ude;return function(c,f,m){return Ke(this,null,function*(){let x=String(c.roomId||c.strRoomId);if(this.userId=c.userId,this.sdkAppId=c.sdkAppId,this.userSig=c.userSig,this._log.setSdkAppId(this.sdkAppId),this._log.setUserId(this.userId),this.scene=f,c.privateMapKey=c.privateMapKey||"",this.isJoined)throw new Gn({code:Tn.INVALID_OPERATION,message:Rr({key:Ir.INVALID_JOIN})});if(this.checkDestroy(),a.isJoined({userId:this.userId,roomId:x,sdkAppId:this.sdkAppId,room:this}))throw new Gn({code:Tn.INVALID_OPERATION,message:Rr({key:Ir.REPEAT_JOIN,data:this.userId})});a.add({room:this,roomId:x}),this.role=c.role===21?"audience":"anchor",this._log.info("Join() => joining room: ".concat(x," useStringRoomId: ").concat(this.useStringRoomId," scene: ").concat(this.scene," role: ").concat(this.role)),un.emit(Gt.JOIN_START,{room:this,roomId:x,params:c}),this.checkSystemResult=yield L_.checkSystemRequirementsInternal(),this.checkDestroy();let S=gc.getEnv();S||(S=x0.QCLOUD,this.proxy_ws&&(this.proxy_ws.startsWith(QD.OLD_CLOUD_LADDER)?S=x0.OLD_CLOUD_LADDER:this.proxy_ws.startsWith(QD.WEBRTC)&&(S=x0.WEBRTC))),ao.setConfig({env:S,sdkAppId:String(this.sdkAppId),userId:this.userId,roomId:x}),dde.call(this);let{isH264EncodeSupported:R,isVp8EncodeSupported:A}=this.checkSystemResult.detail;if(!L_.isWebRTCSupported()||!R&&!A)throw new Gn({code:Tn.NOT_SUPPORTED,message:Rr({key:Ir.NOT_SUPPORTED_WEBRTC})});try{!this.proxy_ws&&!this.proxy_wt&&!this.scheduleResult.domains&&!gc.getEnv()&&(yield this.schedule(c,m));let B=yield r.call(this,c,f,m);return this.roomId=x,this._joinedTimestamp=gc.performanceNow(),un.emit(Gt.JOIN_SUCCESS,{room:this}),m===30&&!c.component&&ao.uploadEvent({log:"stat-conv-".concat(Number(xv),"-").concat(location.hostname),userId:this.userId}),B}catch(B){throw a.delete({room:this,roomId:x}),un.emit(Gt.JOIN_FAILED,{room:this,error:B}),B}})}})],wf.prototype,"join"),Ln([_z("joined","left",{ignoreError:!0,success(){this.reset(!0)}}),Yi(r=>function(){return Ke(this,null,function*(){un.emit(Gt.LEAVE_START,{room:this}),yield r.call(this),un.emit(Gt.LEAVE_SUCCESS,{room:this,roomId:this.roomId})})}),WU("leave room"),Zx({fnName:"publish",validateArgs:!1}),Zx({fnName:"unsubscribe",validateArgs:!1})],wf.prototype,"leave"),Ln([Av(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];return Ke(this,null,function*(){if(this.scene==="live"&&this.role!=="anchor"||(c=c.filter(x=>x.outMediaTrack&&x.state==="capture"),!c.length))return;un.emit("61",{room:this});let m=r.apply(this,c);return c.forEach(x=>x.publish(this,m)),m})}),O0({settings:{retries:gv,timeout:r=>wv(r)},onError(r,a,c){var f;(f=r.message)!=null&&f.includes("timeout")?(this._log.warn("publish timeout"),a()):(this._log.error("publish failed: ".concat(r)),c(r),un.emit(Gt.PUBLISH_FAILED,{room:this}))}})],wf.prototype,"publish"),Ln([Zx({fnName:"publish"}),(jz="api-call",function(r,a,c){let f=c.value;return c.value=function(){for(var m=arguments.length,x=new Array(m),S=0;S<m;S++)x[S]=arguments[S];let R=G_.get(this);if(R){let A=R.queue.filter((B,q)=>{if(q===0)return!0;let j=!0;return B.args.forEach(he=>{x.find(xe=>xe===he)||(j=!1)}),!j||(B.reject(new Gn({code:Tn.API_CALL_ABORTED,message:jz})),!1)});R.queue=A}return f.apply(this,x)},c}),Av(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];let m=r.apply(this,c);return c.forEach(x=>x.unpublish()),m}),hN(function(){var r,a;!this.uplinkConnection&&F_()&&((a=(r=this.singlePC)==null?void 0:r.getPeerConnection())==null||a.getSenders().forEach(c=>c.track&&c.replaceTrack(null)))})],wf.prototype,"unpublish"),Ln([Dv(r=>r.userId)],wf.prototype,"replaceTrack"),Ln([Dv(function(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return a[0].userId}),YU(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];let m=r.apply(this,c);return c.forEach(x=>!x.isSubscribed&&x.subscribe(m)),m}),O0({settings:{retries:gv,timeout:r=>wv(r)},onError(r,a,c,f){r.message.includes("timeout")?(this._log.warn("subscribe timeout"),a()):(this._log.error("subscribe failed: ".concat(r)),c(r),un.emit(Gt.SUBSCRIBE_FAILED,{room:this,remoteTracks:f}))}})],wf.prototype,"subscribe"),Ln([Zx({fnName:"subscribe",callback(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];this.singlePC||a.forEach(f=>{let m=this.remotePublishedUserMap.get(f.userId);m&&!m.isMainStreamSubscribed&&!m.isAuxStreamSubscribed&&m.close("you unsubscribed")})}}),Dv(function(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return a[0].userId})],wf.prototype,"unsubscribe"),mE.create=mE._create.bind(mE,wf),mE})})(are);var KZe=are.exports;const Yn=fh(KZe);var sre=(e=>(e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.NONE=5]="NONE",e))(sre||{}),cV=(e=>(e.USER_HANGINGUP="user-hanging-up",e))(cV||{}),Wg=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},Lc=[],tl=[],XZe=typeof Uint8Array<"u"?Uint8Array:Array,uV=!1;function lre(){uV=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)Lc[t]=e[t],tl[e.charCodeAt(t)]=t;tl[45]=62,tl[95]=63}function JZe(e,t,n){for(var o,s,l=[],u=t;u<n;u+=3)o=(e[u]<<16)+(e[u+1]<<8)+e[u+2],l.push(Lc[(s=o)>>18&63]+Lc[s>>12&63]+Lc[s>>6&63]+Lc[63&s]);return l.join("")}function Mq(e){var t;uV||lre();for(var n=e.length,o=n%3,s="",l=[],u=0,d=n-o;u<d;u+=16383)l.push(JZe(e,u,u+16383>d?d:u+16383));return o===1?(t=e[n-1],s+=Lc[t>>2],s+=Lc[t<<4&63],s+="=="):o===2&&(t=(e[n-2]<<8)+e[n-1],s+=Lc[t>>10],s+=Lc[t>>4&63],s+=Lc[t<<2&63],s+="="),l.push(s),l.join("")}function ZE(e,t,n,o,s){var l,u,d=8*s-o-1,p=(1<<d)-1,h=p>>1,v=-7,_=n?s-1:0,y=n?-1:1,b=e[t+_];for(_+=y,l=b&(1<<-v)-1,b>>=-v,v+=d;v>0;l=256*l+e[t+_],_+=y,v-=8);for(u=l&(1<<-v)-1,l>>=-v,v+=o;v>0;u=256*u+e[t+_],_+=y,v-=8);if(l===0)l=1-h;else{if(l===p)return u?NaN:1/0*(b?-1:1);u+=Math.pow(2,o),l-=h}return(b?-1:1)*u*Math.pow(2,l-o)}function cre(e,t,n,o,s,l){var u,d,p,h=8*l-s-1,v=(1<<h)-1,_=v>>1,y=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:l-1,w=o?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,u=v):(u=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-u))<1&&(u--,p*=2),(t+=u+_>=1?y/p:y*Math.pow(2,1-_))*p>=2&&(u++,p/=2),u+_>=v?(d=0,u=v):u+_>=1?(d=(t*p-1)*Math.pow(2,s),u+=_):(d=t*Math.pow(2,_-1)*Math.pow(2,s),u=0));s>=8;e[n+b]=255&d,b+=w,d/=256,s-=8);for(u=u<<s|d,h+=s;h>0;e[n+b]=255&u,b+=w,u/=256,h-=8);e[n+b-w]|=128*C}var ZZe={}.toString,ure=Array.isArray||function(e){return ZZe.call(e)=="[object Array]"};function qM(){return Lt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ad(e,t){if(qM()<t)throw new RangeError("Invalid typed array length");return Lt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Lt.prototype:(e===null&&(e=new Lt(t)),e.length=t),e}function Lt(e,t,n){if(!(Lt.TYPED_ARRAY_SUPPORT||this instanceof Lt))return new Lt(e,t,n);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return YM(this,e)}return dre(this,e,t,n)}function dre(e,t,n,o){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?function(s,l,u,d){if(l.byteLength,u<0||l.byteLength<u)throw new RangeError("'offset' is out of bounds");if(l.byteLength<u+(d||0))throw new RangeError("'length' is out of bounds");return l=u===void 0&&d===void 0?new Uint8Array(l):d===void 0?new Uint8Array(l,u):new Uint8Array(l,u,d),Lt.TYPED_ARRAY_SUPPORT?(s=l).__proto__=Lt.prototype:s=IO(s,l),s}(e,t,n,o):typeof t=="string"?function(s,l,u){if(typeof u=="string"&&u!==""||(u="utf8"),!Lt.isEncoding(u))throw new TypeError('"encoding" must be a valid string encoding');var d=0|hre(l,u),p=(s=ad(s,d)).write(l,u);return p!==d&&(s=s.slice(0,p)),s}(e,t,n):function(s,l){if(Bc(l)){var u=0|dV(l.length);return(s=ad(s,u)).length===0||l.copy(s,0,0,u),s}if(l){if(typeof ArrayBuffer<"u"&&l.buffer instanceof ArrayBuffer||"length"in l)return typeof l.length!="number"||(d=l.length)!=d?ad(s,0):IO(s,l);if(l.type==="Buffer"&&ure(l.data))return IO(s,l.data)}var d;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function fre(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function YM(e,t){if(fre(t),e=ad(e,t<0?0:0|dV(t)),!Lt.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function IO(e,t){var n=t.length<0?0:0|dV(t.length);e=ad(e,n);for(var o=0;o<n;o+=1)e[o]=255&t[o];return e}function dV(e){if(e>=qM())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qM().toString(16)+" bytes");return 0|e}function Bc(e){return!(e==null||!e._isBuffer)}function hre(e,t){if(Bc(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Z8(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return gre(e).length;default:if(o)return Z8(e).length;t=(""+t).toLowerCase(),o=!0}}function QZe(e,t,n){var o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return lQe(this,t,n);case"utf8":case"utf-8":return mre(this,t,n);case"ascii":return aQe(this,t,n);case"latin1":case"binary":return sQe(this,t,n);case"base64":return oQe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cQe(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function Y0(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function Pq(e,t,n,o,s){if(e.length===0)return-1;if(typeof n=="string"?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if(typeof t=="string"&&(t=Lt.from(t,o)),Bc(t))return t.length===0?-1:Vq(e,t,n,o,s);if(typeof t=="number")return t&=255,Lt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Vq(e,[t],n,o,s);throw new TypeError("val must be string, number or Buffer")}function Vq(e,t,n,o,s){var l,u=1,d=e.length,p=t.length;if(o!==void 0&&((o=String(o).toLowerCase())==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return-1;u=2,d/=2,p/=2,n/=2}function h(b,w){return u===1?b[w]:b.readUInt16BE(w*u)}if(s){var v=-1;for(l=n;l<d;l++)if(h(e,l)===h(t,v===-1?0:l-v)){if(v===-1&&(v=l),l-v+1===p)return v*u}else v!==-1&&(l-=l-v),v=-1}else for(n+p>d&&(n=d-p),l=n;l>=0;l--){for(var _=!0,y=0;y<p;y++)if(h(e,l+y)!==h(t,y)){_=!1;break}if(_)return l}return-1}function eQe(e,t,n,o){n=Number(n)||0;var s=e.length-n;o?(o=Number(o))>s&&(o=s):o=s;var l=t.length;if(l%2!=0)throw new TypeError("Invalid hex string");o>l/2&&(o=l/2);for(var u=0;u<o;++u){var d=parseInt(t.substr(2*u,2),16);if(isNaN(d))return u;e[n+u]=d}return u}function tQe(e,t,n,o){return qT(Z8(t,e.length-n),e,n,o)}function pre(e,t,n,o){return qT(function(s){for(var l=[],u=0;u<s.length;++u)l.push(255&s.charCodeAt(u));return l}(t),e,n,o)}function nQe(e,t,n,o){return pre(e,t,n,o)}function rQe(e,t,n,o){return qT(gre(t),e,n,o)}function iQe(e,t,n,o){return qT(function(s,l){for(var u,d,p,h=[],v=0;v<s.length&&!((l-=2)<0);++v)u=s.charCodeAt(v),d=u>>8,p=u%256,h.push(p),h.push(d);return h}(t,e.length-n),e,n,o)}function oQe(e,t,n){return t===0&&n===e.length?Mq(e):Mq(e.slice(t,n))}function mre(e,t,n){n=Math.min(e.length,n);for(var o=[],s=t;s<n;){var l,u,d,p,h=e[s],v=null,_=h>239?4:h>223?3:h>191?2:1;if(s+_<=n)switch(_){case 1:h<128&&(v=h);break;case 2:(192&(l=e[s+1]))==128&&(p=(31&h)<<6|63&l)>127&&(v=p);break;case 3:l=e[s+1],u=e[s+2],(192&l)==128&&(192&u)==128&&(p=(15&h)<<12|(63&l)<<6|63&u)>2047&&(p<55296||p>57343)&&(v=p);break;case 4:l=e[s+1],u=e[s+2],d=e[s+3],(192&l)==128&&(192&u)==128&&(192&d)==128&&(p=(15&h)<<18|(63&l)<<12|(63&u)<<6|63&d)>65535&&p<1114112&&(v=p)}v===null?(v=65533,_=1):v>65535&&(v-=65536,o.push(v>>>10&1023|55296),v=56320|1023&v),o.push(v),s+=_}return function(y){var b=y.length;if(b<=Lq)return String.fromCharCode.apply(String,y);for(var w="",C=0;C<b;)w+=String.fromCharCode.apply(String,y.slice(C,C+=Lq));return w}(o)}Lt.TYPED_ARRAY_SUPPORT=Wg.TYPED_ARRAY_SUPPORT===void 0||Wg.TYPED_ARRAY_SUPPORT,Lt.poolSize=8192,Lt._augment=function(e){return e.__proto__=Lt.prototype,e},Lt.from=function(e,t,n){return dre(null,e,t,n)},Lt.TYPED_ARRAY_SUPPORT&&(Lt.prototype.__proto__=Uint8Array.prototype,Lt.__proto__=Uint8Array),Lt.alloc=function(e,t,n){return function(o,s,l,u){return fre(s),s<=0?ad(o,s):l!==void 0?typeof u=="string"?ad(o,s).fill(l,u):ad(o,s).fill(l):ad(o,s)}(null,e,t,n)},Lt.allocUnsafe=function(e){return YM(null,e)},Lt.allocUnsafeSlow=function(e){return YM(null,e)},Lt.isBuffer=o3,Lt.compare=function(e,t){if(!Bc(e)||!Bc(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,o=t.length,s=0,l=Math.min(n,o);s<l;++s)if(e[s]!==t[s]){n=e[s],o=t[s];break}return n<o?-1:o<n?1:0},Lt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Lt.concat=function(e,t){if(!ure(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Lt.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=Lt.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var l=e[n];if(!Bc(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,s),s+=l.length}return o},Lt.byteLength=hre,Lt.prototype._isBuffer=!0,Lt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Y0(this,t,t+1);return this},Lt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Y0(this,t,t+3),Y0(this,t+1,t+2);return this},Lt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Y0(this,t,t+7),Y0(this,t+1,t+6),Y0(this,t+2,t+5),Y0(this,t+3,t+4);return this},Lt.prototype.toString=function(){var e=0|this.length;return e===0?"":arguments.length===0?mre(this,0,e):QZe.apply(this,arguments)},Lt.prototype.equals=function(e){if(!Bc(e))throw new TypeError("Argument must be a Buffer");return this===e||Lt.compare(this,e)===0},Lt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Lt.prototype.compare=function(e,t,n,o,s){if(!Bc(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),s===void 0&&(s=this.length),t<0||n>e.length||o<0||s>this.length)throw new RangeError("out of range index");if(o>=s&&t>=n)return 0;if(o>=s)return-1;if(t>=n)return 1;if(this===e)return 0;for(var l=(s>>>=0)-(o>>>=0),u=(n>>>=0)-(t>>>=0),d=Math.min(l,u),p=this.slice(o,s),h=e.slice(t,n),v=0;v<d;++v)if(p[v]!==h[v]){l=p[v],u=h[v];break}return l<u?-1:u<l?1:0},Lt.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},Lt.prototype.indexOf=function(e,t,n){return Pq(this,e,t,n,!0)},Lt.prototype.lastIndexOf=function(e,t,n){return Pq(this,e,t,n,!1)},Lt.prototype.write=function(e,t,n,o){if(t===void 0)o="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")o=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,o===void 0&&(o="utf8")):(o=n,n=void 0)}var s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var l=!1;;)switch(o){case"hex":return eQe(this,e,t,n);case"utf8":case"utf-8":return tQe(this,e,t,n);case"ascii":return pre(this,e,t,n);case"latin1":case"binary":return nQe(this,e,t,n);case"base64":return rQe(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iQe(this,e,t,n);default:if(l)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),l=!0}},Lt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Lq=4096;function aQe(e,t,n){var o="";n=Math.min(e.length,n);for(var s=t;s<n;++s)o+=String.fromCharCode(127&e[s]);return o}function sQe(e,t,n){var o="";n=Math.min(e.length,n);for(var s=t;s<n;++s)o+=String.fromCharCode(e[s]);return o}function lQe(e,t,n){var o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);for(var s="",l=t;l<n;++l)s+=dQe(e[l]);return s}function cQe(e,t,n){for(var o=e.slice(t,n),s="",l=0;l<o.length;l+=2)s+=String.fromCharCode(o[l]+256*o[l+1]);return s}function Yo(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function is(e,t,n,o,s,l){if(!Bc(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<l)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function QE(e,t,n,o){t<0&&(t=65535+t+1);for(var s=0,l=Math.min(e.length-n,2);s<l;++s)e[n+s]=(t&255<<8*(o?s:1-s))>>>8*(o?s:1-s)}function ew(e,t,n,o){t<0&&(t=4294967295+t+1);for(var s=0,l=Math.min(e.length-n,4);s<l;++s)e[n+s]=t>>>8*(o?s:3-s)&255}function vre(e,t,n,o,s,l){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Bq(e,t,n,o,s){return s||vre(e,0,n,4),cre(e,t,n,o,23,4),n+4}function Fq(e,t,n,o,s){return s||vre(e,0,n,8),cre(e,t,n,o,52,8),n+8}Lt.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=t===void 0?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t<e&&(t=e),Lt.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=Lt.prototype;else{var s=t-e;n=new Lt(s,void 0);for(var l=0;l<s;++l)n[l]=this[l+e]}return n},Lt.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=this[e],s=1,l=0;++l<t&&(s*=256);)o+=this[e+l]*s;return o},Lt.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=this[e+--t],s=1;t>0&&(s*=256);)o+=this[e+--t]*s;return o},Lt.prototype.readUInt8=function(e,t){return t||Yo(e,1,this.length),this[e]},Lt.prototype.readUInt16LE=function(e,t){return t||Yo(e,2,this.length),this[e]|this[e+1]<<8},Lt.prototype.readUInt16BE=function(e,t){return t||Yo(e,2,this.length),this[e]<<8|this[e+1]},Lt.prototype.readUInt32LE=function(e,t){return t||Yo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Lt.prototype.readUInt32BE=function(e,t){return t||Yo(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Lt.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=this[e],s=1,l=0;++l<t&&(s*=256);)o+=this[e+l]*s;return o>=(s*=128)&&(o-=Math.pow(2,8*t)),o},Lt.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=t,s=1,l=this[e+--o];o>0&&(s*=256);)l+=this[e+--o]*s;return l>=(s*=128)&&(l-=Math.pow(2,8*t)),l},Lt.prototype.readInt8=function(e,t){return t||Yo(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Lt.prototype.readInt16LE=function(e,t){t||Yo(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Lt.prototype.readInt16BE=function(e,t){t||Yo(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Lt.prototype.readInt32LE=function(e,t){return t||Yo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Lt.prototype.readInt32BE=function(e,t){return t||Yo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Lt.prototype.readFloatLE=function(e,t){return t||Yo(e,4,this.length),ZE(this,e,!0,23,4)},Lt.prototype.readFloatBE=function(e,t){return t||Yo(e,4,this.length),ZE(this,e,!1,23,4)},Lt.prototype.readDoubleLE=function(e,t){return t||Yo(e,8,this.length),ZE(this,e,!0,52,8)},Lt.prototype.readDoubleBE=function(e,t){return t||Yo(e,8,this.length),ZE(this,e,!1,52,8)},Lt.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||is(this,e,t,n,Math.pow(2,8*n)-1,0);var s=1,l=0;for(this[t]=255&e;++l<n&&(s*=256);)this[t+l]=e/s&255;return t+n},Lt.prototype.writeUIntBE=function(e,t,n,o){e=+e,t|=0,n|=0,o||is(this,e,t,n,Math.pow(2,8*n)-1,0);var s=n-1,l=1;for(this[t+s]=255&e;--s>=0&&(l*=256);)this[t+s]=e/l&255;return t+n},Lt.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,1,255,0),Lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Lt.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,65535,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):QE(this,e,t,!0),t+2},Lt.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,65535,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):QE(this,e,t,!1),t+2},Lt.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,4294967295,0),Lt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ew(this,e,t,!0),t+4},Lt.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,4294967295,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ew(this,e,t,!1),t+4},Lt.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=Math.pow(2,8*n-1);is(this,e,t,n,s-1,-s)}var l=0,u=1,d=0;for(this[t]=255&e;++l<n&&(u*=256);)e<0&&d===0&&this[t+l-1]!==0&&(d=1),this[t+l]=(e/u>>0)-d&255;return t+n},Lt.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=Math.pow(2,8*n-1);is(this,e,t,n,s-1,-s)}var l=n-1,u=1,d=0;for(this[t+l]=255&e;--l>=0&&(u*=256);)e<0&&d===0&&this[t+l+1]!==0&&(d=1),this[t+l]=(e/u>>0)-d&255;return t+n},Lt.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,1,127,-128),Lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Lt.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,32767,-32768),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):QE(this,e,t,!0),t+2},Lt.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,32767,-32768),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):QE(this,e,t,!1),t+2},Lt.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,2147483647,-2147483648),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ew(this,e,t,!0),t+4},Lt.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ew(this,e,t,!1),t+4},Lt.prototype.writeFloatLE=function(e,t,n){return Bq(this,e,t,!0,n)},Lt.prototype.writeFloatBE=function(e,t,n){return Bq(this,e,t,!1,n)},Lt.prototype.writeDoubleLE=function(e,t,n){return Fq(this,e,t,!0,n)},Lt.prototype.writeDoubleBE=function(e,t,n){return Fq(this,e,t,!1,n)},Lt.prototype.copy=function(e,t,n,o){if(n||(n=0),o||o===0||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var s,l=o-n;if(this===e&&n<t&&t<o)for(s=l-1;s>=0;--s)e[s+t]=this[s+n];else if(l<1e3||!Lt.TYPED_ARRAY_SUPPORT)for(s=0;s<l;++s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+l),t);return l},Lt.prototype.fill=function(e,t,n,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var s=e.charCodeAt(0);s<256&&(e=s)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!Lt.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var l;if(t>>>=0,n=n===void 0?this.length:n>>>0,e||(e=0),typeof e=="number")for(l=t;l<n;++l)this[l]=e;else{var u=Bc(e)?e:Z8(new Lt(e,o).toString()),d=u.length;for(l=0;l<n-t;++l)this[l+t]=u[l%d]}return this};var uQe=/[^+\/0-9A-Za-z-_]/g;function dQe(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z8(e,t){var n;t=t||1/0;for(var o=e.length,s=null,l=[],u=0;u<o;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!s){if(n>56319){(t-=3)>-1&&l.push(239,191,189);continue}if(u+1===o){(t-=3)>-1&&l.push(239,191,189);continue}s=n;continue}if(n<56320){(t-=3)>-1&&l.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(t-=3)>-1&&l.push(239,191,189);if(s=null,n<128){if((t-=1)<0)break;l.push(n)}else if(n<2048){if((t-=2)<0)break;l.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;l.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;l.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return l}function gre(e){return function(t){var n,o,s,l,u,d;uV||lre();var p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");u=t[p-2]==="="?2:t[p-1]==="="?1:0,d=new XZe(3*p/4-u),s=u>0?p-4:p;var h=0;for(n=0,o=0;n<s;n+=4,o+=3)l=tl[t.charCodeAt(n)]<<18|tl[t.charCodeAt(n+1)]<<12|tl[t.charCodeAt(n+2)]<<6|tl[t.charCodeAt(n+3)],d[h++]=l>>16&255,d[h++]=l>>8&255,d[h++]=255&l;return u===2?(l=tl[t.charCodeAt(n)]<<2|tl[t.charCodeAt(n+1)]>>4,d[h++]=255&l):u===1&&(l=tl[t.charCodeAt(n)]<<10|tl[t.charCodeAt(n+1)]<<4|tl[t.charCodeAt(n+2)]>>2,d[h++]=l>>8&255,d[h++]=255&l),d}(function(t){if((t=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}(t).replace(uQe,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(e))}function qT(e,t,n,o){for(var s=0;s<o&&!(s+n>=t.length||s>=e.length);++s)t[s+n]=e[s];return s}function o3(e){return e!=null&&(!!e._isBuffer||$q(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&$q(t.slice(0,0))}(e))}function $q(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function li(e,t){return e(t={exports:{}},t.exports),t.exports}var hi=li(function(e,t){var n;e.exports=(n=n||function(o,s){var l=Object.create||function(){function T(){}return function(I){var D;return T.prototype=I,D=new T,T.prototype=null,D}}(),u={},d=u.lib={},p=d.Base={extend:function(T){var I=l(this);return T&&I.mixIn(T),I.hasOwnProperty("init")&&this.init!==I.init||(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var T=this.extend();return T.init.apply(T,arguments),T},init:function(){},mixIn:function(T){for(var I in T)T.hasOwnProperty(I)&&(this[I]=T[I]);T.hasOwnProperty("toString")&&(this.toString=T.toString)},clone:function(){return this.init.prototype.extend(this)}},h=d.WordArray=p.extend({init:function(T,I){T=this.words=T||[],this.sigBytes=I??4*T.length},toString:function(T){return(T||_).stringify(this)},concat:function(T){var I=this.words,D=T.words,k=this.sigBytes,O=T.sigBytes;if(this.clamp(),k%4)for(var L=0;L<O;L++){var P=D[L>>>2]>>>24-L%4*8&255;I[k+L>>>2]|=P<<24-(k+L)%4*8}else for(var L=0;L<O;L+=4)I[k+L>>>2]=D[L>>>2];return this.sigBytes+=O,this},clamp:function(){var T=this.words,I=this.sigBytes;T[I>>>2]&=4294967295<<32-I%4*8,T.length=o.ceil(I/4)},clone:function(){var T=p.clone.call(this);return T.words=this.words.slice(0),T},random:function(T){for(var I,D=[],k=function(V){var V=V,$=987654321,Y=4294967295;return function(){var F=(($=36969*(65535&$)+($>>16)&Y)<<16)+(V=18e3*(65535&V)+(V>>16)&Y)&Y;return F/=4294967296,(F+=.5)*(o.random()>.5?1:-1)}},O=0;O<T;O+=4){var L=k(4294967296*(I||o.random()));I=987654071*L(),D.push(4294967296*L()|0)}return new h.init(D,T)}}),v=u.enc={},_=v.Hex={stringify:function(T){for(var I=T.words,D=T.sigBytes,k=[],O=0;O<D;O++){var L=I[O>>>2]>>>24-O%4*8&255;k.push((L>>>4).toString(16)),k.push((15&L).toString(16))}return k.join("")},parse:function(T){for(var I=T.length,D=[],k=0;k<I;k+=2)D[k>>>3]|=parseInt(T.substr(k,2),16)<<24-k%8*4;return new h.init(D,I/2)}},y=v.Latin1={stringify:function(T){for(var I=T.words,D=T.sigBytes,k=[],O=0;O<D;O++){var L=I[O>>>2]>>>24-O%4*8&255;k.push(String.fromCharCode(L))}return k.join("")},parse:function(T){for(var I=T.length,D=[],k=0;k<I;k++)D[k>>>2]|=(255&T.charCodeAt(k))<<24-k%4*8;return new h.init(D,I)}},b=v.Utf8={stringify:function(T){try{return decodeURIComponent(escape(y.stringify(T)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(T){return y.parse(unescape(encodeURIComponent(T)))}},w=d.BufferedBlockAlgorithm=p.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(T){typeof T=="string"&&(T=b.parse(T)),this._data.concat(T),this._nDataBytes+=T.sigBytes},_process:function(T){var I=this._data,D=I.words,k=I.sigBytes,O=this.blockSize,L=4*O,P=k/L,V=(P=T?o.ceil(P):o.max((0|P)-this._minBufferSize,0))*O,$=o.min(4*V,k);if(V){for(var Y=0;Y<V;Y+=O)this._doProcessBlock(D,Y);var F=D.splice(0,V);I.sigBytes-=$}return new h.init(F,$)},clone:function(){var T=p.clone.call(this);return T._data=this._data.clone(),T},_minBufferSize:0}),C=(d.Hasher=w.extend({cfg:p.extend(),init:function(T){this.cfg=this.cfg.extend(T),this.reset()},reset:function(){w.reset.call(this),this._doReset()},update:function(T){return this._append(T),this._process(),this},finalize:function(T){T&&this._append(T);var I=this._doFinalize();return I},blockSize:16,_createHelper:function(T){return function(I,D){return new T.init(D).finalize(I)}},_createHmacHelper:function(T){return function(I,D){return new C.HMAC.init(T,D).finalize(I)}}}),u.algo={});return u}(Math),n)}),Uq=(li(function(e,t){var n,o,s,l,u,d;e.exports=(s=(o=n=hi).lib,l=s.Base,u=s.WordArray,(d=o.x64={}).Word=l.extend({init:function(p,h){this.high=p,this.low=h}}),d.WordArray=l.extend({init:function(p,h){p=this.words=p||[],this.sigBytes=h??8*p.length},toX32:function(){for(var p=this.words,h=p.length,v=[],_=0;_<h;_++){var y=p[_];v.push(y.high),v.push(y.low)}return u.create(v,this.sigBytes)},clone:function(){for(var p=l.clone.call(this),h=p.words=this.words.slice(0),v=h.length,_=0;_<v;_++)h[_]=h[_].clone();return p}}),n)}),li(function(e,t){var n;e.exports=(n=hi,function(){if(typeof ArrayBuffer=="function"){var o=n.lib.WordArray,s=o.init;(o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var u=l.byteLength,d=[],p=0;p<u;p++)d[p>>>2]|=l[p]<<24-p%4*8;s.call(this,d,u)}else s.apply(this,arguments)}).prototype=o}}(),n.lib.WordArray)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.WordArray,l=o.enc;function u(d){return d<<8&4278255360|d>>>8&16711935}l.Utf16=l.Utf16BE={stringify:function(d){for(var p=d.words,h=d.sigBytes,v=[],_=0;_<h;_+=2){var y=p[_>>>2]>>>16-_%4*8&65535;v.push(String.fromCharCode(y))}return v.join("")},parse:function(d){for(var p=d.length,h=[],v=0;v<p;v++)h[v>>>1]|=d.charCodeAt(v)<<16-v%2*16;return s.create(h,2*p)}},l.Utf16LE={stringify:function(d){for(var p=d.words,h=d.sigBytes,v=[],_=0;_<h;_+=2){var y=u(p[_>>>2]>>>16-_%4*8&65535);v.push(String.fromCharCode(y))}return v.join("")},parse:function(d){for(var p=d.length,h=[],v=0;v<p;v++)h[v>>>1]|=u(d.charCodeAt(v)<<16-v%2*16);return s.create(h,2*p)}}}(),n.enc.Utf16)}),li(function(e,t){var n,o,s;e.exports=(s=(o=n=hi).lib.WordArray,o.enc.Base64={stringify:function(l){var u=l.words,d=l.sigBytes,p=this._map;l.clamp();for(var h=[],v=0;v<d;v+=3)for(var _=(u[v>>>2]>>>24-v%4*8&255)<<16|(u[v+1>>>2]>>>24-(v+1)%4*8&255)<<8|u[v+2>>>2]>>>24-(v+2)%4*8&255,y=0;y<4&&v+.75*y<d;y++)h.push(p.charAt(_>>>6*(3-y)&63));var b=p.charAt(64);if(b)for(;h.length%4;)h.push(b);return h.join("")},parse:function(l){var u=l.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var h=0;h<d.length;h++)p[d.charCodeAt(h)]=h}var v=d.charAt(64);if(v){var _=l.indexOf(v);_!==-1&&(u=_)}return function(y,b,w){for(var C=[],T=0,I=0;I<b;I++)if(I%4){var D=w[y.charCodeAt(I-1)]<<I%4*2,k=w[y.charCodeAt(I)]>>>6-I%4*2;C[T>>>2]|=(D|k)<<24-T%4*8,T++}return s.create(C,T)}(l,u,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.algo,h=[];(function(){for(var C=0;C<64;C++)h[C]=4294967296*o.abs(o.sin(C+1))|0})();var v=p.MD5=d.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,T){for(var I=0;I<16;I++){var D=T+I,k=C[D];C[D]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var O=this._hash.words,L=C[T+0],P=C[T+1],V=C[T+2],$=C[T+3],Y=C[T+4],F=C[T+5],U=C[T+6],Q=C[T+7],X=C[T+8],le=C[T+9],ye=C[T+10],ue=C[T+11],G=C[T+12],ee=C[T+13],ne=C[T+14],oe=C[T+15],Z=O[0],J=O[1],H=O[2],W=O[3];Z=_(Z,J,H,W,L,7,h[0]),W=_(W,Z,J,H,P,12,h[1]),H=_(H,W,Z,J,V,17,h[2]),J=_(J,H,W,Z,$,22,h[3]),Z=_(Z,J,H,W,Y,7,h[4]),W=_(W,Z,J,H,F,12,h[5]),H=_(H,W,Z,J,U,17,h[6]),J=_(J,H,W,Z,Q,22,h[7]),Z=_(Z,J,H,W,X,7,h[8]),W=_(W,Z,J,H,le,12,h[9]),H=_(H,W,Z,J,ye,17,h[10]),J=_(J,H,W,Z,ue,22,h[11]),Z=_(Z,J,H,W,G,7,h[12]),W=_(W,Z,J,H,ee,12,h[13]),H=_(H,W,Z,J,ne,17,h[14]),Z=y(Z,J=_(J,H,W,Z,oe,22,h[15]),H,W,P,5,h[16]),W=y(W,Z,J,H,U,9,h[17]),H=y(H,W,Z,J,ue,14,h[18]),J=y(J,H,W,Z,L,20,h[19]),Z=y(Z,J,H,W,F,5,h[20]),W=y(W,Z,J,H,ye,9,h[21]),H=y(H,W,Z,J,oe,14,h[22]),J=y(J,H,W,Z,Y,20,h[23]),Z=y(Z,J,H,W,le,5,h[24]),W=y(W,Z,J,H,ne,9,h[25]),H=y(H,W,Z,J,$,14,h[26]),J=y(J,H,W,Z,X,20,h[27]),Z=y(Z,J,H,W,ee,5,h[28]),W=y(W,Z,J,H,V,9,h[29]),H=y(H,W,Z,J,Q,14,h[30]),Z=b(Z,J=y(J,H,W,Z,G,20,h[31]),H,W,F,4,h[32]),W=b(W,Z,J,H,X,11,h[33]),H=b(H,W,Z,J,ue,16,h[34]),J=b(J,H,W,Z,ne,23,h[35]),Z=b(Z,J,H,W,P,4,h[36]),W=b(W,Z,J,H,Y,11,h[37]),H=b(H,W,Z,J,Q,16,h[38]),J=b(J,H,W,Z,ye,23,h[39]),Z=b(Z,J,H,W,ee,4,h[40]),W=b(W,Z,J,H,L,11,h[41]),H=b(H,W,Z,J,$,16,h[42]),J=b(J,H,W,Z,U,23,h[43]),Z=b(Z,J,H,W,le,4,h[44]),W=b(W,Z,J,H,G,11,h[45]),H=b(H,W,Z,J,oe,16,h[46]),Z=w(Z,J=b(J,H,W,Z,V,23,h[47]),H,W,L,6,h[48]),W=w(W,Z,J,H,Q,10,h[49]),H=w(H,W,Z,J,ne,15,h[50]),J=w(J,H,W,Z,F,21,h[51]),Z=w(Z,J,H,W,G,6,h[52]),W=w(W,Z,J,H,$,10,h[53]),H=w(H,W,Z,J,ye,15,h[54]),J=w(J,H,W,Z,P,21,h[55]),Z=w(Z,J,H,W,X,6,h[56]),W=w(W,Z,J,H,oe,10,h[57]),H=w(H,W,Z,J,U,15,h[58]),J=w(J,H,W,Z,ee,21,h[59]),Z=w(Z,J,H,W,Y,6,h[60]),W=w(W,Z,J,H,ue,10,h[61]),H=w(H,W,Z,J,V,15,h[62]),J=w(J,H,W,Z,le,21,h[63]),O[0]=O[0]+Z|0,O[1]=O[1]+J|0,O[2]=O[2]+H|0,O[3]=O[3]+W|0},_doFinalize:function(){var C=this._data,T=C.words,I=8*this._nDataBytes,D=8*C.sigBytes;T[D>>>5]|=128<<24-D%32;var k=o.floor(I/4294967296),O=I;T[15+(D+64>>>9<<4)]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8),T[14+(D+64>>>9<<4)]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),C.sigBytes=4*(T.length+1),this._process();for(var L=this._hash,P=L.words,V=0;V<4;V++){var $=P[V];P[V]=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8)}return L},clone:function(){var C=d.clone.call(this);return C._hash=this._hash.clone(),C}});function _(C,T,I,D,k,O,L){var P=C+(T&I|~T&D)+k+L;return(P<<O|P>>>32-O)+T}function y(C,T,I,D,k,O,L){var P=C+(T&D|I&~D)+k+L;return(P<<O|P>>>32-O)+T}function b(C,T,I,D,k,O,L){var P=C+(T^I^D)+k+L;return(P<<O|P>>>32-O)+T}function w(C,T,I,D,k,O,L){var P=C+(I^(T|~D))+k+L;return(P<<O|P>>>32-O)+T}s.MD5=d._createHelper(v),s.HmacMD5=d._createHmacHelper(v)}(Math),n.MD5)}),li(function(e,t){var n,o,s,l,u,d,p,h;e.exports=(s=(o=n=hi).lib,l=s.WordArray,u=s.Hasher,d=o.algo,p=[],h=d.SHA1=u.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(v,_){for(var y=this._hash.words,b=y[0],w=y[1],C=y[2],T=y[3],I=y[4],D=0;D<80;D++){if(D<16)p[D]=0|v[_+D];else{var k=p[D-3]^p[D-8]^p[D-14]^p[D-16];p[D]=k<<1|k>>>31}var O=(b<<5|b>>>27)+I+p[D];O+=D<20?1518500249+(w&C|~w&T):D<40?1859775393+(w^C^T):D<60?(w&C|w&T|C&T)-1894007588:(w^C^T)-899497514,I=T,T=C,C=w<<30|w>>>2,w=b,b=O}y[0]=y[0]+b|0,y[1]=y[1]+w|0,y[2]=y[2]+C|0,y[3]=y[3]+T|0,y[4]=y[4]+I|0},_doFinalize:function(){var v=this._data,_=v.words,y=8*this._nDataBytes,b=8*v.sigBytes;return _[b>>>5]|=128<<24-b%32,_[14+(b+64>>>9<<4)]=Math.floor(y/4294967296),_[15+(b+64>>>9<<4)]=y,v.sigBytes=4*_.length,this._process(),this._hash},clone:function(){var v=u.clone.call(this);return v._hash=this._hash.clone(),v}}),o.SHA1=u._createHelper(h),o.HmacSHA1=u._createHmacHelper(h),n.SHA1)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.algo,h=[],v=[];(function(){function b(I){for(var D=o.sqrt(I),k=2;k<=D;k++)if(!(I%k))return!1;return!0}function w(I){return 4294967296*(I-(0|I))|0}for(var C=2,T=0;T<64;)b(C)&&(T<8&&(h[T]=w(o.pow(C,.5))),v[T]=w(o.pow(C,1/3)),T++),C++})();var _=[],y=p.SHA256=d.extend({_doReset:function(){this._hash=new u.init(h.slice(0))},_doProcessBlock:function(b,w){for(var C=this._hash.words,T=C[0],I=C[1],D=C[2],k=C[3],O=C[4],L=C[5],P=C[6],V=C[7],$=0;$<64;$++){if($<16)_[$]=0|b[w+$];else{var Y=_[$-15],F=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,U=_[$-2],Q=(U<<15|U>>>17)^(U<<13|U>>>19)^U>>>10;_[$]=F+_[$-7]+Q+_[$-16]}var X=T&I^T&D^I&D,le=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),ye=V+((O<<26|O>>>6)^(O<<21|O>>>11)^(O<<7|O>>>25))+(O&L^~O&P)+v[$]+_[$];V=P,P=L,L=O,O=k+ye|0,k=D,D=I,I=T,T=ye+(le+X)|0}C[0]=C[0]+T|0,C[1]=C[1]+I|0,C[2]=C[2]+D|0,C[3]=C[3]+k|0,C[4]=C[4]+O|0,C[5]=C[5]+L|0,C[6]=C[6]+P|0,C[7]=C[7]+V|0},_doFinalize:function(){var b=this._data,w=b.words,C=8*this._nDataBytes,T=8*b.sigBytes;return w[T>>>5]|=128<<24-T%32,w[14+(T+64>>>9<<4)]=o.floor(C/4294967296),w[15+(T+64>>>9<<4)]=C,b.sigBytes=4*w.length,this._process(),this._hash},clone:function(){var b=d.clone.call(this);return b._hash=this._hash.clone(),b}});s.SHA256=d._createHelper(y),s.HmacSHA256=d._createHmacHelper(y)}(Math),n.SHA256)}),li(function(e,t){var n,o,s,l,u,d;e.exports=(s=(o=n=hi).lib.WordArray,l=o.algo,u=l.SHA256,d=l.SHA224=u.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=u._doFinalize.call(this);return p.sigBytes-=4,p}}),o.SHA224=u._createHelper(d),o.HmacSHA224=u._createHmacHelper(d),n.SHA224)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.Hasher,l=o.x64,u=l.Word,d=l.WordArray,p=o.algo;function h(){return u.create.apply(u,arguments)}var v=[h(1116352408,3609767458),h(1899447441,602891725),h(3049323471,3964484399),h(3921009573,2173295548),h(961987163,4081628472),h(1508970993,3053834265),h(2453635748,2937671579),h(2870763221,3664609560),h(3624381080,2734883394),h(310598401,1164996542),h(607225278,1323610764),h(1426881987,3590304994),h(1925078388,4068182383),h(2162078206,991336113),h(2614888103,633803317),h(3248222580,3479774868),h(3835390401,2666613458),h(4022224774,944711139),h(264347078,2341262773),h(604807628,2007800933),h(770255983,1495990901),h(1249150122,1856431235),h(1555081692,3175218132),h(1996064986,2198950837),h(2554220882,3999719339),h(2821834349,766784016),h(2952996808,2566594879),h(3210313671,3203337956),h(3336571891,1034457026),h(3584528711,2466948901),h(113926993,3758326383),h(338241895,168717936),h(666307205,1188179964),h(773529912,1546045734),h(1294757372,1522805485),h(1396182291,2643833823),h(1695183700,2343527390),h(1986661051,1014477480),h(2177026350,1206759142),h(2456956037,344077627),h(2730485921,1290863460),h(2820302411,3158454273),h(3259730800,3505952657),h(3345764771,106217008),h(3516065817,3606008344),h(3600352804,1432725776),h(4094571909,1467031594),h(275423344,851169720),h(430227734,3100823752),h(506948616,1363258195),h(659060556,3750685593),h(883997877,3785050280),h(958139571,3318307427),h(1322822218,3812723403),h(1537002063,2003034995),h(1747873779,3602036899),h(1955562222,1575990012),h(2024104815,1125592928),h(2227730452,2716904306),h(2361852424,442776044),h(2428436474,593698344),h(2756734187,3733110249),h(3204031479,2999351573),h(3329325298,3815920427),h(3391569614,3928383900),h(3515267271,566280711),h(3940187606,3454069534),h(4118630271,4000239992),h(116418474,1914138554),h(174292421,2731055270),h(289380356,3203993006),h(460393269,320620315),h(685471733,587496836),h(852142971,1086792851),h(1017036298,365543100),h(1126000580,2618297676),h(1288033470,3409855158),h(1501505948,4234509866),h(1607167915,987167468),h(1816402316,1246189591)],_=[];(function(){for(var b=0;b<80;b++)_[b]=h()})();var y=p.SHA512=s.extend({_doReset:function(){this._hash=new d.init([new u.init(1779033703,4089235720),new u.init(3144134277,2227873595),new u.init(1013904242,4271175723),new u.init(2773480762,1595750129),new u.init(1359893119,2917565137),new u.init(2600822924,725511199),new u.init(528734635,4215389547),new u.init(1541459225,327033209)])},_doProcessBlock:function(b,w){for(var C=this._hash.words,T=C[0],I=C[1],D=C[2],k=C[3],O=C[4],L=C[5],P=C[6],V=C[7],$=T.high,Y=T.low,F=I.high,U=I.low,Q=D.high,X=D.low,le=k.high,ye=k.low,ue=O.high,G=O.low,ee=L.high,ne=L.low,oe=P.high,Z=P.low,J=V.high,H=V.low,W=$,ce=Y,ge=F,de=U,te=Q,fe=X,Ie=le,De=ye,Ge=ue,ot=G,Ce=ee,et=ne,St=oe,Tt=Z,Nt=J,vn=H,hn=0;hn<80;hn++){var nn=_[hn];if(hn<16)var Xt=nn.high=0|b[w+2*hn],Yt=nn.low=0|b[w+2*hn+1];else{var kn=_[hn-15],mt=kn.high,nt=kn.low,Ye=(mt>>>1|nt<<31)^(mt>>>8|nt<<24)^mt>>>7,xt=(nt>>>1|mt<<31)^(nt>>>8|mt<<24)^(nt>>>7|mt<<25),Dt=_[hn-2],Ee=Dt.high,He=Dt.low,ct=(Ee>>>19|He<<13)^(Ee<<3|He>>>29)^Ee>>>6,ve=(He>>>19|Ee<<13)^(He<<3|Ee>>>29)^(He>>>6|Ee<<26),Te=_[hn-7],Oe=Te.high,qe=Te.low,je=_[hn-16],at=je.high,K=je.low;Xt=(Xt=(Xt=Ye+Oe+((Yt=xt+qe)>>>0<xt>>>0?1:0))+ct+((Yt+=ve)>>>0<ve>>>0?1:0))+at+((Yt+=K)>>>0<K>>>0?1:0),nn.high=Xt,nn.low=Yt}var pe,Ae=Ge&Ce^~Ge&St,Be=ot&et^~ot&Tt,Je=W&ge^W&te^ge&te,Ze=ce&de^ce&fe^de&fe,we=(W>>>28|ce<<4)^(W<<30|ce>>>2)^(W<<25|ce>>>7),Me=(ce>>>28|W<<4)^(ce<<30|W>>>2)^(ce<<25|W>>>7),Fe=(Ge>>>14|ot<<18)^(Ge>>>18|ot<<14)^(Ge<<23|ot>>>9),Ue=(ot>>>14|Ge<<18)^(ot>>>18|Ge<<14)^(ot<<23|Ge>>>9),vt=v[hn],pt=vt.high,Mt=vt.low,yt=Nt+Fe+((pe=vn+Ue)>>>0<vn>>>0?1:0),Pt=Me+Ze;Nt=St,vn=Tt,St=Ce,Tt=et,Ce=Ge,et=ot,Ge=Ie+(yt=(yt=(yt=yt+Ae+((pe+=Be)>>>0<Be>>>0?1:0))+pt+((pe+=Mt)>>>0<Mt>>>0?1:0))+Xt+((pe+=Yt)>>>0<Yt>>>0?1:0))+((ot=De+pe|0)>>>0<De>>>0?1:0)|0,Ie=te,De=fe,te=ge,fe=de,ge=W,de=ce,W=yt+(we+Je+(Pt>>>0<Me>>>0?1:0))+((ce=pe+Pt|0)>>>0<pe>>>0?1:0)|0}Y=T.low=Y+ce,T.high=$+W+(Y>>>0<ce>>>0?1:0),U=I.low=U+de,I.high=F+ge+(U>>>0<de>>>0?1:0),X=D.low=X+fe,D.high=Q+te+(X>>>0<fe>>>0?1:0),ye=k.low=ye+De,k.high=le+Ie+(ye>>>0<De>>>0?1:0),G=O.low=G+ot,O.high=ue+Ge+(G>>>0<ot>>>0?1:0),ne=L.low=ne+et,L.high=ee+Ce+(ne>>>0<et>>>0?1:0),Z=P.low=Z+Tt,P.high=oe+St+(Z>>>0<Tt>>>0?1:0),H=V.low=H+vn,V.high=J+Nt+(H>>>0<vn>>>0?1:0)},_doFinalize:function(){var b=this._data,w=b.words,C=8*this._nDataBytes,T=8*b.sigBytes;return w[T>>>5]|=128<<24-T%32,w[30+(T+128>>>10<<5)]=Math.floor(C/4294967296),w[31+(T+128>>>10<<5)]=C,b.sigBytes=4*w.length,this._process(),this._hash.toX32()},clone:function(){var b=s.clone.call(this);return b._hash=this._hash.clone(),b},blockSize:32});o.SHA512=s._createHelper(y),o.HmacSHA512=s._createHmacHelper(y)}(),n.SHA512)}),li(function(e,t){var n,o,s,l,u,d,p,h;e.exports=(s=(o=n=hi).x64,l=s.Word,u=s.WordArray,d=o.algo,p=d.SHA512,h=d.SHA384=p.extend({_doReset:function(){this._hash=new u.init([new l.init(3418070365,3238371032),new l.init(1654270250,914150663),new l.init(2438529370,812702999),new l.init(355462360,4144912697),new l.init(1731405415,4290775857),new l.init(2394180231,1750603025),new l.init(3675008525,1694076839),new l.init(1203062813,3204075428)])},_doFinalize:function(){var v=p._doFinalize.call(this);return v.sigBytes-=16,v}}),o.SHA384=p._createHelper(h),o.HmacSHA384=p._createHmacHelper(h),n.SHA384)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.x64.Word,h=s.algo,v=[],_=[],y=[];(function(){for(var C=1,T=0,I=0;I<24;I++){v[C+5*T]=(I+1)*(I+2)/2%64;var D=(2*C+3*T)%5;C=T%5,T=D}for(C=0;C<5;C++)for(T=0;T<5;T++)_[C+5*T]=T+(2*C+3*T)%5*5;for(var k=1,O=0;O<24;O++){for(var L=0,P=0,V=0;V<7;V++){if(1&k){var $=(1<<V)-1;$<32?P^=1<<$:L^=1<<$-32}128&k?k=k<<1^113:k<<=1}y[O]=p.create(L,P)}})();var b=[];(function(){for(var C=0;C<25;C++)b[C]=p.create()})();var w=h.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var C=this._state=[],T=0;T<25;T++)C[T]=new p.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(C,T){for(var I=this._state,D=this.blockSize/2,k=0;k<D;k++){var O=C[T+2*k],L=C[T+2*k+1];O=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),L=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),(H=I[k]).high^=L,H.low^=O}for(var P=0;P<24;P++){for(var V=0;V<5;V++){for(var $=0,Y=0,F=0;F<5;F++)$^=(H=I[V+5*F]).high,Y^=H.low;var U=b[V];U.high=$,U.low=Y}for(V=0;V<5;V++){var Q=b[(V+4)%5],X=b[(V+1)%5],le=X.high,ye=X.low;for($=Q.high^(le<<1|ye>>>31),Y=Q.low^(ye<<1|le>>>31),F=0;F<5;F++)(H=I[V+5*F]).high^=$,H.low^=Y}for(var ue=1;ue<25;ue++){var G=(H=I[ue]).high,ee=H.low,ne=v[ue];ne<32?($=G<<ne|ee>>>32-ne,Y=ee<<ne|G>>>32-ne):($=ee<<ne-32|G>>>64-ne,Y=G<<ne-32|ee>>>64-ne);var oe=b[_[ue]];oe.high=$,oe.low=Y}var Z=b[0],J=I[0];for(Z.high=J.high,Z.low=J.low,V=0;V<5;V++)for(F=0;F<5;F++){var H=I[ue=V+5*F],W=b[ue],ce=b[(V+1)%5+5*F],ge=b[(V+2)%5+5*F];H.high=W.high^~ce.high&ge.high,H.low=W.low^~ce.low&ge.low}H=I[0];var de=y[P];H.high^=de.high,H.low^=de.low}},_doFinalize:function(){var C=this._data,T=C.words,I=(this._nDataBytes,8*C.sigBytes),D=32*this.blockSize;T[I>>>5]|=1<<24-I%32,T[(o.ceil((I+1)/D)*D>>>5)-1]|=128,C.sigBytes=4*T.length,this._process();for(var k=this._state,O=this.cfg.outputLength/8,L=O/8,P=[],V=0;V<L;V++){var $=k[V],Y=$.high,F=$.low;Y=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),F=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8),P.push(F),P.push(Y)}return new u.init(P,O)},clone:function(){for(var C=d.clone.call(this),T=C._state=this._state.slice(0),I=0;I<25;I++)T[I]=T[I].clone();return C}});s.SHA3=d._createHelper(w),s.HmacSHA3=d._createHmacHelper(w)}(Math),n.SHA3)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.algo,h=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),b=u.create([0,1518500249,1859775393,2400959708,2840853838]),w=u.create([1352829926,1548603684,1836072691,2053994217,0]),C=p.RIPEMD160=d.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(P,V){for(var $=0;$<16;$++){var Y=V+$,F=P[Y];P[Y]=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8)}var U,Q,X,le,ye,ue,G,ee,ne,oe,Z,J=this._hash.words,H=b.words,W=w.words,ce=h.words,ge=v.words,de=_.words,te=y.words;for(ue=U=J[0],G=Q=J[1],ee=X=J[2],ne=le=J[3],oe=ye=J[4],$=0;$<80;$+=1)Z=U+P[V+ce[$]]|0,Z+=$<16?T(Q,X,le)+H[0]:$<32?I(Q,X,le)+H[1]:$<48?D(Q,X,le)+H[2]:$<64?k(Q,X,le)+H[3]:O(Q,X,le)+H[4],Z=(Z=L(Z|=0,de[$]))+ye|0,U=ye,ye=le,le=L(X,10),X=Q,Q=Z,Z=ue+P[V+ge[$]]|0,Z+=$<16?O(G,ee,ne)+W[0]:$<32?k(G,ee,ne)+W[1]:$<48?D(G,ee,ne)+W[2]:$<64?I(G,ee,ne)+W[3]:T(G,ee,ne)+W[4],Z=(Z=L(Z|=0,te[$]))+oe|0,ue=oe,oe=ne,ne=L(ee,10),ee=G,G=Z;Z=J[1]+X+ne|0,J[1]=J[2]+le+oe|0,J[2]=J[3]+ye+ue|0,J[3]=J[4]+U+G|0,J[4]=J[0]+Q+ee|0,J[0]=Z},_doFinalize:function(){var P=this._data,V=P.words,$=8*this._nDataBytes,Y=8*P.sigBytes;V[Y>>>5]|=128<<24-Y%32,V[14+(Y+64>>>9<<4)]=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8),P.sigBytes=4*(V.length+1),this._process();for(var F=this._hash,U=F.words,Q=0;Q<5;Q++){var X=U[Q];U[Q]=16711935&(X<<8|X>>>24)|4278255360&(X<<24|X>>>8)}return F},clone:function(){var P=d.clone.call(this);return P._hash=this._hash.clone(),P}});function T(P,V,$){return P^V^$}function I(P,V,$){return P&V|~P&$}function D(P,V,$){return(P|~V)^$}function k(P,V,$){return P&$|V&~$}function O(P,V,$){return P^(V|~$)}function L(P,V){return P<<V|P>>>32-V}s.RIPEMD160=d._createHelper(C),s.HmacRIPEMD160=d._createHmacHelper(C)}(),n.RIPEMD160)}),li(function(e,t){var n,o,s,l,u,d;e.exports=(o=(n=hi).lib,s=o.Base,l=n.enc,u=l.Utf8,d=n.algo,void(d.HMAC=s.extend({init:function(p,h){p=this._hasher=new p.init,typeof h=="string"&&(h=u.parse(h));var v=p.blockSize,_=4*v;h.sigBytes>_&&(h=p.finalize(h)),h.clamp();for(var y=this._oKey=h.clone(),b=this._iKey=h.clone(),w=y.words,C=b.words,T=0;T<v;T++)w[T]^=1549556828,C[T]^=909522486;y.sigBytes=b.sigBytes=_,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var h=this._hasher,v=h.finalize(p);h.reset();var _=h.finalize(this._oKey.clone().concat(v));return _}})))}),li(function(e,t){var n,o,s,l,u,d,p,h,v;e.exports=(s=(o=n=hi).lib,l=s.Base,u=s.WordArray,d=o.algo,p=d.SHA1,h=d.HMAC,v=d.PBKDF2=l.extend({cfg:l.extend({keySize:4,hasher:p,iterations:1}),init:function(_){this.cfg=this.cfg.extend(_)},compute:function(_,y){for(var b=this.cfg,w=h.create(b.hasher,_),C=u.create(),T=u.create([1]),I=C.words,D=T.words,k=b.keySize,O=b.iterations;I.length<k;){var L=w.update(y).finalize(T);w.reset();for(var P=L.words,V=P.length,$=L,Y=1;Y<O;Y++){$=w.finalize($),w.reset();for(var F=$.words,U=0;U<V;U++)P[U]^=F[U]}C.concat(L),D[0]++}return C.sigBytes=4*k,C}}),o.PBKDF2=function(_,y,b){return v.create(b).compute(_,y)},n.PBKDF2)}),li(function(e,t){var n,o,s,l,u,d,p,h;e.exports=(s=(o=n=hi).lib,l=s.Base,u=s.WordArray,d=o.algo,p=d.MD5,h=d.EvpKDF=l.extend({cfg:l.extend({keySize:4,hasher:p,iterations:1}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,_){for(var y=this.cfg,b=y.hasher.create(),w=u.create(),C=w.words,T=y.keySize,I=y.iterations;C.length<T;){D&&b.update(D);var D=b.update(v).finalize(_);b.reset();for(var k=1;k<I;k++)D=b.finalize(D),b.reset();w.concat(D)}return w.sigBytes=4*T,w}}),o.EvpKDF=function(v,_,y){return h.create(y).compute(v,_)},n.EvpKDF)}),li(function(e,t){var n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D,k,O,L,P,V,$,Y;e.exports=void((n=hi).lib.Cipher||(s=n,l=s.lib,u=l.Base,d=l.WordArray,p=l.BufferedBlockAlgorithm,h=s.enc,h.Utf8,v=h.Base64,_=s.algo,y=_.EvpKDF,b=l.Cipher=p.extend({cfg:u.extend(),createEncryptor:function(F,U){return this.create(this._ENC_XFORM_MODE,F,U)},createDecryptor:function(F,U){return this.create(this._DEC_XFORM_MODE,F,U)},init:function(F,U,Q){this.cfg=this.cfg.extend(Q),this._xformMode=F,this._key=U,this.reset()},reset:function(){p.reset.call(this),this._doReset()},process:function(F){return this._append(F),this._process()},finalize:function(F){F&&this._append(F);var U=this._doFinalize();return U},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function F(U){return typeof U=="string"?Y:P}return function(U){return{encrypt:function(Q,X,le){return F(X).encrypt(U,Q,X,le)},decrypt:function(Q,X,le){return F(X).decrypt(U,Q,X,le)}}}}()}),l.StreamCipher=b.extend({_doFinalize:function(){var F=this._process(!0);return F},blockSize:1}),w=s.mode={},C=l.BlockCipherMode=u.extend({createEncryptor:function(F,U){return this.Encryptor.create(F,U)},createDecryptor:function(F,U){return this.Decryptor.create(F,U)},init:function(F,U){this._cipher=F,this._iv=U}}),T=w.CBC=function(){var F=C.extend();function U(Q,X,le){var ye=this._iv;if(ye){var ue=ye;this._iv=o}else var ue=this._prevBlock;for(var G=0;G<le;G++)Q[X+G]^=ue[G]}return F.Encryptor=F.extend({processBlock:function(Q,X){var le=this._cipher,ye=le.blockSize;U.call(this,Q,X,ye),le.encryptBlock(Q,X),this._prevBlock=Q.slice(X,X+ye)}}),F.Decryptor=F.extend({processBlock:function(Q,X){var le=this._cipher,ye=le.blockSize,ue=Q.slice(X,X+ye);le.decryptBlock(Q,X),U.call(this,Q,X,ye),this._prevBlock=ue}}),F}(),I=s.pad={},D=I.Pkcs7={pad:function(F,U){for(var Q=4*U,X=Q-F.sigBytes%Q,le=X<<24|X<<16|X<<8|X,ye=[],ue=0;ue<X;ue+=4)ye.push(le);var G=d.create(ye,X);F.concat(G)},unpad:function(F){var U=255&F.words[F.sigBytes-1>>>2];F.sigBytes-=U}},l.BlockCipher=b.extend({cfg:b.cfg.extend({mode:T,padding:D}),reset:function(){b.reset.call(this);var F=this.cfg,U=F.iv,Q=F.mode;if(this._xformMode==this._ENC_XFORM_MODE)var X=Q.createEncryptor;else{var X=Q.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==X?this._mode.init(this,U&&U.words):(this._mode=X.call(Q,this,U&&U.words),this._mode.__creator=X)},_doProcessBlock:function(F,U){this._mode.processBlock(F,U)},_doFinalize:function(){var F=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){F.pad(this._data,this.blockSize);var U=this._process(!0)}else{var U=this._process(!0);F.unpad(U)}return U},blockSize:4}),k=l.CipherParams=u.extend({init:function(F){this.mixIn(F)},toString:function(F){return(F||this.formatter).stringify(this)}}),O=s.format={},L=O.OpenSSL={stringify:function(F){var U=F.ciphertext,Q=F.salt;if(Q)var X=d.create([1398893684,1701076831]).concat(Q).concat(U);else var X=U;return X.toString(v)},parse:function(F){var U=v.parse(F),Q=U.words;if(Q[0]==1398893684&&Q[1]==1701076831){var X=d.create(Q.slice(2,4));Q.splice(0,4),U.sigBytes-=16}return k.create({ciphertext:U,salt:X})}},P=l.SerializableCipher=u.extend({cfg:u.extend({format:L}),encrypt:function(F,U,Q,X){X=this.cfg.extend(X);var le=F.createEncryptor(Q,X),ye=le.finalize(U),ue=le.cfg;return k.create({ciphertext:ye,key:Q,iv:ue.iv,algorithm:F,mode:ue.mode,padding:ue.padding,blockSize:F.blockSize,formatter:X.format})},decrypt:function(F,U,Q,X){X=this.cfg.extend(X),U=this._parse(U,X.format);var le=F.createDecryptor(Q,X).finalize(U.ciphertext);return le},_parse:function(F,U){return typeof F=="string"?U.parse(F,this):F}}),V=s.kdf={},$=V.OpenSSL={execute:function(F,U,Q,X){X||(X=d.random(8));var le=y.create({keySize:U+Q}).compute(F,X),ye=d.create(le.words.slice(U),4*Q);return le.sigBytes=4*U,k.create({key:le,iv:ye,salt:X})}},Y=l.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:$}),encrypt:function(F,U,Q,X){var le=(X=this.cfg.extend(X)).kdf.execute(Q,F.keySize,F.ivSize);X.iv=le.iv;var ye=P.encrypt.call(this,F,U,le.key,X);return ye.mixIn(le),ye},decrypt:function(F,U,Q,X){X=this.cfg.extend(X),U=this._parse(U,X.format);var le=X.kdf.execute(Q,F.keySize,F.ivSize,U.salt);X.iv=le.iv;var ye=P.decrypt.call(this,F,U,le.key,X);return ye}})))}),li(function(e,t){var n;e.exports=((n=hi).mode.CFB=function(){var o=n.lib.BlockCipherMode.extend();function s(l,u,d,p){var h=this._iv;if(h){var v=h.slice(0);this._iv=void 0}else v=this._prevBlock;p.encryptBlock(v,0);for(var _=0;_<d;_++)l[u+_]^=v[_]}return o.Encryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize;s.call(this,l,u,p,d),this._prevBlock=l.slice(u,u+p)}}),o.Decryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize,h=l.slice(u,u+p);s.call(this,l,u,p,d),this._prevBlock=h}}),o}(),n.mode.CFB)}),li(function(e,t){var n,o,s;e.exports=((n=hi).mode.CTR=(o=n.lib.BlockCipherMode.extend(),s=o.Encryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize,h=this._iv,v=this._counter;h&&(v=this._counter=h.slice(0),this._iv=void 0);var _=v.slice(0);d.encryptBlock(_,0),v[p-1]=v[p-1]+1|0;for(var y=0;y<p;y++)l[u+y]^=_[y]}}),o.Decryptor=s,o),n.mode.CTR)}),li(function(e,t){var n;e.exports=((n=hi).mode.CTRGladman=function(){var o=n.lib.BlockCipherMode.extend();function s(u){if((u>>24&255)==255){var d=u>>16&255,p=u>>8&255,h=255&u;d===255?(d=0,p===255?(p=0,h===255?h=0:++h):++p):++d,u=0,u+=d<<16,u+=p<<8,u+=h}else u+=1<<24;return u}var l=o.Encryptor=o.extend({processBlock:function(u,d){var p=this._cipher,h=p.blockSize,v=this._iv,_=this._counter;v&&(_=this._counter=v.slice(0),this._iv=void 0),function(w){(w[0]=s(w[0]))===0&&(w[1]=s(w[1]))}(_);var y=_.slice(0);p.encryptBlock(y,0);for(var b=0;b<h;b++)u[d+b]^=y[b]}});return o.Decryptor=l,o}(),n.mode.CTRGladman)}),li(function(e,t){var n,o,s;e.exports=((n=hi).mode.OFB=(o=n.lib.BlockCipherMode.extend(),s=o.Encryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize,h=this._iv,v=this._keystream;h&&(v=this._keystream=h.slice(0),this._iv=void 0),d.encryptBlock(v,0);for(var _=0;_<p;_++)l[u+_]^=v[_]}}),o.Decryptor=s,o),n.mode.OFB)}),li(function(e,t){var n,o;e.exports=((n=hi).mode.ECB=((o=n.lib.BlockCipherMode.extend()).Encryptor=o.extend({processBlock:function(s,l){this._cipher.encryptBlock(s,l)}}),o.Decryptor=o.extend({processBlock:function(s,l){this._cipher.decryptBlock(s,l)}}),o),n.mode.ECB)}),li(function(e,t){var n;e.exports=((n=hi).pad.AnsiX923={pad:function(o,s){var l=o.sigBytes,u=4*s,d=u-l%u,p=l+d-1;o.clamp(),o.words[p>>>2]|=d<<24-p%4*8,o.sigBytes+=d},unpad:function(o){var s=255&o.words[o.sigBytes-1>>>2];o.sigBytes-=s}},n.pad.Ansix923)}),li(function(e,t){var n;e.exports=((n=hi).pad.Iso10126={pad:function(o,s){var l=4*s,u=l-o.sigBytes%l;o.concat(n.lib.WordArray.random(u-1)).concat(n.lib.WordArray.create([u<<24],1))},unpad:function(o){var s=255&o.words[o.sigBytes-1>>>2];o.sigBytes-=s}},n.pad.Iso10126)}),li(function(e,t){var n;e.exports=((n=hi).pad.Iso97971={pad:function(o,s){o.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(o,s)},unpad:function(o){n.pad.ZeroPadding.unpad(o),o.sigBytes--}},n.pad.Iso97971)}),li(function(e,t){var n;e.exports=((n=hi).pad.ZeroPadding={pad:function(o,s){var l=4*s;o.clamp(),o.sigBytes+=l-(o.sigBytes%l||l)},unpad:function(o){for(var s=o.words,l=o.sigBytes-1;!(s[l>>>2]>>>24-l%4*8&255);)l--;o.sigBytes=l+1}},n.pad.ZeroPadding)}),li(function(e,t){var n;e.exports=((n=hi).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}),li(function(e,t){var n,o,s,l;e.exports=(s=(o=n=hi).lib.CipherParams,l=o.enc.Hex,o.format.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var d=l.parse(u);return s.create({ciphertext:d})}},n.format.Hex)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.BlockCipher,l=o.algo,u=[],d=[],p=[],h=[],v=[],_=[],y=[],b=[],w=[],C=[];(function(){for(var D=[],k=0;k<256;k++)D[k]=k<128?k<<1:k<<1^283;var O=0,L=0;for(k=0;k<256;k++){var P=L^L<<1^L<<2^L<<3^L<<4;P=P>>>8^255&P^99,u[O]=P,d[P]=O;var V=D[O],$=D[V],Y=D[$],F=257*D[P]^16843008*P;p[O]=F<<24|F>>>8,h[O]=F<<16|F>>>16,v[O]=F<<8|F>>>24,_[O]=F,F=16843009*Y^65537*$^257*V^16843008*O,y[P]=F<<24|F>>>8,b[P]=F<<16|F>>>16,w[P]=F<<8|F>>>24,C[P]=F,O?(O=V^D[D[D[Y^V]]],L^=D[D[L]]):O=L=1}})();var T=[0,1,2,4,8,16,32,64,128,27,54],I=l.AES=s.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var D=this._keyPriorReset=this._key,k=D.words,O=D.sigBytes/4,L=4*((this._nRounds=O+6)+1),P=this._keySchedule=[],V=0;V<L;V++)if(V<O)P[V]=k[V];else{var $=P[V-1];V%O?O>6&&V%O==4&&($=u[$>>>24]<<24|u[$>>>16&255]<<16|u[$>>>8&255]<<8|u[255&$]):($=u[($=$<<8|$>>>24)>>>24]<<24|u[$>>>16&255]<<16|u[$>>>8&255]<<8|u[255&$],$^=T[V/O|0]<<24),P[V]=P[V-O]^$}for(var Y=this._invKeySchedule=[],F=0;F<L;F++)V=L-F,$=F%4?P[V]:P[V-4],Y[F]=F<4||V<=4?$:y[u[$>>>24]]^b[u[$>>>16&255]]^w[u[$>>>8&255]]^C[u[255&$]]}},encryptBlock:function(D,k){this._doCryptBlock(D,k,this._keySchedule,p,h,v,_,u)},decryptBlock:function(D,k){var O=D[k+1];D[k+1]=D[k+3],D[k+3]=O,this._doCryptBlock(D,k,this._invKeySchedule,y,b,w,C,d),O=D[k+1],D[k+1]=D[k+3],D[k+3]=O},_doCryptBlock:function(D,k,O,L,P,V,$,Y){for(var F=this._nRounds,U=D[k]^O[0],Q=D[k+1]^O[1],X=D[k+2]^O[2],le=D[k+3]^O[3],ye=4,ue=1;ue<F;ue++){var G=L[U>>>24]^P[Q>>>16&255]^V[X>>>8&255]^$[255&le]^O[ye++],ee=L[Q>>>24]^P[X>>>16&255]^V[le>>>8&255]^$[255&U]^O[ye++],ne=L[X>>>24]^P[le>>>16&255]^V[U>>>8&255]^$[255&Q]^O[ye++],oe=L[le>>>24]^P[U>>>16&255]^V[Q>>>8&255]^$[255&X]^O[ye++];U=G,Q=ee,X=ne,le=oe}G=(Y[U>>>24]<<24|Y[Q>>>16&255]<<16|Y[X>>>8&255]<<8|Y[255&le])^O[ye++],ee=(Y[Q>>>24]<<24|Y[X>>>16&255]<<16|Y[le>>>8&255]<<8|Y[255&U])^O[ye++],ne=(Y[X>>>24]<<24|Y[le>>>16&255]<<16|Y[U>>>8&255]<<8|Y[255&Q])^O[ye++],oe=(Y[le>>>24]<<24|Y[U>>>16&255]<<16|Y[Q>>>8&255]<<8|Y[255&X])^O[ye++],D[k]=G,D[k+1]=ee,D[k+2]=ne,D[k+3]=oe},keySize:8});o.AES=s._createHelper(I)}(),n.AES)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib,l=s.WordArray,u=s.BlockCipher,d=o.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],_=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],y=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],b=d.DES=u.extend({_doReset:function(){for(var I=this._key.words,D=[],k=0;k<56;k++){var O=p[k]-1;D[k]=I[O>>>5]>>>31-O%32&1}for(var L=this._subKeys=[],P=0;P<16;P++){var V=L[P]=[],$=v[P];for(k=0;k<24;k++)V[k/6|0]|=D[(h[k]-1+$)%28]<<31-k%6,V[4+(k/6|0)]|=D[28+(h[k+24]-1+$)%28]<<31-k%6;for(V[0]=V[0]<<1|V[0]>>>31,k=1;k<7;k++)V[k]=V[k]>>>4*(k-1)+3;V[7]=V[7]<<5|V[7]>>>27}var Y=this._invSubKeys=[];for(k=0;k<16;k++)Y[k]=L[15-k]},encryptBlock:function(I,D){this._doCryptBlock(I,D,this._subKeys)},decryptBlock:function(I,D){this._doCryptBlock(I,D,this._invSubKeys)},_doCryptBlock:function(I,D,k){this._lBlock=I[D],this._rBlock=I[D+1],w.call(this,4,252645135),w.call(this,16,65535),C.call(this,2,858993459),C.call(this,8,16711935),w.call(this,1,1431655765);for(var O=0;O<16;O++){for(var L=k[O],P=this._lBlock,V=this._rBlock,$=0,Y=0;Y<8;Y++)$|=_[Y][((V^L[Y])&y[Y])>>>0];this._lBlock=V,this._rBlock=P^$}var F=this._lBlock;this._lBlock=this._rBlock,this._rBlock=F,w.call(this,1,1431655765),C.call(this,8,16711935),C.call(this,2,858993459),w.call(this,16,65535),w.call(this,4,252645135),I[D]=this._lBlock,I[D+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function w(I,D){var k=(this._lBlock>>>I^this._rBlock)&D;this._rBlock^=k,this._lBlock^=k<<I}function C(I,D){var k=(this._rBlock>>>I^this._lBlock)&D;this._lBlock^=k,this._rBlock^=k<<I}o.DES=u._createHelper(b);var T=d.TripleDES=u.extend({_doReset:function(){var I=this._key.words;this._des1=b.createEncryptor(l.create(I.slice(0,2))),this._des2=b.createEncryptor(l.create(I.slice(2,4))),this._des3=b.createEncryptor(l.create(I.slice(4,6)))},encryptBlock:function(I,D){this._des1.encryptBlock(I,D),this._des2.decryptBlock(I,D),this._des3.encryptBlock(I,D)},decryptBlock:function(I,D){this._des3.decryptBlock(I,D),this._des2.encryptBlock(I,D),this._des1.decryptBlock(I,D)},keySize:6,ivSize:2,blockSize:2});o.TripleDES=u._createHelper(T)}(),n.TripleDES)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.StreamCipher,l=o.algo,u=l.RC4=s.extend({_doReset:function(){for(var h=this._key,v=h.words,_=h.sigBytes,y=this._S=[],b=0;b<256;b++)y[b]=b;b=0;for(var w=0;b<256;b++){var C=b%_,T=v[C>>>2]>>>24-C%4*8&255;w=(w+y[b]+T)%256;var I=y[b];y[b]=y[w],y[w]=I}this._i=this._j=0},_doProcessBlock:function(h,v){h[v]^=d.call(this)},keySize:8,ivSize:0});function d(){for(var h=this._S,v=this._i,_=this._j,y=0,b=0;b<4;b++){_=(_+h[v=(v+1)%256])%256;var w=h[v];h[v]=h[_],h[_]=w,y|=h[(h[v]+h[_])%256]<<24-8*b}return this._i=v,this._j=_,y}o.RC4=s._createHelper(u);var p=l.RC4Drop=u.extend({cfg:u.cfg.extend({drop:192}),_doReset:function(){u._doReset.call(this);for(var h=this.cfg.drop;h>0;h--)d.call(this)}});o.RC4Drop=s._createHelper(p)}(),n.RC4)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.StreamCipher,l=o.algo,u=[],d=[],p=[],h=l.Rabbit=s.extend({_doReset:function(){for(var _=this._key.words,y=this.cfg.iv,b=0;b<4;b++)_[b]=16711935&(_[b]<<8|_[b]>>>24)|4278255360&(_[b]<<24|_[b]>>>8);var w=this._X=[_[0],_[3]<<16|_[2]>>>16,_[1],_[0]<<16|_[3]>>>16,_[2],_[1]<<16|_[0]>>>16,_[3],_[2]<<16|_[1]>>>16],C=this._C=[_[2]<<16|_[2]>>>16,4294901760&_[0]|65535&_[1],_[3]<<16|_[3]>>>16,4294901760&_[1]|65535&_[2],_[0]<<16|_[0]>>>16,4294901760&_[2]|65535&_[3],_[1]<<16|_[1]>>>16,4294901760&_[3]|65535&_[0]];for(this._b=0,b=0;b<4;b++)v.call(this);for(b=0;b<8;b++)C[b]^=w[b+4&7];if(y){var T=y.words,I=T[0],D=T[1],k=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8),O=16711935&(D<<8|D>>>24)|4278255360&(D<<24|D>>>8),L=k>>>16|4294901760&O,P=O<<16|65535&k;for(C[0]^=k,C[1]^=L,C[2]^=O,C[3]^=P,C[4]^=k,C[5]^=L,C[6]^=O,C[7]^=P,b=0;b<4;b++)v.call(this)}},_doProcessBlock:function(_,y){var b=this._X;v.call(this),u[0]=b[0]^b[5]>>>16^b[3]<<16,u[1]=b[2]^b[7]>>>16^b[5]<<16,u[2]=b[4]^b[1]>>>16^b[7]<<16,u[3]=b[6]^b[3]>>>16^b[1]<<16;for(var w=0;w<4;w++)u[w]=16711935&(u[w]<<8|u[w]>>>24)|4278255360&(u[w]<<24|u[w]>>>8),_[y+w]^=u[w]},blockSize:4,ivSize:2});function v(){for(var _=this._X,y=this._C,b=0;b<8;b++)d[b]=y[b];for(y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0,b=0;b<8;b++){var w=_[b]+y[b],C=65535&w,T=w>>>16,I=((C*C>>>17)+C*T>>>15)+T*T,D=((4294901760&w)*w|0)+((65535&w)*w|0);p[b]=I^D}_[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,_[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,_[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,_[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,_[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,_[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,_[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,_[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}o.Rabbit=s._createHelper(h)}(),n.Rabbit)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.StreamCipher,l=o.algo,u=[],d=[],p=[],h=l.RabbitLegacy=s.extend({_doReset:function(){var _=this._key.words,y=this.cfg.iv,b=this._X=[_[0],_[3]<<16|_[2]>>>16,_[1],_[0]<<16|_[3]>>>16,_[2],_[1]<<16|_[0]>>>16,_[3],_[2]<<16|_[1]>>>16],w=this._C=[_[2]<<16|_[2]>>>16,4294901760&_[0]|65535&_[1],_[3]<<16|_[3]>>>16,4294901760&_[1]|65535&_[2],_[0]<<16|_[0]>>>16,4294901760&_[2]|65535&_[3],_[1]<<16|_[1]>>>16,4294901760&_[3]|65535&_[0]];this._b=0;for(var C=0;C<4;C++)v.call(this);for(C=0;C<8;C++)w[C]^=b[C+4&7];if(y){var T=y.words,I=T[0],D=T[1],k=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8),O=16711935&(D<<8|D>>>24)|4278255360&(D<<24|D>>>8),L=k>>>16|4294901760&O,P=O<<16|65535&k;for(w[0]^=k,w[1]^=L,w[2]^=O,w[3]^=P,w[4]^=k,w[5]^=L,w[6]^=O,w[7]^=P,C=0;C<4;C++)v.call(this)}},_doProcessBlock:function(_,y){var b=this._X;v.call(this),u[0]=b[0]^b[5]>>>16^b[3]<<16,u[1]=b[2]^b[7]>>>16^b[5]<<16,u[2]=b[4]^b[1]>>>16^b[7]<<16,u[3]=b[6]^b[3]>>>16^b[1]<<16;for(var w=0;w<4;w++)u[w]=16711935&(u[w]<<8|u[w]>>>24)|4278255360&(u[w]<<24|u[w]>>>8),_[y+w]^=u[w]},blockSize:4,ivSize:2});function v(){for(var _=this._X,y=this._C,b=0;b<8;b++)d[b]=y[b];for(y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0,b=0;b<8;b++){var w=_[b]+y[b],C=65535&w,T=w>>>16,I=((C*C>>>17)+C*T>>>15)+T*T,D=((4294901760&w)*w|0)+((65535&w)*w|0);p[b]=I^D}_[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,_[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,_[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,_[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,_[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,_[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,_[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,_[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}o.RabbitLegacy=s._createHelper(h)}(),n.RabbitLegacy)}),li(function(e,t){e.exports=hi}));function _re(){throw new Error("setTimeout has not been defined")}function yre(){throw new Error("clearTimeout has not been defined")}var Of=_re,Mf=yre;function bre(e){if(Of===setTimeout)return setTimeout(e,0);if((Of===_re||!Of)&&setTimeout)return Of=setTimeout,setTimeout(e,0);try{return Of(e,0)}catch{try{return Of.call(null,e,0)}catch{return Of.call(this,e,0)}}}typeof Wg.setTimeout=="function"&&(Of=setTimeout),typeof Wg.clearTimeout=="function"&&(Mf=clearTimeout);var sp,sd=[],xg=!1,v8=-1;function fQe(){xg&&sp&&(xg=!1,sp.length?sd=sp.concat(sd):v8=-1,sd.length&&xre())}function xre(){if(!xg){var e=bre(fQe);xg=!0;for(var t=sd.length;t;){for(sp=sd,sd=[];++v8<t;)sp&&sp[v8].run();v8=-1,t=sd.length}sp=null,xg=!1,function(n){if(Mf===clearTimeout)return clearTimeout(n);if((Mf===yre||!Mf)&&clearTimeout)return Mf=clearTimeout,clearTimeout(n);try{Mf(n)}catch{try{return Mf.call(null,n)}catch{return Mf.call(this,n)}}}(e)}}function sa(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];sd.push(new Ere(e,t)),sd.length!==1||xg||bre(xre)}function Ere(e,t){this.fun=e,this.array=t}Ere.prototype.run=function(){this.fun.apply(null,this.array)};var E4=Wg.performance||{};E4.now||E4.mozNow||E4.msNow||E4.oNow||E4.webkitNow;function Pf(){}function ci(){ci.init.call(this)}function wre(e){return e._maxListeners===void 0?ci.defaultMaxListeners:e._maxListeners}function hQe(e,t,n){if(t)e.call(n);else for(var o=e.length,s=a3(e,o),l=0;l<o;++l)s[l].call(n)}function pQe(e,t,n,o){if(t)e.call(n,o);else for(var s=e.length,l=a3(e,s),u=0;u<s;++u)l[u].call(n,o)}function mQe(e,t,n,o,s){if(t)e.call(n,o,s);else for(var l=e.length,u=a3(e,l),d=0;d<l;++d)u[d].call(n,o,s)}function vQe(e,t,n,o,s,l){if(t)e.call(n,o,s,l);else for(var u=e.length,d=a3(e,u),p=0;p<u;++p)d[p].call(n,o,s,l)}function gQe(e,t,n,o){if(t)e.apply(n,o);else for(var s=e.length,l=a3(e,s),u=0;u<s;++u)l[u].apply(n,o)}function zq(e,t,n,o){var s,l,u,d;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if((l=e._events)?(l.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),l=e._events),u=l[t]):(l=e._events=new Pf,e._eventsCount=0),u){if(typeof u=="function"?u=l[t]=o?[n,u]:[u,n]:o?u.unshift(n):u.push(n),!u.warned&&(s=wre(e))&&s>0&&u.length>s){u.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=u.length,d=p,typeof console.warn=="function"?console.warn(d):console.log(d)}}else u=l[t]=n,++e._eventsCount;return e}function Hq(e,t,n){var o=!1;function s(){e.removeListener(t,s),o||(o=!0,n.apply(e,arguments))}return s.listener=n,s}function Wq(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}function a3(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}Pf.prototype=Object.create(null),ci.EventEmitter=ci,ci.usingDomains=!1,ci.prototype.domain=void 0,ci.prototype._events=void 0,ci.prototype._maxListeners=void 0,ci.defaultMaxListeners=10,ci.init=function(){this.domain=null,ci.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Pf,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ci.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},ci.prototype.getMaxListeners=function(){return wre(this)},ci.prototype.emit=function(e){var t,n,o,s,l,u,d,p=e==="error";if(u=this._events)p=p&&u.error==null;else if(!p)return!1;if(d=this.domain,p){if(t=arguments[1],!d){if(t instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=d,t.domainThrown=!1,d.emit("error",t),!1}if(!(n=u[e]))return!1;var v=typeof n=="function";switch(o=arguments.length){case 1:hQe(n,v,this);break;case 2:pQe(n,v,this,arguments[1]);break;case 3:mQe(n,v,this,arguments[1],arguments[2]);break;case 4:vQe(n,v,this,arguments[1],arguments[2],arguments[3]);break;default:for(s=new Array(o-1),l=1;l<o;l++)s[l-1]=arguments[l];gQe(n,v,this,s)}return!0},ci.prototype.addListener=function(e,t){return zq(this,e,t,!1)},ci.prototype.on=ci.prototype.addListener,ci.prototype.prependListener=function(e,t){return zq(this,e,t,!0)},ci.prototype.once=function(e,t){if(typeof t!="function")throw new TypeError('"listener" argument must be a function');return this.on(e,Hq(this,e,t)),this},ci.prototype.prependOnceListener=function(e,t){if(typeof t!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Hq(this,e,t)),this},ci.prototype.removeListener=function(e,t){var n,o,s,l,u;if(typeof t!="function")throw new TypeError('"listener" argument must be a function');if(!(o=this._events))return this;if(!(n=o[e]))return this;if(n===t||n.listener&&n.listener===t)--this._eventsCount==0?this._events=new Pf:(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,l=n.length;l-- >0;)if(n[l]===t||n[l].listener&&n[l].listener===t){u=n[l].listener,s=l;break}if(s<0)return this;if(n.length===1){if(n[0]=void 0,--this._eventsCount==0)return this._events=new Pf,this;delete o[e]}else(function(d,p){for(var h=p,v=h+1,_=d.length;v<_;h+=1,v+=1)d[h]=d[v];d.pop()})(n,s);o.removeListener&&this.emit("removeListener",e,u||t)}return this},ci.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return arguments.length===0?(this._events=new Pf,this._eventsCount=0):n[e]&&(--this._eventsCount==0?this._events=new Pf:delete n[e]),this;if(arguments.length===0){for(var o,s=Object.keys(n),l=0;l<s.length;++l)(o=s[l])!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=new Pf,this._eventsCount=0,this}if(typeof(t=n[e])=="function")this.removeListener(e,t);else if(t)do this.removeListener(e,t[t.length-1]);while(t[0]);return this},ci.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?typeof t=="function"?[t.listener||t]:function(o){for(var s=new Array(o.length),l=0;l<s.length;++l)s[l]=o[l].listener||o[l];return s}(t):[]},ci.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Wq.call(e,t)},ci.prototype.listenerCount=Wq,ci.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var as=typeof Object.create=="function"?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},_Qe=/%[sdj%]/g;function yQe(e){if(!KM(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(nh(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,s=o.length,l=String(e).replace(_Qe,function(d){if(d==="%%")return"%";if(n>=s)return d;switch(d){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch{return"[Circular]"}default:return d}}),u=o[n];n<s;u=o[++n])fV(u)||!s3(u)?l+=" "+u:l+=" "+nh(u);return l}function Sre(e,t){if(Kf(Wg.process))return function(){return Sre(e,t).apply(this,arguments)};var n=!1;return function(){return n||(console.error(t),n=!0),e.apply(this,arguments)}}var kO,tw={};function nh(e,t){var n={seen:[],stylize:xQe};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Cre(t)?n.showHidden=t:t&&function(o,s){if(!s||!s3(s))return o;for(var l=Object.keys(s),u=l.length;u--;)o[l[u]]=s[l[u]]}(n,t),Kf(n.showHidden)&&(n.showHidden=!1),Kf(n.depth)&&(n.depth=2),Kf(n.colors)&&(n.colors=!1),Kf(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=bQe),Q8(n,e,n.depth)}function bQe(e,t){var n=nh.styles[t];return n?"\x1B["+nh.colors[n][0]+"m"+e+"\x1B["+nh.colors[n][1]+"m":e}function xQe(e,t){return e}function Q8(e,t,n){if(e.customInspect&&t&&OO(t.inspect)&&t.inspect!==nh&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return KM(o)||(o=Q8(e,o,n)),o}var s=function(b,w){if(Kf(w))return b.stylize("undefined","undefined");if(KM(w)){var C="'"+JSON.stringify(w).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return b.stylize(C,"string")}if(T=w,typeof T=="number")return b.stylize(""+w,"number");var T;if(Cre(w))return b.stylize(""+w,"boolean");if(fV(w))return b.stylize("null","null")}(e,t);if(s)return s;var l=Object.keys(t),u=function(b){var w={};return b.forEach(function(C,T){w[C]=!0}),w}(l);if(e.showHidden&&(l=Object.getOwnPropertyNames(t)),RO(t)&&(l.indexOf("message")>=0||l.indexOf("description")>=0))return AO(t);if(l.length===0){if(OO(t)){var d=t.name?": "+t.name:"";return e.stylize("[Function"+d+"]","special")}if(NO(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(jq(t))return e.stylize(Date.prototype.toString.call(t),"date");if(RO(t))return AO(t)}var p,h,v="",_=!1,y=["{","}"];return p=t,Array.isArray(p)&&(_=!0,y=["[","]"]),OO(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),NO(t)&&(v=" "+RegExp.prototype.toString.call(t)),jq(t)&&(v=" "+Date.prototype.toUTCString.call(t)),RO(t)&&(v=" "+AO(t)),l.length!==0||_&&t.length!=0?n<0?NO(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),h=_?function(b,w,C,T,I){for(var D=[],k=0,O=w.length;k<O;++k)Tre(w,String(k))?D.push(DO(b,w,C,T,String(k),!0)):D.push("");return I.forEach(function(L){L.match(/^\d+$/)||D.push(DO(b,w,C,T,L,!0))}),D}(e,t,n,u,l):l.map(function(b){return DO(e,t,n,u,b,_)}),e.seen.pop(),function(b,w,C){return b.reduce(function(T,I){return I.indexOf(`
259
+ `);f&&(this._log.info("updating answer"),yield this._peerConnection.setRemoteDescription({type:"answer",sdp:S}))})}replaceTrack(r){return Ke(this,null,function*(){var a;let c=(a=this._peerConnection)==null?void 0:a.getSenders(),f=r.outMediaTrack||r.mediaTrack;if(!c||c.length===0||!f||c.find(x=>x.track===f))return!1;let m=r===this.localAuxAudioTrack||r===this.localAuxVideoTrack;return this._log.info("is replacing ".concat(f.kind," track ").concat(f.id," on ").concat(m?Re.AUXILIARY:Re.MAIN," stream")),f.kind===Re.AUDIO&&c[0]&&(yield c[0].replaceTrack(f)),f.kind===Re.VIDEO&&(!m&&c[1]&&(yield c[1].replaceTrack(f)),m&&c[3]&&(yield c[3].replaceTrack(f))),!0})}setBandwidth(r){return Ke(this,arguments,function(a){var c=this;let{bandwidth:f,type:m,videoType:x}=a;return function*(){if(c.singlePC){let S={};m===Re.AUDIO?S.audio=f:x==="big"?S.bigVideo=f:x==="small"?S.smallVideo=f:S.auxVideo=f,yield c.singlePC.setBandwidth(S)}}()})}sendMutedFlag(r){r===this.localAuxAudioTrack||r===this.localAuxVideoTrack||(this._log.info("send muted state: ".concat(JSON.stringify(this.muteState))),this._signalChannel.sendWaitForResponseWithRetry({command:xz,responseCommand:zr.MUTE_RESULT,data:this.muteState,retries:3}).catch(()=>{}))}handleConnectionStateChange(r){r.state==="CONNECTED"&&(this.localMainVideoTrack||this._publishingLocalVideoTrack&&!this._isPublishingAux)&&un.emit(Gt.SEND_FIRST_VIDEO_FRAME,{room:this._room})}getVideoTrackId(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Re.VIDEO;if(this._peerConnection){let a=this._peerConnection.getSenders();if(r===Re.AUXILIARY&&a[3]&&a[3].track)return a[3].track.id;if(r===Re.VIDEO&&a[1]&&a[1].track)return a[1].track.id}if(this.localMainVideoTrack&&r===Re.VIDEO){let a=this.localMainVideoTrack.mediaTrack;if(a)return a.id}if(this.localAuxVideoTrack&&r===Re.AUXILIARY){let a=this.localAuxVideoTrack.mediaTrack;if(a)return a.id}return""}getSSRC(){return this.ssrc}checkPublishResultCode(r,a){if(r!==0)throw r===Ix?(this._log.error(Rl.NOT_SUPPORTED_H264ENCODE),new Gn({code:Tn.NOT_SUPPORTED_H264,message:Rr({key:Ir.NOT_SUPPORTED_H264ENCODE})})):new Gn({code:Tn.UNKNOWN,message:Rr({key:Ir.SIGNAL_RESPONSE_FAILED,data:{signalResponse:zr.PUBLISH_RESULT,code:r,message:a}})})}onSinglePCReconnected(){return Ke(this,null,function*(){this.isMainStreamPublished&&(this._log.warn("republish main stream"),yield this.publish({localAudioTrack:this.localMainAudioTrack,localVideoTrack:this.localMainVideoTrack,isAuxiliary:!1})),this.isAuxStreamPublished&&(this._log.warn("republish aux stream"),yield this.publish({localAudioTrack:this.localAuxAudioTrack,localVideoTrack:this.localAuxVideoTrack,isAuxiliary:!0}))})}};function zz(r){return Object.keys(r).filter(a=>r[a])}var xE=class extends Uz{constructor(r){super($r(Jn({},r),{isUplink:!1})),se(this,"_flag",0),se(this,"role","anchor"),se(this,"remoteAudioTrack"),se(this,"remoteVideoTrack"),se(this,"remoteAuxiliaryTrack"),se(this,"ssrc",{audio:0,video:0,videoRtx:0,auxiliary:0,auxiliaryRtx:0}),this.flag=r.flag,this.remoteAudioTrack=new mN(this._room,this),this.remoteVideoTrack=new K_(this._room,this),this.remoteAuxiliaryTrack=new tz(this._room,this),this.initialize()}get videoCodec(){var r;return((r=this.singlePC)==null?void 0:r.downlinkVideoCodec)||"h264"}get subscribeState(){return{audio:this.remoteAudioTrack.isSubscribed||this.remoteAudioTrack.isSubscribing,video:this.remoteVideoTrack.isBig&&(this.remoteVideoTrack.isSubscribed||this.remoteVideoTrack.isSubscribing),smallVideo:this.remoteVideoTrack.isSmall&&(this.remoteVideoTrack.isSubscribed||this.remoteVideoTrack.isSubscribing),auxiliary:this.remoteAuxiliaryTrack.isSubscribed||this.remoteAuxiliaryTrack.isSubscribing}}get muteState(){return P_(this.flag,this.userId)}get flag(){return this._flag}set flag(r){var a,c,f;r!==this._flag&&(this._flag=r,(a=this.remoteAudioTrack)==null||a.onFlagChanged(),(c=this.remoteVideoTrack)==null||c.onFlagChanged(),(f=this.remoteAuxiliaryTrack)==null||f.onFlagChanged())}get hasMainStream(){return this.muteState.hasAudio||this.muteState.hasVideo||this.muteState.hasSmall}get hasAuxStream(){return this.muteState.hasAuxiliary}get isMainStreamSubscribed(){return(this.subscribeState.audio||this.subscribeState.video||this.subscribeState.smallVideo)&&(this.muteState.hasAudio||this.muteState.hasVideo||this.muteState.hasSmall)}get isAuxStreamSubscribed(){return this.subscribeState.auxiliary&&this.muteState.hasAuxiliary}get isSmallStreamSubscribed(){return this.subscribeState.smallVideo&&this.muteState.hasSmall}get isBigStreamSubscribed(){return this.subscribeState.video&&this.muteState.hasVideo}isStreamUnpublished(r){return r===Re.MAIN?!this.muteState.hasAudio&&!this.muteState.hasVideo:!this.muteState.hasAuxiliary}initialize(){this.installEvents()}close(r){super.close(r),this.emitConnectionStateChangedEvent("DISCONNECTED"),this.remoteAudioTrack.close(),this.remoteVideoTrack.close(),this.remoteAuxiliaryTrack.close(),this.uninstallEvents(),this.removeDownlink()}installEvents(){!this.singlePC||(this.listeners("track").includes(this.onTrack)||this.singlePC.on("track",this.onTrack,this),this.listeners("spc-reconnected").includes(this.onSinglePCReconnected)||this.singlePC.on("spc-reconnected",this.onSinglePCReconnected,this))}uninstallEvents(){!this.singlePC||(this.singlePC.off("track",this.onTrack,this),this.singlePC.off("spc-reconnected",this.onSinglePCReconnected,this))}emitConnectionStateChangedEvent(r){var a,c;let f=this._currentState,m=super.emitConnectionStateChangedEvent(r);return m&&f!==r&&((a=this.remoteVideoTrack)==null||a.emit("connection-state-changed",{prevState:f,state:r}),(c=this.remoteAuxiliaryTrack)==null||c.emit("connection-state-changed",{prevState:f,state:r})),m}onTrack(r){let a=r.streams[0],{track:c,receiver:f}=r;if(!a.id.includes(this.tinyId))return;let m=a.id.includes("aux")?"auxiliary":"main";this._log.debug("ontrack ".concat(m," ").concat(c.kind));let x=Re.AUDIO;c.kind===Re.VIDEO&&(x=m===Re.MAIN?Re.VIDEO:Re.AUXILIARY);let S=this.remoteAudioTrack;x===Re.VIDEO?S=this.remoteVideoTrack:x===Re.AUXILIARY&&(S=this.remoteAuxiliaryTrack),this.singlePC.enableInsertableStreams&&this.createEncodedStreams(S,f),S.setInputMediaStreamTrack(c)}createEncodedStreams(r,a){if(!this.singlePC.abortMap.has(a)){let c=a.createEncodedStreams(),f=new AbortController,m={abortController:f,enqueue:x=>{var S;return(S=this.singlePC)!=null&&S.isUsingH264?r.decodeFrame(x):x}};(r.enableDecodeFrame?c.readable.pipeThrough(new TransformStream({transform:(x,S)=>S.enqueue(m.enqueue(x))})):c.readable).pipeTo(c.writable,f).catch(x=>{x!=="destory"&&this._log.warn(x)}),this.singlePC.addAbortController(a,f)}}subscribe(r,a){return Ke(this,null,function*(){try{if(this._log.info("subscribe ".concat(a," ").concat(zz(r))),this.hasSSRC){let c="subscribe_change";Object.values(r).find(f=>f===!0)||(c="unsubscribe"),yield this.sendSubscription(c,r)}else yield this.doSubscribe(r),this.checkTrackEnded(r)}catch(c){throw this._room.isJoined&&this.isStreamUnpublished(a)?(this._log.warn("".concat(c.message," ").concat(JSON.stringify(this.muteState))),new Gn({code:Tn.REMOTE_STREAM_NOT_EXIST,message:"remote user ".concat(this.userId," unpublished stream")})):c}})}checkTrackEnded(r){var a,c,f;if((r.audio&&((a=this.remoteAudioTrack.mediaTrack)==null?void 0:a.readyState)==="ended"||r.video&&((c=this.remoteVideoTrack.mediaTrack)==null?void 0:c.readyState)==="ended"||r.auxiliary&&((f=this.remoteAuxiliaryTrack.mediaTrack)==null?void 0:f.readState)==="ended")&&this.singlePC&&!this.singlePC.isReconnecting){if(this._log.warn("remote track ended start spc reconnect"),S0&&C0<92)return;this.singlePC.startReconnection()}}unsubscribe(r){return Ke(this,arguments,function(a){var c=this;let{remoteTracks:f,streamType:m}=a;return function*(){var x;if(m==="main"&&!c.isMainStreamSubscribed||m==="auxiliary"&&!c.isAuxStreamSubscribed)return void c._log.info("".concat(m," stream already unsubscribed"));let S=Jn({},c.subscribeState);f.forEach(A=>{switch(A.mediaType){case 1:S.audio=!1;break;case 4:S.video=!1;break;case 8:S.smallVideo=!1;break;case 2:S.auxiliary=!1}});let R="subscribe_change";Object.values(S).find(A=>A===!0)||(R="unsubscribe"),c._log.info("".concat(R==="unsubscribe"?R:"subscribe"," ").concat(m," [").concat(zz(S),"]")),R==="unsubscribe"&&((x=c.singlePC)==null||x.removeDownlinkQueue.add(c.tinyId)),yield c.sendSubscription(R,S),R==="unsubscribe"&&(yield c.removeDownlink())}()})}sendSubscription(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.subscribeState,c={srcTinyId:this.tinyId,srcUserId:this.userId},f=wz,m=zr.UNSUBSCRIBE_RESULT;return r==="subscribe_change"&&(c={audio:a.audio,bigVideo:a.video,auxVideo:a.auxiliary,smallVideo:a.smallVideo,srcTinyId:this.tinyId},f=Sz,m=zr.SUBSCRIBE_CHANGE_RESULT),this._signalChannel.sendWaitForResponseWithRetry({command:f,data:c,responseCommand:m,timeout:1e4,retries:3}).then(x=>{let{data:S}=x;if(S.code!==0){let R=new Gn({code:S.code,message:Rr({key:Ir.ERROR_MESSAGE,data:{type:r,message:S.message}})});throw this._log.error(R),R}})}getMainStreamVideoTrackId(){return this.remoteVideoTrack&&this.remoteVideoTrack.mediaTrack?this.remoteVideoTrack.mediaTrack.id:""}getAuxStreamVideoTrackId(){return this.remoteAuxiliaryTrack&&this.remoteAuxiliaryTrack.mediaTrack?this.remoteAuxiliaryTrack.mediaTrack.id:""}setDelay(r){let{audioDelay:a,videoDelay:c}=r;this.remoteAudioTrack.stat.end2EndDelay=a,this.remoteVideoTrack.stat.end2EndDelay=c}onSinglePCReconnected(){(this.ssrc.audio||this.ssrc.video||this.ssrc.auxiliary)&&(this._log.warn("resubscribe ".concat(JSON.stringify(this.subscribeState))),this.doSubscribe(this.subscribeState))}get hasSSRC(){return this.ssrc.audio&&this.ssrc.video&&this.ssrc.auxiliary}doSubscribe(){return Ke(this,arguments,function(){var r=this;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.subscribeState,c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return function*(){if(r.singlePC){r.singlePC.addDownlinkQueue.add(r.tinyId),yield r.singlePC.waitForPeerConnectionConnected();try{if(c||!r.hasSSRC){let f={audioSsrc:Lv(),bigVideoSsrc:Lv(),bigVideoRtxSsrc:Lv(),auxVideoSsrc:Lv(),auxVideoRtxSsrc:Lv()},{audioSsrc:m,bigVideoSsrc:x,bigVideoRtxSsrc:S,auxVideoSsrc:R,auxVideoRtxSsrc:A}=f;r.ssrc={audio:m,video:x,videoRtx:S,auxiliary:R,auxiliaryRtx:A},r.singlePC.addDownlinkQueue.delete(r.tinyId),yield r.singlePC.addDownlink({userId:r.userId,tinyId:r.tinyId,ssrc:r.ssrc});try{let B=yield r._signalChannel.sendWaitForResponseWithRetry({command:Pde,responseCommand:zr.SPC_SUBSCRIBE_RESULT,data:{srcUserId:r.userId,srcTinyId:r.tinyId,audio:a.audio,bigVideo:a.video,auxVideo:a.auxiliary,smallVideo:a.smallVideo,customData:!1,ssrc:f},retries:3,retryTimeout:0});if(B.data.code!==0)throw new Gn({code:B.data.code,message:B.data.message})}catch(B){throw yield r.removeDownlink(),B}return}r.singlePC.addDownlinkQueue.delete(r.tinyId),yield r.singlePC.addDownlink({userId:r.userId,tinyId:r.tinyId,ssrc:r.ssrc})}finally{let f=r._room.scheduleResult.config;(f!=null&&f.jitterDelay||f!=null&&f.jitterDelayAux)&&r.setJitterBufferDelay({mainDelay:f.jitterDelay,auxDelay:f.jitterDelayAux})}}}()})}removeDownlink(){return Ke(this,null,function*(){if(!this.singlePC)return;this.ssrc={audio:0,video:0,videoRtx:0,auxiliary:0,auxiliaryRtx:0},this.singlePC.removeDownlinkQueue.delete(this.tinyId);let r=this._room.scheduleResult.config;(r!=null&&r.jitterDelay||r!=null&&r.jitterDelayAux)&&this.setJitterBufferDelay({mainDelay:0,auxDelay:0}),yield this.singlePC.removeDownlink(this.userId)})}setJitterBufferDelay(r){let{mainDelay:a,auxDelay:c}=r;if(!this.singlePC||!this._peerConnection||D0(a)&&D0(c))return Promise.resolve();this._log.info("set jitterBuffer main: ".concat(a," aux: ").concat(c));let f=this.singlePC.getReceiversByUserId(this.userId);return So(a)&&(this.remoteAudioTrack.jitterBufferDelay=a,this.remoteVideoTrack.jitterBufferDelay=a),So(c)&&(this.remoteAuxiliaryTrack.jitterBufferDelay=c,D0(a)&&(this.remoteAudioTrack.jitterBufferDelay=c)),new Promise(m=>{this.doSetJitterBufferDelay({mainDelay:a,auxDelay:c,receivers:f,resolve:m})})}doSetJitterBufferDelay(r){let{mainDelay:a,auxDelay:c,receivers:f,resolve:m}=r,x=-1;try{if(a===0&&c===0)return f.forEach(S=>S.jitterBufferTarget=0),m();if(f.forEach(S=>{var R;let A=S.track===this.remoteAuxiliaryTrack.outMediaTrack||D0(a)&&S.track===this.remoteAudioTrack.outMediaTrack;if(A&&D0(c)||!A&&D0(a))return;let B=A?c||0:a,q=(S.jitterBufferTarget||0)+100;q>B||(S.jitterBufferTarget=q,this._log.debug("set ".concat(A?"aux ":"").concat((R=S==null?void 0:S.track)==null?void 0:R.kind," jitterBuffer delay ").concat(q," -> ").concat(B)))}),!f.find(S=>{let R=S.track===this.remoteAuxiliaryTrack.outMediaTrack?c||0:a;return S.jitterBufferTarget<R}))return this._log.info("set jitterBuffer main: ".concat(a," aux: ").concat(c," done")),m();x=setTimeout(()=>{this.doSetJitterBufferDelay({mainDelay:a,auxDelay:c,receivers:f,resolve:m})},1e3)}catch(S){this._log.warn("set jitterBuffer delay error: ".concat(S)),clearTimeout(x),m()}}};Ln([Av(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];return new Promise((m,x)=>{let S=R=>{this.off("closed",S),x(new Gn({code:Tn.API_CALL_ABORTED,message:Rr({key:Ir.CONNECTION_ABORTED,data:R})}))};this.on("closed",S),r.apply(this,c).then(m,x).finally(()=>{this.off("closed",S)})})})],xE.prototype,"subscribe"),Ln([Av()],xE.prototype,"unsubscribe"),Ln([Dv(()=>"jitter")],xE.prototype,"setJitterBufferDelay");var ufe=xE,dfe=oa(ts()),Hz=class extends dfe.EventEmitter{constructor(r,a){super(),this.room=r,this.signalChannel=a,se(this,"log"),se(this,"cmdIdSeqMap",new Map),se(this,"messageMap",new Map),this.log=Rn.createLogger({id:"cmm",userId:r.userId}),this.onReceiveMsg=this.onReceiveMsg.bind(this),a.on(zr.RECEIVE_CUSTOM_MSG,this.onReceiveMsg)}send(r){let{cmdId:a,data:c}=r,f=this.cmdIdSeqMap.get(a)||Math.floor(16383*Math.random()),m={cmdId:a,msg:btoa(String.fromCharCode(...new Uint8Array(c))),ordered:!0,reliable:!0,streamSeq:f};this.cmdIdSeqMap.set(a,f+1),this.signalChannel.send(Bde,m)}onReceiveMsg(r){let{data:a}=r.data,c=this.room.tinyIdToUserIdMap.get(a.srcTinyId);if(c){let f={userId:c,cmdId:a.cmdId,seq:a.streamSeq,data:Uint8Array.from(atob(a.msg),m=>m.charCodeAt(0)).buffer};if(a.ordered){let m="".concat(c,"_").concat(f.cmdId),x=this.messageMap.get(m);if(!x||Math.abs(x.lastSeq-f.seq)>Hz.SEQ_INTERVAL)this.messageMap.set(m,{lastSeq:f.seq,cachedMessageMap:new Map}),this.emitMessage(f);else if(f.seq>x.lastSeq){if(f.seq===x.lastSeq+1)this.emitMessage(f);else if(!x.cachedMessageMap.has(f.seq)){let S=setTimeout(()=>this.emitMessage(f,!0),5e3);x.cachedMessageMap.set(f.seq,{message:f,timeoutId:S})}}else this.log.debug("drop message ".concat(f.userId,"-").concat(f.cmdId,"-").concat(f.seq))}else this.emit("message",f)}}emitMessage(r){let a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];var c;let f=this.messageMap.get("".concat(r.userId,"_").concat(r.cmdId)),m=r;if(f){if(a){let S=[...f.cachedMessageMap.values()].sort((R,A)=>R.message.seq-A.message.seq);S[0]&&(m=S[0].message)}m.seq-f.lastSeq>1&&this.log.debug("msg lost userId: ".concat(m.userId," seq: ").concat(f.lastSeq," -> ").concat(m.seq)),f.lastSeq=m.seq,clearTimeout((c=f.cachedMessageMap.get(m.seq))==null?void 0:c.timeoutId),f.cachedMessageMap.delete(m.seq)}this.emit("message",m);let x=f==null?void 0:f.cachedMessageMap.get(m.seq+1);x&&this.emitMessage(x.message)}},Wz=Hz;se(Wz,"SEQ_INTERVAL",300);var jz,{isString:Gz,isUndefined:Bv,getNetworkType:ffe,isEmpty:s4}=gc,wf=class extends efe{constructor(r){super(r),this._heartbeat=-1,this._lastHeartBeatTime=-1,this._joinTimeout=-1,this._firstPublishedList=null,this._joinReject=null,this._isRelayChanged=!1,this._signalChannel=null,this.uplinkConnection=null,this.singlePC=null,this.enableSPC=$_,this._changeBigSmallRecords=new Map,this._networkQuality=null,this._turnServers=[],this._syncUserListInterval=-1,this._smallStreamConfig={bitrate:100,frameRate:15,height:120,width:160},this.enableSEI=!1,this._enableAudioVolumeEvaluation=!1,this._audioVolumeIntervalId=0,this._enableMultiAuxStream=!1,this._pureAudioPushMode=!1,this.enableHWEncoder=!1,this._stats=new $de(this,this._log),this.userManager=new Que(this.userId,this._log),this._version=_c,this.sdpSemantics=Tx,Bv(r.sdpSemantics)?L_.isUnifiedPlanDefault()&&(this.sdpSemantics=m_):this.sdpSemantics=r.sdpSemantics,this._log.info("sdpSemantics: ".concat(this.sdpSemantics,", netType: ").concat(ffe())),r.iceTransportPolicy&&(this._iceTransportPolicy=r.iceTransportPolicy),this._enableMultiAuxStream=!Bv(r.enableMultiAuxStream)&&r.enableMultiAuxStream,this.enableSEI=r.enableSEI&&$_,!Bv(r.enableSPC)&&$_&&(this.enableSPC=r.enableSPC),this.enableHWEncoder=r.enableHWEncoder||!1,this._initBusinessInfo(r)}get isMainStreamPublished(){var r;return!((r=this.uplinkConnection)==null||!r.isMainStreamPublished)}get isMainAudioPublished(){var r;return!((r=this.uplinkConnection)==null||!r.localMainAudioTrack)}get isAuxStreamPublished(){var r;return!((r=this.uplinkConnection)==null||!r.isAuxStreamPublished)}get hasAuxStream(){return[...this.remotePublishedUserMap.values()].findIndex(r=>r.muteState.hasAuxiliary)>=0}get userMap(){return this.userManager.userMap}get remotePublishedUserMap(){return this.userManager.remotePublishedUserMap}get tinyIdToUserIdMap(){return new Map([...this.userMap.values()].map(r=>[r.tinyId,r.userId]))}join(r,a,c){return Ke(this,null,function*(){return this.userManager.mySelfId=this.userId,this.userManager.on("1",f=>{this.emit("peer-join",f)}),this.userManager.on("2",f=>{this.closeDownLinkConnection(f,"remote user exitRoom"),this.emit("peer-leave",f)}),this.userManager.on("3",this.createDownlinkConnection,this),this.userManager.on("5",this.closeDownLinkConnection,this),this.userManager.on("6",f=>{var m=((x,S)=>{var R={};for(var A in x)UD.call(x,A)&&S.indexOf(A)<0&&(R[A]=x[A]);if(x!=null&&Ex)for(var A of Ex(x))S.indexOf(A)<0&&r$.call(x,A)&&(R[A]=x[A]);return R})(f,[]);un.emit(Gt.REMOTE_PUBLISH_STATE_CHANGED,Jn({room:this},m)),this.emit("remote-publish-state-changed",Jn({},m))}),this.joinParams=r,new Promise((f,m)=>Ke(this,null,function*(){var x,S;this._joinReject=m;try{this.checkDestroy();try{yield Promise.all([this.initialize(),this.initSinglePC()])}catch(R){if(!(R instanceof Gn&&R.code===Tn.SPC_INITIALIZED_FAILED))return m(R);(x=this._signalChannel)==null||x.destroy(),yield this.initialize()}yield this.doJoin(r,(S=this.singlePC)==null?void 0:S.clientAbility),f(),this._firstPublishedList&&this.onPublishedUserList({data:{userList:this._firstPublishedList}})}catch(R){m(R)}this._joinReject=null}))})}initSinglePC(){return Ke(this,null,function*(){if(this.enableSPC&&!this.singlePC){this.singlePC=new a4({signalChannel:this._signalChannel,room:this,enableCustomMessage:!1}),this.singlePC.on("sei-message",r=>this.emit("sei-message",r)),this.singlePC.once("error",()=>this.fallbackToMPC());try{return yield this.singlePC.initialize()}catch(r){throw this.fallbackToMPC(),new Gn({code:Tn.SPC_INITIALIZED_FAILED,message:r==null?void 0:r.message})}}})}doJoin(r,a){return new Promise((c,f)=>Ke(this,null,function*(){var m,x,S;r.privateMapKey&&(this.privateMapKey=r.privateMapKey),r.latencyLevel&&(this.latencyLevel=r.latencyLevel),this._signalChannel.once(bz,B=>{this.clearJoinTimeout(),un.emit(Gt.JOIN_SIGNAL_CONNECTION_END,{room:this,error:B}),f(B)}),Ts((x=(m=this.scheduleResult)==null?void 0:m.config)==null?void 0:x.singlePC)&&$_&&(this.enableSPC=this.scheduleResult.config.singlePC),this.keyPointManager.setConnectionType(this.singlePC?1:2);let R={roomId:String(r.roomId||r.strRoomId),useStringRoomId:this.useStringRoomId,privateMapKey:this.privateMapKey,latencyLevel:this.latencyLevel,trtcRole:r.role,trtcScene:this.scene==="live"?2:1,sdpSemantics:this.sdpSemantics,version:this._version,ua:navigator&&navigator.userAgent||"",terminalType:H$(),netType:Wx(),bussinessInfo:this._businessInfo,ability:a,sdkType:this._sdkType,userSig:this.userSig};this._log.debug("join room signal data: ".concat(JSON.stringify(R)));let A=5e3;(S=this.scheduleResult.config)!=null&&S.enterRoomTimeout&&this.scheduleResult.config.enterRoomTimeout>=1&&(A=1e3*this.scheduleResult.config.enterRoomTimeout),this._joinTimeout=window.setTimeout(()=>{f(new Gn({code:Tn.JOIN_ROOM_FAILED,message:Rr({key:Ir.JOIN_ROOM_TIMEOUT})}))},A),un.emit(Gt.JOIN_SEND_CMD,{room:this}),this._signalChannel.send(this.singlePC?Ode:yde,R),this._signalChannel.once(zr.JOIN_ROOM_RESULT,B=>{this.clearJoinTimeout();let{code:q,message:j,data:he,tinyId:xe}=B.data;un.emit(Gt.JOIN_RECEIVED_CMD_RES,{room:this,code:q}),q===0?(this._log.info("Join room success, start heartbeat"),xe&&(this.tinyId=xe),this.startHeartbeat(),this.syncUserList(),this.startSyncUserListInterval(),this._firstPublishedList=he.publishers,this.singlePC&&this.singlePC.connect(he.ability).catch(()=>{}),c()):(this._log.error("Join room failed result: ".concat(q," error: ").concat(j)),f(new Gn({code:Tn.JOIN_ROOM_FAILED,extraCode:q,message:Rr({key:Ir.JOIN_ROOM_FAILED,data:{error:j,code:q}})})))})}))}reJoin(){let r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Ke(this,null,function*(){if(this.isJoined)try{this._log.warn("reJoin pending: ".concat(this.joinParams.roomId));let a,c=[];if(this.singlePC&&(this.singlePC.close(),this.singlePC=null,c.push(this.initSinglePC().then(f=>(a=f,f)))),this._signalChannel&&(this._signalChannel.race=r,this._signalChannel.close(),c.push(this._signalChannel.connect())),yield Promise.all(c),yield this.doJoin($r(Jn({},this.joinParams),{role:this.role==="anchor"?20:21,privateMapKey:this.privateMapKey,latencyLevel:this.latencyLevel}),a),this._log.warn("reJoin success"),ao.logSuccessEvent({userId:this.userId,eventType:Au.REJOIN}),this.singlePC){let f=m=>{var x;m.state==="CONNECTED"&&((x=this.singlePC)==null||x.off(H0.CONNECTION_STATE_CHANGED,f),this.uplinkConnection instanceof ON&&(this.uplinkConnection.installEvents(),this.uplinkConnection.onSinglePCReconnected()),this.remotePublishedUserMap.forEach(S=>{S.installEvents(),S.onSinglePCReconnected()}))};this.singlePC.on(H0.CONNECTION_STATE_CHANGED,f),this.checkConnectionsToReconnect(),this.uplinkConnection instanceof DN&&!this.uplinkConnection.getIsReconnecting()&&this.uplinkConnection.startReconnection()}}catch(a){this._log.warn("reJoin fail ".concat(a)),this.reset(),ao.logFailedEvent({userId:this.userId,eventType:Au.REJOIN,error:a}),this.emit("error",new Gn({code:Tn.JOIN_ROOM_FAILED,message:Rr({key:Ir.REJOIN_ROOM_FAILED,data:{roomId:this.joinParams.roomId}})}))}else this._log.warn("reJoin abort")})}initialize(){return Ke(this,null,function*(){let r,{mainUrl:a,backupUrl:c}=this.getSignalChannelUrl(),f=this._signalChannel||function(x){return[...gE.values()].find(R=>R.room.userId===x&&!R.room.isJoined)||null}(this.userId),m=!!(f&&f.isConnected&&f.keepAlive);return Array.isArray(this.scheduleResult.domains)&&this.scheduleResult.domains.length>0&&(r=this.scheduleResult.domains[0]),this._log.info("".concat(m?"reuse":"setup"," signal channel")),m?(f.url=a,f.backupUrl=c,f.room=this,this._signalChannel=f):(this._signalChannel=new Tz({sdkAppId:this.sdkAppId,userId:this.userId,userSig:this.userSig,url:a,backupUrl:c,race:this.enableSPC&&!this.proxy_ws,room:this,signalDomainWhenUnifiedProxy:this.proxy_unified?r:void 0}),this._customMessageManager=new Wz(this,this._signalChannel),this._customMessageManager.on("message",x=>{this.emit("custom-message",x)})),this._networkQuality||(this._networkQuality=new NN({signalChannel:this._signalChannel,room:this}),this._networkQuality.on(NN.EVENT_NETWORK_QUALITY,x=>{this.emit("network-quality",x)})),Ml(this,this._signalChannel).add(wN,x=>{un.emit(Gt.SIGNAL_CONNECTION_STATE_CHANGED,Jn({room:this},x)),this.emit("signal-connection-state-changed",x)}).add(vde,x=>{this.reset(),this.emit("error",x)}).add(zr.PEER_JOIN,x=>{let{srcTinyId:S,userId:R,role:A}=x.data.data;this.userManager.addUser({userId:R,tinyId:S,role:A})}).add(zr.PEER_LEAVE,x=>{let{userId:S,reason:R=0}=x.data.data;this.userManager.deleteUser(S,R)}).add(zr.UPDATE_REMOTE_MUTE_STAT,x=>{this._lastHeartBeatTime>0&&Date.now()-this._lastHeartBeatTime>=1e4&&this.doHeartbeat(),this.onPublishedUserList(x.data)}).add(zr.CLIENT_BANNED,x=>{let S=x.data.data,{reason:R}=S;if(ao.uploadEvent({log:"stat-banned:".concat(R),userId:this.userId}),R==="user_time_out")return this._log.warn("".concat(R," last heart beat time: ").concat(this._lastHeartBeatTime," interval: ").concat(Date.now()-this._lastHeartBeatTime,", visibility: ").concat(document.visibilityState)),void this.reJoin();this._log[R==="kick"?"error":"info"]("user was banned because of [".concat(R,"]")),this.reset(),this.emit("banned",{reason:R})}),this._signalChannel.once(yz,x=>{this.tinyId=x.signalInfo.tinyId,un.emit(Gt.JOIN_SIGNAL_CONNECTION_END,{room:this})}),un.emit(Gt.JOIN_SIGNAL_CONNECTION_START,{room:this}),yield this._signalChannel.connect(),m&&un.emit(Gt.JOIN_SIGNAL_CONNECTION_END,{room:this}),m})}setSignalChannel(r){this._signalChannel=r,r||Fa(this)}leave(){return Ke(this,null,function*(){var r;try{yield this.doHeartbeat()}catch{}this._log.info("leave() => leaving room"),un.emit(Gt.LEAVE_SEND_CMD,{room:this}),(r=this._signalChannel)==null||r.send(bde)})}clearNetworkQuality(){this._networkQuality&&(this._networkQuality.stop(),this._networkQuality=null)}closeConnections(){this.remotePublishedUserMap.forEach(r=>{this.closeDownLinkConnection(r.userId,"you exitRoom")})}clearJoinTimeout(){clearTimeout(this._joinTimeout),this._joinTimeout=-1}startHeartbeat(){this._heartbeat===-1&&(this._heartbeat=vo.run(y_,this.doHeartbeat.bind(this),{delay:2e3}))}stopHeartbeat(){this._heartbeat!==-1&&(this._log.info("stopHeartbeat"),vo.clearTask(this._heartbeat),this._heartbeat=-1,this._lastHeartBeatTime=-1)}doHeartbeat(){return Ke(this,null,function*(){var r;let a=this.badCaseDetector.getMonitorFreeze(),c=yield this._stats.getStatsReport({uplinkConnection:this.uplinkConnection,downlinkConnections:this.remotePublishedUserMap,freezeMap:a});if(this.badCaseDetector.resetMonitor(),(r=this._signalChannel)==null||!r.isConnected)return;let f=this._signalChannel.isConnected?function(S){if(Nv.has(S)){let R=Nv.get(S).map(A=>({uint32_event_id:A.eventId,uint64_date:A.timestamp,str_userid:A.remoteUserId,uint32_param1:A.param1,uint32_param2:A.param2,uint32_video_stream_type:A.streamType}));return Nv.delete(S),R}return[]}(this.userId):[],m=$r(Jn({str_sdk_version:GD,uint64_datetime:new Date().getTime(),msg_user_info:{str_identifier:this.userId,uint64_tinyid:this.tinyId},msg_event_msg:f,str_acc_ip:this.getSignalInfo().relayIp,str_client_ip:this.getSignalInfo().clientIp},c),{msg_device_info:Jn({uint32_terminal_type:15,str_device_name:navigator.platform,str_os_version:"",uint32_net_type:Wx()},c.msg_device_info)});this.heartbeatReport=m,un.emit(Gt.HEARTBEAT_REPORT,{room:this,report:m}),this._signalChannel.send(xde,m),this.emit("heartbeat-report",$r(Jn({},m),{bytes_sent:this._stats.totalBytesSent+this._signalChannel.bytesSent,bytes_received:this._stats.totalBytesReceived+this._signalChannel.bytesReceived}));let x=Date.now();this._lastHeartBeatTime>0&&x-this._lastHeartBeatTime>1e4&&this._log.warn("heartbeat took ".concat(x-this._lastHeartBeatTime)),this._signalChannel.isConnected&&(this._lastHeartBeatTime=x),!this._isRelayChanged&&this.isRelayMaybeFailed()&&(this.reJoin(),this._isRelayChanged=!0)})}onPublishedUserList(r){if(!this.isJoined)return;let a=r.data.userList.map(c=>{let{userId:f,srcTinyId:m,flag:x}=c;f===this.userId&&this.uplinkConnection&&(this.uplinkConnection.flag=x);let S=this.remotePublishedUserMap.get(f);return S&&this.checkSubscribeBigSmallVideo(S),{userId:f,tinyId:m,flag:x}});un.emit(Gt.RECEIVED_PUBLISHED_USER_LIST,{room:this,publishedUserList:a}),this.userManager.setRemotePublishedUserList(a)}closeUplink(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"you unpublished";this.uplinkConnection&&(this.localTracks.size>0&&this.uplinkConnection.doUnpublish(),this.uplinkConnection.close(r),this.uplinkConnection=null),this.localTracks.forEach(a=>a.unpublish()),this.localTracks.clear()}createDownlinkConnection(r){let{userId:a,tinyId:c,flag:f}=r,m=new(this.singlePC?ufe:Dz)({userId:a,tinyId:c,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,flag:f});this.userManager.addRemotePublishedUser(m),this.installDownlinkEvents(m,a),this.emit("remote-published",m)}closeDownLinkConnection(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"remote user unpublished",c=this.remotePublishedUserMap.get(r);c&&(c.close(a),this.emit("remote-unpublished",c))}installDownlinkEvents(r,a){r.on("error",c=>{let f=c.getCode();f!==Tn.ICE_TRANSPORT_ERROR&&(f===Tn.DOWNLINK_RECONNECTION_FAILED&&this.closeDownLinkConnection(a),this.emit("error",c))}),r.on("connection-state-changed",c=>{this.emit("media-connection-state-changed",$r(Jn({},c),{userId:r.userId}))}),r.on("firewall-restriction",()=>{this.emit("firewall-restriction")})}startSyncUserListInterval(){this._syncUserListInterval===-1&&(this._syncUserListInterval=vo.run(y_,this.syncUserList.bind(this)))}stopSyncUserListInterval(){vo.clearTask(this._syncUserListInterval),this._syncUserListInterval=-1}syncUserList(){return this.getUserList().then(r=>{this.userManager.setUserList(r)}).catch(r=>{this._log.debug("sync user list failed: ".concat(r))})}getUserList(){var r;return(r=this._signalChannel)!=null&&r.isConnected?this._signalChannel.sendWaitForResponse({command:Dde,responseCommand:zr.USER_LIST_RES,enableLog:!1,timeout:2e3}).then(a=>{let{data:c}=a,{code:f,message:m}=c;if(f===0)return(c.data&&c.data.userList||[]).map(x=>{let{userId:S,srcTinyId:R,role:A}=x;return{userId:S,tinyId:R,role:A}});throw Rr({key:Ir.SIGNAL_RESPONSE_FAILED,data:{signalResponse:zr.USER_LIST_RES,code:f,message:m}})}):Promise.reject("not connected")}getAllConnections(){let r=[...this.remotePublishedUserMap.values()];return this.uplinkConnection&&r.push(this.uplinkConnection),r}isRelayMaybeFailed(){if(this._signalChannel&&!this._signalChannel.isOnline||!Iz)return!1;if(this.singlePC)return this.singlePC.reconnectionCount>6;let r=this.getAllConnections();if(r.length===0)return!1;for(let a=0;a<r.length;a++)if(r[a].getReconnectionCount()<6)return!1;return!0}checkConnectionsToReconnect(){var r;this.singlePC?((r=this.singlePC.getPeerConnection())==null?void 0:r.connectionState)===wo.CLOSED&&!this.singlePC.isReconnecting&&(this._log.warn("spc pc is closed but not reconnect"),this.singlePC.startReconnection()):this.getAllConnections().forEach(a=>{if(a instanceof U0&&!a.getIsReconnecting()){let c=a.getPeerConnection();c&&c.connectionState===wo.CLOSED&&(this._log.warn("[".concat(a.getUserId(),"] pc is closed but not reconnect")),a.startReconnection())}})}fallbackToMPC(){return Ke(this,null,function*(){var r;if(this._log.warn("fallback to multi pc"),ao.uploadEvent({log:"stat-fallback",userId:this.userId}),this.enableSPC=!1,(r=this.singlePC)==null||r.close(),this.singlePC=null,this.isJoined&&(yield this.reJoin(!1)),this.uplinkConnection){let a=this.uplinkConnection;this.uplinkConnection=new DN({userId:this.userId,tinyId:this.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,audioManager:this.audioManager}),a.isMainStreamPublished&&(yield this.uplinkConnection.publish({localAudioTrack:a.localMainAudioTrack,localVideoTrack:a.localMainVideoTrack,isAuxiliary:!1})),a.isAuxStreamPublished&&(yield this.uplinkConnection.publish({localAudioTrack:a.localAuxAudioTrack,localVideoTrack:a.localAuxVideoTrack,isAuxiliary:!0})),a.close()}this.remotePublishedUserMap.forEach(a=>{let c=new Dz({userId:a.userId,tinyId:a.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,flag:a.flag,remoteAudioTrack:a.remoteAudioTrack,remoteVideoTrack:a.remoteVideoTrack,remoteAuxiliaryTrack:a.remoteAuxiliaryTrack});this.installDownlinkEvents(c,a.userId),this.remotePublishedUserMap.set(a.userId,c),a.isMainStreamSubscribed&&c.subscribe(a.subscribeState,"main"),a.isAuxStreamSubscribed&&c.subscribe(a.subscribeState,"auxiliary")})})}destroy(){this.isDestroyed||(this._signalChannel&&(this._log.info("destroying SignalChannel"),this._signalChannel.close(),this._signalChannel=null),super.destroy(),this._joinReject&&(this._joinReject(new Gn({code:Tn.INVALID_OPERATION,message:Rr({key:Ir.CLIENT_DESTROYED,data:{funName:"join"}})})),this.clearJoinTimeout(),this.reset()),this.removeAllListeners())}switchRole(r){return Ke(this,null,function*(){this.role!==r&&(r==="audience"&&this.uplinkConnection&&this.closeUplink("you switch role to audience"),yield this.doSwitchRole(r))})}doSwitchRole(r){let a={command:Nde,data:{role:r==="anchor"?20:21,privateMapKey:this.privateMapKey,latencyLevel:this.latencyLevel},responseCommand:zr.SWITCH_ROLE_RES,retries:1};return this._log.info("switchRole signal data: ".concat(JSON.stringify(a.data))),this._signalChannel.sendWaitForResponseWithRetry(a).then(c=>{let{code:f,message:m}=c.data;if(f!==0)throw new Gn({code:Tn.SWITCH_ROLE_FAILED,message:Rr({key:Ir.SWITCH_ROLE_FAILED,data:{message:m,code:f}})});this.role=r}).catch(c=>{throw c instanceof Gn&&c.getCode()===Tn.API_CALL_TIMEOUT&&(c=new Gn({code:Tn.SWITCH_ROLE_FAILED,message:Rr({key:Ir.SWITCH_ROLE_TIMEOUT})})),this._log.error(c),c})}publish(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){let f={},m={};a.forEach(A=>{A instanceof Lu&&(A instanceof Y_?m.audio=A:f.audio=A),A instanceof Is&&(A instanceof V0&&A.mediaType===2?m.video=A:f.video=A)});let x=s4(f),S=s4(m);(!x||!S)&&!this.uplinkConnection&&(this.singlePC?this.uplinkConnection=new ON({userId:this.userId,tinyId:this.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,audioManager:this.audioManager}):this.uplinkConnection=new DN({userId:this.userId,tinyId:this.tinyId,room:this,signalChannel:this._signalChannel,enableSEI:this.enableSEI,audioManager:this.audioManager}),this.uplinkConnection.on("connection-state-changed",A=>{this.emit("media-connection-state-changed",$r(Jn({},A),{userId:this.userId}))}),this.uplinkConnection.on("firewall-restriction",()=>{this.emit("firewall-restriction")}),this.uplinkConnection.on("error",A=>{let B=A.getCode();B!==Tn.ICE_TRANSPORT_ERROR&&(B===Tn.UPLINK_RECONNECTION_FAILED&&this.closeUplink(),this.emit("error",A))}));let R=a.map(A=>A.kind).join(",");x||(this._log.info("publish() => main ".concat(R)),yield this.uplinkConnection.publish({localAudioTrack:f.audio,localVideoTrack:f.video,isAuxiliary:!1}),this._log.info("main is published")),S||(this._log.info("publish() => aux ".concat(R)),yield this.uplinkConnection.publish({localAudioTrack:m.audio,localVideoTrack:m.video,isAuxiliary:!0}),this._log.info("aux is published"))})}unpublish(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){if(this.scene==="live"&&this.role!=="anchor"||!this.isMainStreamPublished&&!this.isAuxStreamPublished||!this.uplinkConnection)return;let f={},m={};a.forEach(x=>{!x.mediaTrack||!x.isPublished||(x instanceof Lu&&(x instanceof Y_?m.audio=x:f.audio=x),x instanceof Is&&(x instanceof V0&&x.mediaType===2?m.video=x:f.video=x))});try{let x=a.map(S=>S.kind).join(",");s4(f)||(this._log.info("unpublish() => main ".concat(x)),yield this.uplinkConnection.unpublish({localAudioTrack:f.audio,localVideoTrack:f.video})),s4(m)||(this._log.info("unpublish() => aux ".concat(x)),yield this.uplinkConnection.unpublish({localAudioTrack:m.audio,localVideoTrack:m.video}))}catch{}this.localTracks.size===0&&this.closeUplink("you unpublished")})}addTrack(r){if(!this.uplinkConnection||!r.mediaTrack)return Promise.resolve();let a=this.uplinkConnection.addTrack(r);return r.publish(this,a),a}removeTrack(r){return this.uplinkConnection&&r.mediaTrack?this.uplinkConnection.removeTrack(r).then(a=>(r.unpublish(),a)):Promise.resolve()}replaceTrack(r){return this.uplinkConnection&&r.mediaTrack&&vU()?this.uplinkConnection.replaceTrack(r).then(a=>{a&&un.emit(Gt.LOCAL_TRACK_REPLACED,{track:r})}):Promise.resolve()}setBandWidth(r){return Ke(this,null,function*(){!this.uplinkConnection||(yield this.uplinkConnection.setBandwidth(r),yield this.uplinkConnection.sendMediaSettings())})}enableSmall(r){return Ke(this,null,function*(){if(!this.uplinkConnection||!this.uplinkConnection.localMainVideoTrack)return Promise.resolve();r&&this.uplinkConnection.localMainVideoTrack.small&&(yield this.setBandWidth({type:Re.VIDEO,videoType:Re.SMALL,bandwidth:this.uplinkConnection.localMainVideoTrack.small.bitrate})),yield this.uplinkConnection.enableSmall(r)})}subscribe(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){if(a=a.filter(S=>!S.isSubscribed),a.length===0)return;let{userId:f}=a[0],m=this.remotePublishedUserMap.get(f);if(!m)return;let x=a.find(S=>S.mediaType===2)?"auxiliary":"main";try{let S=Jn({},m.subscribeState);a.forEach(A=>{switch(A.mediaType){case 1:S.audio=!0;break;case 4:S.video=!0;break;case 8:S.smallVideo=!0;break;case 2:S.auxiliary=!0}});let R=this._changeBigSmallRecords.get(f);R&&R.options.smallVideo&&m.muteState.hasSmall&&S.video&&(S.video=!1,S.smallVideo=!0),un.emit(Gt.SUBSCRIBE_START,{room:this,streamType:x,remotePublishedUser:m,subscribeState:S}),this._log.info("subscribe() => ".concat(f," ").concat(x," [").concat(IN(S),"] prev: [").concat(IN(m.subscribeState),"]")),yield m.subscribe(S,x),this._log.info("subscribe ".concat(f," ").concat(x," done"));for(let A of a)A.mediaTrack||(yield A.waitHasMediaTrack());un.emit(Gt.SUBSCRIBE_SUCCESS,{room:this,streamType:x,remotePublishedUser:m})}catch(S){let R=S instanceof Gn?S.getCode():Tn.UNKNOWN,A=S;throw S instanceof Gn?R===Tn.REMOTE_STREAM_NOT_EXIST&&(A=new Gn({code:Tn.API_CALL_ABORTED,message:Rr({key:Ir.API_CALL_ABORTED,data:{message:S.message,userId:f,streamType:x}})}),this._log.warn(A)):(A=new Gn({code:R,message:Rr({key:Ir.SUBSCRIBE_FAILED,data:{message:S.message,userId:f,streamType:x}})}),this._log.error(A)),A}})}unsubscribe(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return Ke(this,null,function*(){let{userId:f}=a[0],m=this.remotePublishedUserMap.get(f);if(!m)return;let x=a.find(S=>S.mediaType===2)?"auxiliary":"main";this._log.info("unsubscribe() => ".concat(f," ").concat(x));try{yield m.unsubscribe({remoteTracks:a,streamType:x})}catch(S){this._log.warn("unsubscribe() => failed ".concat(S))}a.forEach(S=>{S.unsubscribe(),S.mediaType===8&&S.setMediaType(4)}),un.emit(Gt.UNSUBSCRIBE_SUCCESS,{room:this,streamType:x,remotePublishedUser:m})})}setEncodedDataProcessingListener(r){throw new Error("Method not implemented.")}enableAudioVolumeEvaluation(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:2e3,a=arguments.length>1?arguments[1]:void 0;if(r<=0)return this._enableAudioVolumeEvaluation=!1,void vo.clearTask(this._audioVolumeIntervalId);r=Math.floor(Math.max(r,100)),un.emit(Gt.AUDIO_LEVEL_INTERVAL,{interval:r}),this._audioVolumeIntervalId&&vo.clearTask(this._audioVolumeIntervalId),this._enableAudioVolumeEvaluation=!0,this._audioVolumeIntervalId=vo.run(o9,()=>{var c;let f=[];(c=this.remotePublishedUserMap)==null||c.forEach(m=>{if(m.muteState.hasAudio){let x=Math.floor(100*m.remoteAudioTrack.getAudioLevel());f.push({userId:m.userId,volume:x})}}),this.emit("audio-volume",f)},{fps:1e3/r,backgroundTask:a})}getLocalAudioStats(){return Ke(this,null,function*(){let r={};if(r[this.userId]={bytesSent:0,packetsSent:0},this.uplinkConnection){let a=yield this._stats.getSenderStats(this.uplinkConnection);r[this.userId]={bytesSent:a.audio.bytesSent,packetsSent:a.audio.packetsSent}}return r})}getLocalVideoStats(){return Ke(this,null,function*(){let r={};if(r[this.userId]={bytesSent:0,packetsSent:0,framesEncoded:0,framesSent:0,frameWidth:0,frameHeight:0},this.uplinkConnection){let{video:{bytesSent:a,packetsSent:c,framesEncoded:f,framesSent:m,frameWidth:x,frameHeight:S}}=yield this._stats.getSenderStats(this.uplinkConnection);r[this.userId]={bytesSent:a,packetsSent:c,framesEncoded:f,framesSent:m,frameWidth:x,frameHeight:S}}return r})}getTransportStats(){return Ke(this,null,function*(){let r={rtt:0,downlinksRTT:{}};if(this.uplinkConnection){let a=yield this._stats.getSenderStats(this.uplinkConnection);r.rtt=a.rtt}for(let[,a]of this.remotePublishedUserMap){let c=yield this._stats.getReceiverStats(a);r.downlinksRTT[c.userId]=c.rtt}return r})}getRemoteVideoStats(r){return Ke(this,null,function*(){let a={};for(let[c,f]of this.remotePublishedUserMap)r==="main"&&f.muteState.hasVideo&&(a[c]=f.remoteVideoTrack.stat),r==="auxiliary"&&f.muteState.hasAuxiliary&&(a[c]=f.remoteAuxiliaryTrack.stat);return a})}getRemoteAudioStats(){return Ke(this,null,function*(){let r={};for(let[a,c]of this.remotePublishedUserMap)c.muteState.hasAudio&&(r[a]=c.remoteAudioTrack.stat);return r})}setTurnServer(r,a){this._log.info("set turn server: ".concat(JSON.stringify(r)," ").concat(a||""));let c=[];Array.isArray(r)?r.forEach(f=>c.push(gc.getTurnServer(f))):gc.isPlainObject(r)&&c.push(gc.getTurnServer(r)),this._turnServers=c,a&&(this._iceTransportPolicy=a)}sendStartMixTranscode(r){return this._signalChannel.sendWaitForResponse({command:kde,data:r,timeout:5e3,responseCommand:zr.START_MIX_TRANSCODE_RES,commandDesc:"startMixTranscode"})}sendStopMixTranscode(r){return this._signalChannel.sendWaitForResponse({command:Ade,data:r,timeout:5e3,responseCommand:zr.STOP_MIX_TRANSCODE_RES,commandDesc:"stopMixTranscode"})}sendStartPublishCDN(r){let a=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._signalChannel.sendWaitForResponse({command:a?Sde:Tde,data:r,timeout:5e3,responseCommand:a?zr.START_PUBLISH_TENCENT_CDN_RES:zr.START_PUBLISH_GIVEN_CDN_RES,commandDesc:"startPublishCDN"})}sendStopPublishCDN(r){let a=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._signalChannel.sendWaitForResponse({command:a?Cde:Ide,data:r,timeout:5e3,responseCommand:a?zr.STOP_PUBLISH_TENCENT_CDN_RES:zr.STOP_PUBLISH_GIVEN_CDN_RES,commandDesc:"stopPublishCDN"})}sendAbilityStatus(r){var a;(a=this._signalChannel)==null||a.sendWaitForResponse({command:Vde,data:r,timeout:5e3,responseCommand:zr.ABILITY_STATUS_REPORT_RESULT,commandDesc:"ability status report"}).catch(c=>{})}getIceServers(){return this._turnServers.length===0&&this.scheduleResult.iceServers?this.scheduleResult.iceServers:this._turnServers}getIceTransportPolicy(){return this._iceTransportPolicy||this.scheduleResult.iceTransportPolicy||"all"}getLogger(){return this._log}enableAIVoice(){throw new Error("Method not implemented.")}getSignalChannelUrl(){let r={mainUrl:"",backupUrl:""},a=gc.getEnv();return a?(r.mainUrl="wss://".concat(a,".rtc.qq.com"),r.backupUrl=r.mainUrl):this.proxy_ws?(r.mainUrl=this.proxy_ws,r.backupUrl=r.mainUrl):this.proxy_unified?(r.mainUrl="wss://".concat(this.proxy_unified),r.backupUrl=r.mainUrl):Array.isArray(this.scheduleResult.domains)&&this.scheduleResult.domains.length>0&&(r.mainUrl="wss://".concat(this.scheduleResult.domains[0]),r.backupUrl=r.mainUrl,this.scheduleResult.domains[1]&&(r.backupUrl="wss://".concat(this.scheduleResult.domains[1]))),r}getSignalInfo(){var r;return((r=this._signalChannel)==null?void 0:r.getSignalInfo())||{clientIp:"",relayIp:""}}reset(){let r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.stopSyncUserListInterval(),this.stopHeartbeat(),this.closeConnections(),this.clearNetworkQuality(),this.closeUplink("you exitRoom"),this._signalChannel&&(r&&this._signalChannel.keepAlive&&this._signalChannel.isConnected?this._signalChannel.stopKeepAliveIn(3600):this._signalChannel.close(),this.setSignalChannel(null)),this._stats.reset(),this.userManager.clear(),this.userManager.removeAllListeners(),this.singlePC&&(this.singlePC.close(),this.singlePC=null),this.scheduleResult={domains:null,iceServers:null,iceTransportPolicy:null,trtcAutoConf:null}}checkSubscribeBigSmallVideo(r){return Ke(this,null,function*(){let{subscribeState:a,userId:c,muteState:{hasSmall:f,hasVideo:m}}=r;if(!f&&!m||!a.video&&!a.smallVideo)return;let x=this._changeBigSmallRecords.get(c);if(!x||x.isSubscribing||x.reSubscribeCount<=0)return;let{options:S,reSubscribeCount:R}=x;if(S.video&&a.video||S.smallVideo&&a.smallVideo&&f)return;let A={audio:r.remoteAudioTrack.isSubscribed||r.remoteAudioTrack.isSubscribing,auxiliary:r.remoteAuxiliaryTrack.isSubscribed||r.remoteAuxiliaryTrack.isSubscribing,video:S.video,smallVideo:S.smallVideo};try{if(!f&&A.smallVideo&&(A.video=!0,A.smallVideo=!1),A.smallVideo===a.smallVideo&&A.video===a.video)return;x.isSubscribing=!0,x.reSubscribeCount=R-1,yield r.subscribe(A,"main"),r.remoteVideoTrack.setMediaType(A.smallVideo?8:4),this._log.info("change [".concat(c,"] to ").concat(A.smallVideo?"small":"big"," video successfully. count ").concat(g_-x.reSubscribeCount,".")),x.isSubscribing=!1,x.reSubscribeCount=g_}catch{this._log.info("change [".concat(c,"] to ").concat(A.smallVideo?"small":"big"," video failed. count ").concat(g_-x.reSubscribeCount,".")),x.isSubscribing=!1,x.reSubscribeCount===0&&this._changeBigSmallRecords.delete(c)}})}changeType(r,a){let c={options:{video:!r,smallVideo:r},isSubscribing:!1,reSubscribeCount:g_};this._changeBigSmallRecords.set(a.userId,c),this._log.info("set [".concat(a.userId,"] video prefer type: ").concat(r?"small":"big"))}get smallStreamConfig(){return this._smallStreamConfig}_initBusinessInfo(r){this._businessInfo=r.businessInfo;let a={};if(Gz(r.businessInfo)&&(a=JSON.parse(r.businessInfo)),!Bv(r.pureAudioPushMode)){if(!Number.isInteger(Number(r.pureAudioPushMode)))throw new Gn({code:Tn.INVALID_PARAMETER,message:Rr({key:Ir.INVALID_PURE_AUDIO})});this._pureAudioPushMode=r.pureAudioPushMode,a.Str_uc_params||(a.Str_uc_params={}),a.Str_uc_params.pure_audio_push_mod=this._pureAudioPushMode}if(!Bv(r.userDefineRecordId)){let c=/^[A-Za-z0-9_-]{1,64}$/gi;if(r.userDefineRecordId.match(c)===null)throw new Gn({code:Tn.INVALID_PARAMETER,message:Rr({key:Ir.INVALID_USER_DEFINE_RECORDID})});a.Str_uc_params||(a.Str_uc_params={}),a.Str_uc_params.userdefine_record_id=r.userDefineRecordId}if(!Bv(r.userDefinePushArgs)){if(!(Gz(r.userDefinePushArgs)&&String(r.userDefinePushArgs)&&String(r.userDefinePushArgs).length<=256))throw new Gn({code:Tn.INVALID_PARAMETER,message:Rr({key:Ir.INVALID_USER_DEFINE_PUSH_ARGS})});a.Str_uc_params||(a.Str_uc_params={}),a.Str_uc_params.userdefine_push_args=r.userDefinePushArgs}s4(a)||(this._businessInfo=JSON.stringify(a))}sendSEI(r,a){var c,f;this.uplinkConnection instanceof ON&&(a!=null&&a.toSubStream?(c=this.uplinkConnection.localAuxVideoTrack)==null||c.sendSEI(r,a):(f=this.uplinkConnection.localMainVideoTrack)==null||f.sendSEI(r,a))}sendCustomMessage(r){var a;(a=this._customMessageManager)==null||a.send(r)}enableInsertableStreams(){if(this.singlePC&&!this.singlePC.enableInsertableStreams)return this.singlePC.enableInsertableStreams=!0,this.singlePC.startReconnection()}};return Ln([_z(["left",so.INIT],"joined"),O0({settings:{retries:1,timeout:0},onError(r,a,c){this._isUsingCachedSchedule&&!this.isDestroyed?(this._log.warn("is using cached schedule, retry join"),cf(!0),this.reset(),a()):this._signalChannel&&this._signalChannel.isConnected&&this._signalChannel.keepAlive?(this._log.warn("is using keepAlive ws, retry join"),this._signalChannel.close(),this.reset(),a()):(this.reset(),this._log.error(r),c(r))}}),Yi(r=>{let a=new ude;return function(c,f,m){return Ke(this,null,function*(){let x=String(c.roomId||c.strRoomId);if(this.userId=c.userId,this.sdkAppId=c.sdkAppId,this.userSig=c.userSig,this._log.setSdkAppId(this.sdkAppId),this._log.setUserId(this.userId),this.scene=f,c.privateMapKey=c.privateMapKey||"",this.isJoined)throw new Gn({code:Tn.INVALID_OPERATION,message:Rr({key:Ir.INVALID_JOIN})});if(this.checkDestroy(),a.isJoined({userId:this.userId,roomId:x,sdkAppId:this.sdkAppId,room:this}))throw new Gn({code:Tn.INVALID_OPERATION,message:Rr({key:Ir.REPEAT_JOIN,data:this.userId})});a.add({room:this,roomId:x}),this.role=c.role===21?"audience":"anchor",this._log.info("Join() => joining room: ".concat(x," useStringRoomId: ").concat(this.useStringRoomId," scene: ").concat(this.scene," role: ").concat(this.role)),un.emit(Gt.JOIN_START,{room:this,roomId:x,params:c}),this.checkSystemResult=yield L_.checkSystemRequirementsInternal(),this.checkDestroy();let S=gc.getEnv();S||(S=x0.QCLOUD,this.proxy_ws&&(this.proxy_ws.startsWith(QD.OLD_CLOUD_LADDER)?S=x0.OLD_CLOUD_LADDER:this.proxy_ws.startsWith(QD.WEBRTC)&&(S=x0.WEBRTC))),ao.setConfig({env:S,sdkAppId:String(this.sdkAppId),userId:this.userId,roomId:x}),dde.call(this);let{isH264EncodeSupported:R,isVp8EncodeSupported:A}=this.checkSystemResult.detail;if(!L_.isWebRTCSupported()||!R&&!A)throw new Gn({code:Tn.NOT_SUPPORTED,message:Rr({key:Ir.NOT_SUPPORTED_WEBRTC})});try{!this.proxy_ws&&!this.proxy_wt&&!this.scheduleResult.domains&&!gc.getEnv()&&(yield this.schedule(c,m));let B=yield r.call(this,c,f,m);return this.roomId=x,this._joinedTimestamp=gc.performanceNow(),un.emit(Gt.JOIN_SUCCESS,{room:this}),m===30&&!c.component&&ao.uploadEvent({log:"stat-conv-".concat(Number(xv),"-").concat(location.hostname),userId:this.userId}),B}catch(B){throw a.delete({room:this,roomId:x}),un.emit(Gt.JOIN_FAILED,{room:this,error:B}),B}})}})],wf.prototype,"join"),Ln([_z("joined","left",{ignoreError:!0,success(){this.reset(!0)}}),Yi(r=>function(){return Ke(this,null,function*(){un.emit(Gt.LEAVE_START,{room:this}),yield r.call(this),un.emit(Gt.LEAVE_SUCCESS,{room:this,roomId:this.roomId})})}),WU("leave room"),Zx({fnName:"publish",validateArgs:!1}),Zx({fnName:"unsubscribe",validateArgs:!1})],wf.prototype,"leave"),Ln([Av(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];return Ke(this,null,function*(){if(this.scene==="live"&&this.role!=="anchor"||(c=c.filter(x=>x.outMediaTrack&&x.state==="capture"),!c.length))return;un.emit("61",{room:this});let m=r.apply(this,c);return c.forEach(x=>x.publish(this,m)),m})}),O0({settings:{retries:gv,timeout:r=>wv(r)},onError(r,a,c){var f;(f=r.message)!=null&&f.includes("timeout")?(this._log.warn("publish timeout"),a()):(this._log.error("publish failed: ".concat(r)),c(r),un.emit(Gt.PUBLISH_FAILED,{room:this}))}})],wf.prototype,"publish"),Ln([Zx({fnName:"publish"}),(jz="api-call",function(r,a,c){let f=c.value;return c.value=function(){for(var m=arguments.length,x=new Array(m),S=0;S<m;S++)x[S]=arguments[S];let R=G_.get(this);if(R){let A=R.queue.filter((B,q)=>{if(q===0)return!0;let j=!0;return B.args.forEach(he=>{x.find(xe=>xe===he)||(j=!1)}),!j||(B.reject(new Gn({code:Tn.API_CALL_ABORTED,message:jz})),!1)});R.queue=A}return f.apply(this,x)},c}),Av(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];let m=r.apply(this,c);return c.forEach(x=>x.unpublish()),m}),hN(function(){var r,a;!this.uplinkConnection&&F_()&&((a=(r=this.singlePC)==null?void 0:r.getPeerConnection())==null||a.getSenders().forEach(c=>c.track&&c.replaceTrack(null)))})],wf.prototype,"unpublish"),Ln([Dv(r=>r.userId)],wf.prototype,"replaceTrack"),Ln([Dv(function(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return a[0].userId}),YU(),Yi(r=>function(){for(var a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];let m=r.apply(this,c);return c.forEach(x=>!x.isSubscribed&&x.subscribe(m)),m}),O0({settings:{retries:gv,timeout:r=>wv(r)},onError(r,a,c,f){r.message.includes("timeout")?(this._log.warn("subscribe timeout"),a()):(this._log.error("subscribe failed: ".concat(r)),c(r),un.emit(Gt.SUBSCRIBE_FAILED,{room:this,remoteTracks:f}))}})],wf.prototype,"subscribe"),Ln([Zx({fnName:"subscribe",callback(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];this.singlePC||a.forEach(f=>{let m=this.remotePublishedUserMap.get(f.userId);m&&!m.isMainStreamSubscribed&&!m.isAuxStreamSubscribed&&m.close("you unsubscribed")})}}),Dv(function(){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return a[0].userId})],wf.prototype,"unsubscribe"),mE.create=mE._create.bind(mE,wf),mE})})(are);var XZe=are.exports;const Yn=fh(XZe);var sre=(e=>(e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.NONE=5]="NONE",e))(sre||{}),cV=(e=>(e.USER_HANGINGUP="user-hanging-up",e))(cV||{}),Wg=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},Lc=[],tl=[],JZe=typeof Uint8Array<"u"?Uint8Array:Array,uV=!1;function lre(){uV=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)Lc[t]=e[t],tl[e.charCodeAt(t)]=t;tl[45]=62,tl[95]=63}function ZZe(e,t,n){for(var o,s,l=[],u=t;u<n;u+=3)o=(e[u]<<16)+(e[u+1]<<8)+e[u+2],l.push(Lc[(s=o)>>18&63]+Lc[s>>12&63]+Lc[s>>6&63]+Lc[63&s]);return l.join("")}function Mq(e){var t;uV||lre();for(var n=e.length,o=n%3,s="",l=[],u=0,d=n-o;u<d;u+=16383)l.push(ZZe(e,u,u+16383>d?d:u+16383));return o===1?(t=e[n-1],s+=Lc[t>>2],s+=Lc[t<<4&63],s+="=="):o===2&&(t=(e[n-2]<<8)+e[n-1],s+=Lc[t>>10],s+=Lc[t>>4&63],s+=Lc[t<<2&63],s+="="),l.push(s),l.join("")}function ZE(e,t,n,o,s){var l,u,d=8*s-o-1,p=(1<<d)-1,h=p>>1,v=-7,_=n?s-1:0,y=n?-1:1,b=e[t+_];for(_+=y,l=b&(1<<-v)-1,b>>=-v,v+=d;v>0;l=256*l+e[t+_],_+=y,v-=8);for(u=l&(1<<-v)-1,l>>=-v,v+=o;v>0;u=256*u+e[t+_],_+=y,v-=8);if(l===0)l=1-h;else{if(l===p)return u?NaN:1/0*(b?-1:1);u+=Math.pow(2,o),l-=h}return(b?-1:1)*u*Math.pow(2,l-o)}function cre(e,t,n,o,s,l){var u,d,p,h=8*l-s-1,v=(1<<h)-1,_=v>>1,y=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:l-1,w=o?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,u=v):(u=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-u))<1&&(u--,p*=2),(t+=u+_>=1?y/p:y*Math.pow(2,1-_))*p>=2&&(u++,p/=2),u+_>=v?(d=0,u=v):u+_>=1?(d=(t*p-1)*Math.pow(2,s),u+=_):(d=t*Math.pow(2,_-1)*Math.pow(2,s),u=0));s>=8;e[n+b]=255&d,b+=w,d/=256,s-=8);for(u=u<<s|d,h+=s;h>0;e[n+b]=255&u,b+=w,u/=256,h-=8);e[n+b-w]|=128*C}var QZe={}.toString,ure=Array.isArray||function(e){return QZe.call(e)=="[object Array]"};function qM(){return Lt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ad(e,t){if(qM()<t)throw new RangeError("Invalid typed array length");return Lt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Lt.prototype:(e===null&&(e=new Lt(t)),e.length=t),e}function Lt(e,t,n){if(!(Lt.TYPED_ARRAY_SUPPORT||this instanceof Lt))return new Lt(e,t,n);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return YM(this,e)}return dre(this,e,t,n)}function dre(e,t,n,o){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?function(s,l,u,d){if(l.byteLength,u<0||l.byteLength<u)throw new RangeError("'offset' is out of bounds");if(l.byteLength<u+(d||0))throw new RangeError("'length' is out of bounds");return l=u===void 0&&d===void 0?new Uint8Array(l):d===void 0?new Uint8Array(l,u):new Uint8Array(l,u,d),Lt.TYPED_ARRAY_SUPPORT?(s=l).__proto__=Lt.prototype:s=IO(s,l),s}(e,t,n,o):typeof t=="string"?function(s,l,u){if(typeof u=="string"&&u!==""||(u="utf8"),!Lt.isEncoding(u))throw new TypeError('"encoding" must be a valid string encoding');var d=0|hre(l,u),p=(s=ad(s,d)).write(l,u);return p!==d&&(s=s.slice(0,p)),s}(e,t,n):function(s,l){if(Bc(l)){var u=0|dV(l.length);return(s=ad(s,u)).length===0||l.copy(s,0,0,u),s}if(l){if(typeof ArrayBuffer<"u"&&l.buffer instanceof ArrayBuffer||"length"in l)return typeof l.length!="number"||(d=l.length)!=d?ad(s,0):IO(s,l);if(l.type==="Buffer"&&ure(l.data))return IO(s,l.data)}var d;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function fre(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function YM(e,t){if(fre(t),e=ad(e,t<0?0:0|dV(t)),!Lt.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function IO(e,t){var n=t.length<0?0:0|dV(t.length);e=ad(e,n);for(var o=0;o<n;o+=1)e[o]=255&t[o];return e}function dV(e){if(e>=qM())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qM().toString(16)+" bytes");return 0|e}function Bc(e){return!(e==null||!e._isBuffer)}function hre(e,t){if(Bc(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Z8(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return gre(e).length;default:if(o)return Z8(e).length;t=(""+t).toLowerCase(),o=!0}}function eQe(e,t,n){var o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return cQe(this,t,n);case"utf8":case"utf-8":return mre(this,t,n);case"ascii":return sQe(this,t,n);case"latin1":case"binary":return lQe(this,t,n);case"base64":return aQe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return uQe(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function Y0(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function Pq(e,t,n,o,s){if(e.length===0)return-1;if(typeof n=="string"?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if(typeof t=="string"&&(t=Lt.from(t,o)),Bc(t))return t.length===0?-1:Vq(e,t,n,o,s);if(typeof t=="number")return t&=255,Lt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Vq(e,[t],n,o,s);throw new TypeError("val must be string, number or Buffer")}function Vq(e,t,n,o,s){var l,u=1,d=e.length,p=t.length;if(o!==void 0&&((o=String(o).toLowerCase())==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return-1;u=2,d/=2,p/=2,n/=2}function h(b,w){return u===1?b[w]:b.readUInt16BE(w*u)}if(s){var v=-1;for(l=n;l<d;l++)if(h(e,l)===h(t,v===-1?0:l-v)){if(v===-1&&(v=l),l-v+1===p)return v*u}else v!==-1&&(l-=l-v),v=-1}else for(n+p>d&&(n=d-p),l=n;l>=0;l--){for(var _=!0,y=0;y<p;y++)if(h(e,l+y)!==h(t,y)){_=!1;break}if(_)return l}return-1}function tQe(e,t,n,o){n=Number(n)||0;var s=e.length-n;o?(o=Number(o))>s&&(o=s):o=s;var l=t.length;if(l%2!=0)throw new TypeError("Invalid hex string");o>l/2&&(o=l/2);for(var u=0;u<o;++u){var d=parseInt(t.substr(2*u,2),16);if(isNaN(d))return u;e[n+u]=d}return u}function nQe(e,t,n,o){return qT(Z8(t,e.length-n),e,n,o)}function pre(e,t,n,o){return qT(function(s){for(var l=[],u=0;u<s.length;++u)l.push(255&s.charCodeAt(u));return l}(t),e,n,o)}function rQe(e,t,n,o){return pre(e,t,n,o)}function iQe(e,t,n,o){return qT(gre(t),e,n,o)}function oQe(e,t,n,o){return qT(function(s,l){for(var u,d,p,h=[],v=0;v<s.length&&!((l-=2)<0);++v)u=s.charCodeAt(v),d=u>>8,p=u%256,h.push(p),h.push(d);return h}(t,e.length-n),e,n,o)}function aQe(e,t,n){return t===0&&n===e.length?Mq(e):Mq(e.slice(t,n))}function mre(e,t,n){n=Math.min(e.length,n);for(var o=[],s=t;s<n;){var l,u,d,p,h=e[s],v=null,_=h>239?4:h>223?3:h>191?2:1;if(s+_<=n)switch(_){case 1:h<128&&(v=h);break;case 2:(192&(l=e[s+1]))==128&&(p=(31&h)<<6|63&l)>127&&(v=p);break;case 3:l=e[s+1],u=e[s+2],(192&l)==128&&(192&u)==128&&(p=(15&h)<<12|(63&l)<<6|63&u)>2047&&(p<55296||p>57343)&&(v=p);break;case 4:l=e[s+1],u=e[s+2],d=e[s+3],(192&l)==128&&(192&u)==128&&(192&d)==128&&(p=(15&h)<<18|(63&l)<<12|(63&u)<<6|63&d)>65535&&p<1114112&&(v=p)}v===null?(v=65533,_=1):v>65535&&(v-=65536,o.push(v>>>10&1023|55296),v=56320|1023&v),o.push(v),s+=_}return function(y){var b=y.length;if(b<=Lq)return String.fromCharCode.apply(String,y);for(var w="",C=0;C<b;)w+=String.fromCharCode.apply(String,y.slice(C,C+=Lq));return w}(o)}Lt.TYPED_ARRAY_SUPPORT=Wg.TYPED_ARRAY_SUPPORT===void 0||Wg.TYPED_ARRAY_SUPPORT,Lt.poolSize=8192,Lt._augment=function(e){return e.__proto__=Lt.prototype,e},Lt.from=function(e,t,n){return dre(null,e,t,n)},Lt.TYPED_ARRAY_SUPPORT&&(Lt.prototype.__proto__=Uint8Array.prototype,Lt.__proto__=Uint8Array),Lt.alloc=function(e,t,n){return function(o,s,l,u){return fre(s),s<=0?ad(o,s):l!==void 0?typeof u=="string"?ad(o,s).fill(l,u):ad(o,s).fill(l):ad(o,s)}(null,e,t,n)},Lt.allocUnsafe=function(e){return YM(null,e)},Lt.allocUnsafeSlow=function(e){return YM(null,e)},Lt.isBuffer=o3,Lt.compare=function(e,t){if(!Bc(e)||!Bc(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,o=t.length,s=0,l=Math.min(n,o);s<l;++s)if(e[s]!==t[s]){n=e[s],o=t[s];break}return n<o?-1:o<n?1:0},Lt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Lt.concat=function(e,t){if(!ure(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Lt.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=Lt.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var l=e[n];if(!Bc(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,s),s+=l.length}return o},Lt.byteLength=hre,Lt.prototype._isBuffer=!0,Lt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Y0(this,t,t+1);return this},Lt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Y0(this,t,t+3),Y0(this,t+1,t+2);return this},Lt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Y0(this,t,t+7),Y0(this,t+1,t+6),Y0(this,t+2,t+5),Y0(this,t+3,t+4);return this},Lt.prototype.toString=function(){var e=0|this.length;return e===0?"":arguments.length===0?mre(this,0,e):eQe.apply(this,arguments)},Lt.prototype.equals=function(e){if(!Bc(e))throw new TypeError("Argument must be a Buffer");return this===e||Lt.compare(this,e)===0},Lt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Lt.prototype.compare=function(e,t,n,o,s){if(!Bc(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),s===void 0&&(s=this.length),t<0||n>e.length||o<0||s>this.length)throw new RangeError("out of range index");if(o>=s&&t>=n)return 0;if(o>=s)return-1;if(t>=n)return 1;if(this===e)return 0;for(var l=(s>>>=0)-(o>>>=0),u=(n>>>=0)-(t>>>=0),d=Math.min(l,u),p=this.slice(o,s),h=e.slice(t,n),v=0;v<d;++v)if(p[v]!==h[v]){l=p[v],u=h[v];break}return l<u?-1:u<l?1:0},Lt.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},Lt.prototype.indexOf=function(e,t,n){return Pq(this,e,t,n,!0)},Lt.prototype.lastIndexOf=function(e,t,n){return Pq(this,e,t,n,!1)},Lt.prototype.write=function(e,t,n,o){if(t===void 0)o="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")o=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,o===void 0&&(o="utf8")):(o=n,n=void 0)}var s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var l=!1;;)switch(o){case"hex":return tQe(this,e,t,n);case"utf8":case"utf-8":return nQe(this,e,t,n);case"ascii":return pre(this,e,t,n);case"latin1":case"binary":return rQe(this,e,t,n);case"base64":return iQe(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oQe(this,e,t,n);default:if(l)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),l=!0}},Lt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Lq=4096;function sQe(e,t,n){var o="";n=Math.min(e.length,n);for(var s=t;s<n;++s)o+=String.fromCharCode(127&e[s]);return o}function lQe(e,t,n){var o="";n=Math.min(e.length,n);for(var s=t;s<n;++s)o+=String.fromCharCode(e[s]);return o}function cQe(e,t,n){var o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);for(var s="",l=t;l<n;++l)s+=fQe(e[l]);return s}function uQe(e,t,n){for(var o=e.slice(t,n),s="",l=0;l<o.length;l+=2)s+=String.fromCharCode(o[l]+256*o[l+1]);return s}function Yo(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function is(e,t,n,o,s,l){if(!Bc(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<l)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function QE(e,t,n,o){t<0&&(t=65535+t+1);for(var s=0,l=Math.min(e.length-n,2);s<l;++s)e[n+s]=(t&255<<8*(o?s:1-s))>>>8*(o?s:1-s)}function ew(e,t,n,o){t<0&&(t=4294967295+t+1);for(var s=0,l=Math.min(e.length-n,4);s<l;++s)e[n+s]=t>>>8*(o?s:3-s)&255}function vre(e,t,n,o,s,l){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Bq(e,t,n,o,s){return s||vre(e,0,n,4),cre(e,t,n,o,23,4),n+4}function Fq(e,t,n,o,s){return s||vre(e,0,n,8),cre(e,t,n,o,52,8),n+8}Lt.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=t===void 0?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t<e&&(t=e),Lt.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=Lt.prototype;else{var s=t-e;n=new Lt(s,void 0);for(var l=0;l<s;++l)n[l]=this[l+e]}return n},Lt.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=this[e],s=1,l=0;++l<t&&(s*=256);)o+=this[e+l]*s;return o},Lt.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=this[e+--t],s=1;t>0&&(s*=256);)o+=this[e+--t]*s;return o},Lt.prototype.readUInt8=function(e,t){return t||Yo(e,1,this.length),this[e]},Lt.prototype.readUInt16LE=function(e,t){return t||Yo(e,2,this.length),this[e]|this[e+1]<<8},Lt.prototype.readUInt16BE=function(e,t){return t||Yo(e,2,this.length),this[e]<<8|this[e+1]},Lt.prototype.readUInt32LE=function(e,t){return t||Yo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Lt.prototype.readUInt32BE=function(e,t){return t||Yo(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Lt.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=this[e],s=1,l=0;++l<t&&(s*=256);)o+=this[e+l]*s;return o>=(s*=128)&&(o-=Math.pow(2,8*t)),o},Lt.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Yo(e,t,this.length);for(var o=t,s=1,l=this[e+--o];o>0&&(s*=256);)l+=this[e+--o]*s;return l>=(s*=128)&&(l-=Math.pow(2,8*t)),l},Lt.prototype.readInt8=function(e,t){return t||Yo(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Lt.prototype.readInt16LE=function(e,t){t||Yo(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Lt.prototype.readInt16BE=function(e,t){t||Yo(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Lt.prototype.readInt32LE=function(e,t){return t||Yo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Lt.prototype.readInt32BE=function(e,t){return t||Yo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Lt.prototype.readFloatLE=function(e,t){return t||Yo(e,4,this.length),ZE(this,e,!0,23,4)},Lt.prototype.readFloatBE=function(e,t){return t||Yo(e,4,this.length),ZE(this,e,!1,23,4)},Lt.prototype.readDoubleLE=function(e,t){return t||Yo(e,8,this.length),ZE(this,e,!0,52,8)},Lt.prototype.readDoubleBE=function(e,t){return t||Yo(e,8,this.length),ZE(this,e,!1,52,8)},Lt.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||is(this,e,t,n,Math.pow(2,8*n)-1,0);var s=1,l=0;for(this[t]=255&e;++l<n&&(s*=256);)this[t+l]=e/s&255;return t+n},Lt.prototype.writeUIntBE=function(e,t,n,o){e=+e,t|=0,n|=0,o||is(this,e,t,n,Math.pow(2,8*n)-1,0);var s=n-1,l=1;for(this[t+s]=255&e;--s>=0&&(l*=256);)this[t+s]=e/l&255;return t+n},Lt.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,1,255,0),Lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Lt.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,65535,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):QE(this,e,t,!0),t+2},Lt.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,65535,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):QE(this,e,t,!1),t+2},Lt.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,4294967295,0),Lt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ew(this,e,t,!0),t+4},Lt.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,4294967295,0),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ew(this,e,t,!1),t+4},Lt.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=Math.pow(2,8*n-1);is(this,e,t,n,s-1,-s)}var l=0,u=1,d=0;for(this[t]=255&e;++l<n&&(u*=256);)e<0&&d===0&&this[t+l-1]!==0&&(d=1),this[t+l]=(e/u>>0)-d&255;return t+n},Lt.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=Math.pow(2,8*n-1);is(this,e,t,n,s-1,-s)}var l=n-1,u=1,d=0;for(this[t+l]=255&e;--l>=0&&(u*=256);)e<0&&d===0&&this[t+l+1]!==0&&(d=1),this[t+l]=(e/u>>0)-d&255;return t+n},Lt.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,1,127,-128),Lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Lt.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,32767,-32768),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):QE(this,e,t,!0),t+2},Lt.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,2,32767,-32768),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):QE(this,e,t,!1),t+2},Lt.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,2147483647,-2147483648),Lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ew(this,e,t,!0),t+4},Lt.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||is(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ew(this,e,t,!1),t+4},Lt.prototype.writeFloatLE=function(e,t,n){return Bq(this,e,t,!0,n)},Lt.prototype.writeFloatBE=function(e,t,n){return Bq(this,e,t,!1,n)},Lt.prototype.writeDoubleLE=function(e,t,n){return Fq(this,e,t,!0,n)},Lt.prototype.writeDoubleBE=function(e,t,n){return Fq(this,e,t,!1,n)},Lt.prototype.copy=function(e,t,n,o){if(n||(n=0),o||o===0||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var s,l=o-n;if(this===e&&n<t&&t<o)for(s=l-1;s>=0;--s)e[s+t]=this[s+n];else if(l<1e3||!Lt.TYPED_ARRAY_SUPPORT)for(s=0;s<l;++s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+l),t);return l},Lt.prototype.fill=function(e,t,n,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var s=e.charCodeAt(0);s<256&&(e=s)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!Lt.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var l;if(t>>>=0,n=n===void 0?this.length:n>>>0,e||(e=0),typeof e=="number")for(l=t;l<n;++l)this[l]=e;else{var u=Bc(e)?e:Z8(new Lt(e,o).toString()),d=u.length;for(l=0;l<n-t;++l)this[l+t]=u[l%d]}return this};var dQe=/[^+\/0-9A-Za-z-_]/g;function fQe(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z8(e,t){var n;t=t||1/0;for(var o=e.length,s=null,l=[],u=0;u<o;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!s){if(n>56319){(t-=3)>-1&&l.push(239,191,189);continue}if(u+1===o){(t-=3)>-1&&l.push(239,191,189);continue}s=n;continue}if(n<56320){(t-=3)>-1&&l.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(t-=3)>-1&&l.push(239,191,189);if(s=null,n<128){if((t-=1)<0)break;l.push(n)}else if(n<2048){if((t-=2)<0)break;l.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;l.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;l.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return l}function gre(e){return function(t){var n,o,s,l,u,d;uV||lre();var p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");u=t[p-2]==="="?2:t[p-1]==="="?1:0,d=new JZe(3*p/4-u),s=u>0?p-4:p;var h=0;for(n=0,o=0;n<s;n+=4,o+=3)l=tl[t.charCodeAt(n)]<<18|tl[t.charCodeAt(n+1)]<<12|tl[t.charCodeAt(n+2)]<<6|tl[t.charCodeAt(n+3)],d[h++]=l>>16&255,d[h++]=l>>8&255,d[h++]=255&l;return u===2?(l=tl[t.charCodeAt(n)]<<2|tl[t.charCodeAt(n+1)]>>4,d[h++]=255&l):u===1&&(l=tl[t.charCodeAt(n)]<<10|tl[t.charCodeAt(n+1)]<<4|tl[t.charCodeAt(n+2)]>>2,d[h++]=l>>8&255,d[h++]=255&l),d}(function(t){if((t=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}(t).replace(dQe,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(e))}function qT(e,t,n,o){for(var s=0;s<o&&!(s+n>=t.length||s>=e.length);++s)t[s+n]=e[s];return s}function o3(e){return e!=null&&(!!e._isBuffer||$q(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&$q(t.slice(0,0))}(e))}function $q(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function li(e,t){return e(t={exports:{}},t.exports),t.exports}var hi=li(function(e,t){var n;e.exports=(n=n||function(o,s){var l=Object.create||function(){function T(){}return function(I){var D;return T.prototype=I,D=new T,T.prototype=null,D}}(),u={},d=u.lib={},p=d.Base={extend:function(T){var I=l(this);return T&&I.mixIn(T),I.hasOwnProperty("init")&&this.init!==I.init||(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var T=this.extend();return T.init.apply(T,arguments),T},init:function(){},mixIn:function(T){for(var I in T)T.hasOwnProperty(I)&&(this[I]=T[I]);T.hasOwnProperty("toString")&&(this.toString=T.toString)},clone:function(){return this.init.prototype.extend(this)}},h=d.WordArray=p.extend({init:function(T,I){T=this.words=T||[],this.sigBytes=I??4*T.length},toString:function(T){return(T||_).stringify(this)},concat:function(T){var I=this.words,D=T.words,k=this.sigBytes,O=T.sigBytes;if(this.clamp(),k%4)for(var L=0;L<O;L++){var P=D[L>>>2]>>>24-L%4*8&255;I[k+L>>>2]|=P<<24-(k+L)%4*8}else for(var L=0;L<O;L+=4)I[k+L>>>2]=D[L>>>2];return this.sigBytes+=O,this},clamp:function(){var T=this.words,I=this.sigBytes;T[I>>>2]&=4294967295<<32-I%4*8,T.length=o.ceil(I/4)},clone:function(){var T=p.clone.call(this);return T.words=this.words.slice(0),T},random:function(T){for(var I,D=[],k=function(V){var V=V,$=987654321,Y=4294967295;return function(){var F=(($=36969*(65535&$)+($>>16)&Y)<<16)+(V=18e3*(65535&V)+(V>>16)&Y)&Y;return F/=4294967296,(F+=.5)*(o.random()>.5?1:-1)}},O=0;O<T;O+=4){var L=k(4294967296*(I||o.random()));I=987654071*L(),D.push(4294967296*L()|0)}return new h.init(D,T)}}),v=u.enc={},_=v.Hex={stringify:function(T){for(var I=T.words,D=T.sigBytes,k=[],O=0;O<D;O++){var L=I[O>>>2]>>>24-O%4*8&255;k.push((L>>>4).toString(16)),k.push((15&L).toString(16))}return k.join("")},parse:function(T){for(var I=T.length,D=[],k=0;k<I;k+=2)D[k>>>3]|=parseInt(T.substr(k,2),16)<<24-k%8*4;return new h.init(D,I/2)}},y=v.Latin1={stringify:function(T){for(var I=T.words,D=T.sigBytes,k=[],O=0;O<D;O++){var L=I[O>>>2]>>>24-O%4*8&255;k.push(String.fromCharCode(L))}return k.join("")},parse:function(T){for(var I=T.length,D=[],k=0;k<I;k++)D[k>>>2]|=(255&T.charCodeAt(k))<<24-k%4*8;return new h.init(D,I)}},b=v.Utf8={stringify:function(T){try{return decodeURIComponent(escape(y.stringify(T)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(T){return y.parse(unescape(encodeURIComponent(T)))}},w=d.BufferedBlockAlgorithm=p.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(T){typeof T=="string"&&(T=b.parse(T)),this._data.concat(T),this._nDataBytes+=T.sigBytes},_process:function(T){var I=this._data,D=I.words,k=I.sigBytes,O=this.blockSize,L=4*O,P=k/L,V=(P=T?o.ceil(P):o.max((0|P)-this._minBufferSize,0))*O,$=o.min(4*V,k);if(V){for(var Y=0;Y<V;Y+=O)this._doProcessBlock(D,Y);var F=D.splice(0,V);I.sigBytes-=$}return new h.init(F,$)},clone:function(){var T=p.clone.call(this);return T._data=this._data.clone(),T},_minBufferSize:0}),C=(d.Hasher=w.extend({cfg:p.extend(),init:function(T){this.cfg=this.cfg.extend(T),this.reset()},reset:function(){w.reset.call(this),this._doReset()},update:function(T){return this._append(T),this._process(),this},finalize:function(T){T&&this._append(T);var I=this._doFinalize();return I},blockSize:16,_createHelper:function(T){return function(I,D){return new T.init(D).finalize(I)}},_createHmacHelper:function(T){return function(I,D){return new C.HMAC.init(T,D).finalize(I)}}}),u.algo={});return u}(Math),n)}),Uq=(li(function(e,t){var n,o,s,l,u,d;e.exports=(s=(o=n=hi).lib,l=s.Base,u=s.WordArray,(d=o.x64={}).Word=l.extend({init:function(p,h){this.high=p,this.low=h}}),d.WordArray=l.extend({init:function(p,h){p=this.words=p||[],this.sigBytes=h??8*p.length},toX32:function(){for(var p=this.words,h=p.length,v=[],_=0;_<h;_++){var y=p[_];v.push(y.high),v.push(y.low)}return u.create(v,this.sigBytes)},clone:function(){for(var p=l.clone.call(this),h=p.words=this.words.slice(0),v=h.length,_=0;_<v;_++)h[_]=h[_].clone();return p}}),n)}),li(function(e,t){var n;e.exports=(n=hi,function(){if(typeof ArrayBuffer=="function"){var o=n.lib.WordArray,s=o.init;(o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var u=l.byteLength,d=[],p=0;p<u;p++)d[p>>>2]|=l[p]<<24-p%4*8;s.call(this,d,u)}else s.apply(this,arguments)}).prototype=o}}(),n.lib.WordArray)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.WordArray,l=o.enc;function u(d){return d<<8&4278255360|d>>>8&16711935}l.Utf16=l.Utf16BE={stringify:function(d){for(var p=d.words,h=d.sigBytes,v=[],_=0;_<h;_+=2){var y=p[_>>>2]>>>16-_%4*8&65535;v.push(String.fromCharCode(y))}return v.join("")},parse:function(d){for(var p=d.length,h=[],v=0;v<p;v++)h[v>>>1]|=d.charCodeAt(v)<<16-v%2*16;return s.create(h,2*p)}},l.Utf16LE={stringify:function(d){for(var p=d.words,h=d.sigBytes,v=[],_=0;_<h;_+=2){var y=u(p[_>>>2]>>>16-_%4*8&65535);v.push(String.fromCharCode(y))}return v.join("")},parse:function(d){for(var p=d.length,h=[],v=0;v<p;v++)h[v>>>1]|=u(d.charCodeAt(v)<<16-v%2*16);return s.create(h,2*p)}}}(),n.enc.Utf16)}),li(function(e,t){var n,o,s;e.exports=(s=(o=n=hi).lib.WordArray,o.enc.Base64={stringify:function(l){var u=l.words,d=l.sigBytes,p=this._map;l.clamp();for(var h=[],v=0;v<d;v+=3)for(var _=(u[v>>>2]>>>24-v%4*8&255)<<16|(u[v+1>>>2]>>>24-(v+1)%4*8&255)<<8|u[v+2>>>2]>>>24-(v+2)%4*8&255,y=0;y<4&&v+.75*y<d;y++)h.push(p.charAt(_>>>6*(3-y)&63));var b=p.charAt(64);if(b)for(;h.length%4;)h.push(b);return h.join("")},parse:function(l){var u=l.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var h=0;h<d.length;h++)p[d.charCodeAt(h)]=h}var v=d.charAt(64);if(v){var _=l.indexOf(v);_!==-1&&(u=_)}return function(y,b,w){for(var C=[],T=0,I=0;I<b;I++)if(I%4){var D=w[y.charCodeAt(I-1)]<<I%4*2,k=w[y.charCodeAt(I)]>>>6-I%4*2;C[T>>>2]|=(D|k)<<24-T%4*8,T++}return s.create(C,T)}(l,u,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.algo,h=[];(function(){for(var C=0;C<64;C++)h[C]=4294967296*o.abs(o.sin(C+1))|0})();var v=p.MD5=d.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,T){for(var I=0;I<16;I++){var D=T+I,k=C[D];C[D]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var O=this._hash.words,L=C[T+0],P=C[T+1],V=C[T+2],$=C[T+3],Y=C[T+4],F=C[T+5],U=C[T+6],Q=C[T+7],X=C[T+8],le=C[T+9],ye=C[T+10],ue=C[T+11],G=C[T+12],ee=C[T+13],ne=C[T+14],oe=C[T+15],Z=O[0],J=O[1],H=O[2],W=O[3];Z=_(Z,J,H,W,L,7,h[0]),W=_(W,Z,J,H,P,12,h[1]),H=_(H,W,Z,J,V,17,h[2]),J=_(J,H,W,Z,$,22,h[3]),Z=_(Z,J,H,W,Y,7,h[4]),W=_(W,Z,J,H,F,12,h[5]),H=_(H,W,Z,J,U,17,h[6]),J=_(J,H,W,Z,Q,22,h[7]),Z=_(Z,J,H,W,X,7,h[8]),W=_(W,Z,J,H,le,12,h[9]),H=_(H,W,Z,J,ye,17,h[10]),J=_(J,H,W,Z,ue,22,h[11]),Z=_(Z,J,H,W,G,7,h[12]),W=_(W,Z,J,H,ee,12,h[13]),H=_(H,W,Z,J,ne,17,h[14]),Z=y(Z,J=_(J,H,W,Z,oe,22,h[15]),H,W,P,5,h[16]),W=y(W,Z,J,H,U,9,h[17]),H=y(H,W,Z,J,ue,14,h[18]),J=y(J,H,W,Z,L,20,h[19]),Z=y(Z,J,H,W,F,5,h[20]),W=y(W,Z,J,H,ye,9,h[21]),H=y(H,W,Z,J,oe,14,h[22]),J=y(J,H,W,Z,Y,20,h[23]),Z=y(Z,J,H,W,le,5,h[24]),W=y(W,Z,J,H,ne,9,h[25]),H=y(H,W,Z,J,$,14,h[26]),J=y(J,H,W,Z,X,20,h[27]),Z=y(Z,J,H,W,ee,5,h[28]),W=y(W,Z,J,H,V,9,h[29]),H=y(H,W,Z,J,Q,14,h[30]),Z=b(Z,J=y(J,H,W,Z,G,20,h[31]),H,W,F,4,h[32]),W=b(W,Z,J,H,X,11,h[33]),H=b(H,W,Z,J,ue,16,h[34]),J=b(J,H,W,Z,ne,23,h[35]),Z=b(Z,J,H,W,P,4,h[36]),W=b(W,Z,J,H,Y,11,h[37]),H=b(H,W,Z,J,Q,16,h[38]),J=b(J,H,W,Z,ye,23,h[39]),Z=b(Z,J,H,W,ee,4,h[40]),W=b(W,Z,J,H,L,11,h[41]),H=b(H,W,Z,J,$,16,h[42]),J=b(J,H,W,Z,U,23,h[43]),Z=b(Z,J,H,W,le,4,h[44]),W=b(W,Z,J,H,G,11,h[45]),H=b(H,W,Z,J,oe,16,h[46]),Z=w(Z,J=b(J,H,W,Z,V,23,h[47]),H,W,L,6,h[48]),W=w(W,Z,J,H,Q,10,h[49]),H=w(H,W,Z,J,ne,15,h[50]),J=w(J,H,W,Z,F,21,h[51]),Z=w(Z,J,H,W,G,6,h[52]),W=w(W,Z,J,H,$,10,h[53]),H=w(H,W,Z,J,ye,15,h[54]),J=w(J,H,W,Z,P,21,h[55]),Z=w(Z,J,H,W,X,6,h[56]),W=w(W,Z,J,H,oe,10,h[57]),H=w(H,W,Z,J,U,15,h[58]),J=w(J,H,W,Z,ee,21,h[59]),Z=w(Z,J,H,W,Y,6,h[60]),W=w(W,Z,J,H,ue,10,h[61]),H=w(H,W,Z,J,V,15,h[62]),J=w(J,H,W,Z,le,21,h[63]),O[0]=O[0]+Z|0,O[1]=O[1]+J|0,O[2]=O[2]+H|0,O[3]=O[3]+W|0},_doFinalize:function(){var C=this._data,T=C.words,I=8*this._nDataBytes,D=8*C.sigBytes;T[D>>>5]|=128<<24-D%32;var k=o.floor(I/4294967296),O=I;T[15+(D+64>>>9<<4)]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8),T[14+(D+64>>>9<<4)]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),C.sigBytes=4*(T.length+1),this._process();for(var L=this._hash,P=L.words,V=0;V<4;V++){var $=P[V];P[V]=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8)}return L},clone:function(){var C=d.clone.call(this);return C._hash=this._hash.clone(),C}});function _(C,T,I,D,k,O,L){var P=C+(T&I|~T&D)+k+L;return(P<<O|P>>>32-O)+T}function y(C,T,I,D,k,O,L){var P=C+(T&D|I&~D)+k+L;return(P<<O|P>>>32-O)+T}function b(C,T,I,D,k,O,L){var P=C+(T^I^D)+k+L;return(P<<O|P>>>32-O)+T}function w(C,T,I,D,k,O,L){var P=C+(I^(T|~D))+k+L;return(P<<O|P>>>32-O)+T}s.MD5=d._createHelper(v),s.HmacMD5=d._createHmacHelper(v)}(Math),n.MD5)}),li(function(e,t){var n,o,s,l,u,d,p,h;e.exports=(s=(o=n=hi).lib,l=s.WordArray,u=s.Hasher,d=o.algo,p=[],h=d.SHA1=u.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(v,_){for(var y=this._hash.words,b=y[0],w=y[1],C=y[2],T=y[3],I=y[4],D=0;D<80;D++){if(D<16)p[D]=0|v[_+D];else{var k=p[D-3]^p[D-8]^p[D-14]^p[D-16];p[D]=k<<1|k>>>31}var O=(b<<5|b>>>27)+I+p[D];O+=D<20?1518500249+(w&C|~w&T):D<40?1859775393+(w^C^T):D<60?(w&C|w&T|C&T)-1894007588:(w^C^T)-899497514,I=T,T=C,C=w<<30|w>>>2,w=b,b=O}y[0]=y[0]+b|0,y[1]=y[1]+w|0,y[2]=y[2]+C|0,y[3]=y[3]+T|0,y[4]=y[4]+I|0},_doFinalize:function(){var v=this._data,_=v.words,y=8*this._nDataBytes,b=8*v.sigBytes;return _[b>>>5]|=128<<24-b%32,_[14+(b+64>>>9<<4)]=Math.floor(y/4294967296),_[15+(b+64>>>9<<4)]=y,v.sigBytes=4*_.length,this._process(),this._hash},clone:function(){var v=u.clone.call(this);return v._hash=this._hash.clone(),v}}),o.SHA1=u._createHelper(h),o.HmacSHA1=u._createHmacHelper(h),n.SHA1)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.algo,h=[],v=[];(function(){function b(I){for(var D=o.sqrt(I),k=2;k<=D;k++)if(!(I%k))return!1;return!0}function w(I){return 4294967296*(I-(0|I))|0}for(var C=2,T=0;T<64;)b(C)&&(T<8&&(h[T]=w(o.pow(C,.5))),v[T]=w(o.pow(C,1/3)),T++),C++})();var _=[],y=p.SHA256=d.extend({_doReset:function(){this._hash=new u.init(h.slice(0))},_doProcessBlock:function(b,w){for(var C=this._hash.words,T=C[0],I=C[1],D=C[2],k=C[3],O=C[4],L=C[5],P=C[6],V=C[7],$=0;$<64;$++){if($<16)_[$]=0|b[w+$];else{var Y=_[$-15],F=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,U=_[$-2],Q=(U<<15|U>>>17)^(U<<13|U>>>19)^U>>>10;_[$]=F+_[$-7]+Q+_[$-16]}var X=T&I^T&D^I&D,le=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),ye=V+((O<<26|O>>>6)^(O<<21|O>>>11)^(O<<7|O>>>25))+(O&L^~O&P)+v[$]+_[$];V=P,P=L,L=O,O=k+ye|0,k=D,D=I,I=T,T=ye+(le+X)|0}C[0]=C[0]+T|0,C[1]=C[1]+I|0,C[2]=C[2]+D|0,C[3]=C[3]+k|0,C[4]=C[4]+O|0,C[5]=C[5]+L|0,C[6]=C[6]+P|0,C[7]=C[7]+V|0},_doFinalize:function(){var b=this._data,w=b.words,C=8*this._nDataBytes,T=8*b.sigBytes;return w[T>>>5]|=128<<24-T%32,w[14+(T+64>>>9<<4)]=o.floor(C/4294967296),w[15+(T+64>>>9<<4)]=C,b.sigBytes=4*w.length,this._process(),this._hash},clone:function(){var b=d.clone.call(this);return b._hash=this._hash.clone(),b}});s.SHA256=d._createHelper(y),s.HmacSHA256=d._createHmacHelper(y)}(Math),n.SHA256)}),li(function(e,t){var n,o,s,l,u,d;e.exports=(s=(o=n=hi).lib.WordArray,l=o.algo,u=l.SHA256,d=l.SHA224=u.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=u._doFinalize.call(this);return p.sigBytes-=4,p}}),o.SHA224=u._createHelper(d),o.HmacSHA224=u._createHmacHelper(d),n.SHA224)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.Hasher,l=o.x64,u=l.Word,d=l.WordArray,p=o.algo;function h(){return u.create.apply(u,arguments)}var v=[h(1116352408,3609767458),h(1899447441,602891725),h(3049323471,3964484399),h(3921009573,2173295548),h(961987163,4081628472),h(1508970993,3053834265),h(2453635748,2937671579),h(2870763221,3664609560),h(3624381080,2734883394),h(310598401,1164996542),h(607225278,1323610764),h(1426881987,3590304994),h(1925078388,4068182383),h(2162078206,991336113),h(2614888103,633803317),h(3248222580,3479774868),h(3835390401,2666613458),h(4022224774,944711139),h(264347078,2341262773),h(604807628,2007800933),h(770255983,1495990901),h(1249150122,1856431235),h(1555081692,3175218132),h(1996064986,2198950837),h(2554220882,3999719339),h(2821834349,766784016),h(2952996808,2566594879),h(3210313671,3203337956),h(3336571891,1034457026),h(3584528711,2466948901),h(113926993,3758326383),h(338241895,168717936),h(666307205,1188179964),h(773529912,1546045734),h(1294757372,1522805485),h(1396182291,2643833823),h(1695183700,2343527390),h(1986661051,1014477480),h(2177026350,1206759142),h(2456956037,344077627),h(2730485921,1290863460),h(2820302411,3158454273),h(3259730800,3505952657),h(3345764771,106217008),h(3516065817,3606008344),h(3600352804,1432725776),h(4094571909,1467031594),h(275423344,851169720),h(430227734,3100823752),h(506948616,1363258195),h(659060556,3750685593),h(883997877,3785050280),h(958139571,3318307427),h(1322822218,3812723403),h(1537002063,2003034995),h(1747873779,3602036899),h(1955562222,1575990012),h(2024104815,1125592928),h(2227730452,2716904306),h(2361852424,442776044),h(2428436474,593698344),h(2756734187,3733110249),h(3204031479,2999351573),h(3329325298,3815920427),h(3391569614,3928383900),h(3515267271,566280711),h(3940187606,3454069534),h(4118630271,4000239992),h(116418474,1914138554),h(174292421,2731055270),h(289380356,3203993006),h(460393269,320620315),h(685471733,587496836),h(852142971,1086792851),h(1017036298,365543100),h(1126000580,2618297676),h(1288033470,3409855158),h(1501505948,4234509866),h(1607167915,987167468),h(1816402316,1246189591)],_=[];(function(){for(var b=0;b<80;b++)_[b]=h()})();var y=p.SHA512=s.extend({_doReset:function(){this._hash=new d.init([new u.init(1779033703,4089235720),new u.init(3144134277,2227873595),new u.init(1013904242,4271175723),new u.init(2773480762,1595750129),new u.init(1359893119,2917565137),new u.init(2600822924,725511199),new u.init(528734635,4215389547),new u.init(1541459225,327033209)])},_doProcessBlock:function(b,w){for(var C=this._hash.words,T=C[0],I=C[1],D=C[2],k=C[3],O=C[4],L=C[5],P=C[6],V=C[7],$=T.high,Y=T.low,F=I.high,U=I.low,Q=D.high,X=D.low,le=k.high,ye=k.low,ue=O.high,G=O.low,ee=L.high,ne=L.low,oe=P.high,Z=P.low,J=V.high,H=V.low,W=$,ce=Y,ge=F,de=U,te=Q,fe=X,Ie=le,De=ye,Ge=ue,ot=G,Ce=ee,et=ne,St=oe,Tt=Z,Nt=J,vn=H,hn=0;hn<80;hn++){var nn=_[hn];if(hn<16)var Xt=nn.high=0|b[w+2*hn],Yt=nn.low=0|b[w+2*hn+1];else{var kn=_[hn-15],mt=kn.high,nt=kn.low,Ye=(mt>>>1|nt<<31)^(mt>>>8|nt<<24)^mt>>>7,xt=(nt>>>1|mt<<31)^(nt>>>8|mt<<24)^(nt>>>7|mt<<25),Dt=_[hn-2],Ee=Dt.high,He=Dt.low,ct=(Ee>>>19|He<<13)^(Ee<<3|He>>>29)^Ee>>>6,ve=(He>>>19|Ee<<13)^(He<<3|Ee>>>29)^(He>>>6|Ee<<26),Te=_[hn-7],Oe=Te.high,qe=Te.low,je=_[hn-16],at=je.high,K=je.low;Xt=(Xt=(Xt=Ye+Oe+((Yt=xt+qe)>>>0<xt>>>0?1:0))+ct+((Yt+=ve)>>>0<ve>>>0?1:0))+at+((Yt+=K)>>>0<K>>>0?1:0),nn.high=Xt,nn.low=Yt}var pe,Ae=Ge&Ce^~Ge&St,Be=ot&et^~ot&Tt,Je=W&ge^W&te^ge&te,Ze=ce&de^ce&fe^de&fe,we=(W>>>28|ce<<4)^(W<<30|ce>>>2)^(W<<25|ce>>>7),Me=(ce>>>28|W<<4)^(ce<<30|W>>>2)^(ce<<25|W>>>7),Fe=(Ge>>>14|ot<<18)^(Ge>>>18|ot<<14)^(Ge<<23|ot>>>9),Ue=(ot>>>14|Ge<<18)^(ot>>>18|Ge<<14)^(ot<<23|Ge>>>9),vt=v[hn],pt=vt.high,Mt=vt.low,yt=Nt+Fe+((pe=vn+Ue)>>>0<vn>>>0?1:0),Pt=Me+Ze;Nt=St,vn=Tt,St=Ce,Tt=et,Ce=Ge,et=ot,Ge=Ie+(yt=(yt=(yt=yt+Ae+((pe+=Be)>>>0<Be>>>0?1:0))+pt+((pe+=Mt)>>>0<Mt>>>0?1:0))+Xt+((pe+=Yt)>>>0<Yt>>>0?1:0))+((ot=De+pe|0)>>>0<De>>>0?1:0)|0,Ie=te,De=fe,te=ge,fe=de,ge=W,de=ce,W=yt+(we+Je+(Pt>>>0<Me>>>0?1:0))+((ce=pe+Pt|0)>>>0<pe>>>0?1:0)|0}Y=T.low=Y+ce,T.high=$+W+(Y>>>0<ce>>>0?1:0),U=I.low=U+de,I.high=F+ge+(U>>>0<de>>>0?1:0),X=D.low=X+fe,D.high=Q+te+(X>>>0<fe>>>0?1:0),ye=k.low=ye+De,k.high=le+Ie+(ye>>>0<De>>>0?1:0),G=O.low=G+ot,O.high=ue+Ge+(G>>>0<ot>>>0?1:0),ne=L.low=ne+et,L.high=ee+Ce+(ne>>>0<et>>>0?1:0),Z=P.low=Z+Tt,P.high=oe+St+(Z>>>0<Tt>>>0?1:0),H=V.low=H+vn,V.high=J+Nt+(H>>>0<vn>>>0?1:0)},_doFinalize:function(){var b=this._data,w=b.words,C=8*this._nDataBytes,T=8*b.sigBytes;return w[T>>>5]|=128<<24-T%32,w[30+(T+128>>>10<<5)]=Math.floor(C/4294967296),w[31+(T+128>>>10<<5)]=C,b.sigBytes=4*w.length,this._process(),this._hash.toX32()},clone:function(){var b=s.clone.call(this);return b._hash=this._hash.clone(),b},blockSize:32});o.SHA512=s._createHelper(y),o.HmacSHA512=s._createHmacHelper(y)}(),n.SHA512)}),li(function(e,t){var n,o,s,l,u,d,p,h;e.exports=(s=(o=n=hi).x64,l=s.Word,u=s.WordArray,d=o.algo,p=d.SHA512,h=d.SHA384=p.extend({_doReset:function(){this._hash=new u.init([new l.init(3418070365,3238371032),new l.init(1654270250,914150663),new l.init(2438529370,812702999),new l.init(355462360,4144912697),new l.init(1731405415,4290775857),new l.init(2394180231,1750603025),new l.init(3675008525,1694076839),new l.init(1203062813,3204075428)])},_doFinalize:function(){var v=p._doFinalize.call(this);return v.sigBytes-=16,v}}),o.SHA384=p._createHelper(h),o.HmacSHA384=p._createHmacHelper(h),n.SHA384)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.x64.Word,h=s.algo,v=[],_=[],y=[];(function(){for(var C=1,T=0,I=0;I<24;I++){v[C+5*T]=(I+1)*(I+2)/2%64;var D=(2*C+3*T)%5;C=T%5,T=D}for(C=0;C<5;C++)for(T=0;T<5;T++)_[C+5*T]=T+(2*C+3*T)%5*5;for(var k=1,O=0;O<24;O++){for(var L=0,P=0,V=0;V<7;V++){if(1&k){var $=(1<<V)-1;$<32?P^=1<<$:L^=1<<$-32}128&k?k=k<<1^113:k<<=1}y[O]=p.create(L,P)}})();var b=[];(function(){for(var C=0;C<25;C++)b[C]=p.create()})();var w=h.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var C=this._state=[],T=0;T<25;T++)C[T]=new p.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(C,T){for(var I=this._state,D=this.blockSize/2,k=0;k<D;k++){var O=C[T+2*k],L=C[T+2*k+1];O=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),L=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),(H=I[k]).high^=L,H.low^=O}for(var P=0;P<24;P++){for(var V=0;V<5;V++){for(var $=0,Y=0,F=0;F<5;F++)$^=(H=I[V+5*F]).high,Y^=H.low;var U=b[V];U.high=$,U.low=Y}for(V=0;V<5;V++){var Q=b[(V+4)%5],X=b[(V+1)%5],le=X.high,ye=X.low;for($=Q.high^(le<<1|ye>>>31),Y=Q.low^(ye<<1|le>>>31),F=0;F<5;F++)(H=I[V+5*F]).high^=$,H.low^=Y}for(var ue=1;ue<25;ue++){var G=(H=I[ue]).high,ee=H.low,ne=v[ue];ne<32?($=G<<ne|ee>>>32-ne,Y=ee<<ne|G>>>32-ne):($=ee<<ne-32|G>>>64-ne,Y=G<<ne-32|ee>>>64-ne);var oe=b[_[ue]];oe.high=$,oe.low=Y}var Z=b[0],J=I[0];for(Z.high=J.high,Z.low=J.low,V=0;V<5;V++)for(F=0;F<5;F++){var H=I[ue=V+5*F],W=b[ue],ce=b[(V+1)%5+5*F],ge=b[(V+2)%5+5*F];H.high=W.high^~ce.high&ge.high,H.low=W.low^~ce.low&ge.low}H=I[0];var de=y[P];H.high^=de.high,H.low^=de.low}},_doFinalize:function(){var C=this._data,T=C.words,I=(this._nDataBytes,8*C.sigBytes),D=32*this.blockSize;T[I>>>5]|=1<<24-I%32,T[(o.ceil((I+1)/D)*D>>>5)-1]|=128,C.sigBytes=4*T.length,this._process();for(var k=this._state,O=this.cfg.outputLength/8,L=O/8,P=[],V=0;V<L;V++){var $=k[V],Y=$.high,F=$.low;Y=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),F=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8),P.push(F),P.push(Y)}return new u.init(P,O)},clone:function(){for(var C=d.clone.call(this),T=C._state=this._state.slice(0),I=0;I<25;I++)T[I]=T[I].clone();return C}});s.SHA3=d._createHelper(w),s.HmacSHA3=d._createHmacHelper(w)}(Math),n.SHA3)}),li(function(e,t){var n;e.exports=(n=hi,function(o){var s=n,l=s.lib,u=l.WordArray,d=l.Hasher,p=s.algo,h=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),b=u.create([0,1518500249,1859775393,2400959708,2840853838]),w=u.create([1352829926,1548603684,1836072691,2053994217,0]),C=p.RIPEMD160=d.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(P,V){for(var $=0;$<16;$++){var Y=V+$,F=P[Y];P[Y]=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8)}var U,Q,X,le,ye,ue,G,ee,ne,oe,Z,J=this._hash.words,H=b.words,W=w.words,ce=h.words,ge=v.words,de=_.words,te=y.words;for(ue=U=J[0],G=Q=J[1],ee=X=J[2],ne=le=J[3],oe=ye=J[4],$=0;$<80;$+=1)Z=U+P[V+ce[$]]|0,Z+=$<16?T(Q,X,le)+H[0]:$<32?I(Q,X,le)+H[1]:$<48?D(Q,X,le)+H[2]:$<64?k(Q,X,le)+H[3]:O(Q,X,le)+H[4],Z=(Z=L(Z|=0,de[$]))+ye|0,U=ye,ye=le,le=L(X,10),X=Q,Q=Z,Z=ue+P[V+ge[$]]|0,Z+=$<16?O(G,ee,ne)+W[0]:$<32?k(G,ee,ne)+W[1]:$<48?D(G,ee,ne)+W[2]:$<64?I(G,ee,ne)+W[3]:T(G,ee,ne)+W[4],Z=(Z=L(Z|=0,te[$]))+oe|0,ue=oe,oe=ne,ne=L(ee,10),ee=G,G=Z;Z=J[1]+X+ne|0,J[1]=J[2]+le+oe|0,J[2]=J[3]+ye+ue|0,J[3]=J[4]+U+G|0,J[4]=J[0]+Q+ee|0,J[0]=Z},_doFinalize:function(){var P=this._data,V=P.words,$=8*this._nDataBytes,Y=8*P.sigBytes;V[Y>>>5]|=128<<24-Y%32,V[14+(Y+64>>>9<<4)]=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8),P.sigBytes=4*(V.length+1),this._process();for(var F=this._hash,U=F.words,Q=0;Q<5;Q++){var X=U[Q];U[Q]=16711935&(X<<8|X>>>24)|4278255360&(X<<24|X>>>8)}return F},clone:function(){var P=d.clone.call(this);return P._hash=this._hash.clone(),P}});function T(P,V,$){return P^V^$}function I(P,V,$){return P&V|~P&$}function D(P,V,$){return(P|~V)^$}function k(P,V,$){return P&$|V&~$}function O(P,V,$){return P^(V|~$)}function L(P,V){return P<<V|P>>>32-V}s.RIPEMD160=d._createHelper(C),s.HmacRIPEMD160=d._createHmacHelper(C)}(),n.RIPEMD160)}),li(function(e,t){var n,o,s,l,u,d;e.exports=(o=(n=hi).lib,s=o.Base,l=n.enc,u=l.Utf8,d=n.algo,void(d.HMAC=s.extend({init:function(p,h){p=this._hasher=new p.init,typeof h=="string"&&(h=u.parse(h));var v=p.blockSize,_=4*v;h.sigBytes>_&&(h=p.finalize(h)),h.clamp();for(var y=this._oKey=h.clone(),b=this._iKey=h.clone(),w=y.words,C=b.words,T=0;T<v;T++)w[T]^=1549556828,C[T]^=909522486;y.sigBytes=b.sigBytes=_,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var h=this._hasher,v=h.finalize(p);h.reset();var _=h.finalize(this._oKey.clone().concat(v));return _}})))}),li(function(e,t){var n,o,s,l,u,d,p,h,v;e.exports=(s=(o=n=hi).lib,l=s.Base,u=s.WordArray,d=o.algo,p=d.SHA1,h=d.HMAC,v=d.PBKDF2=l.extend({cfg:l.extend({keySize:4,hasher:p,iterations:1}),init:function(_){this.cfg=this.cfg.extend(_)},compute:function(_,y){for(var b=this.cfg,w=h.create(b.hasher,_),C=u.create(),T=u.create([1]),I=C.words,D=T.words,k=b.keySize,O=b.iterations;I.length<k;){var L=w.update(y).finalize(T);w.reset();for(var P=L.words,V=P.length,$=L,Y=1;Y<O;Y++){$=w.finalize($),w.reset();for(var F=$.words,U=0;U<V;U++)P[U]^=F[U]}C.concat(L),D[0]++}return C.sigBytes=4*k,C}}),o.PBKDF2=function(_,y,b){return v.create(b).compute(_,y)},n.PBKDF2)}),li(function(e,t){var n,o,s,l,u,d,p,h;e.exports=(s=(o=n=hi).lib,l=s.Base,u=s.WordArray,d=o.algo,p=d.MD5,h=d.EvpKDF=l.extend({cfg:l.extend({keySize:4,hasher:p,iterations:1}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,_){for(var y=this.cfg,b=y.hasher.create(),w=u.create(),C=w.words,T=y.keySize,I=y.iterations;C.length<T;){D&&b.update(D);var D=b.update(v).finalize(_);b.reset();for(var k=1;k<I;k++)D=b.finalize(D),b.reset();w.concat(D)}return w.sigBytes=4*T,w}}),o.EvpKDF=function(v,_,y){return h.create(y).compute(v,_)},n.EvpKDF)}),li(function(e,t){var n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D,k,O,L,P,V,$,Y;e.exports=void((n=hi).lib.Cipher||(s=n,l=s.lib,u=l.Base,d=l.WordArray,p=l.BufferedBlockAlgorithm,h=s.enc,h.Utf8,v=h.Base64,_=s.algo,y=_.EvpKDF,b=l.Cipher=p.extend({cfg:u.extend(),createEncryptor:function(F,U){return this.create(this._ENC_XFORM_MODE,F,U)},createDecryptor:function(F,U){return this.create(this._DEC_XFORM_MODE,F,U)},init:function(F,U,Q){this.cfg=this.cfg.extend(Q),this._xformMode=F,this._key=U,this.reset()},reset:function(){p.reset.call(this),this._doReset()},process:function(F){return this._append(F),this._process()},finalize:function(F){F&&this._append(F);var U=this._doFinalize();return U},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function F(U){return typeof U=="string"?Y:P}return function(U){return{encrypt:function(Q,X,le){return F(X).encrypt(U,Q,X,le)},decrypt:function(Q,X,le){return F(X).decrypt(U,Q,X,le)}}}}()}),l.StreamCipher=b.extend({_doFinalize:function(){var F=this._process(!0);return F},blockSize:1}),w=s.mode={},C=l.BlockCipherMode=u.extend({createEncryptor:function(F,U){return this.Encryptor.create(F,U)},createDecryptor:function(F,U){return this.Decryptor.create(F,U)},init:function(F,U){this._cipher=F,this._iv=U}}),T=w.CBC=function(){var F=C.extend();function U(Q,X,le){var ye=this._iv;if(ye){var ue=ye;this._iv=o}else var ue=this._prevBlock;for(var G=0;G<le;G++)Q[X+G]^=ue[G]}return F.Encryptor=F.extend({processBlock:function(Q,X){var le=this._cipher,ye=le.blockSize;U.call(this,Q,X,ye),le.encryptBlock(Q,X),this._prevBlock=Q.slice(X,X+ye)}}),F.Decryptor=F.extend({processBlock:function(Q,X){var le=this._cipher,ye=le.blockSize,ue=Q.slice(X,X+ye);le.decryptBlock(Q,X),U.call(this,Q,X,ye),this._prevBlock=ue}}),F}(),I=s.pad={},D=I.Pkcs7={pad:function(F,U){for(var Q=4*U,X=Q-F.sigBytes%Q,le=X<<24|X<<16|X<<8|X,ye=[],ue=0;ue<X;ue+=4)ye.push(le);var G=d.create(ye,X);F.concat(G)},unpad:function(F){var U=255&F.words[F.sigBytes-1>>>2];F.sigBytes-=U}},l.BlockCipher=b.extend({cfg:b.cfg.extend({mode:T,padding:D}),reset:function(){b.reset.call(this);var F=this.cfg,U=F.iv,Q=F.mode;if(this._xformMode==this._ENC_XFORM_MODE)var X=Q.createEncryptor;else{var X=Q.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==X?this._mode.init(this,U&&U.words):(this._mode=X.call(Q,this,U&&U.words),this._mode.__creator=X)},_doProcessBlock:function(F,U){this._mode.processBlock(F,U)},_doFinalize:function(){var F=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){F.pad(this._data,this.blockSize);var U=this._process(!0)}else{var U=this._process(!0);F.unpad(U)}return U},blockSize:4}),k=l.CipherParams=u.extend({init:function(F){this.mixIn(F)},toString:function(F){return(F||this.formatter).stringify(this)}}),O=s.format={},L=O.OpenSSL={stringify:function(F){var U=F.ciphertext,Q=F.salt;if(Q)var X=d.create([1398893684,1701076831]).concat(Q).concat(U);else var X=U;return X.toString(v)},parse:function(F){var U=v.parse(F),Q=U.words;if(Q[0]==1398893684&&Q[1]==1701076831){var X=d.create(Q.slice(2,4));Q.splice(0,4),U.sigBytes-=16}return k.create({ciphertext:U,salt:X})}},P=l.SerializableCipher=u.extend({cfg:u.extend({format:L}),encrypt:function(F,U,Q,X){X=this.cfg.extend(X);var le=F.createEncryptor(Q,X),ye=le.finalize(U),ue=le.cfg;return k.create({ciphertext:ye,key:Q,iv:ue.iv,algorithm:F,mode:ue.mode,padding:ue.padding,blockSize:F.blockSize,formatter:X.format})},decrypt:function(F,U,Q,X){X=this.cfg.extend(X),U=this._parse(U,X.format);var le=F.createDecryptor(Q,X).finalize(U.ciphertext);return le},_parse:function(F,U){return typeof F=="string"?U.parse(F,this):F}}),V=s.kdf={},$=V.OpenSSL={execute:function(F,U,Q,X){X||(X=d.random(8));var le=y.create({keySize:U+Q}).compute(F,X),ye=d.create(le.words.slice(U),4*Q);return le.sigBytes=4*U,k.create({key:le,iv:ye,salt:X})}},Y=l.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:$}),encrypt:function(F,U,Q,X){var le=(X=this.cfg.extend(X)).kdf.execute(Q,F.keySize,F.ivSize);X.iv=le.iv;var ye=P.encrypt.call(this,F,U,le.key,X);return ye.mixIn(le),ye},decrypt:function(F,U,Q,X){X=this.cfg.extend(X),U=this._parse(U,X.format);var le=X.kdf.execute(Q,F.keySize,F.ivSize,U.salt);X.iv=le.iv;var ye=P.decrypt.call(this,F,U,le.key,X);return ye}})))}),li(function(e,t){var n;e.exports=((n=hi).mode.CFB=function(){var o=n.lib.BlockCipherMode.extend();function s(l,u,d,p){var h=this._iv;if(h){var v=h.slice(0);this._iv=void 0}else v=this._prevBlock;p.encryptBlock(v,0);for(var _=0;_<d;_++)l[u+_]^=v[_]}return o.Encryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize;s.call(this,l,u,p,d),this._prevBlock=l.slice(u,u+p)}}),o.Decryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize,h=l.slice(u,u+p);s.call(this,l,u,p,d),this._prevBlock=h}}),o}(),n.mode.CFB)}),li(function(e,t){var n,o,s;e.exports=((n=hi).mode.CTR=(o=n.lib.BlockCipherMode.extend(),s=o.Encryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize,h=this._iv,v=this._counter;h&&(v=this._counter=h.slice(0),this._iv=void 0);var _=v.slice(0);d.encryptBlock(_,0),v[p-1]=v[p-1]+1|0;for(var y=0;y<p;y++)l[u+y]^=_[y]}}),o.Decryptor=s,o),n.mode.CTR)}),li(function(e,t){var n;e.exports=((n=hi).mode.CTRGladman=function(){var o=n.lib.BlockCipherMode.extend();function s(u){if((u>>24&255)==255){var d=u>>16&255,p=u>>8&255,h=255&u;d===255?(d=0,p===255?(p=0,h===255?h=0:++h):++p):++d,u=0,u+=d<<16,u+=p<<8,u+=h}else u+=1<<24;return u}var l=o.Encryptor=o.extend({processBlock:function(u,d){var p=this._cipher,h=p.blockSize,v=this._iv,_=this._counter;v&&(_=this._counter=v.slice(0),this._iv=void 0),function(w){(w[0]=s(w[0]))===0&&(w[1]=s(w[1]))}(_);var y=_.slice(0);p.encryptBlock(y,0);for(var b=0;b<h;b++)u[d+b]^=y[b]}});return o.Decryptor=l,o}(),n.mode.CTRGladman)}),li(function(e,t){var n,o,s;e.exports=((n=hi).mode.OFB=(o=n.lib.BlockCipherMode.extend(),s=o.Encryptor=o.extend({processBlock:function(l,u){var d=this._cipher,p=d.blockSize,h=this._iv,v=this._keystream;h&&(v=this._keystream=h.slice(0),this._iv=void 0),d.encryptBlock(v,0);for(var _=0;_<p;_++)l[u+_]^=v[_]}}),o.Decryptor=s,o),n.mode.OFB)}),li(function(e,t){var n,o;e.exports=((n=hi).mode.ECB=((o=n.lib.BlockCipherMode.extend()).Encryptor=o.extend({processBlock:function(s,l){this._cipher.encryptBlock(s,l)}}),o.Decryptor=o.extend({processBlock:function(s,l){this._cipher.decryptBlock(s,l)}}),o),n.mode.ECB)}),li(function(e,t){var n;e.exports=((n=hi).pad.AnsiX923={pad:function(o,s){var l=o.sigBytes,u=4*s,d=u-l%u,p=l+d-1;o.clamp(),o.words[p>>>2]|=d<<24-p%4*8,o.sigBytes+=d},unpad:function(o){var s=255&o.words[o.sigBytes-1>>>2];o.sigBytes-=s}},n.pad.Ansix923)}),li(function(e,t){var n;e.exports=((n=hi).pad.Iso10126={pad:function(o,s){var l=4*s,u=l-o.sigBytes%l;o.concat(n.lib.WordArray.random(u-1)).concat(n.lib.WordArray.create([u<<24],1))},unpad:function(o){var s=255&o.words[o.sigBytes-1>>>2];o.sigBytes-=s}},n.pad.Iso10126)}),li(function(e,t){var n;e.exports=((n=hi).pad.Iso97971={pad:function(o,s){o.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(o,s)},unpad:function(o){n.pad.ZeroPadding.unpad(o),o.sigBytes--}},n.pad.Iso97971)}),li(function(e,t){var n;e.exports=((n=hi).pad.ZeroPadding={pad:function(o,s){var l=4*s;o.clamp(),o.sigBytes+=l-(o.sigBytes%l||l)},unpad:function(o){for(var s=o.words,l=o.sigBytes-1;!(s[l>>>2]>>>24-l%4*8&255);)l--;o.sigBytes=l+1}},n.pad.ZeroPadding)}),li(function(e,t){var n;e.exports=((n=hi).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}),li(function(e,t){var n,o,s,l;e.exports=(s=(o=n=hi).lib.CipherParams,l=o.enc.Hex,o.format.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var d=l.parse(u);return s.create({ciphertext:d})}},n.format.Hex)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.BlockCipher,l=o.algo,u=[],d=[],p=[],h=[],v=[],_=[],y=[],b=[],w=[],C=[];(function(){for(var D=[],k=0;k<256;k++)D[k]=k<128?k<<1:k<<1^283;var O=0,L=0;for(k=0;k<256;k++){var P=L^L<<1^L<<2^L<<3^L<<4;P=P>>>8^255&P^99,u[O]=P,d[P]=O;var V=D[O],$=D[V],Y=D[$],F=257*D[P]^16843008*P;p[O]=F<<24|F>>>8,h[O]=F<<16|F>>>16,v[O]=F<<8|F>>>24,_[O]=F,F=16843009*Y^65537*$^257*V^16843008*O,y[P]=F<<24|F>>>8,b[P]=F<<16|F>>>16,w[P]=F<<8|F>>>24,C[P]=F,O?(O=V^D[D[D[Y^V]]],L^=D[D[L]]):O=L=1}})();var T=[0,1,2,4,8,16,32,64,128,27,54],I=l.AES=s.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var D=this._keyPriorReset=this._key,k=D.words,O=D.sigBytes/4,L=4*((this._nRounds=O+6)+1),P=this._keySchedule=[],V=0;V<L;V++)if(V<O)P[V]=k[V];else{var $=P[V-1];V%O?O>6&&V%O==4&&($=u[$>>>24]<<24|u[$>>>16&255]<<16|u[$>>>8&255]<<8|u[255&$]):($=u[($=$<<8|$>>>24)>>>24]<<24|u[$>>>16&255]<<16|u[$>>>8&255]<<8|u[255&$],$^=T[V/O|0]<<24),P[V]=P[V-O]^$}for(var Y=this._invKeySchedule=[],F=0;F<L;F++)V=L-F,$=F%4?P[V]:P[V-4],Y[F]=F<4||V<=4?$:y[u[$>>>24]]^b[u[$>>>16&255]]^w[u[$>>>8&255]]^C[u[255&$]]}},encryptBlock:function(D,k){this._doCryptBlock(D,k,this._keySchedule,p,h,v,_,u)},decryptBlock:function(D,k){var O=D[k+1];D[k+1]=D[k+3],D[k+3]=O,this._doCryptBlock(D,k,this._invKeySchedule,y,b,w,C,d),O=D[k+1],D[k+1]=D[k+3],D[k+3]=O},_doCryptBlock:function(D,k,O,L,P,V,$,Y){for(var F=this._nRounds,U=D[k]^O[0],Q=D[k+1]^O[1],X=D[k+2]^O[2],le=D[k+3]^O[3],ye=4,ue=1;ue<F;ue++){var G=L[U>>>24]^P[Q>>>16&255]^V[X>>>8&255]^$[255&le]^O[ye++],ee=L[Q>>>24]^P[X>>>16&255]^V[le>>>8&255]^$[255&U]^O[ye++],ne=L[X>>>24]^P[le>>>16&255]^V[U>>>8&255]^$[255&Q]^O[ye++],oe=L[le>>>24]^P[U>>>16&255]^V[Q>>>8&255]^$[255&X]^O[ye++];U=G,Q=ee,X=ne,le=oe}G=(Y[U>>>24]<<24|Y[Q>>>16&255]<<16|Y[X>>>8&255]<<8|Y[255&le])^O[ye++],ee=(Y[Q>>>24]<<24|Y[X>>>16&255]<<16|Y[le>>>8&255]<<8|Y[255&U])^O[ye++],ne=(Y[X>>>24]<<24|Y[le>>>16&255]<<16|Y[U>>>8&255]<<8|Y[255&Q])^O[ye++],oe=(Y[le>>>24]<<24|Y[U>>>16&255]<<16|Y[Q>>>8&255]<<8|Y[255&X])^O[ye++],D[k]=G,D[k+1]=ee,D[k+2]=ne,D[k+3]=oe},keySize:8});o.AES=s._createHelper(I)}(),n.AES)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib,l=s.WordArray,u=s.BlockCipher,d=o.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],_=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],y=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],b=d.DES=u.extend({_doReset:function(){for(var I=this._key.words,D=[],k=0;k<56;k++){var O=p[k]-1;D[k]=I[O>>>5]>>>31-O%32&1}for(var L=this._subKeys=[],P=0;P<16;P++){var V=L[P]=[],$=v[P];for(k=0;k<24;k++)V[k/6|0]|=D[(h[k]-1+$)%28]<<31-k%6,V[4+(k/6|0)]|=D[28+(h[k+24]-1+$)%28]<<31-k%6;for(V[0]=V[0]<<1|V[0]>>>31,k=1;k<7;k++)V[k]=V[k]>>>4*(k-1)+3;V[7]=V[7]<<5|V[7]>>>27}var Y=this._invSubKeys=[];for(k=0;k<16;k++)Y[k]=L[15-k]},encryptBlock:function(I,D){this._doCryptBlock(I,D,this._subKeys)},decryptBlock:function(I,D){this._doCryptBlock(I,D,this._invSubKeys)},_doCryptBlock:function(I,D,k){this._lBlock=I[D],this._rBlock=I[D+1],w.call(this,4,252645135),w.call(this,16,65535),C.call(this,2,858993459),C.call(this,8,16711935),w.call(this,1,1431655765);for(var O=0;O<16;O++){for(var L=k[O],P=this._lBlock,V=this._rBlock,$=0,Y=0;Y<8;Y++)$|=_[Y][((V^L[Y])&y[Y])>>>0];this._lBlock=V,this._rBlock=P^$}var F=this._lBlock;this._lBlock=this._rBlock,this._rBlock=F,w.call(this,1,1431655765),C.call(this,8,16711935),C.call(this,2,858993459),w.call(this,16,65535),w.call(this,4,252645135),I[D]=this._lBlock,I[D+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function w(I,D){var k=(this._lBlock>>>I^this._rBlock)&D;this._rBlock^=k,this._lBlock^=k<<I}function C(I,D){var k=(this._rBlock>>>I^this._lBlock)&D;this._lBlock^=k,this._rBlock^=k<<I}o.DES=u._createHelper(b);var T=d.TripleDES=u.extend({_doReset:function(){var I=this._key.words;this._des1=b.createEncryptor(l.create(I.slice(0,2))),this._des2=b.createEncryptor(l.create(I.slice(2,4))),this._des3=b.createEncryptor(l.create(I.slice(4,6)))},encryptBlock:function(I,D){this._des1.encryptBlock(I,D),this._des2.decryptBlock(I,D),this._des3.encryptBlock(I,D)},decryptBlock:function(I,D){this._des3.decryptBlock(I,D),this._des2.encryptBlock(I,D),this._des1.decryptBlock(I,D)},keySize:6,ivSize:2,blockSize:2});o.TripleDES=u._createHelper(T)}(),n.TripleDES)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.StreamCipher,l=o.algo,u=l.RC4=s.extend({_doReset:function(){for(var h=this._key,v=h.words,_=h.sigBytes,y=this._S=[],b=0;b<256;b++)y[b]=b;b=0;for(var w=0;b<256;b++){var C=b%_,T=v[C>>>2]>>>24-C%4*8&255;w=(w+y[b]+T)%256;var I=y[b];y[b]=y[w],y[w]=I}this._i=this._j=0},_doProcessBlock:function(h,v){h[v]^=d.call(this)},keySize:8,ivSize:0});function d(){for(var h=this._S,v=this._i,_=this._j,y=0,b=0;b<4;b++){_=(_+h[v=(v+1)%256])%256;var w=h[v];h[v]=h[_],h[_]=w,y|=h[(h[v]+h[_])%256]<<24-8*b}return this._i=v,this._j=_,y}o.RC4=s._createHelper(u);var p=l.RC4Drop=u.extend({cfg:u.cfg.extend({drop:192}),_doReset:function(){u._doReset.call(this);for(var h=this.cfg.drop;h>0;h--)d.call(this)}});o.RC4Drop=s._createHelper(p)}(),n.RC4)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.StreamCipher,l=o.algo,u=[],d=[],p=[],h=l.Rabbit=s.extend({_doReset:function(){for(var _=this._key.words,y=this.cfg.iv,b=0;b<4;b++)_[b]=16711935&(_[b]<<8|_[b]>>>24)|4278255360&(_[b]<<24|_[b]>>>8);var w=this._X=[_[0],_[3]<<16|_[2]>>>16,_[1],_[0]<<16|_[3]>>>16,_[2],_[1]<<16|_[0]>>>16,_[3],_[2]<<16|_[1]>>>16],C=this._C=[_[2]<<16|_[2]>>>16,4294901760&_[0]|65535&_[1],_[3]<<16|_[3]>>>16,4294901760&_[1]|65535&_[2],_[0]<<16|_[0]>>>16,4294901760&_[2]|65535&_[3],_[1]<<16|_[1]>>>16,4294901760&_[3]|65535&_[0]];for(this._b=0,b=0;b<4;b++)v.call(this);for(b=0;b<8;b++)C[b]^=w[b+4&7];if(y){var T=y.words,I=T[0],D=T[1],k=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8),O=16711935&(D<<8|D>>>24)|4278255360&(D<<24|D>>>8),L=k>>>16|4294901760&O,P=O<<16|65535&k;for(C[0]^=k,C[1]^=L,C[2]^=O,C[3]^=P,C[4]^=k,C[5]^=L,C[6]^=O,C[7]^=P,b=0;b<4;b++)v.call(this)}},_doProcessBlock:function(_,y){var b=this._X;v.call(this),u[0]=b[0]^b[5]>>>16^b[3]<<16,u[1]=b[2]^b[7]>>>16^b[5]<<16,u[2]=b[4]^b[1]>>>16^b[7]<<16,u[3]=b[6]^b[3]>>>16^b[1]<<16;for(var w=0;w<4;w++)u[w]=16711935&(u[w]<<8|u[w]>>>24)|4278255360&(u[w]<<24|u[w]>>>8),_[y+w]^=u[w]},blockSize:4,ivSize:2});function v(){for(var _=this._X,y=this._C,b=0;b<8;b++)d[b]=y[b];for(y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0,b=0;b<8;b++){var w=_[b]+y[b],C=65535&w,T=w>>>16,I=((C*C>>>17)+C*T>>>15)+T*T,D=((4294901760&w)*w|0)+((65535&w)*w|0);p[b]=I^D}_[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,_[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,_[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,_[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,_[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,_[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,_[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,_[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}o.Rabbit=s._createHelper(h)}(),n.Rabbit)}),li(function(e,t){var n;e.exports=(n=hi,function(){var o=n,s=o.lib.StreamCipher,l=o.algo,u=[],d=[],p=[],h=l.RabbitLegacy=s.extend({_doReset:function(){var _=this._key.words,y=this.cfg.iv,b=this._X=[_[0],_[3]<<16|_[2]>>>16,_[1],_[0]<<16|_[3]>>>16,_[2],_[1]<<16|_[0]>>>16,_[3],_[2]<<16|_[1]>>>16],w=this._C=[_[2]<<16|_[2]>>>16,4294901760&_[0]|65535&_[1],_[3]<<16|_[3]>>>16,4294901760&_[1]|65535&_[2],_[0]<<16|_[0]>>>16,4294901760&_[2]|65535&_[3],_[1]<<16|_[1]>>>16,4294901760&_[3]|65535&_[0]];this._b=0;for(var C=0;C<4;C++)v.call(this);for(C=0;C<8;C++)w[C]^=b[C+4&7];if(y){var T=y.words,I=T[0],D=T[1],k=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8),O=16711935&(D<<8|D>>>24)|4278255360&(D<<24|D>>>8),L=k>>>16|4294901760&O,P=O<<16|65535&k;for(w[0]^=k,w[1]^=L,w[2]^=O,w[3]^=P,w[4]^=k,w[5]^=L,w[6]^=O,w[7]^=P,C=0;C<4;C++)v.call(this)}},_doProcessBlock:function(_,y){var b=this._X;v.call(this),u[0]=b[0]^b[5]>>>16^b[3]<<16,u[1]=b[2]^b[7]>>>16^b[5]<<16,u[2]=b[4]^b[1]>>>16^b[7]<<16,u[3]=b[6]^b[3]>>>16^b[1]<<16;for(var w=0;w<4;w++)u[w]=16711935&(u[w]<<8|u[w]>>>24)|4278255360&(u[w]<<24|u[w]>>>8),_[y+w]^=u[w]},blockSize:4,ivSize:2});function v(){for(var _=this._X,y=this._C,b=0;b<8;b++)d[b]=y[b];for(y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0,b=0;b<8;b++){var w=_[b]+y[b],C=65535&w,T=w>>>16,I=((C*C>>>17)+C*T>>>15)+T*T,D=((4294901760&w)*w|0)+((65535&w)*w|0);p[b]=I^D}_[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,_[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,_[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,_[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,_[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,_[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,_[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,_[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}o.RabbitLegacy=s._createHelper(h)}(),n.RabbitLegacy)}),li(function(e,t){e.exports=hi}));function _re(){throw new Error("setTimeout has not been defined")}function yre(){throw new Error("clearTimeout has not been defined")}var Of=_re,Mf=yre;function bre(e){if(Of===setTimeout)return setTimeout(e,0);if((Of===_re||!Of)&&setTimeout)return Of=setTimeout,setTimeout(e,0);try{return Of(e,0)}catch{try{return Of.call(null,e,0)}catch{return Of.call(this,e,0)}}}typeof Wg.setTimeout=="function"&&(Of=setTimeout),typeof Wg.clearTimeout=="function"&&(Mf=clearTimeout);var sp,sd=[],xg=!1,v8=-1;function hQe(){xg&&sp&&(xg=!1,sp.length?sd=sp.concat(sd):v8=-1,sd.length&&xre())}function xre(){if(!xg){var e=bre(hQe);xg=!0;for(var t=sd.length;t;){for(sp=sd,sd=[];++v8<t;)sp&&sp[v8].run();v8=-1,t=sd.length}sp=null,xg=!1,function(n){if(Mf===clearTimeout)return clearTimeout(n);if((Mf===yre||!Mf)&&clearTimeout)return Mf=clearTimeout,clearTimeout(n);try{Mf(n)}catch{try{return Mf.call(null,n)}catch{return Mf.call(this,n)}}}(e)}}function sa(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];sd.push(new Ere(e,t)),sd.length!==1||xg||bre(xre)}function Ere(e,t){this.fun=e,this.array=t}Ere.prototype.run=function(){this.fun.apply(null,this.array)};var E4=Wg.performance||{};E4.now||E4.mozNow||E4.msNow||E4.oNow||E4.webkitNow;function Pf(){}function ci(){ci.init.call(this)}function wre(e){return e._maxListeners===void 0?ci.defaultMaxListeners:e._maxListeners}function pQe(e,t,n){if(t)e.call(n);else for(var o=e.length,s=a3(e,o),l=0;l<o;++l)s[l].call(n)}function mQe(e,t,n,o){if(t)e.call(n,o);else for(var s=e.length,l=a3(e,s),u=0;u<s;++u)l[u].call(n,o)}function vQe(e,t,n,o,s){if(t)e.call(n,o,s);else for(var l=e.length,u=a3(e,l),d=0;d<l;++d)u[d].call(n,o,s)}function gQe(e,t,n,o,s,l){if(t)e.call(n,o,s,l);else for(var u=e.length,d=a3(e,u),p=0;p<u;++p)d[p].call(n,o,s,l)}function _Qe(e,t,n,o){if(t)e.apply(n,o);else for(var s=e.length,l=a3(e,s),u=0;u<s;++u)l[u].apply(n,o)}function zq(e,t,n,o){var s,l,u,d;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if((l=e._events)?(l.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),l=e._events),u=l[t]):(l=e._events=new Pf,e._eventsCount=0),u){if(typeof u=="function"?u=l[t]=o?[n,u]:[u,n]:o?u.unshift(n):u.push(n),!u.warned&&(s=wre(e))&&s>0&&u.length>s){u.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=u.length,d=p,typeof console.warn=="function"?console.warn(d):console.log(d)}}else u=l[t]=n,++e._eventsCount;return e}function Hq(e,t,n){var o=!1;function s(){e.removeListener(t,s),o||(o=!0,n.apply(e,arguments))}return s.listener=n,s}function Wq(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}function a3(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}Pf.prototype=Object.create(null),ci.EventEmitter=ci,ci.usingDomains=!1,ci.prototype.domain=void 0,ci.prototype._events=void 0,ci.prototype._maxListeners=void 0,ci.defaultMaxListeners=10,ci.init=function(){this.domain=null,ci.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Pf,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ci.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},ci.prototype.getMaxListeners=function(){return wre(this)},ci.prototype.emit=function(e){var t,n,o,s,l,u,d,p=e==="error";if(u=this._events)p=p&&u.error==null;else if(!p)return!1;if(d=this.domain,p){if(t=arguments[1],!d){if(t instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=d,t.domainThrown=!1,d.emit("error",t),!1}if(!(n=u[e]))return!1;var v=typeof n=="function";switch(o=arguments.length){case 1:pQe(n,v,this);break;case 2:mQe(n,v,this,arguments[1]);break;case 3:vQe(n,v,this,arguments[1],arguments[2]);break;case 4:gQe(n,v,this,arguments[1],arguments[2],arguments[3]);break;default:for(s=new Array(o-1),l=1;l<o;l++)s[l-1]=arguments[l];_Qe(n,v,this,s)}return!0},ci.prototype.addListener=function(e,t){return zq(this,e,t,!1)},ci.prototype.on=ci.prototype.addListener,ci.prototype.prependListener=function(e,t){return zq(this,e,t,!0)},ci.prototype.once=function(e,t){if(typeof t!="function")throw new TypeError('"listener" argument must be a function');return this.on(e,Hq(this,e,t)),this},ci.prototype.prependOnceListener=function(e,t){if(typeof t!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Hq(this,e,t)),this},ci.prototype.removeListener=function(e,t){var n,o,s,l,u;if(typeof t!="function")throw new TypeError('"listener" argument must be a function');if(!(o=this._events))return this;if(!(n=o[e]))return this;if(n===t||n.listener&&n.listener===t)--this._eventsCount==0?this._events=new Pf:(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,l=n.length;l-- >0;)if(n[l]===t||n[l].listener&&n[l].listener===t){u=n[l].listener,s=l;break}if(s<0)return this;if(n.length===1){if(n[0]=void 0,--this._eventsCount==0)return this._events=new Pf,this;delete o[e]}else(function(d,p){for(var h=p,v=h+1,_=d.length;v<_;h+=1,v+=1)d[h]=d[v];d.pop()})(n,s);o.removeListener&&this.emit("removeListener",e,u||t)}return this},ci.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return arguments.length===0?(this._events=new Pf,this._eventsCount=0):n[e]&&(--this._eventsCount==0?this._events=new Pf:delete n[e]),this;if(arguments.length===0){for(var o,s=Object.keys(n),l=0;l<s.length;++l)(o=s[l])!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=new Pf,this._eventsCount=0,this}if(typeof(t=n[e])=="function")this.removeListener(e,t);else if(t)do this.removeListener(e,t[t.length-1]);while(t[0]);return this},ci.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?typeof t=="function"?[t.listener||t]:function(o){for(var s=new Array(o.length),l=0;l<s.length;++l)s[l]=o[l].listener||o[l];return s}(t):[]},ci.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Wq.call(e,t)},ci.prototype.listenerCount=Wq,ci.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var as=typeof Object.create=="function"?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},yQe=/%[sdj%]/g;function bQe(e){if(!KM(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(nh(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,s=o.length,l=String(e).replace(yQe,function(d){if(d==="%%")return"%";if(n>=s)return d;switch(d){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch{return"[Circular]"}default:return d}}),u=o[n];n<s;u=o[++n])fV(u)||!s3(u)?l+=" "+u:l+=" "+nh(u);return l}function Sre(e,t){if(Kf(Wg.process))return function(){return Sre(e,t).apply(this,arguments)};var n=!1;return function(){return n||(console.error(t),n=!0),e.apply(this,arguments)}}var kO,tw={};function nh(e,t){var n={seen:[],stylize:EQe};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Cre(t)?n.showHidden=t:t&&function(o,s){if(!s||!s3(s))return o;for(var l=Object.keys(s),u=l.length;u--;)o[l[u]]=s[l[u]]}(n,t),Kf(n.showHidden)&&(n.showHidden=!1),Kf(n.depth)&&(n.depth=2),Kf(n.colors)&&(n.colors=!1),Kf(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=xQe),Q8(n,e,n.depth)}function xQe(e,t){var n=nh.styles[t];return n?"\x1B["+nh.colors[n][0]+"m"+e+"\x1B["+nh.colors[n][1]+"m":e}function EQe(e,t){return e}function Q8(e,t,n){if(e.customInspect&&t&&OO(t.inspect)&&t.inspect!==nh&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return KM(o)||(o=Q8(e,o,n)),o}var s=function(b,w){if(Kf(w))return b.stylize("undefined","undefined");if(KM(w)){var C="'"+JSON.stringify(w).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return b.stylize(C,"string")}if(T=w,typeof T=="number")return b.stylize(""+w,"number");var T;if(Cre(w))return b.stylize(""+w,"boolean");if(fV(w))return b.stylize("null","null")}(e,t);if(s)return s;var l=Object.keys(t),u=function(b){var w={};return b.forEach(function(C,T){w[C]=!0}),w}(l);if(e.showHidden&&(l=Object.getOwnPropertyNames(t)),RO(t)&&(l.indexOf("message")>=0||l.indexOf("description")>=0))return AO(t);if(l.length===0){if(OO(t)){var d=t.name?": "+t.name:"";return e.stylize("[Function"+d+"]","special")}if(NO(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(jq(t))return e.stylize(Date.prototype.toString.call(t),"date");if(RO(t))return AO(t)}var p,h,v="",_=!1,y=["{","}"];return p=t,Array.isArray(p)&&(_=!0,y=["[","]"]),OO(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),NO(t)&&(v=" "+RegExp.prototype.toString.call(t)),jq(t)&&(v=" "+Date.prototype.toUTCString.call(t)),RO(t)&&(v=" "+AO(t)),l.length!==0||_&&t.length!=0?n<0?NO(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),h=_?function(b,w,C,T,I){for(var D=[],k=0,O=w.length;k<O;++k)Tre(w,String(k))?D.push(DO(b,w,C,T,String(k),!0)):D.push("");return I.forEach(function(L){L.match(/^\d+$/)||D.push(DO(b,w,C,T,L,!0))}),D}(e,t,n,u,l):l.map(function(b){return DO(e,t,n,u,b,_)}),e.seen.pop(),function(b,w,C){return b.reduce(function(T,I){return I.indexOf(`
260
260
  `),T+I.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?C[0]+(w===""?"":w+`
261
261
  `)+" "+b.join(`,
262
262
  `)+" "+C[1]:C[0]+w+" "+b.join(", ")+" "+C[1]}(h,v,y)):y[0]+v+y[1]}function AO(e){return"["+Error.prototype.toString.call(e)+"]"}function DO(e,t,n,o,s,l){var u,d,p;if((p=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?d=p.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):p.set&&(d=e.stylize("[Setter]","special")),Tre(o,s)||(u="["+s+"]"),d||(e.seen.indexOf(p.value)<0?(d=fV(n)?Q8(e,p.value,null):Q8(e,p.value,n-1)).indexOf(`
@@ -265,9 +265,9 @@ next answer: `).concat(this.filterSDPDirection(a))),this._log.warn("offer: ".con
265
265
  `).substr(2):`
266
266
  `+d.split(`
267
267
  `).map(function(h){return" "+h}).join(`
268
- `)):d=e.stylize("[Circular]","special")),Kf(u)){if(l&&s.match(/^\d+$/))return d;(u=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+d}function Cre(e){return typeof e=="boolean"}function fV(e){return e===null}function KM(e){return typeof e=="string"}function Kf(e){return e===void 0}function NO(e){return s3(e)&&hV(e)==="[object RegExp]"}function s3(e){return typeof e=="object"&&e!==null}function jq(e){return s3(e)&&hV(e)==="[object Date]"}function RO(e){return s3(e)&&(hV(e)==="[object Error]"||e instanceof Error)}function OO(e){return typeof e=="function"}function hV(e){return Object.prototype.toString.call(e)}function Tre(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function J0(){this.head=null,this.tail=null,this.length=0}nh.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},nh.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},J0.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},J0.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},J0.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},J0.prototype.clear=function(){this.head=this.tail=null,this.length=0},J0.prototype.join=function(e){if(this.length===0)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},J0.prototype.concat=function(e){if(this.length===0)return Lt.alloc(0);if(this.length===1)return this.head.data;for(var t=Lt.allocUnsafe(e>>>0),n=this.head,o=0;n;)n.data.copy(t,o),o+=n.data.length,n=n.next;return t};var EQe=Lt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ry(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!EQe(t))throw new Error("Unknown encoding: "+t)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=SQe;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=CQe;break;default:return void(this.write=wQe)}this.charBuffer=new Lt(6),this.charReceived=0,this.charLength=0}function wQe(e){return e.toString(this.encoding)}function SQe(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function CQe(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}ry.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((s=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&s<=56319)){if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var o=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,o),o-=this.charReceived);var s;if(o=(t+=e.toString(this.encoding,0,o)).length-1,(s=t.charCodeAt(o))>=55296&&s<=56319){var l=this.surrogateSize;return this.charLength+=l,this.charReceived+=l,this.charBuffer.copy(this.charBuffer,l,0,l),e.copy(this.charBuffer,0,0,l),t.substring(0,o)}return t},ry.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(t==1&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},ry.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,o=this.charBuffer,s=this.encoding;t+=o.slice(0,n).toString(s)}return t},fo.ReadableState=Ire;var Ni=function(e){return Kf(kO)&&(kO=""),e=e.toUpperCase(),tw[e]||(new RegExp("\\b"+e+"\\b","i").test(kO)?tw[e]=function(){var t=yQe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}:tw[e]=function(){}),tw[e]}("stream");function Ire(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof ll&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:o,this.highWaterMark=~~this.highWaterMark,this.buffer=new J0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new ry(e.encoding),this.encoding=e.encoding)}function fo(e){if(!(this instanceof fo))return new fo(e);this._readableState=new Ire(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),ci.call(this)}function Gq(e,t,n,o,s){var l=function(h,v){var _=null;return o3(v)||typeof v=="string"||v==null||h.objectMode||(_=new TypeError("Invalid non-string/buffer chunk")),_}(t,n);if(l)e.emit("error",l);else if(n===null)t.reading=!1,function(h,v){if(!v.ended){if(v.decoder){var _=v.decoder.end();_&&_.length&&(v.buffer.push(_),v.length+=v.objectMode?1:_.length)}v.ended=!0,eS(h)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!s){var u=new Error("stream.push() after EOF");e.emit("error",u)}else if(t.endEmitted&&s){var d=new Error("stream.unshift() after end event");e.emit("error",d)}else{var p;!t.decoder||s||o||(n=t.decoder.write(n),p=!t.objectMode&&n.length===0),s||(t.reading=!1),p||(t.flowing&&t.length===0&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,s?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&eS(e))),function(h,v){v.readingMore||(v.readingMore=!0,sa(TQe,h,v))}(e,t)}else s||(t.reading=!1);return function(h){return!h.ended&&(h.needReadable||h.length<h.highWaterMark||h.length===0)}(t)}as(fo,ci),fo.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||typeof e!="string"||(t=t||n.defaultEncoding)!==n.encoding&&(e=Lt.from(e,t),t=""),Gq(this,n,e,t,!1)},fo.prototype.unshift=function(e){return Gq(this,this._readableState,e,"",!0)},fo.prototype.isPaused=function(){return this._readableState.flowing===!1},fo.prototype.setEncoding=function(e){return this._readableState.decoder=new ry(e),this._readableState.encoding=e,this};var qq=8388608;function Yq(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(n){return n>=qq?n=qq:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function eS(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Ni("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?sa(Kq,e):Kq(e))}function Kq(e){Ni("emit readable"),e.emit("readable"),pV(e)}function TQe(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Ni("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function IQe(e){Ni("readable nexttick read 0"),e.read(0)}function kQe(e,t){t.reading||(Ni("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),pV(e),t.flowing&&!t.reading&&e.read(0)}function pV(e){var t=e._readableState;for(Ni("flow",t.flowing);t.flowing&&e.read()!==null;);}function Xq(e,t){return t.length===0?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(o,s,l){var u;return o<s.head.data.length?(u=s.head.data.slice(0,o),s.head.data=s.head.data.slice(o)):u=o===s.head.data.length?s.shift():l?function(d,p){var h=p.head,v=1,_=h.data;for(d-=_.length;h=h.next;){var y=h.data,b=d>y.length?y.length:d;if(b===y.length?_+=y:_+=y.slice(0,d),(d-=b)===0){b===y.length?(++v,h.next?p.head=h.next:p.head=p.tail=null):(p.head=h,h.data=y.slice(b));break}++v}return p.length-=v,_}(o,s):function(d,p){var h=Lt.allocUnsafe(d),v=p.head,_=1;for(v.data.copy(h),d-=v.data.length;v=v.next;){var y=v.data,b=d>y.length?y.length:d;if(y.copy(h,h.length-d,0,b),(d-=b)===0){b===y.length?(++_,v.next?p.head=v.next:p.head=p.tail=null):(p.head=v,v.data=y.slice(b));break}++_}return p.length-=_,h}(o,s),u}(e,t.buffer,t.decoder),n);var n}function MO(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,sa(AQe,t,e))}function AQe(e,t){e.endEmitted||e.length!==0||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Jq(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}function DQe(){}function NQe(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function XM(e,t){Object.defineProperty(this,"buffer",{get:Sre(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof ll&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:o,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(l){(function(u,d){var p=u._writableState,h=p.sync,v=p.writecb;if(function(y){y.writing=!1,y.writecb=null,y.length-=y.writelen,y.writelen=0}(p),d)(function(y,b,w,C,T){--b.pendingcb,w?sa(T,C):T(C),y._writableState.errorEmitted=!0,y.emit("error",C)})(u,p,h,d,v);else{var _=Are(p);_||p.corked||p.bufferProcessing||!p.bufferedRequest||kre(u,p),h?sa(Zq,u,p,_,v):Zq(u,p,_,v)}})(t,l)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Nre(this)}function wa(e){if(!(this instanceof wa||this instanceof ll))return new wa(e);this._writableState=new XM(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev)),ci.call(this)}function JM(e,t,n,o,s,l,u){t.writelen=o,t.writecb=u,t.writing=!0,t.sync=!0,n?e._writev(s,t.onwrite):e._write(s,l,t.onwrite),t.sync=!1}function Zq(e,t,n,o){n||function(s,l){l.length===0&&l.needDrain&&(l.needDrain=!1,s.emit("drain"))}(e,t),t.pendingcb--,o(),Dre(e,t)}function kre(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var o=t.bufferedRequestCount,s=new Array(o),l=t.corkedRequestsFree;l.entry=n;for(var u=0;n;)s[u]=n,n=n.next,u+=1;JM(e,t,!0,t.length,s,"",l.finish),t.pendingcb++,t.lastBufferedRequest=null,l.next?(t.corkedRequestsFree=l.next,l.next=null):t.corkedRequestsFree=new Nre(t)}else{for(;n;){var d=n.chunk,p=n.encoding,h=n.callback;if(JM(e,t,!1,t.objectMode?1:d.length,d,p,h),n=n.next,t.writing)break}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Are(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Qq(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Dre(e,t){var n=Are(t);return n&&(t.pendingcb===0?(Qq(e,t),t.finished=!0,e.emit("finish")):Qq(e,t)),n}function Nre(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var o=t.entry;for(t.entry=null;o;){var s=o.callback;e.pendingcb--,s(n),o=o.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}fo.prototype.read=function(e){Ni("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Ni("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?MO(this):eS(this),null;if((e=Yq(e,t))===0&&t.ended)return t.length===0&&MO(this),null;var o,s=t.needReadable;return Ni("need readable",s),(t.length===0||t.length-e<t.highWaterMark)&&Ni("length less than watermark",s=!0),t.ended||t.reading?Ni("reading or ended",s=!1):s&&(Ni("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Yq(n,t))),(o=e>0?Xq(e,t):null)===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&MO(this)),o!==null&&this.emit("data",o),o},fo.prototype._read=function(e){this.emit("error",new Error("not implemented"))},fo.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,Ni("pipe count=%d opts=%j",o.pipesCount,t);var s=!t||t.end!==!1?u:h;function l(T){Ni("onunpipe"),T===n&&h()}function u(){Ni("onend"),e.end()}o.endEmitted?sa(s):n.once("end",s),e.on("unpipe",l);var d=function(T){return function(){var I=T._readableState;Ni("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&T.listeners("data").length&&(I.flowing=!0,pV(T))}}(n);e.on("drain",d);var p=!1;function h(){Ni("cleanup"),e.removeListener("close",b),e.removeListener("finish",w),e.removeListener("drain",d),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",u),n.removeListener("end",h),n.removeListener("data",_),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||d()}var v=!1;function _(T){Ni("ondata"),v=!1,e.write(T)!==!1||v||((o.pipesCount===1&&o.pipes===e||o.pipesCount>1&&Jq(o.pipes,e)!==-1)&&!p&&(Ni("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,v=!0),n.pause())}function y(T){var I;Ni("onerror",T),C(),e.removeListener("error",y),I="error",e.listeners(I).length===0&&e.emit("error",T)}function b(){e.removeListener("finish",w),C()}function w(){Ni("onfinish"),e.removeListener("close",b),C()}function C(){Ni("unpipe"),n.unpipe(e)}return n.on("data",_),function(T,I,D){if(typeof T.prependListener=="function")return T.prependListener(I,D);T._events&&T._events[I]?Array.isArray(T._events[I])?T._events[I].unshift(D):T._events[I]=[D,T._events[I]]:T.on(I,D)}(e,"error",y),e.once("close",b),e.once("finish",w),e.emit("pipe",n),o.flowing||(Ni("pipe resume"),n.resume()),e},fo.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<o;s++)n[s].emit("unpipe",this);return this}var l=Jq(t.pipes,e);return l===-1?this:(t.pipes.splice(l,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},fo.prototype.on=function(e,t){var n=ci.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var o=this._readableState;o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.emittedReadable=!1,o.reading?o.length&&eS(this):sa(IQe,this))}return n},fo.prototype.addListener=fo.prototype.on,fo.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ni("resume"),e.flowing=!0,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,sa(kQe,t,n))}(this,e)),this},fo.prototype.pause=function(){return Ni("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ni("pause"),this._readableState.flowing=!1,this.emit("pause")),this},fo.prototype.wrap=function(e){var t=this._readableState,n=!1,o=this;for(var s in e.on("end",function(){if(Ni("wrapped end"),t.decoder&&!t.ended){var l=t.decoder.end();l&&l.length&&o.push(l)}o.push(null)}),e.on("data",function(l){Ni("wrapped data"),t.decoder&&(l=t.decoder.write(l)),t.objectMode&&l==null||(t.objectMode||l&&l.length)&&(o.push(l)||(n=!0,e.pause()))}),e)this[s]===void 0&&typeof e[s]=="function"&&(this[s]=function(l){return function(){return e[l].apply(e,arguments)}}(s));return function(l,u){for(var d=0,p=l.length;d<p;d++)u(l[d],d)}(["error","close","destroy","pause","resume"],function(l){e.on(l,o.emit.bind(o,l))}),o._read=function(l){Ni("wrapped _read",l),n&&(n=!1,e.resume())},o},fo._fromList=Xq,wa.WritableState=XM,as(wa,ci),XM.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},wa.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},wa.prototype.write=function(e,t,n){var o=this._writableState,s=!1;return typeof t=="function"&&(n=t,t=null),Lt.isBuffer(e)?t="buffer":t||(t=o.defaultEncoding),typeof n!="function"&&(n=DQe),o.ended?function(l,u){var d=new Error("write after end");l.emit("error",d),sa(u,d)}(this,n):function(l,u,d,p){var h=!0,v=!1;return d===null?v=new TypeError("May not write null values to stream"):Lt.isBuffer(d)||typeof d=="string"||d===void 0||u.objectMode||(v=new TypeError("Invalid non-string/buffer chunk")),v&&(l.emit("error",v),sa(p,v),h=!1),h}(this,o,e,n)&&(o.pendingcb++,s=function(l,u,d,p,h){d=function(b,w,C){return b.objectMode||b.decodeStrings===!1||typeof w!="string"||(w=Lt.from(w,C)),w}(u,d,p),Lt.isBuffer(d)&&(p="buffer");var v=u.objectMode?1:d.length;u.length+=v;var _=u.length<u.highWaterMark;if(_||(u.needDrain=!0),u.writing||u.corked){var y=u.lastBufferedRequest;u.lastBufferedRequest=new NQe(d,p,h),y?y.next=u.lastBufferedRequest:u.bufferedRequest=u.lastBufferedRequest,u.bufferedRequestCount+=1}else JM(l,u,!1,v,d,p,h);return _}(this,o,e,t,n)),s},wa.prototype.cork=function(){this._writableState.corked++},wa.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||kre(this,e))},wa.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},wa.prototype._write=function(e,t,n){n(new Error("not implemented"))},wa.prototype._writev=null,wa.prototype.end=function(e,t,n){var o=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),e!=null&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(s,l,u){l.ending=!0,Dre(s,l),u&&(l.finished?sa(u):s.once("finish",u)),l.ended=!0,s.writable=!1}(this,o,n)},as(ll,fo);for(var eY=Object.keys(wa.prototype),PO=0;PO<eY.length;PO++){var VO=eY[PO];ll.prototype[VO]||(ll.prototype[VO]=wa.prototype[VO])}function ll(e){if(!(this instanceof ll))return new ll(e);fo.call(this,e),wa.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",RQe)}function RQe(){this.allowHalfOpen||this._writableState.ended||sa(OQe,this)}function OQe(e){e.end()}function MQe(e){this.afterTransform=function(t,n){return function(o,s,l){var u=o._transformState;u.transforming=!1;var d=u.writecb;if(!d)return o.emit("error",new Error("no writecb in Transform class"));u.writechunk=null,u.writecb=null,l!=null&&o.push(l),d(s);var p=o._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&o._read(p.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function nl(e){if(!(this instanceof nl))return new nl(e);ll.call(this,e),this._transformState=new MQe(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(n){tY(t,n)}):tY(t)})}function tY(e,t){if(t)return e.emit("error",t);var n=e._writableState,o=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(o.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function iy(e){if(!(this instanceof iy))return new iy(e);nl.call(this,e)}function Yu(){ci.call(this)}as(nl,ll),nl.prototype.push=function(e,t){return this._transformState.needTransform=!1,ll.prototype.push.call(this,e,t)},nl.prototype._transform=function(e,t,n){throw new Error("Not implemented")},nl.prototype._write=function(e,t,n){var o=this._transformState;if(o.writecb=n,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},nl.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},as(iy,nl),iy.prototype._transform=function(e,t,n){n(null,e)},as(Yu,ci),Yu.Readable=fo,Yu.Writable=wa,Yu.Duplex=ll,Yu.Transform=nl,Yu.PassThrough=iy,Yu.Stream=Yu,Yu.prototype.pipe=function(e,t){var n=this;function o(v){e.writable&&e.write(v)===!1&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",s),e._isStdio||t&&t.end===!1||(n.on("end",u),n.on("close",d));var l=!1;function u(){l||(l=!0,e.end())}function d(){l||(l=!0,typeof e.destroy=="function"&&e.destroy())}function p(v){if(h(),ci.listenerCount(this,"error")===0)throw v}function h(){n.removeListener("data",o),e.removeListener("drain",s),n.removeListener("end",u),n.removeListener("close",d),n.removeListener("error",p),e.removeListener("error",p),n.removeListener("end",h),n.removeListener("close",h),e.removeListener("close",h)}return n.on("error",p),e.on("error",p),n.on("end",h),n.on("close",h),e.on("close",h),e.emit("pipe",n),e};var Rre={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function PQe(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function nd(e,t,n,o,s){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+o),s);else for(var l=0;l<o;l++)e[s+l]=t[n+l]}var tS=Uint8Array,il=Uint16Array,nS=Int32Array,VQe=4,nY=0,rY=1,LQe=2;function f2(e){for(var t=e.length;--t>=0;)e[t]=0}var BQe=0,Ore=1,FQe=2,mV=29,l3=256,Cy=l3+1+mV,Eg=30,vV=19,iY=2*Cy+1,lp=15,LO=16,$Qe=7,gV=256,Mre=16,Pre=17,Vre=18,ZM=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],g8=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],UQe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],oY=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],td=new Array(2*(Cy+2));f2(td);var oy=new Array(2*Eg);f2(oy);var Ty=new Array(512);f2(Ty);var Iy=new Array(256);f2(Iy);var _V=new Array(mV);f2(_V);var aY,sY,lY,rS=new Array(Eg);function BO(e,t,n,o,s){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=o,this.max_length=s,this.has_stree=e&&e.length}function FO(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Lre(e){return e<256?Ty[e]:Ty[256+(e>>>7)]}function ky(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ls(e,t,n){e.bi_valid>LO-n?(e.bi_buf|=t<<e.bi_valid&65535,ky(e,e.bi_buf),e.bi_buf=t>>LO-e.bi_valid,e.bi_valid+=n-LO):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Fc(e,t,n){ls(e,n[2*t],n[2*t+1])}function Bre(e,t){var n=0;do n|=1&e,e>>>=1,n<<=1;while(--t>0);return n>>>1}function Fre(e,t,n){var o,s,l=new Array(lp+1),u=0;for(o=1;o<=lp;o++)l[o]=u=u+n[o-1]<<1;for(s=0;s<=t;s++){var d=e[2*s+1];d!==0&&(e[2*s]=Bre(l[d]++,d))}}function $re(e){var t;for(t=0;t<Cy;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Eg;t++)e.dyn_dtree[2*t]=0;for(t=0;t<vV;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*gV]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ure(e){e.bi_valid>8?ky(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function cY(e,t,n,o){var s=2*t,l=2*n;return e[s]<e[l]||e[s]===e[l]&&o[t]<=o[n]}function $O(e,t,n){for(var o=e.heap[n],s=n<<1;s<=e.heap_len&&(s<e.heap_len&&cY(t,e.heap[s+1],e.heap[s],e.depth)&&s++,!cY(t,o,e.heap[s],e.depth));)e.heap[n]=e.heap[s],n=s,s<<=1;e.heap[n]=o}function uY(e,t,n){var o,s,l,u,d=0;if(e.last_lit!==0)do o=e.pending_buf[e.d_buf+2*d]<<8|e.pending_buf[e.d_buf+2*d+1],s=e.pending_buf[e.l_buf+d],d++,o===0?Fc(e,s,t):(Fc(e,(l=Iy[s])+l3+1,t),(u=ZM[l])!==0&&ls(e,s-=_V[l],u),Fc(e,l=Lre(--o),n),(u=g8[l])!==0&&ls(e,o-=rS[l],u));while(d<e.last_lit);Fc(e,gV,t)}function UO(e,t){var n,o,s,l=t.dyn_tree,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=iY,n=0;n<p;n++)l[2*n]!==0?(e.heap[++e.heap_len]=h=n,e.depth[n]=0):l[2*n+1]=0;for(;e.heap_len<2;)l[2*(s=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[s]=0,e.opt_len--,d&&(e.static_len-=u[2*s+1]);for(t.max_code=h,n=e.heap_len>>1;n>=1;n--)$O(e,l,n);s=p;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$O(e,l,1),o=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=o,l[2*s]=l[2*n]+l[2*o],e.depth[s]=(e.depth[n]>=e.depth[o]?e.depth[n]:e.depth[o])+1,l[2*n+1]=l[2*o+1]=s,e.heap[1]=s++,$O(e,l,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(v,_){var y,b,w,C,T,I,D=_.dyn_tree,k=_.max_code,O=_.stat_desc.static_tree,L=_.stat_desc.has_stree,P=_.stat_desc.extra_bits,V=_.stat_desc.extra_base,$=_.stat_desc.max_length,Y=0;for(C=0;C<=lp;C++)v.bl_count[C]=0;for(D[2*v.heap[v.heap_max]+1]=0,y=v.heap_max+1;y<iY;y++)(C=D[2*D[2*(b=v.heap[y])+1]+1]+1)>$&&(C=$,Y++),D[2*b+1]=C,b>k||(v.bl_count[C]++,T=0,b>=V&&(T=P[b-V]),I=D[2*b],v.opt_len+=I*(C+T),L&&(v.static_len+=I*(O[2*b+1]+T)));if(Y!==0){do{for(C=$-1;v.bl_count[C]===0;)C--;v.bl_count[C]--,v.bl_count[C+1]+=2,v.bl_count[$]--,Y-=2}while(Y>0);for(C=$;C!==0;C--)for(b=v.bl_count[C];b!==0;)(w=v.heap[--y])>k||(D[2*w+1]!==C&&(v.opt_len+=(C-D[2*w+1])*D[2*w],D[2*w+1]=C),b--)}}(e,t),Fre(l,h,e.bl_count)}function dY(e,t,n){var o,s,l=-1,u=t[1],d=0,p=7,h=4;for(u===0&&(p=138,h=3),t[2*(n+1)+1]=65535,o=0;o<=n;o++)s=u,u=t[2*(o+1)+1],++d<p&&s===u||(d<h?e.bl_tree[2*s]+=d:s!==0?(s!==l&&e.bl_tree[2*s]++,e.bl_tree[2*Mre]++):d<=10?e.bl_tree[2*Pre]++:e.bl_tree[2*Vre]++,d=0,l=s,u===0?(p=138,h=3):s===u?(p=6,h=3):(p=7,h=4))}function fY(e,t,n){var o,s,l=-1,u=t[1],d=0,p=7,h=4;for(u===0&&(p=138,h=3),o=0;o<=n;o++)if(s=u,u=t[2*(o+1)+1],!(++d<p&&s===u)){if(d<h)do Fc(e,s,e.bl_tree);while(--d!=0);else s!==0?(s!==l&&(Fc(e,s,e.bl_tree),d--),Fc(e,Mre,e.bl_tree),ls(e,d-3,2)):d<=10?(Fc(e,Pre,e.bl_tree),ls(e,d-3,3)):(Fc(e,Vre,e.bl_tree),ls(e,d-11,7));d=0,l=s,u===0?(p=138,h=3):s===u?(p=6,h=3):(p=7,h=4)}}f2(rS);var hY=!1;function zQe(e){hY||(function(){var t,n,o,s,l,u=new Array(lp+1);for(o=0,s=0;s<mV-1;s++)for(_V[s]=o,t=0;t<1<<ZM[s];t++)Iy[o++]=s;for(Iy[o-1]=s,l=0,s=0;s<16;s++)for(rS[s]=l,t=0;t<1<<g8[s];t++)Ty[l++]=s;for(l>>=7;s<Eg;s++)for(rS[s]=l<<7,t=0;t<1<<g8[s]-7;t++)Ty[256+l++]=s;for(n=0;n<=lp;n++)u[n]=0;for(t=0;t<=143;)td[2*t+1]=8,t++,u[8]++;for(;t<=255;)td[2*t+1]=9,t++,u[9]++;for(;t<=279;)td[2*t+1]=7,t++,u[7]++;for(;t<=287;)td[2*t+1]=8,t++,u[8]++;for(Fre(td,Cy+1,u),t=0;t<Eg;t++)oy[2*t+1]=5,oy[2*t]=Bre(t,5);aY=new BO(td,ZM,l3+1,Cy,lp),sY=new BO(oy,g8,0,Eg,lp),lY=new BO(new Array(0),UQe,0,vV,$Qe)}(),hY=!0),e.l_desc=new FO(e.dyn_ltree,aY),e.d_desc=new FO(e.dyn_dtree,sY),e.bl_desc=new FO(e.bl_tree,lY),e.bi_buf=0,e.bi_valid=0,$re(e)}function zre(e,t,n,o){ls(e,(BQe<<1)+(o?1:0),3),function(s,l,u,d){Ure(s),ky(s,u),ky(s,~u),nd(s.pending_buf,s.window,l,u,s.pending),s.pending+=u}(e,t,n)}function HQe(e){ls(e,Ore<<1,3),Fc(e,gV,td),function(t){t.bi_valid===16?(ky(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function WQe(e,t,n,o){var s,l,u=0;e.level>0?(e.strm.data_type===LQe&&(e.strm.data_type=function(d){var p,h=4093624447;for(p=0;p<=31;p++,h>>>=1)if(1&h&&d.dyn_ltree[2*p]!==0)return nY;if(d.dyn_ltree[18]!==0||d.dyn_ltree[20]!==0||d.dyn_ltree[26]!==0)return rY;for(p=32;p<l3;p++)if(d.dyn_ltree[2*p]!==0)return rY;return nY}(e)),UO(e,e.l_desc),UO(e,e.d_desc),u=function(d){var p;for(dY(d,d.dyn_ltree,d.l_desc.max_code),dY(d,d.dyn_dtree,d.d_desc.max_code),UO(d,d.bl_desc),p=vV-1;p>=3&&d.bl_tree[2*oY[p]+1]===0;p--);return d.opt_len+=3*(p+1)+5+5+4,p}(e),s=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=s&&(s=l)):s=l=n+5,n+4<=s&&t!==-1?zre(e,t,n,o):e.strategy===VQe||l===s?(ls(e,(Ore<<1)+(o?1:0),3),uY(e,td,oy)):(ls(e,(FQe<<1)+(o?1:0),3),function(d,p,h,v){var _;for(ls(d,p-257,5),ls(d,h-1,5),ls(d,v-4,4),_=0;_<v;_++)ls(d,d.bl_tree[2*oY[_]+1],3);fY(d,d.dyn_ltree,p-1),fY(d,d.dyn_dtree,h-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),uY(e,e.dyn_ltree,e.dyn_dtree)),$re(e),o&&Ure(e)}function rh(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Iy[n]+l3+1)]++,e.dyn_dtree[2*Lre(t)]++),e.last_lit===e.lit_bufsize-1}function QM(e,t,n,o){for(var s=65535&e|0,l=e>>>16&65535|0,u=0;n!==0;){n-=u=n>2e3?2e3:n;do l=l+(s=s+t[o++]|0)|0;while(--u);s%=65521,l%=65521}return s|l<<16|0}var jQe=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var o=0;o<8;o++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Xo(e,t,n,o){var s=jQe,l=o+n;e^=-1;for(var u=o;u<l;u++)e=e>>>8^s[255&(e^t[u])];return-1^e}var og,Ap=0,GQe=1,qQe=3,zf=4,pY=5,ep=0,mY=1,Dp=-2,YQe=-3,zO=-5,KQe=-1,XQe=1,nw=2,JQe=3,ZQe=4,QQe=2,yV=8,eet=9,eP=286,tet=30,net=19,ret=2*eP+1,iet=15,Ai=3,Xf=258,Yl=Xf+Ai+1,oet=32,bV=42,tP=69,_8=73,y8=91,b8=103,cp=113,A4=666,Jo=1,ay=2,up=3,wg=4,aet=3;function Jf(e,t){return e.msg=Rre[t],t}function vY(e){return(e<<1)-(e>4?9:0)}function tp(e){for(var t=e.length;--t>=0;)e[t]=0}function Vf(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(nd(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function la(e,t){WQe(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Vf(e.strm)}function gi(e,t){e.pending_buf[e.pending++]=t}function w4(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Hre(e,t){var n,o,s=e.max_chain_length,l=e.strstart,u=e.prev_length,d=e.nice_match,p=e.strstart>e.w_size-Yl?e.strstart-(e.w_size-Yl):0,h=e.window,v=e.w_mask,_=e.prev,y=e.strstart+Xf,b=h[l+u-1],w=h[l+u];e.prev_length>=e.good_match&&(s>>=2),d>e.lookahead&&(d=e.lookahead);do if(h[(n=t)+u]===w&&h[n+u-1]===b&&h[n]===h[l]&&h[++n]===h[l+1]){l+=2,n++;do;while(h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&l<y);if(o=Xf-(y-l),l=y-Xf,o>u){if(e.match_start=t,u=o,o>=d)break;b=h[l+u-1],w=h[l+u]}}while((t=_[t&v])>p&&--s!=0);return u<=e.lookahead?u:e.lookahead}function Ay(e){var t,n,o,s,l,u,d,p,h,v,_=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=_+(_-Yl)){nd(e.window,e.window,_,_,0),e.match_start-=_,e.strstart-=_,e.block_start-=_,t=n=e.hash_size;do o=e.head[--t],e.head[t]=o>=_?o-_:0;while(--n);t=n=_;do o=e.prev[--t],e.prev[t]=o>=_?o-_:0;while(--n);s+=_}if(e.strm.avail_in===0)break;if(u=e.strm,d=e.window,p=e.strstart+e.lookahead,h=s,v=void 0,(v=u.avail_in)>h&&(v=h),n=v===0?0:(u.avail_in-=v,nd(d,u.input,u.next_in,v,p),u.state.wrap===1?u.adler=QM(u.adler,d,v,p):u.state.wrap===2&&(u.adler=Xo(u.adler,d,v,p)),u.next_in+=v,u.total_in+=v,v),e.lookahead+=n,e.lookahead+e.insert>=Ai)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+Ai-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<Ai)););}while(e.lookahead<Yl&&e.strm.avail_in!==0)}function HO(e,t){for(var n,o;;){if(e.lookahead<Yl){if(Ay(e),e.lookahead<Yl&&t===Ap)return Jo;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ai&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Yl&&(e.match_length=Hre(e,n)),e.match_length>=Ai)if(o=rh(e,e.strstart-e.match_start,e.match_length-Ai),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ai){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else o=rh(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(o&&(la(e,!1),e.strm.avail_out===0))return Jo}return e.insert=e.strstart<Ai-1?e.strstart:Ai-1,t===zf?(la(e,!0),e.strm.avail_out===0?up:wg):e.last_lit&&(la(e,!1),e.strm.avail_out===0)?Jo:ay}function qv(e,t){for(var n,o,s;;){if(e.lookahead<Yl){if(Ay(e),e.lookahead<Yl&&t===Ap)return Jo;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ai&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ai-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Yl&&(e.match_length=Hre(e,n),e.match_length<=5&&(e.strategy===XQe||e.match_length===Ai&&e.strstart-e.match_start>4096)&&(e.match_length=Ai-1)),e.prev_length>=Ai&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-Ai,o=rh(e,e.strstart-1-e.prev_match,e.prev_length-Ai),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=s&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=Ai-1,e.strstart++,o&&(la(e,!1),e.strm.avail_out===0))return Jo}else if(e.match_available){if((o=rh(e,0,e.window[e.strstart-1]))&&la(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Jo}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(o=rh(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ai-1?e.strstart:Ai-1,t===zf?(la(e,!0),e.strm.avail_out===0?up:wg):e.last_lit&&(la(e,!1),e.strm.avail_out===0)?Jo:ay}function Ac(e,t,n,o,s){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=o,this.func=s}function set(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=yV,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new il(2*ret),this.dyn_dtree=new il(2*(2*tet+1)),this.bl_tree=new il(2*(2*net+1)),tp(this.dyn_ltree),tp(this.dyn_dtree),tp(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new il(iet+1),this.heap=new il(2*eP+1),tp(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new il(2*eP+1),tp(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function gY(e){var t,n=function(o){var s;return o&&o.state?(o.total_in=o.total_out=0,o.data_type=QQe,(s=o.state).pending=0,s.pending_out=0,s.wrap<0&&(s.wrap=-s.wrap),s.status=s.wrap?bV:cp,o.adler=s.wrap===2?0:1,s.last_flush=Ap,zQe(s),ep):Jf(o,Dp)}(e);return n===ep&&((t=e.state).window_size=2*t.w_size,tp(t.head),t.max_lazy_match=og[t.level].max_lazy,t.good_match=og[t.level].good_length,t.nice_match=og[t.level].nice_length,t.max_chain_length=og[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Ai-1,t.match_available=0,t.ins_h=0),n}function cet(e,t){var n,o,s,l;if(!e||!e.state||t>pY||t<0)return e?Jf(e,Dp):Dp;if(o=e.state,!e.output||!e.input&&e.avail_in!==0||o.status===A4&&t!==zf)return Jf(e,e.avail_out===0?zO:Dp);if(o.strm=e,n=o.last_flush,o.last_flush=t,o.status===bV)if(o.wrap===2)e.adler=0,gi(o,31),gi(o,139),gi(o,8),o.gzhead?(gi(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),gi(o,255&o.gzhead.time),gi(o,o.gzhead.time>>8&255),gi(o,o.gzhead.time>>16&255),gi(o,o.gzhead.time>>24&255),gi(o,o.level===9?2:o.strategy>=nw||o.level<2?4:0),gi(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(gi(o,255&o.gzhead.extra.length),gi(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=Xo(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=tP):(gi(o,0),gi(o,0),gi(o,0),gi(o,0),gi(o,0),gi(o,o.level===9?2:o.strategy>=nw||o.level<2?4:0),gi(o,aet),o.status=cp);else{var u=yV+(o.w_bits-8<<4)<<8;u|=(o.strategy>=nw||o.level<2?0:o.level<6?1:o.level===6?2:3)<<6,o.strstart!==0&&(u|=oet),u+=31-u%31,o.status=cp,w4(o,u),o.strstart!==0&&(w4(o,e.adler>>>16),w4(o,65535&e.adler)),e.adler=1}if(o.status===tP)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),Vf(e),s=o.pending,o.pending!==o.pending_buf_size));)gi(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=_8)}else o.status=_8;if(o.status===_8)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),Vf(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,gi(o,l)}while(l!==0);o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),l===0&&(o.gzindex=0,o.status=y8)}else o.status=y8;if(o.status===y8)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),Vf(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,gi(o,l)}while(l!==0);o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),l===0&&(o.status=b8)}else o.status=b8;if(o.status===b8&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Vf(e),o.pending+2<=o.pending_buf_size&&(gi(o,255&e.adler),gi(o,e.adler>>8&255),e.adler=0,o.status=cp)):o.status=cp),o.pending!==0){if(Vf(e),e.avail_out===0)return o.last_flush=-1,ep}else if(e.avail_in===0&&vY(t)<=vY(n)&&t!==zf)return Jf(e,zO);if(o.status===A4&&e.avail_in!==0)return Jf(e,zO);if(e.avail_in!==0||o.lookahead!==0||t!==Ap&&o.status!==A4){var d=o.strategy===nw?function(p,h){for(var v;;){if(p.lookahead===0&&(Ay(p),p.lookahead===0)){if(h===Ap)return Jo;break}if(p.match_length=0,v=rh(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,v&&(la(p,!1),p.strm.avail_out===0))return Jo}return p.insert=0,h===zf?(la(p,!0),p.strm.avail_out===0?up:wg):p.last_lit&&(la(p,!1),p.strm.avail_out===0)?Jo:ay}(o,t):o.strategy===JQe?function(p,h){for(var v,_,y,b,w=p.window;;){if(p.lookahead<=Xf){if(Ay(p),p.lookahead<=Xf&&h===Ap)return Jo;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=Ai&&p.strstart>0&&(_=w[y=p.strstart-1])===w[++y]&&_===w[++y]&&_===w[++y]){b=p.strstart+Xf;do;while(_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&y<b);p.match_length=Xf-(b-y),p.match_length>p.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=Ai?(v=rh(p,1,p.match_length-Ai),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(v=rh(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),v&&(la(p,!1),p.strm.avail_out===0))return Jo}return p.insert=0,h===zf?(la(p,!0),p.strm.avail_out===0?up:wg):p.last_lit&&(la(p,!1),p.strm.avail_out===0)?Jo:ay}(o,t):og[o.level].func(o,t);if(d!==up&&d!==wg||(o.status=A4),d===Jo||d===up)return e.avail_out===0&&(o.last_flush=-1),ep;if(d===ay&&(t===GQe?HQe(o):t!==pY&&(zre(o,0,0,!1),t===qQe&&(tp(o.head),o.lookahead===0&&(o.strstart=0,o.block_start=0,o.insert=0))),Vf(e),e.avail_out===0))return o.last_flush=-1,ep}return t!==zf?ep:o.wrap<=0?mY:(o.wrap===2?(gi(o,255&e.adler),gi(o,e.adler>>8&255),gi(o,e.adler>>16&255),gi(o,e.adler>>24&255),gi(o,255&e.total_in),gi(o,e.total_in>>8&255),gi(o,e.total_in>>16&255),gi(o,e.total_in>>24&255)):(w4(o,e.adler>>>16),w4(o,65535&e.adler)),Vf(e),o.wrap>0&&(o.wrap=-o.wrap),o.pending!==0?ep:mY)}og=[new Ac(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ay(e),e.lookahead===0&&t===Ap)return Jo;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var o=e.block_start+n;if((e.strstart===0||e.strstart>=o)&&(e.lookahead=e.strstart-o,e.strstart=o,la(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Yl&&(la(e,!1),e.strm.avail_out===0))return Jo}return e.insert=0,t===zf?(la(e,!0),e.strm.avail_out===0?up:wg):(e.strstart>e.block_start&&(la(e,!1),e.strm.avail_out),Jo)}),new Ac(4,4,8,4,HO),new Ac(4,5,16,8,HO),new Ac(4,6,32,32,HO),new Ac(4,4,16,16,qv),new Ac(8,16,32,32,qv),new Ac(8,16,128,128,qv),new Ac(8,32,128,256,qv),new Ac(32,128,258,1024,qv),new Ac(32,258,258,4096,qv)];var rw=30,uet=12;function det(e,t){var n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D,k,O,L,P,V,$,Y,F;n=e.state,o=e.next_in,Y=e.input,s=o+(e.avail_in-5),l=e.next_out,F=e.output,u=l-(t-e.avail_out),d=l+(e.avail_out-257),p=n.dmax,h=n.wsize,v=n.whave,_=n.wnext,y=n.window,b=n.hold,w=n.bits,C=n.lencode,T=n.distcode,I=(1<<n.lenbits)-1,D=(1<<n.distbits)-1;e:do{w<15&&(b+=Y[o++]<<w,w+=8,b+=Y[o++]<<w,w+=8),k=C[b&I];t:for(;;){if(b>>>=O=k>>>24,w-=O,(O=k>>>16&255)===0)F[l++]=65535&k;else{if(!(16&O)){if(!(64&O)){k=C[(65535&k)+(b&(1<<O)-1)];continue t}if(32&O){n.mode=uet;break e}e.msg="invalid literal/length code",n.mode=rw;break e}L=65535&k,(O&=15)&&(w<O&&(b+=Y[o++]<<w,w+=8),L+=b&(1<<O)-1,b>>>=O,w-=O),w<15&&(b+=Y[o++]<<w,w+=8,b+=Y[o++]<<w,w+=8),k=T[b&D];n:for(;;){if(b>>>=O=k>>>24,w-=O,!(16&(O=k>>>16&255))){if(!(64&O)){k=T[(65535&k)+(b&(1<<O)-1)];continue n}e.msg="invalid distance code",n.mode=rw;break e}if(P=65535&k,w<(O&=15)&&(b+=Y[o++]<<w,(w+=8)<O&&(b+=Y[o++]<<w,w+=8)),(P+=b&(1<<O)-1)>p){e.msg="invalid distance too far back",n.mode=rw;break e}if(b>>>=O,w-=O,P>(O=l-u)){if((O=P-O)>v&&n.sane){e.msg="invalid distance too far back",n.mode=rw;break e}if(V=0,$=y,_===0){if(V+=h-O,O<L){L-=O;do F[l++]=y[V++];while(--O);V=l-P,$=F}}else if(_<O){if(V+=h+_-O,(O-=_)<L){L-=O;do F[l++]=y[V++];while(--O);if(V=0,_<L){L-=O=_;do F[l++]=y[V++];while(--O);V=l-P,$=F}}}else if(V+=_-O,O<L){L-=O;do F[l++]=y[V++];while(--O);V=l-P,$=F}for(;L>2;)F[l++]=$[V++],F[l++]=$[V++],F[l++]=$[V++],L-=3;L&&(F[l++]=$[V++],L>1&&(F[l++]=$[V++]))}else{V=l-P;do F[l++]=F[V++],F[l++]=F[V++],F[l++]=F[V++],L-=3;while(L>2);L&&(F[l++]=F[V++],L>1&&(F[l++]=F[V++]))}break}}break}}while(o<s&&l<d);o-=L=w>>3,b&=(1<<(w-=L<<3))-1,e.next_in=o,e.next_out=l,e.avail_in=o<s?s-o+5:5-(o-s),e.avail_out=l<d?d-l+257:257-(l-d),n.hold=b,n.bits=w}var Yv=15,_Y=852,yY=592,bY=0,WO=1,xY=2,fet=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],het=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],pet=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],met=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function sy(e,t,n,o,s,l,u,d){var p,h,v,_,y,b,w,C,T,I=d.bits,D=0,k=0,O=0,L=0,P=0,V=0,$=0,Y=0,F=0,U=0,Q=null,X=0,le=new il(Yv+1),ye=new il(Yv+1),ue=null,G=0;for(D=0;D<=Yv;D++)le[D]=0;for(k=0;k<o;k++)le[t[n+k]]++;for(P=I,L=Yv;L>=1&&le[L]===0;L--);if(P>L&&(P=L),L===0)return s[l++]=20971520,s[l++]=20971520,d.bits=1,0;for(O=1;O<L&&le[O]===0;O++);for(P<O&&(P=O),Y=1,D=1;D<=Yv;D++)if(Y<<=1,(Y-=le[D])<0)return-1;if(Y>0&&(e===bY||L!==1))return-1;for(ye[1]=0,D=1;D<Yv;D++)ye[D+1]=ye[D]+le[D];for(k=0;k<o;k++)t[n+k]!==0&&(u[ye[t[n+k]]++]=k);if(e===bY?(Q=ue=u,b=19):e===WO?(Q=fet,X-=257,ue=het,G-=257,b=256):(Q=pet,ue=met,b=-1),U=0,k=0,D=O,y=l,V=P,$=0,v=-1,_=(F=1<<P)-1,e===WO&&F>_Y||e===xY&&F>yY)return 1;for(;;){w=D-$,u[k]<b?(C=0,T=u[k]):u[k]>b?(C=ue[G+u[k]],T=Q[X+u[k]]):(C=96,T=0),p=1<<D-$,O=h=1<<V;do s[y+(U>>$)+(h-=p)]=w<<24|C<<16|T|0;while(h!==0);for(p=1<<D-1;U&p;)p>>=1;if(p!==0?(U&=p-1,U+=p):U=0,k++,--le[D]==0){if(D===L)break;D=t[n+u[k]]}if(D>P&&(U&_)!==v){for($===0&&($=P),y+=O,Y=1<<(V=D-$);V+$<L&&!((Y-=le[V+$])<=0);)V++,Y<<=1;if(F+=1<<V,e===WO&&F>_Y||e===xY&&F>yY)return 1;s[v=U&_]=P<<24|V<<16|y-l|0}}return U!==0&&(s[y+U]=D-$<<24|64<<16|0),d.bits=P,0}var vet=0,Wre=1,jre=2,EY=4,get=5,iw=6,iS=0,_et=1,yet=2,ih=-2,bet=-3,xet=-4,Eet=-5,wY=8,Gre=1,SY=2,CY=3,TY=4,IY=5,kY=6,AY=7,DY=8,NY=9,RY=10,OY=11,Ku=12,jO=13,MY=14,GO=15,PY=16,VY=17,LY=18,BY=19,ow=20,aw=21,FY=22,$Y=23,UY=24,zY=25,HY=26,qO=27,WY=28,jY=29,Xi=30,wet=31,Cet=32,Tet=852,Iet=592;function GY(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ket(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new il(320),this.work=new il(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qre(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(n){var o;return n&&n.state?(o=n.state,n.total_in=n.total_out=o.total=0,n.msg="",o.wrap&&(n.adler=1&o.wrap),o.mode=Gre,o.last=0,o.havedict=0,o.dmax=32768,o.head=null,o.hold=0,o.bits=0,o.lencode=o.lendyn=new nS(Tet),o.distcode=o.distdyn=new nS(Iet),o.sane=1,o.back=-1,iS):ih}(e)):ih}function Aet(e,t){var n,o;return e?(o=new ket,e.state=o,o.window=null,(n=function(s,l){var u,d;return s&&s.state?(d=s.state,l<0?(u=0,l=-l):(u=1+(l>>4),l<48&&(l&=15)),l&&(l<8||l>15)?ih:(d.window!==null&&d.wbits!==l&&(d.window=null),d.wrap=u,d.wbits=l,qre(s))):ih}(e,t))!==iS&&(e.state=null),n):ih}var YO,KO,qY=!0;function Det(e){if(qY){var t;for(YO=new nS(512),KO=new nS(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sy(Wre,e.lens,0,288,YO,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sy(jre,e.lens,0,32,KO,0,e.work,{bits:5}),qY=!1}e.lencode=YO,e.lenbits=9,e.distcode=KO,e.distbits=5}function Net(e,t){var n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D,k,O,L,P,V,$,Y,F=0,U=new tS(4),Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ih;(n=e.state).mode===Ku&&(n.mode=jO),u=e.next_out,s=e.output,p=e.avail_out,l=e.next_in,o=e.input,d=e.avail_in,h=n.hold,v=n.bits,_=d,y=p,V=iS;e:for(;;)switch(n.mode){case Gre:if(n.wrap===0){n.mode=jO;break}for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(2&n.wrap&&h===35615){n.check=0,U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0),h=0,v=0,n.mode=SY;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=Xi;break}if((15&h)!==wY){e.msg="unknown compression method",n.mode=Xi;break}if(v-=4,P=8+(15&(h>>>=4)),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=Xi;break}n.dmax=1<<P,e.adler=n.check=1,n.mode=512&h?RY:Ku,h=0,v=0;break;case SY:for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(n.flags=h,(255&n.flags)!==wY){e.msg="unknown compression method",n.mode=Xi;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Xi;break}n.head&&(n.head.text=h>>8&1),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0)),h=0,v=0,n.mode=CY;case CY:for(;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.head&&(n.head.time=h),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,U[2]=h>>>16&255,U[3]=h>>>24&255,n.check=Xo(n.check,U,4,0)),h=0,v=0,n.mode=TY;case TY:for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.head&&(n.head.xflags=255&h,n.head.os=h>>8),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0)),h=0,v=0,n.mode=IY;case IY:if(1024&n.flags){for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.length=h,n.head&&(n.head.extra_len=h),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0)),h=0,v=0}else n.head&&(n.head.extra=null);n.mode=kY;case kY:if(1024&n.flags&&((b=n.length)>d&&(b=d),b&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),nd(n.head.extra,o,l,b,P)),512&n.flags&&(n.check=Xo(n.check,o,b,l)),d-=b,l+=b,n.length-=b),n.length))break e;n.length=0,n.mode=AY;case AY:if(2048&n.flags){if(d===0)break e;b=0;do P=o[l+b++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&b<d);if(512&n.flags&&(n.check=Xo(n.check,o,b,l)),d-=b,l+=b,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=DY;case DY:if(4096&n.flags){if(d===0)break e;b=0;do P=o[l+b++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P));while(P&&b<d);if(512&n.flags&&(n.check=Xo(n.check,o,b,l)),d-=b,l+=b,P)break e}else n.head&&(n.head.comment=null);n.mode=NY;case NY:if(512&n.flags){for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(h!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Xi;break}h=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ku;break;case RY:for(;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}e.adler=n.check=GY(h),h=0,v=0,n.mode=OY;case OY:if(n.havedict===0)return e.next_out=u,e.avail_out=p,e.next_in=l,e.avail_in=d,n.hold=h,n.bits=v,yet;e.adler=n.check=1,n.mode=Ku;case Ku:if(t===get||t===iw)break e;case jO:if(n.last){h>>>=7&v,v-=7&v,n.mode=qO;break}for(;v<3;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}switch(n.last=1&h,v-=1,3&(h>>>=1)){case 0:n.mode=MY;break;case 1:if(Det(n),n.mode=ow,t===iw){h>>>=2,v-=2;break e}break;case 2:n.mode=VY;break;case 3:e.msg="invalid block type",n.mode=Xi}h>>>=2,v-=2;break;case MY:for(h>>>=7&v,v-=7&v;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Xi;break}if(n.length=65535&h,h=0,v=0,n.mode=GO,t===iw)break e;case GO:n.mode=PY;case PY:if(b=n.length){if(b>d&&(b=d),b>p&&(b=p),b===0)break e;nd(s,o,l,b,u),d-=b,l+=b,p-=b,u+=b,n.length-=b;break}n.mode=Ku;break;case VY:for(;v<14;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(n.nlen=257+(31&h),h>>>=5,v-=5,n.ndist=1+(31&h),h>>>=5,v-=5,n.ncode=4+(15&h),h>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Xi;break}n.have=0,n.mode=LY;case LY:for(;n.have<n.ncode;){for(;v<3;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.lens[Q[n.have++]]=7&h,h>>>=3,v-=3}for(;n.have<19;)n.lens[Q[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,$={bits:n.lenbits},V=sy(vet,n.lens,0,19,n.lencode,0,n.work,$),n.lenbits=$.bits,V){e.msg="invalid code lengths set",n.mode=Xi;break}n.have=0,n.mode=BY;case BY:for(;n.have<n.nlen+n.ndist;){for(;I=(F=n.lencode[h&(1<<n.lenbits)-1])>>>16&255,D=65535&F,!((T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(D<16)h>>>=T,v-=T,n.lens[n.have++]=D;else{if(D===16){for(Y=T+2;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(h>>>=T,v-=T,n.have===0){e.msg="invalid bit length repeat",n.mode=Xi;break}P=n.lens[n.have-1],b=3+(3&h),h>>>=2,v-=2}else if(D===17){for(Y=T+3;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}v-=T,P=0,b=3+(7&(h>>>=T)),h>>>=3,v-=3}else{for(Y=T+7;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}v-=T,P=0,b=11+(127&(h>>>=T)),h>>>=7,v-=7}if(n.have+b>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Xi;break}for(;b--;)n.lens[n.have++]=P}}if(n.mode===Xi)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Xi;break}if(n.lenbits=9,$={bits:n.lenbits},V=sy(Wre,n.lens,0,n.nlen,n.lencode,0,n.work,$),n.lenbits=$.bits,V){e.msg="invalid literal/lengths set",n.mode=Xi;break}if(n.distbits=6,n.distcode=n.distdyn,$={bits:n.distbits},V=sy(jre,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,$),n.distbits=$.bits,V){e.msg="invalid distances set",n.mode=Xi;break}if(n.mode=ow,t===iw)break e;case ow:n.mode=aw;case aw:if(d>=6&&p>=258){e.next_out=u,e.avail_out=p,e.next_in=l,e.avail_in=d,n.hold=h,n.bits=v,det(e,y),u=e.next_out,s=e.output,p=e.avail_out,l=e.next_in,o=e.input,d=e.avail_in,h=n.hold,v=n.bits,n.mode===Ku&&(n.back=-1);break}for(n.back=0;I=(F=n.lencode[h&(1<<n.lenbits)-1])>>>16&255,D=65535&F,!((T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(I&&!(240&I)){for(k=T,O=I,L=D;I=(F=n.lencode[L+((h&(1<<k+O)-1)>>k)])>>>16&255,D=65535&F,!(k+(T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}h>>>=k,v-=k,n.back+=k}if(h>>>=T,v-=T,n.back+=T,n.length=D,I===0){n.mode=HY;break}if(32&I){n.back=-1,n.mode=Ku;break}if(64&I){e.msg="invalid literal/length code",n.mode=Xi;break}n.extra=15&I,n.mode=FY;case FY:if(n.extra){for(Y=n.extra;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=$Y;case $Y:for(;I=(F=n.distcode[h&(1<<n.distbits)-1])>>>16&255,D=65535&F,!((T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(!(240&I)){for(k=T,O=I,L=D;I=(F=n.distcode[L+((h&(1<<k+O)-1)>>k)])>>>16&255,D=65535&F,!(k+(T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}h>>>=k,v-=k,n.back+=k}if(h>>>=T,v-=T,n.back+=T,64&I){e.msg="invalid distance code",n.mode=Xi;break}n.offset=D,n.extra=15&I,n.mode=UY;case UY:if(n.extra){for(Y=n.extra;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Xi;break}n.mode=zY;case zY:if(p===0)break e;if(b=y-p,n.offset>b){if((b=n.offset-b)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Xi;break}b>n.wnext?(b-=n.wnext,w=n.wsize-b):w=n.wnext-b,b>n.length&&(b=n.length),C=n.window}else C=s,w=u-n.offset,b=n.length;b>p&&(b=p),p-=b,n.length-=b;do s[u++]=C[w++];while(--b);n.length===0&&(n.mode=aw);break;case HY:if(p===0)break e;s[u++]=n.length,p--,n.mode=aw;break;case qO:if(n.wrap){for(;v<32;){if(d===0)break e;d--,h|=o[l++]<<v,v+=8}if(y-=p,e.total_out+=y,n.total+=y,y&&(e.adler=n.check=n.flags?Xo(n.check,s,y,u-y):QM(n.check,s,y,u-y)),y=p,(n.flags?h:GY(h))!==n.check){e.msg="incorrect data check",n.mode=Xi;break}h=0,v=0}n.mode=WY;case WY:if(n.wrap&&n.flags){for(;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(h!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Xi;break}h=0,v=0}n.mode=jY;case jY:V=_et;break e;case Xi:V=bet;break e;case wet:return xet;case Cet:default:return ih}return e.next_out=u,e.avail_out=p,e.next_in=l,e.avail_in=d,n.hold=h,n.bits=v,(n.wsize||y!==e.avail_out&&n.mode<Xi&&(n.mode<qO||t!==EY))&&function(X,le,ye,ue){var G,ee=X.state;ee.window===null&&(ee.wsize=1<<ee.wbits,ee.wnext=0,ee.whave=0,ee.window=new tS(ee.wsize)),ue>=ee.wsize?(nd(ee.window,le,ye-ee.wsize,ee.wsize,0),ee.wnext=0,ee.whave=ee.wsize):((G=ee.wsize-ee.wnext)>ue&&(G=ue),nd(ee.window,le,ye-ue,G,ee.wnext),(ue-=G)?(nd(ee.window,le,ye-ue,ue,0),ee.wnext=ue,ee.whave=ee.wsize):(ee.wnext+=G,ee.wnext===ee.wsize&&(ee.wnext=0),ee.whave<ee.wsize&&(ee.whave+=G)))}(e,e.output,e.next_out,y-e.avail_out),_-=e.avail_in,y-=e.avail_out,e.total_in+=_,e.total_out+=y,n.total+=y,n.wrap&&y&&(e.adler=n.check=n.flags?Xo(n.check,s,y,e.next_out-y):QM(n.check,s,y,e.next_out-y)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Ku?128:0)+(n.mode===ow||n.mode===GO?256:0),(_===0&&y===0||t===EY)&&V===iS&&(V=Eet),V}var sw,ag=1,ly=7;function Dc(e){if(e<ag||e>ly)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function Ret(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}Dc.prototype.init=function(e,t,n,o,s){var l;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=o,this.mode!==3&&this.mode!==4||(this.windowBits+=16),this.mode===ly&&(this.windowBits+=32),this.mode!==5&&this.mode!==6||(this.windowBits=-this.windowBits),this.strm=new PQe,this.mode){case ag:case 3:case 5:l=function(u,d,p,h,v,_){if(!u)return Dp;var y=1;if(d===KQe&&(d=6),h<0?(y=0,h=-h):h>15&&(y=2,h-=16),v<1||v>eet||p!==yV||h<8||h>15||d<0||d>9||_<0||_>ZQe)return Jf(u,Dp);h===8&&(h=9);var b=new set;return u.state=b,b.strm=u,b.wrap=y,b.gzhead=null,b.w_bits=h,b.w_size=1<<b.w_bits,b.w_mask=b.w_size-1,b.hash_bits=v+7,b.hash_size=1<<b.hash_bits,b.hash_mask=b.hash_size-1,b.hash_shift=~~((b.hash_bits+Ai-1)/Ai),b.window=new tS(2*b.w_size),b.head=new il(b.hash_size),b.prev=new il(b.w_size),b.lit_bufsize=1<<v+6,b.pending_buf_size=4*b.lit_bufsize,b.pending_buf=new tS(b.pending_buf_size),b.d_buf=1*b.lit_bufsize,b.l_buf=3*b.lit_bufsize,b.level=d,b.strategy=_,b.method=p,gY(u)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case ly:l=Aet(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}l===0?(this.write_in_progress=!1,this.init_done=!0):this._error(l)},Dc.prototype.params=function(){throw new Error("deflateParams Not supported")},Dc.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===0)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Dc.prototype.write=function(e,t,n,o,s,l,u){this._writeCheck(),this.write_in_progress=!0;var d=this;return sa(function(){d.write_in_progress=!1;var p=d._write(e,t,n,o,s,l,u);d.callback(p[0],p[1]),d.pending_close&&d.close()}),this},Dc.prototype.writeSync=function(e,t,n,o,s,l,u){return this._writeCheck(),this._write(e,t,n,o,s,l,u)},Dc.prototype._write=function(e,t,n,o,s,l,u){if(this.write_in_progress=!0,e!==0&&e!==1&&e!==2&&e!==3&&e!==4&&e!==5)throw new Error("Invalid flush value");t==null&&(t=new Lt(0),o=0,n=0),s._set?s.set=s._set:s.set=Ret;var d,p=this.strm;switch(p.avail_in=o,p.input=t,p.next_in=n,p.avail_out=u,p.output=s,p.next_out=l,this.mode){case ag:case 3:case 5:d=cet(p,e);break;case ly:case 2:case 4:case 6:d=Net(p,e);break;default:throw new Error("Unknown mode "+this.mode)}return d!==1&&d!==0&&this._error(d),this.write_in_progress=!1,[p.avail_in,p.avail_out]},Dc.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===ag||this.mode===3||this.mode===5?function(e){var t;e&&e.state&&((t=e.state.status)!==bV&&t!==tP&&t!==_8&&t!==y8&&t!==b8&&t!==cp&&t!==A4?Jf(e,Dp):(e.state=null,t===cp&&Jf(e,YQe)))}(this.strm):function(e){if(!e||!e.state)return ih;var t=e.state;t.window&&(t.window=null),e.state=null}(this.strm),this.mode=0)},Dc.prototype.reset=function(){switch(this.mode){case ag:case 5:sw=gY(this.strm);break;case 2:case 6:sw=qre(this.strm)}sw!==0&&this._error(sw)},Dc.prototype._error=function(e){this.onerror(Rre[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var YY=Object.freeze({NONE:0,DEFLATE:ag,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:ly,Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8,Zlib:Dc}),$n={};Object.keys(YY).forEach(function(e){$n[e]=YY[e]}),$n.Z_MIN_WINDOWBITS=8,$n.Z_MAX_WINDOWBITS=15,$n.Z_DEFAULT_WINDOWBITS=15,$n.Z_MIN_CHUNK=64,$n.Z_MAX_CHUNK=1/0,$n.Z_DEFAULT_CHUNK=16384,$n.Z_MIN_MEMLEVEL=1,$n.Z_MAX_MEMLEVEL=9,$n.Z_DEFAULT_MEMLEVEL=8,$n.Z_MIN_LEVEL=-1,$n.Z_MAX_LEVEL=9,$n.Z_DEFAULT_LEVEL=$n.Z_DEFAULT_COMPRESSION;var x8={Z_OK:$n.Z_OK,Z_STREAM_END:$n.Z_STREAM_END,Z_NEED_DICT:$n.Z_NEED_DICT,Z_ERRNO:$n.Z_ERRNO,Z_STREAM_ERROR:$n.Z_STREAM_ERROR,Z_DATA_ERROR:$n.Z_DATA_ERROR,Z_MEM_ERROR:$n.Z_MEM_ERROR,Z_BUF_ERROR:$n.Z_BUF_ERROR,Z_VERSION_ERROR:$n.Z_VERSION_ERROR};function K0(e,t,n){var o=[],s=0;function l(){for(var d;(d=e.read())!==null;)o.push(d),s+=d.length;e.once("readable",l)}function u(){var d=Lt.concat(o,s);o=[],n(null,d),e.close()}e.on("error",function(d){e.removeListener("end",u),e.removeListener("readable",l),n(d)}),e.on("end",u),e.end(t),l()}function X0(e,t){if(typeof t=="string"&&(t=new Lt(t)),!o3(t))throw new TypeError("Not a string or buffer");var n=$n.Z_FINISH;return e._processChunk(t,n)}function dp(e){if(!(this instanceof dp))return new dp(e);lo.call(this,e,$n.DEFLATE)}function fp(e){if(!(this instanceof fp))return new fp(e);lo.call(this,e,$n.INFLATE)}function hp(e){if(!(this instanceof hp))return new hp(e);lo.call(this,e,$n.GZIP)}function pp(e){if(!(this instanceof pp))return new pp(e);lo.call(this,e,$n.GUNZIP)}function mp(e){if(!(this instanceof mp))return new mp(e);lo.call(this,e,$n.DEFLATERAW)}function vp(e){if(!(this instanceof vp))return new vp(e);lo.call(this,e,$n.INFLATERAW)}function gp(e){if(!(this instanceof gp))return new gp(e);lo.call(this,e,$n.UNZIP)}function lo(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||$n.Z_DEFAULT_CHUNK,nl.call(this,e),e.flush&&e.flush!==$n.Z_NO_FLUSH&&e.flush!==$n.Z_PARTIAL_FLUSH&&e.flush!==$n.Z_SYNC_FLUSH&&e.flush!==$n.Z_FULL_FLUSH&&e.flush!==$n.Z_FINISH&&e.flush!==$n.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||$n.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<$n.Z_MIN_CHUNK||e.chunkSize>$n.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<$n.Z_MIN_WINDOWBITS||e.windowBits>$n.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<$n.Z_MIN_LEVEL||e.level>$n.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<$n.Z_MIN_MEMLEVEL||e.memLevel>$n.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=$n.Z_FILTERED&&e.strategy!=$n.Z_HUFFMAN_ONLY&&e.strategy!=$n.Z_RLE&&e.strategy!=$n.Z_FIXED&&e.strategy!=$n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!o3(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new $n.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(l,u){n._binding=null,n._hadError=!0;var d=new Error(l);d.errno=u,d.code=$n.codes[u],n.emit("error",d)};var o=$n.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(o=e.level);var s=$n.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(s=e.strategy),this._binding.init(e.windowBits||$n.Z_DEFAULT_WINDOWBITS,o,e.memLevel||$n.Z_DEFAULT_MEMLEVEL,s,e.dictionary),this._buffer=new Lt(this._chunkSize),this._offset=0,this._closed=!1,this._level=o,this._strategy=s,this.once("end",this.close)}Object.keys(x8).forEach(function(e){x8[x8[e]]=e}),as(lo,nl),lo.prototype.params=function(e,t,n){if(e<$n.Z_MIN_LEVEL||e>$n.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=$n.Z_FILTERED&&t!=$n.Z_HUFFMAN_ONLY&&t!=$n.Z_RLE&&t!=$n.Z_FIXED&&t!=$n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var o=this;this.flush($n.Z_SYNC_FLUSH,function(){o._binding.params(e,t),o._hadError||(o._level=e,o._strategy=t,n&&n())})}else sa(n)},lo.prototype.reset=function(){return this._binding.reset()},lo.prototype._flush=function(e){this._transform(new Lt(0),"",e)},lo.prototype.flush=function(e,t){var n=this._writableState;if((typeof e=="function"||e===void 0&&!t)&&(t=e,e=$n.Z_FULL_FLUSH),n.ended)t&&sa(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var o=this;this.once("drain",function(){o.flush(t)})}else this._flushFlag=e,this.write(new Lt(0),"",t)},lo.prototype.close=function(e){if(e&&sa(e),!this._closed){this._closed=!0,this._binding.close();var t=this;sa(function(){t.emit("close")})}},lo.prototype._transform=function(e,t,n){var o,s=this._writableState,l=(s.ending||s.ended)&&(!e||s.length===e.length);if(!e===null&&!o3(e))return n(new Error("invalid input"));l?o=$n.Z_FINISH:(o=this._flushFlag,e.length>=s.length&&(this._flushFlag=this._opts.flush||$n.Z_NO_FLUSH)),this._processChunk(e,o,n)},lo.prototype._processChunk=function(e,t,n){var o=e&&e.length,s=this._chunkSize-this._offset,l=0,u=this,d=typeof n=="function";if(!d){var p,h=[],v=0;this.on("error",function(C){p=C});do var _=this._binding.writeSync(t,e,l,o,this._buffer,this._offset,s);while(!this._hadError&&w(_[0],_[1]));if(this._hadError)throw p;var y=Lt.concat(h,v);return this.close(),y}var b=this._binding.write(t,e,l,o,this._buffer,this._offset,s);function w(C,T){if(!u._hadError){var I=s-T;if(function(O,L){if(!O)throw new Error(L)}(I>=0,"have should not go down"),I>0){var D=u._buffer.slice(u._offset,u._offset+I);u._offset+=I,d?u.push(D):(h.push(D),v+=D.length)}if((T===0||u._offset>=u._chunkSize)&&(s=u._chunkSize,u._offset=0,u._buffer=new Lt(u._chunkSize)),T===0){if(l+=o-C,o=C,!d)return!0;var k=u._binding.write(t,e,l,o,u._buffer,u._offset,u._chunkSize);return k.callback=w,void(k.buffer=e)}if(!d)return!1;n()}}b.buffer=e,b.callback=w},as(dp,lo),as(fp,lo),as(hp,lo),as(pp,lo),as(mp,lo),as(vp,lo),as(gp,lo);var KY={codes:x8,createDeflate:function(e){return new dp(e)},createInflate:function(e){return new fp(e)},createDeflateRaw:function(e){return new mp(e)},createInflateRaw:function(e){return new vp(e)},createGzip:function(e){return new hp(e)},createGunzip:function(e){return new pp(e)},createUnzip:function(e){return new gp(e)},deflate:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new dp(t),e,n)},deflateSync:function(e,t){return X0(new dp(t),e)},gzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new hp(t),e,n)},gzipSync:function(e,t){return X0(new hp(t),e)},deflateRaw:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new mp(t),e,n)},deflateRawSync:function(e,t){return X0(new mp(t),e)},unzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new gp(t),e,n)},unzipSync:function(e,t){return X0(new gp(t),e)},inflate:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new fp(t),e,n)},inflateSync:function(e,t){return X0(new fp(t),e)},gunzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new pp(t),e,n)},gunzipSync:function(e,t){return X0(new pp(t),e)},inflateRaw:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new vp(t),e,n)},inflateRawSync:function(e,t){return X0(new vp(t),e)},Deflate:dp,Inflate:fp,Gzip:hp,Gunzip:pp,DeflateRaw:mp,InflateRaw:vp,Unzip:gp,Zlib:lo};class Oet{constructor(t,n,o){this.SDKAPPID=t,this.EXPIRETIME=o,this.PRIVATEKEY=n}genTestUserSig(t){return console.log("e",t),this._isNumber(this.SDKAPPID)?this._isString(this.PRIVATEKEY)?this._isString(t)?this._isNumber(this.EXPIRETIME)?(console.log("sdkAppID="+this.SDKAPPID+" key="+this.PRIVATEKEY+" userID="+t+" expire="+this.EXPIRETIME),this.genSigWithUserbuf(t,this.EXPIRETIME,null)):(console.error("expireTime must be a number"),""):(console.error("userID must be a string"),""):(console.error("privateKey must be a string"),""):(console.error("sdkAppID must be a number"),"")}newBuffer(t,n){return Lt.from?Lt.from(t,n):new Lt(t,n)}unescape(t){return t.replace(/_/g,"=").replace(/\-/g,"/").replace(/\*/g,"+")}escape(t){return t.replace(/\+/g,"*").replace(/\//g,"-").replace(/=/g,"_")}encode(t){return this.escape(this.newBuffer(t).toString("base64"))}decode(t){return this.newBuffer(this.unescape(t),"base64")}base64encode(t){return this.newBuffer(t).toString("base64")}base64decode(t){return this.newBuffer(t,"base64").toString()}_hmacsha256(t,n,o,s){let l="TLS.identifier:"+t+`
268
+ `)):d=e.stylize("[Circular]","special")),Kf(u)){if(l&&s.match(/^\d+$/))return d;(u=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+d}function Cre(e){return typeof e=="boolean"}function fV(e){return e===null}function KM(e){return typeof e=="string"}function Kf(e){return e===void 0}function NO(e){return s3(e)&&hV(e)==="[object RegExp]"}function s3(e){return typeof e=="object"&&e!==null}function jq(e){return s3(e)&&hV(e)==="[object Date]"}function RO(e){return s3(e)&&(hV(e)==="[object Error]"||e instanceof Error)}function OO(e){return typeof e=="function"}function hV(e){return Object.prototype.toString.call(e)}function Tre(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function J0(){this.head=null,this.tail=null,this.length=0}nh.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},nh.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},J0.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},J0.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},J0.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},J0.prototype.clear=function(){this.head=this.tail=null,this.length=0},J0.prototype.join=function(e){if(this.length===0)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},J0.prototype.concat=function(e){if(this.length===0)return Lt.alloc(0);if(this.length===1)return this.head.data;for(var t=Lt.allocUnsafe(e>>>0),n=this.head,o=0;n;)n.data.copy(t,o),o+=n.data.length,n=n.next;return t};var wQe=Lt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ry(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!wQe(t))throw new Error("Unknown encoding: "+t)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=CQe;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=TQe;break;default:return void(this.write=SQe)}this.charBuffer=new Lt(6),this.charReceived=0,this.charLength=0}function SQe(e){return e.toString(this.encoding)}function CQe(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function TQe(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}ry.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((s=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&s<=56319)){if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var o=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,o),o-=this.charReceived);var s;if(o=(t+=e.toString(this.encoding,0,o)).length-1,(s=t.charCodeAt(o))>=55296&&s<=56319){var l=this.surrogateSize;return this.charLength+=l,this.charReceived+=l,this.charBuffer.copy(this.charBuffer,l,0,l),e.copy(this.charBuffer,0,0,l),t.substring(0,o)}return t},ry.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(t==1&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},ry.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,o=this.charBuffer,s=this.encoding;t+=o.slice(0,n).toString(s)}return t},fo.ReadableState=Ire;var Ni=function(e){return Kf(kO)&&(kO=""),e=e.toUpperCase(),tw[e]||(new RegExp("\\b"+e+"\\b","i").test(kO)?tw[e]=function(){var t=bQe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}:tw[e]=function(){}),tw[e]}("stream");function Ire(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof ll&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:o,this.highWaterMark=~~this.highWaterMark,this.buffer=new J0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new ry(e.encoding),this.encoding=e.encoding)}function fo(e){if(!(this instanceof fo))return new fo(e);this._readableState=new Ire(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),ci.call(this)}function Gq(e,t,n,o,s){var l=function(h,v){var _=null;return o3(v)||typeof v=="string"||v==null||h.objectMode||(_=new TypeError("Invalid non-string/buffer chunk")),_}(t,n);if(l)e.emit("error",l);else if(n===null)t.reading=!1,function(h,v){if(!v.ended){if(v.decoder){var _=v.decoder.end();_&&_.length&&(v.buffer.push(_),v.length+=v.objectMode?1:_.length)}v.ended=!0,eS(h)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!s){var u=new Error("stream.push() after EOF");e.emit("error",u)}else if(t.endEmitted&&s){var d=new Error("stream.unshift() after end event");e.emit("error",d)}else{var p;!t.decoder||s||o||(n=t.decoder.write(n),p=!t.objectMode&&n.length===0),s||(t.reading=!1),p||(t.flowing&&t.length===0&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,s?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&eS(e))),function(h,v){v.readingMore||(v.readingMore=!0,sa(IQe,h,v))}(e,t)}else s||(t.reading=!1);return function(h){return!h.ended&&(h.needReadable||h.length<h.highWaterMark||h.length===0)}(t)}as(fo,ci),fo.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||typeof e!="string"||(t=t||n.defaultEncoding)!==n.encoding&&(e=Lt.from(e,t),t=""),Gq(this,n,e,t,!1)},fo.prototype.unshift=function(e){return Gq(this,this._readableState,e,"",!0)},fo.prototype.isPaused=function(){return this._readableState.flowing===!1},fo.prototype.setEncoding=function(e){return this._readableState.decoder=new ry(e),this._readableState.encoding=e,this};var qq=8388608;function Yq(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(n){return n>=qq?n=qq:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function eS(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Ni("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?sa(Kq,e):Kq(e))}function Kq(e){Ni("emit readable"),e.emit("readable"),pV(e)}function IQe(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Ni("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function kQe(e){Ni("readable nexttick read 0"),e.read(0)}function AQe(e,t){t.reading||(Ni("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),pV(e),t.flowing&&!t.reading&&e.read(0)}function pV(e){var t=e._readableState;for(Ni("flow",t.flowing);t.flowing&&e.read()!==null;);}function Xq(e,t){return t.length===0?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(o,s,l){var u;return o<s.head.data.length?(u=s.head.data.slice(0,o),s.head.data=s.head.data.slice(o)):u=o===s.head.data.length?s.shift():l?function(d,p){var h=p.head,v=1,_=h.data;for(d-=_.length;h=h.next;){var y=h.data,b=d>y.length?y.length:d;if(b===y.length?_+=y:_+=y.slice(0,d),(d-=b)===0){b===y.length?(++v,h.next?p.head=h.next:p.head=p.tail=null):(p.head=h,h.data=y.slice(b));break}++v}return p.length-=v,_}(o,s):function(d,p){var h=Lt.allocUnsafe(d),v=p.head,_=1;for(v.data.copy(h),d-=v.data.length;v=v.next;){var y=v.data,b=d>y.length?y.length:d;if(y.copy(h,h.length-d,0,b),(d-=b)===0){b===y.length?(++_,v.next?p.head=v.next:p.head=p.tail=null):(p.head=v,v.data=y.slice(b));break}++_}return p.length-=_,h}(o,s),u}(e,t.buffer,t.decoder),n);var n}function MO(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,sa(DQe,t,e))}function DQe(e,t){e.endEmitted||e.length!==0||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Jq(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}function NQe(){}function RQe(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function XM(e,t){Object.defineProperty(this,"buffer",{get:Sre(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof ll&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:o,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(l){(function(u,d){var p=u._writableState,h=p.sync,v=p.writecb;if(function(y){y.writing=!1,y.writecb=null,y.length-=y.writelen,y.writelen=0}(p),d)(function(y,b,w,C,T){--b.pendingcb,w?sa(T,C):T(C),y._writableState.errorEmitted=!0,y.emit("error",C)})(u,p,h,d,v);else{var _=Are(p);_||p.corked||p.bufferProcessing||!p.bufferedRequest||kre(u,p),h?sa(Zq,u,p,_,v):Zq(u,p,_,v)}})(t,l)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Nre(this)}function wa(e){if(!(this instanceof wa||this instanceof ll))return new wa(e);this._writableState=new XM(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev)),ci.call(this)}function JM(e,t,n,o,s,l,u){t.writelen=o,t.writecb=u,t.writing=!0,t.sync=!0,n?e._writev(s,t.onwrite):e._write(s,l,t.onwrite),t.sync=!1}function Zq(e,t,n,o){n||function(s,l){l.length===0&&l.needDrain&&(l.needDrain=!1,s.emit("drain"))}(e,t),t.pendingcb--,o(),Dre(e,t)}function kre(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var o=t.bufferedRequestCount,s=new Array(o),l=t.corkedRequestsFree;l.entry=n;for(var u=0;n;)s[u]=n,n=n.next,u+=1;JM(e,t,!0,t.length,s,"",l.finish),t.pendingcb++,t.lastBufferedRequest=null,l.next?(t.corkedRequestsFree=l.next,l.next=null):t.corkedRequestsFree=new Nre(t)}else{for(;n;){var d=n.chunk,p=n.encoding,h=n.callback;if(JM(e,t,!1,t.objectMode?1:d.length,d,p,h),n=n.next,t.writing)break}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Are(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Qq(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Dre(e,t){var n=Are(t);return n&&(t.pendingcb===0?(Qq(e,t),t.finished=!0,e.emit("finish")):Qq(e,t)),n}function Nre(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var o=t.entry;for(t.entry=null;o;){var s=o.callback;e.pendingcb--,s(n),o=o.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}fo.prototype.read=function(e){Ni("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Ni("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?MO(this):eS(this),null;if((e=Yq(e,t))===0&&t.ended)return t.length===0&&MO(this),null;var o,s=t.needReadable;return Ni("need readable",s),(t.length===0||t.length-e<t.highWaterMark)&&Ni("length less than watermark",s=!0),t.ended||t.reading?Ni("reading or ended",s=!1):s&&(Ni("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Yq(n,t))),(o=e>0?Xq(e,t):null)===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&MO(this)),o!==null&&this.emit("data",o),o},fo.prototype._read=function(e){this.emit("error",new Error("not implemented"))},fo.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,Ni("pipe count=%d opts=%j",o.pipesCount,t);var s=!t||t.end!==!1?u:h;function l(T){Ni("onunpipe"),T===n&&h()}function u(){Ni("onend"),e.end()}o.endEmitted?sa(s):n.once("end",s),e.on("unpipe",l);var d=function(T){return function(){var I=T._readableState;Ni("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&T.listeners("data").length&&(I.flowing=!0,pV(T))}}(n);e.on("drain",d);var p=!1;function h(){Ni("cleanup"),e.removeListener("close",b),e.removeListener("finish",w),e.removeListener("drain",d),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",u),n.removeListener("end",h),n.removeListener("data",_),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||d()}var v=!1;function _(T){Ni("ondata"),v=!1,e.write(T)!==!1||v||((o.pipesCount===1&&o.pipes===e||o.pipesCount>1&&Jq(o.pipes,e)!==-1)&&!p&&(Ni("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,v=!0),n.pause())}function y(T){var I;Ni("onerror",T),C(),e.removeListener("error",y),I="error",e.listeners(I).length===0&&e.emit("error",T)}function b(){e.removeListener("finish",w),C()}function w(){Ni("onfinish"),e.removeListener("close",b),C()}function C(){Ni("unpipe"),n.unpipe(e)}return n.on("data",_),function(T,I,D){if(typeof T.prependListener=="function")return T.prependListener(I,D);T._events&&T._events[I]?Array.isArray(T._events[I])?T._events[I].unshift(D):T._events[I]=[D,T._events[I]]:T.on(I,D)}(e,"error",y),e.once("close",b),e.once("finish",w),e.emit("pipe",n),o.flowing||(Ni("pipe resume"),n.resume()),e},fo.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<o;s++)n[s].emit("unpipe",this);return this}var l=Jq(t.pipes,e);return l===-1?this:(t.pipes.splice(l,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},fo.prototype.on=function(e,t){var n=ci.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var o=this._readableState;o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.emittedReadable=!1,o.reading?o.length&&eS(this):sa(kQe,this))}return n},fo.prototype.addListener=fo.prototype.on,fo.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ni("resume"),e.flowing=!0,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,sa(AQe,t,n))}(this,e)),this},fo.prototype.pause=function(){return Ni("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ni("pause"),this._readableState.flowing=!1,this.emit("pause")),this},fo.prototype.wrap=function(e){var t=this._readableState,n=!1,o=this;for(var s in e.on("end",function(){if(Ni("wrapped end"),t.decoder&&!t.ended){var l=t.decoder.end();l&&l.length&&o.push(l)}o.push(null)}),e.on("data",function(l){Ni("wrapped data"),t.decoder&&(l=t.decoder.write(l)),t.objectMode&&l==null||(t.objectMode||l&&l.length)&&(o.push(l)||(n=!0,e.pause()))}),e)this[s]===void 0&&typeof e[s]=="function"&&(this[s]=function(l){return function(){return e[l].apply(e,arguments)}}(s));return function(l,u){for(var d=0,p=l.length;d<p;d++)u(l[d],d)}(["error","close","destroy","pause","resume"],function(l){e.on(l,o.emit.bind(o,l))}),o._read=function(l){Ni("wrapped _read",l),n&&(n=!1,e.resume())},o},fo._fromList=Xq,wa.WritableState=XM,as(wa,ci),XM.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},wa.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},wa.prototype.write=function(e,t,n){var o=this._writableState,s=!1;return typeof t=="function"&&(n=t,t=null),Lt.isBuffer(e)?t="buffer":t||(t=o.defaultEncoding),typeof n!="function"&&(n=NQe),o.ended?function(l,u){var d=new Error("write after end");l.emit("error",d),sa(u,d)}(this,n):function(l,u,d,p){var h=!0,v=!1;return d===null?v=new TypeError("May not write null values to stream"):Lt.isBuffer(d)||typeof d=="string"||d===void 0||u.objectMode||(v=new TypeError("Invalid non-string/buffer chunk")),v&&(l.emit("error",v),sa(p,v),h=!1),h}(this,o,e,n)&&(o.pendingcb++,s=function(l,u,d,p,h){d=function(b,w,C){return b.objectMode||b.decodeStrings===!1||typeof w!="string"||(w=Lt.from(w,C)),w}(u,d,p),Lt.isBuffer(d)&&(p="buffer");var v=u.objectMode?1:d.length;u.length+=v;var _=u.length<u.highWaterMark;if(_||(u.needDrain=!0),u.writing||u.corked){var y=u.lastBufferedRequest;u.lastBufferedRequest=new RQe(d,p,h),y?y.next=u.lastBufferedRequest:u.bufferedRequest=u.lastBufferedRequest,u.bufferedRequestCount+=1}else JM(l,u,!1,v,d,p,h);return _}(this,o,e,t,n)),s},wa.prototype.cork=function(){this._writableState.corked++},wa.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||kre(this,e))},wa.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},wa.prototype._write=function(e,t,n){n(new Error("not implemented"))},wa.prototype._writev=null,wa.prototype.end=function(e,t,n){var o=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),e!=null&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(s,l,u){l.ending=!0,Dre(s,l),u&&(l.finished?sa(u):s.once("finish",u)),l.ended=!0,s.writable=!1}(this,o,n)},as(ll,fo);for(var eY=Object.keys(wa.prototype),PO=0;PO<eY.length;PO++){var VO=eY[PO];ll.prototype[VO]||(ll.prototype[VO]=wa.prototype[VO])}function ll(e){if(!(this instanceof ll))return new ll(e);fo.call(this,e),wa.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",OQe)}function OQe(){this.allowHalfOpen||this._writableState.ended||sa(MQe,this)}function MQe(e){e.end()}function PQe(e){this.afterTransform=function(t,n){return function(o,s,l){var u=o._transformState;u.transforming=!1;var d=u.writecb;if(!d)return o.emit("error",new Error("no writecb in Transform class"));u.writechunk=null,u.writecb=null,l!=null&&o.push(l),d(s);var p=o._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&o._read(p.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function nl(e){if(!(this instanceof nl))return new nl(e);ll.call(this,e),this._transformState=new PQe(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(n){tY(t,n)}):tY(t)})}function tY(e,t){if(t)return e.emit("error",t);var n=e._writableState,o=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(o.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function iy(e){if(!(this instanceof iy))return new iy(e);nl.call(this,e)}function Yu(){ci.call(this)}as(nl,ll),nl.prototype.push=function(e,t){return this._transformState.needTransform=!1,ll.prototype.push.call(this,e,t)},nl.prototype._transform=function(e,t,n){throw new Error("Not implemented")},nl.prototype._write=function(e,t,n){var o=this._transformState;if(o.writecb=n,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},nl.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},as(iy,nl),iy.prototype._transform=function(e,t,n){n(null,e)},as(Yu,ci),Yu.Readable=fo,Yu.Writable=wa,Yu.Duplex=ll,Yu.Transform=nl,Yu.PassThrough=iy,Yu.Stream=Yu,Yu.prototype.pipe=function(e,t){var n=this;function o(v){e.writable&&e.write(v)===!1&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",s),e._isStdio||t&&t.end===!1||(n.on("end",u),n.on("close",d));var l=!1;function u(){l||(l=!0,e.end())}function d(){l||(l=!0,typeof e.destroy=="function"&&e.destroy())}function p(v){if(h(),ci.listenerCount(this,"error")===0)throw v}function h(){n.removeListener("data",o),e.removeListener("drain",s),n.removeListener("end",u),n.removeListener("close",d),n.removeListener("error",p),e.removeListener("error",p),n.removeListener("end",h),n.removeListener("close",h),e.removeListener("close",h)}return n.on("error",p),e.on("error",p),n.on("end",h),n.on("close",h),e.on("close",h),e.emit("pipe",n),e};var Rre={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function VQe(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function nd(e,t,n,o,s){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+o),s);else for(var l=0;l<o;l++)e[s+l]=t[n+l]}var tS=Uint8Array,il=Uint16Array,nS=Int32Array,LQe=4,nY=0,rY=1,BQe=2;function f2(e){for(var t=e.length;--t>=0;)e[t]=0}var FQe=0,Ore=1,$Qe=2,mV=29,l3=256,Cy=l3+1+mV,Eg=30,vV=19,iY=2*Cy+1,lp=15,LO=16,UQe=7,gV=256,Mre=16,Pre=17,Vre=18,ZM=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],g8=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],zQe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],oY=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],td=new Array(2*(Cy+2));f2(td);var oy=new Array(2*Eg);f2(oy);var Ty=new Array(512);f2(Ty);var Iy=new Array(256);f2(Iy);var _V=new Array(mV);f2(_V);var aY,sY,lY,rS=new Array(Eg);function BO(e,t,n,o,s){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=o,this.max_length=s,this.has_stree=e&&e.length}function FO(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Lre(e){return e<256?Ty[e]:Ty[256+(e>>>7)]}function ky(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ls(e,t,n){e.bi_valid>LO-n?(e.bi_buf|=t<<e.bi_valid&65535,ky(e,e.bi_buf),e.bi_buf=t>>LO-e.bi_valid,e.bi_valid+=n-LO):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Fc(e,t,n){ls(e,n[2*t],n[2*t+1])}function Bre(e,t){var n=0;do n|=1&e,e>>>=1,n<<=1;while(--t>0);return n>>>1}function Fre(e,t,n){var o,s,l=new Array(lp+1),u=0;for(o=1;o<=lp;o++)l[o]=u=u+n[o-1]<<1;for(s=0;s<=t;s++){var d=e[2*s+1];d!==0&&(e[2*s]=Bre(l[d]++,d))}}function $re(e){var t;for(t=0;t<Cy;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Eg;t++)e.dyn_dtree[2*t]=0;for(t=0;t<vV;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*gV]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ure(e){e.bi_valid>8?ky(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function cY(e,t,n,o){var s=2*t,l=2*n;return e[s]<e[l]||e[s]===e[l]&&o[t]<=o[n]}function $O(e,t,n){for(var o=e.heap[n],s=n<<1;s<=e.heap_len&&(s<e.heap_len&&cY(t,e.heap[s+1],e.heap[s],e.depth)&&s++,!cY(t,o,e.heap[s],e.depth));)e.heap[n]=e.heap[s],n=s,s<<=1;e.heap[n]=o}function uY(e,t,n){var o,s,l,u,d=0;if(e.last_lit!==0)do o=e.pending_buf[e.d_buf+2*d]<<8|e.pending_buf[e.d_buf+2*d+1],s=e.pending_buf[e.l_buf+d],d++,o===0?Fc(e,s,t):(Fc(e,(l=Iy[s])+l3+1,t),(u=ZM[l])!==0&&ls(e,s-=_V[l],u),Fc(e,l=Lre(--o),n),(u=g8[l])!==0&&ls(e,o-=rS[l],u));while(d<e.last_lit);Fc(e,gV,t)}function UO(e,t){var n,o,s,l=t.dyn_tree,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=iY,n=0;n<p;n++)l[2*n]!==0?(e.heap[++e.heap_len]=h=n,e.depth[n]=0):l[2*n+1]=0;for(;e.heap_len<2;)l[2*(s=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[s]=0,e.opt_len--,d&&(e.static_len-=u[2*s+1]);for(t.max_code=h,n=e.heap_len>>1;n>=1;n--)$O(e,l,n);s=p;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$O(e,l,1),o=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=o,l[2*s]=l[2*n]+l[2*o],e.depth[s]=(e.depth[n]>=e.depth[o]?e.depth[n]:e.depth[o])+1,l[2*n+1]=l[2*o+1]=s,e.heap[1]=s++,$O(e,l,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(v,_){var y,b,w,C,T,I,D=_.dyn_tree,k=_.max_code,O=_.stat_desc.static_tree,L=_.stat_desc.has_stree,P=_.stat_desc.extra_bits,V=_.stat_desc.extra_base,$=_.stat_desc.max_length,Y=0;for(C=0;C<=lp;C++)v.bl_count[C]=0;for(D[2*v.heap[v.heap_max]+1]=0,y=v.heap_max+1;y<iY;y++)(C=D[2*D[2*(b=v.heap[y])+1]+1]+1)>$&&(C=$,Y++),D[2*b+1]=C,b>k||(v.bl_count[C]++,T=0,b>=V&&(T=P[b-V]),I=D[2*b],v.opt_len+=I*(C+T),L&&(v.static_len+=I*(O[2*b+1]+T)));if(Y!==0){do{for(C=$-1;v.bl_count[C]===0;)C--;v.bl_count[C]--,v.bl_count[C+1]+=2,v.bl_count[$]--,Y-=2}while(Y>0);for(C=$;C!==0;C--)for(b=v.bl_count[C];b!==0;)(w=v.heap[--y])>k||(D[2*w+1]!==C&&(v.opt_len+=(C-D[2*w+1])*D[2*w],D[2*w+1]=C),b--)}}(e,t),Fre(l,h,e.bl_count)}function dY(e,t,n){var o,s,l=-1,u=t[1],d=0,p=7,h=4;for(u===0&&(p=138,h=3),t[2*(n+1)+1]=65535,o=0;o<=n;o++)s=u,u=t[2*(o+1)+1],++d<p&&s===u||(d<h?e.bl_tree[2*s]+=d:s!==0?(s!==l&&e.bl_tree[2*s]++,e.bl_tree[2*Mre]++):d<=10?e.bl_tree[2*Pre]++:e.bl_tree[2*Vre]++,d=0,l=s,u===0?(p=138,h=3):s===u?(p=6,h=3):(p=7,h=4))}function fY(e,t,n){var o,s,l=-1,u=t[1],d=0,p=7,h=4;for(u===0&&(p=138,h=3),o=0;o<=n;o++)if(s=u,u=t[2*(o+1)+1],!(++d<p&&s===u)){if(d<h)do Fc(e,s,e.bl_tree);while(--d!=0);else s!==0?(s!==l&&(Fc(e,s,e.bl_tree),d--),Fc(e,Mre,e.bl_tree),ls(e,d-3,2)):d<=10?(Fc(e,Pre,e.bl_tree),ls(e,d-3,3)):(Fc(e,Vre,e.bl_tree),ls(e,d-11,7));d=0,l=s,u===0?(p=138,h=3):s===u?(p=6,h=3):(p=7,h=4)}}f2(rS);var hY=!1;function HQe(e){hY||(function(){var t,n,o,s,l,u=new Array(lp+1);for(o=0,s=0;s<mV-1;s++)for(_V[s]=o,t=0;t<1<<ZM[s];t++)Iy[o++]=s;for(Iy[o-1]=s,l=0,s=0;s<16;s++)for(rS[s]=l,t=0;t<1<<g8[s];t++)Ty[l++]=s;for(l>>=7;s<Eg;s++)for(rS[s]=l<<7,t=0;t<1<<g8[s]-7;t++)Ty[256+l++]=s;for(n=0;n<=lp;n++)u[n]=0;for(t=0;t<=143;)td[2*t+1]=8,t++,u[8]++;for(;t<=255;)td[2*t+1]=9,t++,u[9]++;for(;t<=279;)td[2*t+1]=7,t++,u[7]++;for(;t<=287;)td[2*t+1]=8,t++,u[8]++;for(Fre(td,Cy+1,u),t=0;t<Eg;t++)oy[2*t+1]=5,oy[2*t]=Bre(t,5);aY=new BO(td,ZM,l3+1,Cy,lp),sY=new BO(oy,g8,0,Eg,lp),lY=new BO(new Array(0),zQe,0,vV,UQe)}(),hY=!0),e.l_desc=new FO(e.dyn_ltree,aY),e.d_desc=new FO(e.dyn_dtree,sY),e.bl_desc=new FO(e.bl_tree,lY),e.bi_buf=0,e.bi_valid=0,$re(e)}function zre(e,t,n,o){ls(e,(FQe<<1)+(o?1:0),3),function(s,l,u,d){Ure(s),ky(s,u),ky(s,~u),nd(s.pending_buf,s.window,l,u,s.pending),s.pending+=u}(e,t,n)}function WQe(e){ls(e,Ore<<1,3),Fc(e,gV,td),function(t){t.bi_valid===16?(ky(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function jQe(e,t,n,o){var s,l,u=0;e.level>0?(e.strm.data_type===BQe&&(e.strm.data_type=function(d){var p,h=4093624447;for(p=0;p<=31;p++,h>>>=1)if(1&h&&d.dyn_ltree[2*p]!==0)return nY;if(d.dyn_ltree[18]!==0||d.dyn_ltree[20]!==0||d.dyn_ltree[26]!==0)return rY;for(p=32;p<l3;p++)if(d.dyn_ltree[2*p]!==0)return rY;return nY}(e)),UO(e,e.l_desc),UO(e,e.d_desc),u=function(d){var p;for(dY(d,d.dyn_ltree,d.l_desc.max_code),dY(d,d.dyn_dtree,d.d_desc.max_code),UO(d,d.bl_desc),p=vV-1;p>=3&&d.bl_tree[2*oY[p]+1]===0;p--);return d.opt_len+=3*(p+1)+5+5+4,p}(e),s=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=s&&(s=l)):s=l=n+5,n+4<=s&&t!==-1?zre(e,t,n,o):e.strategy===LQe||l===s?(ls(e,(Ore<<1)+(o?1:0),3),uY(e,td,oy)):(ls(e,($Qe<<1)+(o?1:0),3),function(d,p,h,v){var _;for(ls(d,p-257,5),ls(d,h-1,5),ls(d,v-4,4),_=0;_<v;_++)ls(d,d.bl_tree[2*oY[_]+1],3);fY(d,d.dyn_ltree,p-1),fY(d,d.dyn_dtree,h-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),uY(e,e.dyn_ltree,e.dyn_dtree)),$re(e),o&&Ure(e)}function rh(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Iy[n]+l3+1)]++,e.dyn_dtree[2*Lre(t)]++),e.last_lit===e.lit_bufsize-1}function QM(e,t,n,o){for(var s=65535&e|0,l=e>>>16&65535|0,u=0;n!==0;){n-=u=n>2e3?2e3:n;do l=l+(s=s+t[o++]|0)|0;while(--u);s%=65521,l%=65521}return s|l<<16|0}var GQe=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var o=0;o<8;o++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Xo(e,t,n,o){var s=GQe,l=o+n;e^=-1;for(var u=o;u<l;u++)e=e>>>8^s[255&(e^t[u])];return-1^e}var og,Ap=0,qQe=1,YQe=3,zf=4,pY=5,ep=0,mY=1,Dp=-2,KQe=-3,zO=-5,XQe=-1,JQe=1,nw=2,ZQe=3,QQe=4,eet=2,yV=8,tet=9,eP=286,net=30,ret=19,iet=2*eP+1,oet=15,Ai=3,Xf=258,Yl=Xf+Ai+1,aet=32,bV=42,tP=69,_8=73,y8=91,b8=103,cp=113,A4=666,Jo=1,ay=2,up=3,wg=4,set=3;function Jf(e,t){return e.msg=Rre[t],t}function vY(e){return(e<<1)-(e>4?9:0)}function tp(e){for(var t=e.length;--t>=0;)e[t]=0}function Vf(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(nd(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function la(e,t){jQe(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Vf(e.strm)}function gi(e,t){e.pending_buf[e.pending++]=t}function w4(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Hre(e,t){var n,o,s=e.max_chain_length,l=e.strstart,u=e.prev_length,d=e.nice_match,p=e.strstart>e.w_size-Yl?e.strstart-(e.w_size-Yl):0,h=e.window,v=e.w_mask,_=e.prev,y=e.strstart+Xf,b=h[l+u-1],w=h[l+u];e.prev_length>=e.good_match&&(s>>=2),d>e.lookahead&&(d=e.lookahead);do if(h[(n=t)+u]===w&&h[n+u-1]===b&&h[n]===h[l]&&h[++n]===h[l+1]){l+=2,n++;do;while(h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&h[++l]===h[++n]&&l<y);if(o=Xf-(y-l),l=y-Xf,o>u){if(e.match_start=t,u=o,o>=d)break;b=h[l+u-1],w=h[l+u]}}while((t=_[t&v])>p&&--s!=0);return u<=e.lookahead?u:e.lookahead}function Ay(e){var t,n,o,s,l,u,d,p,h,v,_=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=_+(_-Yl)){nd(e.window,e.window,_,_,0),e.match_start-=_,e.strstart-=_,e.block_start-=_,t=n=e.hash_size;do o=e.head[--t],e.head[t]=o>=_?o-_:0;while(--n);t=n=_;do o=e.prev[--t],e.prev[t]=o>=_?o-_:0;while(--n);s+=_}if(e.strm.avail_in===0)break;if(u=e.strm,d=e.window,p=e.strstart+e.lookahead,h=s,v=void 0,(v=u.avail_in)>h&&(v=h),n=v===0?0:(u.avail_in-=v,nd(d,u.input,u.next_in,v,p),u.state.wrap===1?u.adler=QM(u.adler,d,v,p):u.state.wrap===2&&(u.adler=Xo(u.adler,d,v,p)),u.next_in+=v,u.total_in+=v,v),e.lookahead+=n,e.lookahead+e.insert>=Ai)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+Ai-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<Ai)););}while(e.lookahead<Yl&&e.strm.avail_in!==0)}function HO(e,t){for(var n,o;;){if(e.lookahead<Yl){if(Ay(e),e.lookahead<Yl&&t===Ap)return Jo;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ai&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Yl&&(e.match_length=Hre(e,n)),e.match_length>=Ai)if(o=rh(e,e.strstart-e.match_start,e.match_length-Ai),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ai){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else o=rh(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(o&&(la(e,!1),e.strm.avail_out===0))return Jo}return e.insert=e.strstart<Ai-1?e.strstart:Ai-1,t===zf?(la(e,!0),e.strm.avail_out===0?up:wg):e.last_lit&&(la(e,!1),e.strm.avail_out===0)?Jo:ay}function qv(e,t){for(var n,o,s;;){if(e.lookahead<Yl){if(Ay(e),e.lookahead<Yl&&t===Ap)return Jo;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ai&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ai-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Yl&&(e.match_length=Hre(e,n),e.match_length<=5&&(e.strategy===JQe||e.match_length===Ai&&e.strstart-e.match_start>4096)&&(e.match_length=Ai-1)),e.prev_length>=Ai&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-Ai,o=rh(e,e.strstart-1-e.prev_match,e.prev_length-Ai),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=s&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ai-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=Ai-1,e.strstart++,o&&(la(e,!1),e.strm.avail_out===0))return Jo}else if(e.match_available){if((o=rh(e,0,e.window[e.strstart-1]))&&la(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Jo}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(o=rh(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ai-1?e.strstart:Ai-1,t===zf?(la(e,!0),e.strm.avail_out===0?up:wg):e.last_lit&&(la(e,!1),e.strm.avail_out===0)?Jo:ay}function Ac(e,t,n,o,s){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=o,this.func=s}function cet(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=yV,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new il(2*iet),this.dyn_dtree=new il(2*(2*net+1)),this.bl_tree=new il(2*(2*ret+1)),tp(this.dyn_ltree),tp(this.dyn_dtree),tp(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new il(oet+1),this.heap=new il(2*eP+1),tp(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new il(2*eP+1),tp(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function gY(e){var t,n=function(o){var s;return o&&o.state?(o.total_in=o.total_out=0,o.data_type=eet,(s=o.state).pending=0,s.pending_out=0,s.wrap<0&&(s.wrap=-s.wrap),s.status=s.wrap?bV:cp,o.adler=s.wrap===2?0:1,s.last_flush=Ap,HQe(s),ep):Jf(o,Dp)}(e);return n===ep&&((t=e.state).window_size=2*t.w_size,tp(t.head),t.max_lazy_match=og[t.level].max_lazy,t.good_match=og[t.level].good_length,t.nice_match=og[t.level].nice_length,t.max_chain_length=og[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Ai-1,t.match_available=0,t.ins_h=0),n}function uet(e,t){var n,o,s,l;if(!e||!e.state||t>pY||t<0)return e?Jf(e,Dp):Dp;if(o=e.state,!e.output||!e.input&&e.avail_in!==0||o.status===A4&&t!==zf)return Jf(e,e.avail_out===0?zO:Dp);if(o.strm=e,n=o.last_flush,o.last_flush=t,o.status===bV)if(o.wrap===2)e.adler=0,gi(o,31),gi(o,139),gi(o,8),o.gzhead?(gi(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),gi(o,255&o.gzhead.time),gi(o,o.gzhead.time>>8&255),gi(o,o.gzhead.time>>16&255),gi(o,o.gzhead.time>>24&255),gi(o,o.level===9?2:o.strategy>=nw||o.level<2?4:0),gi(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(gi(o,255&o.gzhead.extra.length),gi(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=Xo(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=tP):(gi(o,0),gi(o,0),gi(o,0),gi(o,0),gi(o,0),gi(o,o.level===9?2:o.strategy>=nw||o.level<2?4:0),gi(o,set),o.status=cp);else{var u=yV+(o.w_bits-8<<4)<<8;u|=(o.strategy>=nw||o.level<2?0:o.level<6?1:o.level===6?2:3)<<6,o.strstart!==0&&(u|=aet),u+=31-u%31,o.status=cp,w4(o,u),o.strstart!==0&&(w4(o,e.adler>>>16),w4(o,65535&e.adler)),e.adler=1}if(o.status===tP)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),Vf(e),s=o.pending,o.pending!==o.pending_buf_size));)gi(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=_8)}else o.status=_8;if(o.status===_8)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),Vf(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,gi(o,l)}while(l!==0);o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),l===0&&(o.gzindex=0,o.status=y8)}else o.status=y8;if(o.status===y8)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),Vf(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,gi(o,l)}while(l!==0);o.gzhead.hcrc&&o.pending>s&&(e.adler=Xo(e.adler,o.pending_buf,o.pending-s,s)),l===0&&(o.status=b8)}else o.status=b8;if(o.status===b8&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Vf(e),o.pending+2<=o.pending_buf_size&&(gi(o,255&e.adler),gi(o,e.adler>>8&255),e.adler=0,o.status=cp)):o.status=cp),o.pending!==0){if(Vf(e),e.avail_out===0)return o.last_flush=-1,ep}else if(e.avail_in===0&&vY(t)<=vY(n)&&t!==zf)return Jf(e,zO);if(o.status===A4&&e.avail_in!==0)return Jf(e,zO);if(e.avail_in!==0||o.lookahead!==0||t!==Ap&&o.status!==A4){var d=o.strategy===nw?function(p,h){for(var v;;){if(p.lookahead===0&&(Ay(p),p.lookahead===0)){if(h===Ap)return Jo;break}if(p.match_length=0,v=rh(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,v&&(la(p,!1),p.strm.avail_out===0))return Jo}return p.insert=0,h===zf?(la(p,!0),p.strm.avail_out===0?up:wg):p.last_lit&&(la(p,!1),p.strm.avail_out===0)?Jo:ay}(o,t):o.strategy===ZQe?function(p,h){for(var v,_,y,b,w=p.window;;){if(p.lookahead<=Xf){if(Ay(p),p.lookahead<=Xf&&h===Ap)return Jo;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=Ai&&p.strstart>0&&(_=w[y=p.strstart-1])===w[++y]&&_===w[++y]&&_===w[++y]){b=p.strstart+Xf;do;while(_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&_===w[++y]&&y<b);p.match_length=Xf-(b-y),p.match_length>p.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=Ai?(v=rh(p,1,p.match_length-Ai),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(v=rh(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),v&&(la(p,!1),p.strm.avail_out===0))return Jo}return p.insert=0,h===zf?(la(p,!0),p.strm.avail_out===0?up:wg):p.last_lit&&(la(p,!1),p.strm.avail_out===0)?Jo:ay}(o,t):og[o.level].func(o,t);if(d!==up&&d!==wg||(o.status=A4),d===Jo||d===up)return e.avail_out===0&&(o.last_flush=-1),ep;if(d===ay&&(t===qQe?WQe(o):t!==pY&&(zre(o,0,0,!1),t===YQe&&(tp(o.head),o.lookahead===0&&(o.strstart=0,o.block_start=0,o.insert=0))),Vf(e),e.avail_out===0))return o.last_flush=-1,ep}return t!==zf?ep:o.wrap<=0?mY:(o.wrap===2?(gi(o,255&e.adler),gi(o,e.adler>>8&255),gi(o,e.adler>>16&255),gi(o,e.adler>>24&255),gi(o,255&e.total_in),gi(o,e.total_in>>8&255),gi(o,e.total_in>>16&255),gi(o,e.total_in>>24&255)):(w4(o,e.adler>>>16),w4(o,65535&e.adler)),Vf(e),o.wrap>0&&(o.wrap=-o.wrap),o.pending!==0?ep:mY)}og=[new Ac(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ay(e),e.lookahead===0&&t===Ap)return Jo;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var o=e.block_start+n;if((e.strstart===0||e.strstart>=o)&&(e.lookahead=e.strstart-o,e.strstart=o,la(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Yl&&(la(e,!1),e.strm.avail_out===0))return Jo}return e.insert=0,t===zf?(la(e,!0),e.strm.avail_out===0?up:wg):(e.strstart>e.block_start&&(la(e,!1),e.strm.avail_out),Jo)}),new Ac(4,4,8,4,HO),new Ac(4,5,16,8,HO),new Ac(4,6,32,32,HO),new Ac(4,4,16,16,qv),new Ac(8,16,32,32,qv),new Ac(8,16,128,128,qv),new Ac(8,32,128,256,qv),new Ac(32,128,258,1024,qv),new Ac(32,258,258,4096,qv)];var rw=30,det=12;function fet(e,t){var n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D,k,O,L,P,V,$,Y,F;n=e.state,o=e.next_in,Y=e.input,s=o+(e.avail_in-5),l=e.next_out,F=e.output,u=l-(t-e.avail_out),d=l+(e.avail_out-257),p=n.dmax,h=n.wsize,v=n.whave,_=n.wnext,y=n.window,b=n.hold,w=n.bits,C=n.lencode,T=n.distcode,I=(1<<n.lenbits)-1,D=(1<<n.distbits)-1;e:do{w<15&&(b+=Y[o++]<<w,w+=8,b+=Y[o++]<<w,w+=8),k=C[b&I];t:for(;;){if(b>>>=O=k>>>24,w-=O,(O=k>>>16&255)===0)F[l++]=65535&k;else{if(!(16&O)){if(!(64&O)){k=C[(65535&k)+(b&(1<<O)-1)];continue t}if(32&O){n.mode=det;break e}e.msg="invalid literal/length code",n.mode=rw;break e}L=65535&k,(O&=15)&&(w<O&&(b+=Y[o++]<<w,w+=8),L+=b&(1<<O)-1,b>>>=O,w-=O),w<15&&(b+=Y[o++]<<w,w+=8,b+=Y[o++]<<w,w+=8),k=T[b&D];n:for(;;){if(b>>>=O=k>>>24,w-=O,!(16&(O=k>>>16&255))){if(!(64&O)){k=T[(65535&k)+(b&(1<<O)-1)];continue n}e.msg="invalid distance code",n.mode=rw;break e}if(P=65535&k,w<(O&=15)&&(b+=Y[o++]<<w,(w+=8)<O&&(b+=Y[o++]<<w,w+=8)),(P+=b&(1<<O)-1)>p){e.msg="invalid distance too far back",n.mode=rw;break e}if(b>>>=O,w-=O,P>(O=l-u)){if((O=P-O)>v&&n.sane){e.msg="invalid distance too far back",n.mode=rw;break e}if(V=0,$=y,_===0){if(V+=h-O,O<L){L-=O;do F[l++]=y[V++];while(--O);V=l-P,$=F}}else if(_<O){if(V+=h+_-O,(O-=_)<L){L-=O;do F[l++]=y[V++];while(--O);if(V=0,_<L){L-=O=_;do F[l++]=y[V++];while(--O);V=l-P,$=F}}}else if(V+=_-O,O<L){L-=O;do F[l++]=y[V++];while(--O);V=l-P,$=F}for(;L>2;)F[l++]=$[V++],F[l++]=$[V++],F[l++]=$[V++],L-=3;L&&(F[l++]=$[V++],L>1&&(F[l++]=$[V++]))}else{V=l-P;do F[l++]=F[V++],F[l++]=F[V++],F[l++]=F[V++],L-=3;while(L>2);L&&(F[l++]=F[V++],L>1&&(F[l++]=F[V++]))}break}}break}}while(o<s&&l<d);o-=L=w>>3,b&=(1<<(w-=L<<3))-1,e.next_in=o,e.next_out=l,e.avail_in=o<s?s-o+5:5-(o-s),e.avail_out=l<d?d-l+257:257-(l-d),n.hold=b,n.bits=w}var Yv=15,_Y=852,yY=592,bY=0,WO=1,xY=2,het=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],pet=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],met=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],vet=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function sy(e,t,n,o,s,l,u,d){var p,h,v,_,y,b,w,C,T,I=d.bits,D=0,k=0,O=0,L=0,P=0,V=0,$=0,Y=0,F=0,U=0,Q=null,X=0,le=new il(Yv+1),ye=new il(Yv+1),ue=null,G=0;for(D=0;D<=Yv;D++)le[D]=0;for(k=0;k<o;k++)le[t[n+k]]++;for(P=I,L=Yv;L>=1&&le[L]===0;L--);if(P>L&&(P=L),L===0)return s[l++]=20971520,s[l++]=20971520,d.bits=1,0;for(O=1;O<L&&le[O]===0;O++);for(P<O&&(P=O),Y=1,D=1;D<=Yv;D++)if(Y<<=1,(Y-=le[D])<0)return-1;if(Y>0&&(e===bY||L!==1))return-1;for(ye[1]=0,D=1;D<Yv;D++)ye[D+1]=ye[D]+le[D];for(k=0;k<o;k++)t[n+k]!==0&&(u[ye[t[n+k]]++]=k);if(e===bY?(Q=ue=u,b=19):e===WO?(Q=het,X-=257,ue=pet,G-=257,b=256):(Q=met,ue=vet,b=-1),U=0,k=0,D=O,y=l,V=P,$=0,v=-1,_=(F=1<<P)-1,e===WO&&F>_Y||e===xY&&F>yY)return 1;for(;;){w=D-$,u[k]<b?(C=0,T=u[k]):u[k]>b?(C=ue[G+u[k]],T=Q[X+u[k]]):(C=96,T=0),p=1<<D-$,O=h=1<<V;do s[y+(U>>$)+(h-=p)]=w<<24|C<<16|T|0;while(h!==0);for(p=1<<D-1;U&p;)p>>=1;if(p!==0?(U&=p-1,U+=p):U=0,k++,--le[D]==0){if(D===L)break;D=t[n+u[k]]}if(D>P&&(U&_)!==v){for($===0&&($=P),y+=O,Y=1<<(V=D-$);V+$<L&&!((Y-=le[V+$])<=0);)V++,Y<<=1;if(F+=1<<V,e===WO&&F>_Y||e===xY&&F>yY)return 1;s[v=U&_]=P<<24|V<<16|y-l|0}}return U!==0&&(s[y+U]=D-$<<24|64<<16|0),d.bits=P,0}var get=0,Wre=1,jre=2,EY=4,_et=5,iw=6,iS=0,yet=1,bet=2,ih=-2,xet=-3,Eet=-4,wet=-5,wY=8,Gre=1,SY=2,CY=3,TY=4,IY=5,kY=6,AY=7,DY=8,NY=9,RY=10,OY=11,Ku=12,jO=13,MY=14,GO=15,PY=16,VY=17,LY=18,BY=19,ow=20,aw=21,FY=22,$Y=23,UY=24,zY=25,HY=26,qO=27,WY=28,jY=29,Xi=30,Cet=31,Tet=32,Iet=852,ket=592;function GY(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Aet(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new il(320),this.work=new il(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qre(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(n){var o;return n&&n.state?(o=n.state,n.total_in=n.total_out=o.total=0,n.msg="",o.wrap&&(n.adler=1&o.wrap),o.mode=Gre,o.last=0,o.havedict=0,o.dmax=32768,o.head=null,o.hold=0,o.bits=0,o.lencode=o.lendyn=new nS(Iet),o.distcode=o.distdyn=new nS(ket),o.sane=1,o.back=-1,iS):ih}(e)):ih}function Det(e,t){var n,o;return e?(o=new Aet,e.state=o,o.window=null,(n=function(s,l){var u,d;return s&&s.state?(d=s.state,l<0?(u=0,l=-l):(u=1+(l>>4),l<48&&(l&=15)),l&&(l<8||l>15)?ih:(d.window!==null&&d.wbits!==l&&(d.window=null),d.wrap=u,d.wbits=l,qre(s))):ih}(e,t))!==iS&&(e.state=null),n):ih}var YO,KO,qY=!0;function Net(e){if(qY){var t;for(YO=new nS(512),KO=new nS(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sy(Wre,e.lens,0,288,YO,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sy(jre,e.lens,0,32,KO,0,e.work,{bits:5}),qY=!1}e.lencode=YO,e.lenbits=9,e.distcode=KO,e.distbits=5}function Ret(e,t){var n,o,s,l,u,d,p,h,v,_,y,b,w,C,T,I,D,k,O,L,P,V,$,Y,F=0,U=new tS(4),Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ih;(n=e.state).mode===Ku&&(n.mode=jO),u=e.next_out,s=e.output,p=e.avail_out,l=e.next_in,o=e.input,d=e.avail_in,h=n.hold,v=n.bits,_=d,y=p,V=iS;e:for(;;)switch(n.mode){case Gre:if(n.wrap===0){n.mode=jO;break}for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(2&n.wrap&&h===35615){n.check=0,U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0),h=0,v=0,n.mode=SY;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=Xi;break}if((15&h)!==wY){e.msg="unknown compression method",n.mode=Xi;break}if(v-=4,P=8+(15&(h>>>=4)),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=Xi;break}n.dmax=1<<P,e.adler=n.check=1,n.mode=512&h?RY:Ku,h=0,v=0;break;case SY:for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(n.flags=h,(255&n.flags)!==wY){e.msg="unknown compression method",n.mode=Xi;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Xi;break}n.head&&(n.head.text=h>>8&1),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0)),h=0,v=0,n.mode=CY;case CY:for(;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.head&&(n.head.time=h),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,U[2]=h>>>16&255,U[3]=h>>>24&255,n.check=Xo(n.check,U,4,0)),h=0,v=0,n.mode=TY;case TY:for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.head&&(n.head.xflags=255&h,n.head.os=h>>8),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0)),h=0,v=0,n.mode=IY;case IY:if(1024&n.flags){for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.length=h,n.head&&(n.head.extra_len=h),512&n.flags&&(U[0]=255&h,U[1]=h>>>8&255,n.check=Xo(n.check,U,2,0)),h=0,v=0}else n.head&&(n.head.extra=null);n.mode=kY;case kY:if(1024&n.flags&&((b=n.length)>d&&(b=d),b&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),nd(n.head.extra,o,l,b,P)),512&n.flags&&(n.check=Xo(n.check,o,b,l)),d-=b,l+=b,n.length-=b),n.length))break e;n.length=0,n.mode=AY;case AY:if(2048&n.flags){if(d===0)break e;b=0;do P=o[l+b++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&b<d);if(512&n.flags&&(n.check=Xo(n.check,o,b,l)),d-=b,l+=b,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=DY;case DY:if(4096&n.flags){if(d===0)break e;b=0;do P=o[l+b++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P));while(P&&b<d);if(512&n.flags&&(n.check=Xo(n.check,o,b,l)),d-=b,l+=b,P)break e}else n.head&&(n.head.comment=null);n.mode=NY;case NY:if(512&n.flags){for(;v<16;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(h!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Xi;break}h=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ku;break;case RY:for(;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}e.adler=n.check=GY(h),h=0,v=0,n.mode=OY;case OY:if(n.havedict===0)return e.next_out=u,e.avail_out=p,e.next_in=l,e.avail_in=d,n.hold=h,n.bits=v,bet;e.adler=n.check=1,n.mode=Ku;case Ku:if(t===_et||t===iw)break e;case jO:if(n.last){h>>>=7&v,v-=7&v,n.mode=qO;break}for(;v<3;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}switch(n.last=1&h,v-=1,3&(h>>>=1)){case 0:n.mode=MY;break;case 1:if(Net(n),n.mode=ow,t===iw){h>>>=2,v-=2;break e}break;case 2:n.mode=VY;break;case 3:e.msg="invalid block type",n.mode=Xi}h>>>=2,v-=2;break;case MY:for(h>>>=7&v,v-=7&v;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Xi;break}if(n.length=65535&h,h=0,v=0,n.mode=GO,t===iw)break e;case GO:n.mode=PY;case PY:if(b=n.length){if(b>d&&(b=d),b>p&&(b=p),b===0)break e;nd(s,o,l,b,u),d-=b,l+=b,p-=b,u+=b,n.length-=b;break}n.mode=Ku;break;case VY:for(;v<14;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(n.nlen=257+(31&h),h>>>=5,v-=5,n.ndist=1+(31&h),h>>>=5,v-=5,n.ncode=4+(15&h),h>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Xi;break}n.have=0,n.mode=LY;case LY:for(;n.have<n.ncode;){for(;v<3;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.lens[Q[n.have++]]=7&h,h>>>=3,v-=3}for(;n.have<19;)n.lens[Q[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,$={bits:n.lenbits},V=sy(get,n.lens,0,19,n.lencode,0,n.work,$),n.lenbits=$.bits,V){e.msg="invalid code lengths set",n.mode=Xi;break}n.have=0,n.mode=BY;case BY:for(;n.have<n.nlen+n.ndist;){for(;I=(F=n.lencode[h&(1<<n.lenbits)-1])>>>16&255,D=65535&F,!((T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(D<16)h>>>=T,v-=T,n.lens[n.have++]=D;else{if(D===16){for(Y=T+2;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(h>>>=T,v-=T,n.have===0){e.msg="invalid bit length repeat",n.mode=Xi;break}P=n.lens[n.have-1],b=3+(3&h),h>>>=2,v-=2}else if(D===17){for(Y=T+3;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}v-=T,P=0,b=3+(7&(h>>>=T)),h>>>=3,v-=3}else{for(Y=T+7;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}v-=T,P=0,b=11+(127&(h>>>=T)),h>>>=7,v-=7}if(n.have+b>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Xi;break}for(;b--;)n.lens[n.have++]=P}}if(n.mode===Xi)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Xi;break}if(n.lenbits=9,$={bits:n.lenbits},V=sy(Wre,n.lens,0,n.nlen,n.lencode,0,n.work,$),n.lenbits=$.bits,V){e.msg="invalid literal/lengths set",n.mode=Xi;break}if(n.distbits=6,n.distcode=n.distdyn,$={bits:n.distbits},V=sy(jre,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,$),n.distbits=$.bits,V){e.msg="invalid distances set",n.mode=Xi;break}if(n.mode=ow,t===iw)break e;case ow:n.mode=aw;case aw:if(d>=6&&p>=258){e.next_out=u,e.avail_out=p,e.next_in=l,e.avail_in=d,n.hold=h,n.bits=v,fet(e,y),u=e.next_out,s=e.output,p=e.avail_out,l=e.next_in,o=e.input,d=e.avail_in,h=n.hold,v=n.bits,n.mode===Ku&&(n.back=-1);break}for(n.back=0;I=(F=n.lencode[h&(1<<n.lenbits)-1])>>>16&255,D=65535&F,!((T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(I&&!(240&I)){for(k=T,O=I,L=D;I=(F=n.lencode[L+((h&(1<<k+O)-1)>>k)])>>>16&255,D=65535&F,!(k+(T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}h>>>=k,v-=k,n.back+=k}if(h>>>=T,v-=T,n.back+=T,n.length=D,I===0){n.mode=HY;break}if(32&I){n.back=-1,n.mode=Ku;break}if(64&I){e.msg="invalid literal/length code",n.mode=Xi;break}n.extra=15&I,n.mode=FY;case FY:if(n.extra){for(Y=n.extra;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=$Y;case $Y:for(;I=(F=n.distcode[h&(1<<n.distbits)-1])>>>16&255,D=65535&F,!((T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(!(240&I)){for(k=T,O=I,L=D;I=(F=n.distcode[L+((h&(1<<k+O)-1)>>k)])>>>16&255,D=65535&F,!(k+(T=F>>>24)<=v);){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}h>>>=k,v-=k,n.back+=k}if(h>>>=T,v-=T,n.back+=T,64&I){e.msg="invalid distance code",n.mode=Xi;break}n.offset=D,n.extra=15&I,n.mode=UY;case UY:if(n.extra){for(Y=n.extra;v<Y;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Xi;break}n.mode=zY;case zY:if(p===0)break e;if(b=y-p,n.offset>b){if((b=n.offset-b)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Xi;break}b>n.wnext?(b-=n.wnext,w=n.wsize-b):w=n.wnext-b,b>n.length&&(b=n.length),C=n.window}else C=s,w=u-n.offset,b=n.length;b>p&&(b=p),p-=b,n.length-=b;do s[u++]=C[w++];while(--b);n.length===0&&(n.mode=aw);break;case HY:if(p===0)break e;s[u++]=n.length,p--,n.mode=aw;break;case qO:if(n.wrap){for(;v<32;){if(d===0)break e;d--,h|=o[l++]<<v,v+=8}if(y-=p,e.total_out+=y,n.total+=y,y&&(e.adler=n.check=n.flags?Xo(n.check,s,y,u-y):QM(n.check,s,y,u-y)),y=p,(n.flags?h:GY(h))!==n.check){e.msg="incorrect data check",n.mode=Xi;break}h=0,v=0}n.mode=WY;case WY:if(n.wrap&&n.flags){for(;v<32;){if(d===0)break e;d--,h+=o[l++]<<v,v+=8}if(h!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Xi;break}h=0,v=0}n.mode=jY;case jY:V=yet;break e;case Xi:V=xet;break e;case Cet:return Eet;case Tet:default:return ih}return e.next_out=u,e.avail_out=p,e.next_in=l,e.avail_in=d,n.hold=h,n.bits=v,(n.wsize||y!==e.avail_out&&n.mode<Xi&&(n.mode<qO||t!==EY))&&function(X,le,ye,ue){var G,ee=X.state;ee.window===null&&(ee.wsize=1<<ee.wbits,ee.wnext=0,ee.whave=0,ee.window=new tS(ee.wsize)),ue>=ee.wsize?(nd(ee.window,le,ye-ee.wsize,ee.wsize,0),ee.wnext=0,ee.whave=ee.wsize):((G=ee.wsize-ee.wnext)>ue&&(G=ue),nd(ee.window,le,ye-ue,G,ee.wnext),(ue-=G)?(nd(ee.window,le,ye-ue,ue,0),ee.wnext=ue,ee.whave=ee.wsize):(ee.wnext+=G,ee.wnext===ee.wsize&&(ee.wnext=0),ee.whave<ee.wsize&&(ee.whave+=G)))}(e,e.output,e.next_out,y-e.avail_out),_-=e.avail_in,y-=e.avail_out,e.total_in+=_,e.total_out+=y,n.total+=y,n.wrap&&y&&(e.adler=n.check=n.flags?Xo(n.check,s,y,e.next_out-y):QM(n.check,s,y,e.next_out-y)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Ku?128:0)+(n.mode===ow||n.mode===GO?256:0),(_===0&&y===0||t===EY)&&V===iS&&(V=wet),V}var sw,ag=1,ly=7;function Dc(e){if(e<ag||e>ly)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function Oet(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}Dc.prototype.init=function(e,t,n,o,s){var l;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=o,this.mode!==3&&this.mode!==4||(this.windowBits+=16),this.mode===ly&&(this.windowBits+=32),this.mode!==5&&this.mode!==6||(this.windowBits=-this.windowBits),this.strm=new VQe,this.mode){case ag:case 3:case 5:l=function(u,d,p,h,v,_){if(!u)return Dp;var y=1;if(d===XQe&&(d=6),h<0?(y=0,h=-h):h>15&&(y=2,h-=16),v<1||v>tet||p!==yV||h<8||h>15||d<0||d>9||_<0||_>QQe)return Jf(u,Dp);h===8&&(h=9);var b=new cet;return u.state=b,b.strm=u,b.wrap=y,b.gzhead=null,b.w_bits=h,b.w_size=1<<b.w_bits,b.w_mask=b.w_size-1,b.hash_bits=v+7,b.hash_size=1<<b.hash_bits,b.hash_mask=b.hash_size-1,b.hash_shift=~~((b.hash_bits+Ai-1)/Ai),b.window=new tS(2*b.w_size),b.head=new il(b.hash_size),b.prev=new il(b.w_size),b.lit_bufsize=1<<v+6,b.pending_buf_size=4*b.lit_bufsize,b.pending_buf=new tS(b.pending_buf_size),b.d_buf=1*b.lit_bufsize,b.l_buf=3*b.lit_bufsize,b.level=d,b.strategy=_,b.method=p,gY(u)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case ly:l=Det(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}l===0?(this.write_in_progress=!1,this.init_done=!0):this._error(l)},Dc.prototype.params=function(){throw new Error("deflateParams Not supported")},Dc.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===0)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Dc.prototype.write=function(e,t,n,o,s,l,u){this._writeCheck(),this.write_in_progress=!0;var d=this;return sa(function(){d.write_in_progress=!1;var p=d._write(e,t,n,o,s,l,u);d.callback(p[0],p[1]),d.pending_close&&d.close()}),this},Dc.prototype.writeSync=function(e,t,n,o,s,l,u){return this._writeCheck(),this._write(e,t,n,o,s,l,u)},Dc.prototype._write=function(e,t,n,o,s,l,u){if(this.write_in_progress=!0,e!==0&&e!==1&&e!==2&&e!==3&&e!==4&&e!==5)throw new Error("Invalid flush value");t==null&&(t=new Lt(0),o=0,n=0),s._set?s.set=s._set:s.set=Oet;var d,p=this.strm;switch(p.avail_in=o,p.input=t,p.next_in=n,p.avail_out=u,p.output=s,p.next_out=l,this.mode){case ag:case 3:case 5:d=uet(p,e);break;case ly:case 2:case 4:case 6:d=Ret(p,e);break;default:throw new Error("Unknown mode "+this.mode)}return d!==1&&d!==0&&this._error(d),this.write_in_progress=!1,[p.avail_in,p.avail_out]},Dc.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===ag||this.mode===3||this.mode===5?function(e){var t;e&&e.state&&((t=e.state.status)!==bV&&t!==tP&&t!==_8&&t!==y8&&t!==b8&&t!==cp&&t!==A4?Jf(e,Dp):(e.state=null,t===cp&&Jf(e,KQe)))}(this.strm):function(e){if(!e||!e.state)return ih;var t=e.state;t.window&&(t.window=null),e.state=null}(this.strm),this.mode=0)},Dc.prototype.reset=function(){switch(this.mode){case ag:case 5:sw=gY(this.strm);break;case 2:case 6:sw=qre(this.strm)}sw!==0&&this._error(sw)},Dc.prototype._error=function(e){this.onerror(Rre[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var YY=Object.freeze({NONE:0,DEFLATE:ag,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:ly,Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8,Zlib:Dc}),$n={};Object.keys(YY).forEach(function(e){$n[e]=YY[e]}),$n.Z_MIN_WINDOWBITS=8,$n.Z_MAX_WINDOWBITS=15,$n.Z_DEFAULT_WINDOWBITS=15,$n.Z_MIN_CHUNK=64,$n.Z_MAX_CHUNK=1/0,$n.Z_DEFAULT_CHUNK=16384,$n.Z_MIN_MEMLEVEL=1,$n.Z_MAX_MEMLEVEL=9,$n.Z_DEFAULT_MEMLEVEL=8,$n.Z_MIN_LEVEL=-1,$n.Z_MAX_LEVEL=9,$n.Z_DEFAULT_LEVEL=$n.Z_DEFAULT_COMPRESSION;var x8={Z_OK:$n.Z_OK,Z_STREAM_END:$n.Z_STREAM_END,Z_NEED_DICT:$n.Z_NEED_DICT,Z_ERRNO:$n.Z_ERRNO,Z_STREAM_ERROR:$n.Z_STREAM_ERROR,Z_DATA_ERROR:$n.Z_DATA_ERROR,Z_MEM_ERROR:$n.Z_MEM_ERROR,Z_BUF_ERROR:$n.Z_BUF_ERROR,Z_VERSION_ERROR:$n.Z_VERSION_ERROR};function K0(e,t,n){var o=[],s=0;function l(){for(var d;(d=e.read())!==null;)o.push(d),s+=d.length;e.once("readable",l)}function u(){var d=Lt.concat(o,s);o=[],n(null,d),e.close()}e.on("error",function(d){e.removeListener("end",u),e.removeListener("readable",l),n(d)}),e.on("end",u),e.end(t),l()}function X0(e,t){if(typeof t=="string"&&(t=new Lt(t)),!o3(t))throw new TypeError("Not a string or buffer");var n=$n.Z_FINISH;return e._processChunk(t,n)}function dp(e){if(!(this instanceof dp))return new dp(e);lo.call(this,e,$n.DEFLATE)}function fp(e){if(!(this instanceof fp))return new fp(e);lo.call(this,e,$n.INFLATE)}function hp(e){if(!(this instanceof hp))return new hp(e);lo.call(this,e,$n.GZIP)}function pp(e){if(!(this instanceof pp))return new pp(e);lo.call(this,e,$n.GUNZIP)}function mp(e){if(!(this instanceof mp))return new mp(e);lo.call(this,e,$n.DEFLATERAW)}function vp(e){if(!(this instanceof vp))return new vp(e);lo.call(this,e,$n.INFLATERAW)}function gp(e){if(!(this instanceof gp))return new gp(e);lo.call(this,e,$n.UNZIP)}function lo(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||$n.Z_DEFAULT_CHUNK,nl.call(this,e),e.flush&&e.flush!==$n.Z_NO_FLUSH&&e.flush!==$n.Z_PARTIAL_FLUSH&&e.flush!==$n.Z_SYNC_FLUSH&&e.flush!==$n.Z_FULL_FLUSH&&e.flush!==$n.Z_FINISH&&e.flush!==$n.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||$n.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<$n.Z_MIN_CHUNK||e.chunkSize>$n.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<$n.Z_MIN_WINDOWBITS||e.windowBits>$n.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<$n.Z_MIN_LEVEL||e.level>$n.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<$n.Z_MIN_MEMLEVEL||e.memLevel>$n.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=$n.Z_FILTERED&&e.strategy!=$n.Z_HUFFMAN_ONLY&&e.strategy!=$n.Z_RLE&&e.strategy!=$n.Z_FIXED&&e.strategy!=$n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!o3(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new $n.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(l,u){n._binding=null,n._hadError=!0;var d=new Error(l);d.errno=u,d.code=$n.codes[u],n.emit("error",d)};var o=$n.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(o=e.level);var s=$n.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(s=e.strategy),this._binding.init(e.windowBits||$n.Z_DEFAULT_WINDOWBITS,o,e.memLevel||$n.Z_DEFAULT_MEMLEVEL,s,e.dictionary),this._buffer=new Lt(this._chunkSize),this._offset=0,this._closed=!1,this._level=o,this._strategy=s,this.once("end",this.close)}Object.keys(x8).forEach(function(e){x8[x8[e]]=e}),as(lo,nl),lo.prototype.params=function(e,t,n){if(e<$n.Z_MIN_LEVEL||e>$n.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=$n.Z_FILTERED&&t!=$n.Z_HUFFMAN_ONLY&&t!=$n.Z_RLE&&t!=$n.Z_FIXED&&t!=$n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var o=this;this.flush($n.Z_SYNC_FLUSH,function(){o._binding.params(e,t),o._hadError||(o._level=e,o._strategy=t,n&&n())})}else sa(n)},lo.prototype.reset=function(){return this._binding.reset()},lo.prototype._flush=function(e){this._transform(new Lt(0),"",e)},lo.prototype.flush=function(e,t){var n=this._writableState;if((typeof e=="function"||e===void 0&&!t)&&(t=e,e=$n.Z_FULL_FLUSH),n.ended)t&&sa(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var o=this;this.once("drain",function(){o.flush(t)})}else this._flushFlag=e,this.write(new Lt(0),"",t)},lo.prototype.close=function(e){if(e&&sa(e),!this._closed){this._closed=!0,this._binding.close();var t=this;sa(function(){t.emit("close")})}},lo.prototype._transform=function(e,t,n){var o,s=this._writableState,l=(s.ending||s.ended)&&(!e||s.length===e.length);if(!e===null&&!o3(e))return n(new Error("invalid input"));l?o=$n.Z_FINISH:(o=this._flushFlag,e.length>=s.length&&(this._flushFlag=this._opts.flush||$n.Z_NO_FLUSH)),this._processChunk(e,o,n)},lo.prototype._processChunk=function(e,t,n){var o=e&&e.length,s=this._chunkSize-this._offset,l=0,u=this,d=typeof n=="function";if(!d){var p,h=[],v=0;this.on("error",function(C){p=C});do var _=this._binding.writeSync(t,e,l,o,this._buffer,this._offset,s);while(!this._hadError&&w(_[0],_[1]));if(this._hadError)throw p;var y=Lt.concat(h,v);return this.close(),y}var b=this._binding.write(t,e,l,o,this._buffer,this._offset,s);function w(C,T){if(!u._hadError){var I=s-T;if(function(O,L){if(!O)throw new Error(L)}(I>=0,"have should not go down"),I>0){var D=u._buffer.slice(u._offset,u._offset+I);u._offset+=I,d?u.push(D):(h.push(D),v+=D.length)}if((T===0||u._offset>=u._chunkSize)&&(s=u._chunkSize,u._offset=0,u._buffer=new Lt(u._chunkSize)),T===0){if(l+=o-C,o=C,!d)return!0;var k=u._binding.write(t,e,l,o,u._buffer,u._offset,u._chunkSize);return k.callback=w,void(k.buffer=e)}if(!d)return!1;n()}}b.buffer=e,b.callback=w},as(dp,lo),as(fp,lo),as(hp,lo),as(pp,lo),as(mp,lo),as(vp,lo),as(gp,lo);var KY={codes:x8,createDeflate:function(e){return new dp(e)},createInflate:function(e){return new fp(e)},createDeflateRaw:function(e){return new mp(e)},createInflateRaw:function(e){return new vp(e)},createGzip:function(e){return new hp(e)},createGunzip:function(e){return new pp(e)},createUnzip:function(e){return new gp(e)},deflate:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new dp(t),e,n)},deflateSync:function(e,t){return X0(new dp(t),e)},gzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new hp(t),e,n)},gzipSync:function(e,t){return X0(new hp(t),e)},deflateRaw:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new mp(t),e,n)},deflateRawSync:function(e,t){return X0(new mp(t),e)},unzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new gp(t),e,n)},unzipSync:function(e,t){return X0(new gp(t),e)},inflate:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new fp(t),e,n)},inflateSync:function(e,t){return X0(new fp(t),e)},gunzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new pp(t),e,n)},gunzipSync:function(e,t){return X0(new pp(t),e)},inflateRaw:function(e,t,n){return typeof t=="function"&&(n=t,t={}),K0(new vp(t),e,n)},inflateRawSync:function(e,t){return X0(new vp(t),e)},Deflate:dp,Inflate:fp,Gzip:hp,Gunzip:pp,DeflateRaw:mp,InflateRaw:vp,Unzip:gp,Zlib:lo};class Met{constructor(t,n,o){this.SDKAPPID=t,this.EXPIRETIME=o,this.PRIVATEKEY=n}genTestUserSig(t){return console.log("e",t),this._isNumber(this.SDKAPPID)?this._isString(this.PRIVATEKEY)?this._isString(t)?this._isNumber(this.EXPIRETIME)?(console.log("sdkAppID="+this.SDKAPPID+" key="+this.PRIVATEKEY+" userID="+t+" expire="+this.EXPIRETIME),this.genSigWithUserbuf(t,this.EXPIRETIME,null)):(console.error("expireTime must be a number"),""):(console.error("userID must be a string"),""):(console.error("privateKey must be a string"),""):(console.error("sdkAppID must be a number"),"")}newBuffer(t,n){return Lt.from?Lt.from(t,n):new Lt(t,n)}unescape(t){return t.replace(/_/g,"=").replace(/\-/g,"/").replace(/\*/g,"+")}escape(t){return t.replace(/\+/g,"*").replace(/\//g,"-").replace(/=/g,"_")}encode(t){return this.escape(this.newBuffer(t).toString("base64"))}decode(t){return this.newBuffer(this.unescape(t),"base64")}base64encode(t){return this.newBuffer(t).toString("base64")}base64decode(t){return this.newBuffer(t,"base64").toString()}_hmacsha256(t,n,o,s){let l="TLS.identifier:"+t+`
269
269
  `;l+="TLS.sdkappid:"+this.SDKAPPID+`
270
270
  `,l+="TLS.time:"+n+`
271
271
  `,l+="TLS.expire:"+o+`
272
272
  `,s!=null&&(l+="TLS.userbuf:"+s+`
273
- `);let u=Uq.HmacSHA256(l,this.PRIVATEKEY);return Uq.enc.Base64.stringify(u)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,o){let s=this._utc(),l={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":s,"TLS.expire":n},u="";if(o!=null){let v=this.base64encode(o);l["TLS.userbuf"]=v,u=this._hmacsha256(t,s,n,v)}else u=this._hmacsha256(t,s,n,null);l["TLS.sig"]=u;let d=JSON.stringify(l),p=KY.deflateSync(this.newBuffer(d)).toString("base64"),h=this.escape(p);return console.log("ret="+h),h}validate(t){let n=this.decode(t),o=KY.inflateSync(n);console.log("validate ret="+o)}}const XY=1400829659,Met=604800,Pet="b838ac1178ea1bff2ab8ea72291a2c63709a1b4e2cce2afecc918f12c4912ac3";function Vet(e,t){const n=(t==null?void 0:t.appid)??XY,o=(t==null?void 0:t.secretkey)??Pet,l=new Oet(n,o,Met).genTestUserSig(e);return{SDKAppID:XY,userSig:l}}function Yre(e){const t=(o,s)=>{e.value.push({type:o,content:s})};return{addSuccessLog:o=>t("success",o),addFailedLog:o=>t("failed",o),addInfoLog:o=>t("info",o),clearLog:()=>{e.value=[]}}}function Let(e,t,n,o){const{addFailedLog:s,addSuccessLog:l}=Yre(o);function u(U){s(`Local error: ${U.message}`),t(Yn.EVENT.ERROR,U)}function d(U){s(`User has been kicked out for ${U.reason}`),t(Yn.EVENT.KICKED_OUT,U)}function p(U){const{userId:Q}=U;console.log(`远端用户: [${Q}] 进入房间`),n.remoteUsersViews.push({userId:Q,streamType:"main"}),l(`Remote User [${Q}] entered`),t(Yn.EVENT.REMOTE_USER_ENTER,U)}function h(U){let Q=n.remoteUsersViews.findIndex(X=>X.userId==U.userId);n.remoteUsersViews.splice(Q,1),l(`远端用户: [${U.userId}] 退房事件`),t(Yn.EVENT.REMOTE_USER_EXIT,U)}async function v(U){console.log("%c handleRemoteVideoAvailable >>>","background: blue; color: #fff",U);const{userId:Q,streamType:X}=U;try{await i.nextTick(),e.startRemoteVideo({view:Q,userId:Q,streamType:X,option:{small:!0,receiveWhenViewVisible:!0,viewRoot:document.getElementById("remote-box")}}),l(`Play remote video success: [${Q}]`),t(Yn.EVENT.REMOTE_VIDEO_AVAILABLE,U)}catch(le){s(`Play remote video failed: [${Q}], error: ${le.message}`)}}function _(U){console.log("远端用户停止发布视频",U);const{streamType:Q,userId:X}=U;l(`[${X}] [${Q}] video unavailable`),e.stopRemoteVideo({userId:X,streamType:Q}),t(Yn.EVENT.REMOTE_VIDEO_UNAVAILABLE,U)}function y(U){console.log("远端用户发布了音频",U),l(`[${U.userId}] audio available`),t(Yn.EVENT.REMOTE_AUDIO_AVAILABLE,U)}function b(U){console.log("远端停止发布了音频",U),l(`[${U.userId}] audio unavailable`),t(Yn.EVENT.REMOTE_AUDIO_UNAVAILABLE,U)}function w(){l("本地屏幕分享停止事件"),t(Yn.EVENT.SCREEN_SHARE_STOPPED)}function C(U){const{userId:Q,volume:X}=U;console.log("event",U),console.log(Q===""?`我的音量为: ${X}`:`用户: ${Q} 的音量为: ${X}`),t(Yn.EVENT.AUDIO_VOLUME,U)}function T(U){t(Yn.EVENT.NETWORK_QUALITY,U)}function I(U){console.log("自动播放失败:",U),t(Yn.EVENT.AUTOPLAY_FAILED,U)}function D(U){console.log("SDK 和腾讯云的连接状态变更事件:",U),t(Yn.EVENT.CONNECTION_STATE_CHANGED,U)}function k(U){console.log("音频播放状态变更事件:",`${U.userId} player is ${U.state} because of ${U.reason}`),t(Yn.EVENT.AUDIO_PLAY_STATE_CHANGED,U)}async function O(U){const{userId:Q,streamType:X,reason:le,state:ye}=U;console.log("视频播放状态变更事件:",`${Q} - ${X} video player is ${ye} because of ${le}`),t(Yn.EVENT.VIDEO_PLAY_STATE_CHANGED,U)}function L(U){console.log("摄像头、麦克风等设备变化的通知事件:",`${U.type}(${U.device.label}) ${U.action}`),t(Yn.EVENT.DEVICE_CHANGED,U)}function P(U){console.log("推流状态变更事件:",`${U.mediaType} ${U.state} ${U.reason}`),t(Yn.EVENT.PUBLISH_STATE_CHANGED,U)}function V(U){t(Yn.EVENT.STATISTICS,U)}function $(U){t(Yn.EVENT.SEI_MESSAGE,U)}function Y(U){t(Yn.EVENT.TRACK,U)}return{events:{[Yn.EVENT.ERROR]:u,[Yn.EVENT.KICKED_OUT]:d,[Yn.EVENT.REMOTE_USER_ENTER]:p,[Yn.EVENT.REMOTE_USER_EXIT]:h,[Yn.EVENT.REMOTE_VIDEO_AVAILABLE]:v,[Yn.EVENT.REMOTE_VIDEO_UNAVAILABLE]:_,[Yn.EVENT.REMOTE_AUDIO_UNAVAILABLE]:b,[Yn.EVENT.REMOTE_AUDIO_AVAILABLE]:y,[Yn.EVENT.SCREEN_SHARE_STOPPED]:w,[Yn.EVENT.AUDIO_VOLUME]:C,[Yn.EVENT.NETWORK_QUALITY]:T,[Yn.EVENT.AUTOPLAY_FAILED]:I,[Yn.EVENT.CONNECTION_STATE_CHANGED]:D,[Yn.EVENT.AUDIO_PLAY_STATE_CHANGED]:k,[Yn.EVENT.VIDEO_PLAY_STATE_CHANGED]:O,[Yn.EVENT.DEVICE_CHANGED]:L,[Yn.EVENT.PUBLISH_STATE_CHANGED]:P,[Yn.EVENT.STATISTICS]:V,[Yn.EVENT.SEI_MESSAGE]:$,[Yn.EVENT.TRACK]:Y},handleError:u,handleKickedOut:d,handleRemoteUserEnter:p,handleRemoteUserExit:h,handleRemoteVideoAvailable:v,handleRemoteVideoUnavailable:_,handleRemoteAudioUnavailable:b,handleRemoteAudioAvailable:y,handleScreenShareStopped:w,handleVolumeValue:C,handleNetworkQuality:T,handleAutoplayFailed:I,handleConnectStateChanged:D,handleAudioPlayStateChanged:k,handleVideoPlayStateChanged:O,handleDeviceChanged:L,handlePublishStateChanged:P,handleStatistics:V,handleSEIMessage:$,handleTrack:Y}}function Bet(e,t,n){let o=i.markRaw(Yn.create());const s=i.ref([]),l=i.ref("stopped"),u=i.ref(!1),d=i.ref(!1),p=i.ref("stopped"),h=i.ref("stopped"),{addSuccessLog:v,addFailedLog:_}=Yre(s),y=i.ref(!0),b=i.ref(!0),w=i.ref(!0),C=ne=>{if(!ne.result){y.value=!1;return}ne.detail&&(b.value=ne.detail.isScreenShareSupported,w.value=ne.detail.isSmallStreamSupported)};Yn.isSupported().then(C);const T=i.ref(!1),I=i.ref(!1),D=i.ref(!1),k=()=>{I.value=!I.value,I.value?V():P()},O=()=>{D.value=!D.value,D.value?Y():$()},L=async()=>{await ye(),T.value=!1,t(cV.USER_HANGINGUP)};async function P(){h.value="starting";try{await o.startLocalAudio({mute:!1,option:{microphoneId:n.audioDeviceId}}),h.value="started",v("Local audio started successfully")}catch(ne){h.value="stopped",_(`Local audio is failed to started. Error: ${ne.message}`)}}async function V(){if(h.value!=="started"){_("The audio has not been started");return}h.value="stopping";try{await o.stopLocalAudio(),h.value="stopped",v("Local audio stopped successfully")}catch(ne){h.value="started",_(`Local audio is failed to stopped. Error: ${ne.message}`)}}async function $(){p.value="starting";try{await o.startLocalVideo({view:"local",option:{cameraId:n.videoDeviceId,profile:"480p"}}),p.value="started",v("Local video started successfully")}catch(ne){p.value="stopped",_(`Local audio is failed to stopped. Error: ${ne.message}`)}}async function Y(){if(p.value!=="started"){_("The video has not been started");return}p.value="stopping";try{await o.stopLocalVideo(),p.value="stopped",v("Local video stopped successfully")}catch(ne){p.value="started",_(`Local video is failed to stopped. Error: ${ne.message}`)}}const F=async()=>{try{u.value?(await o.updateLocalAudio({mute:!1}),u.value=!1):(await o.updateLocalAudio({mute:!0}),u.value=!0),v(`Audio Muted: ${u.value}`)}catch(ne){console.log("error",ne),_(`Mute audio error: ${ne.message}`)}},U=async()=>{try{d.value?(await o.updateLocalVideo({mute:!1}),d.value=!1):(await o.updateLocalVideo({mute:!0}),d.value=!0),v(`Video Muted: ${d.value}`)}catch(ne){console.log("error==videoMuted",ne),_(`Mute video error: ${ne.message}`)}},{events:Q}=Let(o,t,n,s),X=(ne=!0)=>{let oe=ne?"on":"off";for(const Z in Q)o[oe](Z,Q[Z])};i.watch(()=>l.value,ne=>t("change-room-state",ne),{deep:!0,immediate:!0}),i.watch(()=>s.value,ne=>t("update-log",ne),{deep:!0,immediate:!0});async function le(){if(!(e.appId&&e.roomId&&e.userId)){Sa({message:"请检查参数 appId, userId, roomId 是否输入正确!",type:"error"});return}l.value="entering";try{await o.enterRoom({roomId:Number(e.roomId),sdkAppId:Number(e.appId),userId:e.userId,userSig:e.userSig}),l.value="entered",v(`[${e.userId}] enter room [${e.roomId}] success`),X(),await P(),await $(),T.value=!0}catch(ne){l.value="stopped",_(`Enter room ${e.roomId} failed. Error: ${ne.message}`)}}async function ye(){if(l.value!=="entered"){_("The room has not been entered");return}l.value="exiting";try{X(!1),await o.exitRoom(),await o.stopLocalVideo(),await o.stopLocalAudio(),l.value="exited",n.remoteUsersViews=[],v("Exit room success")}catch(ne){l.value="entered",_(`Exit room failed. Error: ${ne.message}`)}h.value==="started"&&V(),p.value==="started"&&Y(),n.remoteUsersViews=[]}return{trtc:o,logs:s,roomStatus:l,audioMuted:u,videoMuted:d,camStatus:p,micStatus:h,isSupported:y,isShowController:T,isMutedAudio:I,isHideVideo:D,handleAudioMute:k,handleVideoHide:O,handleHangUp:L,handleDestoryTrtc:()=>(o==null||o.destroy(),o=null),handleSwitch1v1Screen:()=>{if(l.value!=="entered")return;const ne=document.querySelector(".local-wrapper"),oe=Array.prototype.filter.call(ne.childNodes,W=>W.tagName==="DIV")[0],Z=document.querySelector(".remote"),J=Array.prototype.filter.call(Z.childNodes,W=>W.tagName==="DIV")[0];J&&(ne==null||ne.appendChild(J)),oe&&(Z==null||Z.appendChild(oe));const H=(J==null?void 0:J.id)!=="local";if(o.updateLocalVideo({view:"local",option:{small:H,profile:H?"240p_2":"1080p"}}),n.remoteUsersViews.length>0){const W=n.remoteUsersViews[0];o.updateRemoteVideo({view:W.userId,userId:W.userId,streamType:W.streamType,option:{small:!H}})}},getUserSig:()=>e.userSig||Vet(e.userId,{appid:e.appId,secretkey:e.secretKey}).userSig,handleEnter:le,handleExit:ye,handleStartLocalAudio:P,handleStopLocalAudio:V,handleStartLocalVideo:$,handleStopLocalVideo:Y,toggleAudio:F,toggleVideo:U}}const Fet={key:0,class:"trtc-container"},$et={class:"local-wrapper"},Uet=["id"],zet={class:"trtc-controller btns flex"},Het={class:"w-full flex items-center justify-around"},Wet={key:1},jet=i.defineComponent({__name:"bcTrtc",props:{appId:{},secretKey:{},userId:{},roomId:{},userSig:{},logLeave:{default:"WARN"}},emits:[Yn.EVENT.ERROR,Yn.EVENT.KICKED_OUT,Yn.EVENT.REMOTE_USER_ENTER,Yn.EVENT.REMOTE_USER_EXIT,Yn.EVENT.REMOTE_VIDEO_AVAILABLE,Yn.EVENT.REMOTE_VIDEO_UNAVAILABLE,Yn.EVENT.REMOTE_AUDIO_UNAVAILABLE,Yn.EVENT.REMOTE_AUDIO_AVAILABLE,Yn.EVENT.SCREEN_SHARE_STOPPED,Yn.EVENT.AUDIO_VOLUME,Yn.EVENT.NETWORK_QUALITY,Yn.EVENT.AUTOPLAY_FAILED,Yn.EVENT.CONNECTION_STATE_CHANGED,Yn.EVENT.AUDIO_PLAY_STATE_CHANGED,Yn.EVENT.VIDEO_PLAY_STATE_CHANGED,Yn.EVENT.DEVICE_CHANGED,Yn.EVENT.PUBLISH_STATE_CHANGED,Yn.EVENT.STATISTICS,Yn.EVENT.SEI_MESSAGE,Yn.EVENT.TRACK,"change-room-state","update-log",cV.USER_HANGINGUP],setup(e,{expose:t,emit:n}){const o=e,s=n;Yn.setLogLevel(sre[o.logLeave],!0);const l=i.reactive({audioDeviceId:"",videoDeviceId:"",remoteUsersViews:[]}),u=i.computed(()=>l.remoteUsersViews.length>1),{trtc:d,isSupported:p,isShowController:h,isMutedAudio:v,isHideVideo:_,logs:y,handleAudioMute:b,handleVideoHide:w,handleHangUp:C,handleDestoryTrtc:T,handleEnter:I,handleExit:D,handleSwitch1v1Screen:k,getUserSig:O}=Bet(o,s,l);return t({trtc:d,logs:y,handleDestoryTrtc:T,handleHangUp:C,handleEnter:I,handleExit:D,handleVideoHide:w,handleAudioMute:b,getUserSig:O}),(L,P)=>{const V=i.resolveComponent("bc-icon");return i.unref(p)?(i.openBlock(),i.createElementBlock("div",Fet,[i.createElementVNode("div",{class:i.normalizeClass(["trtc-communicate-wrapper",`trtc-${u.value?"group":"single"}`])},[i.createElementVNode("div",$et,[i.renderSlot(L.$slots,"video-main",{},()=>[P[4]||(P[4]=i.createElementVNode("div",{class:"local-user",id:"local"},null,-1))],!0)]),l.remoteUsersViews.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"remote-box",class:"remote flex flex-wrap",onClick:P[0]||(P[0]=$=>u.value?null:i.unref(k)())},[i.renderSlot(L.$slots,"video-sub",{list:l.remoteUsersViews},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.remoteUsersViews,$=>(i.openBlock(),i.createElementBlock("div",{class:"remote-user",id:$.userId,key:$.userId},null,8,Uet))),128))],!0)])):i.createCommentVNode("",!0)],2),i.unref(h)?i.renderSlot(L.$slots,"controller",{key:0,isMutedAudio:i.unref(v),isHideVideo:i.unref(_)},()=>[i.createElementVNode("div",zet,[i.createElementVNode("div",Het,[i.createElementVNode("div",{class:i.normalizeClass(["icon-box rounded-full",i.unref(v)?" bg-zinc-400/80":" bg-stone-50"]),onClick:P[1]||(P[1]=(...$)=>i.unref(b)&&i.unref(b)(...$))},[i.createVNode(V,{name:i.unref(v)?"ele-Mute":"ele-Microphone",color:i.unref(v)?"#fff":"#333",size:20},null,8,["name","color"])],2),i.createElementVNode("div",{class:"icon-box bg-red-500",onClick:P[2]||(P[2]=(...$)=>i.unref(C)&&i.unref(C)(...$))},[i.createVNode(V,{name:"ele-PhoneFilled",color:"#fff",size:20})]),i.createElementVNode("div",{class:i.normalizeClass(["icon-box flex-items-center justify-center rounded-full",i.unref(_)?" bg-zinc-400/80":" bg-stone-50"]),onClick:P[3]||(P[3]=(...$)=>i.unref(w)&&i.unref(w)(...$))},[i.createVNode(V,{name:i.unref(_)?"ele-VideoPlay":"ele-VideoCamera",color:i.unref(_)?"#fff":"#333",size:20},null,8,["name","color"])],2)])])],!0):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",Wet,"该浏览器暂不支持音视频通话,请更换浏览器。"))}}});var Bf=(e=>(e[e.TEXT=1]="TEXT",e[e.DATE=2]="DATE",e[e.NUMBER=3]="NUMBER",e[e.SELECT_R=4]="SELECT_R",e[e.SELECT_M=5]="SELECT_M",e[e.SELECT_T=6]="SELECT_T",e))(Bf||{}),Kre=(e=>(e[e.INPUT=1]="INPUT",e[e.FIXED=2]="FIXED",e[e.DICT_CODE=3]="DICT_CODE",e[e.DICT_NAME=4]="DICT_NAME",e[e.API=5]="API",e))(Kre||{}),Xre=(e=>(e[e.WEI_DU=1]="WEI_DU",e[e.ZHI_BIAO=2]="ZHI_BIAO",e[e.Z_WEI_DU=3]="Z_WEI_DU",e[e.SHAI_XUAN=4]="SHAI_XUAN",e))(Xre||{}),Qu=(e=>(e.NONE="",e.SUM="sum",e.MAX="max",e.MIN="min",e.AVERAGE="average",e.COUNT="count",e.COUNTDISTINCT="countdistinct",e))(Qu||{}),oS=(e=>(e[e.NONE=0]="NONE",e[e.RATE=1]="RATE",e))(oS||{}),aS=(e=>(e[e.NONE=0]="NONE",e[e.STATISTICS=1]="STATISTICS",e))(aS||{}),cy=(e=>(e[e.NONE=0]="NONE",e[e.ASC=1]="ASC",e[e.DESC=2]="DESC",e))(cy||{}),sS=(e=>(e[e.NONE=0]="NONE",e[e.SUM=1]="SUM",e))(sS||{}),lS=(e=>(e[e.HIDE=1]="HIDE",e[e.SHOW=0]="SHOW",e))(lS||{}),Ta=(e=>(e[e.COLLECT=0]="COLLECT",e[e.CALC=1]="CALC",e[e.EDIT_NAME=2]="EDIT_NAME",e[e.SORT=3]="SORT",e[e.POINT=4]="POINT",e[e.SUM=5]="SUM",e[e.SHOW=6]="SHOW",e[e.STATISTICS=7]="STATISTICS",e))(Ta||{}),cS=(e=>(e[e.COLUMN=0]="COLUMN",e[e.FILTER=1]="FILTER",e))(cS||{}),uS=(e=>(e.AND="AND",e.OR="OR",e))(uS||{});const Get={[Bf.TEXT]:"string",[Bf.NUMBER]:"number",[Bf.DATE]:"date",[Bf.SELECT_R]:"radio_▼",[Bf.SELECT_M]:"multiple_▼",[Bf.SELECT_T]:"tree_▼"};function qet(e){return Get[e]}const Yet=i.ref(""),Ket=[{label:"列配置",value:cS.COLUMN},{label:"检索配置",value:cS.FILTER}],Jre=[{label:"无",value:Qu.NONE},{label:"求和",value:Qu.SUM},{label:"平均",value:Qu.AVERAGE},{label:"最大值",value:Qu.MAX},{label:"最小值",value:Qu.MIN},{label:"计数",value:Qu.COUNT},{label:"去重计数",value:Qu.COUNTDISTINCT}],Zre=[{label:"无",value:oS.NONE},{label:"占比",value:oS.RATE}],xV=[{label:"无",value:cy.NONE},{label:"升序",value:cy.ASC},{label:"降序",value:cy.DESC}],EV=[{label:"无",value:sS.NONE},{label:"合计",value:sS.SUM}],wV=[{label:"隐藏",value:lS.HIDE},{label:"显示",value:lS.SHOW}],Qre=[{label:"不统计",value:aS.NONE},{label:"统计",value:aS.STATISTICS}],Xet=[{label:"AND",value:uS.AND},{label:"OR",value:uS.OR}],Jet=[{label:"排序方式",value:Ta.SORT,children:xV},{label:"显示名称",value:Ta.EDIT_NAME},{label:"是否隐藏",value:Ta.SHOW,children:wV},{label:"分组统计",value:Ta.STATISTICS,children:Qre},{label:"底部合计",value:Ta.SUM,children:EV},{label:"小数位数",value:Ta.POINT}],Zet=[{label:"显示名称",value:Ta.EDIT_NAME}],Qet=[{label:"汇总方式",value:Ta.COLLECT,children:Jre},{label:"占比计算",value:Ta.CALC,children:Zre},{label:"排序方式",value:Ta.SORT,children:xV},{label:"显示名称",value:Ta.EDIT_NAME},{label:"小数位数",value:Ta.POINT},{label:"底部合计",value:Ta.SUM,children:EV},{label:"是否隐藏",value:Ta.SHOW,children:wV}];exports.BScroll=fZe;exports.CHANGE_EVENT=o6e;exports.CUSTOME_GROUP_TIP=zT;exports.Clipboard=oXe;exports.CloseComponents=mX;exports.CryptoJS=jHe;exports.CurrentRoute=Z7;exports.CurrentRouter=Q7;exports.CustomeMethods=UM;exports.CustomeStore=YKe;exports.DomZIndex=WS;exports.EVENT_CODE=Zf;exports.ElBadge=KX;exports.ElButton=tJ;exports.ElButtonGroup=Sbe;exports.ElConfigProvider=zX;exports.ElFocusTrap=YX;exports.ElIcon=Os;exports.ElInput=jX;exports.ElLoading=Pbe;exports.ElMessage=Sa;exports.ElMessageBox=lg;exports.ElOverlay=nJ;exports.FIELD_DATA_TYPE=Xre;exports.FIELD_GROUP=aS;exports.FIELD_RATE=oS;exports.FIELD_SHOW=lS;exports.FIELD_SORT=cy;exports.FIELD_SUM=sS;exports.FIELD_TYPE=Bf;exports.FIELD_WAY=Qu;exports.FOCUS_TRAP_INJECTION_KEY=GX;exports.FORCE_UPDATE_LIST=zne;exports.HsMessage=Vc;exports.HsMessageBox=Y8;exports.HsNotification=Vne;exports.INPUT_EVENT=a6e;exports.IS_DEV=u2;exports.ListCache=Bp;exports.Local=Tp;exports.Map=gK;exports.MapCache=dh;exports.Md5=To;exports.NEXT_NAME=Vs;exports.NODE_RELATION=uS;exports.NOOP=sg;exports.POPUP_TYPE=Ta;exports.PatchFlags=N4;exports.QUERY_GROUP_TIP=X8;exports.QUERY_WAY=Kre;exports.REGEXP_STRING=iV;exports.SEGMENTED=cS;exports.SYSTEM_PARAMS=K8;exports.Session=GKe;exports.Symbol=fd;exports.TinyColor=QX;exports.TypeComponents=gP;exports.TypeComponentsMap=Mp;exports.UPDATE_MODEL_EVENT=S8;exports.ValidateComponentsMap=vX;exports.VxeInput=Hy;exports.VxeModal=n2;exports.VxeNumberInput=jy;exports.VxeUI=bt;exports.VxeUIExport=pBe;exports.XEUtils=N;exports._=$t;exports._export_sfc=Kc;exports._export_sfc$1=p7;exports._sfc_main=hZe;exports._sfc_main$1=jet;exports.add=lHe;exports.addClass=w8;exports.addUnit=Ig;exports.addUrlParams=yne;exports.animateScrollTo=Q0e;exports.arrayMap=oK;exports.arrayPush=_K;exports.arrow_down_bold_default=DK;exports.arrow_down_default=NK;exports.arrow_left_default=RK;exports.arrow_right_default=OK;exports.arrow_up_bold_default=MK;exports.arrow_up_default=PK;exports.assignValue=fK;exports.axiosInterceptors=UKe;exports.back_default=VK;exports.baseAssignValue=dK;exports.baseFlatten=dP;exports.baseGet=cP;exports.baseGetTag=hS;exports.buildProp=vP;exports.buildProps=Zl;exports.buttonTypes=JX;exports.cAF=CK;exports.cacheInitSearchFormData=_Je;exports.cacheSearchFormData=zc;exports.calendar_default=LK;exports.capitalize=ghe;exports.caret_right_default=BK;exports.caret_top_default=FK;exports.castPath=Ny;exports.check_default=$K;exports.circle_check_default=pP;exports.circle_check_filled_default=UK;exports.circle_close_default=SS;exports.circle_close_filled_default=wS;exports.clearAllIndexDB=JKe;exports.clock_default=zK;exports.close_default=CS;exports.columnsList=Jet;exports.commonjsGlobal=ir;exports.componentSizes=_P;exports.componentTipList=xJe;exports.computedEager=Afe;exports.configStore=hr;exports.configStore$1=Zo;exports.configUnidId=Rs;exports.convertCurrency=pHe;exports.d_arrow_left_default=HK;exports.d_arrow_right_default=WK;exports.debugWarn=Ha;exports.decimalDigits=Jy;exports.deepClone=Rne;exports.defaultNamespace=R4;exports.definePropType=ko;exports.delete_default=jK;exports.div=dHe;exports.document_default=GK;exports.elSvg=Ine;exports.encryptionTool=jKe;exports.entriesOf=q0e;exports.eq=sP;exports.fetchTableData=aV;exports.fieldGroup=Qre;exports.fieldRate=Zre;exports.fieldShow=wV;exports.fieldSort=xV;exports.fieldSum=EV;exports.fieldWay=Jre;exports.fixedNumAccuracy=B7;exports.flatRest=bK;exports.flattedChildren=lw;exports.flatten=yK;exports.focusNode=xfe;exports.formContextKey=NS;exports.formItemContextKey=EP;exports.freeGlobal=rK;exports.fromPairs=fP;exports.full_screen_default=qK;exports.get=uP;exports.getAuthFieldsByMid=nXe;exports.getColumnWidthConfig=XKe;exports.getConfig=eV;exports.getDataDictListByMid=tXe;exports.getDataType=aXe;exports.getDefaultExportFromCjs=fh;exports.getDictListByMid=eXe;exports.getFieldType=qet;exports.getForceUpdateList=Kne;exports.getFormData=kJe;exports.getFormDataType=Sne;exports.getLoadData=IJe;exports.getNative=vS;exports.getNormalizedProps=u6e;exports.getNumbers=fHe;exports.getOrderQueryData=Jne;exports.getProp=Y0e;exports.getRender=Wne;exports.getRenderComponent=jne;exports.getScrollBarWidth=AK;exports.getScrollContainer=J0e;exports.getScrollElement=epe;exports.getScrollTop=tpe;exports.getSearchForm=Gne;exports.getSearchParams=Yne;exports.getShowQueryData=DJe;exports.getSibling=bfe;exports.getStoreSystemParams=QKe;exports.getStyle=Ff;exports.getSystemParams=ZKe;exports.getTableCacheData=Xne;exports.getTableDataType=Cne;exports.getUrlParams=Qo;exports.globalComponentSize=Nne;exports.handleEmpty=Mne;exports.handleOpenLink=Pne;exports.hasClass=QO;exports.hasIn=xK;exports.hasOwn=Cg;exports.hideFieldData=$ne;exports.hooks=Pn;exports.hoverItem=Yet;exports.iconPropType=Op;exports.identity=sK;exports.iframeMessage=HKe;exports.indicatorList=Qet;exports.info_filled_default=TS;exports.inputProps=WX;exports.isArguments=lP;exports.isArray=D4;exports.isArray$1=jg;exports.isBoolean=JO;exports.isClient=Qi;exports.isDate=che;exports.isElement=Rp;exports.isEmpty=W0e;exports.isFirefox=tK;exports.isFragment=bX;exports.isFunction=us;exports.isFunction$1=lK;exports.isIOS=ZY;exports.isIndex=aP;exports.isKey=vK;exports.isLeaf=JY;exports.isLegalNumber=gte;exports.isLength=pK;exports.isMobile=One;exports.isNil=xS;exports.isNumber=Gc;exports.isObject=jc;exports.isObject$1=uy;exports.isObjectLike=pS;exports.isPlainObject=hhe;exports.isPromise=uhe;exports.isPropAbsent=j0e;exports.isRefreshData=zg;exports.isShowAuth=Une;exports.isShowError=yJe;exports.isShowItem=oV;exports.isString=za;exports.isSymbol=mS;exports.isToNumber=F7;exports.isUndefined=hP;exports.isValidComponentSize=yX;exports.isValidElementNode=c6e;exports.isWindow=ES;exports.jsonStringify=wJe;exports.keysOf=ZO;exports.lazyImg=Dne;exports.loading_default=kg;exports.location_default=KK;exports.mathTool=hHe;exports.memoize=yS;exports.message=RXe;exports.messageBox=OXe;exports.minus_default=XK;exports.mittBus=h8;exports.more_default=ZK;exports.more_filled_default=JK;exports.mutable=yP;exports.notification=MXe;exports.numberToChinese=mHe;exports.onClickOutside=KXe;exports.onClickOutside$1=$fe;exports.onKeyStroke=fJe;exports.onKeyStroke$1=FM;exports.onTableKey=RJe;exports.operation_default=QK;exports.other=NXe;exports.overRest=hK;exports.pick=wK;exports.picture_filled_default=eX;exports.plus_default=tX;exports.popupPlugin=hJe;exports.push=zKe;exports.querysList=Zet;exports.question_filled_default=nX;exports.rAF=SK;exports.refDebounced=Lfe;exports.refresh_left_default=rX;exports.refresh_right_default=iX;exports.relationList=Xet;exports.reloadCountTableData=TJe;exports.removeClass=Tg;exports.removeConfig=KKe;exports.request=Pi;exports.request$1=c2;exports.root=fS;exports.scale_to_original_default=oX;exports.screenfull=rXe;exports.scrollIntoView=Z0e;exports.search_default=aX;exports.segmentedList=Ket;exports.setColumnWidthConfig=xne;exports.setConfig=tV;exports.setLocalSystemParams=Ene;exports.setTableCacheData=AJe;exports.setTagsViewNameI18n=Ane;exports.setToString=uK;exports.showPopup=Fne;exports.showPopupCount=Ey;exports.sort_down_default=sX;exports.sort_up_default=lX;exports.specialType=bJe;exports.star_default=uX;exports.star_filled_default=cX;exports.sub=cHe;exports.systemStore=Mr;exports.tableAsyncFun=Ds;exports.tableBeforeAsyncFun=zM;exports.tableCancheData=Hne;exports.tableIndex=NJe;exports.throwError=IK;exports.times=uHe;exports.toKey=bS;exports.toRawType=fhe;exports.toSource=cK;exports.triggerEvent=yfe;exports.tryOnScopeDispose=Dy;exports.unrefElement=zl;exports.useActiveElement=QXe;exports.useActiveElement$1=Ufe;exports.useAriaProps=FX;exports.useAttrs=xX;exports.useAuth=WZe;exports.useAuth$1=YZe;exports.useComposition=VX;exports.useCssVar=Hfe;exports.useDeprecated=EX;exports.useDevicesList=nJe;exports.useDocumentVisibility=Wfe;exports.useDraggable=wX;exports.useElementBounding=Yfe;exports.useElementSize=oJe;exports.useEmptyValues=C6e;exports.useEmptyValuesProps=BX;exports.useEventListener=Io;exports.useFocusController=PX;exports.useFormDisabled=RS;exports.useFormItem=SP;exports.useFormItemInputId=HX;exports.useFormSize=wP;exports.useGetDerivedNamespace=bP;exports.useGlobalConfig=AS;exports.useGlobalSize=MX;exports.useId=C8;exports.useIdInjection=AX;exports.useLocale=CX;exports.useLockscreen=IX;exports.useMittBus=lXe;exports.useMouseInElement=lJe;exports.useMousePressed=cJe;exports.useMutationObserver=Zfe;exports.useNamespace=Kl;exports.useRequest=WKe;exports.useResizeObserver=dS;exports.useSameTarget=xP;exports.useSizeProp=kS;exports.useThrottleFn=Bfe;exports.useTimeoutFn=rP;exports.useTitle=kne;exports.useUserMedia=uJe;exports.useVModel=ihe;exports.useWindowFocus=ohe;exports.useWindowSize=dJe;exports.useWindowSize$1=ahe;exports.useZIndex=RX;exports.verifiyNumberInteger=dXe;exports.verifyAccount=bXe;exports.verifyAndSpace=pXe;exports.verifyCarNum=AXe;exports.verifyCnAndSpace=fXe;exports.verifyEmail=CXe;exports.verifyEnAndSpace=hXe;exports.verifyFullName=IXe;exports.verifyIPAddress=SXe;exports.verifyIdCard=TXe;exports.verifyNumberCnUppercase=gXe;exports.verifyNumberComma=mXe;exports.verifyNumberIntegerAndFloat=nV;exports.verifyNumberPercentage=cXe;exports.verifyNumberPercentageFloat=uXe;exports.verifyPassword=xXe;exports.verifyPasswordPowerful=EXe;exports.verifyPasswordStrength=wXe;exports.verifyPhone=_Xe;exports.verifyPostalCode=kXe;exports.verifyTelPhone=yXe;exports.verifyTextColor=vXe;exports.verifyUrl=Tne;exports.warning_filled_default=IS;exports.watchOnce=qXe;exports.withInstall=Gg;exports.withInstallDirective=i6e;exports.withNoopInstall=_X;exports.zhCn=aJ;exports.zoom_in_default=fX;exports.zoom_out_default=hX;
273
+ `);let u=Uq.HmacSHA256(l,this.PRIVATEKEY);return Uq.enc.Base64.stringify(u)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,o){let s=this._utc(),l={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":s,"TLS.expire":n},u="";if(o!=null){let v=this.base64encode(o);l["TLS.userbuf"]=v,u=this._hmacsha256(t,s,n,v)}else u=this._hmacsha256(t,s,n,null);l["TLS.sig"]=u;let d=JSON.stringify(l),p=KY.deflateSync(this.newBuffer(d)).toString("base64"),h=this.escape(p);return console.log("ret="+h),h}validate(t){let n=this.decode(t),o=KY.inflateSync(n);console.log("validate ret="+o)}}const XY=1400829659,Pet=604800,Vet="b838ac1178ea1bff2ab8ea72291a2c63709a1b4e2cce2afecc918f12c4912ac3";function Let(e,t){const n=(t==null?void 0:t.appid)??XY,o=(t==null?void 0:t.secretkey)??Vet,l=new Met(n,o,Pet).genTestUserSig(e);return{SDKAppID:XY,userSig:l}}function Yre(e){const t=(o,s)=>{e.value.push({type:o,content:s})};return{addSuccessLog:o=>t("success",o),addFailedLog:o=>t("failed",o),addInfoLog:o=>t("info",o),clearLog:()=>{e.value=[]}}}function Bet(e,t,n,o){const{addFailedLog:s,addSuccessLog:l}=Yre(o);function u(U){s(`Local error: ${U.message}`),t(Yn.EVENT.ERROR,U)}function d(U){s(`User has been kicked out for ${U.reason}`),t(Yn.EVENT.KICKED_OUT,U)}function p(U){const{userId:Q}=U;console.log(`远端用户: [${Q}] 进入房间`),n.remoteUsersViews.push({userId:Q,streamType:"main"}),l(`Remote User [${Q}] entered`),t(Yn.EVENT.REMOTE_USER_ENTER,U)}function h(U){let Q=n.remoteUsersViews.findIndex(X=>X.userId==U.userId);n.remoteUsersViews.splice(Q,1),l(`远端用户: [${U.userId}] 退房事件`),t(Yn.EVENT.REMOTE_USER_EXIT,U)}async function v(U){console.log("%c handleRemoteVideoAvailable >>>","background: blue; color: #fff",U);const{userId:Q,streamType:X}=U;try{await i.nextTick(),e.startRemoteVideo({view:Q,userId:Q,streamType:X,option:{small:!0,receiveWhenViewVisible:!0,viewRoot:document.getElementById("remote-box")}}),l(`Play remote video success: [${Q}]`),t(Yn.EVENT.REMOTE_VIDEO_AVAILABLE,U)}catch(le){s(`Play remote video failed: [${Q}], error: ${le.message}`)}}function _(U){console.log("远端用户停止发布视频",U);const{streamType:Q,userId:X}=U;l(`[${X}] [${Q}] video unavailable`),e.stopRemoteVideo({userId:X,streamType:Q}),t(Yn.EVENT.REMOTE_VIDEO_UNAVAILABLE,U)}function y(U){console.log("远端用户发布了音频",U),l(`[${U.userId}] audio available`),t(Yn.EVENT.REMOTE_AUDIO_AVAILABLE,U)}function b(U){console.log("远端停止发布了音频",U),l(`[${U.userId}] audio unavailable`),t(Yn.EVENT.REMOTE_AUDIO_UNAVAILABLE,U)}function w(){l("本地屏幕分享停止事件"),t(Yn.EVENT.SCREEN_SHARE_STOPPED)}function C(U){const{userId:Q,volume:X}=U;console.log("event",U),console.log(Q===""?`我的音量为: ${X}`:`用户: ${Q} 的音量为: ${X}`),t(Yn.EVENT.AUDIO_VOLUME,U)}function T(U){t(Yn.EVENT.NETWORK_QUALITY,U)}function I(U){console.log("自动播放失败:",U),t(Yn.EVENT.AUTOPLAY_FAILED,U)}function D(U){console.log("SDK 和腾讯云的连接状态变更事件:",U),t(Yn.EVENT.CONNECTION_STATE_CHANGED,U)}function k(U){console.log("音频播放状态变更事件:",`${U.userId} player is ${U.state} because of ${U.reason}`),t(Yn.EVENT.AUDIO_PLAY_STATE_CHANGED,U)}async function O(U){const{userId:Q,streamType:X,reason:le,state:ye}=U;console.log("视频播放状态变更事件:",`${Q} - ${X} video player is ${ye} because of ${le}`),t(Yn.EVENT.VIDEO_PLAY_STATE_CHANGED,U)}function L(U){console.log("摄像头、麦克风等设备变化的通知事件:",`${U.type}(${U.device.label}) ${U.action}`),t(Yn.EVENT.DEVICE_CHANGED,U)}function P(U){console.log("推流状态变更事件:",`${U.mediaType} ${U.state} ${U.reason}`),t(Yn.EVENT.PUBLISH_STATE_CHANGED,U)}function V(U){t(Yn.EVENT.STATISTICS,U)}function $(U){t(Yn.EVENT.SEI_MESSAGE,U)}function Y(U){t(Yn.EVENT.TRACK,U)}return{events:{[Yn.EVENT.ERROR]:u,[Yn.EVENT.KICKED_OUT]:d,[Yn.EVENT.REMOTE_USER_ENTER]:p,[Yn.EVENT.REMOTE_USER_EXIT]:h,[Yn.EVENT.REMOTE_VIDEO_AVAILABLE]:v,[Yn.EVENT.REMOTE_VIDEO_UNAVAILABLE]:_,[Yn.EVENT.REMOTE_AUDIO_UNAVAILABLE]:b,[Yn.EVENT.REMOTE_AUDIO_AVAILABLE]:y,[Yn.EVENT.SCREEN_SHARE_STOPPED]:w,[Yn.EVENT.AUDIO_VOLUME]:C,[Yn.EVENT.NETWORK_QUALITY]:T,[Yn.EVENT.AUTOPLAY_FAILED]:I,[Yn.EVENT.CONNECTION_STATE_CHANGED]:D,[Yn.EVENT.AUDIO_PLAY_STATE_CHANGED]:k,[Yn.EVENT.VIDEO_PLAY_STATE_CHANGED]:O,[Yn.EVENT.DEVICE_CHANGED]:L,[Yn.EVENT.PUBLISH_STATE_CHANGED]:P,[Yn.EVENT.STATISTICS]:V,[Yn.EVENT.SEI_MESSAGE]:$,[Yn.EVENT.TRACK]:Y},handleError:u,handleKickedOut:d,handleRemoteUserEnter:p,handleRemoteUserExit:h,handleRemoteVideoAvailable:v,handleRemoteVideoUnavailable:_,handleRemoteAudioUnavailable:b,handleRemoteAudioAvailable:y,handleScreenShareStopped:w,handleVolumeValue:C,handleNetworkQuality:T,handleAutoplayFailed:I,handleConnectStateChanged:D,handleAudioPlayStateChanged:k,handleVideoPlayStateChanged:O,handleDeviceChanged:L,handlePublishStateChanged:P,handleStatistics:V,handleSEIMessage:$,handleTrack:Y}}function Fet(e,t,n){let o=i.markRaw(Yn.create());const s=i.ref([]),l=i.ref("stopped"),u=i.ref(!1),d=i.ref(!1),p=i.ref("stopped"),h=i.ref("stopped"),{addSuccessLog:v,addFailedLog:_}=Yre(s),y=i.ref(!0),b=i.ref(!0),w=i.ref(!0),C=ne=>{if(!ne.result){y.value=!1;return}ne.detail&&(b.value=ne.detail.isScreenShareSupported,w.value=ne.detail.isSmallStreamSupported)};Yn.isSupported().then(C);const T=i.ref(!1),I=i.ref(!1),D=i.ref(!1),k=()=>{I.value=!I.value,I.value?V():P()},O=()=>{D.value=!D.value,D.value?Y():$()},L=async()=>{await ye(),T.value=!1,t(cV.USER_HANGINGUP)};async function P(){h.value="starting";try{await o.startLocalAudio({mute:!1,option:{microphoneId:n.audioDeviceId}}),h.value="started",v("Local audio started successfully")}catch(ne){h.value="stopped",_(`Local audio is failed to started. Error: ${ne.message}`)}}async function V(){if(h.value!=="started"){_("The audio has not been started");return}h.value="stopping";try{await o.stopLocalAudio(),h.value="stopped",v("Local audio stopped successfully")}catch(ne){h.value="started",_(`Local audio is failed to stopped. Error: ${ne.message}`)}}async function $(){p.value="starting";try{await o.startLocalVideo({view:"local",option:{cameraId:n.videoDeviceId,profile:"480p"}}),p.value="started",v("Local video started successfully")}catch(ne){p.value="stopped",_(`Local audio is failed to stopped. Error: ${ne.message}`)}}async function Y(){if(p.value!=="started"){_("The video has not been started");return}p.value="stopping";try{await o.stopLocalVideo(),p.value="stopped",v("Local video stopped successfully")}catch(ne){p.value="started",_(`Local video is failed to stopped. Error: ${ne.message}`)}}const F=async()=>{try{u.value?(await o.updateLocalAudio({mute:!1}),u.value=!1):(await o.updateLocalAudio({mute:!0}),u.value=!0),v(`Audio Muted: ${u.value}`)}catch(ne){console.log("error",ne),_(`Mute audio error: ${ne.message}`)}},U=async()=>{try{d.value?(await o.updateLocalVideo({mute:!1}),d.value=!1):(await o.updateLocalVideo({mute:!0}),d.value=!0),v(`Video Muted: ${d.value}`)}catch(ne){console.log("error==videoMuted",ne),_(`Mute video error: ${ne.message}`)}},{events:Q}=Bet(o,t,n,s),X=(ne=!0)=>{let oe=ne?"on":"off";for(const Z in Q)o[oe](Z,Q[Z])};i.watch(()=>l.value,ne=>t("change-room-state",ne),{deep:!0,immediate:!0}),i.watch(()=>s.value,ne=>t("update-log",ne),{deep:!0,immediate:!0});async function le(){if(!(e.appId&&e.roomId&&e.userId)){Sa({message:"请检查参数 appId, userId, roomId 是否输入正确!",type:"error"});return}l.value="entering";try{await o.enterRoom({roomId:Number(e.roomId),sdkAppId:Number(e.appId),userId:e.userId,userSig:e.userSig}),l.value="entered",v(`[${e.userId}] enter room [${e.roomId}] success`),X(),await P(),await $(),T.value=!0}catch(ne){l.value="stopped",_(`Enter room ${e.roomId} failed. Error: ${ne.message}`)}}async function ye(){if(l.value!=="entered"){_("The room has not been entered");return}l.value="exiting";try{X(!1),await o.exitRoom(),await o.stopLocalVideo(),await o.stopLocalAudio(),l.value="exited",n.remoteUsersViews=[],v("Exit room success")}catch(ne){l.value="entered",_(`Exit room failed. Error: ${ne.message}`)}h.value==="started"&&V(),p.value==="started"&&Y(),n.remoteUsersViews=[]}return{trtc:o,logs:s,roomStatus:l,audioMuted:u,videoMuted:d,camStatus:p,micStatus:h,isSupported:y,isShowController:T,isMutedAudio:I,isHideVideo:D,handleAudioMute:k,handleVideoHide:O,handleHangUp:L,handleDestoryTrtc:()=>(o==null||o.destroy(),o=null),handleSwitch1v1Screen:()=>{if(l.value!=="entered")return;const ne=document.querySelector(".local-wrapper"),oe=Array.prototype.filter.call(ne.childNodes,W=>W.tagName==="DIV")[0],Z=document.querySelector(".remote"),J=Array.prototype.filter.call(Z.childNodes,W=>W.tagName==="DIV")[0];J&&(ne==null||ne.appendChild(J)),oe&&(Z==null||Z.appendChild(oe));const H=(J==null?void 0:J.id)!=="local";if(o.updateLocalVideo({view:"local",option:{small:H,profile:H?"240p_2":"1080p"}}),n.remoteUsersViews.length>0){const W=n.remoteUsersViews[0];o.updateRemoteVideo({view:W.userId,userId:W.userId,streamType:W.streamType,option:{small:!H}})}},getUserSig:()=>e.userSig||Let(e.userId,{appid:e.appId,secretkey:e.secretKey}).userSig,handleEnter:le,handleExit:ye,handleStartLocalAudio:P,handleStopLocalAudio:V,handleStartLocalVideo:$,handleStopLocalVideo:Y,toggleAudio:F,toggleVideo:U}}const $et={key:0,class:"trtc-container"},Uet={class:"local-wrapper"},zet=["id"],Het={class:"trtc-controller btns flex"},Wet={class:"w-full flex items-center justify-around"},jet={key:1},Get=i.defineComponent({__name:"bcTrtc",props:{appId:{},secretKey:{},userId:{},roomId:{},userSig:{},logLeave:{default:"WARN"}},emits:[Yn.EVENT.ERROR,Yn.EVENT.KICKED_OUT,Yn.EVENT.REMOTE_USER_ENTER,Yn.EVENT.REMOTE_USER_EXIT,Yn.EVENT.REMOTE_VIDEO_AVAILABLE,Yn.EVENT.REMOTE_VIDEO_UNAVAILABLE,Yn.EVENT.REMOTE_AUDIO_UNAVAILABLE,Yn.EVENT.REMOTE_AUDIO_AVAILABLE,Yn.EVENT.SCREEN_SHARE_STOPPED,Yn.EVENT.AUDIO_VOLUME,Yn.EVENT.NETWORK_QUALITY,Yn.EVENT.AUTOPLAY_FAILED,Yn.EVENT.CONNECTION_STATE_CHANGED,Yn.EVENT.AUDIO_PLAY_STATE_CHANGED,Yn.EVENT.VIDEO_PLAY_STATE_CHANGED,Yn.EVENT.DEVICE_CHANGED,Yn.EVENT.PUBLISH_STATE_CHANGED,Yn.EVENT.STATISTICS,Yn.EVENT.SEI_MESSAGE,Yn.EVENT.TRACK,"change-room-state","update-log",cV.USER_HANGINGUP],setup(e,{expose:t,emit:n}){const o=e,s=n;Yn.setLogLevel(sre[o.logLeave],!0);const l=i.reactive({audioDeviceId:"",videoDeviceId:"",remoteUsersViews:[]}),u=i.computed(()=>l.remoteUsersViews.length>1),{trtc:d,isSupported:p,isShowController:h,isMutedAudio:v,isHideVideo:_,logs:y,handleAudioMute:b,handleVideoHide:w,handleHangUp:C,handleDestoryTrtc:T,handleEnter:I,handleExit:D,handleSwitch1v1Screen:k,getUserSig:O}=Fet(o,s,l);return t({trtc:d,logs:y,handleDestoryTrtc:T,handleHangUp:C,handleEnter:I,handleExit:D,handleVideoHide:w,handleAudioMute:b,getUserSig:O}),(L,P)=>{const V=i.resolveComponent("bc-icon");return i.unref(p)?(i.openBlock(),i.createElementBlock("div",$et,[i.createElementVNode("div",{class:i.normalizeClass(["trtc-communicate-wrapper",`trtc-${u.value?"group":"single"}`])},[i.createElementVNode("div",Uet,[i.renderSlot(L.$slots,"video-main",{},()=>[P[4]||(P[4]=i.createElementVNode("div",{class:"local-user",id:"local"},null,-1))],!0)]),l.remoteUsersViews.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"remote-box",class:"remote flex flex-wrap",onClick:P[0]||(P[0]=$=>u.value?null:i.unref(k)())},[i.renderSlot(L.$slots,"video-sub",{list:l.remoteUsersViews},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.remoteUsersViews,$=>(i.openBlock(),i.createElementBlock("div",{class:"remote-user",id:$.userId,key:$.userId},null,8,zet))),128))],!0)])):i.createCommentVNode("",!0)],2),i.unref(h)?i.renderSlot(L.$slots,"controller",{key:0,isMutedAudio:i.unref(v),isHideVideo:i.unref(_)},()=>[i.createElementVNode("div",Het,[i.createElementVNode("div",Wet,[i.createElementVNode("div",{class:i.normalizeClass(["icon-box rounded-full",i.unref(v)?" bg-zinc-400/80":" bg-stone-50"]),onClick:P[1]||(P[1]=(...$)=>i.unref(b)&&i.unref(b)(...$))},[i.createVNode(V,{name:i.unref(v)?"ele-Mute":"ele-Microphone",color:i.unref(v)?"#fff":"#333",size:20},null,8,["name","color"])],2),i.createElementVNode("div",{class:"icon-box bg-red-500",onClick:P[2]||(P[2]=(...$)=>i.unref(C)&&i.unref(C)(...$))},[i.createVNode(V,{name:"ele-PhoneFilled",color:"#fff",size:20})]),i.createElementVNode("div",{class:i.normalizeClass(["icon-box flex-items-center justify-center rounded-full",i.unref(_)?" bg-zinc-400/80":" bg-stone-50"]),onClick:P[3]||(P[3]=(...$)=>i.unref(w)&&i.unref(w)(...$))},[i.createVNode(V,{name:i.unref(_)?"ele-VideoPlay":"ele-VideoCamera",color:i.unref(_)?"#fff":"#333",size:20},null,8,["name","color"])],2)])])],!0):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",jet,"该浏览器暂不支持音视频通话,请更换浏览器。"))}}});var Bf=(e=>(e[e.TEXT=1]="TEXT",e[e.DATE=2]="DATE",e[e.NUMBER=3]="NUMBER",e[e.SELECT_R=4]="SELECT_R",e[e.SELECT_M=5]="SELECT_M",e[e.SELECT_T=6]="SELECT_T",e))(Bf||{}),Kre=(e=>(e[e.INPUT=1]="INPUT",e[e.FIXED=2]="FIXED",e[e.DICT_CODE=3]="DICT_CODE",e[e.DICT_NAME=4]="DICT_NAME",e[e.API=5]="API",e))(Kre||{}),Xre=(e=>(e[e.WEI_DU=1]="WEI_DU",e[e.ZHI_BIAO=2]="ZHI_BIAO",e[e.Z_WEI_DU=3]="Z_WEI_DU",e[e.SHAI_XUAN=4]="SHAI_XUAN",e))(Xre||{}),Qu=(e=>(e.NONE="",e.SUM="sum",e.MAX="max",e.MIN="min",e.AVERAGE="average",e.COUNT="count",e.COUNTDISTINCT="countdistinct",e))(Qu||{}),oS=(e=>(e[e.NONE=0]="NONE",e[e.RATE=1]="RATE",e))(oS||{}),aS=(e=>(e[e.NONE=0]="NONE",e[e.STATISTICS=1]="STATISTICS",e))(aS||{}),cy=(e=>(e[e.NONE=0]="NONE",e[e.ASC=1]="ASC",e[e.DESC=2]="DESC",e))(cy||{}),sS=(e=>(e[e.NONE=0]="NONE",e[e.SUM=1]="SUM",e))(sS||{}),lS=(e=>(e[e.HIDE=1]="HIDE",e[e.SHOW=0]="SHOW",e))(lS||{}),Ta=(e=>(e[e.COLLECT=0]="COLLECT",e[e.CALC=1]="CALC",e[e.EDIT_NAME=2]="EDIT_NAME",e[e.SORT=3]="SORT",e[e.POINT=4]="POINT",e[e.SUM=5]="SUM",e[e.SHOW=6]="SHOW",e[e.STATISTICS=7]="STATISTICS",e))(Ta||{}),cS=(e=>(e[e.COLUMN=0]="COLUMN",e[e.FILTER=1]="FILTER",e))(cS||{}),uS=(e=>(e.AND="AND",e.OR="OR",e))(uS||{});const qet={[Bf.TEXT]:"string",[Bf.NUMBER]:"number",[Bf.DATE]:"date",[Bf.SELECT_R]:"radio_▼",[Bf.SELECT_M]:"multiple_▼",[Bf.SELECT_T]:"tree_▼"};function Yet(e){return qet[e]}const Ket=i.ref(""),Xet=[{label:"列配置",value:cS.COLUMN},{label:"检索配置",value:cS.FILTER}],Jre=[{label:"无",value:Qu.NONE},{label:"求和",value:Qu.SUM},{label:"平均",value:Qu.AVERAGE},{label:"最大值",value:Qu.MAX},{label:"最小值",value:Qu.MIN},{label:"计数",value:Qu.COUNT},{label:"去重计数",value:Qu.COUNTDISTINCT}],Zre=[{label:"无",value:oS.NONE},{label:"占比",value:oS.RATE}],xV=[{label:"无",value:cy.NONE},{label:"升序",value:cy.ASC},{label:"降序",value:cy.DESC}],EV=[{label:"无",value:sS.NONE},{label:"合计",value:sS.SUM}],wV=[{label:"隐藏",value:lS.HIDE},{label:"显示",value:lS.SHOW}],Qre=[{label:"不统计",value:aS.NONE},{label:"统计",value:aS.STATISTICS}],Jet=[{label:"AND",value:uS.AND},{label:"OR",value:uS.OR}],Zet=[{label:"排序方式",value:Ta.SORT,children:xV},{label:"显示名称",value:Ta.EDIT_NAME},{label:"是否隐藏",value:Ta.SHOW,children:wV},{label:"分组统计",value:Ta.STATISTICS,children:Qre},{label:"底部合计",value:Ta.SUM,children:EV},{label:"小数位数",value:Ta.POINT}],Qet=[{label:"显示名称",value:Ta.EDIT_NAME}],ett=[{label:"汇总方式",value:Ta.COLLECT,children:Jre},{label:"占比计算",value:Ta.CALC,children:Zre},{label:"排序方式",value:Ta.SORT,children:xV},{label:"显示名称",value:Ta.EDIT_NAME},{label:"小数位数",value:Ta.POINT},{label:"底部合计",value:Ta.SUM,children:EV},{label:"是否隐藏",value:Ta.SHOW,children:wV}];exports.BScroll=hZe;exports.CHANGE_EVENT=o6e;exports.COLUMN_FIELD=xJe;exports.CUSTOME_GROUP_TIP=zT;exports.Clipboard=oXe;exports.CloseComponents=mX;exports.CryptoJS=jHe;exports.CurrentRoute=Z7;exports.CurrentRouter=Q7;exports.CustomeMethods=UM;exports.CustomeStore=YKe;exports.DomZIndex=WS;exports.EVENT_CODE=Zf;exports.ElBadge=KX;exports.ElButton=tJ;exports.ElButtonGroup=Sbe;exports.ElConfigProvider=zX;exports.ElFocusTrap=YX;exports.ElIcon=Os;exports.ElInput=jX;exports.ElLoading=Pbe;exports.ElMessage=Sa;exports.ElMessageBox=lg;exports.ElOverlay=nJ;exports.FIELD_DATA_TYPE=Xre;exports.FIELD_GROUP=aS;exports.FIELD_RATE=oS;exports.FIELD_SHOW=lS;exports.FIELD_SORT=cy;exports.FIELD_SUM=sS;exports.FIELD_TYPE=Bf;exports.FIELD_WAY=Qu;exports.FOCUS_TRAP_INJECTION_KEY=GX;exports.FORCE_UPDATE_LIST=zne;exports.HsMessage=Vc;exports.HsMessageBox=Y8;exports.HsNotification=Vne;exports.INPUT_EVENT=a6e;exports.IS_DEV=u2;exports.ListCache=Bp;exports.Local=Tp;exports.Map=gK;exports.MapCache=dh;exports.Md5=To;exports.NEXT_NAME=Vs;exports.NODE_RELATION=uS;exports.NOOP=sg;exports.POPUP_TYPE=Ta;exports.PatchFlags=N4;exports.QUERY_GROUP_TIP=X8;exports.QUERY_WAY=Kre;exports.REGEXP_STRING=iV;exports.SEGMENTED=cS;exports.SYSTEM_PARAMS=K8;exports.Session=GKe;exports.Symbol=fd;exports.TinyColor=QX;exports.TypeComponents=gP;exports.TypeComponentsMap=Mp;exports.UPDATE_MODEL_EVENT=S8;exports.ValidateComponentsMap=vX;exports.VxeInput=Hy;exports.VxeModal=n2;exports.VxeNumberInput=jy;exports.VxeUI=bt;exports.VxeUIExport=pBe;exports.XEUtils=N;exports._=$t;exports._export_sfc=Kc;exports._export_sfc$1=p7;exports._sfc_main=pZe;exports._sfc_main$1=Get;exports.add=lHe;exports.addClass=w8;exports.addUnit=Ig;exports.addUrlParams=yne;exports.animateScrollTo=Q0e;exports.arrayMap=oK;exports.arrayPush=_K;exports.arrow_down_bold_default=DK;exports.arrow_down_default=NK;exports.arrow_left_default=RK;exports.arrow_right_default=OK;exports.arrow_up_bold_default=MK;exports.arrow_up_default=PK;exports.assignValue=fK;exports.axiosInterceptors=UKe;exports.back_default=VK;exports.baseAssignValue=dK;exports.baseFlatten=dP;exports.baseGet=cP;exports.baseGetTag=hS;exports.buildProp=vP;exports.buildProps=Zl;exports.buttonTypes=JX;exports.cAF=CK;exports.cacheInitSearchFormData=_Je;exports.cacheSearchFormData=zc;exports.calendar_default=LK;exports.capitalize=ghe;exports.caret_right_default=BK;exports.caret_top_default=FK;exports.castPath=Ny;exports.check_default=$K;exports.circle_check_default=pP;exports.circle_check_filled_default=UK;exports.circle_close_default=SS;exports.circle_close_filled_default=wS;exports.clearAllIndexDB=JKe;exports.clock_default=zK;exports.close_default=CS;exports.columnsList=Zet;exports.commonjsGlobal=ir;exports.componentSizes=_P;exports.componentTipList=EJe;exports.computedEager=Afe;exports.configStore=hr;exports.configStore$1=Zo;exports.configUnidId=Rs;exports.convertCurrency=pHe;exports.d_arrow_left_default=HK;exports.d_arrow_right_default=WK;exports.debugWarn=Ha;exports.decimalDigits=Jy;exports.deepClone=Rne;exports.defaultNamespace=R4;exports.definePropType=ko;exports.delete_default=jK;exports.div=dHe;exports.document_default=GK;exports.elSvg=Ine;exports.encryptionTool=jKe;exports.entriesOf=q0e;exports.eq=sP;exports.fetchTableData=aV;exports.fieldGroup=Qre;exports.fieldRate=Zre;exports.fieldShow=wV;exports.fieldSort=xV;exports.fieldSum=EV;exports.fieldWay=Jre;exports.fixedNumAccuracy=B7;exports.flatRest=bK;exports.flattedChildren=lw;exports.flatten=yK;exports.focusNode=xfe;exports.formContextKey=NS;exports.formItemContextKey=EP;exports.freeGlobal=rK;exports.fromPairs=fP;exports.full_screen_default=qK;exports.get=uP;exports.getAuthFieldsByMid=nXe;exports.getColumnWidthConfig=XKe;exports.getConfig=eV;exports.getDataDictListByMid=tXe;exports.getDataType=aXe;exports.getDefaultExportFromCjs=fh;exports.getDictListByMid=eXe;exports.getFieldType=Yet;exports.getForceUpdateList=Kne;exports.getFormData=AJe;exports.getFormDataType=Sne;exports.getLoadData=kJe;exports.getNative=vS;exports.getNormalizedProps=u6e;exports.getNumbers=fHe;exports.getOrderQueryData=Jne;exports.getProp=Y0e;exports.getRender=Wne;exports.getRenderComponent=jne;exports.getScrollBarWidth=AK;exports.getScrollContainer=J0e;exports.getScrollElement=epe;exports.getScrollTop=tpe;exports.getSearchForm=Gne;exports.getSearchParams=Yne;exports.getShowQueryData=NJe;exports.getSibling=bfe;exports.getStoreSystemParams=QKe;exports.getStyle=Ff;exports.getSystemParams=ZKe;exports.getTableCacheData=Xne;exports.getTableDataType=Cne;exports.getUrlParams=Qo;exports.globalComponentSize=Nne;exports.handleEmpty=Mne;exports.handleOpenLink=Pne;exports.hasClass=QO;exports.hasIn=xK;exports.hasOwn=Cg;exports.hideFieldData=$ne;exports.hooks=Pn;exports.hoverItem=Ket;exports.iconPropType=Op;exports.identity=sK;exports.iframeMessage=HKe;exports.indicatorList=ett;exports.info_filled_default=TS;exports.inputProps=WX;exports.isArguments=lP;exports.isArray=D4;exports.isArray$1=jg;exports.isBoolean=JO;exports.isClient=Qi;exports.isDate=che;exports.isElement=Rp;exports.isEmpty=W0e;exports.isFirefox=tK;exports.isFragment=bX;exports.isFunction=us;exports.isFunction$1=lK;exports.isIOS=ZY;exports.isIndex=aP;exports.isKey=vK;exports.isLeaf=JY;exports.isLegalNumber=gte;exports.isLength=pK;exports.isMobile=One;exports.isNil=xS;exports.isNumber=Gc;exports.isObject=jc;exports.isObject$1=uy;exports.isObjectLike=pS;exports.isPlainObject=hhe;exports.isPromise=uhe;exports.isPropAbsent=j0e;exports.isRefreshData=zg;exports.isShowAuth=Une;exports.isShowError=yJe;exports.isShowItem=oV;exports.isString=za;exports.isSymbol=mS;exports.isToNumber=F7;exports.isUndefined=hP;exports.isValidComponentSize=yX;exports.isValidElementNode=c6e;exports.isWindow=ES;exports.jsonStringify=SJe;exports.keysOf=ZO;exports.lazyImg=Dne;exports.loading_default=kg;exports.location_default=KK;exports.mathTool=hHe;exports.memoize=yS;exports.message=RXe;exports.messageBox=OXe;exports.minus_default=XK;exports.mittBus=h8;exports.more_default=ZK;exports.more_filled_default=JK;exports.mutable=yP;exports.notification=MXe;exports.numberToChinese=mHe;exports.onClickOutside=KXe;exports.onClickOutside$1=$fe;exports.onKeyStroke=fJe;exports.onKeyStroke$1=FM;exports.onTableKey=OJe;exports.operation_default=QK;exports.other=NXe;exports.overRest=hK;exports.pick=wK;exports.picture_filled_default=eX;exports.plus_default=tX;exports.popupPlugin=hJe;exports.push=zKe;exports.querysList=Qet;exports.question_filled_default=nX;exports.rAF=SK;exports.refDebounced=Lfe;exports.refresh_left_default=rX;exports.refresh_right_default=iX;exports.relationList=Jet;exports.reloadCountTableData=IJe;exports.removeClass=Tg;exports.removeConfig=KKe;exports.request=Pi;exports.request$1=c2;exports.root=fS;exports.scale_to_original_default=oX;exports.screenfull=rXe;exports.scrollIntoView=Z0e;exports.search_default=aX;exports.segmentedList=Xet;exports.setColumnWidthConfig=xne;exports.setConfig=tV;exports.setLocalSystemParams=Ene;exports.setTableCacheData=DJe;exports.setTagsViewNameI18n=Ane;exports.setToString=uK;exports.showPopup=Fne;exports.showPopupCount=Ey;exports.sort_down_default=sX;exports.sort_up_default=lX;exports.specialType=bJe;exports.star_default=uX;exports.star_filled_default=cX;exports.sub=cHe;exports.systemStore=Mr;exports.tableAsyncFun=Ds;exports.tableBeforeAsyncFun=zM;exports.tableCancheData=Hne;exports.tableIndex=RJe;exports.throwError=IK;exports.times=uHe;exports.toKey=bS;exports.toRawType=fhe;exports.toSource=cK;exports.triggerEvent=yfe;exports.tryOnScopeDispose=Dy;exports.unrefElement=zl;exports.useActiveElement=QXe;exports.useActiveElement$1=Ufe;exports.useAriaProps=FX;exports.useAttrs=xX;exports.useAuth=jZe;exports.useAuth$1=KZe;exports.useComposition=VX;exports.useCssVar=Hfe;exports.useDeprecated=EX;exports.useDevicesList=nJe;exports.useDocumentVisibility=Wfe;exports.useDraggable=wX;exports.useElementBounding=Yfe;exports.useElementSize=oJe;exports.useEmptyValues=C6e;exports.useEmptyValuesProps=BX;exports.useEventListener=Io;exports.useFocusController=PX;exports.useFormDisabled=RS;exports.useFormItem=SP;exports.useFormItemInputId=HX;exports.useFormSize=wP;exports.useGetDerivedNamespace=bP;exports.useGlobalConfig=AS;exports.useGlobalSize=MX;exports.useId=C8;exports.useIdInjection=AX;exports.useLocale=CX;exports.useLockscreen=IX;exports.useMittBus=lXe;exports.useMouseInElement=lJe;exports.useMousePressed=cJe;exports.useMutationObserver=Zfe;exports.useNamespace=Kl;exports.useRequest=WKe;exports.useResizeObserver=dS;exports.useSameTarget=xP;exports.useSizeProp=kS;exports.useThrottleFn=Bfe;exports.useTimeoutFn=rP;exports.useTitle=kne;exports.useUserMedia=uJe;exports.useVModel=ihe;exports.useWindowFocus=ohe;exports.useWindowSize=dJe;exports.useWindowSize$1=ahe;exports.useZIndex=RX;exports.verifiyNumberInteger=dXe;exports.verifyAccount=bXe;exports.verifyAndSpace=pXe;exports.verifyCarNum=AXe;exports.verifyCnAndSpace=fXe;exports.verifyEmail=CXe;exports.verifyEnAndSpace=hXe;exports.verifyFullName=IXe;exports.verifyIPAddress=SXe;exports.verifyIdCard=TXe;exports.verifyNumberCnUppercase=gXe;exports.verifyNumberComma=mXe;exports.verifyNumberIntegerAndFloat=nV;exports.verifyNumberPercentage=cXe;exports.verifyNumberPercentageFloat=uXe;exports.verifyPassword=xXe;exports.verifyPasswordPowerful=EXe;exports.verifyPasswordStrength=wXe;exports.verifyPhone=_Xe;exports.verifyPostalCode=kXe;exports.verifyTelPhone=yXe;exports.verifyTextColor=vXe;exports.verifyUrl=Tne;exports.warning_filled_default=IS;exports.watchOnce=qXe;exports.withInstall=Gg;exports.withInstallDirective=i6e;exports.withNoopInstall=_X;exports.zhCn=aJ;exports.zoom_in_default=fX;exports.zoom_out_default=hX;