diff --git a/.gitignore b/.gitignore index 8680825..d08d8f6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ lerna-debug.log* node_modules .DS_Store -dist dist-ssr coverage *.local diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..577075d Binary files /dev/null and b/dist.zip differ diff --git a/dist/assets/401-BnzQ57U8.js b/dist/assets/401-8RIqH0GR.js similarity index 94% rename from dist/assets/401-BnzQ57U8.js rename to dist/assets/401-8RIqH0GR.js index c5265d4..d298502 100644 --- a/dist/assets/401-BnzQ57U8.js +++ b/dist/assets/401-8RIqH0GR.js @@ -1 +1 @@ -import{_ as d,j as f,r as m,c as k,d as o,w as s,e as n,o as g,h as a,f as e}from"./index-DikBC4WP.js";const x="/assets/401-HGF6Q5qM.gif",b={class:"errPage-container"},h={class:"list-unstyled"},w={class:"link-type"},v=["src"],y={__name:"401",setup(B){let{proxy:r}=f();const c=m(x+"?"+ +new Date);function u(){r.$route.query.noGoBack?r.$router.push({path:"/"}):r.$router.go(-1)}return(C,t)=>{const _=n("el-button"),i=n("router-link"),l=n("el-col"),p=n("el-row");return g(),k("div",b,[o(_,{icon:"arrow-left",class:"pan-back-btn",onClick:u},{default:s(()=>[...t[0]||(t[0]=[a(" 返回 ",-1)])]),_:1}),o(p,null,{default:s(()=>[o(l,{span:12},{default:s(()=>[t[2]||(t[2]=e("h1",{class:"text-jumbo text-ginormous"}," 401错误! ",-1)),t[3]||(t[3]=e("h2",null,"您没有访问权限!",-1)),t[4]||(t[4]=e("h6",null,"对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面",-1)),e("ul",h,[e("li",w,[o(i,{to:"/"},{default:s(()=>[...t[1]||(t[1]=[a(" 回首页 ",-1)])]),_:1})])])]),_:1}),o(l,{span:12},{default:s(()=>[e("img",{src:c.value,width:"313",height:"428",alt:"Girl has dropped her ice cream."},null,8,v)]),_:1})]),_:1})])}}},I=d(y,[["__scopeId","data-v-2c8b7582"]]);export{I as default}; +import{_ as d,j as f,r as m,c as k,d as o,w as s,e as n,o as g,h as a,f as e}from"./index-nRSe4xNB.js";const x="/assets/401-HGF6Q5qM.gif",b={class:"errPage-container"},h={class:"list-unstyled"},w={class:"link-type"},v=["src"],y={__name:"401",setup(B){let{proxy:r}=f();const c=m(x+"?"+ +new Date);function u(){r.$route.query.noGoBack?r.$router.push({path:"/"}):r.$router.go(-1)}return(C,t)=>{const _=n("el-button"),i=n("router-link"),l=n("el-col"),p=n("el-row");return g(),k("div",b,[o(_,{icon:"arrow-left",class:"pan-back-btn",onClick:u},{default:s(()=>[...t[0]||(t[0]=[a(" 返回 ",-1)])]),_:1}),o(p,null,{default:s(()=>[o(l,{span:12},{default:s(()=>[t[2]||(t[2]=e("h1",{class:"text-jumbo text-ginormous"}," 401错误! ",-1)),t[3]||(t[3]=e("h2",null,"您没有访问权限!",-1)),t[4]||(t[4]=e("h6",null,"对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面",-1)),e("ul",h,[e("li",w,[o(i,{to:"/"},{default:s(()=>[...t[1]||(t[1]=[a(" 回首页 ",-1)])]),_:1})])])]),_:1}),o(l,{span:12},{default:s(()=>[e("img",{src:c.value,width:"313",height:"428",alt:"Girl has dropped her ice cream."},null,8,v)]),_:1})]),_:1})])}}},I=d(y,[["__scopeId","data-v-2c8b7582"]]);export{I as default}; diff --git a/dist/assets/401-8RIqH0GR.js.gz b/dist/assets/401-8RIqH0GR.js.gz new file mode 100644 index 0000000..7428b07 Binary files /dev/null and b/dist/assets/401-8RIqH0GR.js.gz differ diff --git a/dist/assets/401-BnzQ57U8.js.gz b/dist/assets/401-BnzQ57U8.js.gz deleted file mode 100644 index e9ec9a8..0000000 Binary files a/dist/assets/401-BnzQ57U8.js.gz and /dev/null differ diff --git a/dist/assets/404-W2OpILVy.js b/dist/assets/404-DS_mPX5a.js similarity index 94% rename from dist/assets/404-W2OpILVy.js rename to dist/assets/404-DS_mPX5a.js index 23d19d1..0afec79 100644 --- a/dist/assets/404-W2OpILVy.js +++ b/dist/assets/404-DS_mPX5a.js @@ -1 +1 @@ -import{_ as o,b as l,c as _,f as t,q as c,d,t as n,s as r,w as p,e as m,o as u,h as v}from"./index-DikBC4WP.js";const h="/assets/404-N4aRkdWY.png",a="/assets/404_cloud-CPexjtDj.png",f={class:"wscn-http404-container"},g={class:"wscn-http404"},x={class:"bullshit"},b={class:"bullshit__headline"},k={__name:"404",setup(N){let e=l(()=>"找不到网页!");return(w,s)=>{const i=m("router-link");return u(),_("div",f,[t("div",g,[s[3]||(s[3]=c('
>>0?1:0),X=l.low=X+s0,l.high=O+d0+(X>>>0>>0?1:0),H=A.low=H+c0,A.high=b+h0+(H>>>0 >>0?1:0),k=_.low=k+v0,_.high=m+A0+(k>>>0 >>0?1:0)},_doFinalize:function(){var o=this._data,c=o.words,f=this._nDataBytes*8,h=o.sigBytes*8;c[h>>>5]|=128<<24-h%32,c[(h+128>>>10<<5)+30]=Math.floor(f/4294967296),c[(h+128>>>10<<5)+31]=f,o.sigBytes=c.length*4,this._process();var t=this._hash.toX32();return t},clone:function(){var o=D.clone.call(this);return o._hash=this._hash.clone(),o},blockSize:1024/32});n.SHA512=D._createHelper(s),n.HmacSHA512=D._createHmacHelper(s)}(),C.SHA512})}(m0)),m0.exports}var S0={exports:{}},gx;function pr(){return gx||(gx=1,function(R,T){(function(C,n,p){R.exports=n(I(),l0(),Vx())})(W,function(C){return function(){var n=C,p=n.x64,D=p.Word,w=p.WordArray,B=n.algo,d=B.SHA512,x=B.SHA384=d.extend({_doReset:function(){this._hash=new w.init([new D.init(3418070365,3238371032),new D.init(1654270250,914150663),new D.init(2438529370,812702999),new D.init(355462360,4144912697),new D.init(1731405415,4290775857),new D.init(2394180231,1750603025),new D.init(3675008525,1694076839),new D.init(1203062813,3204075428)])},_doFinalize:function(){var e=d._doFinalize.call(this);return e.sigBytes-=16,e}});n.SHA384=d._createHelper(x),n.HmacSHA384=d._createHmacHelper(x)}(),C.SHA384})}(S0)),S0.exports}var R0={exports:{}},kx;function _r(){return kx||(kx=1,function(R,T){(function(C,n,p){R.exports=n(I(),l0())})(W,function(C){return function(n){var p=C,D=p.lib,w=D.WordArray,B=D.Hasher,d=p.x64,x=d.Word,e=p.algo,u=[],r=[],s=[];(function(){for(var f=1,h=0,t=0;t<24;t++){u[f+5*h]=(t+1)*(t+2)/2%64;var a=h%5,i=(2*f+3*h)%5;f=a,h=i}for(var f=0;f<5;f++)for(var h=0;h<5;h++)r[f+5*h]=h+(2*f+3*h)%5*5;for(var E=1,l=0;l<24;l++){for(var A=0,_=0,S=0;S<7;S++){if(E&1){var v=(1< >>24)&16711935|(E<<24|E>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;var A=t[i];A.high^=l,A.low^=E}for(var _=0;_<24;_++){for(var S=0;S<5;S++){for(var v=0,F=0,y=0;y<5;y++){var A=t[S+5*y];v^=A.high,F^=A.low}var g=o[S];g.high=v,g.low=F}for(var S=0;S<5;S++)for(var z=o[(S+4)%5],q=o[(S+1)%5],P=q.high,U=q.low,v=z.high^(P<<1|U>>>31),F=z.low^(U<<1|P>>>31),y=0;y<5;y++){var A=t[S+5*y];A.high^=v,A.low^=F}for(var N=1;N<25;N++){var v,F,A=t[N],O=A.high,X=A.low,b=u[N];b<32?(v=O<>>32-b,F=X<>>32-b):(v=X<>>64-b,F=O< >>64-b);var H=o[r[N]];H.high=v,H.low=F}var m=o[0],k=t[0];m.high=k.high,m.low=k.low;for(var S=0;S<5;S++)for(var y=0;y<5;y++){var N=S+5*y,A=t[N],G=o[N],K=o[(S+1)%5+5*y],$=o[(S+2)%5+5*y];A.high=G.high^~K.high&$.high,A.low=G.low^~K.low&$.low}var A=t[0],L=s[_];A.high^=L.high,A.low^=L.low}},_doFinalize:function(){var f=this._data,h=f.words;this._nDataBytes*8;var t=f.sigBytes*8,a=this.blockSize*32;h[t>>>5]|=1<<24-t%32,h[(n.ceil((t+1)/a)*a>>>5)-1]|=128,f.sigBytes=h.length*4,this._process();for(var i=this._state,E=this.cfg.outputLength/8,l=E/8,A=[],_=0;_ >>24)&16711935|(v<<24|v>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,A.push(F),A.push(v)}return new w.init(A,E)},clone:function(){for(var f=B.clone.call(this),h=f._state=this._state.slice(0),t=0;t<25;t++)h[t]=h[t].clone();return f}});p.SHA3=B._createHelper(c),p.HmacSHA3=B._createHmacHelper(c)}(Math),C.SHA3})}(R0)),R0.exports}var z0={exports:{}},wx;function br(){return wx||(wx=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){/** @preserve +import{ai as Br,aj as W,ak as ur}from"./index-nRSe4xNB.js";var jx={exports:{}};function dr(R){throw new Error('Could not dynamically require "'+R+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var F0={exports:{}};const hr={},Cr=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"})),lr=Br(Cr);var hx;function I(){return hx||(hx=1,function(R,T){(function(C,n){R.exports=n()})(W,function(){var C=C||function(n,p){var D;if(typeof window<"u"&&window.crypto&&(D=window.crypto),typeof self<"u"&&self.crypto&&(D=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(D=globalThis.crypto),!D&&typeof window<"u"&&window.msCrypto&&(D=window.msCrypto),!D&&typeof W<"u"&&W.crypto&&(D=W.crypto),!D&&typeof dr=="function")try{D=lr}catch{}var w=function(){if(D){if(typeof D.getRandomValues=="function")try{return D.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof D.randomBytes=="function")try{return D.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},B=Object.create||function(){function t(){}return function(a){var i;return t.prototype=a,i=new t,t.prototype=null,i}}(),d={},x=d.lib={},e=x.Base=function(){return{extend:function(t){var a=B(this);return t&&a.mixIn(t),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments)}),a.init.prototype=a,a.$super=this,a},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var a in t)t.hasOwnProperty(a)&&(this[a]=t[a]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=x.WordArray=e.extend({init:function(t,a){t=this.words=t||[],a!=p?this.sigBytes=a:this.sigBytes=t.length*4},toString:function(t){return(t||s).stringify(this)},concat:function(t){var a=this.words,i=t.words,E=this.sigBytes,l=t.sigBytes;if(this.clamp(),E%4)for(var A=0;A >>2]>>>24-A%4*8&255;a[E+A>>>2]|=_<<24-(E+A)%4*8}else for(var S=0;S >>2]=i[S>>>2];return this.sigBytes+=l,this},clamp:function(){var t=this.words,a=this.sigBytes;t[a>>>2]&=4294967295<<32-a%4*8,t.length=n.ceil(a/4)},clone:function(){var t=e.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var a=[],i=0;i >>2]>>>24-l%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(t){for(var a=t.length,i=[],E=0;E>>3]|=parseInt(t.substr(E,2),16)<<24-E%8*4;return new u.init(i,a/2)}},o=r.Latin1={stringify:function(t){for(var a=t.words,i=t.sigBytes,E=[],l=0;l>>2]>>>24-l%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(t){for(var a=t.length,i=[],E=0;E>>2]|=(t.charCodeAt(E)&255)<<24-E%4*8;return new u.init(i,a)}},c=r.Utf8={stringify:function(t){try{return decodeURIComponent(escape(o.stringify(t)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(t){return o.parse(unescape(encodeURIComponent(t)))}},f=x.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){typeof t=="string"&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var a,i=this._data,E=i.words,l=i.sigBytes,A=this.blockSize,_=A*4,S=l/_;t?S=n.ceil(S):S=n.max((S|0)-this._minBufferSize,0);var v=S*A,F=n.min(v*4,l);if(v){for(var y=0;y >>2]|=d[u]<<24-u%4*8;w.call(this,e,x)}else w.apply(this,arguments)};B.prototype=D}}(),C.lib.WordArray})}(p0)),p0.exports}var _0={exports:{}},Ex;function Ar(){return Ex||(Ex=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){return function(){var n=C,p=n.lib,D=p.WordArray,w=n.enc;w.Utf16=w.Utf16BE={stringify:function(d){for(var x=d.words,e=d.sigBytes,u=[],r=0;r >>2]>>>16-r%4*8&65535;u.push(String.fromCharCode(s))}return u.join("")},parse:function(d){for(var x=d.length,e=[],u=0;u >>1]|=d.charCodeAt(u)<<16-u%2*16;return D.create(e,x*2)}},w.Utf16LE={stringify:function(d){for(var x=d.words,e=d.sigBytes,u=[],r=0;r >>2]>>>16-r%4*8&65535);u.push(String.fromCharCode(s))}return u.join("")},parse:function(d){for(var x=d.length,e=[],u=0;u >>1]|=B(d.charCodeAt(u)<<16-u%2*16);return D.create(e,x*2)}};function B(d){return d<<8&4278255360|d>>>8&16711935}}(),C.enc.Utf16})}(_0)),_0.exports}var b0={exports:{}},Ax;function e0(){return Ax||(Ax=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){return function(){var n=C,p=n.lib,D=p.WordArray,w=n.enc;w.Base64={stringify:function(d){var x=d.words,e=d.sigBytes,u=this._map;d.clamp();for(var r=[],s=0;s >>2]>>>24-s%4*8&255,c=x[s+1>>>2]>>>24-(s+1)%4*8&255,f=x[s+2>>>2]>>>24-(s+2)%4*8&255,h=o<<16|c<<8|f,t=0;t<4&&s+t*.75 >>6*(3-t)&63));var a=u.charAt(64);if(a)for(;r.length%4;)r.push(a);return r.join("")},parse:function(d){var x=d.length,e=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var r=0;r >>6-s%4*2,f=o|c;u[r>>>2]|=f<<24-r%4*8,r++}return D.create(u,r)}}(),C.enc.Base64})}(b0)),b0.exports}var y0={exports:{}},Fx;function Fr(){return Fx||(Fx=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){return function(){var n=C,p=n.lib,D=p.WordArray,w=n.enc;w.Base64url={stringify:function(d,x){x===void 0&&(x=!0);var e=d.words,u=d.sigBytes,r=x?this._safe_map:this._map;d.clamp();for(var s=[],o=0;o>>2]>>>24-o%4*8&255,f=e[o+1>>>2]>>>24-(o+1)%4*8&255,h=e[o+2>>>2]>>>24-(o+2)%4*8&255,t=c<<16|f<<8|h,a=0;a<4&&o+a*.75>>6*(3-a)&63));var i=r.charAt(64);if(i)for(;s.length%4;)s.push(i);return s.join("")},parse:function(d,x){x===void 0&&(x=!0);var e=d.length,u=x?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var s=0;s >>6-s%4*2,f=o|c;u[r>>>2]|=f<<24-r%4*8,r++}return D.create(u,r)}}(),C.enc.Base64url})}(y0)),y0.exports}var g0={exports:{}},Dx;function t0(){return Dx||(Dx=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){return function(n){var p=C,D=p.lib,w=D.WordArray,B=D.Hasher,d=p.algo,x=[];(function(){for(var c=0;c<64;c++)x[c]=n.abs(n.sin(c+1))*4294967296|0})();var e=d.MD5=B.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,f){for(var h=0;h<16;h++){var t=f+h,a=c[t];c[t]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}var i=this._hash.words,E=c[f+0],l=c[f+1],A=c[f+2],_=c[f+3],S=c[f+4],v=c[f+5],F=c[f+6],y=c[f+7],g=c[f+8],z=c[f+9],q=c[f+10],P=c[f+11],U=c[f+12],N=c[f+13],O=c[f+14],X=c[f+15],b=i[0],H=i[1],m=i[2],k=i[3];b=u(b,H,m,k,E,7,x[0]),k=u(k,b,H,m,l,12,x[1]),m=u(m,k,b,H,A,17,x[2]),H=u(H,m,k,b,_,22,x[3]),b=u(b,H,m,k,S,7,x[4]),k=u(k,b,H,m,v,12,x[5]),m=u(m,k,b,H,F,17,x[6]),H=u(H,m,k,b,y,22,x[7]),b=u(b,H,m,k,g,7,x[8]),k=u(k,b,H,m,z,12,x[9]),m=u(m,k,b,H,q,17,x[10]),H=u(H,m,k,b,P,22,x[11]),b=u(b,H,m,k,U,7,x[12]),k=u(k,b,H,m,N,12,x[13]),m=u(m,k,b,H,O,17,x[14]),H=u(H,m,k,b,X,22,x[15]),b=r(b,H,m,k,l,5,x[16]),k=r(k,b,H,m,F,9,x[17]),m=r(m,k,b,H,P,14,x[18]),H=r(H,m,k,b,E,20,x[19]),b=r(b,H,m,k,v,5,x[20]),k=r(k,b,H,m,q,9,x[21]),m=r(m,k,b,H,X,14,x[22]),H=r(H,m,k,b,S,20,x[23]),b=r(b,H,m,k,z,5,x[24]),k=r(k,b,H,m,O,9,x[25]),m=r(m,k,b,H,_,14,x[26]),H=r(H,m,k,b,g,20,x[27]),b=r(b,H,m,k,N,5,x[28]),k=r(k,b,H,m,A,9,x[29]),m=r(m,k,b,H,y,14,x[30]),H=r(H,m,k,b,U,20,x[31]),b=s(b,H,m,k,v,4,x[32]),k=s(k,b,H,m,g,11,x[33]),m=s(m,k,b,H,P,16,x[34]),H=s(H,m,k,b,O,23,x[35]),b=s(b,H,m,k,l,4,x[36]),k=s(k,b,H,m,S,11,x[37]),m=s(m,k,b,H,y,16,x[38]),H=s(H,m,k,b,q,23,x[39]),b=s(b,H,m,k,N,4,x[40]),k=s(k,b,H,m,E,11,x[41]),m=s(m,k,b,H,_,16,x[42]),H=s(H,m,k,b,F,23,x[43]),b=s(b,H,m,k,z,4,x[44]),k=s(k,b,H,m,U,11,x[45]),m=s(m,k,b,H,X,16,x[46]),H=s(H,m,k,b,A,23,x[47]),b=o(b,H,m,k,E,6,x[48]),k=o(k,b,H,m,y,10,x[49]),m=o(m,k,b,H,O,15,x[50]),H=o(H,m,k,b,v,21,x[51]),b=o(b,H,m,k,U,6,x[52]),k=o(k,b,H,m,_,10,x[53]),m=o(m,k,b,H,q,15,x[54]),H=o(H,m,k,b,l,21,x[55]),b=o(b,H,m,k,g,6,x[56]),k=o(k,b,H,m,X,10,x[57]),m=o(m,k,b,H,F,15,x[58]),H=o(H,m,k,b,N,21,x[59]),b=o(b,H,m,k,S,6,x[60]),k=o(k,b,H,m,P,10,x[61]),m=o(m,k,b,H,A,15,x[62]),H=o(H,m,k,b,z,21,x[63]),i[0]=i[0]+b|0,i[1]=i[1]+H|0,i[2]=i[2]+m|0,i[3]=i[3]+k|0},_doFinalize:function(){var c=this._data,f=c.words,h=this._nDataBytes*8,t=c.sigBytes*8;f[t>>>5]|=128<<24-t%32;var a=n.floor(h/4294967296),i=h;f[(t+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,f[(t+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,c.sigBytes=(f.length+1)*4,this._process();for(var E=this._hash,l=E.words,A=0;A<4;A++){var _=l[A];l[A]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}return E},clone:function(){var c=B.clone.call(this);return c._hash=this._hash.clone(),c}});function u(c,f,h,t,a,i,E){var l=c+(f&h|~f&t)+a+E;return(l<>>32-i)+f}function r(c,f,h,t,a,i,E){var l=c+(f&t|h&~t)+a+E;return(l<>>32-i)+f}function s(c,f,h,t,a,i,E){var l=c+(f^h^t)+a+E;return(l<>>32-i)+f}function o(c,f,h,t,a,i,E){var l=c+(h^(f|~t))+a+E;return(l<>>32-i)+f}p.MD5=B._createHelper(e),p.HmacMD5=B._createHmacHelper(e)}(Math),C.MD5})}(g0)),g0.exports}var k0={exports:{}},px;function Mx(){return px||(px=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){return function(){var n=C,p=n.lib,D=p.WordArray,w=p.Hasher,B=n.algo,d=[],x=B.SHA1=w.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,u){for(var r=this._hash.words,s=r[0],o=r[1],c=r[2],f=r[3],h=r[4],t=0;t<80;t++){if(t<16)d[t]=e[u+t]|0;else{var a=d[t-3]^d[t-8]^d[t-14]^d[t-16];d[t]=a<<1|a>>>31}var i=(s<<5|s>>>27)+h+d[t];t<20?i+=(o&c|~o&f)+1518500249:t<40?i+=(o^c^f)+1859775393:t<60?i+=(o&c|o&f|c&f)-1894007588:i+=(o^c^f)-899497514,h=f,f=c,c=o<<30|o>>>2,o=s,s=i}r[0]=r[0]+s|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+f|0,r[4]=r[4]+h|0},_doFinalize:function(){var e=this._data,u=e.words,r=this._nDataBytes*8,s=e.sigBytes*8;return u[s>>>5]|=128<<24-s%32,u[(s+64>>>9<<4)+14]=Math.floor(r/4294967296),u[(s+64>>>9<<4)+15]=r,e.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var e=w.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA1=w._createHelper(x),n.HmacSHA1=w._createHmacHelper(x)}(),C.SHA1})}(k0)),k0.exports}var w0={exports:{}},_x;function rx(){return _x||(_x=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){return function(n){var p=C,D=p.lib,w=D.WordArray,B=D.Hasher,d=p.algo,x=[],e=[];(function(){function s(h){for(var t=n.sqrt(h),a=2;a<=t;a++)if(!(h%a))return!1;return!0}function o(h){return(h-(h|0))*4294967296|0}for(var c=2,f=0;f<64;)s(c)&&(f<8&&(x[f]=o(n.pow(c,1/2))),e[f]=o(n.pow(c,1/3)),f++),c++})();var u=[],r=d.SHA256=B.extend({_doReset:function(){this._hash=new w.init(x.slice(0))},_doProcessBlock:function(s,o){for(var c=this._hash.words,f=c[0],h=c[1],t=c[2],a=c[3],i=c[4],E=c[5],l=c[6],A=c[7],_=0;_<64;_++){if(_<16)u[_]=s[o+_]|0;else{var S=u[_-15],v=(S<<25|S>>>7)^(S<<14|S>>>18)^S>>>3,F=u[_-2],y=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;u[_]=v+u[_-7]+y+u[_-16]}var g=i&E^~i&l,z=f&h^f&t^h&t,q=(f<<30|f>>>2)^(f<<19|f>>>13)^(f<<10|f>>>22),P=(i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25),U=A+P+g+e[_]+u[_],N=q+z;A=l,l=E,E=i,i=a+U|0,a=t,t=h,h=f,f=U+N|0}c[0]=c[0]+f|0,c[1]=c[1]+h|0,c[2]=c[2]+t|0,c[3]=c[3]+a|0,c[4]=c[4]+i|0,c[5]=c[5]+E|0,c[6]=c[6]+l|0,c[7]=c[7]+A|0},_doFinalize:function(){var s=this._data,o=s.words,c=this._nDataBytes*8,f=s.sigBytes*8;return o[f>>>5]|=128<<24-f%32,o[(f+64>>>9<<4)+14]=n.floor(c/4294967296),o[(f+64>>>9<<4)+15]=c,s.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var s=B.clone.call(this);return s._hash=this._hash.clone(),s}});p.SHA256=B._createHelper(r),p.HmacSHA256=B._createHmacHelper(r)}(Math),C.SHA256})}(w0)),w0.exports}var H0={exports:{}},bx;function Dr(){return bx||(bx=1,function(R,T){(function(C,n,p){R.exports=n(I(),rx())})(W,function(C){return function(){var n=C,p=n.lib,D=p.WordArray,w=n.algo,B=w.SHA256,d=w.SHA224=B.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var x=B._doFinalize.call(this);return x.sigBytes-=4,x}});n.SHA224=B._createHelper(d),n.HmacSHA224=B._createHmacHelper(d)}(),C.SHA224})}(H0)),H0.exports}var m0={exports:{}},yx;function Vx(){return yx||(yx=1,function(R,T){(function(C,n,p){R.exports=n(I(),l0())})(W,function(C){return function(){var n=C,p=n.lib,D=p.Hasher,w=n.x64,B=w.Word,d=w.WordArray,x=n.algo;function e(){return B.create.apply(B,arguments)}var u=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],r=[];(function(){for(var o=0;o<80;o++)r[o]=e()})();var s=x.SHA512=D.extend({_doReset:function(){this._hash=new d.init([new B.init(1779033703,4089235720),new B.init(3144134277,2227873595),new B.init(1013904242,4271175723),new B.init(2773480762,1595750129),new B.init(1359893119,2917565137),new B.init(2600822924,725511199),new B.init(528734635,4215389547),new B.init(1541459225,327033209)])},_doProcessBlock:function(o,c){for(var f=this._hash.words,h=f[0],t=f[1],a=f[2],i=f[3],E=f[4],l=f[5],A=f[6],_=f[7],S=h.high,v=h.low,F=t.high,y=t.low,g=a.high,z=a.low,q=i.high,P=i.low,U=E.high,N=E.low,O=l.high,X=l.low,b=A.high,H=A.low,m=_.high,k=_.low,G=S,K=v,$=F,L=y,i0=g,a0=z,E0=q,f0=P,M=U,Q=N,d0=O,s0=X,h0=b,c0=H,A0=m,v0=k,V=0;V<80;V++){var j,J,C0=r[V];if(V<16)J=C0.high=o[c+V*2]|0,j=C0.low=o[c+V*2+1]|0;else{var tx=r[V-15],n0=tx.high,B0=tx.low,Jx=(n0>>>1|B0<<31)^(n0>>>8|B0<<24)^n0>>>7,ax=(B0>>>1|n0<<31)^(B0>>>8|n0<<24)^(B0>>>7|n0<<25),nx=r[V-2],o0=nx.high,u0=nx.low,xr=(o0>>>19|u0<<13)^(o0<<3|u0>>>29)^o0>>>6,ox=(u0>>>19|o0<<13)^(u0<<3|o0>>>29)^(u0>>>6|o0<<26),ix=r[V-7],rr=ix.high,er=ix.low,fx=r[V-16],tr=fx.high,sx=fx.low;j=ax+er,J=Jx+rr+(j>>>0 >>0?1:0),j=j+ox,J=J+xr+(j>>>0 >>0?1:0),j=j+sx,J=J+tr+(j>>>0 >>0?1:0),C0.high=J,C0.low=j}var ar=M&d0^~M&h0,cx=Q&s0^~Q&c0,nr=G&$^G&i0^$&i0,or=K&L^K&a0^L&a0,ir=(G>>>28|K<<4)^(G<<30|K>>>2)^(G<<25|K>>>7),vx=(K>>>28|G<<4)^(K<<30|G>>>2)^(K<<25|G>>>7),fr=(M>>>14|Q<<18)^(M>>>18|Q<<14)^(M<<23|Q>>>9),sr=(Q>>>14|M<<18)^(Q>>>18|M<<14)^(Q<<23|M>>>9),Bx=u[V],cr=Bx.high,ux=Bx.low,Y=v0+sr,x0=A0+fr+(Y>>>0 >>0?1:0),Y=Y+cx,x0=x0+ar+(Y>>>0 >>0?1:0),Y=Y+ux,x0=x0+cr+(Y>>>0 >>0?1:0),Y=Y+j,x0=x0+J+(Y>>>0 >>0?1:0),dx=vx+or,vr=ir+nr+(dx>>>0 >>0?1:0);A0=h0,v0=c0,h0=d0,c0=s0,d0=M,s0=Q,Q=f0+Y|0,M=E0+x0+(Q>>>0 >>0?1:0)|0,E0=i0,f0=a0,i0=$,a0=L,$=G,L=K,K=Y+dx|0,G=x0+vr+(K>>>0 >>0?1:0)|0}v=h.low=v+K,h.high=S+G+(v>>>0 >>0?1:0),y=t.low=y+L,t.high=F+$+(y>>>0 >>0?1:0),z=a.low=z+a0,a.high=g+i0+(z>>>0 >>0?1:0),P=i.low=P+f0,i.high=q+E0+(P>>>0 >>0?1:0),N=E.low=N+Q,E.high=U+M+(N>>>0 >>0?1:0),X=l.low=X+s0,l.high=O+d0+(X>>>0>>0?1:0),H=A.low=H+c0,A.high=b+h0+(H>>>0 >>0?1:0),k=_.low=k+v0,_.high=m+A0+(k>>>0 >>0?1:0)},_doFinalize:function(){var o=this._data,c=o.words,f=this._nDataBytes*8,h=o.sigBytes*8;c[h>>>5]|=128<<24-h%32,c[(h+128>>>10<<5)+30]=Math.floor(f/4294967296),c[(h+128>>>10<<5)+31]=f,o.sigBytes=c.length*4,this._process();var t=this._hash.toX32();return t},clone:function(){var o=D.clone.call(this);return o._hash=this._hash.clone(),o},blockSize:1024/32});n.SHA512=D._createHelper(s),n.HmacSHA512=D._createHmacHelper(s)}(),C.SHA512})}(m0)),m0.exports}var S0={exports:{}},gx;function pr(){return gx||(gx=1,function(R,T){(function(C,n,p){R.exports=n(I(),l0(),Vx())})(W,function(C){return function(){var n=C,p=n.x64,D=p.Word,w=p.WordArray,B=n.algo,d=B.SHA512,x=B.SHA384=d.extend({_doReset:function(){this._hash=new w.init([new D.init(3418070365,3238371032),new D.init(1654270250,914150663),new D.init(2438529370,812702999),new D.init(355462360,4144912697),new D.init(1731405415,4290775857),new D.init(2394180231,1750603025),new D.init(3675008525,1694076839),new D.init(1203062813,3204075428)])},_doFinalize:function(){var e=d._doFinalize.call(this);return e.sigBytes-=16,e}});n.SHA384=d._createHelper(x),n.HmacSHA384=d._createHmacHelper(x)}(),C.SHA384})}(S0)),S0.exports}var R0={exports:{}},kx;function _r(){return kx||(kx=1,function(R,T){(function(C,n,p){R.exports=n(I(),l0())})(W,function(C){return function(n){var p=C,D=p.lib,w=D.WordArray,B=D.Hasher,d=p.x64,x=d.Word,e=p.algo,u=[],r=[],s=[];(function(){for(var f=1,h=0,t=0;t<24;t++){u[f+5*h]=(t+1)*(t+2)/2%64;var a=h%5,i=(2*f+3*h)%5;f=a,h=i}for(var f=0;f<5;f++)for(var h=0;h<5;h++)r[f+5*h]=h+(2*f+3*h)%5*5;for(var E=1,l=0;l<24;l++){for(var A=0,_=0,S=0;S<7;S++){if(E&1){var v=(1< >>24)&16711935|(E<<24|E>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;var A=t[i];A.high^=l,A.low^=E}for(var _=0;_<24;_++){for(var S=0;S<5;S++){for(var v=0,F=0,y=0;y<5;y++){var A=t[S+5*y];v^=A.high,F^=A.low}var g=o[S];g.high=v,g.low=F}for(var S=0;S<5;S++)for(var z=o[(S+4)%5],q=o[(S+1)%5],P=q.high,U=q.low,v=z.high^(P<<1|U>>>31),F=z.low^(U<<1|P>>>31),y=0;y<5;y++){var A=t[S+5*y];A.high^=v,A.low^=F}for(var N=1;N<25;N++){var v,F,A=t[N],O=A.high,X=A.low,b=u[N];b<32?(v=O<>>32-b,F=X<>>32-b):(v=X<>>64-b,F=O< >>64-b);var H=o[r[N]];H.high=v,H.low=F}var m=o[0],k=t[0];m.high=k.high,m.low=k.low;for(var S=0;S<5;S++)for(var y=0;y<5;y++){var N=S+5*y,A=t[N],G=o[N],K=o[(S+1)%5+5*y],$=o[(S+2)%5+5*y];A.high=G.high^~K.high&$.high,A.low=G.low^~K.low&$.low}var A=t[0],L=s[_];A.high^=L.high,A.low^=L.low}},_doFinalize:function(){var f=this._data,h=f.words;this._nDataBytes*8;var t=f.sigBytes*8,a=this.blockSize*32;h[t>>>5]|=1<<24-t%32,h[(n.ceil((t+1)/a)*a>>>5)-1]|=128,f.sigBytes=h.length*4,this._process();for(var i=this._state,E=this.cfg.outputLength/8,l=E/8,A=[],_=0;_ >>24)&16711935|(v<<24|v>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,A.push(F),A.push(v)}return new w.init(A,E)},clone:function(){for(var f=B.clone.call(this),h=f._state=this._state.slice(0),t=0;t<25;t++)h[t]=h[t].clone();return f}});p.SHA3=B._createHelper(c),p.HmacSHA3=B._createHmacHelper(c)}(Math),C.SHA3})}(R0)),R0.exports}var z0={exports:{}},wx;function br(){return wx||(wx=1,function(R,T){(function(C,n){R.exports=n(I())})(W,function(C){/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/dist/assets/index-Dl6L4IJG.js.gz b/dist/assets/index-Dl6L4IJG.js.gz new file mode 100644 index 0000000..16724be Binary files /dev/null and b/dist/assets/index-Dl6L4IJG.js.gz differ diff --git a/dist/assets/index-eGhvKdrr.js.gz b/dist/assets/index-eGhvKdrr.js.gz deleted file mode 100644 index 530ec75..0000000 Binary files a/dist/assets/index-eGhvKdrr.js.gz and /dev/null differ diff --git a/dist/assets/index-DikBC4WP.js b/dist/assets/index-nRSe4xNB.js similarity index 99% rename from dist/assets/index-DikBC4WP.js rename to dist/assets/index-nRSe4xNB.js index 9e2cc8c..4c70966 100644 --- a/dist/assets/index-DikBC4WP.js +++ b/dist/assets/index-nRSe4xNB.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-ZNL3XKVp.js","assets/index-Ba59pKR3.js","assets/login-BDn7Jzn7.css","assets/index-eGhvKdrr.js","assets/bus-C8MdfDPM.js","assets/index-NNRUZ5z2.css","assets/index-DB_z42wD.js","assets/room-BKpValiO.js","assets/room-C5nwLQie.css","assets/index-CPnqFNg3.css","assets/index-MzbCaf1h.css","assets/index-BEyUpNsD.js","assets/index-Dw4wCXlI.css","assets/404-W2OpILVy.js","assets/404-Cb2yUGol.css","assets/401-BnzQ57U8.js","assets/401-BSBdQqy4.css","assets/index-Dikrwr7L.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-B5BrSdAh.js","assets/index-Dl6L4IJG.js","assets/login-BDn7Jzn7.css","assets/index-Ba0DPdLo.js","assets/bus-C8MdfDPM.js","assets/index-NNRUZ5z2.css","assets/index-BTk2IbAr.js","assets/room-BSjtcFv-.js","assets/room-C5nwLQie.css","assets/index-BcEVQeTV.css","assets/index-MzbCaf1h.css","assets/index-CybmVna1.js","assets/index-Dw4wCXlI.css","assets/404-DS_mPX5a.js","assets/404-Cb2yUGol.css","assets/401-8RIqH0GR.js","assets/401-BSBdQqy4.css","assets/index-D79yuk_J.js"])))=>i.map(i=>d[i]); var pP=Object.defineProperty;var M3=e=>{throw TypeError(e)};var hP=(e,t,n)=>t in e?pP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ut=(e,t,n)=>hP(e,typeof t!="symbol"?t+"":t,n),Pm=(e,t,n)=>t.has(e)||M3("Cannot "+n);var Ie=(e,t,n)=>(Pm(e,t,"read from private field"),n?n.call(e):t.get(e)),en=(e,t,n)=>t.has(e)?M3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Mt=(e,t,n,r)=>(Pm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),bt=(e,t,n)=>(Pm(e,t,"access private method"),n);var Sf=(e,t,n,r)=>({set _(o){Mt(e,t,o,n)},get _(){return Ie(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();/** * @vue/shared v3.5.20 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -124,4 +124,4 @@ safe-buffer/index.js: @babel/runtime/helpers/regenerator.js: (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *) -*/const uQe={clean:!0,connectTimeout:4e3,reconnectPeriod:1e3,qos:1},cQe="wss://push.cnsdt.com:443/mqtt";class dQe{constructor(){this.client=null,this.subscriptions=new Set,this.messageHandlers=new Map}connect(t){return this.client&&this.client.connected?Promise.resolve():new Promise((n,r)=>{this.client=lQe.connect(cQe,{...uQe,clientId:t||`client_${Math.random().toString(16).substr(2,8)}`}),this.client.on("connect",()=>n()),this.client.on("error",o=>r(o)),this.client.on("message",(o,s)=>{try{this.messageHandlers.forEach((a,i)=>{this.topicMatch(i,o)&&a.forEach(l=>l(s,o))})}catch(a){console.error("MQTT message parse error:",a)}})})}disconnect(){this.client&&(this.client.end(),this.client=null,this.subscriptions.clear(),this.messageHandlers.clear())}subscribe(t,n){if(!this.client||!this.client.connected){console.error("MQTT client not connected");return}this.subscriptions.has(t)||this.client.subscribe(t,{qos:1},o=>{o?console.error("Subscription error:",o):this.subscriptions.add(t)});const r=this.messageHandlers.get(t)||[];r.push(n),this.messageHandlers.set(t,r)}unsubscribe(t,n){if(this.subscriptions.has(t))if(n){const r=this.messageHandlers.get(t)||[],o=r.indexOf(n);o!==-1&&(r.splice(o,1),this.messageHandlers.set(t,r))}else this.client.unsubscribe(t),this.subscriptions.delete(t),this.messageHandlers.delete(t)}publish(t,n){if(!this.client||!this.client.connected){console.error("MQTT client not connected");return}this.client.publish(t,JSON.stringify(n),{qos:1})}topicMatch(t,n){const r=t.split("/"),o=n.split("/");for(let s=0;s {try{(await kE(o.value.room_uid,{status:5})).meta.code==200&&(hr({message:"已拒绝加入该协作",type:"error"}),r.value=!1)}catch(u){console.log(u,"error"),r.value=!1}finally{r.value=!1}},a=async()=>{(await kE(o.value.room_uid,{status:1})).meta.code==200&&(hr({message:"成功加入该协作",type:"success"}),r.value=!1,n.push({path:"/conferencingRoom",query:{room_uid:o.value.room_uid}})),r.value=!1},i=u=>{"Notification"in window&&Notification.requestPermission().then(c=>{if(c==="granted"){const d=new Notification("协作邀请",{body:"远程协作有新的邀请"});d.onclick=()=>{a()}}})};return t({processingSocket:u=>{const c=JSON.parse(u);console.log(c,"收到用户信息 邀请"),c!=null&&c.status?c.status==5&&hr({message:`${c==null?void 0:c.display_name}拒绝加入该协作`,type:"error"}):(o.value=c,r.value=!0,i(o.value))}}),(u,c)=>{const d=rt("el-button"),f=rt("el-dialog");return k(),Me(f,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r.value=p),title:"远程协作",width:"400px","close-on-press-escape":!1,"close-on-click-modal":!1,"show-close":!1},{default:be(()=>[R("div",fQe,' " '+ze(o.value.room_name?o.value.room_name:"")+' " 邀请您参加远程协作 ',1),R("div",pQe,[me(d,{size:"large",type:"danger",style:{"font-size":"16px"},onClick:s},{default:be(()=>[...c[1]||(c[1]=[Ot(" 拒 绝 ",-1)])]),_:1}),me(d,{size:"large",type:"primary",style:{"font-size":"16px"},onClick:a},{default:be(()=>[...c[2]||(c[2]=[Ot(" 加 入 ",-1)])]),_:1})])]),_:1},8,["modelValue"])}}},mQe={class:"wrapper-content"},vQe={class:"content-nav"},gQe={class:"nav-right"},_Qe={class:"avatar-wrapper"},yQe={class:"username"},bQe={class:"sidebar-right"},wQe=992,SQe={__name:"index",setup(e){const t=h3(),n=Rm(),r=RO();gO();const o=ee(null),s=z(()=>t.theme),a=z(()=>r.sidebar),i=z(()=>r.device),l=z(()=>t.tagsView),u=z(()=>{if(n.name)return n.name;try{const g=sessionStorage.getItem("userData");if(g)return JSON.parse(g).name||""}catch(g){console.error("解析 userData 失败:",g)}return""}),c=z(()=>({hideSidebar:!a.value.opened,openSidebar:a.value.opened,withoutAnimation:a.value.withoutAnimation,mobile:i.value==="mobile"})),d=ee(null),{width:f}=Lx();Cr(()=>{i.value==="mobile"&&a.value.opened&&r.closeSideBar({withoutAnimation:!1}),f.value-1 {n.logOut().then(()=>{location.href="/"})}).catch(()=>{hr({type:"info",message:"取消注销"})})}function v(){r.closeSideBar({withoutAnimation:!1})}return vt(async()=>{await NC.connect(`room${Math.random().toString(16).substr(2,8)}`);const b=`xSynergy/ROOM/+/rooms/${(await n.getInfo()).uid}`;NC.subscribe(b,async _=>{o.value&&o.value.processingSocket(_.toString())})}),(g,b)=>{const _=rt("el-dropdown-item"),y=rt("el-dropdown-menu"),S=rt("el-dropdown");return k(),D("div",mQe,[R("div",vQe,[b[2]||(b[2]=R("div",{class:"nav-left"},[R("div",null,"xSynergy远程协作系统")],-1)),R("div",gQe,[me(S,{trigger:"click",onCommand:p},{dropdown:be(()=>[me(y,null,{default:be(()=>[me(_,{command:"changePassword"},{default:be(()=>[...b[0]||(b[0]=[R("span",null,"修改密码",-1)])]),_:1}),me(_,{command:"logout",divided:""},{default:be(()=>[...b[1]||(b[1]=[R("span",null,"退出登录",-1)])]),_:1})]),_:1})]),default:be(()=>[R("div",_Qe,[R("span",yQe,ze(h(u)),1)])]),_:1})])]),R("div",{class:W([h(c),"app-wrapper"]),style:Je({"--current-color":h(s)})},[h(i)==="mobile"&&h(a).opened?(k(),D("div",{key:0,class:"drawer-bg",onClick:v})):Ae("",!0),R("div",{class:W(["main-container",{hasTagsView:h(l),sidebarHide:h(a).hide}])},[h(a).hide?Ae("",!0):(k(),Me(qYe,{key:0,class:"sidebar-container"})),R("div",bQe,[me(h(QYe))])],2)],6),me(h(ZYe),{ref_key:"resetPwdRef",ref:d},null,512),me(h(hQe),{ref_key:"inviteJoinRef",ref:o},null,512)])}}},LC=NO(SQe,[["__scopeId","data-v-1d387183"]]),fP=[{path:"/redirect",component:LC,hidden:!0,children:[{path:"/redirect/:path(.*)",component:()=>Zo(()=>import("./index-FyyzhRyL.js"),[])}]},{path:"/",redirect:"/login",hidden:!0},{path:"/login",component:()=>Zo(()=>import("./login-ZNL3XKVp.js"),__vite__mapDeps([0,1,2])),meta:{title:"登录"},hidden:!0},{path:"/whiteboard",component:()=>Zo(()=>import("./index-eGhvKdrr.js"),__vite__mapDeps([3,4,5])),meta:{title:"白板"},hidden:!0},{path:"/coordinate",redirect:"/coordinate/CoordinatePage",component:LC,children:[{path:"CoordinatePage",name:"Coordinate",component:()=>Zo(()=>import("./index-DB_z42wD.js"),__vite__mapDeps([6,7,4,8,9,10])),meta:{title:"远程协作",icon:"client",affix:!0}}]},{path:"/conferencingRoom",hidden:!0,children:[{path:"",name:"ConferencingRoom",component:()=>Zo(()=>import("./index-BEyUpNsD.js"),__vite__mapDeps([11,7,4,8,3,5,1,12])),meta:{title:"会议房间",icon:"client",affix:!0}}]},{path:"/:pathMatch(.*)*",component:()=>Zo(()=>import("./404-W2OpILVy.js"),__vite__mapDeps([13,14])),hidden:!0},{path:"/401",component:()=>Zo(()=>import("./401-BnzQ57U8.js"),__vite__mapDeps([15,16])),hidden:!0,meta:{title:"401未授权"}},{path:"/assistWx",component:()=>Zo(()=>import("./index-Dikrwr7L.js"),__vite__mapDeps([17,10])),meta:{title:"白板"},hidden:!0}],Qa=sGe({history:NKe("/"),routes:fP,scrollBehavior(e,t,n){return n||{top:0}}}),I3="token";function p0(){return sessionStorage.getItem(I3)}function EQe(e){return sessionStorage.setItem(I3,e)}function A3(){return sessionStorage.removeItem(I3)}function JQe(){try{const e=sessionStorage.getItem("userData");if(!e)return d2(),null;try{return JSON.parse(e)}catch(t){return console.error("用户数据格式错误,无法解析JSON:",t),sessionStorage.removeItem("userData"),d2(),null}}catch(e){return console.error("获取用户信息时发生错误:",e),d2(),null}}function d2(){A3(),Zo(async()=>{const{nextTick:e}=await Promise.resolve().then(()=>bk);return{nextTick:e}},void 0).then(({nextTick:e})=>{e(()=>{const t=Qa.currentRoute.value.fullPath;Qa.currentRoute.value.path!=="/login"?Qa.push({path:"/login",query:{redirect:t!=="/login"?t:void 0}}):window.location.reload()})})}function CQe(){var e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n==="x"?r:r&3|8).toString(16)})}const kQe=Kd("meter",{state:()=>({udid:""}),actions:{initUdid(){var e=window.localStorage.getItem("UDID");e||(e=CQe(),window.localStorage.setItem("UDID",e)),this.setUdid(e)},setUdid(e){this.udid=e},getUdid(){return this.udid},getSudid(){var e=new Uint8Array(this.udid.match(/[\da-f]{2}/gi).map(function(n){return parseInt(n,16)}));return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}}});OO.defaults.headers["Content-Type"]="application/json;charset=utf-8";const TQe=()=>"",Qn=OO.create({baseURL:TQe()});Qn.interceptors.request.use(e=>{let t="";try{const o=kQe();o.udid||o.initUdid(),t=o.getSudid()}catch(o){console.warn("MeterStore 初始化失败:",o)}const n=(e.headers||{}).isToken===!1;p0()&&!n&&(e.headers.Authorization="Bearer "+p0());const r=(e.headers||{}).repeatSubmit===!1;if(t&&(e.headers["X-User-Agent"]=`gxtech/web 1.0.0: c=GxTech, udid=${t}, sv=15.4.1, app=stt`),e.method==="get"&&e.params){let o=e.url+"?"+tK(e.params);o=o.slice(0,-1),e.params={},e.url=o}if(!r&&(e.method==="post"||e.method==="put")){const o={url:e.url,data:typeof e.data=="object"?JSON.stringify(e.data):e.data,time:new Date().getTime()},s=Object.keys(JSON.stringify(o)).length,a=5*1024*1024;if(s>=a)return console.warn(`[${e.url}]: 请求数据大小超出允许的5M限制,无法进行防重复提交验证。`),e;const i=i2.session.getJSON("sessionObj");if(i==null||i==="")i2.session.setJSON("sessionObj",o);else{const l=i.url,u=i.data,c=i.time;if(u===o.data&&o.time-c<1e3&&l===o.url){const f="数据正在处理,请勿重复提交";return console.warn(`[${l}]: `+f),Promise.reject(new Error(f))}else i2.session.setJSON("sessionObj",o)}}return e},e=>{Promise.reject(e)});Qn.interceptors.response.use(e=>{var o,s,a;if(!e)return hr.error("无响应数据"),Promise.reject(new Error("无响应数据"));const t=e.data||{},n=e.status,r=((o=t.meta)==null?void 0:o.code)||n;if(e.request.responseType==="blob"||e.request.responseType==="arraybuffer")return t;switch(r){case 200:case 201:return Promise.resolve(t);case 401:return $Qe();case 500:const i=((s=t.meta)==null?void 0:s.message)||"服务器内部错误";return hr({message:i,type:"error"}),Promise.reject({code:500,message:i});default:const l=((a=t.meta)==null?void 0:a.message)||`业务错误 (${r})`;return rO.error({title:l}),Promise.reject({code:r,message:l})}},e=>{var r;let{message:t}=e,n=((r=e==null?void 0:e.response)==null?void 0:r.status)||-1;return t=="Network Error"?(t="后端接口连接异常",hr({message:t,type:"error",duration:5*1e3})):t.includes("timeout")?(t="系统接口请求超时",hr({message:t,type:"error",duration:5*1e3})):t.includes("Request failed with status code"),Promise.reject({code:n,message:t,raw:e})});function $Qe(){A3(),Zo(async()=>{const{nextTick:e}=await Promise.resolve().then(()=>bk);return{nextTick:e}},void 0).then(({nextTick:e})=>{e(()=>{const t=Qa.currentRoute.value.fullPath;Qa.currentRoute.value.path!=="/login"?Qa.push({path:"/login",query:{redirect:t!=="/login"?t:void 0}}):window.location.reload()})})}function xQe(e,t){return Qn({url:"/api/v1/auth/login",headers:{isToken:!1},method:"post",data:{username:e,password:t}})}function QQe(e){return Qn({url:`/api/v1/auth/users/${e}`,method:"get"})}function IQe(){return Qn({url:"/api/v1/auth/logout",method:"post"})}function AQe(e,t){return Qn({url:"/api/v1/auth/change-password",method:"post",data:{old_password:e,new_password:t}})}function BC(e){return Qn({url:"/api/v1/auth/check-password-strength",method:"post",data:{password:e}})}const Rm=Kd("user",{state:()=>({token:p0(),name:"",avatar:"",roles:""}),actions:{async login(e){var t;try{const{username:n,password:r}=e,o=n.trim(),s=await xQe(o,r);if(s.meta.code!==200)return hr({message:((t=s.meta)==null?void 0:t.message)||"登录失败",type:"error"}),Promise.reject(s);const{token:a,user:i}=s.data;this.name=i.name,sessionStorage.setItem("userData",JSON.stringify(i)),EQe(a),this.token=a}catch(n){throw console.error("登录失败:",n),n}},getInfo(){return new Promise((e,t)=>{try{const n=sessionStorage.getItem("userData");if(!n)return t(new Error("未找到用户数据"));const r=JSON.parse(n);if(!r)return t(new Error("用户数据格式无效"));e(r)}catch(n){console.error("获取用户信息失败:",n),t(n instanceof Error?n:new Error("解析用户数据失败"))}})},async logOut(){var e;try{const t=await IQe();if(t.meta.code!==200){hr({message:((e=t.meta)==null?void 0:e.message)||"退出登录失败",type:"error"});return}this.token="",this.roles="",sessionStorage.removeItem("userData"),A3()}catch(t){throw console.error("退出登录失败:",t),t}},checkLogin(){return!!p0()}}}),MQe={__name:"App",setup(e){return vt(()=>{try{const t=Rm()}catch(t){console.warn("App.vue: Pinia 初始化中...",t)}}),(t,n)=>(k(),Me(h(vO)))}},OQe=bL(),lc=Fy(MQe);Jq({app:lc,dsn:"https://34a0d76174a64db09d31d13a8042560b@sentry.cnsdt.com/2",integrations:[eK({router:Qa}),vq({maskAllText:!1,blockAllMedia:!1})],tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,environment:"production",enabled:!0});for(const[e,t]of Object.entries(JCe))lc.component(e,t);lc.use(OQe);lc.use(Qa);lc.use(nKe,{locale:rKe});lc.mount("#app");export{qt as $,fn as A,At as B,Pe as C,Ae as D,hr as E,Ze as F,Je as G,Cr as H,GP as I,NC as J,tO as K,Xe as L,GQe as M,ia as N,pa as O,fa as P,ea as Q,vr as R,qx as S,Kd as T,Ht as U,On as V,Za as W,mt as X,W as Y,LQe as Z,NO as _,gO as a,NQe as a0,Xw as a1,JQe as a2,QQe as a3,HQe as a4,VQe as a5,UQe as a6,XQe as a7,YQe as a8,WQe as a9,qQe as aa,KQe as ab,X5e as ac,jQe as ad,da as ae,Qu as af,pbe as ag,vqe as ah,BQe as ai,ya as aj,Go as ak,z as b,D as c,me as d,rt as e,R as f,Me as g,Ot as h,Rm as i,gt as j,kQe as k,Be as l,vt as m,Rt as n,k as o,ct as p,rk as q,ee as r,h as s,ze as t,_O as u,Qn as v,be as w,Ce as x,rn as y,gn as z}; +*/const uQe={clean:!0,connectTimeout:4e3,reconnectPeriod:1e3,qos:1},cQe="wss://push.cnsdt.com:443/mqtt";class dQe{constructor(){this.client=null,this.subscriptions=new Set,this.messageHandlers=new Map}connect(t){return this.client&&this.client.connected?Promise.resolve():new Promise((n,r)=>{this.client=lQe.connect(cQe,{...uQe,clientId:t||`client_${Math.random().toString(16).substr(2,8)}`}),this.client.on("connect",()=>n()),this.client.on("error",o=>r(o)),this.client.on("message",(o,s)=>{try{this.messageHandlers.forEach((a,i)=>{this.topicMatch(i,o)&&a.forEach(l=>l(s,o))})}catch(a){console.error("MQTT message parse error:",a)}})})}disconnect(){this.client&&(this.client.end(),this.client=null,this.subscriptions.clear(),this.messageHandlers.clear())}subscribe(t,n){if(!this.client||!this.client.connected){console.error("MQTT client not connected");return}this.subscriptions.has(t)||this.client.subscribe(t,{qos:1},o=>{o?console.error("Subscription error:",o):this.subscriptions.add(t)});const r=this.messageHandlers.get(t)||[];r.push(n),this.messageHandlers.set(t,r)}unsubscribe(t,n){if(this.subscriptions.has(t))if(n){const r=this.messageHandlers.get(t)||[],o=r.indexOf(n);o!==-1&&(r.splice(o,1),this.messageHandlers.set(t,r))}else this.client.unsubscribe(t),this.subscriptions.delete(t),this.messageHandlers.delete(t)}publish(t,n){if(!this.client||!this.client.connected){console.error("MQTT client not connected");return}this.client.publish(t,JSON.stringify(n),{qos:1})}topicMatch(t,n){const r=t.split("/"),o=n.split("/");for(let s=0;s {try{(await kE(o.value.room_uid,{status:5})).meta.code==200&&(hr({message:"已拒绝加入该协作",type:"error"}),r.value=!1)}catch(u){console.log(u,"error"),r.value=!1}finally{r.value=!1}},a=async()=>{(await kE(o.value.room_uid,{status:1})).meta.code==200&&(hr({message:"成功加入该协作",type:"success"}),r.value=!1,n.push({path:"/conferencingRoom",query:{room_uid:o.value.room_uid}})),r.value=!1},i=u=>{"Notification"in window&&Notification.requestPermission().then(c=>{if(c==="granted"){const d=new Notification("协作邀请",{body:"远程协作有新的邀请"});d.onclick=()=>{a()}}})};return t({processingSocket:u=>{const c=JSON.parse(u);console.log(c,"收到用户信息 邀请"),c!=null&&c.status?c.status==5&&hr({message:`${c==null?void 0:c.display_name}拒绝加入该协作`,type:"error"}):(o.value=c,r.value=!0,i(o.value))}}),(u,c)=>{const d=rt("el-button"),f=rt("el-dialog");return k(),Me(f,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r.value=p),title:"远程协作",width:"400px","close-on-press-escape":!1,"close-on-click-modal":!1,"show-close":!1},{default:be(()=>[R("div",fQe,' " '+ze(o.value.room_name?o.value.room_name:"")+' " 邀请您参加远程协作 ',1),R("div",pQe,[me(d,{size:"large",type:"danger",style:{"font-size":"16px"},onClick:s},{default:be(()=>[...c[1]||(c[1]=[Ot(" 拒 绝 ",-1)])]),_:1}),me(d,{size:"large",type:"primary",style:{"font-size":"16px"},onClick:a},{default:be(()=>[...c[2]||(c[2]=[Ot(" 加 入 ",-1)])]),_:1})])]),_:1},8,["modelValue"])}}},mQe={class:"wrapper-content"},vQe={class:"content-nav"},gQe={class:"nav-right"},_Qe={class:"avatar-wrapper"},yQe={class:"username"},bQe={class:"sidebar-right"},wQe=992,SQe={__name:"index",setup(e){const t=h3(),n=Rm(),r=RO();gO();const o=ee(null),s=z(()=>t.theme),a=z(()=>r.sidebar),i=z(()=>r.device),l=z(()=>t.tagsView),u=z(()=>{if(n.name)return n.name;try{const g=sessionStorage.getItem("userData");if(g)return JSON.parse(g).name||""}catch(g){console.error("解析 userData 失败:",g)}return""}),c=z(()=>({hideSidebar:!a.value.opened,openSidebar:a.value.opened,withoutAnimation:a.value.withoutAnimation,mobile:i.value==="mobile"})),d=ee(null),{width:f}=Lx();Cr(()=>{i.value==="mobile"&&a.value.opened&&r.closeSideBar({withoutAnimation:!1}),f.value-1 {n.logOut().then(()=>{location.href="/"})}).catch(()=>{hr({type:"info",message:"取消注销"})})}function v(){r.closeSideBar({withoutAnimation:!1})}return vt(async()=>{await NC.connect(`room${Math.random().toString(16).substr(2,8)}`);const b=`xsynergy/room/+/rooms/${(await n.getInfo()).uid}`;NC.subscribe(b,async _=>{o.value&&o.value.processingSocket(_.toString())})}),(g,b)=>{const _=rt("el-dropdown-item"),y=rt("el-dropdown-menu"),S=rt("el-dropdown");return k(),D("div",mQe,[R("div",vQe,[b[2]||(b[2]=R("div",{class:"nav-left"},[R("div",null,"xSynergy远程协作系统")],-1)),R("div",gQe,[me(S,{trigger:"click",onCommand:p},{dropdown:be(()=>[me(y,null,{default:be(()=>[me(_,{command:"changePassword"},{default:be(()=>[...b[0]||(b[0]=[R("span",null,"修改密码",-1)])]),_:1}),me(_,{command:"logout",divided:""},{default:be(()=>[...b[1]||(b[1]=[R("span",null,"退出登录",-1)])]),_:1})]),_:1})]),default:be(()=>[R("div",_Qe,[R("span",yQe,ze(h(u)),1)])]),_:1})])]),R("div",{class:W([h(c),"app-wrapper"]),style:Je({"--current-color":h(s)})},[h(i)==="mobile"&&h(a).opened?(k(),D("div",{key:0,class:"drawer-bg",onClick:v})):Ae("",!0),R("div",{class:W(["main-container",{hasTagsView:h(l),sidebarHide:h(a).hide}])},[h(a).hide?Ae("",!0):(k(),Me(qYe,{key:0,class:"sidebar-container"})),R("div",bQe,[me(h(QYe))])],2)],6),me(h(ZYe),{ref_key:"resetPwdRef",ref:d},null,512),me(h(hQe),{ref_key:"inviteJoinRef",ref:o},null,512)])}}},LC=NO(SQe,[["__scopeId","data-v-3ec74d02"]]),fP=[{path:"/redirect",component:LC,hidden:!0,children:[{path:"/redirect/:path(.*)",component:()=>Zo(()=>import("./index-DbXor-TX.js"),[])}]},{path:"/",redirect:"/login",hidden:!0},{path:"/login",component:()=>Zo(()=>import("./login-B5BrSdAh.js"),__vite__mapDeps([0,1,2])),meta:{title:"登录"},hidden:!0},{path:"/whiteboard",component:()=>Zo(()=>import("./index-Ba0DPdLo.js"),__vite__mapDeps([3,4,5])),meta:{title:"白板"},hidden:!0},{path:"/coordinate",redirect:"/coordinate/CoordinatePage",component:LC,children:[{path:"CoordinatePage",name:"Coordinate",component:()=>Zo(()=>import("./index-BTk2IbAr.js"),__vite__mapDeps([6,7,4,8,9,10])),meta:{title:"远程协作",icon:"client",affix:!0}}]},{path:"/conferencingRoom",hidden:!0,children:[{path:"",name:"ConferencingRoom",component:()=>Zo(()=>import("./index-CybmVna1.js"),__vite__mapDeps([11,7,4,8,3,5,1,12])),meta:{title:"会议房间",icon:"client",affix:!0}}]},{path:"/:pathMatch(.*)*",component:()=>Zo(()=>import("./404-DS_mPX5a.js"),__vite__mapDeps([13,14])),hidden:!0},{path:"/401",component:()=>Zo(()=>import("./401-8RIqH0GR.js"),__vite__mapDeps([15,16])),hidden:!0,meta:{title:"401未授权"}},{path:"/assistWx",component:()=>Zo(()=>import("./index-D79yuk_J.js"),__vite__mapDeps([17,10])),meta:{title:"白板"},hidden:!0}],Qa=sGe({history:NKe("/"),routes:fP,scrollBehavior(e,t,n){return n||{top:0}}}),I3="token";function p0(){return sessionStorage.getItem(I3)}function EQe(e){return sessionStorage.setItem(I3,e)}function A3(){return sessionStorage.removeItem(I3)}function JQe(){try{const e=sessionStorage.getItem("userData");if(!e)return d2(),null;try{return JSON.parse(e)}catch(t){return console.error("用户数据格式错误,无法解析JSON:",t),sessionStorage.removeItem("userData"),d2(),null}}catch(e){return console.error("获取用户信息时发生错误:",e),d2(),null}}function d2(){A3(),Zo(async()=>{const{nextTick:e}=await Promise.resolve().then(()=>bk);return{nextTick:e}},void 0).then(({nextTick:e})=>{e(()=>{const t=Qa.currentRoute.value.fullPath;Qa.currentRoute.value.path!=="/login"?Qa.push({path:"/login",query:{redirect:t!=="/login"?t:void 0}}):window.location.reload()})})}function CQe(){var e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n==="x"?r:r&3|8).toString(16)})}const kQe=Kd("meter",{state:()=>({udid:""}),actions:{initUdid(){var e=window.localStorage.getItem("UDID");e||(e=CQe(),window.localStorage.setItem("UDID",e)),this.setUdid(e)},setUdid(e){this.udid=e},getUdid(){return this.udid},getSudid(){var e=new Uint8Array(this.udid.match(/[\da-f]{2}/gi).map(function(n){return parseInt(n,16)}));return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}}});OO.defaults.headers["Content-Type"]="application/json;charset=utf-8";const TQe=()=>"",Qn=OO.create({baseURL:TQe()});Qn.interceptors.request.use(e=>{let t="";try{const o=kQe();o.udid||o.initUdid(),t=o.getSudid()}catch(o){console.warn("MeterStore 初始化失败:",o)}const n=(e.headers||{}).isToken===!1;p0()&&!n&&(e.headers.Authorization="Bearer "+p0());const r=(e.headers||{}).repeatSubmit===!1;if(t&&(e.headers["X-User-Agent"]=`gxtech/web 1.0.0: c=GxTech, udid=${t}, sv=15.4.1, app=stt`),e.method==="get"&&e.params){let o=e.url+"?"+tK(e.params);o=o.slice(0,-1),e.params={},e.url=o}if(!r&&(e.method==="post"||e.method==="put")){const o={url:e.url,data:typeof e.data=="object"?JSON.stringify(e.data):e.data,time:new Date().getTime()},s=Object.keys(JSON.stringify(o)).length,a=5*1024*1024;if(s>=a)return console.warn(`[${e.url}]: 请求数据大小超出允许的5M限制,无法进行防重复提交验证。`),e;const i=i2.session.getJSON("sessionObj");if(i==null||i==="")i2.session.setJSON("sessionObj",o);else{const l=i.url,u=i.data,c=i.time;if(u===o.data&&o.time-c<1e3&&l===o.url){const f="数据正在处理,请勿重复提交";return console.warn(`[${l}]: `+f),Promise.reject(new Error(f))}else i2.session.setJSON("sessionObj",o)}}return e},e=>{Promise.reject(e)});Qn.interceptors.response.use(e=>{var o,s,a;if(!e)return hr.error("无响应数据"),Promise.reject(new Error("无响应数据"));const t=e.data||{},n=e.status,r=((o=t.meta)==null?void 0:o.code)||n;if(e.request.responseType==="blob"||e.request.responseType==="arraybuffer")return t;switch(r){case 200:case 201:return Promise.resolve(t);case 401:return $Qe();case 500:const i=((s=t.meta)==null?void 0:s.message)||"服务器内部错误";return hr({message:i,type:"error"}),Promise.reject({code:500,message:i});default:const l=((a=t.meta)==null?void 0:a.message)||`业务错误 (${r})`;return rO.error({title:l}),Promise.reject({code:r,message:l})}},e=>{var r;let{message:t}=e,n=((r=e==null?void 0:e.response)==null?void 0:r.status)||-1;return t=="Network Error"?(t="后端接口连接异常",hr({message:t,type:"error",duration:5*1e3})):t.includes("timeout")?(t="系统接口请求超时",hr({message:t,type:"error",duration:5*1e3})):t.includes("Request failed with status code"),Promise.reject({code:n,message:t,raw:e})});function $Qe(){A3(),Zo(async()=>{const{nextTick:e}=await Promise.resolve().then(()=>bk);return{nextTick:e}},void 0).then(({nextTick:e})=>{e(()=>{const t=Qa.currentRoute.value.fullPath;Qa.currentRoute.value.path!=="/login"?Qa.push({path:"/login",query:{redirect:t!=="/login"?t:void 0}}):window.location.reload()})})}function xQe(e,t){return Qn({url:"/api/v1/auth/login",headers:{isToken:!1},method:"post",data:{username:e,password:t}})}function QQe(e){return Qn({url:`/api/v1/auth/users/${e}`,method:"get"})}function IQe(){return Qn({url:"/api/v1/auth/logout",method:"post"})}function AQe(e,t){return Qn({url:"/api/v1/auth/change-password",method:"post",data:{old_password:e,new_password:t}})}function BC(e){return Qn({url:"/api/v1/auth/check-password-strength",method:"post",data:{password:e}})}const Rm=Kd("user",{state:()=>({token:p0(),name:"",avatar:"",roles:""}),actions:{async login(e){var t;try{const{username:n,password:r}=e,o=n.trim(),s=await xQe(o,r);if(s.meta.code!==200)return hr({message:((t=s.meta)==null?void 0:t.message)||"登录失败",type:"error"}),Promise.reject(s);const{token:a,user:i}=s.data;this.name=i.name,sessionStorage.setItem("userData",JSON.stringify(i)),EQe(a),this.token=a}catch(n){throw console.error("登录失败:",n),n}},getInfo(){return new Promise((e,t)=>{try{const n=sessionStorage.getItem("userData");if(!n)return t(new Error("未找到用户数据"));const r=JSON.parse(n);if(!r)return t(new Error("用户数据格式无效"));e(r)}catch(n){console.error("获取用户信息失败:",n),t(n instanceof Error?n:new Error("解析用户数据失败"))}})},async logOut(){var e;try{const t=await IQe();if(t.meta.code!==200){hr({message:((e=t.meta)==null?void 0:e.message)||"退出登录失败",type:"error"});return}this.token="",this.roles="",sessionStorage.removeItem("userData"),A3()}catch(t){throw console.error("退出登录失败:",t),t}},checkLogin(){return!!p0()}}}),MQe={__name:"App",setup(e){return vt(()=>{try{const t=Rm()}catch(t){console.warn("App.vue: Pinia 初始化中...",t)}}),(t,n)=>(k(),Me(h(vO)))}},OQe=bL(),lc=Fy(MQe);Jq({app:lc,dsn:"https://34a0d76174a64db09d31d13a8042560b@sentry.cnsdt.com/2",integrations:[eK({router:Qa}),vq({maskAllText:!1,blockAllMedia:!1})],tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,environment:"production",enabled:!0});for(const[e,t]of Object.entries(JCe))lc.component(e,t);lc.use(OQe);lc.use(Qa);lc.use(nKe,{locale:rKe});lc.mount("#app");export{qt as $,fn as A,At as B,Pe as C,Ae as D,hr as E,Ze as F,Je as G,Cr as H,GP as I,NC as J,tO as K,Xe as L,GQe as M,ia as N,pa as O,fa as P,ea as Q,vr as R,qx as S,Kd as T,Ht as U,On as V,Za as W,mt as X,W as Y,LQe as Z,NO as _,gO as a,NQe as a0,Xw as a1,JQe as a2,QQe as a3,HQe as a4,VQe as a5,UQe as a6,XQe as a7,YQe as a8,WQe as a9,qQe as aa,KQe as ab,X5e as ac,jQe as ad,da as ae,Qu as af,pbe as ag,vqe as ah,BQe as ai,ya as aj,Go as ak,z as b,D as c,me as d,rt as e,R as f,Me as g,Ot as h,Rm as i,gt as j,kQe as k,Be as l,vt as m,Rt as n,k as o,ct as p,rk as q,ee as r,h as s,ze as t,_O as u,Qn as v,be as w,Ce as x,rn as y,gn as z}; diff --git a/dist/assets/index-nRSe4xNB.js.gz b/dist/assets/index-nRSe4xNB.js.gz new file mode 100644 index 0000000..b4ecf8b Binary files /dev/null and b/dist/assets/index-nRSe4xNB.js.gz differ diff --git a/dist/assets/login-ZNL3XKVp.js b/dist/assets/login-B5BrSdAh.js similarity index 95% rename from dist/assets/login-ZNL3XKVp.js rename to dist/assets/login-B5BrSdAh.js index 7d6aa37..3f8eab0 100644 --- a/dist/assets/login-ZNL3XKVp.js +++ b/dist/assets/login-B5BrSdAh.js @@ -1 +1 @@ -import{_ as q,i as M,j as N,k as U,r as d,l as b,m as D,c as _,f as m,d as a,w as u,e as p,a as R,u as B,o as h,n as z,p as E,E as K}from"./index-DikBC4WP.js";import{C as L}from"./index-Ba59pKR3.js";const A={class:"loginView"},J={class:"wrapper-content"},P={class:"login-form"},$={key:0},j={key:1},F={__name:"login",setup(G){const w=M(),r=R(),y=B(),{proxy:S}=N(),C=U(),l=d(void 0);d(!0),b(()=>y,o=>{l.value=o.query&&o.query.redirect},{immediate:!0});const t=d({username:"",password:""}),V={username:[{required:!0,trigger:"blur",message:"请输入用户名"}],password:[{required:!0,trigger:"blur",message:"请输入密码"}]},i=d(!1);function v(){S.$refs.loginRef.validate(o=>{if(o){if(i.value=!0,!(localStorage!=null&&localStorage.getItem("UDID"))){K({message:"服务错误,请刷新页面",type:"warning"});return}const e=(t.value.username+(localStorage==null?void 0:localStorage.getItem("UDID"))).toLowerCase().replaceAll("-",""),s=`Gx${I(6)}${t.value.password}`,f=L.Blowfish.encrypt(s,e).toString();w.login({password:f,username:t.value.username}).then(async c=>{JSON.parse(sessionStorage.getItem("userData")),await x()}).catch(c=>{console.log("登录失败",c),i.value=!1})}}),k()}async function x(){try{if(l.value&&l.value!=="/login")try{r.resolve(l.value).matched.length>0?await r.push(l.value):(console.warn("重定向路径无效,跳转到默认页面"),await r.push("/coordinate"))}catch(o){console.warn("重定向跳转失败,跳转到默认页面:",o),await r.push("/coordinate")}else await r.push("/coordinate")}catch(o){console.error("登录跳转异常:",o),await r.push("/coordinate")}finally{i.value=!1}}function I(o){const e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let s=0;s {}):console.log("浏览器不支持通知")}return D(async()=>{C.initUdid()}),(o,e)=>{const n=p("el-input"),s=p("el-form-item"),f=p("el-button"),c=p("el-form");return h(),_("div",A,[m("div",J,[m("div",P,[e[3]||(e[3]=m("div",{class:"selected-rectangle"},null,-1)),a(c,{ref:"loginRef",class:"form-info",model:t.value,rules:V},{default:u(()=>[e[2]||(e[2]=m("h3",{class:"title"},"欢迎登录",-1)),a(s,{prop:"username"},{default:u(()=>[a(n,{modelValue:t.value.username,"onUpdate:modelValue":e[0]||(e[0]=g=>t.value.username=g),"auto-complete":"off",placeholder:"请输入您的账号",size:"large",type:"text"},null,8,["modelValue"])]),_:1}),a(s,{prop:"password"},{default:u(()=>[a(n,{modelValue:t.value.password,"onUpdate:modelValue":e[1]||(e[1]=g=>t.value.password=g),"auto-complete":"off",placeholder:"请输入密码",size:"large",type:"password",onKeyup:z(v,["enter"])},null,8,["modelValue"])]),_:1}),a(s,null,{default:u(()=>[a(f,{loading:i.value,size:"large",class:"button-login",type:"primary",onClick:E(v,["prevent"])},{default:u(()=>[i.value?(h(),_("span",j,"登录中...")):(h(),_("span",$,"登 录"))]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])])])])}}},Q=q(F,[["__scopeId","data-v-aec6e781"]]);export{Q as default}; +import{_ as q,i as M,j as N,k as U,r as d,l as b,m as D,c as _,f as m,d as a,w as u,e as p,a as R,u as B,o as h,n as z,p as E,E as K}from"./index-nRSe4xNB.js";import{C as L}from"./index-Dl6L4IJG.js";const A={class:"loginView"},J={class:"wrapper-content"},P={class:"login-form"},$={key:0},j={key:1},F={__name:"login",setup(G){const w=M(),r=R(),y=B(),{proxy:S}=N(),C=U(),l=d(void 0);d(!0),b(()=>y,o=>{l.value=o.query&&o.query.redirect},{immediate:!0});const t=d({username:"",password:""}),V={username:[{required:!0,trigger:"blur",message:"请输入用户名"}],password:[{required:!0,trigger:"blur",message:"请输入密码"}]},i=d(!1);function v(){S.$refs.loginRef.validate(o=>{if(o){if(i.value=!0,!(localStorage!=null&&localStorage.getItem("UDID"))){K({message:"服务错误,请刷新页面",type:"warning"});return}const e=(t.value.username+(localStorage==null?void 0:localStorage.getItem("UDID"))).toLowerCase().replaceAll("-",""),s=`Gx${I(6)}${t.value.password}`,f=L.Blowfish.encrypt(s,e).toString();w.login({password:f,username:t.value.username}).then(async c=>{JSON.parse(sessionStorage.getItem("userData")),await x()}).catch(c=>{console.log("登录失败",c),i.value=!1})}}),k()}async function x(){try{if(l.value&&l.value!=="/login")try{r.resolve(l.value).matched.length>0?await r.push(l.value):(console.warn("重定向路径无效,跳转到默认页面"),await r.push("/coordinate"))}catch(o){console.warn("重定向跳转失败,跳转到默认页面:",o),await r.push("/coordinate")}else await r.push("/coordinate")}catch(o){console.error("登录跳转异常:",o),await r.push("/coordinate")}finally{i.value=!1}}function I(o){const e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let s=0;s {}):console.log("浏览器不支持通知")}return D(async()=>{C.initUdid()}),(o,e)=>{const n=p("el-input"),s=p("el-form-item"),f=p("el-button"),c=p("el-form");return h(),_("div",A,[m("div",J,[m("div",P,[e[3]||(e[3]=m("div",{class:"selected-rectangle"},null,-1)),a(c,{ref:"loginRef",class:"form-info",model:t.value,rules:V},{default:u(()=>[e[2]||(e[2]=m("h3",{class:"title"},"欢迎登录",-1)),a(s,{prop:"username"},{default:u(()=>[a(n,{modelValue:t.value.username,"onUpdate:modelValue":e[0]||(e[0]=g=>t.value.username=g),"auto-complete":"off",placeholder:"请输入您的账号",size:"large",type:"text"},null,8,["modelValue"])]),_:1}),a(s,{prop:"password"},{default:u(()=>[a(n,{modelValue:t.value.password,"onUpdate:modelValue":e[1]||(e[1]=g=>t.value.password=g),"auto-complete":"off",placeholder:"请输入密码",size:"large",type:"password",onKeyup:z(v,["enter"])},null,8,["modelValue"])]),_:1}),a(s,null,{default:u(()=>[a(f,{loading:i.value,size:"large",class:"button-login",type:"primary",onClick:E(v,["prevent"])},{default:u(()=>[i.value?(h(),_("span",j,"登录中...")):(h(),_("span",$,"登 录"))]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])])])])}}},Q=q(F,[["__scopeId","data-v-aec6e781"]]);export{Q as default}; diff --git a/dist/assets/login-B5BrSdAh.js.gz b/dist/assets/login-B5BrSdAh.js.gz new file mode 100644 index 0000000..8b8334d Binary files /dev/null and b/dist/assets/login-B5BrSdAh.js.gz differ diff --git a/dist/assets/login-ZNL3XKVp.js.gz b/dist/assets/login-ZNL3XKVp.js.gz deleted file mode 100644 index d7b03f5..0000000 Binary files a/dist/assets/login-ZNL3XKVp.js.gz and /dev/null differ diff --git a/dist/assets/room-BKpValiO.js.gz b/dist/assets/room-BKpValiO.js.gz deleted file mode 100644 index 6c4f1a9..0000000 Binary files a/dist/assets/room-BKpValiO.js.gz and /dev/null differ diff --git a/dist/assets/room-BKpValiO.js b/dist/assets/room-BSjtcFv-.js similarity index 99% rename from dist/assets/room-BKpValiO.js rename to dist/assets/room-BSjtcFv-.js index df77fb4..4f1f316 100644 --- a/dist/assets/room-BKpValiO.js +++ b/dist/assets/room-BSjtcFv-.js @@ -1,4 +1,4 @@ -import{v as $V,x as pm,y as GV,r as Ll,z as um,b as HZ,c as jl,l as Vi,A as Oh,o as Ol,F as Ym,B as Bm,C as HR,f as Hl,D as _a,G as om,H as ym,I as PR,_ as km,j as zm,m as Lm,J as fR,K as Im,E as xW,L as Tc,M as Dm,N as Em,d as al,w as kl,e as jW,s as cU,O as OW,t as IU,P as wm,h as EZ,Q as AR,R as _R,S as Cm,T as rm}from"./index-DikBC4WP.js";import{e as gW}from"./bus-C8MdfDPM.js";function FT(U){return $V({url:"/api/v1/auth/directories",method:"get",params:U})}function cT(U,l){return $V({url:`/api/v1/auth/directories/${U}/users`,method:"get",params:l})}function aT(U,l){return $V({url:`/api/v1/rooms/${U}/participants/history`,method:"get",params:l})}function WT(U,l){return $V({url:`/api/v1/auth/users/${U}`,method:"get",params:l})}var xm=Object.defineProperty,gh=U=>{throw TypeError(U)},jm=(U,l,d)=>l in U?xm(U,l,{enumerable:!0,configurable:!0,writable:!0,value:d}):U[l]=d,f=(U,l,d)=>jm(U,typeof l!="symbol"?l+"":l,d),zR=(U,l,d)=>l.has(U)||gh("Cannot "+d),a=(U,l,d)=>(zR(U,l,"read from private field"),d?d.call(U):l.get(U)),b=(U,l,d)=>l.has(U)?gh("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(U):l.set(U,d),R=(U,l,d,Z)=>(zR(U,l,"write to private field"),l.set(U,d),d),h=(U,l,d)=>(zR(U,l,"access private method"),d),Ld=(U,l,d,Z)=>({set _(t){R(U,l,t)},get _(){return a(U,l,Z)}}),Om={9306:(U,l,d)=>{var Z=d(4901),t=d(6823),F=TypeError;U.exports=function(c){if(Z(c))return c;throw new F(t(c)+" is not a function")}},3506:(U,l,d)=>{var Z=d(3925),t=String,F=TypeError;U.exports=function(c){if(Z(c))return c;throw new F("Can't set "+t(c)+" as a prototype")}},7080:(U,l,d)=>{var Z=d(4402).has;U.exports=function(t){return Z(t),t}},679:(U,l,d)=>{var Z=d(1625),t=TypeError;U.exports=function(F,c){if(Z(c,F))return F;throw new t("Incorrect invocation")}},8551:(U,l,d)=>{var Z=d(34),t=String,F=TypeError;U.exports=function(c){if(Z(c))return c;throw new F(t(c)+" is not an object")}},7811:U=>{U.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},7394:(U,l,d)=>{var Z=d(4576),t=d(6706),F=d(2195),c=Z.ArrayBuffer,W=Z.TypeError;U.exports=c&&t(c.prototype,"byteLength","get")||function(s){if(F(s)!=="ArrayBuffer")throw new W("ArrayBuffer expected");return s.byteLength}},3238:(U,l,d)=>{var Z=d(4576),t=d(7476),F=d(7394),c=Z.ArrayBuffer,W=c&&c.prototype,s=W&&t(W.slice);U.exports=function(n){if(F(n)!==0||!s)return!1;try{return s(n,0,0),!1}catch{return!0}}},5169:(U,l,d)=>{var Z=d(3238),t=TypeError;U.exports=function(F){if(Z(F))throw new t("ArrayBuffer is detached");return F}},5636:(U,l,d)=>{var Z=d(4576),t=d(9504),F=d(6706),c=d(7696),W=d(5169),s=d(7394),n=d(4483),V=d(1548),Q=Z.structuredClone,i=Z.ArrayBuffer,N=Z.DataView,e=Math.min,m=i.prototype,M=N.prototype,J=t(m.slice),S=F(m,"resizable","get"),G=F(m,"maxByteLength","get"),T=t(M.getInt8),p=t(M.setInt8);U.exports=(V||n)&&function(u,Y,o){var X=s(u),B=Y===void 0?X:c(Y),y=!S||!S(u),E;if(W(u),V&&(u=Q(u,{transfer:[u]}),X===B&&(o||y)))return u;if(X>=B&&(!o||y))E=J(u,0,B);else{var D=o&&!y&&G?{maxByteLength:G(u)}:void 0;E=new i(B,D);for(var w=new N(u),I=new N(E),L=e(B,X),g=0;g {var Z=d(7811),t=d(3724),F=d(4576),c=d(4901),W=d(34),s=d(9297),n=d(6955),V=d(6823),Q=d(6699),i=d(6840),N=d(2106),e=d(1625),m=d(2787),M=d(2967),J=d(8227),S=d(3392),G=d(1181),T=G.enforce,p=G.get,u=F.Int8Array,Y=u&&u.prototype,o=F.Uint8ClampedArray,X=o&&o.prototype,B=u&&m(u),y=Y&&m(Y),E=Object.prototype,D=F.TypeError,w=J("toStringTag"),I=S("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",g=Z&&!!M&&n(F.opera)!=="Opera",A=!1,Vl,Sl,Tl,Rl={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bl={BigInt64Array:8,BigUint64Array:8},FU=function(_){if(!W(_))return!1;var Xl=n(_);return Xl==="DataView"||s(Rl,Xl)||s(bl,Xl)},gd=function(_){var Xl=m(_);if(W(Xl)){var rl=p(Xl);return rl&&s(rl,L)?rl[L]:gd(Xl)}},C=function(_){if(!W(_))return!1;var Xl=n(_);return s(Rl,Xl)||s(bl,Xl)},z=function(_){if(C(_))return _;throw new D("Target is not a typed array")},r=function(_){if(c(_)&&(!M||e(B,_)))return _;throw new D(V(_)+" is not a typed array constructor")},ll=function(_,Xl,rl,Kd){if(t){if(rl)for(var ad in Rl){var ul=F[ad];if(ul&&s(ul.prototype,_))try{delete ul.prototype[_]}catch{try{ul.prototype[_]=Xl}catch{}}}(!y[_]||rl)&&i(y,_,rl?Xl:g&&Y[_]||Xl,Kd)}},hl=function(_,Xl,rl){var Kd,ad;if(t){if(M){if(rl){for(Kd in Rl)if(ad=F[Kd],ad&&s(ad,_))try{delete ad[_]}catch{}}if(!B[_]||rl)try{return i(B,_,rl?Xl:g&&B[_]||Xl)}catch{}else return}for(Kd in Rl)ad=F[Kd],ad&&(!ad[_]||rl)&&i(ad,_,Xl)}};for(Vl in Rl)Sl=F[Vl],Tl=Sl&&Sl.prototype,Tl?T(Tl)[L]=Sl:g=!1;for(Vl in bl)Sl=F[Vl],Tl=Sl&&Sl.prototype,Tl&&(T(Tl)[L]=Sl);if((!g||!c(B)||B===Function.prototype)&&(B=function(){throw new D("Incorrect invocation")},g))for(Vl in Rl)F[Vl]&&M(F[Vl],B);if((!g||!y||y===E)&&(y=B.prototype,g))for(Vl in Rl)F[Vl]&&M(F[Vl].prototype,y);if(g&&m(X)!==y&&M(X,y),t&&!s(y,w)){A=!0,N(y,w,{configurable:!0,get:function(){return W(this)?this[I]:void 0}});for(Vl in Rl)F[Vl]&&Q(F[Vl],I,Vl)}U.exports={NATIVE_ARRAY_BUFFER_VIEWS:g,TYPED_ARRAY_TAG:A&&I,aTypedArray:z,aTypedArrayConstructor:r,exportTypedArrayMethod:ll,exportTypedArrayStaticMethod:hl,getTypedArrayConstructor:gd,isView:FU,isTypedArray:C,TypedArray:B,TypedArrayPrototype:y}},5370:(U,l,d)=>{var Z=d(6198);U.exports=function(t,F,c){for(var W=0,s=arguments.length>2?c:Z(F),n=new t(s);s>W;)n[W]=F[W++];return n}},9617:(U,l,d)=>{var Z=d(5397),t=d(5610),F=d(6198),c=function(W){return function(s,n,V){var Q=Z(s),i=F(Q);if(i===0)return!W&&-1;var N=t(V,i),e;if(W&&n!==n){for(;i>N;)if(e=Q[N++],e!==e)return!0}else for(;i>N;N++)if((W||N in Q)&&Q[N]===n)return W||N||0;return!W&&-1}};U.exports={includes:c(!0),indexOf:c(!1)}},4527:(U,l,d)=>{var Z=d(3724),t=d(4376),F=TypeError,c=Object.getOwnPropertyDescriptor,W=Z&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();U.exports=W?function(s,n){if(t(s)&&!c(s,"length").writable)throw new F("Cannot set read only .length");return s.length=n}:function(s,n){return s.length=n}},7680:(U,l,d)=>{var Z=d(9504);U.exports=Z([].slice)},7628:(U,l,d)=>{var Z=d(6198);U.exports=function(t,F){for(var c=Z(t),W=new F(c),s=0;s {var Z=d(6198),t=d(1291),F=RangeError;U.exports=function(c,W,s,n){var V=Z(c),Q=t(s),i=Q<0?V+Q:Q;if(i>=V||i<0)throw new F("Incorrect index");for(var N=new W(V),e=0;e {var Z=d(8551),t=d(9539);U.exports=function(F,c,W,s){try{return s?c(Z(W)[0],W[1]):c(W)}catch(n){t(F,"throw",n)}}},2195:(U,l,d)=>{var Z=d(9504),t=Z({}.toString),F=Z("".slice);U.exports=function(c){return F(t(c),8,-1)}},6955:(U,l,d)=>{var Z=d(2140),t=d(4901),F=d(2195),c=d(8227),W=c("toStringTag"),s=Object,n=F(function(){return arguments}())==="Arguments",V=function(Q,i){try{return Q[i]}catch{}};U.exports=Z?F:function(Q){var i,N,e;return Q===void 0?"Undefined":Q===null?"Null":typeof(N=V(i=s(Q),W))=="string"?N:n?F(i):(e=F(i))==="Object"&&t(i.callee)?"Arguments":e}},7740:(U,l,d)=>{var Z=d(9297),t=d(5031),F=d(7347),c=d(4913);U.exports=function(W,s,n){for(var V=t(s),Q=c.f,i=F.f,N=0;N {var Z=d(9039);U.exports=!Z(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2529:U=>{U.exports=function(l,d){return{value:l,done:d}}},6699:(U,l,d)=>{var Z=d(3724),t=d(4913),F=d(6980);U.exports=Z?function(c,W,s){return t.f(c,W,F(1,s))}:function(c,W,s){return c[W]=s,c}},6980:U=>{U.exports=function(l,d){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:d}}},4659:(U,l,d)=>{var Z=d(3724),t=d(4913),F=d(6980);U.exports=function(c,W,s){Z?t.f(c,W,F(0,s)):c[W]=s}},2106:(U,l,d)=>{var Z=d(283),t=d(4913);U.exports=function(F,c,W){return W.get&&Z(W.get,c,{getter:!0}),W.set&&Z(W.set,c,{setter:!0}),t.f(F,c,W)}},6840:(U,l,d)=>{var Z=d(4901),t=d(4913),F=d(283),c=d(9433);U.exports=function(W,s,n,V){V||(V={});var Q=V.enumerable,i=V.name!==void 0?V.name:s;if(Z(n)&&F(n,i,V),V.global)Q?W[s]=n:c(s,n);else{try{V.unsafe?W[s]&&(Q=!0):delete W[s]}catch{}Q?W[s]=n:t.f(W,s,{value:n,enumerable:!1,configurable:!V.nonConfigurable,writable:!V.nonWritable})}return W}},6279:(U,l,d)=>{var Z=d(6840);U.exports=function(t,F,c){for(var W in F)Z(t,W,F[W],c);return t}},9433:(U,l,d)=>{var Z=d(4576),t=Object.defineProperty;U.exports=function(F,c){try{t(Z,F,{value:c,configurable:!0,writable:!0})}catch{Z[F]=c}return c}},3724:(U,l,d)=>{var Z=d(9039);U.exports=!Z(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4483:(U,l,d)=>{var Z=d(4576),t=d(9429),F=d(1548),c=Z.structuredClone,W=Z.ArrayBuffer,s=Z.MessageChannel,n=!1,V,Q,i,N;if(F)n=function(e){c(e,{transfer:[e]})};else if(W)try{s||(V=t("worker_threads"),V&&(s=V.MessageChannel)),s&&(Q=new s,i=new W(2),N=function(e){Q.port1.postMessage(null,[e])},i.byteLength===2&&(N(i),i.byteLength===0&&(n=N)))}catch{}U.exports=n},4055:(U,l,d)=>{var Z=d(4576),t=d(34),F=Z.document,c=t(F)&&t(F.createElement);U.exports=function(W){return c?F.createElement(W):{}}},6837:U=>{var l=TypeError,d=9007199254740991;U.exports=function(Z){if(Z>d)throw l("Maximum allowed index exceeded");return Z}},5002:U=>{U.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},8727:U=>{U.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193:(U,l,d)=>{var Z=d(4215);U.exports=Z==="NODE"},2839:(U,l,d)=>{var Z=d(4576),t=Z.navigator,F=t&&t.userAgent;U.exports=F?String(F):""},9519:(U,l,d)=>{var Z=d(4576),t=d(2839),F=Z.process,c=Z.Deno,W=F&&F.versions||c&&c.version,s=W&&W.v8,n,V;s&&(n=s.split("."),V=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!V&&t&&(n=t.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=t.match(/Chrome\/(\d+)/),n&&(V=+n[1]))),U.exports=V},4215:(U,l,d)=>{var Z=d(4576),t=d(2839),F=d(2195),c=function(W){return t.slice(0,W.length)===W};U.exports=function(){return c("Bun/")?"BUN":c("Cloudflare-Workers")?"CLOUDFLARE":c("Deno/")?"DENO":c("Node.js/")?"NODE":Z.Bun&&typeof Bun.version=="string"?"BUN":Z.Deno&&typeof Deno.version=="object"?"DENO":F(Z.process)==="process"?"NODE":Z.window&&Z.document?"BROWSER":"REST"}()},8574:(U,l,d)=>{var Z=d(9504),t=Error,F=Z("".replace),c=function(n){return String(new t(n).stack)}("zxcasd"),W=/\n\s*at [^:]*:[^\n]*/,s=W.test(c);U.exports=function(n,V){if(s&&typeof n=="string"&&!t.prepareStackTrace)for(;V--;)n=F(n,W,"");return n}},6518:(U,l,d)=>{var Z=d(4576),t=d(7347).f,F=d(6699),c=d(6840),W=d(9433),s=d(7740),n=d(2796);U.exports=function(V,Q){var i=V.target,N=V.global,e=V.stat,m,M,J,S,G,T;if(N?M=Z:e?M=Z[i]||W(i,{}):M=Z[i]&&Z[i].prototype,M)for(J in Q){if(G=Q[J],V.dontCallGetSet?(T=t(M,J),S=T&&T.value):S=M[J],m=n(N?J:i+(e?".":"#")+J,V.forced),!m&&S!==void 0){if(typeof G==typeof S)continue;s(G,S)}(V.sham||S&&S.sham)&&F(G,"sham",!0),c(M,J,G,V)}}},9039:U=>{U.exports=function(l){try{return!!l()}catch{return!0}}},8745:(U,l,d)=>{var Z=d(616),t=Function.prototype,F=t.apply,c=t.call;U.exports=typeof Reflect=="object"&&Reflect.apply||(Z?c.bind(F):function(){return c.apply(F,arguments)})},6080:(U,l,d)=>{var Z=d(7476),t=d(9306),F=d(616),c=Z(Z.bind);U.exports=function(W,s){return t(W),s===void 0?W:F?c(W,s):function(){return W.apply(s,arguments)}}},616:(U,l,d)=>{var Z=d(9039);U.exports=!Z(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")})},9565:(U,l,d)=>{var Z=d(616),t=Function.prototype.call;U.exports=Z?t.bind(t):function(){return t.apply(t,arguments)}},350:(U,l,d)=>{var Z=d(3724),t=d(9297),F=Function.prototype,c=Z&&Object.getOwnPropertyDescriptor,W=t(F,"name"),s=W&&(function(){}).name==="something",n=W&&(!Z||Z&&c(F,"name").configurable);U.exports={EXISTS:W,PROPER:s,CONFIGURABLE:n}},6706:(U,l,d)=>{var Z=d(9504),t=d(9306);U.exports=function(F,c,W){try{return Z(t(Object.getOwnPropertyDescriptor(F,c)[W]))}catch{}}},7476:(U,l,d)=>{var Z=d(2195),t=d(9504);U.exports=function(F){if(Z(F)==="Function")return t(F)}},9504:(U,l,d)=>{var Z=d(616),t=Function.prototype,F=t.call,c=Z&&t.bind.bind(F,F);U.exports=Z?c:function(W){return function(){return F.apply(W,arguments)}}},9429:(U,l,d)=>{var Z=d(4576),t=d(6193);U.exports=function(F){if(t){try{return Z.process.getBuiltinModule(F)}catch{}try{return Function('return require("'+F+'")')()}catch{}}}},7751:(U,l,d)=>{var Z=d(4576),t=d(4901),F=function(c){return t(c)?c:void 0};U.exports=function(c,W){return arguments.length<2?F(Z[c]):Z[c]&&Z[c][W]}},1767:U=>{U.exports=function(l){return{iterator:l,next:l.next,done:!1}}},8646:(U,l,d)=>{var Z=d(9565),t=d(8551),F=d(1767),c=d(851);U.exports=function(W,s){(!s||typeof W!="string")&&t(W);var n=c(W);return F(t(n!==void 0?Z(n,W):W))}},851:(U,l,d)=>{var Z=d(6955),t=d(5966),F=d(4117),c=d(6269),W=d(8227),s=W("iterator");U.exports=function(n){if(!F(n))return t(n,s)||t(n,"@@iterator")||c[Z(n)]}},81:(U,l,d)=>{var Z=d(9565),t=d(9306),F=d(8551),c=d(6823),W=d(851),s=TypeError;U.exports=function(n,V){var Q=arguments.length<2?W(n):V;if(t(Q))return F(Z(Q,n));throw new s(c(n)+" is not iterable")}},5966:(U,l,d)=>{var Z=d(9306),t=d(4117);U.exports=function(F,c){var W=F[c];return t(W)?void 0:Z(W)}},3789:(U,l,d)=>{var Z=d(9306),t=d(8551),F=d(9565),c=d(1291),W=d(1767),s="Invalid size",n=RangeError,V=TypeError,Q=Math.max,i=function(N,e){this.set=N,this.size=Q(e,0),this.has=Z(N.has),this.keys=Z(N.keys)};i.prototype={getIterator:function(){return W(t(F(this.keys,this.set)))},includes:function(N){return F(this.has,this.set,N)}},U.exports=function(N){t(N);var e=+N.size;if(e!==e)throw new V(s);var m=c(e);if(m<0)throw new n(s);return new i(N,m)}},4576:function(U){var l=function(d){return d&&d.Math===Math&&d};U.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof global=="object"&&global)||l(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:(U,l,d)=>{var Z=d(9504),t=d(8981),F=Z({}.hasOwnProperty);U.exports=Object.hasOwn||function(c,W){return F(t(c),W)}},421:U=>{U.exports={}},397:(U,l,d)=>{var Z=d(7751);U.exports=Z("document","documentElement")},5917:(U,l,d)=>{var Z=d(3724),t=d(9039),F=d(4055);U.exports=!Z&&!t(function(){return Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a!==7})},7055:(U,l,d)=>{var Z=d(9504),t=d(9039),F=d(2195),c=Object,W=Z("".split);U.exports=t(function(){return!c("z").propertyIsEnumerable(0)})?function(s){return F(s)==="String"?W(s,""):c(s)}:c},3167:(U,l,d)=>{var Z=d(4901),t=d(34),F=d(2967);U.exports=function(c,W,s){var n,V;return F&&Z(n=W.constructor)&&n!==s&&t(V=n.prototype)&&V!==s.prototype&&F(c,V),c}},3706:(U,l,d)=>{var Z=d(9504),t=d(4901),F=d(7629),c=Z(Function.toString);t(F.inspectSource)||(F.inspectSource=function(W){return c(W)}),U.exports=F.inspectSource},1181:(U,l,d)=>{var Z=d(8622),t=d(4576),F=d(34),c=d(6699),W=d(9297),s=d(7629),n=d(6119),V=d(421),Q="Object already initialized",i=t.TypeError,N=t.WeakMap,e,m,M,J=function(p){return M(p)?m(p):e(p,{})},S=function(p){return function(u){var Y;if(!F(u)||(Y=m(u)).type!==p)throw new i("Incompatible receiver, "+p+" required");return Y}};if(Z||s.state){var G=s.state||(s.state=new N);G.get=G.get,G.has=G.has,G.set=G.set,e=function(p,u){if(G.has(p))throw new i(Q);return u.facade=p,G.set(p,u),u},m=function(p){return G.get(p)||{}},M=function(p){return G.has(p)}}else{var T=n("state");V[T]=!0,e=function(p,u){if(W(p,T))throw new i(Q);return u.facade=p,c(p,T,u),u},m=function(p){return W(p,T)?p[T]:{}},M=function(p){return W(p,T)}}U.exports={set:e,get:m,has:M,enforce:J,getterFor:S}},4209:(U,l,d)=>{var Z=d(8227),t=d(6269),F=Z("iterator"),c=Array.prototype;U.exports=function(W){return W!==void 0&&(t.Array===W||c[F]===W)}},4376:(U,l,d)=>{var Z=d(2195);U.exports=Array.isArray||function(t){return Z(t)==="Array"}},1108:(U,l,d)=>{var Z=d(6955);U.exports=function(t){var F=Z(t);return F==="BigInt64Array"||F==="BigUint64Array"}},4901:U=>{var l=typeof document=="object"&&document.all;U.exports=typeof l>"u"&&l!==void 0?function(d){return typeof d=="function"||d===l}:function(d){return typeof d=="function"}},2796:(U,l,d)=>{var Z=d(9039),t=d(4901),F=/#|\.prototype\./,c=function(Q,i){var N=s[W(Q)];return N===V?!0:N===n?!1:t(i)?Z(i):!!i},W=c.normalize=function(Q){return String(Q).replace(F,".").toLowerCase()},s=c.data={},n=c.NATIVE="N",V=c.POLYFILL="P";U.exports=c},4117:U=>{U.exports=function(l){return l==null}},34:(U,l,d)=>{var Z=d(4901);U.exports=function(t){return typeof t=="object"?t!==null:Z(t)}},3925:(U,l,d)=>{var Z=d(34);U.exports=function(t){return Z(t)||t===null}},6395:U=>{U.exports=!1},757:(U,l,d)=>{var Z=d(7751),t=d(4901),F=d(1625),c=d(7040),W=Object;U.exports=c?function(s){return typeof s=="symbol"}:function(s){var n=Z("Symbol");return t(n)&&F(n.prototype,W(s))}},507:(U,l,d)=>{var Z=d(9565);U.exports=function(t,F,c){for(var W=c?t:t.iterator,s=t.next,n,V;!(n=Z(s,W)).done;)if(V=F(n.value),V!==void 0)return V}},2652:(U,l,d)=>{var Z=d(6080),t=d(9565),F=d(8551),c=d(6823),W=d(4209),s=d(6198),n=d(1625),V=d(81),Q=d(851),i=d(9539),N=TypeError,e=function(M,J){this.stopped=M,this.result=J},m=e.prototype;U.exports=function(M,J,S){var G=S&&S.that,T=!!(S&&S.AS_ENTRIES),p=!!(S&&S.IS_RECORD),u=!!(S&&S.IS_ITERATOR),Y=!!(S&&S.INTERRUPTED),o=Z(J,G),X,B,y,E,D,w,I,L=function(A){return X&&i(X,"normal",A),new e(!0,A)},g=function(A){return T?(F(A),Y?o(A[0],A[1],L):o(A[0],A[1])):Y?o(A,L):o(A)};if(p)X=M.iterator;else if(u)X=M;else{if(B=Q(M),!B)throw new N(c(M)+" is not iterable");if(W(B)){for(y=0,E=s(M);E>y;y++)if(D=g(M[y]),D&&n(m,D))return D;return new e(!1)}X=V(M,B)}for(w=p?M.next:X.next;!(I=t(w,X)).done;){try{D=g(I.value)}catch(A){i(X,"throw",A)}if(typeof D=="object"&&D&&n(m,D))return D}return new e(!1)}},9539:(U,l,d)=>{var Z=d(9565),t=d(8551),F=d(5966);U.exports=function(c,W,s){var n,V;t(c);try{if(n=F(c,"return"),!n){if(W==="throw")throw s;return s}n=Z(n,c)}catch(Q){V=!0,n=Q}if(W==="throw")throw s;if(V)throw n;return t(n),s}},9462:(U,l,d)=>{var Z=d(9565),t=d(2360),F=d(6699),c=d(6279),W=d(8227),s=d(1181),n=d(5966),V=d(7657).IteratorPrototype,Q=d(2529),i=d(9539),N=W("toStringTag"),e="IteratorHelper",m="WrapForValidIterator",M=s.set,J=function(T){var p=s.getterFor(T?m:e);return c(t(V),{next:function(){var u=p(this);if(T)return u.nextHandler();try{var Y=u.done?void 0:u.nextHandler();return Q(Y,u.done)}catch(o){throw u.done=!0,o}},return:function(){var u=p(this),Y=u.iterator;if(u.done=!0,T){var o=n(Y,"return");return o?Z(o,Y):Q(void 0,!0)}if(u.inner)try{i(u.inner.iterator,"normal")}catch(X){return i(Y,"throw",X)}return Y&&i(Y,"normal"),Q(void 0,!0)}})},S=J(!0),G=J(!1);F(G,N,"Iterator Helper"),U.exports=function(T,p){var u=function(Y,o){o?(o.iterator=Y.iterator,o.next=Y.next):o=Y,o.type=p?m:e,o.nextHandler=T,o.counter=0,o.done=!1,M(this,o)};return u.prototype=p?S:G,u}},713:(U,l,d)=>{var Z=d(9565),t=d(9306),F=d(8551),c=d(1767),W=d(9462),s=d(6319),n=W(function(){var V=this.iterator,Q=F(Z(this.next,V)),i=this.done=!!Q.done;if(!i)return s(V,this.mapper,[Q.value,this.counter++],!0)});U.exports=function(V){return F(this),t(V),new n(c(this),{mapper:V})}},7657:(U,l,d)=>{var Z=d(9039),t=d(4901),F=d(34),c=d(2360),W=d(2787),s=d(6840),n=d(8227),V=d(6395),Q=n("iterator"),i=!1,N,e,m;[].keys&&(m=[].keys(),"next"in m?(e=W(W(m)),e!==Object.prototype&&(N=e)):i=!0);var M=!F(N)||Z(function(){var J={};return N[Q].call(J)!==J});M?N={}:V&&(N=c(N)),t(N[Q])||s(N,Q,function(){return this}),U.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:i}},6269:U=>{U.exports={}},6198:(U,l,d)=>{var Z=d(8014);U.exports=function(t){return Z(t.length)}},283:(U,l,d)=>{var Z=d(9504),t=d(9039),F=d(4901),c=d(9297),W=d(3724),s=d(350).CONFIGURABLE,n=d(3706),V=d(1181),Q=V.enforce,i=V.get,N=String,e=Object.defineProperty,m=Z("".slice),M=Z("".replace),J=Z([].join),S=W&&!t(function(){return e(function(){},"length",{value:8}).length!==8}),G=String(String).split("String"),T=U.exports=function(p,u,Y){m(N(u),0,7)==="Symbol("&&(u="["+M(N(u),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Y&&Y.getter&&(u="get "+u),Y&&Y.setter&&(u="set "+u),(!c(p,"name")||s&&p.name!==u)&&(W?e(p,"name",{value:u,configurable:!0}):p.name=u),S&&Y&&c(Y,"arity")&&p.length!==Y.arity&&e(p,"length",{value:Y.arity});try{Y&&c(Y,"constructor")&&Y.constructor?W&&e(p,"prototype",{writable:!1}):p.prototype&&(p.prototype=void 0)}catch{}var o=Q(p);return c(o,"source")||(o.source=J(G,typeof u=="string"?u:"")),p};Function.prototype.toString=T(function(){return F(this)&&i(this).source||n(this)},"toString")},741:U=>{var l=Math.ceil,d=Math.floor;U.exports=Math.trunc||function(Z){var t=+Z;return(t>0?d:l)(t)}},6043:(U,l,d)=>{var Z=d(9306),t=TypeError,F=function(c){var W,s;this.promise=new c(function(n,V){if(W!==void 0||s!==void 0)throw new t("Bad Promise constructor");W=n,s=V}),this.resolve=Z(W),this.reject=Z(s)};U.exports.f=function(c){return new F(c)}},2603:(U,l,d)=>{var Z=d(655);U.exports=function(t,F){return t===void 0?arguments.length<2?"":F:Z(t)}},4149:U=>{var l=RangeError;U.exports=function(d){if(d===d)return d;throw new l("NaN is not allowed")}},2360:(U,l,d)=>{var Z=d(8551),t=d(6801),F=d(8727),c=d(421),W=d(397),s=d(4055),n=d(6119),V=">",Q="<",i="prototype",N="script",e=n("IE_PROTO"),m=function(){},M=function(p){return Q+N+V+p+Q+"/"+N+V},J=function(p){p.write(M("")),p.close();var u=p.parentWindow.Object;return p=null,u},S=function(){var p=s("iframe"),u="java"+N+":",Y;return p.style.display="none",W.appendChild(p),p.src=String(u),Y=p.contentWindow.document,Y.open(),Y.write(M("document.F=Object")),Y.close(),Y.F},G,T=function(){try{G=new ActiveXObject("htmlfile")}catch{}T=typeof document<"u"?document.domain&&G?J(G):S():J(G);for(var p=F.length;p--;)delete T[i][F[p]];return T()};c[e]=!0,U.exports=Object.create||function(p,u){var Y;return p!==null?(m[i]=Z(p),Y=new m,m[i]=null,Y[e]=p):Y=T(),u===void 0?Y:t.f(Y,u)}},6801:(U,l,d)=>{var Z=d(3724),t=d(8686),F=d(4913),c=d(8551),W=d(5397),s=d(1072);l.f=Z&&!t?Object.defineProperties:function(n,V){c(n);for(var Q=W(V),i=s(V),N=i.length,e=0,m;N>e;)F.f(n,m=i[e++],Q[m]);return n}},4913:(U,l,d)=>{var Z=d(3724),t=d(5917),F=d(8686),c=d(8551),W=d(6969),s=TypeError,n=Object.defineProperty,V=Object.getOwnPropertyDescriptor,Q="enumerable",i="configurable",N="writable";l.f=Z?F?function(e,m,M){if(c(e),m=W(m),c(M),typeof e=="function"&&m==="prototype"&&"value"in M&&N in M&&!M[N]){var J=V(e,m);J&&J[N]&&(e[m]=M.value,M={configurable:i in M?M[i]:J[i],enumerable:Q in M?M[Q]:J[Q],writable:!1})}return n(e,m,M)}:n:function(e,m,M){if(c(e),m=W(m),c(M),t)try{return n(e,m,M)}catch{}if("get"in M||"set"in M)throw new s("Accessors not supported");return"value"in M&&(e[m]=M.value),e}},7347:(U,l,d)=>{var Z=d(3724),t=d(9565),F=d(8773),c=d(6980),W=d(5397),s=d(6969),n=d(9297),V=d(5917),Q=Object.getOwnPropertyDescriptor;l.f=Z?Q:function(i,N){if(i=W(i),N=s(N),V)try{return Q(i,N)}catch{}if(n(i,N))return c(!t(F.f,i,N),i[N])}},8480:(U,l,d)=>{var Z=d(1828),t=d(8727),F=t.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(c){return Z(c,F)}},3717:(U,l)=>{l.f=Object.getOwnPropertySymbols},2787:(U,l,d)=>{var Z=d(9297),t=d(4901),F=d(8981),c=d(6119),W=d(2211),s=c("IE_PROTO"),n=Object,V=n.prototype;U.exports=W?n.getPrototypeOf:function(Q){var i=F(Q);if(Z(i,s))return i[s];var N=i.constructor;return t(N)&&i instanceof N?N.prototype:i instanceof n?V:null}},1625:(U,l,d)=>{var Z=d(9504);U.exports=Z({}.isPrototypeOf)},1828:(U,l,d)=>{var Z=d(9504),t=d(9297),F=d(5397),c=d(9617).indexOf,W=d(421),s=Z([].push);U.exports=function(n,V){var Q=F(n),i=0,N=[],e;for(e in Q)!t(W,e)&&t(Q,e)&&s(N,e);for(;V.length>i;)t(Q,e=V[i++])&&(~c(N,e)||s(N,e));return N}},1072:(U,l,d)=>{var Z=d(1828),t=d(8727);U.exports=Object.keys||function(F){return Z(F,t)}},8773:(U,l)=>{var d={}.propertyIsEnumerable,Z=Object.getOwnPropertyDescriptor,t=Z&&!d.call({1:2},1);l.f=t?function(F){var c=Z(this,F);return!!c&&c.enumerable}:d},2967:(U,l,d)=>{var Z=d(6706),t=d(34),F=d(7750),c=d(3506);U.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var W=!1,s={},n;try{n=Z(Object.prototype,"__proto__","set"),n(s,[]),W=s instanceof Array}catch{}return function(V,Q){return F(V),c(Q),t(V)&&(W?n(V,Q):V.__proto__=Q),V}}():void 0)},4270:(U,l,d)=>{var Z=d(9565),t=d(4901),F=d(34),c=TypeError;U.exports=function(W,s){var n,V;if(s==="string"&&t(n=W.toString)&&!F(V=Z(n,W))||t(n=W.valueOf)&&!F(V=Z(n,W))||s!=="string"&&t(n=W.toString)&&!F(V=Z(n,W)))return V;throw new c("Can't convert object to primitive value")}},5031:(U,l,d)=>{var Z=d(7751),t=d(9504),F=d(8480),c=d(3717),W=d(8551),s=t([].concat);U.exports=Z("Reflect","ownKeys")||function(n){var V=F.f(W(n)),Q=c.f;return Q?s(V,Q(n)):V}},8235:(U,l,d)=>{var Z=d(9504),t=d(9297),F=SyntaxError,c=parseInt,W=String.fromCharCode,s=Z("".charAt),n=Z("".slice),V=Z(/./.exec),Q={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +import{v as $V,x as pm,y as GV,r as Ll,z as um,b as HZ,c as jl,l as Vi,A as Oh,o as Ol,F as Ym,B as Bm,C as HR,f as Hl,D as _a,G as om,H as ym,I as PR,_ as km,j as zm,m as Lm,J as fR,K as Im,E as xW,L as Tc,M as Dm,N as Em,d as al,w as kl,e as jW,s as cU,O as OW,t as IU,P as wm,h as EZ,Q as AR,R as _R,S as Cm,T as rm}from"./index-nRSe4xNB.js";import{e as gW}from"./bus-C8MdfDPM.js";function FT(U){return $V({url:"/api/v1/auth/directories",method:"get",params:U})}function cT(U,l){return $V({url:`/api/v1/auth/directories/${U}/users`,method:"get",params:l})}function aT(U,l){return $V({url:`/api/v1/rooms/${U}/participants/history`,method:"get",params:l})}function WT(U,l){return $V({url:`/api/v1/auth/users/${U}`,method:"get",params:l})}var xm=Object.defineProperty,gh=U=>{throw TypeError(U)},jm=(U,l,d)=>l in U?xm(U,l,{enumerable:!0,configurable:!0,writable:!0,value:d}):U[l]=d,f=(U,l,d)=>jm(U,typeof l!="symbol"?l+"":l,d),zR=(U,l,d)=>l.has(U)||gh("Cannot "+d),a=(U,l,d)=>(zR(U,l,"read from private field"),d?d.call(U):l.get(U)),b=(U,l,d)=>l.has(U)?gh("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(U):l.set(U,d),R=(U,l,d,Z)=>(zR(U,l,"write to private field"),l.set(U,d),d),h=(U,l,d)=>(zR(U,l,"access private method"),d),Ld=(U,l,d,Z)=>({set _(t){R(U,l,t)},get _(){return a(U,l,Z)}}),Om={9306:(U,l,d)=>{var Z=d(4901),t=d(6823),F=TypeError;U.exports=function(c){if(Z(c))return c;throw new F(t(c)+" is not a function")}},3506:(U,l,d)=>{var Z=d(3925),t=String,F=TypeError;U.exports=function(c){if(Z(c))return c;throw new F("Can't set "+t(c)+" as a prototype")}},7080:(U,l,d)=>{var Z=d(4402).has;U.exports=function(t){return Z(t),t}},679:(U,l,d)=>{var Z=d(1625),t=TypeError;U.exports=function(F,c){if(Z(c,F))return F;throw new t("Incorrect invocation")}},8551:(U,l,d)=>{var Z=d(34),t=String,F=TypeError;U.exports=function(c){if(Z(c))return c;throw new F(t(c)+" is not an object")}},7811:U=>{U.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},7394:(U,l,d)=>{var Z=d(4576),t=d(6706),F=d(2195),c=Z.ArrayBuffer,W=Z.TypeError;U.exports=c&&t(c.prototype,"byteLength","get")||function(s){if(F(s)!=="ArrayBuffer")throw new W("ArrayBuffer expected");return s.byteLength}},3238:(U,l,d)=>{var Z=d(4576),t=d(7476),F=d(7394),c=Z.ArrayBuffer,W=c&&c.prototype,s=W&&t(W.slice);U.exports=function(n){if(F(n)!==0||!s)return!1;try{return s(n,0,0),!1}catch{return!0}}},5169:(U,l,d)=>{var Z=d(3238),t=TypeError;U.exports=function(F){if(Z(F))throw new t("ArrayBuffer is detached");return F}},5636:(U,l,d)=>{var Z=d(4576),t=d(9504),F=d(6706),c=d(7696),W=d(5169),s=d(7394),n=d(4483),V=d(1548),Q=Z.structuredClone,i=Z.ArrayBuffer,N=Z.DataView,e=Math.min,m=i.prototype,M=N.prototype,J=t(m.slice),S=F(m,"resizable","get"),G=F(m,"maxByteLength","get"),T=t(M.getInt8),p=t(M.setInt8);U.exports=(V||n)&&function(u,Y,o){var X=s(u),B=Y===void 0?X:c(Y),y=!S||!S(u),E;if(W(u),V&&(u=Q(u,{transfer:[u]}),X===B&&(o||y)))return u;if(X>=B&&(!o||y))E=J(u,0,B);else{var D=o&&!y&&G?{maxByteLength:G(u)}:void 0;E=new i(B,D);for(var w=new N(u),I=new N(E),L=e(B,X),g=0;g {var Z=d(7811),t=d(3724),F=d(4576),c=d(4901),W=d(34),s=d(9297),n=d(6955),V=d(6823),Q=d(6699),i=d(6840),N=d(2106),e=d(1625),m=d(2787),M=d(2967),J=d(8227),S=d(3392),G=d(1181),T=G.enforce,p=G.get,u=F.Int8Array,Y=u&&u.prototype,o=F.Uint8ClampedArray,X=o&&o.prototype,B=u&&m(u),y=Y&&m(Y),E=Object.prototype,D=F.TypeError,w=J("toStringTag"),I=S("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",g=Z&&!!M&&n(F.opera)!=="Opera",A=!1,Vl,Sl,Tl,Rl={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bl={BigInt64Array:8,BigUint64Array:8},FU=function(_){if(!W(_))return!1;var Xl=n(_);return Xl==="DataView"||s(Rl,Xl)||s(bl,Xl)},gd=function(_){var Xl=m(_);if(W(Xl)){var rl=p(Xl);return rl&&s(rl,L)?rl[L]:gd(Xl)}},C=function(_){if(!W(_))return!1;var Xl=n(_);return s(Rl,Xl)||s(bl,Xl)},z=function(_){if(C(_))return _;throw new D("Target is not a typed array")},r=function(_){if(c(_)&&(!M||e(B,_)))return _;throw new D(V(_)+" is not a typed array constructor")},ll=function(_,Xl,rl,Kd){if(t){if(rl)for(var ad in Rl){var ul=F[ad];if(ul&&s(ul.prototype,_))try{delete ul.prototype[_]}catch{try{ul.prototype[_]=Xl}catch{}}}(!y[_]||rl)&&i(y,_,rl?Xl:g&&Y[_]||Xl,Kd)}},hl=function(_,Xl,rl){var Kd,ad;if(t){if(M){if(rl){for(Kd in Rl)if(ad=F[Kd],ad&&s(ad,_))try{delete ad[_]}catch{}}if(!B[_]||rl)try{return i(B,_,rl?Xl:g&&B[_]||Xl)}catch{}else return}for(Kd in Rl)ad=F[Kd],ad&&(!ad[_]||rl)&&i(ad,_,Xl)}};for(Vl in Rl)Sl=F[Vl],Tl=Sl&&Sl.prototype,Tl?T(Tl)[L]=Sl:g=!1;for(Vl in bl)Sl=F[Vl],Tl=Sl&&Sl.prototype,Tl&&(T(Tl)[L]=Sl);if((!g||!c(B)||B===Function.prototype)&&(B=function(){throw new D("Incorrect invocation")},g))for(Vl in Rl)F[Vl]&&M(F[Vl],B);if((!g||!y||y===E)&&(y=B.prototype,g))for(Vl in Rl)F[Vl]&&M(F[Vl].prototype,y);if(g&&m(X)!==y&&M(X,y),t&&!s(y,w)){A=!0,N(y,w,{configurable:!0,get:function(){return W(this)?this[I]:void 0}});for(Vl in Rl)F[Vl]&&Q(F[Vl],I,Vl)}U.exports={NATIVE_ARRAY_BUFFER_VIEWS:g,TYPED_ARRAY_TAG:A&&I,aTypedArray:z,aTypedArrayConstructor:r,exportTypedArrayMethod:ll,exportTypedArrayStaticMethod:hl,getTypedArrayConstructor:gd,isView:FU,isTypedArray:C,TypedArray:B,TypedArrayPrototype:y}},5370:(U,l,d)=>{var Z=d(6198);U.exports=function(t,F,c){for(var W=0,s=arguments.length>2?c:Z(F),n=new t(s);s>W;)n[W]=F[W++];return n}},9617:(U,l,d)=>{var Z=d(5397),t=d(5610),F=d(6198),c=function(W){return function(s,n,V){var Q=Z(s),i=F(Q);if(i===0)return!W&&-1;var N=t(V,i),e;if(W&&n!==n){for(;i>N;)if(e=Q[N++],e!==e)return!0}else for(;i>N;N++)if((W||N in Q)&&Q[N]===n)return W||N||0;return!W&&-1}};U.exports={includes:c(!0),indexOf:c(!1)}},4527:(U,l,d)=>{var Z=d(3724),t=d(4376),F=TypeError,c=Object.getOwnPropertyDescriptor,W=Z&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();U.exports=W?function(s,n){if(t(s)&&!c(s,"length").writable)throw new F("Cannot set read only .length");return s.length=n}:function(s,n){return s.length=n}},7680:(U,l,d)=>{var Z=d(9504);U.exports=Z([].slice)},7628:(U,l,d)=>{var Z=d(6198);U.exports=function(t,F){for(var c=Z(t),W=new F(c),s=0;s {var Z=d(6198),t=d(1291),F=RangeError;U.exports=function(c,W,s,n){var V=Z(c),Q=t(s),i=Q<0?V+Q:Q;if(i>=V||i<0)throw new F("Incorrect index");for(var N=new W(V),e=0;e {var Z=d(8551),t=d(9539);U.exports=function(F,c,W,s){try{return s?c(Z(W)[0],W[1]):c(W)}catch(n){t(F,"throw",n)}}},2195:(U,l,d)=>{var Z=d(9504),t=Z({}.toString),F=Z("".slice);U.exports=function(c){return F(t(c),8,-1)}},6955:(U,l,d)=>{var Z=d(2140),t=d(4901),F=d(2195),c=d(8227),W=c("toStringTag"),s=Object,n=F(function(){return arguments}())==="Arguments",V=function(Q,i){try{return Q[i]}catch{}};U.exports=Z?F:function(Q){var i,N,e;return Q===void 0?"Undefined":Q===null?"Null":typeof(N=V(i=s(Q),W))=="string"?N:n?F(i):(e=F(i))==="Object"&&t(i.callee)?"Arguments":e}},7740:(U,l,d)=>{var Z=d(9297),t=d(5031),F=d(7347),c=d(4913);U.exports=function(W,s,n){for(var V=t(s),Q=c.f,i=F.f,N=0;N {var Z=d(9039);U.exports=!Z(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2529:U=>{U.exports=function(l,d){return{value:l,done:d}}},6699:(U,l,d)=>{var Z=d(3724),t=d(4913),F=d(6980);U.exports=Z?function(c,W,s){return t.f(c,W,F(1,s))}:function(c,W,s){return c[W]=s,c}},6980:U=>{U.exports=function(l,d){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:d}}},4659:(U,l,d)=>{var Z=d(3724),t=d(4913),F=d(6980);U.exports=function(c,W,s){Z?t.f(c,W,F(0,s)):c[W]=s}},2106:(U,l,d)=>{var Z=d(283),t=d(4913);U.exports=function(F,c,W){return W.get&&Z(W.get,c,{getter:!0}),W.set&&Z(W.set,c,{setter:!0}),t.f(F,c,W)}},6840:(U,l,d)=>{var Z=d(4901),t=d(4913),F=d(283),c=d(9433);U.exports=function(W,s,n,V){V||(V={});var Q=V.enumerable,i=V.name!==void 0?V.name:s;if(Z(n)&&F(n,i,V),V.global)Q?W[s]=n:c(s,n);else{try{V.unsafe?W[s]&&(Q=!0):delete W[s]}catch{}Q?W[s]=n:t.f(W,s,{value:n,enumerable:!1,configurable:!V.nonConfigurable,writable:!V.nonWritable})}return W}},6279:(U,l,d)=>{var Z=d(6840);U.exports=function(t,F,c){for(var W in F)Z(t,W,F[W],c);return t}},9433:(U,l,d)=>{var Z=d(4576),t=Object.defineProperty;U.exports=function(F,c){try{t(Z,F,{value:c,configurable:!0,writable:!0})}catch{Z[F]=c}return c}},3724:(U,l,d)=>{var Z=d(9039);U.exports=!Z(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4483:(U,l,d)=>{var Z=d(4576),t=d(9429),F=d(1548),c=Z.structuredClone,W=Z.ArrayBuffer,s=Z.MessageChannel,n=!1,V,Q,i,N;if(F)n=function(e){c(e,{transfer:[e]})};else if(W)try{s||(V=t("worker_threads"),V&&(s=V.MessageChannel)),s&&(Q=new s,i=new W(2),N=function(e){Q.port1.postMessage(null,[e])},i.byteLength===2&&(N(i),i.byteLength===0&&(n=N)))}catch{}U.exports=n},4055:(U,l,d)=>{var Z=d(4576),t=d(34),F=Z.document,c=t(F)&&t(F.createElement);U.exports=function(W){return c?F.createElement(W):{}}},6837:U=>{var l=TypeError,d=9007199254740991;U.exports=function(Z){if(Z>d)throw l("Maximum allowed index exceeded");return Z}},5002:U=>{U.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},8727:U=>{U.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193:(U,l,d)=>{var Z=d(4215);U.exports=Z==="NODE"},2839:(U,l,d)=>{var Z=d(4576),t=Z.navigator,F=t&&t.userAgent;U.exports=F?String(F):""},9519:(U,l,d)=>{var Z=d(4576),t=d(2839),F=Z.process,c=Z.Deno,W=F&&F.versions||c&&c.version,s=W&&W.v8,n,V;s&&(n=s.split("."),V=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!V&&t&&(n=t.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=t.match(/Chrome\/(\d+)/),n&&(V=+n[1]))),U.exports=V},4215:(U,l,d)=>{var Z=d(4576),t=d(2839),F=d(2195),c=function(W){return t.slice(0,W.length)===W};U.exports=function(){return c("Bun/")?"BUN":c("Cloudflare-Workers")?"CLOUDFLARE":c("Deno/")?"DENO":c("Node.js/")?"NODE":Z.Bun&&typeof Bun.version=="string"?"BUN":Z.Deno&&typeof Deno.version=="object"?"DENO":F(Z.process)==="process"?"NODE":Z.window&&Z.document?"BROWSER":"REST"}()},8574:(U,l,d)=>{var Z=d(9504),t=Error,F=Z("".replace),c=function(n){return String(new t(n).stack)}("zxcasd"),W=/\n\s*at [^:]*:[^\n]*/,s=W.test(c);U.exports=function(n,V){if(s&&typeof n=="string"&&!t.prepareStackTrace)for(;V--;)n=F(n,W,"");return n}},6518:(U,l,d)=>{var Z=d(4576),t=d(7347).f,F=d(6699),c=d(6840),W=d(9433),s=d(7740),n=d(2796);U.exports=function(V,Q){var i=V.target,N=V.global,e=V.stat,m,M,J,S,G,T;if(N?M=Z:e?M=Z[i]||W(i,{}):M=Z[i]&&Z[i].prototype,M)for(J in Q){if(G=Q[J],V.dontCallGetSet?(T=t(M,J),S=T&&T.value):S=M[J],m=n(N?J:i+(e?".":"#")+J,V.forced),!m&&S!==void 0){if(typeof G==typeof S)continue;s(G,S)}(V.sham||S&&S.sham)&&F(G,"sham",!0),c(M,J,G,V)}}},9039:U=>{U.exports=function(l){try{return!!l()}catch{return!0}}},8745:(U,l,d)=>{var Z=d(616),t=Function.prototype,F=t.apply,c=t.call;U.exports=typeof Reflect=="object"&&Reflect.apply||(Z?c.bind(F):function(){return c.apply(F,arguments)})},6080:(U,l,d)=>{var Z=d(7476),t=d(9306),F=d(616),c=Z(Z.bind);U.exports=function(W,s){return t(W),s===void 0?W:F?c(W,s):function(){return W.apply(s,arguments)}}},616:(U,l,d)=>{var Z=d(9039);U.exports=!Z(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")})},9565:(U,l,d)=>{var Z=d(616),t=Function.prototype.call;U.exports=Z?t.bind(t):function(){return t.apply(t,arguments)}},350:(U,l,d)=>{var Z=d(3724),t=d(9297),F=Function.prototype,c=Z&&Object.getOwnPropertyDescriptor,W=t(F,"name"),s=W&&(function(){}).name==="something",n=W&&(!Z||Z&&c(F,"name").configurable);U.exports={EXISTS:W,PROPER:s,CONFIGURABLE:n}},6706:(U,l,d)=>{var Z=d(9504),t=d(9306);U.exports=function(F,c,W){try{return Z(t(Object.getOwnPropertyDescriptor(F,c)[W]))}catch{}}},7476:(U,l,d)=>{var Z=d(2195),t=d(9504);U.exports=function(F){if(Z(F)==="Function")return t(F)}},9504:(U,l,d)=>{var Z=d(616),t=Function.prototype,F=t.call,c=Z&&t.bind.bind(F,F);U.exports=Z?c:function(W){return function(){return F.apply(W,arguments)}}},9429:(U,l,d)=>{var Z=d(4576),t=d(6193);U.exports=function(F){if(t){try{return Z.process.getBuiltinModule(F)}catch{}try{return Function('return require("'+F+'")')()}catch{}}}},7751:(U,l,d)=>{var Z=d(4576),t=d(4901),F=function(c){return t(c)?c:void 0};U.exports=function(c,W){return arguments.length<2?F(Z[c]):Z[c]&&Z[c][W]}},1767:U=>{U.exports=function(l){return{iterator:l,next:l.next,done:!1}}},8646:(U,l,d)=>{var Z=d(9565),t=d(8551),F=d(1767),c=d(851);U.exports=function(W,s){(!s||typeof W!="string")&&t(W);var n=c(W);return F(t(n!==void 0?Z(n,W):W))}},851:(U,l,d)=>{var Z=d(6955),t=d(5966),F=d(4117),c=d(6269),W=d(8227),s=W("iterator");U.exports=function(n){if(!F(n))return t(n,s)||t(n,"@@iterator")||c[Z(n)]}},81:(U,l,d)=>{var Z=d(9565),t=d(9306),F=d(8551),c=d(6823),W=d(851),s=TypeError;U.exports=function(n,V){var Q=arguments.length<2?W(n):V;if(t(Q))return F(Z(Q,n));throw new s(c(n)+" is not iterable")}},5966:(U,l,d)=>{var Z=d(9306),t=d(4117);U.exports=function(F,c){var W=F[c];return t(W)?void 0:Z(W)}},3789:(U,l,d)=>{var Z=d(9306),t=d(8551),F=d(9565),c=d(1291),W=d(1767),s="Invalid size",n=RangeError,V=TypeError,Q=Math.max,i=function(N,e){this.set=N,this.size=Q(e,0),this.has=Z(N.has),this.keys=Z(N.keys)};i.prototype={getIterator:function(){return W(t(F(this.keys,this.set)))},includes:function(N){return F(this.has,this.set,N)}},U.exports=function(N){t(N);var e=+N.size;if(e!==e)throw new V(s);var m=c(e);if(m<0)throw new n(s);return new i(N,m)}},4576:function(U){var l=function(d){return d&&d.Math===Math&&d};U.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof global=="object"&&global)||l(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:(U,l,d)=>{var Z=d(9504),t=d(8981),F=Z({}.hasOwnProperty);U.exports=Object.hasOwn||function(c,W){return F(t(c),W)}},421:U=>{U.exports={}},397:(U,l,d)=>{var Z=d(7751);U.exports=Z("document","documentElement")},5917:(U,l,d)=>{var Z=d(3724),t=d(9039),F=d(4055);U.exports=!Z&&!t(function(){return Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a!==7})},7055:(U,l,d)=>{var Z=d(9504),t=d(9039),F=d(2195),c=Object,W=Z("".split);U.exports=t(function(){return!c("z").propertyIsEnumerable(0)})?function(s){return F(s)==="String"?W(s,""):c(s)}:c},3167:(U,l,d)=>{var Z=d(4901),t=d(34),F=d(2967);U.exports=function(c,W,s){var n,V;return F&&Z(n=W.constructor)&&n!==s&&t(V=n.prototype)&&V!==s.prototype&&F(c,V),c}},3706:(U,l,d)=>{var Z=d(9504),t=d(4901),F=d(7629),c=Z(Function.toString);t(F.inspectSource)||(F.inspectSource=function(W){return c(W)}),U.exports=F.inspectSource},1181:(U,l,d)=>{var Z=d(8622),t=d(4576),F=d(34),c=d(6699),W=d(9297),s=d(7629),n=d(6119),V=d(421),Q="Object already initialized",i=t.TypeError,N=t.WeakMap,e,m,M,J=function(p){return M(p)?m(p):e(p,{})},S=function(p){return function(u){var Y;if(!F(u)||(Y=m(u)).type!==p)throw new i("Incompatible receiver, "+p+" required");return Y}};if(Z||s.state){var G=s.state||(s.state=new N);G.get=G.get,G.has=G.has,G.set=G.set,e=function(p,u){if(G.has(p))throw new i(Q);return u.facade=p,G.set(p,u),u},m=function(p){return G.get(p)||{}},M=function(p){return G.has(p)}}else{var T=n("state");V[T]=!0,e=function(p,u){if(W(p,T))throw new i(Q);return u.facade=p,c(p,T,u),u},m=function(p){return W(p,T)?p[T]:{}},M=function(p){return W(p,T)}}U.exports={set:e,get:m,has:M,enforce:J,getterFor:S}},4209:(U,l,d)=>{var Z=d(8227),t=d(6269),F=Z("iterator"),c=Array.prototype;U.exports=function(W){return W!==void 0&&(t.Array===W||c[F]===W)}},4376:(U,l,d)=>{var Z=d(2195);U.exports=Array.isArray||function(t){return Z(t)==="Array"}},1108:(U,l,d)=>{var Z=d(6955);U.exports=function(t){var F=Z(t);return F==="BigInt64Array"||F==="BigUint64Array"}},4901:U=>{var l=typeof document=="object"&&document.all;U.exports=typeof l>"u"&&l!==void 0?function(d){return typeof d=="function"||d===l}:function(d){return typeof d=="function"}},2796:(U,l,d)=>{var Z=d(9039),t=d(4901),F=/#|\.prototype\./,c=function(Q,i){var N=s[W(Q)];return N===V?!0:N===n?!1:t(i)?Z(i):!!i},W=c.normalize=function(Q){return String(Q).replace(F,".").toLowerCase()},s=c.data={},n=c.NATIVE="N",V=c.POLYFILL="P";U.exports=c},4117:U=>{U.exports=function(l){return l==null}},34:(U,l,d)=>{var Z=d(4901);U.exports=function(t){return typeof t=="object"?t!==null:Z(t)}},3925:(U,l,d)=>{var Z=d(34);U.exports=function(t){return Z(t)||t===null}},6395:U=>{U.exports=!1},757:(U,l,d)=>{var Z=d(7751),t=d(4901),F=d(1625),c=d(7040),W=Object;U.exports=c?function(s){return typeof s=="symbol"}:function(s){var n=Z("Symbol");return t(n)&&F(n.prototype,W(s))}},507:(U,l,d)=>{var Z=d(9565);U.exports=function(t,F,c){for(var W=c?t:t.iterator,s=t.next,n,V;!(n=Z(s,W)).done;)if(V=F(n.value),V!==void 0)return V}},2652:(U,l,d)=>{var Z=d(6080),t=d(9565),F=d(8551),c=d(6823),W=d(4209),s=d(6198),n=d(1625),V=d(81),Q=d(851),i=d(9539),N=TypeError,e=function(M,J){this.stopped=M,this.result=J},m=e.prototype;U.exports=function(M,J,S){var G=S&&S.that,T=!!(S&&S.AS_ENTRIES),p=!!(S&&S.IS_RECORD),u=!!(S&&S.IS_ITERATOR),Y=!!(S&&S.INTERRUPTED),o=Z(J,G),X,B,y,E,D,w,I,L=function(A){return X&&i(X,"normal",A),new e(!0,A)},g=function(A){return T?(F(A),Y?o(A[0],A[1],L):o(A[0],A[1])):Y?o(A,L):o(A)};if(p)X=M.iterator;else if(u)X=M;else{if(B=Q(M),!B)throw new N(c(M)+" is not iterable");if(W(B)){for(y=0,E=s(M);E>y;y++)if(D=g(M[y]),D&&n(m,D))return D;return new e(!1)}X=V(M,B)}for(w=p?M.next:X.next;!(I=t(w,X)).done;){try{D=g(I.value)}catch(A){i(X,"throw",A)}if(typeof D=="object"&&D&&n(m,D))return D}return new e(!1)}},9539:(U,l,d)=>{var Z=d(9565),t=d(8551),F=d(5966);U.exports=function(c,W,s){var n,V;t(c);try{if(n=F(c,"return"),!n){if(W==="throw")throw s;return s}n=Z(n,c)}catch(Q){V=!0,n=Q}if(W==="throw")throw s;if(V)throw n;return t(n),s}},9462:(U,l,d)=>{var Z=d(9565),t=d(2360),F=d(6699),c=d(6279),W=d(8227),s=d(1181),n=d(5966),V=d(7657).IteratorPrototype,Q=d(2529),i=d(9539),N=W("toStringTag"),e="IteratorHelper",m="WrapForValidIterator",M=s.set,J=function(T){var p=s.getterFor(T?m:e);return c(t(V),{next:function(){var u=p(this);if(T)return u.nextHandler();try{var Y=u.done?void 0:u.nextHandler();return Q(Y,u.done)}catch(o){throw u.done=!0,o}},return:function(){var u=p(this),Y=u.iterator;if(u.done=!0,T){var o=n(Y,"return");return o?Z(o,Y):Q(void 0,!0)}if(u.inner)try{i(u.inner.iterator,"normal")}catch(X){return i(Y,"throw",X)}return Y&&i(Y,"normal"),Q(void 0,!0)}})},S=J(!0),G=J(!1);F(G,N,"Iterator Helper"),U.exports=function(T,p){var u=function(Y,o){o?(o.iterator=Y.iterator,o.next=Y.next):o=Y,o.type=p?m:e,o.nextHandler=T,o.counter=0,o.done=!1,M(this,o)};return u.prototype=p?S:G,u}},713:(U,l,d)=>{var Z=d(9565),t=d(9306),F=d(8551),c=d(1767),W=d(9462),s=d(6319),n=W(function(){var V=this.iterator,Q=F(Z(this.next,V)),i=this.done=!!Q.done;if(!i)return s(V,this.mapper,[Q.value,this.counter++],!0)});U.exports=function(V){return F(this),t(V),new n(c(this),{mapper:V})}},7657:(U,l,d)=>{var Z=d(9039),t=d(4901),F=d(34),c=d(2360),W=d(2787),s=d(6840),n=d(8227),V=d(6395),Q=n("iterator"),i=!1,N,e,m;[].keys&&(m=[].keys(),"next"in m?(e=W(W(m)),e!==Object.prototype&&(N=e)):i=!0);var M=!F(N)||Z(function(){var J={};return N[Q].call(J)!==J});M?N={}:V&&(N=c(N)),t(N[Q])||s(N,Q,function(){return this}),U.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:i}},6269:U=>{U.exports={}},6198:(U,l,d)=>{var Z=d(8014);U.exports=function(t){return Z(t.length)}},283:(U,l,d)=>{var Z=d(9504),t=d(9039),F=d(4901),c=d(9297),W=d(3724),s=d(350).CONFIGURABLE,n=d(3706),V=d(1181),Q=V.enforce,i=V.get,N=String,e=Object.defineProperty,m=Z("".slice),M=Z("".replace),J=Z([].join),S=W&&!t(function(){return e(function(){},"length",{value:8}).length!==8}),G=String(String).split("String"),T=U.exports=function(p,u,Y){m(N(u),0,7)==="Symbol("&&(u="["+M(N(u),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Y&&Y.getter&&(u="get "+u),Y&&Y.setter&&(u="set "+u),(!c(p,"name")||s&&p.name!==u)&&(W?e(p,"name",{value:u,configurable:!0}):p.name=u),S&&Y&&c(Y,"arity")&&p.length!==Y.arity&&e(p,"length",{value:Y.arity});try{Y&&c(Y,"constructor")&&Y.constructor?W&&e(p,"prototype",{writable:!1}):p.prototype&&(p.prototype=void 0)}catch{}var o=Q(p);return c(o,"source")||(o.source=J(G,typeof u=="string"?u:"")),p};Function.prototype.toString=T(function(){return F(this)&&i(this).source||n(this)},"toString")},741:U=>{var l=Math.ceil,d=Math.floor;U.exports=Math.trunc||function(Z){var t=+Z;return(t>0?d:l)(t)}},6043:(U,l,d)=>{var Z=d(9306),t=TypeError,F=function(c){var W,s;this.promise=new c(function(n,V){if(W!==void 0||s!==void 0)throw new t("Bad Promise constructor");W=n,s=V}),this.resolve=Z(W),this.reject=Z(s)};U.exports.f=function(c){return new F(c)}},2603:(U,l,d)=>{var Z=d(655);U.exports=function(t,F){return t===void 0?arguments.length<2?"":F:Z(t)}},4149:U=>{var l=RangeError;U.exports=function(d){if(d===d)return d;throw new l("NaN is not allowed")}},2360:(U,l,d)=>{var Z=d(8551),t=d(6801),F=d(8727),c=d(421),W=d(397),s=d(4055),n=d(6119),V=">",Q="<",i="prototype",N="script",e=n("IE_PROTO"),m=function(){},M=function(p){return Q+N+V+p+Q+"/"+N+V},J=function(p){p.write(M("")),p.close();var u=p.parentWindow.Object;return p=null,u},S=function(){var p=s("iframe"),u="java"+N+":",Y;return p.style.display="none",W.appendChild(p),p.src=String(u),Y=p.contentWindow.document,Y.open(),Y.write(M("document.F=Object")),Y.close(),Y.F},G,T=function(){try{G=new ActiveXObject("htmlfile")}catch{}T=typeof document<"u"?document.domain&&G?J(G):S():J(G);for(var p=F.length;p--;)delete T[i][F[p]];return T()};c[e]=!0,U.exports=Object.create||function(p,u){var Y;return p!==null?(m[i]=Z(p),Y=new m,m[i]=null,Y[e]=p):Y=T(),u===void 0?Y:t.f(Y,u)}},6801:(U,l,d)=>{var Z=d(3724),t=d(8686),F=d(4913),c=d(8551),W=d(5397),s=d(1072);l.f=Z&&!t?Object.defineProperties:function(n,V){c(n);for(var Q=W(V),i=s(V),N=i.length,e=0,m;N>e;)F.f(n,m=i[e++],Q[m]);return n}},4913:(U,l,d)=>{var Z=d(3724),t=d(5917),F=d(8686),c=d(8551),W=d(6969),s=TypeError,n=Object.defineProperty,V=Object.getOwnPropertyDescriptor,Q="enumerable",i="configurable",N="writable";l.f=Z?F?function(e,m,M){if(c(e),m=W(m),c(M),typeof e=="function"&&m==="prototype"&&"value"in M&&N in M&&!M[N]){var J=V(e,m);J&&J[N]&&(e[m]=M.value,M={configurable:i in M?M[i]:J[i],enumerable:Q in M?M[Q]:J[Q],writable:!1})}return n(e,m,M)}:n:function(e,m,M){if(c(e),m=W(m),c(M),t)try{return n(e,m,M)}catch{}if("get"in M||"set"in M)throw new s("Accessors not supported");return"value"in M&&(e[m]=M.value),e}},7347:(U,l,d)=>{var Z=d(3724),t=d(9565),F=d(8773),c=d(6980),W=d(5397),s=d(6969),n=d(9297),V=d(5917),Q=Object.getOwnPropertyDescriptor;l.f=Z?Q:function(i,N){if(i=W(i),N=s(N),V)try{return Q(i,N)}catch{}if(n(i,N))return c(!t(F.f,i,N),i[N])}},8480:(U,l,d)=>{var Z=d(1828),t=d(8727),F=t.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(c){return Z(c,F)}},3717:(U,l)=>{l.f=Object.getOwnPropertySymbols},2787:(U,l,d)=>{var Z=d(9297),t=d(4901),F=d(8981),c=d(6119),W=d(2211),s=c("IE_PROTO"),n=Object,V=n.prototype;U.exports=W?n.getPrototypeOf:function(Q){var i=F(Q);if(Z(i,s))return i[s];var N=i.constructor;return t(N)&&i instanceof N?N.prototype:i instanceof n?V:null}},1625:(U,l,d)=>{var Z=d(9504);U.exports=Z({}.isPrototypeOf)},1828:(U,l,d)=>{var Z=d(9504),t=d(9297),F=d(5397),c=d(9617).indexOf,W=d(421),s=Z([].push);U.exports=function(n,V){var Q=F(n),i=0,N=[],e;for(e in Q)!t(W,e)&&t(Q,e)&&s(N,e);for(;V.length>i;)t(Q,e=V[i++])&&(~c(N,e)||s(N,e));return N}},1072:(U,l,d)=>{var Z=d(1828),t=d(8727);U.exports=Object.keys||function(F){return Z(F,t)}},8773:(U,l)=>{var d={}.propertyIsEnumerable,Z=Object.getOwnPropertyDescriptor,t=Z&&!d.call({1:2},1);l.f=t?function(F){var c=Z(this,F);return!!c&&c.enumerable}:d},2967:(U,l,d)=>{var Z=d(6706),t=d(34),F=d(7750),c=d(3506);U.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var W=!1,s={},n;try{n=Z(Object.prototype,"__proto__","set"),n(s,[]),W=s instanceof Array}catch{}return function(V,Q){return F(V),c(Q),t(V)&&(W?n(V,Q):V.__proto__=Q),V}}():void 0)},4270:(U,l,d)=>{var Z=d(9565),t=d(4901),F=d(34),c=TypeError;U.exports=function(W,s){var n,V;if(s==="string"&&t(n=W.toString)&&!F(V=Z(n,W))||t(n=W.valueOf)&&!F(V=Z(n,W))||s!=="string"&&t(n=W.toString)&&!F(V=Z(n,W)))return V;throw new c("Can't convert object to primitive value")}},5031:(U,l,d)=>{var Z=d(7751),t=d(9504),F=d(8480),c=d(3717),W=d(8551),s=t([].concat);U.exports=Z("Reflect","ownKeys")||function(n){var V=F.f(W(n)),Q=c.f;return Q?s(V,Q(n)):V}},8235:(U,l,d)=>{var Z=d(9504),t=d(9297),F=SyntaxError,c=parseInt,W=String.fromCharCode,s=Z("".charAt),n=Z("".slice),V=Z(/./.exec),Q={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` `,"\\r":"\r","\\t":" "},i=/^[\da-f]{4}$/i,N=/^[\u0000-\u001F]$/;U.exports=function(e,m){for(var M=!0,J="";m {U.exports=function(l){try{return{error:!1,value:l()}}catch(d){return{error:!0,value:d}}}},7750:(U,l,d)=>{var Z=d(4117),t=TypeError;U.exports=function(F){if(Z(F))throw new t("Can't call method on "+F);return F}},9286:(U,l,d)=>{var Z=d(4402),t=d(8469),F=Z.Set,c=Z.add;U.exports=function(W){var s=new F;return t(W,function(n){c(s,n)}),s}},3440:(U,l,d)=>{var Z=d(7080),t=d(4402),F=d(9286),c=d(5170),W=d(3789),s=d(8469),n=d(507),V=t.has,Q=t.remove;U.exports=function(i){var N=Z(this),e=W(i),m=F(N);return c(N)<=e.size?s(N,function(M){e.includes(M)&&Q(m,M)}):n(e.getIterator(),function(M){V(N,M)&&Q(m,M)}),m}},4402:(U,l,d)=>{var Z=d(9504),t=Set.prototype;U.exports={Set,add:Z(t.add),has:Z(t.has),remove:Z(t.delete),proto:t}},8750:(U,l,d)=>{var Z=d(7080),t=d(4402),F=d(5170),c=d(3789),W=d(8469),s=d(507),n=t.Set,V=t.add,Q=t.has;U.exports=function(i){var N=Z(this),e=c(i),m=new n;return F(N)>e.size?s(e.getIterator(),function(M){Q(N,M)&&V(m,M)}):W(N,function(M){e.includes(M)&&V(m,M)}),m}},4449:(U,l,d)=>{var Z=d(7080),t=d(4402).has,F=d(5170),c=d(3789),W=d(8469),s=d(507),n=d(9539);U.exports=function(V){var Q=Z(this),i=c(V);if(F(Q)<=i.size)return W(Q,function(e){if(i.includes(e))return!1},!0)!==!1;var N=i.getIterator();return s(N,function(e){if(t(Q,e))return n(N,"normal",!1)})!==!1}},3838:(U,l,d)=>{var Z=d(7080),t=d(5170),F=d(8469),c=d(3789);U.exports=function(W){var s=Z(this),n=c(W);return t(s)>n.size?!1:F(s,function(V){if(!n.includes(V))return!1},!0)!==!1}},8527:(U,l,d)=>{var Z=d(7080),t=d(4402).has,F=d(5170),c=d(3789),W=d(507),s=d(9539);U.exports=function(n){var V=Z(this),Q=c(n);if(F(V) {var Z=d(9504),t=d(507),F=d(4402),c=F.Set,W=F.proto,s=Z(W.forEach),n=Z(W.keys),V=n(new c).next;U.exports=function(Q,i,N){return N?t({iterator:n(Q),next:V},i):s(Q,i)}},4916:(U,l,d)=>{var Z=d(7751),t=function(F){return{size:F,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};U.exports=function(F){var c=Z("Set");try{new c()[F](t(0));try{return new c()[F](t(-1)),!1}catch{return!0}}catch{return!1}}},5170:(U,l,d)=>{var Z=d(6706),t=d(4402);U.exports=Z(t.proto,"size","get")||function(F){return F.size}},3650:(U,l,d)=>{var Z=d(7080),t=d(4402),F=d(9286),c=d(3789),W=d(507),s=t.add,n=t.has,V=t.remove;U.exports=function(Q){var i=Z(this),N=c(Q).getIterator(),e=F(i);return W(N,function(m){n(i,m)?V(e,m):s(e,m)}),e}},4204:(U,l,d)=>{var Z=d(7080),t=d(4402).add,F=d(9286),c=d(3789),W=d(507);U.exports=function(s){var n=Z(this),V=c(s).getIterator(),Q=F(n);return W(V,function(i){t(Q,i)}),Q}},6119:(U,l,d)=>{var Z=d(5745),t=d(3392),F=Z("keys");U.exports=function(c){return F[c]||(F[c]=t(c))}},7629:(U,l,d)=>{var Z=d(6395),t=d(4576),F=d(9433),c="__core-js_shared__",W=U.exports=t[c]||F(c,{});(W.versions||(W.versions=[])).push({version:"3.39.0",mode:Z?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(U,l,d)=>{var Z=d(7629);U.exports=function(t,F){return Z[t]||(Z[t]=F||{})}},1548:(U,l,d)=>{var Z=d(4576),t=d(9039),F=d(9519),c=d(4215),W=Z.structuredClone;U.exports=!!W&&!t(function(){if(c==="DENO"&&F>92||c==="NODE"&&F>94||c==="BROWSER"&&F>97)return!1;var s=new ArrayBuffer(8),n=W(s,{transfer:[s]});return s.byteLength!==0||n.byteLength!==8})},4495:(U,l,d)=>{var Z=d(9519),t=d(9039),F=d(4576),c=F.String;U.exports=!!Object.getOwnPropertySymbols&&!t(function(){var W=Symbol("symbol detection");return!c(W)||!(Object(W)instanceof Symbol)||!Symbol.sham&&Z&&Z<41})},5610:(U,l,d)=>{var Z=d(1291),t=Math.max,F=Math.min;U.exports=function(c,W){var s=Z(c);return s<0?t(s+W,0):F(s,W)}},5854:(U,l,d)=>{var Z=d(2777),t=TypeError;U.exports=function(F){var c=Z(F,"number");if(typeof c=="number")throw new t("Can't convert number to bigint");return BigInt(c)}},7696:(U,l,d)=>{var Z=d(1291),t=d(8014),F=RangeError;U.exports=function(c){if(c===void 0)return 0;var W=Z(c),s=t(W);if(W!==s)throw new F("Wrong length or index");return s}},5397:(U,l,d)=>{var Z=d(7055),t=d(7750);U.exports=function(F){return Z(t(F))}},1291:(U,l,d)=>{var Z=d(741);U.exports=function(t){var F=+t;return F!==F||F===0?0:Z(F)}},8014:(U,l,d)=>{var Z=d(1291),t=Math.min;U.exports=function(F){var c=Z(F);return c>0?t(c,9007199254740991):0}},8981:(U,l,d)=>{var Z=d(7750),t=Object;U.exports=function(F){return t(Z(F))}},9590:(U,l,d)=>{var Z=d(1291),t=RangeError;U.exports=function(F){var c=Z(F);if(c<0)throw new t("The argument can't be less than 0");return c}},2777:(U,l,d)=>{var Z=d(9565),t=d(34),F=d(757),c=d(5966),W=d(4270),s=d(8227),n=TypeError,V=s("toPrimitive");U.exports=function(Q,i){if(!t(Q)||F(Q))return Q;var N=c(Q,V),e;if(N){if(i===void 0&&(i="default"),e=Z(N,Q,i),!t(e)||F(e))return e;throw new n("Can't convert object to primitive value")}return i===void 0&&(i="number"),W(Q,i)}},6969:(U,l,d)=>{var Z=d(2777),t=d(757);U.exports=function(F){var c=Z(F,"string");return t(c)?c:c+""}},2140:(U,l,d)=>{var Z=d(8227),t=Z("toStringTag"),F={};F[t]="z",U.exports=String(F)==="[object z]"},655:(U,l,d)=>{var Z=d(6955),t=String;U.exports=function(F){if(Z(F)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(F)}},6823:U=>{var l=String;U.exports=function(d){try{return l(d)}catch{return"Object"}}},3392:(U,l,d)=>{var Z=d(9504),t=0,F=Math.random(),c=Z(1 .toString);U.exports=function(W){return"Symbol("+(W===void 0?"":W)+")_"+c(++t+F,36)}},7040:(U,l,d)=>{var Z=d(4495);U.exports=Z&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:(U,l,d)=>{var Z=d(3724),t=d(9039);U.exports=Z&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2812:U=>{var l=TypeError;U.exports=function(d,Z){if(d {var Z=d(4576),t=d(4901),F=Z.WeakMap;U.exports=t(F)&&/native code/.test(String(F))},8227:(U,l,d)=>{var Z=d(4576),t=d(5745),F=d(9297),c=d(3392),W=d(4495),s=d(7040),n=Z.Symbol,V=t("wks"),Q=s?n.for||n:n&&n.withoutSetter||c;U.exports=function(i){return F(V,i)||(V[i]=W&&F(n,i)?n[i]:Q("Symbol."+i)),V[i]}},6573:(U,l,d)=>{var Z=d(3724),t=d(2106),F=d(3238),c=ArrayBuffer.prototype;Z&&!("detached"in c)&&t(c,"detached",{configurable:!0,get:function(){return F(this)}})},7936:(U,l,d)=>{var Z=d(6518),t=d(5636);t&&Z({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return t(this,arguments.length?arguments[0]:void 0,!1)}})},8100:(U,l,d)=>{var Z=d(6518),t=d(5636);t&&Z({target:"ArrayBuffer",proto:!0},{transfer:function(){return t(this,arguments.length?arguments[0]:void 0,!0)}})},4114:(U,l,d)=>{var Z=d(6518),t=d(8981),F=d(6198),c=d(4527),W=d(6837),s=d(9039),n=s(function(){return[].push.call({length:4294967296},1)!==4294967297}),V=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(i){return i instanceof TypeError}},Q=n||!V();Z({target:"Array",proto:!0,arity:1,forced:Q},{push:function(i){var N=t(this),e=F(N),m=arguments.length;W(e+m);for(var M=0;M {var Z=d(6518),t=d(4576),F=d(679),c=d(8551),W=d(4901),s=d(2787),n=d(2106),V=d(4659),Q=d(9039),i=d(9297),N=d(8227),e=d(7657).IteratorPrototype,m=d(3724),M=d(6395),J="constructor",S="Iterator",G=N("toStringTag"),T=TypeError,p=t[S],u=M||!W(p)||p.prototype!==e||!Q(function(){p({})}),Y=function(){if(F(this,e),s(this)===e)throw new T("Abstract class Iterator not directly constructable")},o=function(X,B){m?n(e,X,{configurable:!0,get:function(){return B},set:function(y){if(c(this),this===e)throw new T("You can't redefine this property");i(this,X)?this[X]=y:V(this,X,y)}}):e[X]=B};i(e,G)||o(G,S),(u||!i(e,J)||e[J]===Object)&&o(J,Y),Y.prototype=e,Z({global:!0,constructor:!0,forced:u},{Iterator:Y})},9314:(U,l,d)=>{var Z=d(6518),t=d(9565),F=d(8551),c=d(1767),W=d(4149),s=d(9590),n=d(9462),V=d(6395),Q=n(function(){for(var i=this.iterator,N=this.next,e,m;this.remaining;)if(this.remaining--,e=F(t(N,i)),m=this.done=!!e.done,m)return;if(e=F(t(N,i)),m=this.done=!!e.done,!m)return e.value});Z({target:"Iterator",proto:!0,real:!0,forced:V},{drop:function(i){F(this);var N=s(W(+i));return new Q(c(this),{remaining:N})}})},1148:(U,l,d)=>{var Z=d(6518),t=d(2652),F=d(9306),c=d(8551),W=d(1767);Z({target:"Iterator",proto:!0,real:!0},{every:function(s){c(this),F(s);var n=W(this),V=0;return!t(n,function(Q,i){if(!s(Q,V++))return i()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2489:(U,l,d)=>{var Z=d(6518),t=d(9565),F=d(9306),c=d(8551),W=d(1767),s=d(9462),n=d(6319),V=d(6395),Q=s(function(){for(var i=this.iterator,N=this.predicate,e=this.next,m,M,J;;){if(m=c(t(e,i)),M=this.done=!!m.done,M)return;if(J=m.value,n(i,N,[J,this.counter++],!0))return J}});Z({target:"Iterator",proto:!0,real:!0,forced:V},{filter:function(i){return c(this),F(i),new Q(W(this),{predicate:i})}})},531:(U,l,d)=>{var Z=d(6518),t=d(9565),F=d(9306),c=d(8551),W=d(1767),s=d(8646),n=d(9462),V=d(9539),Q=d(6395),i=n(function(){for(var N=this.iterator,e=this.mapper,m,M;;){if(M=this.inner)try{if(m=c(t(M.next,M.iterator)),!m.done)return m.value;this.inner=null}catch(J){V(N,"throw",J)}if(m=c(t(this.next,N)),this.done=!!m.done)return;try{this.inner=s(e(m.value,this.counter++),!1)}catch(J){V(N,"throw",J)}}});Z({target:"Iterator",proto:!0,real:!0,forced:Q},{flatMap:function(N){return c(this),F(N),new i(W(this),{mapper:N,inner:null})}})},1701:(U,l,d)=>{var Z=d(6518),t=d(713),F=d(6395);Z({target:"Iterator",proto:!0,real:!0,forced:F},{map:t})},3579:(U,l,d)=>{var Z=d(6518),t=d(2652),F=d(9306),c=d(8551),W=d(1767);Z({target:"Iterator",proto:!0,real:!0},{some:function(s){c(this),F(s);var n=W(this),V=0;return t(n,function(Q,i){if(s(Q,V++))return i()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},1689:(U,l,d)=>{var Z=d(6518),t=d(4576),F=d(8745),c=d(7680),W=d(6043),s=d(9306),n=d(1103),V=t.Promise,Q=!1,i=!V||!V.try||n(function(){V.try(function(N){Q=N===8},8)}).error||!Q;Z({target:"Promise",stat:!0,forced:i},{try:function(N){var e=arguments.length>1?c(arguments,1):[],m=W.f(this),M=n(function(){return F(s(N),void 0,e)});return(M.error?m.reject:m.resolve)(M.value),m.promise}})},4628:(U,l,d)=>{var Z=d(6518),t=d(6043);Z({target:"Promise",stat:!0},{withResolvers:function(){var F=t.f(this);return{promise:F.promise,resolve:F.resolve,reject:F.reject}}})},7642:(U,l,d)=>{var Z=d(6518),t=d(3440),F=d(4916);Z({target:"Set",proto:!0,real:!0,forced:!F("difference")},{difference:t})},8004:(U,l,d)=>{var Z=d(6518),t=d(9039),F=d(8750),c=d(4916),W=!c("intersection")||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Z({target:"Set",proto:!0,real:!0,forced:W},{intersection:F})},3853:(U,l,d)=>{var Z=d(6518),t=d(4449),F=d(4916);Z({target:"Set",proto:!0,real:!0,forced:!F("isDisjointFrom")},{isDisjointFrom:t})},5876:(U,l,d)=>{var Z=d(6518),t=d(3838),F=d(4916);Z({target:"Set",proto:!0,real:!0,forced:!F("isSubsetOf")},{isSubsetOf:t})},2475:(U,l,d)=>{var Z=d(6518),t=d(8527),F=d(4916);Z({target:"Set",proto:!0,real:!0,forced:!F("isSupersetOf")},{isSupersetOf:t})},5024:(U,l,d)=>{var Z=d(6518),t=d(3650),F=d(4916);Z({target:"Set",proto:!0,real:!0,forced:!F("symmetricDifference")},{symmetricDifference:t})},1698:(U,l,d)=>{var Z=d(6518),t=d(4204),F=d(4916);Z({target:"Set",proto:!0,real:!0,forced:!F("union")},{union:t})},7467:(U,l,d)=>{var Z=d(7628),t=d(4644),F=t.aTypedArray,c=t.exportTypedArrayMethod,W=t.getTypedArrayConstructor;c("toReversed",function(){return Z(F(this),W(this))})},4732:(U,l,d)=>{var Z=d(4644),t=d(9504),F=d(9306),c=d(5370),W=Z.aTypedArray,s=Z.getTypedArrayConstructor,n=Z.exportTypedArrayMethod,V=t(Z.TypedArrayPrototype.sort);n("toSorted",function(Q){Q!==void 0&&F(Q);var i=W(this),N=c(s(i),i);return V(N,Q)})},9577:(U,l,d)=>{var Z=d(9928),t=d(4644),F=d(1108),c=d(1291),W=d(5854),s=t.aTypedArray,n=t.getTypedArrayConstructor,V=t.exportTypedArrayMethod,Q=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(i){return i===8}}();V("with",function(i,N){var e=s(this),m=c(i),M=F(e)?W(N):+N;return Z(e,n(e),m,M)},!Q)},8992:(U,l,d)=>{d(8111)},4743:(U,l,d)=>{d(9314)},3215:(U,l,d)=>{d(1148)},4520:(U,l,d)=>{d(2489)},670:(U,l,d)=>{d(531)},1454:(U,l,d)=>{d(1701)},7550:(U,l,d)=>{d(3579)},8335:(U,l,d)=>{var Z=d(6518),t=d(3724),F=d(4576),c=d(7751),W=d(9504),s=d(9565),n=d(4901),V=d(34),Q=d(4376),i=d(9297),N=d(655),e=d(6198),m=d(4659),M=d(9039),J=d(8235),S=d(4495),G=F.JSON,T=F.Number,p=F.SyntaxError,u=G&&G.parse,Y=c("Object","keys"),o=Object.getOwnPropertyDescriptor,X=W("".charAt),B=W("".slice),y=W(/./.exec),E=W([].push),D=/^\d$/,w=/^[1-9]$/,I=/^[\d-]$/,L=/^[\t\n\r ]$/,g=0,A=1,Vl=function(C,z){C=N(C);var r=new bl(C,0),ll=r.parse(),hl=ll.value,_=r.skip(L,ll.end);if(_ {d(1689)},4979:(U,l,d)=>{var Z=d(6518),t=d(4576),F=d(7751),c=d(6980),W=d(4913).f,s=d(9297),n=d(679),V=d(3167),Q=d(2603),i=d(5002),N=d(8574),e=d(3724),m=d(6395),M="DOMException",J=F("Error"),S=F(M),G=function(){n(this,T);var I=arguments.length,L=Q(I<1?void 0:arguments[0]),g=Q(I<2?void 0:arguments[1],"Error"),A=new S(L,g),Vl=new J(L);return Vl.name=M,W(A,"stack",c(1,N(Vl.stack,1))),V(A,this,G),A},T=G.prototype=S.prototype,p="stack"in new J(M),u="stack"in new S(1,2),Y=S&&e&&Object.getOwnPropertyDescriptor(t,M),o=!!Y&&!(Y.writable&&Y.configurable),X=p&&!o&&!u;Z({global:!0,constructor:!0,forced:m||X},{DOMException:X?G:S});var B=F(M),y=B.prototype;if(y.constructor!==B){m||W(y,"constructor",c(1,B));for(var E in i)if(s(i,E)){var D=i[E],w=D.s;s(B,w)||W(B,w,c(6,D.c))}}},4603:(U,l,d)=>{var Z=d(6840),t=d(9504),F=d(655),c=d(2812),W=URLSearchParams,s=W.prototype,n=t(s.append),V=t(s.delete),Q=t(s.forEach),i=t([].push),N=new W("a=1&a=2&b=3");N.delete("a",1),N.delete("b",void 0),N+""!="a=2"&&Z(s,"delete",function(e){var m=arguments.length,M=m<2?void 0:arguments[1];if(m&&M===void 0)return V(this,e);var J=[];Q(this,function(X,B){i(J,{key:B,value:X})}),c(m,1);for(var S=F(e),G=F(M),T=0,p=0,u=!1,Y=J.length,o;T {var Z=d(6840),t=d(9504),F=d(655),c=d(2812),W=URLSearchParams,s=W.prototype,n=t(s.getAll),V=t(s.has),Q=new W("a=1");(Q.has("a",2)||!Q.has("a",void 0))&&Z(s,"has",function(i){var N=arguments.length,e=N<2?void 0:arguments[1];if(N&&e===void 0)return V(this,i);var m=n(this,i);c(N,1);for(var M=F(e),J=0;J {var Z=d(3724),t=d(9504),F=d(2106),c=URLSearchParams.prototype,W=t(c.forEach);Z&&!("size"in c)&&F(c,"size",{get:function(){var s=0;return W(this,function(){s++}),s},configurable:!0,enumerable:!0})}},qR={};function nl(U){var l=qR[U];if(l!==void 0)return l.exports;var d=qR[U]={exports:{}};return Om[U].call(d.exports,d,d.exports,nl),d.exports}nl.d=(U,l)=>{for(var d in l)nl.o(l,d)&&!nl.o(U,d)&&Object.defineProperty(U,d,{enumerable:!0,get:l[d]})};nl.o=(U,l)=>Object.prototype.hasOwnProperty.call(U,l);var $=globalThis.pdfjsLib={};nl.d($,{AbortException:()=>Bt,AnnotationEditorLayer:()=>tJ,AnnotationEditorParamsType:()=>cl,AnnotationEditorType:()=>Zl,AnnotationEditorUIManager:()=>LW,AnnotationLayer:()=>vM,AnnotationMode:()=>Rt,ColorPicker:()=>Qb,DOMSVGFactory:()=>jR,DrawLayer:()=>FJ,FeatureTest:()=>Id,GlobalWorkerOptions:()=>f0,ImageKind:()=>gs,InvalidPDFException:()=>ii,MissingPDFException:()=>zW,OPS:()=>yU,OutputScale:()=>CR,PDFDataRangeTransport:()=>Le,PDFDateString:()=>Hh,PDFWorker:()=>sn,PasswordResponses:()=>Hm,PermissionFlag:()=>vm,PixelsPerInch:()=>Gc,RenderingCancelledException:()=>DR,TextLayer:()=>Li,TouchManager:()=>Ue,UnexpectedResponseException:()=>SV,Util:()=>O,VerbosityLevel:()=>lQ,XfaLayer:()=>Ee,build:()=>XM,createValidAbsoluteUrl:()=>_m,fetchData:()=>tQ,getDocument:()=>RM,getFilenameFromUrl:()=>c2,getPdfFilenameFromUrl:()=>a2,getXfaPageViewport:()=>W2,isDataScheme:()=>FQ,isPdfFile:()=>ER,noContextMenu:()=>LU,normalizeUnicode:()=>Z2,setLayerDimensions:()=>wF,shadow:()=>tl,stopEvent:()=>tU,version:()=>TM});nl(4114);nl(6573);nl(8100);nl(7936);nl(7467);nl(4732);nl(9577);nl(5247);nl(4979);nl(4603);nl(7566);nl(8721);const Bd=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),Kh=[1,0,0,1,0,0],Qi=[.001,0,0,.001,0,0],gm=1e7,VQ=1.35,dU={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},Rt={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Km="pdfjs_internal_editor_",Zl={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},cl={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},vm={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Md={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},gs={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},ld={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,WIDGET:20},Xc={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},lQ={ERRORS:0,WARNINGS:1,INFOS:5},yU={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},Hm={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let dQ=lQ.WARNINGS;function Pm(U){Number.isInteger(U)&&(dQ=U)}function fm(){return dQ}function UQ(U){dQ>=lQ.INFOS&&console.log(`Info: ${U}`)}function dl(U){dQ>=lQ.WARNINGS&&console.log(`Warning: ${U}`)}function Gl(U){throw new Error(U)}function Al(U,l){U||Gl(l)}function Am(U){switch(U==null?void 0:U.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function _m(U,l=null,d=null){if(!U)return null;try{if(d&&typeof U=="string"){if(d.addDefaultProtocol&&U.startsWith("www.")){const t=U.match(/\./g);(t==null?void 0:t.length)>=2&&(U=`http://${U}`)}if(d.tryConvertEncoding)try{U=U2(U)}catch{}}const Z=l?new URL(U,l):new URL(U);if(Am(Z))return Z}catch{}return null}function tl(U,l,d,Z=!1){return Object.defineProperty(U,l,{value:d,enumerable:!Z,configurable:!0,writable:!1}),d}const yt=function(){function U(l,d){this.message=l,this.name=d}return U.prototype=new Error,U.constructor=U,U}();class $R extends yt{constructor(l,d){super(l,"PasswordException"),this.code=d}}class QQ extends yt{constructor(l,d){super(l,"UnknownErrorException"),this.details=d}}let ii=class extends yt{constructor(U){super(U,"InvalidPDFException")}},zW=class extends yt{constructor(U){super(U,"MissingPDFException")}},SV=class extends yt{constructor(U,l){super(U,"UnexpectedResponseException"),this.status=l}};class qm extends yt{constructor(l){super(l,"FormatError")}}let Bt=class extends yt{constructor(U){super(U,"AbortException")}};function vh(U){(typeof U!="object"||(U==null?void 0:U.length)===void 0)&&Gl("Invalid argument for bytesToString");const l=U.length,d=8192;if(l >24&255,U>>16&255,U>>8&255,U&255)}function LR(U){const l=Object.create(null);for(const[d,Z]of U)l[d]=Z;return l}function l2(){const U=new Uint8Array(4);return U[0]=1,new Uint32Array(U.buffer,0,1)[0]===1}function d2(){try{return new Function(""),!0}catch{return!1}}class Id{static get isLittleEndian(){return tl(this,"isLittleEndian",l2())}static get isEvalSupported(){return tl(this,"isEvalSupported",d2())}static get isOffscreenCanvasSupported(){return tl(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return tl(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?tl(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):tl(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var l,d;return tl(this,"isCSSRoundSupported",(d=(l=globalThis.CSS)==null?void 0:l.supports)==null?void 0:d.call(l,"width: round(1.5px, 1px)"))}}const iQ=Array.from(Array(256).keys(),U=>U.toString(16).padStart(2,"0"));var zt,RQ,KW,NQ;let O=(RQ=class{static makeHexColor(U,l,d){return`#${iQ[U]}${iQ[l]}${iQ[d]}`}static scaleMinMax(U,l){let d;U[0]?(U[0]<0&&(d=l[0],l[0]=l[2],l[2]=d),l[0]*=U[0],l[2]*=U[0],U[3]<0&&(d=l[1],l[1]=l[3],l[3]=d),l[1]*=U[3],l[3]*=U[3]):(d=l[0],l[0]=l[1],l[1]=d,d=l[2],l[2]=l[3],l[3]=d,U[1]<0&&(d=l[1],l[1]=l[3],l[3]=d),l[1]*=U[1],l[3]*=U[1],U[2]<0&&(d=l[0],l[0]=l[2],l[2]=d),l[0]*=U[2],l[2]*=U[2]),l[0]+=U[4],l[1]+=U[5],l[2]+=U[4],l[3]+=U[5]}static transform(U,l){return[U[0]*l[0]+U[2]*l[1],U[1]*l[0]+U[3]*l[1],U[0]*l[2]+U[2]*l[3],U[1]*l[2]+U[3]*l[3],U[0]*l[4]+U[2]*l[5]+U[4],U[1]*l[4]+U[3]*l[5]+U[5]]}static applyTransform(U,l){const d=U[0]*l[0]+U[1]*l[2]+l[4],Z=U[0]*l[1]+U[1]*l[3]+l[5];return[d,Z]}static applyInverseTransform(U,l){const d=l[0]*l[3]-l[1]*l[2],Z=(U[0]*l[3]-U[1]*l[2]+l[2]*l[5]-l[4]*l[3])/d,t=(-U[0]*l[1]+U[1]*l[0]+l[4]*l[1]-l[5]*l[0])/d;return[Z,t]}static getAxialAlignedBoundingBox(U,l){const d=this.applyTransform(U,l),Z=this.applyTransform(U.slice(2,4),l),t=this.applyTransform([U[0],U[3]],l),F=this.applyTransform([U[2],U[1]],l);return[Math.min(d[0],Z[0],t[0],F[0]),Math.min(d[1],Z[1],t[1],F[1]),Math.max(d[0],Z[0],t[0],F[0]),Math.max(d[1],Z[1],t[1],F[1])]}static inverseTransform(U){const l=U[0]*U[3]-U[1]*U[2];return[U[3]/l,-U[1]/l,-U[2]/l,U[0]/l,(U[2]*U[5]-U[4]*U[3])/l,(U[4]*U[1]-U[5]*U[0])/l]}static singularValueDecompose2dScale(U){const l=[U[0],U[2],U[1],U[3]],d=U[0]*l[0]+U[1]*l[2],Z=U[0]*l[1]+U[1]*l[3],t=U[2]*l[0]+U[3]*l[2],F=U[2]*l[1]+U[3]*l[3],c=(d+F)/2,W=Math.sqrt((d+F)**2-4*(d*F-t*Z))/2,s=c+W||1,n=c-W||1;return[Math.sqrt(s),Math.sqrt(n)]}static normalizeRect(U){const l=U.slice(0);return U[0]>U[2]&&(l[0]=U[2],l[2]=U[0]),U[1]>U[3]&&(l[1]=U[3],l[3]=U[1]),l}static intersect(U,l){const d=Math.max(Math.min(U[0],U[2]),Math.min(l[0],l[2])),Z=Math.min(Math.max(U[0],U[2]),Math.max(l[0],l[2]));if(d>Z)return null;const t=Math.max(Math.min(U[1],U[3]),Math.min(l[1],l[3])),F=Math.min(Math.max(U[1],U[3]),Math.max(l[1],l[3]));return t>F?null:[d,t,Z,F]}static bezierBoundingBox(U,l,d,Z,t,F,c,W,s){return s?(s[0]=Math.min(s[0],U,c),s[1]=Math.min(s[1],l,W),s[2]=Math.max(s[2],U,c),s[3]=Math.max(s[3],l,W)):s=[Math.min(U,c),Math.min(l,W),Math.max(U,c),Math.max(l,W)],h(this,zt,NQ).call(this,U,d,t,c,l,Z,F,W,3*(-U+3*(d-t)+c),6*(U-2*d+t),3*(d-U),s),h(this,zt,NQ).call(this,U,d,t,c,l,Z,F,W,3*(-l+3*(Z-F)+W),6*(l-2*Z+F),3*(Z-l),s),s}},zt=new WeakSet,KW=function(U,l,d,Z,t,F,c,W,s,n){if(s<=0||s>=1)return;const V=1-s,Q=s*s,i=Q*s,N=V*(V*(V*U+3*s*l)+3*Q*d)+i*Z,e=V*(V*(V*t+3*s*F)+3*Q*c)+i*W;n[0]=Math.min(n[0],N),n[1]=Math.min(n[1],e),n[2]=Math.max(n[2],N),n[3]=Math.max(n[3],e)},NQ=function(U,l,d,Z,t,F,c,W,s,n,V,Q){if(Math.abs(s)<1e-12){Math.abs(n)>=1e-12&&h(this,zt,KW).call(this,U,l,d,Z,t,F,c,W,-V/n,Q);return}const i=n**2-4*V*s;if(i<0)return;const N=Math.sqrt(i),e=2*s;h(this,zt,KW).call(this,U,l,d,Z,t,F,c,W,(-n+N)/e,Q),h(this,zt,KW).call(this,U,l,d,Z,t,F,c,W,(-n-N)/e,Q)},b(RQ,zt),RQ);function U2(U){return decodeURIComponent(escape(U))}let hQ=null,lN=null;function Z2(U){return hQ||(hQ=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,lN=new Map([["ſt","ſt"]])),U.replaceAll(hQ,(l,d,Z)=>d?d.normalize("NFKC"):lN.get(Z))}function t2(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const U=new Uint8Array(32);return crypto.getRandomValues(U),vh(U)}const IR="pdfjs_internal_id_";function F2(U){return Uint8Array.prototype.toBase64?U.toBase64():btoa(vh(U))}nl(4628);nl(7642);nl(8004);nl(3853);nl(5876);nl(2475);nl(5024);nl(1698);nl(1454);nl(8992);nl(4743);nl(3215);nl(7550);nl(8335);const VZ="http://www.w3.org/2000/svg";var Lt;let Gc=(Lt=class{},f(Lt,"CSS",96),f(Lt,"PDF",72),f(Lt,"PDF_TO_CSS_UNITS",Lt.CSS/Lt.PDF),Lt);async function tQ(U,l="text"){if(Fa(U,document.baseURI)){const d=await fetch(U);if(!d.ok)throw new Error(d.statusText);switch(l){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"json":return d.json()}return d.text()}return new Promise((d,Z)=>{const t=new XMLHttpRequest;t.open("GET",U,!0),t.responseType=l,t.onreadystatechange=()=>{if(t.readyState===XMLHttpRequest.DONE){if(t.status===200||t.status===0){switch(l){case"arraybuffer":case"blob":case"json":d(t.response);return}d(t.responseText);return}Z(new Error(t.statusText))}},t.send(null)})}class wW{constructor({viewBox:l,userUnit:d,scale:Z,rotation:t,offsetX:F=0,offsetY:c=0,dontFlip:W=!1}){this.viewBox=l,this.userUnit=d,this.scale=Z,this.rotation=t,this.offsetX=F,this.offsetY=c,Z*=d;const s=(l[2]+l[0])/2,n=(l[3]+l[1])/2;let V,Q,i,N;switch(t%=360,t<0&&(t+=360),t){case 180:V=-1,Q=0,i=0,N=1;break;case 90:V=0,Q=1,i=1,N=0;break;case 270:V=0,Q=-1,i=-1,N=0;break;case 0:V=1,Q=0,i=0,N=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}W&&(i=-i,N=-N);let e,m,M,J;V===0?(e=Math.abs(n-l[1])*Z+F,m=Math.abs(s-l[0])*Z+c,M=(l[3]-l[1])*Z,J=(l[2]-l[0])*Z):(e=Math.abs(s-l[0])*Z+F,m=Math.abs(n-l[1])*Z+c,M=(l[2]-l[0])*Z,J=(l[3]-l[1])*Z),this.transform=[V*Z,Q*Z,i*Z,N*Z,e-V*Z*s-i*Z*n,m-Q*Z*s-N*Z*n],this.width=M,this.height=J}get rawDims(){const{userUnit:l,viewBox:d}=this,Z=d.map(t=>t*l);return tl(this,"rawDims",{pageWidth:Z[2]-Z[0],pageHeight:Z[3]-Z[1],pageX:Z[0],pageY:Z[1]})}clone({scale:l=this.scale,rotation:d=this.rotation,offsetX:Z=this.offsetX,offsetY:t=this.offsetY,dontFlip:F=!1}={}){return new wW({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:l,rotation:d,offsetX:Z,offsetY:t,dontFlip:F})}convertToViewportPoint(l,d){return O.applyTransform([l,d],this.transform)}convertToViewportRectangle(l){const d=O.applyTransform([l[0],l[1]],this.transform),Z=O.applyTransform([l[2],l[3]],this.transform);return[d[0],d[1],Z[0],Z[1]]}convertToPdfPoint(l,d){return O.applyInverseTransform([l,d],this.transform)}}let DR=class extends yt{constructor(U,l=0){super(U,"RenderingCancelledException"),this.extraDelay=l}};function FQ(U){const l=U.length;let d=0;for(;d =1&&Z<=12?Z-1:0;let t=parseInt(l[3],10);t=t>=1&&t<=31?t:1;let F=parseInt(l[4],10);F=F>=0&&F<=23?F:0;let c=parseInt(l[5],10);c=c>=0&&c<=59?c:0;let W=parseInt(l[6],10);W=W>=0&&W<=59?W:0;const s=l[7]||"Z";let n=parseInt(l[8],10);n=n>=0&&n<=23?n:0;let V=parseInt(l[9],10)||0;return V=V>=0&&V<=59?V:0,s==="-"?(F+=n,c+=V):s==="+"&&(F-=n,c-=V),new Date(Date.UTC(d,Z,t,F,c,W))}},pc=new WeakMap,b(eQ,pc),eQ);function W2(U,{scale:l=1,rotation:d=0}){const{width:Z,height:t}=U.attributes.style,F=[0,0,parseInt(Z),parseInt(t)];return new wW({viewBox:F,userUnit:1,scale:l,rotation:d})}function wR(U){if(U.startsWith("#")){const l=parseInt(U.slice(1),16);return[(l&16711680)>>16,(l&65280)>>8,l&255]}return U.startsWith("rgb(")?U.slice(4,-1).split(",").map(l=>parseInt(l)):U.startsWith("rgba(")?U.slice(5,-1).split(",").map(l=>parseInt(l)).slice(0,3):(dl(`Not a valid color format: "${U}"`),[0,0,0])}function s2(U){const l=document.createElement("span");l.style.visibility="hidden",document.body.append(l);for(const d of U.keys()){l.style.color=d;const Z=window.getComputedStyle(l).color;U.set(d,wR(Z))}l.remove()}function Bl(U){const{a:l,b:d,c:Z,d:t,e:F,f:c}=U.getTransform();return[l,d,Z,t,F,c]}function DU(U){const{a:l,b:d,c:Z,d:t,e:F,f:c}=U.getTransform().invertSelf();return[l,d,Z,t,F,c]}function wF(U,l,d=!1,Z=!0){if(l instanceof wW){const{pageWidth:t,pageHeight:F}=l.rawDims,{style:c}=U,W=Id.isCSSRoundSupported,s=`var(--scale-factor) * ${t}px`,n=`var(--scale-factor) * ${F}px`,V=W?`round(down, ${s}, var(--scale-round-x, 1px))`:`calc(${s})`,Q=W?`round(down, ${n}, var(--scale-round-y, 1px))`:`calc(${n})`;!d||l.rotation%180===0?(c.width=V,c.height=Q):(c.width=Q,c.height=V)}Z&&U.setAttribute("data-main-rotation",l.rotation)}let CR=class{constructor(){const U=window.devicePixelRatio||1;this.sx=U,this.sy=U}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}};var lF,R0,UZ,K0,Ks,qa,Ri,Ph,lZ,UN,ZN,TV,fh,Ni;const vs=class Hs{constructor(l){b(this,lZ),b(this,lF,null),b(this,R0,null),b(this,UZ),b(this,K0,null),b(this,Ks,null),R(this,UZ,l),a(Hs,qa)||R(Hs,qa,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const l=R(this,lF,document.createElement("div"));l.classList.add("editToolbar","hidden"),l.setAttribute("role","toolbar");const d=a(this,UZ)._uiManager._signal;l.addEventListener("contextmenu",LU,{signal:d}),l.addEventListener("pointerdown",h(Hs,Ri,Ph),{signal:d});const Z=R(this,K0,document.createElement("div"));Z.className="buttons",l.append(Z);const t=a(this,UZ).toolbarPosition;if(t){const{style:F}=l,c=a(this,UZ)._uiManager.direction==="ltr"?1-t[0]:t[0];F.insetInlineEnd=`${100*c}%`,F.top=`calc(${100*t[1]}% + var(--editor-toolbar-vert-offset))`}return h(this,lZ,fh).call(this),l}get div(){return a(this,lF)}hide(){var l;a(this,lF).classList.add("hidden"),(l=a(this,R0))==null||l.hideDropdown()}show(){var l;a(this,lF).classList.remove("hidden"),(l=a(this,Ks))==null||l.shown()}async addAltText(l){const d=await l.render();h(this,lZ,TV).call(this,d),a(this,K0).prepend(d,a(this,lZ,Ni)),R(this,Ks,l)}addColorPicker(l){R(this,R0,l);const d=l.renderButton();h(this,lZ,TV).call(this,d),a(this,K0).prepend(d,a(this,lZ,Ni))}remove(){var l;a(this,lF).remove(),(l=a(this,R0))==null||l.destroy(),R(this,R0,null)}};lF=new WeakMap,R0=new WeakMap,UZ=new WeakMap,K0=new WeakMap,Ks=new WeakMap,qa=new WeakMap,Ri=new WeakSet,Ph=function(U){U.stopPropagation()},lZ=new WeakSet,UN=function(U){a(this,UZ)._focusEventsAllowed=!1,tU(U)},ZN=function(U){a(this,UZ)._focusEventsAllowed=!0,tU(U)},TV=function(U){const l=a(this,UZ)._uiManager._signal;U.addEventListener("focusin",h(this,lZ,UN).bind(this),{capture:!0,signal:l}),U.addEventListener("focusout",h(this,lZ,ZN).bind(this),{capture:!0,signal:l}),U.addEventListener("contextmenu",LU,{signal:l})},fh=function(){const{editorType:U,_uiManager:l}=a(this,UZ),d=document.createElement("button");d.className="delete",d.tabIndex=0,d.setAttribute("data-l10n-id",a(vs,qa)[U]),h(this,lZ,TV).call(this,d),d.addEventListener("click",Z=>{l.delete()},{signal:l._signal}),a(this,K0).append(d)},Ni=function(){const U=document.createElement("div");return U.className="divider",U},b(vs,Ri),b(vs,qa,null);let n2=vs;var Ps,XF,v0,$a,Ah,_h,tN;class V2{constructor(l){b(this,$a),b(this,Ps,null),b(this,XF,null),b(this,v0),R(this,v0,l)}show(l,d,Z){const[t,F]=h(this,$a,_h).call(this,d,Z),{style:c}=a(this,XF)||R(this,XF,h(this,$a,Ah).call(this));l.append(a(this,XF)),c.insetInlineEnd=`${100*t}%`,c.top=`calc(${100*F}% + var(--editor-toolbar-vert-offset))`}hide(){a(this,XF).remove()}}Ps=new WeakMap,XF=new WeakMap,v0=new WeakMap,$a=new WeakSet,Ah=function(){const U=R(this,XF,document.createElement("div"));U.className="editToolbar",U.setAttribute("role","toolbar"),U.addEventListener("contextmenu",LU,{signal:a(this,v0)._signal});const l=R(this,Ps,document.createElement("div"));return l.className="buttons",U.append(l),h(this,$a,tN).call(this),U},_h=function(U,l){let d=0,Z=0;for(const t of U){const F=t.y+t.height;if(F d){Z=c,d=F;continue}l?c>Z&&(Z=c):c {a(this,v0).highlightSelection("floating_button")},{signal:d}),a(this,Ps).append(U)};function XV(U,l,d){for(const Z of d)l.addEventListener(Z,U[Z].bind(U))}var hi;class Q2{constructor(){b(this,hi,0)}get id(){return`${Km}${Ld(this,hi)._++}`}}hi=new WeakMap;var lW,pV,dd,ca,fs;const qh=class{constructor(){b(this,ca),b(this,lW,t2()),b(this,pV,0),b(this,dd,null)}static get _isSVGFittingCanvas(){const l='data:image/svg+xml;charset=UTF-8,',d=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),Z=new Image;Z.src=l;const t=Z.decode().then(()=>(d.drawImage(Z,0,0,1,1,0,0,1,3),new Uint32Array(d.getImageData(0,0,1,1).data.buffer)[0]===0));return tl(this,"_isSVGFittingCanvas",t)}async getFromFile(l){const{lastModified:d,name:Z,size:t,type:F}=l;return h(this,ca,fs).call(this,`${d}_${Z}_${t}_${F}`,l)}async getFromUrl(l){return h(this,ca,fs).call(this,l,l)}async getFromBlob(l,d){const Z=await d;return h(this,ca,fs).call(this,l,Z)}async getFromId(l){a(this,dd)||R(this,dd,new Map);const d=a(this,dd).get(l);if(!d)return null;if(d.bitmap)return d.refCounter+=1,d;if(d.file)return this.getFromFile(d.file);if(d.blobPromise){const{blobPromise:Z}=d;return delete d.blobPromise,this.getFromBlob(d.id,Z)}return this.getFromUrl(d.url)}getFromCanvas(l,d){a(this,dd)||R(this,dd,new Map);let Z=a(this,dd).get(l);if(Z!=null&&Z.bitmap)return Z.refCounter+=1,Z;const t=new OffscreenCanvas(d.width,d.height);return t.getContext("2d").drawImage(d,0,0),Z={bitmap:t.transferToImageBitmap(),id:`image_${a(this,lW)}_${Ld(this,pV)._++}`,refCounter:1,isSvg:!1},a(this,dd).set(l,Z),a(this,dd).set(Z.id,Z),Z}getSvgUrl(l){const d=a(this,dd).get(l);return d!=null&&d.isSvg?d.svgUrl:null}deleteId(l){var d;a(this,dd)||R(this,dd,new Map);const Z=a(this,dd).get(l);if(!Z||(Z.refCounter-=1,Z.refCounter!==0))return;const{bitmap:t}=Z;if(!Z.url&&!Z.file){const F=new OffscreenCanvas(t.width,t.height);F.getContext("bitmaprenderer").transferFromImageBitmap(t),Z.blobPromise=F.convertToBlob()}(d=t.close)==null||d.call(t),Z.bitmap=null}isValidId(l){return l.startsWith(`image_${a(this,lW)}_`)}};lW=new WeakMap,pV=new WeakMap,dd=new WeakMap,ca=new WeakSet,fs=async function(U,l){a(this,dd)||R(this,dd,new Map);let d=a(this,dd).get(U);if(d===null)return null;if(d!=null&&d.bitmap)return d.refCounter+=1,d;try{d||(d={bitmap:null,id:`image_${a(this,lW)}_${Ld(this,pV)._++}`,refCounter:0,isSvg:!1});let Z;if(typeof l=="string"?(d.url=l,Z=await tQ(l,"blob")):l instanceof File?Z=d.file=l:l instanceof Blob&&(Z=l),Z.type==="image/svg+xml"){const t=qh._isSVGFittingCanvas,F=new FileReader,c=new Image,W=new Promise((s,n)=>{c.onload=()=>{d.bitmap=c,d.isSvg=!0,s()},F.onload=async()=>{const V=d.svgUrl=F.result;c.src=await t?`${V}#svgView(preserveAspectRatio(none))`:V},c.onerror=F.onerror=n});F.readAsDataURL(Z),await W}else d.bitmap=await createImageBitmap(Z);d.refCounter=1}catch(Z){dl(Z),d=null}return a(this,dd).set(U,d),d&&a(this,dd).set(d.id,d),d};let i2=qh;var vl,dF,As,Yl;class R2{constructor(l=128){b(this,vl,[]),b(this,dF,!1),b(this,As),b(this,Yl,-1),R(this,As,l)}add({cmd:l,undo:d,post:Z,mustExec:t,type:F=NaN,overwriteIfSameType:c=!1,keepUndo:W=!1}){if(t&&l(),a(this,dF))return;const s={cmd:l,undo:d,post:Z,type:F};if(a(this,Yl)===-1){a(this,vl).length>0&&(a(this,vl).length=0),R(this,Yl,0),a(this,vl).push(s);return}if(c&&a(this,vl)[a(this,Yl)].type===F){W&&(s.undo=a(this,vl)[a(this,Yl)].undo),a(this,vl)[a(this,Yl)]=s;return}const n=a(this,Yl)+1;n===a(this,As)?a(this,vl).splice(0,1):(R(this,Yl,n),n=0;d--)if(a(this,vl)[d].type!==l){a(this,vl).splice(d+1,a(this,Yl)-d),R(this,Yl,d);return}a(this,vl).length=0,R(this,Yl,-1)}}destroy(){R(this,vl,null)}}vl=new WeakMap,dF=new WeakMap,As=new WeakMap,Yl=new WeakMap;var ei,$h;class CW{constructor(l){b(this,ei),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:d}=Id.platform;for(const[Z,t,F={}]of l)for(const c of Z){const W=c.startsWith("mac+");d&&W?(this.callbacks.set(c.slice(4),{callback:t,options:F}),this.allKeys.add(c.split("+").at(-1))):!d&&!W&&(this.callbacks.set(c,{callback:t,options:F}),this.allKeys.add(c.split("+").at(-1)))}}exec(l,d){if(!this.allKeys.has(d.key))return;const Z=this.callbacks.get(h(this,ei,$h).call(this,d));if(!Z)return;const{callback:t,options:{bubbles:F=!1,args:c=[],checker:W=null}}=Z;W&&!W(l,d)||(t.bind(l,...c,d)(),F||tU(d))}}ei=new WeakSet,$h=function(U){U.altKey&&this.buffer.push("alt"),U.ctrlKey&&this.buffer.push("ctrl"),U.metaKey&&this.buffer.push("meta"),U.shiftKey&&this.buffer.push("shift"),this.buffer.push(U.key);const l=this.buffer.join("+");return this.buffer.length=0,l};const le=class de{get _colors(){const l=new Map([["CanvasText",null],["Canvas",null]]);return s2(l),tl(this,"_colors",l)}convert(l){const d=wR(l);if(!window.matchMedia("(forced-colors: active)").matches)return d;for(const[Z,t]of this._colors)if(t.every((F,c)=>F===d[c]))return de._colorsMapping.get(Z);return d}getHexCode(l){const d=this._colors.get(l);return d?O.makeHexColor(...d):l}};f(le,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let N2=le;var uc,aU,td,bd,Yc,wZ,KF,SU,It,vF,Bc,HF,FZ,EU,PF,vW,HW,oc,PW,cZ,Dt,yc,Et,wU,bQ,wt,fW,Ct,fF,AW,_W,Wd,Ml,CZ,AF,kc,qW,rt,aZ,rZ,$W,TU,_F,K,ls,mQ,FN,cN,ds,aN,WN,sN,MQ,nN,JQ,GQ,VN,od,WZ,QN,iN,SQ,RN,zc,TQ;let LW=(_F=class{constructor(U,l,d,Z,t,F,c,W,s,n,V,Q,i){b(this,K),b(this,uc,new AbortController),b(this,aU,null),b(this,td,new Map),b(this,bd,new Map),b(this,Yc,null),b(this,wZ,null),b(this,KF,null),b(this,SU,new R2),b(this,It,null),b(this,vF,null),b(this,Bc,0),b(this,HF,new Set),b(this,FZ,null),b(this,EU,null),b(this,PF,new Set),f(this,"_editorUndoBar",null),b(this,vW,!1),b(this,HW,!1),b(this,oc,!1),b(this,PW,null),b(this,cZ,null),b(this,Dt,null),b(this,yc,null),b(this,Et,!1),b(this,wU,null),b(this,bQ,new Q2),b(this,wt,!1),b(this,fW,!1),b(this,Ct,null),b(this,fF,null),b(this,AW,null),b(this,_W,null),b(this,Wd,Zl.NONE),b(this,Ml,new Set),b(this,CZ,null),b(this,AF,null),b(this,kc,null),b(this,qW,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1}),b(this,rt,[0,0]),b(this,aZ,null),b(this,rZ,null),b(this,$W,null),b(this,TU,null);const N=this._signal=a(this,uc).signal;R(this,rZ,U),R(this,$W,l),R(this,Yc,d),this._eventBus=Z,Z._on("editingaction",this.onEditingAction.bind(this),{signal:N}),Z._on("pagechanging",this.onPageChanging.bind(this),{signal:N}),Z._on("scalechanging",this.onScaleChanging.bind(this),{signal:N}),Z._on("rotationchanging",this.onRotationChanging.bind(this),{signal:N}),Z._on("setpreference",this.onSetPreference.bind(this),{signal:N}),Z._on("switchannotationeditorparams",e=>this.updateParams(e.type,e.value),{signal:N}),h(this,K,aN).call(this),h(this,K,VN).call(this),h(this,K,MQ).call(this),R(this,wZ,t.annotationStorage),R(this,PW,t.filterFactory),R(this,AF,F),R(this,yc,c||null),R(this,vW,W),R(this,HW,s),R(this,oc,n),R(this,_W,V||null),this.viewParameters={realScale:Gc.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=Q||null,this._supportsPinchToZoom=i!==!1}static get _keyboardManager(){const U=_F.prototype,l=F=>a(F,rZ).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&F.hasSomethingToControl(),d=(F,{target:c})=>{if(c instanceof HTMLInputElement){const{type:W}=c;return W!=="text"&&W!=="number"}return!0},Z=this.TRANSLATE_SMALL,t=this.TRANSLATE_BIG;return tl(this,"_keyboardManager",new CW([[["ctrl+a","mac+meta+a"],U.selectAll,{checker:d}],[["ctrl+z","mac+meta+z"],U.undo,{checker:d}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],U.redo,{checker:d}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],U.delete,{checker:d}],[["Enter","mac+Enter"],U.addNewEditorFromKeyboard,{checker:(F,{target:c})=>!(c instanceof HTMLButtonElement)&&a(F,rZ).contains(c)&&!F.isEnterHandled}],[[" ","mac+ "],U.addNewEditorFromKeyboard,{checker:(F,{target:c})=>!(c instanceof HTMLButtonElement)&&a(F,rZ).contains(document.activeElement)}],[["Escape","mac+Escape"],U.unselectAll],[["ArrowLeft","mac+ArrowLeft"],U.translateSelectedEditors,{args:[-Z,0],checker:l}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],U.translateSelectedEditors,{args:[-t,0],checker:l}],[["ArrowRight","mac+ArrowRight"],U.translateSelectedEditors,{args:[Z,0],checker:l}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],U.translateSelectedEditors,{args:[t,0],checker:l}],[["ArrowUp","mac+ArrowUp"],U.translateSelectedEditors,{args:[0,-Z],checker:l}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],U.translateSelectedEditors,{args:[0,-t],checker:l}],[["ArrowDown","mac+ArrowDown"],U.translateSelectedEditors,{args:[0,Z],checker:l}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],U.translateSelectedEditors,{args:[0,t],checker:l}]]))}destroy(){var U,l,d,Z,t;(U=a(this,TU))==null||U.resolve(),R(this,TU,null),(l=a(this,uc))==null||l.abort(),R(this,uc,null),this._signal=null;for(const F of a(this,bd).values())F.destroy();a(this,bd).clear(),a(this,td).clear(),a(this,PF).clear(),R(this,aU,null),a(this,Ml).clear(),a(this,SU).destroy(),(d=a(this,Yc))==null||d.destroy(),(Z=a(this,wU))==null||Z.hide(),R(this,wU,null),a(this,cZ)&&(clearTimeout(a(this,cZ)),R(this,cZ,null)),a(this,aZ)&&(clearTimeout(a(this,aZ)),R(this,aZ,null)),(t=this._editorUndoBar)==null||t.destroy()}combinedSignal(U){return AbortSignal.any([this._signal,U.signal])}get mlManager(){return a(this,_W)}get useNewAltTextFlow(){return a(this,HW)}get useNewAltTextWhenAddingImage(){return a(this,oc)}get hcmFilter(){return tl(this,"hcmFilter",a(this,AF)?a(this,PW).addHCMFilter(a(this,AF).foreground,a(this,AF).background):"none")}get direction(){return tl(this,"direction",getComputedStyle(a(this,rZ)).direction)}get highlightColors(){return tl(this,"highlightColors",a(this,yc)?new Map(a(this,yc).split(",").map(U=>U.split("=").map(l=>l.trim()))):null)}get highlightColorNames(){return tl(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,U=>U.reverse())):null)}setCurrentDrawingSession(U){U?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),R(this,vF,U)}setMainHighlightColorPicker(U){R(this,AW,U)}editAltText(U,l=!1){var d;(d=a(this,Yc))==null||d.editAltText(this,U,l)}switchToMode(U,l){this._eventBus.on("annotationeditormodechanged",l,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:U})}setPreference(U,l){this._eventBus.dispatch("setpreference",{source:this,name:U,value:l})}onSetPreference({name:U,value:l}){switch(U){case"enableNewAltTextWhenAddingImage":R(this,oc,l);break}}onPageChanging({pageNumber:U}){R(this,Bc,U-1)}focusMainContainer(){a(this,rZ).focus()}findParent(U,l){for(const d of a(this,bd).values()){const{x:Z,y:t,width:F,height:c}=d.div.getBoundingClientRect();if(U>=Z&&U<=Z+F&&l>=t&&l<=t+c)return d}return null}disableUserSelect(U=!1){a(this,$W).classList.toggle("noUserSelect",U)}addShouldRescale(U){a(this,PF).add(U)}removeShouldRescale(U){a(this,PF).delete(U)}onScaleChanging({scale:U}){var l;this.commitOrRemove(),this.viewParameters.realScale=U*Gc.PDF_TO_CSS_UNITS;for(const d of a(this,PF))d.onScaleChanging();(l=a(this,vF))==null||l.onScaleChanging()}onRotationChanging({pagesRotation:U}){this.commitOrRemove(),this.viewParameters.rotation=U}highlightSelection(U=""){const l=document.getSelection();if(!l||l.isCollapsed)return;const{anchorNode:d,anchorOffset:Z,focusNode:t,focusOffset:F}=l,c=l.toString(),W=h(this,K,ls).call(this,l).closest(".textLayer"),s=this.getSelectionBoxes(W);if(!s)return;l.empty();const n=h(this,K,mQ).call(this,W),V=a(this,Wd)===Zl.NONE,Q=()=>{n==null||n.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:U,boxes:s,anchorNode:d,anchorOffset:Z,focusNode:t,focusOffset:F,text:c}),V&&this.showAllEditors("highlight",!0,!0)};if(V){this.switchToMode(Zl.HIGHLIGHT,Q);return}Q()}addToAnnotationStorage(U){!U.isEmpty()&&a(this,wZ)&&!a(this,wZ).has(U.id)&&a(this,wZ).setValue(U.id,U)}blur(){if(this.isShiftKeyDown=!1,a(this,Et)&&(R(this,Et,!1),h(this,K,ds).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:U}=document;for(const l of a(this,Ml))if(l.div.contains(U)){R(this,fF,[l,U]),l._focusEventsAllowed=!1;break}}focus(){if(!a(this,fF))return;const[U,l]=a(this,fF);R(this,fF,null),l.addEventListener("focusin",()=>{U._focusEventsAllowed=!0},{once:!0,signal:this._signal}),l.focus()}addEditListeners(){h(this,K,MQ).call(this),h(this,K,JQ).call(this)}removeEditListeners(){h(this,K,nN).call(this),h(this,K,GQ).call(this)}dragOver(U){for(const{type:l}of U.dataTransfer.items)for(const d of a(this,EU))if(d.isHandlingMimeForPasting(l)){U.dataTransfer.dropEffect="copy",U.preventDefault();return}}drop(U){for(const l of U.dataTransfer.items)for(const d of a(this,EU))if(d.isHandlingMimeForPasting(l.type)){d.paste(l,this.currentLayer),U.preventDefault();return}}copy(U){var l;if(U.preventDefault(),(l=a(this,aU))==null||l.commitOrRemove(),!this.hasSelection)return;const d=[];for(const Z of a(this,Ml)){const t=Z.serialize(!0);t&&d.push(t)}d.length!==0&&U.clipboardData.setData("application/pdfjs",JSON.stringify(d))}cut(U){this.copy(U),this.delete()}async paste(U){U.preventDefault();const{clipboardData:l}=U;for(const t of l.items)for(const F of a(this,EU))if(F.isHandlingMimeForPasting(t.type)){F.paste(t,this.currentLayer);return}let d=l.getData("application/pdfjs");if(!d)return;try{d=JSON.parse(d)}catch(t){dl(`paste: "${t.message}".`);return}if(!Array.isArray(d))return;this.unselectAll();const Z=this.currentLayer;try{const t=[];for(const W of d){const s=await Z.deserialize(W);if(!s)return;t.push(s)}const F=()=>{for(const W of t)h(this,K,SQ).call(this,W);h(this,K,TQ).call(this,t)},c=()=>{for(const W of t)W.remove()};this.addCommands({cmd:F,undo:c,mustExec:!0})}catch(t){dl(`paste: "${t.message}".`)}}keydown(U){!this.isShiftKeyDown&&U.key==="Shift"&&(this.isShiftKeyDown=!0),a(this,Wd)!==Zl.NONE&&!this.isEditorHandlingKeyboard&&_F._keyboardManager.exec(this,U)}keyup(U){this.isShiftKeyDown&&U.key==="Shift"&&(this.isShiftKeyDown=!1,a(this,Et)&&(R(this,Et,!1),h(this,K,ds).call(this,"main_toolbar")))}onEditingAction({name:U}){switch(U){case"undo":case"redo":case"delete":case"selectAll":this[U]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(U){U?(h(this,K,WN).call(this),h(this,K,JQ).call(this),h(this,K,od).call(this,{isEditing:a(this,Wd)!==Zl.NONE,isEmpty:h(this,K,zc).call(this),hasSomethingToUndo:a(this,SU).hasSomethingToUndo(),hasSomethingToRedo:a(this,SU).hasSomethingToRedo(),hasSelectedEditor:!1})):(h(this,K,sN).call(this),h(this,K,GQ).call(this),h(this,K,od).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(U){if(!a(this,EU)){R(this,EU,U);for(const l of a(this,EU))h(this,K,WZ).call(this,l.defaultPropertiesToUpdate)}}getId(){return a(this,bQ).id}get currentLayer(){return a(this,bd).get(a(this,Bc))}getLayer(U){return a(this,bd).get(U)}get currentPageIndex(){return a(this,Bc)}addLayer(U){a(this,bd).set(U.pageIndex,U),a(this,wt)?U.enable():U.disable()}removeLayer(U){a(this,bd).delete(U.pageIndex)}async updateMode(U,l=null,d=!1){var Z;if(a(this,Wd)!==U&&!(a(this,TU)&&(await a(this,TU).promise,!a(this,TU)))){if(R(this,TU,Promise.withResolvers()),R(this,Wd,U),U===Zl.NONE){this.setEditingState(!1),h(this,K,iN).call(this),(Z=this._editorUndoBar)==null||Z.hide(),a(this,TU).resolve();return}this.setEditingState(!0),await h(this,K,QN).call(this),this.unselectAll();for(const t of a(this,bd).values())t.updateMode(U);if(!l){d&&this.addNewEditorFromKeyboard(),a(this,TU).resolve();return}for(const t of a(this,td).values())t.annotationElementId===l?(this.setSelected(t),t.enterInEditMode()):t.unselect();a(this,TU).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(U){U!==a(this,Wd)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:U})}updateParams(U,l){var d;if(a(this,EU)){switch(U){case cl.CREATE:this.currentLayer.addNewEditor();return;case cl.HIGHLIGHT_DEFAULT_COLOR:(d=a(this,AW))==null||d.updateColor(l);break;case cl.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(a(this,kc)||R(this,kc,new Map)).set(U,l),this.showAllEditors("highlight",l);break}for(const Z of a(this,Ml))Z.updateParams(U,l);for(const Z of a(this,EU))Z.updateDefaultParams(U,l)}}showAllEditors(U,l,d=!1){var Z;for(const t of a(this,td).values())t.editorType===U&&t.show(l);(((Z=a(this,kc))==null?void 0:Z.get(cl.HIGHLIGHT_SHOW_ALL))??!0)!==l&&h(this,K,WZ).call(this,[[cl.HIGHLIGHT_SHOW_ALL,l]])}enableWaiting(U=!1){if(a(this,fW)!==U){R(this,fW,U);for(const l of a(this,bd).values())U?l.disableClick():l.enableClick(),l.div.classList.toggle("waiting",U)}}getEditors(U){const l=[];for(const d of a(this,td).values())d.pageIndex===U&&l.push(d);return l}getEditor(U){return a(this,td).get(U)}addEditor(U){a(this,td).set(U.id,U)}removeEditor(U){var l;U.div.contains(document.activeElement)&&(a(this,cZ)&&clearTimeout(a(this,cZ)),R(this,cZ,setTimeout(()=>{this.focusMainContainer(),R(this,cZ,null)},0))),a(this,td).delete(U.id),this.unselect(U),(!U.annotationElementId||!a(this,HF).has(U.annotationElementId))&&((l=a(this,wZ))==null||l.remove(U.id))}addDeletedAnnotationElement(U){a(this,HF).add(U.annotationElementId),this.addChangedExistingAnnotation(U),U.deleted=!0}isDeletedAnnotationElement(U){return a(this,HF).has(U)}removeDeletedAnnotationElement(U){a(this,HF).delete(U.annotationElementId),this.removeChangedExistingAnnotation(U),U.deleted=!1}setActiveEditor(U){a(this,aU)!==U&&(R(this,aU,U),U&&h(this,K,WZ).call(this,U.propertiesToUpdate))}updateUI(U){a(this,K,RN)===U&&h(this,K,WZ).call(this,U.propertiesToUpdate)}updateUIForDefaultProperties(U){h(this,K,WZ).call(this,U.defaultPropertiesToUpdate)}toggleSelected(U){if(a(this,Ml).has(U)){a(this,Ml).delete(U),U.unselect(),h(this,K,od).call(this,{hasSelectedEditor:this.hasSelection});return}a(this,Ml).add(U),U.select(),h(this,K,WZ).call(this,U.propertiesToUpdate),h(this,K,od).call(this,{hasSelectedEditor:!0})}setSelected(U){var l;(l=a(this,vF))==null||l.commitOrRemove();for(const d of a(this,Ml))d!==U&&d.unselect();a(this,Ml).clear(),a(this,Ml).add(U),U.select(),h(this,K,WZ).call(this,U.propertiesToUpdate),h(this,K,od).call(this,{hasSelectedEditor:!0})}isSelected(U){return a(this,Ml).has(U)}get firstSelectedEditor(){return a(this,Ml).values().next().value}unselect(U){U.unselect(),a(this,Ml).delete(U),h(this,K,od).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return a(this,Ml).size!==0}get isEnterHandled(){return a(this,Ml).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var U;a(this,SU).undo(),h(this,K,od).call(this,{hasSomethingToUndo:a(this,SU).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:h(this,K,zc).call(this)}),(U=this._editorUndoBar)==null||U.hide()}redo(){a(this,SU).redo(),h(this,K,od).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:a(this,SU).hasSomethingToRedo(),isEmpty:h(this,K,zc).call(this)})}addCommands(U){a(this,SU).add(U),h(this,K,od).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:h(this,K,zc).call(this)})}cleanUndoStack(U){a(this,SU).cleanType(U)}delete(){var U;this.commitOrRemove();const l=(U=this.currentLayer)==null?void 0:U.endDrawingSession(!0);if(!this.hasSelection&&!l)return;const d=l?[l]:[...a(this,Ml)],Z=()=>{var F;(F=this._editorUndoBar)==null||F.show(t,d.length===1?d[0].editorType:d.length);for(const c of d)c.remove()},t=()=>{for(const F of d)h(this,K,SQ).call(this,F)};this.addCommands({cmd:Z,undo:t,mustExec:!0})}commitOrRemove(){var U;(U=a(this,aU))==null||U.commitOrRemove()}hasSomethingToControl(){return a(this,aU)||this.hasSelection}selectAll(){for(const U of a(this,Ml))U.commit();h(this,K,TQ).call(this,a(this,td).values())}unselectAll(){var U;if(!(a(this,aU)&&(a(this,aU).commitOrRemove(),a(this,Wd)!==Zl.NONE))&&!((U=a(this,vF))!=null&&U.commitOrRemove())&&this.hasSelection){for(const l of a(this,Ml))l.unselect();a(this,Ml).clear(),h(this,K,od).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(U,l,d=!1){if(d||this.commitOrRemove(),!this.hasSelection)return;a(this,rt)[0]+=U,a(this,rt)[1]+=l;const[Z,t]=a(this,rt),F=[...a(this,Ml)];a(this,aZ)&&clearTimeout(a(this,aZ)),R(this,aZ,setTimeout(()=>{R(this,aZ,null),a(this,rt)[0]=a(this,rt)[1]=0,this.addCommands({cmd:()=>{for(const W of F)a(this,td).has(W.id)&&W.translateInPage(Z,t)},undo:()=>{for(const W of F)a(this,td).has(W.id)&&W.translateInPage(-Z,-t)},mustExec:!1})},1e3));for(const W of F)W.translateInPage(U,l)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),R(this,FZ,new Map);for(const U of a(this,Ml))a(this,FZ).set(U,{savedX:U.x,savedY:U.y,savedPageIndex:U.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!a(this,FZ))return!1;this.disableUserSelect(!1);const U=a(this,FZ);R(this,FZ,null);let l=!1;for(const[{x:Z,y:t,pageIndex:F},c]of U)c.newX=Z,c.newY=t,c.newPageIndex=F,l||(l=Z!==c.savedX||t!==c.savedY||F!==c.savedPageIndex);if(!l)return!1;const d=(Z,t,F,c)=>{if(a(this,td).has(Z.id)){const W=a(this,bd).get(c);W?Z._setParentAndPosition(W,t,F):(Z.pageIndex=c,Z.x=t,Z.y=F)}};return this.addCommands({cmd:()=>{for(const[Z,{newX:t,newY:F,newPageIndex:c}]of U)d(Z,t,F,c)},undo:()=>{for(const[Z,{savedX:t,savedY:F,savedPageIndex:c}]of U)d(Z,t,F,c)},mustExec:!0}),!0}dragSelectedEditors(U,l){if(a(this,FZ))for(const d of a(this,FZ).keys())d.drag(U,l)}rebuild(U){if(U.parent===null){const l=this.getLayer(U.pageIndex);l?(l.changeParent(U),l.addOrRebuild(U)):(this.addEditor(U),this.addToAnnotationStorage(U),U.rebuild())}else U.parent.addOrRebuild(U)}get isEditorHandlingKeyboard(){var U;return((U=this.getActive())==null?void 0:U.shouldGetKeyboardEvents())||a(this,Ml).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(U){return a(this,aU)===U}getActive(){return a(this,aU)}getMode(){return a(this,Wd)}get imageManager(){return tl(this,"imageManager",new i2)}getSelectionBoxes(U){if(!U)return null;const l=document.getSelection();for(let s=0,n=l.rangeCount;s ({x:(n-Z)/F,y:1-(s+V-d)/t,width:Q/F,height:V/t});break;case"180":c=(s,n,V,Q)=>({x:1-(s+V-d)/t,y:1-(n+Q-Z)/F,width:V/t,height:Q/F});break;case"270":c=(s,n,V,Q)=>({x:1-(n+Q-Z)/F,y:(s-d)/t,width:Q/F,height:V/t});break;default:c=(s,n,V,Q)=>({x:(s-d)/t,y:(n-Z)/F,width:V/t,height:Q/F});break}const W=[];for(let s=0,n=l.rangeCount;s {V.type==="pointerup"&&V.button!==0||(W.abort(),c==null||c.toggleDrawing(!0),V.type==="pointerup"&&h(this,K,ds).call(this,"main_toolbar"))};window.addEventListener("pointerup",n,{signal:s}),window.addEventListener("blur",n,{signal:s})}},ds=function(U=""){a(this,Wd)===Zl.HIGHLIGHT?this.highlightSelection(U):a(this,vW)&&h(this,K,FN).call(this)},aN=function(){document.addEventListener("selectionchange",h(this,K,cN).bind(this),{signal:this._signal})},WN=function(){if(a(this,Dt))return;R(this,Dt,new AbortController);const U=this.combinedSignal(a(this,Dt));window.addEventListener("focus",this.focus.bind(this),{signal:U}),window.addEventListener("blur",this.blur.bind(this),{signal:U})},sN=function(){var U;(U=a(this,Dt))==null||U.abort(),R(this,Dt,null)},MQ=function(){if(a(this,Ct))return;R(this,Ct,new AbortController);const U=this.combinedSignal(a(this,Ct));window.addEventListener("keydown",this.keydown.bind(this),{signal:U}),window.addEventListener("keyup",this.keyup.bind(this),{signal:U})},nN=function(){var U;(U=a(this,Ct))==null||U.abort(),R(this,Ct,null)},JQ=function(){if(a(this,It))return;R(this,It,new AbortController);const U=this.combinedSignal(a(this,It));document.addEventListener("copy",this.copy.bind(this),{signal:U}),document.addEventListener("cut",this.cut.bind(this),{signal:U}),document.addEventListener("paste",this.paste.bind(this),{signal:U})},GQ=function(){var U;(U=a(this,It))==null||U.abort(),R(this,It,null)},VN=function(){const U=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:U}),document.addEventListener("drop",this.drop.bind(this),{signal:U})},od=function(U){Object.entries(U).some(([l,d])=>a(this,qW)[l]!==d)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(a(this,qW),U)}),a(this,Wd)===Zl.HIGHLIGHT&&U.hasSelectedEditor===!1&&h(this,K,WZ).call(this,[[cl.HIGHLIGHT_FREE,!0]]))},WZ=function(U){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:U})},QN=async function(){if(!a(this,wt)){R(this,wt,!0);const U=[];for(const l of a(this,bd).values())U.push(l.enable());await Promise.all(U);for(const l of a(this,td).values())l.enable()}},iN=function(){if(this.unselectAll(),a(this,wt)){R(this,wt,!1);for(const U of a(this,bd).values())U.disable();for(const U of a(this,td).values())U.disable()}},SQ=function(U){const l=a(this,bd).get(U.pageIndex);l?l.addOrRebuild(U):(this.addEditor(U),this.addToAnnotationStorage(U))},RN=function(){let U=null;for(U of a(this,Ml));return U},zc=function(){if(a(this,td).size===0)return!0;if(a(this,td).size===1)for(const U of a(this,td).values())return U.isEmpty();return!1},TQ=function(U){for(const l of a(this,Ml))l.unselect();a(this,Ml).clear();for(const l of U)l.isEmpty()||(a(this,Ml).add(l),l.select());h(this,K,od).call(this,{hasSelectedEditor:this.hasSelection})},f(_F,"TRANSLATE_SMALL",1),f(_F,"TRANSLATE_BIG",10),_F);var ed,pZ,HU,dW,GZ,eU,aa,QZ,UU,PZ,N0,SZ,Tt,uZ,UW,_s;const Wa=class fZ{constructor(l){b(this,uZ),b(this,ed,null),b(this,pZ,!1),b(this,HU,null),b(this,dW,null),b(this,GZ,null),b(this,eU,null),b(this,aa,!1),b(this,QZ,null),b(this,UU,null),b(this,PZ,null),b(this,N0,null),b(this,SZ,!1),R(this,UU,l),R(this,SZ,l._uiManager.useNewAltTextFlow),a(fZ,Tt)||R(fZ,Tt,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(l){fZ._l10n??(fZ._l10n=l)}async render(){const l=R(this,HU,document.createElement("button"));l.className="altText",l.tabIndex="0";const d=R(this,dW,document.createElement("span"));l.append(d),a(this,SZ)?(l.classList.add("new"),l.setAttribute("data-l10n-id",a(fZ,Tt).missing),d.setAttribute("data-l10n-id",a(fZ,Tt)["missing-label"])):(l.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),d.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const Z=a(this,UU)._uiManager._signal;l.addEventListener("contextmenu",LU,{signal:Z}),l.addEventListener("pointerdown",F=>F.stopPropagation(),{signal:Z});const t=F=>{F.preventDefault(),a(this,UU)._uiManager.editAltText(a(this,UU)),a(this,SZ)&&a(this,UU)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:a(this,uZ,UW)}})};return l.addEventListener("click",t,{capture:!0,signal:Z}),l.addEventListener("keydown",F=>{F.target===l&&F.key==="Enter"&&(R(this,aa,!0),t(F))},{signal:Z}),await h(this,uZ,_s).call(this),l}finish(){a(this,HU)&&(a(this,HU).focus({focusVisible:a(this,aa)}),R(this,aa,!1))}isEmpty(){return a(this,SZ)?a(this,ed)===null:!a(this,ed)&&!a(this,pZ)}hasData(){return a(this,SZ)?a(this,ed)!==null||!!a(this,PZ):this.isEmpty()}get guessedText(){return a(this,PZ)}async setGuessedText(l){a(this,ed)===null&&(R(this,PZ,l),R(this,N0,await fZ._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:l})),h(this,uZ,_s).call(this))}toggleAltTextBadge(l=!1){var d;if(!a(this,SZ)||a(this,ed)){(d=a(this,QZ))==null||d.remove(),R(this,QZ,null);return}if(!a(this,QZ)){const Z=R(this,QZ,document.createElement("div"));Z.className="noAltTextBadge",a(this,UU).div.append(Z)}a(this,QZ).classList.toggle("hidden",!l)}serialize(l){let d=a(this,ed);return!l&&a(this,PZ)===d&&(d=a(this,N0)),{altText:d,decorative:a(this,pZ),guessedText:a(this,PZ),textWithDisclaimer:a(this,N0)}}get data(){return{altText:a(this,ed),decorative:a(this,pZ)}}set data({altText:l,decorative:d,guessedText:Z,textWithDisclaimer:t,cancel:F=!1}){Z&&(R(this,PZ,Z),R(this,N0,t)),!(a(this,ed)===l&&a(this,pZ)===d)&&(F||(R(this,ed,l),R(this,pZ,d)),h(this,uZ,_s).call(this))}toggle(l=!1){a(this,HU)&&(!l&&a(this,eU)&&(clearTimeout(a(this,eU)),R(this,eU,null)),a(this,HU).disabled=!l)}shown(){a(this,UU)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:a(this,uZ,UW)}})}destroy(){var l,d;(l=a(this,HU))==null||l.remove(),R(this,HU,null),R(this,dW,null),R(this,GZ,null),(d=a(this,QZ))==null||d.remove(),R(this,QZ,null)}};ed=new WeakMap,pZ=new WeakMap,HU=new WeakMap,dW=new WeakMap,GZ=new WeakMap,eU=new WeakMap,aa=new WeakMap,QZ=new WeakMap,UU=new WeakMap,PZ=new WeakMap,N0=new WeakMap,SZ=new WeakMap,Tt=new WeakMap,uZ=new WeakSet,UW=function(){return a(this,ed)&&"added"||a(this,ed)===null&&this.guessedText&&"review"||"missing"},_s=async function(){var U,l,d;const Z=a(this,HU);if(!Z)return;if(a(this,SZ)){if(Z.classList.toggle("done",!!a(this,ed)),Z.setAttribute("data-l10n-id",a(Wa,Tt)[a(this,uZ,UW)]),(U=a(this,dW))==null||U.setAttribute("data-l10n-id",a(Wa,Tt)[`${a(this,uZ,UW)}-label`]),!a(this,ed)){(l=a(this,GZ))==null||l.remove();return}}else{if(!a(this,ed)&&!a(this,pZ)){Z.classList.remove("done"),(d=a(this,GZ))==null||d.remove();return}Z.classList.add("done"),Z.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let t=a(this,GZ);if(!t){R(this,GZ,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip"),t.id=`alt-text-tooltip-${a(this,UU).id}`;const c=100,W=a(this,UU)._uiManager._signal;W.addEventListener("abort",()=>{clearTimeout(a(this,eU)),R(this,eU,null)},{once:!0}),Z.addEventListener("mouseenter",()=>{R(this,eU,setTimeout(()=>{R(this,eU,null),a(this,GZ).classList.add("show"),a(this,UU)._reportTelemetry({action:"alt_text_tooltip"})},c))},{signal:W}),Z.addEventListener("mouseleave",()=>{var s;a(this,eU)&&(clearTimeout(a(this,eU)),R(this,eU,null)),(s=a(this,GZ))==null||s.classList.remove("show")},{signal:W})}a(this,pZ)?t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(t.removeAttribute("data-l10n-id"),t.textContent=a(this,ed)),t.parentNode||Z.append(t);const F=a(this,UU).getImageForAltText();F==null||F.setAttribute("aria-describedby",t.id)},b(Wa,Tt,null),f(Wa,"_l10n",null);let NN=Wa;var Us,qF,Zs,ts,Fs,cs,as,Lc,xZ,$F,xt,l0,hN,eN,XQ,pQ;let Ue=(pQ=class{constructor({container:U,isPinchingDisabled:l=null,isPinchingStopped:d=null,onPinchStart:Z=null,onPinching:t=null,onPinchEnd:F=null,signal:c}){b(this,l0),b(this,Us),b(this,qF,!1),b(this,Zs,null),b(this,ts),b(this,Fs),b(this,cs),b(this,as),b(this,Lc),b(this,xZ,null),b(this,$F),b(this,xt,null),R(this,Us,U),R(this,Zs,d),R(this,ts,l),R(this,Fs,Z),R(this,cs,t),R(this,as,F),R(this,$F,new AbortController),R(this,Lc,AbortSignal.any([c,a(this,$F).signal])),U.addEventListener("touchstart",h(this,l0,hN).bind(this),{passive:!1,signal:a(this,Lc)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return tl(this,"MIN_TOUCH_DISTANCE_TO_PINCH",35/(window.devicePixelRatio||1))}destroy(){var U;(U=a(this,$F))==null||U.abort(),R(this,$F,null)}},Us=new WeakMap,qF=new WeakMap,Zs=new WeakMap,ts=new WeakMap,Fs=new WeakMap,cs=new WeakMap,as=new WeakMap,Lc=new WeakMap,xZ=new WeakMap,$F=new WeakMap,xt=new WeakMap,l0=new WeakSet,hN=function(U){var l,d,Z;if((l=a(this,ts))!=null&&l.call(this)||U.touches.length<2)return;if(!a(this,xt)){R(this,xt,new AbortController);const c=AbortSignal.any([a(this,Lc),a(this,xt).signal]),W=a(this,Us),s={signal:c,passive:!1};W.addEventListener("touchmove",h(this,l0,eN).bind(this),s),W.addEventListener("touchend",h(this,l0,XQ).bind(this),s),W.addEventListener("touchcancel",h(this,l0,XQ).bind(this),s),(d=a(this,Fs))==null||d.call(this)}if(tU(U),U.touches.length!==2||(Z=a(this,Zs))!=null&&Z.call(this)){R(this,xZ,null);return}let[t,F]=U.touches;t.identifier>F.identifier&&([t,F]=[F,t]),R(this,xZ,{touch0X:t.screenX,touch0Y:t.screenY,touch1X:F.screenX,touch1Y:F.screenY})},eN=function(U){var l;if(!a(this,xZ)||U.touches.length!==2)return;let[d,Z]=U.touches;d.identifier>Z.identifier&&([d,Z]=[Z,d]);const{screenX:t,screenY:F}=d,{screenX:c,screenY:W}=Z,s=a(this,xZ),{touch0X:n,touch0Y:V,touch1X:Q,touch1Y:i}=s,N=Q-n,e=i-V,m=c-t,M=W-F,J=Math.hypot(m,M)||1,S=Math.hypot(N,e)||1;if(!a(this,qF)&&Math.abs(S-J)<=pQ.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(s.touch0X=t,s.touch0Y=F,s.touch1X=c,s.touch1Y=W,U.preventDefault(),!a(this,qF)){R(this,qF,!0);return}const G=[(t+c)/2,(F+W)/2];(l=a(this,cs))==null||l.call(this,G,S,J)},XQ=function(U){var l;a(this,xt).abort(),R(this,xt,null),(l=a(this,as))==null||l.call(this),a(this,xZ)&&(U.preventDefault(),R(this,xZ,null),R(this,qF,!1))},pQ);var h0,fU,ol,sa,UF,qs,e0,Xd,b0,Ft,oF,uV,H0,Sd,$s,m0,Xt,iZ,na,Va,sU,pF,ln,bi,il,mi,YV,Mi,Ws,Ze,bN,uQ,ss,Ji,te,Fe,ce,Gi,ae,Si,We,se,ne,Ti,ZW;const xl=class sd{constructor(l){b(this,il),b(this,h0,null),b(this,fU,null),b(this,ol,null),b(this,sa,!1),b(this,UF,null),b(this,qs,""),b(this,e0,!1),b(this,Xd,null),b(this,b0,null),b(this,Ft,null),b(this,oF,null),b(this,uV,""),b(this,H0,!1),b(this,Sd,null),b(this,$s,!1),b(this,m0,!1),b(this,Xt,!1),b(this,iZ,null),b(this,na,0),b(this,Va,0),b(this,sU,null),b(this,pF,null),f(this,"_editToolbar",null),f(this,"_initialOptions",Object.create(null)),f(this,"_initialData",null),f(this,"_isVisible",!0),f(this,"_uiManager",null),f(this,"_focusEventsAllowed",!0),b(this,ln,!1),b(this,bi,sd._zIndex++),this.parent=l.parent,this.id=l.id,this.width=this.height=null,this.pageIndex=l.parent.pageIndex,this.name=l.name,this.div=null,this._uiManager=l.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=l.isCentered,this._structTreeParentId=null;const{rotation:d,rawDims:{pageWidth:Z,pageHeight:t,pageX:F,pageY:c}}=this.parent.viewport;this.rotation=d,this.pageRotation=(360+d-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[Z,t],this.pageTranslation=[F,c];const[W,s]=this.parentDimensions;this.x=l.x/W,this.y=l.y/s,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const l=sd.prototype._resizeWithKeyboard,d=LW.TRANSLATE_SMALL,Z=LW.TRANSLATE_BIG;return tl(this,"_resizerKeyboardManager",new CW([[["ArrowLeft","mac+ArrowLeft"],l,{args:[-d,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],l,{args:[-Z,0]}],[["ArrowRight","mac+ArrowRight"],l,{args:[d,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],l,{args:[Z,0]}],[["ArrowUp","mac+ArrowUp"],l,{args:[0,-d]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],l,{args:[0,-Z]}],[["ArrowDown","mac+ArrowDown"],l,{args:[0,d]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],l,{args:[0,Z]}],[["Escape","mac+Escape"],sd.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get isDrawer(){return!1}static get _defaultLineColor(){return tl(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(l){const d=new h2({id:l.parent.getNextId(),parent:l.parent,uiManager:l._uiManager});d.annotationElementId=l.annotationElementId,d.deleted=!0,d._uiManager.addToAnnotationStorage(d)}static initialize(l,d){if(sd._l10n??(sd._l10n=l),sd._l10nResizer||(sd._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),sd._borderLineWidth!==-1)return;const Z=getComputedStyle(document.documentElement);sd._borderLineWidth=parseFloat(Z.getPropertyValue("--outline-width"))||0}static updateDefaultParams(l,d){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(l){return!1}static paste(l,d){Gl("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return a(this,ln)}set _isDraggable(l){var d;R(this,ln,l),(d=this.div)==null||d.classList.toggle("draggable",l)}get isEnterHandled(){return!0}center(){const[l,d]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*d/(l*2),this.y+=this.width*l/(d*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*d/(l*2),this.y-=this.width*l/(d*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(l){this._uiManager.addCommands(l)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=a(this,bi)}setParent(l){l!==null?(this.pageIndex=l.pageIndex,this.pageDimensions=l.pageDimensions):h(this,il,ZW).call(this),this.parent=l}focusin(l){this._focusEventsAllowed&&(a(this,H0)?R(this,H0,!1):this.parent.setSelected(this))}focusout(l){var d;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const Z=l.relatedTarget;Z!=null&&Z.closest(`#${this.id}`)||(l.preventDefault(),(d=this.parent)!=null&&d.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(l,d,Z,t){const[F,c]=this.parentDimensions;[Z,t]=this.screenToPageTranslation(Z,t),this.x=(l+Z)/F,this.y=(d+t)/c,this.fixAndSetPosition()}translate(l,d){h(this,il,mi).call(this,this.parentDimensions,l,d)}translateInPage(l,d){a(this,Sd)||R(this,Sd,[this.x,this.y,this.width,this.height]),h(this,il,mi).call(this,this.pageDimensions,l,d),this.div.scrollIntoView({block:"nearest"})}drag(l,d){a(this,Sd)||R(this,Sd,[this.x,this.y,this.width,this.height]);const{div:Z,parentDimensions:[t,F]}=this;if(this.x+=l/t,this.y+=d/F,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:Q,y:i}=this.div.getBoundingClientRect();this.parent.findNewParent(this,Q,i)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:c,y:W}=this;const[s,n]=this.getBaseTranslation();c+=s,W+=n;const{style:V}=Z;V.left=`${(100*c).toFixed(2)}%`,V.top=`${(100*W).toFixed(2)}%`,this._onTranslating(c,W),Z.scrollIntoView({block:"nearest"})}_onTranslating(l,d){}_onTranslated(l,d){}get _hasBeenMoved(){return!!a(this,Sd)&&(a(this,Sd)[0]!==this.x||a(this,Sd)[1]!==this.y)}get _hasBeenResized(){return!!a(this,Sd)&&(a(this,Sd)[2]!==this.width||a(this,Sd)[3]!==this.height)}getBaseTranslation(){const[l,d]=this.parentDimensions,{_borderLineWidth:Z}=sd,t=Z/l,F=Z/d;switch(this.rotation){case 90:return[-t,F];case 180:return[t,F];case 270:return[t,-F];default:return[-t,-F]}}get _mustFixPosition(){return!0}fixAndSetPosition(l=this.rotation){const{div:{style:d},pageDimensions:[Z,t]}=this;let{x:F,y:c,width:W,height:s}=this;if(W*=Z,s*=t,F*=Z,c*=t,this._mustFixPosition)switch(l){case 0:F=Math.max(0,Math.min(Z-W,F)),c=Math.max(0,Math.min(t-s,c));break;case 90:F=Math.max(0,Math.min(Z-s,F)),c=Math.min(t,Math.max(W,c));break;case 180:F=Math.min(Z,Math.max(W,F)),c=Math.min(t,Math.max(s,c));break;case 270:F=Math.min(Z,Math.max(s,F)),c=Math.max(0,Math.min(t-W,c));break}this.x=F/=Z,this.y=c/=t;const[n,V]=this.getBaseTranslation();F+=n,c+=V,d.left=`${(100*F).toFixed(2)}%`,d.top=`${(100*c).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(l,d){var Z;return h(Z=sd,YV,Mi).call(Z,l,d,this.parentRotation)}pageTranslationToScreen(l,d){var Z;return h(Z=sd,YV,Mi).call(Z,l,d,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:l,pageDimensions:[d,Z]}=this;return[d*l,Z*l]}setDims(l,d){const[Z,t]=this.parentDimensions,{style:F}=this.div;F.width=`${(100*l/Z).toFixed(2)}%`,a(this,e0)||(F.height=`${(100*d/t).toFixed(2)}%`)}fixDims(){const{style:l}=this.div,{height:d,width:Z}=l,t=Z.endsWith("%"),F=!a(this,e0)&&d.endsWith("%");if(t&&F)return;const[c,W]=this.parentDimensions;t||(l.width=`${(100*parseFloat(Z)/c).toFixed(2)}%`),!a(this,e0)&&!F&&(l.height=`${(100*parseFloat(d)/W).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}_onResized(){}static _round(l){return Math.round(l*1e4)/1e4}_onResizing(){}altTextFinish(){var l;(l=a(this,ol))==null||l.finish()}async addEditToolbar(){return this._editToolbar||a(this,m0)?this._editToolbar:(this._editToolbar=new n2(this),this.div.append(this._editToolbar.render()),a(this,ol)&&await this._editToolbar.addAltText(a(this,ol)),this._editToolbar)}removeEditToolbar(){var l;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(l=a(this,ol))==null||l.destroy())}addContainer(l){var d;const Z=(d=this._editToolbar)==null?void 0:d.div;Z?Z.before(l):this.div.append(l)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){a(this,ol)||(NN.initialize(sd._l10n),R(this,ol,new NN(this)),a(this,h0)&&(a(this,ol).data=a(this,h0),R(this,h0,null)),await this.addEditToolbar())}get altTextData(){var l;return(l=a(this,ol))==null?void 0:l.data}set altTextData(l){a(this,ol)&&(a(this,ol).data=l)}get guessedAltText(){var l;return(l=a(this,ol))==null?void 0:l.guessedText}async setGuessedAltText(l){var d;await((d=a(this,ol))==null?void 0:d.setGuessedText(l))}serializeAltText(l){var d;return(d=a(this,ol))==null?void 0:d.serialize(l)}hasAltText(){return!!a(this,ol)&&!a(this,ol).isEmpty()}hasAltTextData(){var l;return((l=a(this,ol))==null?void 0:l.hasData())??!1}render(){var l;this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=a(this,sa)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),h(this,il,Si).call(this);const[d,Z]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*Z/d).toFixed(2)}%`,this.div.style.maxHeight=`${(100*d/Z).toFixed(2)}%`);const[t,F]=this.getInitialTranslation();return this.translate(t,F),XV(this,this.div,["pointerdown"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(a(this,pF)||R(this,pF,new Ue({container:this.div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:h(this,il,te).bind(this),onPinching:h(this,il,Fe).bind(this),onPinchEnd:h(this,il,ce).bind(this),signal:this._uiManager._signal}))),(l=this._uiManager._editorUndoBar)==null||l.hide(),this.div}pointerdown(l){const{isMac:d}=Id.platform;if(l.button!==0||l.ctrlKey&&d){l.preventDefault();return}if(R(this,H0,!0),this._isDraggable){h(this,il,ae).call(this,l);return}h(this,il,Gi).call(this,l)}get isSelected(){return this._uiManager.isSelected(this)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){a(this,iZ)&&clearTimeout(a(this,iZ)),R(this,iZ,setTimeout(()=>{var l;R(this,iZ,null),(l=this.parent)==null||l.moveEditorInDOM(this)},0))}_setParentAndPosition(l,d,Z){l.changeParent(this),this.x=d,this.y=Z,this.fixAndSetPosition(),this._onTranslated()}getRect(l,d,Z=this.rotation){const t=this.parentScale,[F,c]=this.pageDimensions,[W,s]=this.pageTranslation,n=l/t,V=d/t,Q=this.x*F,i=this.y*c,N=this.width*F,e=this.height*c;switch(Z){case 0:return[Q+n+W,c-i-V-e+s,Q+n+N+W,c-i-V+s];case 90:return[Q+V+W,c-i+n+s,Q+V+e+W,c-i+n+N+s];case 180:return[Q-n-N+W,c-i+V+s,Q-n+W,c-i+V+e+s];case 270:return[Q-V-e+W,c-i-n-N+s,Q-V+W,c-i-n+s];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(l,d){const[Z,t,F,c]=l,W=F-Z,s=c-t;switch(this.rotation){case 0:return[Z,d-c,W,s];case 90:return[Z,d-t,s,W];case 180:return[F,d-t,W,s];case 270:return[F,d-c,s,W];default:throw new Error("Invalid rotation")}}onceAdded(l){}isEmpty(){return!1}enableEditMode(){R(this,m0,!0)}disableEditMode(){R(this,m0,!1)}isInEditMode(){return a(this,m0)}shouldGetKeyboardEvents(){return a(this,Xt)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:l,left:d,bottom:Z,right:t}=this.getClientDimensions(),{innerHeight:F,innerWidth:c}=window;return d 0&&l 0}rebuild(){h(this,il,Si).call(this)}rotate(l){}resize(){}serializeDeleted(){var l;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((l=this._initialData)==null?void 0:l.popupRef)||""}}serialize(l=!1,d=null){Gl("An editor must be serializable")}static async deserialize(l,d,Z){const t=new this.prototype.constructor({parent:d,id:d.getNextId(),uiManager:Z});t.rotation=l.rotation,R(t,h0,l.accessibilityData);const[F,c]=t.pageDimensions,[W,s,n,V]=t.getRectInCurrentCoords(l.rect,c);return t.x=W/F,t.y=s/c,t.width=n/F,t.height=V/c,t}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var l,d;if((l=a(this,oF))==null||l.abort(),R(this,oF,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),a(this,iZ)&&(clearTimeout(a(this,iZ)),R(this,iZ,null)),h(this,il,ZW).call(this),this.removeEditToolbar(),a(this,sU)){for(const Z of a(this,sU).values())clearTimeout(Z);R(this,sU,null)}this.parent=null,(d=a(this,pF))==null||d.destroy(),R(this,pF,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(h(this,il,Ze).call(this),a(this,Xd).classList.remove("hidden"),XV(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(l){if(!this.isResizable||l.target!==this.div||l.key!=="Enter")return;this._uiManager.setSelected(this),R(this,Ft,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const d=a(this,Xd).children;if(!a(this,fU)){R(this,fU,Array.from(d));const c=h(this,il,We).bind(this),W=h(this,il,se).bind(this),s=this._uiManager._signal;for(const n of a(this,fU)){const V=n.getAttribute("data-resizer-name");n.setAttribute("role","spinbutton"),n.addEventListener("keydown",c,{signal:s}),n.addEventListener("blur",W,{signal:s}),n.addEventListener("focus",h(this,il,ne).bind(this,V),{signal:s}),n.setAttribute("data-l10n-id",sd._l10nResizer[V])}}const Z=a(this,fU)[0];let t=0;for(const c of d){if(c===Z)break;t++}const F=(360-this.rotation+this.parentRotation)%360/90*(a(this,fU).length/4);if(F!==t){if(F t)for(let W=0;W {var t,F;(t=this.div)!=null&&t.classList.contains("selectedEditor")&&((F=this._editToolbar)==null||F.show())});return}(d=this._editToolbar)==null||d.show(),(Z=a(this,ol))==null||Z.toggleAltTextBadge(!1)}unselect(){var l,d,Z,t,F;(l=a(this,Xd))==null||l.classList.add("hidden"),(d=this.div)==null||d.classList.remove("selectedEditor"),(Z=this.div)!=null&&Z.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(t=this._editToolbar)==null||t.hide(),(F=a(this,ol))==null||F.toggleAltTextBadge(!0)}updateParams(l,d){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return a(this,$s)}set isEditing(l){R(this,$s,l),this.parent&&(l?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(l,d){R(this,e0,!0);const Z=l/d,{style:t}=this.div;t.aspectRatio=Z,t.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(l,d=!1){if(d){a(this,sU)||R(this,sU,new Map);const{action:Z}=l;let t=a(this,sU).get(Z);t&&clearTimeout(t),t=setTimeout(()=>{this._reportTelemetry(l),a(this,sU).delete(Z),a(this,sU).size===0&&R(this,sU,null)},sd._telemetryTimeout),a(this,sU).set(Z,t);return}l.type||(l.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:l}})}show(l=this._isVisible){this.div.classList.toggle("hidden",!l),this._isVisible=l}enable(){this.div&&(this.div.tabIndex=0),R(this,sa,!1)}disable(){this.div&&(this.div.tabIndex=-1),R(this,sa,!0)}renderAnnotationElement(l){let d=l.container.querySelector(".annotationContent");if(!d)d=document.createElement("div"),d.classList.add("annotationContent",this.editorType),l.container.prepend(d);else if(d.nodeName==="CANVAS"){const Z=d;d=document.createElement("div"),d.classList.add("annotationContent",this.editorType),Z.before(d)}return d}resetAnnotationElement(l){const{firstChild:d}=l.container;(d==null?void 0:d.nodeName)==="DIV"&&d.classList.contains("annotationContent")&&d.remove()}};h0=new WeakMap,fU=new WeakMap,ol=new WeakMap,sa=new WeakMap,UF=new WeakMap,qs=new WeakMap,e0=new WeakMap,Xd=new WeakMap,b0=new WeakMap,Ft=new WeakMap,oF=new WeakMap,uV=new WeakMap,H0=new WeakMap,Sd=new WeakMap,$s=new WeakMap,m0=new WeakMap,Xt=new WeakMap,iZ=new WeakMap,na=new WeakMap,Va=new WeakMap,sU=new WeakMap,pF=new WeakMap,ln=new WeakMap,bi=new WeakMap,il=new WeakSet,mi=function([U,l],d,Z){[d,Z]=this.screenToPageTranslation(d,Z),this.x+=d/U,this.y+=Z/l,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},YV=new WeakSet,Mi=function(U,l,d){switch(d){case 90:return[l,-U];case 180:return[-U,-l];case 270:return[-l,U];default:return[U,l]}},Ws=function(U){switch(U){case 90:{const[l,d]=this.pageDimensions;return[0,-l/d,d/l,0]}case 180:return[-1,0,0,-1];case 270:{const[l,d]=this.pageDimensions;return[0,l/d,-d/l,0]}default:return[1,0,0,1]}},Ze=function(){if(a(this,Xd))return;R(this,Xd,document.createElement("div")),a(this,Xd).classList.add("resizers");const U=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],l=this._uiManager._signal;for(const d of U){const Z=document.createElement("div");a(this,Xd).append(Z),Z.classList.add("resizer",d),Z.setAttribute("data-resizer-name",d),Z.addEventListener("pointerdown",h(this,il,bN).bind(this,d),{signal:l}),Z.addEventListener("contextmenu",LU,{signal:l}),Z.tabIndex=-1}this.div.prepend(a(this,Xd))},bN=function(U,l){var d;l.preventDefault();const{isMac:Z}=Id.platform;if(l.button!==0||l.ctrlKey&&Z)return;(d=a(this,ol))==null||d.toggle(!1);const t=this._isDraggable;this._isDraggable=!1,R(this,b0,[l.screenX,l.screenY]);const F=new AbortController,c=this._uiManager.combinedSignal(F);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",h(this,il,Ji).bind(this,U),{passive:!0,capture:!0,signal:c}),window.addEventListener("touchmove",tU,{passive:!1,signal:c}),window.addEventListener("contextmenu",LU,{signal:c}),R(this,Ft,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const W=this.parent.div.style.cursor,s=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(l.target).cursor;const n=()=>{var V;F.abort(),this.parent.togglePointerEvents(!0),(V=a(this,ol))==null||V.toggle(!0),this._isDraggable=t,this.parent.div.style.cursor=W,this.div.style.cursor=s,h(this,il,ss).call(this)};window.addEventListener("pointerup",n,{signal:c}),window.addEventListener("blur",n,{signal:c})},uQ=function(U,l,d,Z){this.width=d,this.height=Z,this.x=U,this.y=l;const[t,F]=this.parentDimensions;this.setDims(t*d,F*Z),this.fixAndSetPosition(),this._onResized()},ss=function(){if(!a(this,Ft))return;const{savedX:U,savedY:l,savedWidth:d,savedHeight:Z}=a(this,Ft);R(this,Ft,null);const t=this.x,F=this.y,c=this.width,W=this.height;t===U&&F===l&&c===d&&W===Z||this.addCommands({cmd:h(this,il,uQ).bind(this,t,F,c,W),undo:h(this,il,uQ).bind(this,U,l,d,Z),mustExec:!0})},Ji=function(U,l){const[d,Z]=this.parentDimensions,t=this.x,F=this.y,c=this.width,W=this.height,s=xl.MIN_SIZE/d,n=xl.MIN_SIZE/Z,V=h(this,il,Ws).call(this,this.rotation),Q=(I,L)=>[V[0]*I+V[2]*L,V[1]*I+V[3]*L],i=h(this,il,Ws).call(this,360-this.rotation),N=(I,L)=>[i[0]*I+i[2]*L,i[1]*I+i[3]*L];let e,m,M=!1,J=!1;switch(U){case"topLeft":M=!0,e=(I,L)=>[0,0],m=(I,L)=>[I,L];break;case"topMiddle":e=(I,L)=>[I/2,0],m=(I,L)=>[I/2,L];break;case"topRight":M=!0,e=(I,L)=>[I,0],m=(I,L)=>[0,L];break;case"middleRight":J=!0,e=(I,L)=>[I,L/2],m=(I,L)=>[0,L/2];break;case"bottomRight":M=!0,e=(I,L)=>[I,L],m=(I,L)=>[0,0];break;case"bottomMiddle":e=(I,L)=>[I/2,L],m=(I,L)=>[I/2,0];break;case"bottomLeft":M=!0,e=(I,L)=>[0,L],m=(I,L)=>[I,0];break;case"middleLeft":J=!0,e=(I,L)=>[0,L/2],m=(I,L)=>[I,L/2];break}const S=e(c,W),G=m(c,W);let T=Q(...G);const p=xl._round(t+T[0]),u=xl._round(F+T[1]);let Y=1,o=1,X,B;if(l.fromKeyboard)({deltaX:X,deltaY:B}=l);else{const{screenX:I,screenY:L}=l,[g,A]=a(this,b0);[X,B]=this.screenToPageTranslation(I-g,L-A),a(this,b0)[0]=I,a(this,b0)[1]=L}if([X,B]=N(X/d,B/Z),M){const I=Math.hypot(c,W);Y=o=Math.max(Math.min(Math.hypot(G[0]-S[0]-X,G[1]-S[1]-B)/I,1/c,1/W),s/c,n/W)}else J?Y=Math.max(s,Math.min(1,Math.abs(G[0]-S[0]-X)))/c:o=Math.max(n,Math.min(1,Math.abs(G[1]-S[1]-B)))/W;const y=xl._round(c*Y),E=xl._round(W*o);T=Q(...m(y,E));const D=p-T[0],w=u-T[1];a(this,Sd)||R(this,Sd,[this.x,this.y,this.width,this.height]),this.width=y,this.height=E,this.x=D,this.y=w,this.setDims(d*y,Z*E),this.fixAndSetPosition(),this._onResizing()},te=function(){var U;R(this,Ft,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(U=a(this,ol))==null||U.toggle(!1),this.parent.togglePointerEvents(!1)},Fe=function(U,l,d){let Z=.7*(d/l)+1-.7;if(Z===1)return;const t=h(this,il,Ws).call(this,this.rotation),F=(T,p)=>[t[0]*T+t[2]*p,t[1]*T+t[3]*p],[c,W]=this.parentDimensions,s=this.x,n=this.y,V=this.width,Q=this.height,i=xl.MIN_SIZE/c,N=xl.MIN_SIZE/W;Z=Math.max(Math.min(Z,1/V,1/Q),i/V,N/Q);const e=xl._round(V*Z),m=xl._round(Q*Z);if(e===V&&m===Q)return;a(this,Sd)||R(this,Sd,[s,n,V,Q]);const M=F(V/2,Q/2),J=xl._round(s+M[0]),S=xl._round(n+M[1]),G=F(e/2,m/2);this.x=J-G[0],this.y=S-G[1],this.width=e,this.height=m,this.setDims(c*e,W*m),this.fixAndSetPosition(),this._onResizing()},ce=function(){var U;(U=a(this,ol))==null||U.toggle(!0),this.parent.togglePointerEvents(!0),h(this,il,ss).call(this)},Gi=function(U){const{isMac:l}=Id.platform;U.ctrlKey&&!l||U.shiftKey||U.metaKey&&l?this.parent.toggleSelected(this):this.parent.setSelected(this)},ae=function(U){const{isSelected:l}=this;this._uiManager.setUpDragSession();let d=!1;const Z=new AbortController,t=this._uiManager.combinedSignal(Z),F={capture:!0,passive:!1,signal:t},c=s=>{Z.abort(),R(this,UF,null),R(this,H0,!1),this._uiManager.endDragSession()||h(this,il,Gi).call(this,s),d&&this._onStopDragging()};l&&(R(this,na,U.clientX),R(this,Va,U.clientY),R(this,UF,U.pointerId),R(this,qs,U.pointerType),window.addEventListener("pointermove",s=>{d||(d=!0,this._onStartDragging());const{clientX:n,clientY:V,pointerId:Q}=s;if(Q!==a(this,UF)){tU(s);return}const[i,N]=this.screenToPageTranslation(n-a(this,na),V-a(this,Va));R(this,na,n),R(this,Va,V),this._uiManager.dragSelectedEditors(i,N)},F),window.addEventListener("touchmove",tU,F),window.addEventListener("pointerdown",s=>{s.pointerType===a(this,qs)&&(a(this,pF)||s.isPrimary)&&c(s),tU(s)},F));const W=s=>{if(!a(this,UF)||a(this,UF)===s.pointerId){c(s);return}tU(s)};window.addEventListener("pointerup",W,{signal:t}),window.addEventListener("blur",W,{signal:t})},Si=function(){if(a(this,oF)||!this.div)return;R(this,oF,new AbortController);const U=this._uiManager.combinedSignal(a(this,oF));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:U}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:U})},We=function(U){xl._resizerKeyboardManager.exec(this,U)},se=function(U){var l;a(this,Xt)&&((l=U.relatedTarget)==null?void 0:l.parentNode)!==a(this,Xd)&&h(this,il,ZW).call(this)},ne=function(U){R(this,uV,a(this,Xt)?U:"")},Ti=function(U){if(a(this,fU))for(const l of a(this,fU))l.tabIndex=U},ZW=function(){R(this,Xt,!1),h(this,il,Ti).call(this,-1),h(this,il,ss).call(this)},b(xl,YV),f(xl,"_l10n",null),f(xl,"_l10nResizer",null),f(xl,"_borderLineWidth",-1),f(xl,"_colorManager",new N2),f(xl,"_zIndex",1),f(xl,"_telemetryTimeout",1e3);let Kl=xl;class h2 extends Kl{constructor(l){super(l),this.annotationElementId=l.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const mN=3285377520,WU=4294901760,CU=65535;class Ve{constructor(l){this.h1=l?l&4294967295:mN,this.h2=l?l&4294967295:mN}update(l){let d,Z;if(typeof l=="string"){d=new Uint8Array(l.length*2),Z=0;for(let m=0,M=l.length;m >>8,d[Z++]=J&255)}}else if(ArrayBuffer.isView(l))d=l.slice(),Z=d.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const t=Z>>2,F=Z-t*4,c=new Uint32Array(d.buffer,0,t);let W=0,s=0,n=this.h1,V=this.h2;const Q=3432918353,i=461845907,N=Q&CU,e=i&CU;for(let m=0;m >>17,W=W*i&WU|W*e&CU,n^=W,n=n<<13|n>>>19,n=n*5+3864292196):(s=c[m],s=s*Q&WU|s*N&CU,s=s<<15|s>>>17,s=s*i&WU|s*e&CU,V^=s,V=V<<13|V>>>19,V=V*5+3864292196);switch(W=0,F){case 3:W^=d[t*4+2]<<16;case 2:W^=d[t*4+1]<<8;case 1:W^=d[t*4],W=W*Q&WU|W*N&CU,W=W<<15|W>>>17,W=W*i&WU|W*e&CU,t&1?n^=W:V^=W}this.h1=n,this.h2=V}hexdigest(){let l=this.h1,d=this.h2;return l^=d>>>1,l=l*3981806797&WU|l*36045&CU,d=d*4283543511&WU|((d<<16|l>>>16)*2950163797&WU)>>>16,l^=d>>>1,l=l*444984403&WU|l*60499&CU,d=d*3301882366&WU|((d<<16|l>>>16)*3120437893&WU)>>>16,l^=d>>>1,(l>>>0).toString(16).padStart(8,"0")+(d>>>0).toString(16).padStart(8,"0")}}const Xi=Object.freeze({map:null,hash:"",transfer:void 0});var nc,M0,nd,pi,Qe;class rR{constructor(){b(this,pi),b(this,nc,!1),b(this,M0,null),b(this,nd,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(l,d){const Z=a(this,nd).get(l);return Z===void 0?d:Object.assign(d,Z)}getRawValue(l){return a(this,nd).get(l)}remove(l){if(a(this,nd).delete(l),a(this,nd).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const d of a(this,nd).values())if(d instanceof Kl)return;this.onAnnotationEditor(null)}}setValue(l,d){const Z=a(this,nd).get(l);let t=!1;if(Z!==void 0)for(const[F,c]of Object.entries(d))Z[F]!==c&&(t=!0,Z[F]=c);else t=!0,a(this,nd).set(l,d);t&&h(this,pi,Qe).call(this),d instanceof Kl&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(d.constructor._type)}has(l){return a(this,nd).has(l)}getAll(){return a(this,nd).size>0?LR(a(this,nd)):null}setAll(l){for(const[d,Z]of Object.entries(l))this.setValue(d,Z)}get size(){return a(this,nd).size}resetModified(){a(this,nc)&&(R(this,nc,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new ie(this)}get serializable(){if(a(this,nd).size===0)return Xi;const l=new Map,d=new Ve,Z=[],t=Object.create(null);let F=!1;for(const[c,W]of a(this,nd)){const s=W instanceof Kl?W.serialize(!1,t):W;s&&(l.set(c,s),d.update(`${c}:${JSON.stringify(s)}`),F||(F=!!s.bitmap))}if(F)for(const c of l.values())c.bitmap&&Z.push(c.bitmap);return l.size>0?{map:l,hash:d.hexdigest(),transfer:Z}:Xi}get editorStats(){let l=null;const d=new Map;for(const Z of a(this,nd).values()){if(!(Z instanceof Kl))continue;const t=Z.telemetryFinalData;if(!t)continue;const{type:F}=t;d.has(F)||d.set(F,Object.getPrototypeOf(Z).constructor),l||(l=Object.create(null));const c=l[F]||(l[F]=new Map);for(const[W,s]of Object.entries(t)){if(W==="type")continue;let n=c.get(W);n||(n=new Map,c.set(W,n));const V=n.get(s)??0;n.set(s,V+1)}}for(const[Z,t]of d)l[Z]=t.computeTelemetryFinalData(l[Z]);return l}resetModifiedIds(){R(this,M0,null)}get modifiedIds(){if(a(this,M0))return a(this,M0);const l=[];for(const d of a(this,nd).values())!(d instanceof Kl)||!d.annotationElementId||!d.serialize()||l.push(d.annotationElementId);return R(this,M0,{ids:new Set(l),hash:l.join(",")})}}nc=new WeakMap,M0=new WeakMap,nd=new WeakMap,pi=new WeakSet,Qe=function(){a(this,nc)||(R(this,nc,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var dn;class ie extends rR{constructor(l){super(),b(this,dn);const{map:d,hash:Z,transfer:t}=l.serializable,F=structuredClone(d,t?{transfer:t}:null);R(this,dn,{map:F,hash:Z,transfer:t})}get print(){Gl("Should not call PrintAnnotationStorage.print")}get serializable(){return a(this,dn)}get modifiedIds(){return tl(this,"modifiedIds",{ids:new Set,hash:""})}}dn=new WeakMap;var Qa;class e2{constructor({ownerDocument:l=globalThis.document,styleElement:d=null}){b(this,Qa,new Set),this._document=l,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(l){this.nativeFontFaces.add(l),this._document.fonts.add(l)}removeNativeFontFace(l){this.nativeFontFaces.delete(l),this._document.fonts.delete(l)}insertRule(l){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const d=this.styleElement.sheet;d.insertRule(l,d.cssRules.length)}clear(){for(const l of this.nativeFontFaces)this._document.fonts.delete(l);this.nativeFontFaces.clear(),a(this,Qa).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:l,_inspectFont:d}){if(!(!l||a(this,Qa).has(l.loadedName))){if(Al(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:Z,src:t,style:F}=l,c=new FontFace(Z,t,F);this.addNativeFontFace(c);try{await c.load(),a(this,Qa).add(Z),d==null||d(l)}catch{dl(`Cannot load system font: ${l.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(c)}return}Gl("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(l){if(l.attached||l.missingFile&&!l.systemFontInfo)return;if(l.attached=!0,l.systemFontInfo){await this.loadSystemFont(l);return}if(this.isFontLoadingAPISupported){const Z=l.createNativeFontFace();if(Z){this.addNativeFontFace(Z);try{await Z.loaded}catch(t){throw dl(`Failed to load font '${Z.family}': '${t}'.`),l.disableFontFace=!0,t}}return}const d=l.createFontFaceRule();if(d){if(this.insertRule(d),this.isSyncFontLoadingSupported)return;await new Promise(Z=>{const t=this._queueLoadingCallback(Z);this._prepareFontLoadEvent(l,t)})}}get isFontLoadingAPISupported(){var l;const d=!!((l=this._document)!=null&&l.fonts);return tl(this,"isFontLoadingAPISupported",d)}get isSyncFontLoadingSupported(){let l=!1;return(Bd||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(l=!0),tl(this,"isSyncFontLoadingSupported",l)}_queueLoadingCallback(l){function d(){for(Al(!t.done,"completeRequest() cannot be called twice."),t.done=!0;Z.length>0&&Z[0].done;){const F=Z.shift();setTimeout(F.callback,0)}}const{loadingRequests:Z}=this,t={done:!1,complete:d,callback:l};return Z.push(t),t}get _loadTestFont(){const l=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return tl(this,"_loadTestFont",l)}_prepareFontLoadEvent(l,d){function Z(G,T){return G.charCodeAt(T)<<24|G.charCodeAt(T+1)<<16|G.charCodeAt(T+2)<<8|G.charCodeAt(T+3)&255}function t(G,T,p,u){const Y=G.substring(0,T),o=G.substring(T+p);return Y+u+o}let F,c;const W=this._document.createElement("canvas");W.width=1,W.height=1;const s=W.getContext("2d");let n=0;function V(G,T){if(++n>30){dl("Load test font never loaded."),T();return}if(s.font="30px "+G,s.fillText(".",0,20),s.getImageData(0,0,1,1).data[3]>0){T();return}setTimeout(V.bind(null,G,T))}const Q=`lt${Date.now()}${this.loadTestFontId++}`;let i=this._loadTestFont;i=t(i,976,Q.length,Q);const N=16,e=1482184792;let m=Z(i,N);for(F=0,c=Q.length-3;F {S.remove(),d.complete()})}}Qa=new WeakMap;class b2{constructor(l,{disableFontFace:d=!1,fontExtraProperties:Z=!1,inspectFont:t=null}){this.compiledGlyphs=Object.create(null);for(const F in l)this[F]=l[F];this.disableFontFace=d===!0,this.fontExtraProperties=Z===!0,this._inspectFont=t}createNativeFontFace(){var l;if(!this.data||this.disableFontFace)return null;let d;if(!this.cssFontInfo)d=new FontFace(this.loadedName,this.data,{});else{const Z={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(Z.style=`oblique ${this.cssFontInfo.italicAngle}deg`),d=new FontFace(this.cssFontInfo.fontFamily,this.data,Z)}return(l=this._inspectFont)==null||l.call(this,this),d}createFontFaceRule(){var l;if(!this.data||this.disableFontFace)return null;const d=`url(data:${this.mimetype};base64,${F2(this.data)});`;let Z;if(!this.cssFontInfo)Z=`@font-face {font-family:"${this.loadedName}";src:${d}}`;else{let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),Z=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${d}}`}return(l=this._inspectFont)==null||l.call(this,this,d),Z}getPathGenerator(l,d){if(this.compiledGlyphs[d]!==void 0)return this.compiledGlyphs[d];const Z=this.loadedName+"_path_"+d;let t;try{t=l.get(Z)}catch(c){dl(`getPathGenerator - ignoring character: "${c}".`)}const F=new Path2D(t||"");return this.fontExtraProperties||l.delete(Z),this.compiledGlyphs[d]=F}}const ns={DATA:1,ERROR:2},Pl={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function MN(){}function rd(U){if(U instanceof Bt||U instanceof ii||U instanceof zW||U instanceof $R||U instanceof SV||U instanceof QQ)return U;switch(U instanceof Error||typeof U=="object"&&U!==null||Gl('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),U.name){case"AbortException":return new Bt(U.message);case"InvalidPDFException":return new ii(U.message);case"MissingPDFException":return new zW(U.message);case"PasswordException":return new $R(U.message,U.code);case"UnexpectedResponseException":return new SV(U.message,U.status);case"UnknownErrorException":return new QQ(U.message,U.details)}return new QQ(U.message,U.toString())}var ia,ct,Re,JN,GN,Vs;class Ra{constructor(l,d,Z){b(this,ct),b(this,ia,new AbortController),this.sourceName=l,this.targetName=d,this.comObj=Z,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),Z.addEventListener("message",h(this,ct,Re).bind(this),{signal:a(this,ia).signal})}on(l,d){const Z=this.actionHandler;if(Z[l])throw new Error(`There is already an actionName called "${l}"`);Z[l]=d}send(l,d,Z){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:l,data:d},Z)}sendWithPromise(l,d,Z){const t=this.callbackId++,F=Promise.withResolvers();this.callbackCapabilities[t]=F;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:l,callbackId:t,data:d},Z)}catch(c){F.reject(c)}return F.promise}sendWithStream(l,d,Z,t){const F=this.streamId++,c=this.sourceName,W=this.targetName,s=this.comObj;return new ReadableStream({start:n=>{const V=Promise.withResolvers();return this.streamControllers[F]={controller:n,startCall:V,pullCall:null,cancelCall:null,isClosed:!1},s.postMessage({sourceName:c,targetName:W,action:l,streamId:F,data:d,desiredSize:n.desiredSize},t),V.promise},pull:n=>{const V=Promise.withResolvers();return this.streamControllers[F].pullCall=V,s.postMessage({sourceName:c,targetName:W,stream:Pl.PULL,streamId:F,desiredSize:n.desiredSize}),V.promise},cancel:n=>{Al(n instanceof Error,"cancel must have a valid reason");const V=Promise.withResolvers();return this.streamControllers[F].cancelCall=V,this.streamControllers[F].isClosed=!0,s.postMessage({sourceName:c,targetName:W,stream:Pl.CANCEL,streamId:F,reason:rd(n)}),V.promise}},Z)}destroy(){var l;(l=a(this,ia))==null||l.abort(),R(this,ia,null)}}ia=new WeakMap,ct=new WeakSet,Re=function({data:U}){if(U.targetName!==this.sourceName)return;if(U.stream){h(this,ct,GN).call(this,U);return}if(U.callback){const d=U.callbackId,Z=this.callbackCapabilities[d];if(!Z)throw new Error(`Cannot resolve callback ${d}`);if(delete this.callbackCapabilities[d],U.callback===ns.DATA)Z.resolve(U.data);else if(U.callback===ns.ERROR)Z.reject(rd(U.reason));else throw new Error("Unexpected callback case");return}const l=this.actionHandler[U.action];if(!l)throw new Error(`Unknown action from worker: ${U.action}`);if(U.callbackId){const d=this.sourceName,Z=U.sourceName,t=this.comObj;Promise.try(l,U.data).then(function(F){t.postMessage({sourceName:d,targetName:Z,callback:ns.DATA,callbackId:U.callbackId,data:F})},function(F){t.postMessage({sourceName:d,targetName:Z,callback:ns.ERROR,callbackId:U.callbackId,reason:rd(F)})});return}if(U.streamId){h(this,ct,JN).call(this,U);return}l(U.data)},JN=function(U){const l=U.streamId,d=this.sourceName,Z=U.sourceName,t=this.comObj,F=this,c=this.actionHandler[U.action],W={enqueue(s,n=1,V){if(this.isCancelled)return;const Q=this.desiredSize;this.desiredSize-=n,Q>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),t.postMessage({sourceName:d,targetName:Z,stream:Pl.ENQUEUE,streamId:l,chunk:s},V)},close(){this.isCancelled||(this.isCancelled=!0,t.postMessage({sourceName:d,targetName:Z,stream:Pl.CLOSE,streamId:l}),delete F.streamSinks[l])},error(s){Al(s instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,t.postMessage({sourceName:d,targetName:Z,stream:Pl.ERROR,streamId:l,reason:rd(s)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:U.desiredSize,ready:null};W.sinkCapability.resolve(),W.ready=W.sinkCapability.promise,this.streamSinks[l]=W,Promise.try(c,U.data,W).then(function(){t.postMessage({sourceName:d,targetName:Z,stream:Pl.START_COMPLETE,streamId:l,success:!0})},function(s){t.postMessage({sourceName:d,targetName:Z,stream:Pl.START_COMPLETE,streamId:l,reason:rd(s)})})},GN=function(U){const l=U.streamId,d=this.sourceName,Z=U.sourceName,t=this.comObj,F=this.streamControllers[l],c=this.streamSinks[l];switch(U.stream){case Pl.START_COMPLETE:U.success?F.startCall.resolve():F.startCall.reject(rd(U.reason));break;case Pl.PULL_COMPLETE:U.success?F.pullCall.resolve():F.pullCall.reject(rd(U.reason));break;case Pl.PULL:if(!c){t.postMessage({sourceName:d,targetName:Z,stream:Pl.PULL_COMPLETE,streamId:l,success:!0});break}c.desiredSize<=0&&U.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=U.desiredSize,Promise.try(c.onPull||MN).then(function(){t.postMessage({sourceName:d,targetName:Z,stream:Pl.PULL_COMPLETE,streamId:l,success:!0})},function(s){t.postMessage({sourceName:d,targetName:Z,stream:Pl.PULL_COMPLETE,streamId:l,reason:rd(s)})});break;case Pl.ENQUEUE:if(Al(F,"enqueue should have stream controller"),F.isClosed)break;F.controller.enqueue(U.chunk);break;case Pl.CLOSE:if(Al(F,"close should have stream controller"),F.isClosed)break;F.isClosed=!0,F.controller.close(),h(this,ct,Vs).call(this,F,l);break;case Pl.ERROR:Al(F,"error should have stream controller"),F.controller.error(rd(U.reason)),h(this,ct,Vs).call(this,F,l);break;case Pl.CANCEL_COMPLETE:U.success?F.cancelCall.resolve():F.cancelCall.reject(rd(U.reason)),h(this,ct,Vs).call(this,F,l);break;case Pl.CANCEL:if(!c)break;const W=rd(U.reason);Promise.try(c.onCancel||MN,W).then(function(){t.postMessage({sourceName:d,targetName:Z,stream:Pl.CANCEL_COMPLETE,streamId:l,success:!0})},function(s){t.postMessage({sourceName:d,targetName:Z,stream:Pl.CANCEL_COMPLETE,streamId:l,reason:rd(s)})}),c.sinkCapability.reject(W),c.isCancelled=!0,delete this.streamSinks[l];break;default:throw new Error("Unexpected stream case")}},Vs=async function(U,l){var d,Z,t;await Promise.allSettled([(d=U.startCall)==null?void 0:d.promise,(Z=U.pullCall)==null?void 0:Z.promise,(t=U.cancelCall)==null?void 0:t.promise]),delete this.streamControllers[l]};var Un;class Ne{constructor({enableHWA:l=!1}){b(this,Un,!1),R(this,Un,l)}create(l,d){if(l<=0||d<=0)throw new Error("Invalid canvas size");const Z=this._createCanvas(l,d);return{canvas:Z,context:Z.getContext("2d",{willReadFrequently:!a(this,Un)})}}reset(l,d,Z){if(!l.canvas)throw new Error("Canvas is not specified");if(d<=0||Z<=0)throw new Error("Invalid canvas size");l.canvas.width=d,l.canvas.height=Z}destroy(l){if(!l.canvas)throw new Error("Canvas is not specified");l.canvas.width=0,l.canvas.height=0,l.canvas=null,l.context=null}_createCanvas(l,d){Gl("Abstract method `_createCanvas` called.")}}Un=new WeakMap;class m2 extends Ne{constructor({ownerDocument:l=globalThis.document,enableHWA:d=!1}){super({enableHWA:d}),this._document=l}_createCanvas(l,d){const Z=this._document.createElement("canvas");return Z.width=l,Z.height=d,Z}}class he{constructor({baseUrl:l=null,isCompressed:d=!0}){this.baseUrl=l,this.isCompressed=d}async fetch({name:l}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!l)throw new Error("CMap name must be specified.");const d=this.baseUrl+l+(this.isCompressed?".bcmap":"");return this._fetch(d).then(Z=>({cMapData:Z,isCompressed:this.isCompressed})).catch(Z=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${d}`)})}async _fetch(l){Gl("Abstract method `_fetch` called.")}}class ee extends he{async _fetch(l){const d=await tQ(l,this.isCompressed?"arraybuffer":"text");return d instanceof ArrayBuffer?new Uint8Array(d):ZQ(d)}}nl(4520);class be{addFilter(l){return"none"}addHCMFilter(l,d){return"none"}addAlphaFilter(l){return"none"}addLuminosityFilter(l){return"none"}addHighlightHCMFilter(l,d,Z,t,F){return"none"}destroy(l=!1){}}var J0,Vc,Nt,AZ,kd,yF,G0,v,Jd,Na,P0,Zn,S0,me,ui,T0,Ic,ha,Yi,ea;class M2 extends be{constructor({docId:l,ownerDocument:d=globalThis.document}){super(),b(this,v),b(this,J0),b(this,Vc),b(this,Nt),b(this,AZ),b(this,kd),b(this,yF),b(this,G0,0),R(this,AZ,l),R(this,kd,d)}addFilter(l){if(!l)return"none";let d=a(this,v,Jd).get(l);if(d)return d;const[Z,t,F]=h(this,v,Zn).call(this,l),c=l.length===1?Z:`${Z}${t}${F}`;if(d=a(this,v,Jd).get(c),d)return a(this,v,Jd).set(l,d),d;const W=`g_${a(this,AZ)}_transfer_map_${Ld(this,G0)._++}`,s=h(this,v,S0).call(this,W);a(this,v,Jd).set(l,s),a(this,v,Jd).set(c,s);const n=h(this,v,T0).call(this,W);return h(this,v,ha).call(this,Z,t,F,n),s}addHCMFilter(l,d){var Z;const t=`${l}-${d}`,F="base";let c=a(this,v,Na).get(F);if((c==null?void 0:c.key)===t||(c?((Z=c.filter)==null||Z.remove(),c.key=t,c.url="none",c.filter=null):(c={key:t,url:"none",filter:null},a(this,v,Na).set(F,c)),!l||!d))return c.url;const W=h(this,v,ea).call(this,l);l=O.makeHexColor(...W);const s=h(this,v,ea).call(this,d);if(d=O.makeHexColor(...s),a(this,v,P0).style.color="",l==="#000000"&&d==="#ffffff"||l===d)return c.url;const n=new Array(256);for(let e=0;e<=255;e++){const m=e/255;n[e]=m<=.03928?m/12.92:((m+.055)/1.055)**2.4}const V=n.join(","),Q=`g_${a(this,AZ)}_hcm_filter`,i=c.filter=h(this,v,T0).call(this,Q);h(this,v,ha).call(this,V,V,V,i),h(this,v,ui).call(this,i);const N=(e,m)=>{const M=W[e]/255,J=s[e]/255,S=new Array(m+1);for(let G=0;G<=m;G++)S[G]=M+G/m*(J-M);return S.join(",")};return h(this,v,ha).call(this,N(0,5),N(1,5),N(2,5),i),c.url=h(this,v,S0).call(this,Q),c.url}addAlphaFilter(l){let d=a(this,v,Jd).get(l);if(d)return d;const[Z]=h(this,v,Zn).call(this,[l]),t=`alpha_${Z}`;if(d=a(this,v,Jd).get(t),d)return a(this,v,Jd).set(l,d),d;const F=`g_${a(this,AZ)}_alpha_map_${Ld(this,G0)._++}`,c=h(this,v,S0).call(this,F);a(this,v,Jd).set(l,c),a(this,v,Jd).set(t,c);const W=h(this,v,T0).call(this,F);return h(this,v,Yi).call(this,Z,W),c}addLuminosityFilter(l){let d=a(this,v,Jd).get(l||"luminosity");if(d)return d;let Z,t;if(l?([Z]=h(this,v,Zn).call(this,[l]),t=`luminosity_${Z}`):t="luminosity",d=a(this,v,Jd).get(t),d)return a(this,v,Jd).set(l,d),d;const F=`g_${a(this,AZ)}_luminosity_map_${Ld(this,G0)._++}`,c=h(this,v,S0).call(this,F);a(this,v,Jd).set(l,c),a(this,v,Jd).set(t,c);const W=h(this,v,T0).call(this,F);return h(this,v,me).call(this,W),l&&h(this,v,Yi).call(this,Z,W),c}addHighlightHCMFilter(l,d,Z,t,F){var c;const W=`${d}-${Z}-${t}-${F}`;let s=a(this,v,Na).get(l);if((s==null?void 0:s.key)===W||(s?((c=s.filter)==null||c.remove(),s.key=W,s.url="none",s.filter=null):(s={key:W,url:"none",filter:null},a(this,v,Na).set(l,s)),!d||!Z))return s.url;const[n,V]=[d,Z].map(h(this,v,ea).bind(this));let Q=Math.round(.2126*n[0]+.7152*n[1]+.0722*n[2]),i=Math.round(.2126*V[0]+.7152*V[1]+.0722*V[2]),[N,e]=[t,F].map(h(this,v,ea).bind(this));i {const p=new Array(256),u=(i-Q)/T,Y=S/255,o=(G-S)/(255*T);let X=0;for(let B=0;B<=T;B++){const y=Math.round(Q+B*u),E=Y+B*o;for(let D=X;D<=y;D++)p[D]=E;X=y+1}for(let B=X;B<256;B++)p[B]=p[X-1];return p.join(",")},M=`g_${a(this,AZ)}_hcm_${l}_filter`,J=s.filter=h(this,v,T0).call(this,M);return h(this,v,ui).call(this,J),h(this,v,ha).call(this,m(N[0],e[0],5),m(N[1],e[1],5),m(N[2],e[2],5),J),s.url=h(this,v,S0).call(this,M),s.url}destroy(l=!1){var d,Z,t,F;l&&(d=a(this,yF))!=null&&d.size||((Z=a(this,Nt))==null||Z.parentNode.parentNode.remove(),R(this,Nt,null),(t=a(this,Vc))==null||t.clear(),R(this,Vc,null),(F=a(this,yF))==null||F.clear(),R(this,yF,null),R(this,G0,0))}}J0=new WeakMap,Vc=new WeakMap,Nt=new WeakMap,AZ=new WeakMap,kd=new WeakMap,yF=new WeakMap,G0=new WeakMap,v=new WeakSet,Jd=function(){return a(this,Vc)||R(this,Vc,new Map)},Na=function(){return a(this,yF)||R(this,yF,new Map)},P0=function(){if(!a(this,Nt)){const U=a(this,kd).createElement("div"),{style:l}=U;l.visibility="hidden",l.contain="strict",l.width=l.height=0,l.position="absolute",l.top=l.left=0,l.zIndex=-1;const d=a(this,kd).createElementNS(VZ,"svg");d.setAttribute("width",0),d.setAttribute("height",0),R(this,Nt,a(this,kd).createElementNS(VZ,"defs")),U.append(d),d.append(a(this,Nt)),a(this,kd).body.append(U)}return a(this,Nt)},Zn=function(U){if(U.length===1){const W=U[0],s=new Array(256);for(let V=0;V<256;V++)s[V]=W[V]/255;const n=s.join(",");return[n,n,n]}const[l,d,Z]=U,t=new Array(256),F=new Array(256),c=new Array(256);for(let W=0;W<256;W++)t[W]=l[W]/255,F[W]=d[W]/255,c[W]=Z[W]/255;return[t.join(","),F.join(","),c.join(",")]},S0=function(U){if(a(this,J0)===void 0){R(this,J0,"");const l=a(this,kd).URL;l!==a(this,kd).baseURI&&(FQ(l)?dl('#createUrl: ignore "data:"-URL for performance reasons.'):R(this,J0,l.split("#",1)[0]))}return`url(${a(this,J0)}#${U})`},me=function(U){const l=a(this,kd).createElementNS(VZ,"feColorMatrix");l.setAttribute("type","matrix"),l.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),U.append(l)},ui=function(U){const l=a(this,kd).createElementNS(VZ,"feColorMatrix");l.setAttribute("type","matrix"),l.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),U.append(l)},T0=function(U){const l=a(this,kd).createElementNS(VZ,"filter");return l.setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("id",U),a(this,v,P0).append(l),l},Ic=function(U,l,d){const Z=a(this,kd).createElementNS(VZ,l);Z.setAttribute("type","discrete"),Z.setAttribute("tableValues",d),U.append(Z)},ha=function(U,l,d,Z){const t=a(this,kd).createElementNS(VZ,"feComponentTransfer");Z.append(t),h(this,v,Ic).call(this,t,"feFuncR",U),h(this,v,Ic).call(this,t,"feFuncG",l),h(this,v,Ic).call(this,t,"feFuncB",d)},Yi=function(U,l){const d=a(this,kd).createElementNS(VZ,"feComponentTransfer");l.append(d),h(this,v,Ic).call(this,d,"feFuncA",U)},ea=function(U){return a(this,v,P0).style.color=U,wR(getComputedStyle(a(this,v,P0)).getPropertyValue("color"))};class Me{constructor({baseUrl:l=null}){this.baseUrl=l}async fetch({filename:l}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!l)throw new Error("Font filename must be specified.");const d=`${this.baseUrl}${l}`;return this._fetch(d).catch(Z=>{throw new Error(`Unable to load font data at: ${d}`)})}async _fetch(l){Gl("Abstract method `_fetch` called.")}}class Je extends Me{async _fetch(l){const d=await tQ(l,"arraybuffer");return new Uint8Array(d)}}if(Bd){let U;try{const l=process.getBuiltinModule("module").createRequire(import.meta.url);try{U=l("@napi-rs/canvas")}catch(d){dl(`Cannot load "@napi-rs/canvas" package: "${d}".`)}}catch(l){dl(`Cannot access the \`require\` function: "${l}".`)}globalThis.DOMMatrix||(U!=null&&U.DOMMatrix?globalThis.DOMMatrix=U.DOMMatrix:dl("Cannot polyfill `DOMMatrix`, rendering may be broken.")),globalThis.ImageData||(U!=null&&U.ImageData?globalThis.ImageData=U.ImageData:dl("Cannot polyfill `ImageData`, rendering may be broken.")),globalThis.Path2D||(U!=null&&U.Path2D?globalThis.Path2D=U.Path2D:dl("Cannot polyfill `Path2D`, rendering may be broken."))}async function Ge(U){const l=await process.getBuiltinModule("fs").promises.readFile(U);return new Uint8Array(l)}class J2 extends be{}class G2 extends Ne{_createCanvas(l,d){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(l,d)}}class S2 extends he{async _fetch(l){return Ge(l)}}class T2 extends Me{async _fetch(l){return Ge(l)}}const ud={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Bi(U,l){if(!l)return;const d=l[2]-l[0],Z=l[3]-l[1],t=new Path2D;t.rect(l[0],l[1],d,Z),U.clip(t)}class xR{getPattern(){Gl("Abstract method `getPattern` called.")}}class X2 extends xR{constructor(l){super(),this._type=l[1],this._bbox=l[2],this._colorStops=l[3],this._p0=l[4],this._p1=l[5],this._r0=l[6],this._r1=l[7],this.matrix=null}_createGradient(l){let d;this._type==="axial"?d=l.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(d=l.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const Z of this._colorStops)d.addColorStop(Z[0],Z[1]);return d}getPattern(l,d,Z,t){let F;if(t===ud.STROKE||t===ud.FILL){const c=d.current.getClippedPathBoundingBox(t,Bl(l))||[0,0,0,0],W=Math.ceil(c[2]-c[0])||1,s=Math.ceil(c[3]-c[1])||1,n=d.cachedCanvases.getCanvas("pattern",W,s),V=n.context;V.clearRect(0,0,V.canvas.width,V.canvas.height),V.beginPath(),V.rect(0,0,V.canvas.width,V.canvas.height),V.translate(-c[0],-c[1]),Z=O.transform(Z,[1,0,0,1,c[0],c[1]]),V.transform(...d.baseTransform),this.matrix&&V.transform(...this.matrix),Bi(V,this._bbox),V.fillStyle=this._createGradient(V),V.fill(),F=l.createPattern(n.canvas,"no-repeat");const Q=new DOMMatrix(Z);F.setTransform(Q)}else Bi(l,this._bbox),F=this._createGradient(l);return F}}function YQ(U,l,d,Z,t,F,c,W){const s=l.coords,n=l.colors,V=U.data,Q=U.width*4;let i;s[d+1]>s[Z+1]&&(i=d,d=Z,Z=i,i=F,F=c,c=i),s[Z+1]>s[t+1]&&(i=Z,Z=t,t=i,i=c,c=W,W=i),s[d+1]>s[Z+1]&&(i=d,d=Z,Z=i,i=F,F=c,c=i);const N=(s[d]+l.offsetX)*l.scaleX,e=(s[d+1]+l.offsetY)*l.scaleY,m=(s[Z]+l.offsetX)*l.scaleX,M=(s[Z+1]+l.offsetY)*l.scaleY,J=(s[t]+l.offsetX)*l.scaleX,S=(s[t+1]+l.offsetY)*l.scaleY;if(e>=S)return;const G=n[F],T=n[F+1],p=n[F+2],u=n[c],Y=n[c+1],o=n[c+2],X=n[W],B=n[W+1],y=n[W+2],E=Math.round(e),D=Math.round(S);let w,I,L,g,A,Vl,Sl,Tl;for(let Rl=E;Rl<=D;Rl++){if(RlS?z=1:M===S?z=0:z=(M-Rl)/(M-S),w=m-(m-J)*z,I=u-(u-X)*z,L=Y-(Y-B)*z,g=o-(o-y)*z}let bl;Rl S?bl=1:bl=(e-Rl)/(e-S),A=N-(N-J)*bl,Vl=G-(G-X)*bl,Sl=T-(T-B)*bl,Tl=p-(p-y)*bl;const FU=Math.round(Math.min(w,A)),gd=Math.round(Math.max(w,A));let C=Q*Rl+FU*4;for(let z=FU;z<=gd;z++)bl=(w-z)/(w-A),bl<0?bl=0:bl>1&&(bl=1),V[C++]=I-(I-Vl)*bl|0,V[C++]=L-(L-Sl)*bl|0,V[C++]=g-(g-Tl)*bl|0,V[C++]=255}}function p2(U,l,d){const Z=l.coords,t=l.colors;let F,c;switch(l.type){case"lattice":const W=l.verticesPerRow,s=Math.floor(Z.length/W)-1,n=W-1;for(F=0;F =B?T=s:u=!0,X>=y?p=n:Y=!0;const E=this.getSizeAndScale(T,this.ctx.canvas.width,S),D=this.getSizeAndScale(p,this.ctx.canvas.height,G),w=l.cachedCanvases.getCanvas("pattern",E.size,D.size),I=w.context,L=W.createCanvasGraphics(I);if(L.groupLevel=l.groupLevel,this.setFillAndStrokeStyleToContext(L,t,c),I.translate(-E.scale*V,-D.scale*Q),L.transform(E.scale,0,0,D.scale,0,0),I.save(),this.clipBbox(L,V,Q,i,N),L.baseTransform=Bl(L.ctx),L.executeOperatorList(Z),L.endDrawing(),I.restore(),u||Y){const g=w.canvas;u&&(T=s),Y&&(p=n);const A=this.getSizeAndScale(T,this.ctx.canvas.width,S),Vl=this.getSizeAndScale(p,this.ctx.canvas.height,G),Sl=A.size,Tl=Vl.size,Rl=l.cachedCanvases.getCanvas("pattern-workaround",Sl,Tl),bl=Rl.context,FU=u?Math.floor(e/s):0,gd=Y?Math.floor(m/n):0;for(let C=0;C<=FU;C++)for(let z=0;z<=gd;z++)bl.drawImage(g,Sl*C,Tl*z,Sl,Tl,0,0,Sl,Tl);return{canvas:Rl.canvas,scaleX:A.scale,scaleY:Vl.scale,offsetX:V,offsetY:Q}}return{canvas:w.canvas,scaleX:E.scale,scaleY:D.scale,offsetX:V,offsetY:Q}}getSizeAndScale(l,d,Z){const t=Math.max(Te.MAX_PATTERN_SIZE,d);let F=Math.ceil(l*Z);return F>=t?F=t:Z=F/l,{scale:Z,size:F}}clipBbox(l,d,Z,t,F){const c=t-d,W=F-Z;l.ctx.rect(d,Z,c,W),l.current.updateRectMinMax(Bl(l.ctx),[d,Z,t,F]),l.clip(),l.endPath()}setFillAndStrokeStyleToContext(l,d,Z){const t=l.ctx,F=l.current;switch(d){case SN.COLORED:const c=this.ctx;t.fillStyle=c.fillStyle,t.strokeStyle=c.strokeStyle,F.fillColor=c.fillStyle,F.strokeColor=c.strokeStyle;break;case SN.UNCOLORED:const W=O.makeHexColor(Z[0],Z[1],Z[2]);t.fillStyle=W,t.strokeStyle=W,F.fillColor=W,F.strokeColor=W;break;default:throw new qm(`Unsupported paint type: ${d}`)}}getPattern(l,d,Z,t){let F=Z;t!==ud.SHADING&&(F=O.transform(F,d.baseTransform),this.matrix&&(F=O.transform(F,this.matrix)));const c=this.createPatternCanvas(d);let W=new DOMMatrix(F);W=W.translate(c.offsetX,c.offsetY),W=W.scale(1/c.scaleX,1/c.scaleY);const s=l.createPattern(c.canvas,"repeat");return s.setTransform(W),s}};f(Se,"MAX_PATTERN_SIZE",3e3);let o2=Se;function y2({src:U,srcPos:l=0,dest:d,width:Z,height:t,nonBlackColor:F=4294967295,inverseDecode:c=!1}){const W=Id.isLittleEndian?4278190080:255,[s,n]=c?[F,W]:[W,F],V=Z>>3,Q=Z&7,i=U.length;d=new Uint32Array(d.buffer);let N=0;for(let e=0;e{U.save=U.__originalSave,U.restore=U.__originalRestore,U.rotate=U.__originalRotate,U.scale=U.__originalScale,U.translate=U.__originalTranslate,U.transform=U.__originalTransform,U.setTransform=U.__originalSetTransform,U.resetTransform=U.__originalResetTransform,U.clip=U.__originalClip,U.moveTo=U.__originalMoveTo,U.lineTo=U.__originalLineTo,U.bezierCurveTo=U.__originalBezierCurveTo,U.rect=U.__originalRect,U.closePath=U.__originalClosePath,U.beginPath=U.__originalBeginPath,delete U._removeMirroring},U.save=function(){l.save(),this.__originalSave()},U.restore=function(){l.restore(),this.__originalRestore()},U.translate=function(d,Z){l.translate(d,Z),this.__originalTranslate(d,Z)},U.scale=function(d,Z){l.scale(d,Z),this.__originalScale(d,Z)},U.transform=function(d,Z,t,F,c,W){l.transform(d,Z,t,F,c,W),this.__originalTransform(d,Z,t,F,c,W)},U.setTransform=function(d,Z,t,F,c,W){l.setTransform(d,Z,t,F,c,W),this.__originalSetTransform(d,Z,t,F,c,W)},U.resetTransform=function(){l.resetTransform(),this.__originalResetTransform()},U.rotate=function(d){l.rotate(d),this.__originalRotate(d)},U.clip=function(d){l.clip(d),this.__originalClip(d)},U.moveTo=function(d,Z){l.moveTo(d,Z),this.__originalMoveTo(d,Z)},U.lineTo=function(d,Z){l.lineTo(d,Z),this.__originalLineTo(d,Z)},U.bezierCurveTo=function(d,Z,t,F,c,W){l.bezierCurveTo(d,Z,t,F,c,W),this.__originalBezierCurveTo(d,Z,t,F,c,W)},U.rect=function(d,Z,t,F){l.rect(d,Z,t,F),this.__originalRect(d,Z,t,F)},U.closePath=function(){l.closePath(),this.__originalClosePath()},U.beginPath=function(){l.beginPath(),this.__originalBeginPath()}}class L2{constructor(l){this.canvasFactory=l,this.cache=Object.create(null)}getCanvas(l,d,Z){let t;return this.cache[l]!==void 0?(t=this.cache[l],this.canvasFactory.reset(t,d,Z)):(t=this.canvasFactory.create(d,Z),this.cache[l]=t),t}delete(l){delete this.cache[l]}clear(){for(const l in this.cache){const d=this.cache[l];this.canvasFactory.destroy(d),delete this.cache[l]}}}function Qs(U,l,d,Z,t,F,c,W,s,n){const[V,Q,i,N,e,m]=Bl(U);if(Q===0&&i===0){const S=c*V+e,G=Math.round(S),T=W*N+m,p=Math.round(T),u=(c+s)*V+e,Y=Math.abs(Math.round(u)-G)||1,o=(W+n)*N+m,X=Math.abs(Math.round(o)-p)||1;return U.setTransform(Math.sign(V),0,0,Math.sign(N),G,p),U.drawImage(l,d,Z,t,F,0,0,Y,X),U.setTransform(V,Q,i,N,e,m),[Y,X]}if(V===0&&N===0){const S=W*i+e,G=Math.round(S),T=c*Q+m,p=Math.round(T),u=(W+n)*i+e,Y=Math.abs(Math.round(u)-G)||1,o=(c+s)*Q+m,X=Math.abs(Math.round(o)-p)||1;return U.setTransform(0,Math.sign(Q),Math.sign(i),0,G,p),U.drawImage(l,d,Z,t,F,0,0,X,Y),U.setTransform(V,Q,i,N,e,m),[X,Y]}U.drawImage(l,d,Z,t,F,c,W,s,n);const M=Math.hypot(V,Q),J=Math.hypot(i,N);return[M*s,J*n]}function I2(U){const{width:l,height:d}=U;if(l>uN||d>uN)return null;const Z=1e3,t=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),F=l+1;let c=new Uint8Array(F*(d+1)),W,s,n;const V=l+7&-8;let Q=new Uint8Array(V*d),i=0;for(const M of U.data){let J=128;for(;J>0;)Q[i++]=M&J?0:255,J>>=1}let N=0;for(i=0,Q[i]!==0&&(c[0]=1,++N),s=1;s >2)+(Q[i+1]?4:0)+(Q[i-V+1]?8:0),t[M]&&(c[n+s]=t[M],++N),i++;if(Q[i-V]!==Q[i]&&(c[n+s]=Q[i]?2:4,++N),N>Z)return null}for(i=V*(d-1),n=W*F,Q[i]!==0&&(c[n]=8,++N),s=1;s Z)return null;const e=new Int32Array([0,F,-1,0,-F,0,0,0,1]),m=new Path2D;for(W=0;N&&W<=d;W++){let M=W*F;const J=M+l;for(;M >4,c[M]&=G>>2|G<<2),m.lineTo(M%F,M/F|0),c[M]||--N}while(S!==M);--W}return Q=null,c=null,function(M){M.save(),M.scale(1/l,-1/d),M.translate(0,-d),M.fill(m),M.beginPath(),M.restore()}}class YN{constructor(l,d){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=Kh,this.textMatrixScale=1,this.fontMatrix=Qi,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=Md.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,l,d])}clone(){const l=Object.create(this);return l.clipBox=this.clipBox.slice(),l}setCurrentPoint(l,d){this.x=l,this.y=d}updatePathMinMax(l,d,Z){[d,Z]=O.applyTransform([d,Z],l),this.minX=Math.min(this.minX,d),this.minY=Math.min(this.minY,Z),this.maxX=Math.max(this.maxX,d),this.maxY=Math.max(this.maxY,Z)}updateRectMinMax(l,d){const Z=O.applyTransform(d,l),t=O.applyTransform(d.slice(2),l),F=O.applyTransform([d[0],d[3]],l),c=O.applyTransform([d[2],d[1]],l);this.minX=Math.min(this.minX,Z[0],t[0],F[0],c[0]),this.minY=Math.min(this.minY,Z[1],t[1],F[1],c[1]),this.maxX=Math.max(this.maxX,Z[0],t[0],F[0],c[0]),this.maxY=Math.max(this.maxY,Z[1],t[1],F[1],c[1])}updateScalingPathMinMax(l,d){O.scaleMinMax(l,d),this.minX=Math.min(this.minX,d[0]),this.minY=Math.min(this.minY,d[1]),this.maxX=Math.max(this.maxX,d[2]),this.maxY=Math.max(this.maxY,d[3])}updateCurvePathMinMax(l,d,Z,t,F,c,W,s,n,V){const Q=O.bezierBoundingBox(d,Z,t,F,c,W,s,n,V);V||this.updateRectMinMax(l,Q)}getPathBoundingBox(l=ud.FILL,d=null){const Z=[this.minX,this.minY,this.maxX,this.maxY];if(l===ud.STROKE){d||Gl("Stroke bounding box must include transform.");const t=O.singularValueDecompose2dScale(d),F=t[0]*this.lineWidth/2,c=t[1]*this.lineWidth/2;Z[0]-=F,Z[1]-=c,Z[2]+=F,Z[3]+=c}return Z}updateClipFromPath(){const l=O.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(l||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(l){this.clipBox=l,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(l=ud.FILL,d=null){return O.intersect(this.clipBox,this.getPathBoundingBox(l,d))}}function BN(U,l){if(l instanceof ImageData){U.putImageData(l,0,0);return}const d=l.height,Z=l.width,t=d%jd,F=(d-t)/jd,c=t===0?F:F+1,W=U.createImageData(Z,jd);let s=0,n;const V=l.data,Q=W.data;let i,N,e,m;if(l.kind===gs.GRAYSCALE_1BPP){const M=V.byteLength,J=new Uint32Array(Q.buffer,0,Q.byteLength>>2),S=J.length,G=Z+7>>3,T=4294967295,p=Id.isLittleEndian?4278190080:255;for(i=0;i G?Z:u*8-7,X=o&-8;let B=0,y=0;for(;Y >=1}for(;n =F&&(e=t,m=Z*e),n=0,N=m;N--;)Q[n++]=V[s++],Q[n++]=V[s++],Q[n++]=V[s++],Q[n++]=255;U.putImageData(W,0,i*jd)}else throw new Error(`bad image kind: ${l.kind}`)}function oN(U,l){if(l.bitmap){U.drawImage(l.bitmap,0,0);return}const d=l.height,Z=l.width,t=d%jd,F=(d-t)/jd,c=t===0?F:F+1,W=U.createImageData(Z,jd);let s=0;const n=l.data,V=W.data;for(let Q=0;QpN&&typeof Z=="function",V=n?Date.now()+k2:0;let Q=0;const i=this.commonObjs,N=this.objs;let e;for(;;){if(t!==void 0&&W===t.nextBreakPoint)return t.breakIt(W,Z),W;if(e=c[W],e!==yU.dependency)this[e].apply(this,F[W]);else for(const m of F[W]){const M=m.startsWith("g_")?i:N;if(!M.has(m))return M.get(m,Z),W}if(W++,W===s)return W;if(n&&++Q>pN){if(Date.now()>V)return Z(),W;Q=0}}}endDrawing(){h(this,_Z,oi).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const l of this._cachedBitmapsMap.values()){for(const d of l.values())typeof HTMLCanvasElement<"u"&&d instanceof HTMLCanvasElement&&(d.width=d.height=0);l.clear()}this._cachedBitmapsMap.clear(),h(this,_Z,yi).call(this)}_scaleImage(l,d){const Z=l.width??l.displayWidth,t=l.height??l.displayHeight;let F=Math.max(Math.hypot(d[0],d[1]),1),c=Math.max(Math.hypot(d[2],d[3]),1),W=Z,s=t,n="prescale1",V,Q;for(;F>2&&W>1||c>2&&s>1;){let i=W,N=s;F>2&&W>1&&(i=W>=16384?Math.floor(W/2)-1||1:Math.ceil(W/2),F/=W/i),c>2&&s>1&&(N=s>=16384?Math.floor(s/2)-1||1:Math.ceil(s)/2,c/=s/N),V=this.cachedCanvases.getCanvas(n,i,N),Q=V.context,Q.clearRect(0,0,i,N),Q.drawImage(l,0,0,W,s,0,0,i,N),l=V.canvas,W=i,s=N,n=n==="prescale1"?"prescale2":"prescale1"}return{img:l,paintWidth:W,paintHeight:s}}_createMaskCanvas(l){const d=this.ctx,{width:Z,height:t}=l,F=this.current.fillColor,c=this.current.patternFill,W=Bl(d);let s,n,V,Q;if((l.bitmap||l.data)&&l.count>1){const o=l.bitmap||l.data.buffer;n=JSON.stringify(c?W:[W.slice(0,4),F]),s=this._cachedBitmapsMap.get(o),s||(s=new Map,this._cachedBitmapsMap.set(o,s));const X=s.get(n);if(X&&!c){const B=Math.round(Math.min(W[0],W[2])+W[4]),y=Math.round(Math.min(W[1],W[3])+W[5]);return{canvas:X,offsetX:B,offsetY:y}}V=X}V||(Q=this.cachedCanvases.getCanvas("maskCanvas",Z,t),oN(Q.context,l));let i=O.transform(W,[1/Z,0,0,-1/t,0,0]);i=O.transform(i,[1,0,0,1,0,-t]);const[N,e,m,M]=O.getAxialAlignedBoundingBox([0,0,Z,t],i),J=Math.round(m-N)||1,S=Math.round(M-e)||1,G=this.cachedCanvases.getCanvas("fillCanvas",J,S),T=G.context,p=N,u=e;T.translate(-p,-u),T.transform(...i),V||(V=this._scaleImage(Q.canvas,DU(T)),V=V.img,s&&c&&s.set(n,V)),T.imageSmoothingEnabled=yN(Bl(T),l.interpolate),Qs(T,V,0,0,V.width,V.height,0,0,Z,t),T.globalCompositeOperation="source-in";const Y=O.transform(DU(T),[1,0,0,1,-p,-u]);return T.fillStyle=c?F.getPattern(d,this,Y,ud.FILL):F,T.fillRect(0,0,Z,t),s&&!c&&(this.cachedCanvases.delete("fillCanvas"),s.set(n,G.canvas)),{canvas:G.canvas,offsetX:Math.round(p),offsetY:Math.round(u)}}setLineWidth(l){l!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=l,this.ctx.lineWidth=l}setLineCap(l){this.ctx.lineCap=D2[l]}setLineJoin(l){this.ctx.lineJoin=E2[l]}setMiterLimit(l){this.ctx.miterLimit=l}setDash(l,d){const Z=this.ctx;Z.setLineDash!==void 0&&(Z.setLineDash(l),Z.lineDashOffset=d)}setRenderingIntent(l){}setFlatness(l){}setGState(l){for(const[d,Z]of l)switch(d){case"LW":this.setLineWidth(Z);break;case"LC":this.setLineCap(Z);break;case"LJ":this.setLineJoin(Z);break;case"ML":this.setMiterLimit(Z);break;case"D":this.setDash(Z[0],Z[1]);break;case"RI":this.setRenderingIntent(Z);break;case"FL":this.setFlatness(Z);break;case"Font":this.setFont(Z[0],Z[1]);break;case"CA":this.current.strokeAlpha=Z;break;case"ca":this.current.fillAlpha=Z,this.ctx.globalAlpha=Z;break;case"BM":this.ctx.globalCompositeOperation=Z;break;case"SMask":this.current.activeSMask=Z?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(Z);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const l=this.inSMaskMode;this.current.activeSMask&&!l?this.beginSMaskMode():!this.current.activeSMask&&l&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const l=this.ctx.canvas.width,d=this.ctx.canvas.height,Z="smaskGroupAt"+this.groupLevel,t=this.cachedCanvases.getCanvas(Z,l,d);this.suspendedCtx=this.ctx,this.ctx=t.context;const F=this.ctx;F.setTransform(...Bl(this.suspendedCtx)),Dc(this.suspendedCtx,F),z2(F,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Dc(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(l){if(!this.current.activeSMask)return;l?(l[0]=Math.floor(l[0]),l[1]=Math.floor(l[1]),l[2]=Math.ceil(l[2]),l[3]=Math.ceil(l[3])):l=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const d=this.current.activeSMask,Z=this.suspendedCtx;this.composeSMask(Z,d,this.ctx,l),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(l,d,Z,t){const F=t[0],c=t[1],W=t[2]-F,s=t[3]-c;W===0||s===0||(this.genericComposeSMask(d.context,Z,W,s,d.subtype,d.backdrop,d.transferMap,F,c,d.offsetX,d.offsetY),l.save(),l.globalAlpha=1,l.globalCompositeOperation="source-over",l.setTransform(1,0,0,1,0,0),l.drawImage(Z.canvas,0,0),l.restore())}genericComposeSMask(l,d,Z,t,F,c,W,s,n,V,Q){let i=l.canvas,N=s-V,e=n-Q;if(c){const M=O.makeHexColor(...c);if(N<0||e<0||N+Z>i.width||e+t>i.height){const J=this.cachedCanvases.getCanvas("maskExtension",Z,t),S=J.context;S.drawImage(i,-N,-e),S.globalCompositeOperation="destination-atop",S.fillStyle=M,S.fillRect(0,0,Z,t),S.globalCompositeOperation="source-over",i=J.canvas,N=e=0}else{l.save(),l.globalAlpha=1,l.setTransform(1,0,0,1,0,0);const J=new Path2D;J.rect(N,e,Z,t),l.clip(J),l.globalCompositeOperation="destination-atop",l.fillStyle=M,l.fillRect(N,e,Z,t),l.restore()}}d.save(),d.globalAlpha=1,d.setTransform(1,0,0,1,0,0),F==="Alpha"&&W?d.filter=this.filterFactory.addAlphaFilter(W):F==="Luminosity"&&(d.filter=this.filterFactory.addLuminosityFilter(W));const m=new Path2D;m.rect(s,n,Z,t),d.clip(m),d.globalCompositeOperation="destination-in",d.drawImage(i,N,e,Z,t,s,n,Z,t),d.restore()}save(){this.inSMaskMode?(Dc(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const l=this.current;this.stateStack.push(l),this.current=l.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),Dc(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(l,d,Z,t,F,c){this.ctx.transform(l,d,Z,t,F,c),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(l,d,Z){const t=this.ctx,F=this.current;let c=F.x,W=F.y,s,n;const V=Bl(t),Q=V[0]===0&&V[3]===0||V[1]===0&&V[2]===0,i=Q?Z.slice(0):null;for(let N=0,e=0,m=l.length;N XN&&(V=XN),this.current.fontSizeScale=d/V,this.ctx.font=`${n} ${s} ${V}px ${W}`}setTextRenderingMode(l){this.current.textRenderingMode=l}setTextRise(l){this.current.textRise=l}moveText(l,d){this.current.x=this.current.lineX+=l,this.current.y=this.current.lineY+=d}setLeadingMoveText(l,d){this.setLeading(-d),this.moveText(l,d)}setTextMatrix(l,d,Z,t,F,c){this.current.textMatrix=[l,d,Z,t,F,c],this.current.textMatrixScale=Math.hypot(l,d),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(l,d,Z,t,F){const c=this.ctx,W=this.current,s=W.font,n=W.textRenderingMode,V=W.fontSize/W.fontSizeScale,Q=n&Md.FILL_STROKE_MASK,i=!!(n&Md.ADD_TO_PATH_FLAG),N=W.patternFill&&!s.missingFile,e=W.patternStroke&&!s.missingFile;let m;if((s.disableFontFace||i||N||e)&&(m=s.getPathGenerator(this.commonObjs,l)),s.disableFontFace||N||e){if(c.save(),c.translate(d,Z),c.scale(V,-V),Q===Md.FILL||Q===Md.FILL_STROKE)if(t){const M=c.getTransform();c.setTransform(...t),c.fill(h(this,_Z,ki).call(this,m,M,t))}else c.fill(m);if(Q===Md.STROKE||Q===Md.FILL_STROKE)if(F){const M=c.getTransform();c.setTransform(...F),c.stroke(h(this,_Z,ki).call(this,m,M,F))}else c.lineWidth/=V,c.stroke(m);c.restore()}else(Q===Md.FILL||Q===Md.FILL_STROKE)&&c.fillText(l,d,Z),(Q===Md.STROKE||Q===Md.FILL_STROKE)&&c.strokeText(l,d,Z);i&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:Bl(c),x:d,y:Z,fontSize:V,path:m})}get isFontSubpixelAAEnabled(){const{context:l}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);l.scale(1.5,1),l.fillText("I",0,10);const d=l.getImageData(0,0,10,10).data;let Z=!1;for(let t=3;t 0&&d[t]<255){Z=!0;break}return tl(this,"isFontSubpixelAAEnabled",Z)}showText(l){const d=this.current,Z=d.font;if(Z.isType3Font)return this.showType3Text(l);const t=d.fontSize;if(t===0)return;const F=this.ctx,c=d.fontSizeScale,W=d.charSpacing,s=d.wordSpacing,n=d.fontDirection,V=d.textHScale*n,Q=l.length,i=Z.vertical,N=i?1:-1,e=Z.defaultVMetrics,m=t*d.fontMatrix[0],M=d.textRenderingMode===Md.FILL&&!Z.disableFontFace&&!d.patternFill;F.save(),F.transform(...d.textMatrix),F.translate(d.x,d.y+d.textRise),n>0?F.scale(V,-1):F.scale(V,1);let J,S;if(d.patternFill){F.save();const Y=d.fillColor.getPattern(F,this,DU(F),ud.FILL);J=Bl(F),F.restore(),F.fillStyle=Y}if(d.patternStroke){F.save();const Y=d.strokeColor.getPattern(F,this,DU(F),ud.STROKE);S=Bl(F),F.restore(),F.strokeStyle=Y}let G=d.lineWidth;const T=d.textMatrixScale;if(T===0||G===0){const Y=d.textRenderingMode&Md.FILL_STROKE_MASK;(Y===Md.STROKE||Y===Md.FILL_STROKE)&&(G=this.getSinglePixelWidth())}else G/=T;if(c!==1&&(F.scale(c,c),G/=c),F.lineWidth=G,Z.isInvalidPDFjsFont){const Y=[];let o=0;for(const X of l)Y.push(X.unicode),o+=X.width;F.fillText(Y.join(""),0,0),d.x+=o*m*V,F.restore(),this.compose();return}let p=0,u;for(u=0;u 0){const L=F.measureText(B).width*1e3/t*c;if(wnew Xe(c,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};d=new o2(l,Z,this.ctx,F,t)}else d=this._getPattern(l[1],l[2]);return d}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(l,d,Z){this.ctx.strokeStyle=this.current.strokeColor=O.makeHexColor(l,d,Z),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(l,d,Z){this.ctx.fillStyle=this.current.fillColor=O.makeHexColor(l,d,Z),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(l,d=null){let Z;return this.cachedPatterns.has(l)?Z=this.cachedPatterns.get(l):(Z=B2(this.getObject(l)),this.cachedPatterns.set(l,Z)),d&&(Z.matrix=d),Z}shadingFill(l){if(!this.contentVisible)return;const d=this.ctx;this.save();const Z=this._getPattern(l);d.fillStyle=Z.getPattern(d,this,DU(d),ud.SHADING);const t=DU(d);if(t){const{width:F,height:c}=d.canvas,[W,s,n,V]=O.getAxialAlignedBoundingBox([0,0,F,c],t);this.ctx.fillRect(W,s,n-W,V-s)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Gl("Should not call beginInlineImage")}beginImageData(){Gl("Should not call beginImageData")}paintFormXObjectBegin(l,d){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),l&&this.transform(...l),this.baseTransform=Bl(this.ctx),d)){const Z=d[2]-d[0],t=d[3]-d[1];this.ctx.rect(d[0],d[1],Z,t),this.current.updateRectMinMax(Bl(this.ctx),d),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(l){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const d=this.ctx;l.isolated||UQ("TODO: Support non-isolated groups."),l.knockout&&dl("Knockout groups not supported.");const Z=Bl(d);if(l.matrix&&d.transform(...l.matrix),!l.bbox)throw new Error("Bounding box is required.");let t=O.getAxialAlignedBoundingBox(l.bbox,Bl(d));const F=[0,0,d.canvas.width,d.canvas.height];t=O.intersect(t,F)||[0,0,0,0];const c=Math.floor(t[0]),W=Math.floor(t[1]),s=Math.max(Math.ceil(t[2])-c,1),n=Math.max(Math.ceil(t[3])-W,1);this.current.startNewPathAndClipBox([0,0,s,n]);let V="groupAt"+this.groupLevel;l.smask&&(V+="_smask_"+this.smaskCounter++%2);const Q=this.cachedCanvases.getCanvas(V,s,n),i=Q.context;i.translate(-c,-W),i.transform(...Z),l.smask?this.smaskStack.push({canvas:Q.canvas,context:i,offsetX:c,offsetY:W,subtype:l.smask.subtype,backdrop:l.smask.backdrop,transferMap:l.smask.transferMap||null,startTransformInverse:null}):(d.setTransform(1,0,0,1,0,0),d.translate(c,W),d.save()),Dc(d,i),this.ctx=i,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(d),this.groupLevel++}endGroup(l){if(!this.contentVisible)return;this.groupLevel--;const d=this.ctx,Z=this.groupStack.pop();if(this.ctx=Z,this.ctx.imageSmoothingEnabled=!1,l.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const t=Bl(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...t);const F=O.getAxialAlignedBoundingBox([0,0,d.canvas.width,d.canvas.height],t);this.ctx.drawImage(d.canvas,0,0),this.ctx.restore(),this.compose(F)}}beginAnnotation(l,d,Z,t,F){if(h(this,_Z,oi).call(this),is(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),d){const c=d[2]-d[0],W=d[3]-d[1];if(F&&this.annotationCanvasMap){Z=Z.slice(),Z[4]-=d[0],Z[5]-=d[1],d=d.slice(),d[0]=d[1]=0,d[2]=c,d[3]=W;const[s,n]=O.singularValueDecompose2dScale(Bl(this.ctx)),{viewportScale:V}=this,Q=Math.ceil(c*this.outputScaleX*V),i=Math.ceil(W*this.outputScaleY*V);this.annotationCanvas=this.canvasFactory.create(Q,i);const{canvas:N,context:e}=this.annotationCanvas;this.annotationCanvasMap.set(l,N),this.annotationCanvas.savedCtx=this.ctx,this.ctx=e,this.ctx.save(),this.ctx.setTransform(s,0,0,-n,0,W*n),is(this.ctx)}else is(this.ctx),this.endPath(),this.ctx.rect(d[0],d[1],c,W),this.ctx.clip(),this.ctx.beginPath()}this.current=new YN(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...Z),this.transform(...t)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),h(this,_Z,yi).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(l){if(!this.contentVisible)return;const d=l.count;l=this.getObject(l.data,l),l.count=d;const Z=this.ctx,t=this.processingType3;if(t&&(t.compiled===void 0&&(t.compiled=I2(l)),t.compiled)){t.compiled(Z);return}const F=this._createMaskCanvas(l),c=F.canvas;Z.save(),Z.setTransform(1,0,0,1,0,0),Z.drawImage(c,F.offsetX,F.offsetY),Z.restore(),this.compose()}paintImageMaskXObjectRepeat(l,d,Z=0,t=0,F,c){if(!this.contentVisible)return;l=this.getObject(l.data,l);const W=this.ctx;W.save();const s=Bl(W);W.transform(d,Z,t,F,0,0);const n=this._createMaskCanvas(l);W.setTransform(1,0,0,1,n.offsetX-s[4],n.offsetY-s[5]);for(let V=0,Q=c.length;V Q?V/Q:1,W=n>Q?n/Q:1}}this._cachedScaleForStroking[0]=c,this._cachedScaleForStroking[1]=W}return this._cachedScaleForStroking}rescaleAndStroke(l){const{ctx:d}=this,{lineWidth:Z}=this.current,[t,F]=this.getScaleForStroking();if(d.lineWidth=Z||1,t===1&&F===1){d.stroke();return}const c=d.getLineDash();if(l&&d.save(),d.scale(t,F),c.length>0){const W=Math.max(t,F);d.setLineDash(c.map(s=>s/W)),d.lineDashOffset/=W}d.stroke(),l&&d.restore()}isContentVisible(){for(let l=this.markedContentStack.length-1;l>=0;l--)if(!this.markedContentStack[l].visible)return!1;return!0}};_Z=new WeakSet,oi=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},yi=function(){if(this.pageColors){const U=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(U!=="none"){const l=this.ctx.filter;this.ctx.filter=U,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=l}}},ki=function(U,l,d){const Z=new Path2D;return Z.addPath(U,new DOMMatrix(d).invertSelf().multiplySelf(l)),Z};let tn=C2;for(const U in yU)tn.prototype[U]!==void 0&&(tn.prototype[yU[U]]=tn.prototype[U]);var Rs,Ns,hs;let f0=(Rs=class{static get workerPort(){return a(this,Ns)}static set workerPort(U){if(!(typeof Worker<"u"&&U instanceof Worker)&&U!==null)throw new Error("Invalid `workerPort` type.");R(this,Ns,U)}static get workerSrc(){return a(this,hs)}static set workerSrc(U){if(typeof U!="string")throw new Error("Invalid `workerSrc` type.");R(this,hs,U)}},Ns=new WeakMap,hs=new WeakMap,b(Rs,Ns,null),b(Rs,hs,""),Rs);var X0,Fn;class r2{constructor({parsedData:l,rawData:d}){b(this,X0),b(this,Fn),R(this,X0,l),R(this,Fn,d)}getRaw(){return a(this,Fn)}get(l){return a(this,X0).get(l)??null}getAll(){return LR(a(this,X0))}has(l){return a(this,X0).has(l)}}X0=new WeakMap,Fn=new WeakMap;const p0=Symbol("INTERNAL");var cn,an,Wn,ba;class x2{constructor(l,{name:d,intent:Z,usage:t,rbGroups:F}){b(this,cn,!1),b(this,an,!1),b(this,Wn,!1),b(this,ba,!0),R(this,cn,!!(l&dU.DISPLAY)),R(this,an,!!(l&dU.PRINT)),this.name=d,this.intent=Z,this.usage=t,this.rbGroups=F}get visible(){if(a(this,Wn))return a(this,ba);if(!a(this,ba))return!1;const{print:l,view:d}=this.usage;return a(this,cn)?(d==null?void 0:d.viewState)!=="OFF":a(this,an)?(l==null?void 0:l.printState)!=="OFF":!0}_setVisible(l,d,Z=!1){l!==p0&&Gl("Internal method `_setVisible` called."),R(this,Wn,Z),R(this,ba,d)}}cn=new WeakMap,an=new WeakMap,Wn=new WeakMap,ba=new WeakMap;var ZF,Jl,ma,Ma,BV,zi;class j2{constructor(l,d=dU.DISPLAY){if(b(this,BV),b(this,ZF,null),b(this,Jl,new Map),b(this,ma,null),b(this,Ma,null),this.renderingIntent=d,this.name=null,this.creator=null,l!==null){this.name=l.name,this.creator=l.creator,R(this,Ma,l.order);for(const Z of l.groups)a(this,Jl).set(Z.id,new x2(d,Z));if(l.baseState==="OFF")for(const Z of a(this,Jl).values())Z._setVisible(p0,!1);for(const Z of l.on)a(this,Jl).get(Z)._setVisible(p0,!0);for(const Z of l.off)a(this,Jl).get(Z)._setVisible(p0,!1);R(this,ma,this.getHash())}}isVisible(l){if(a(this,Jl).size===0)return!0;if(!l)return UQ("Optional content group not defined."),!0;if(l.type==="OCG")return a(this,Jl).has(l.id)?a(this,Jl).get(l.id).visible:(dl(`Optional content group not found: ${l.id}`),!0);if(l.type==="OCMD"){if(l.expression)return h(this,BV,zi).call(this,l.expression);if(!l.policy||l.policy==="AnyOn"){for(const d of l.ids){if(!a(this,Jl).has(d))return dl(`Optional content group not found: ${d}`),!0;if(a(this,Jl).get(d).visible)return!0}return!1}else if(l.policy==="AllOn"){for(const d of l.ids){if(!a(this,Jl).has(d))return dl(`Optional content group not found: ${d}`),!0;if(!a(this,Jl).get(d).visible)return!1}return!0}else if(l.policy==="AnyOff"){for(const d of l.ids){if(!a(this,Jl).has(d))return dl(`Optional content group not found: ${d}`),!0;if(!a(this,Jl).get(d).visible)return!0}return!1}else if(l.policy==="AllOff"){for(const d of l.ids){if(!a(this,Jl).has(d))return dl(`Optional content group not found: ${d}`),!0;if(a(this,Jl).get(d).visible)return!1}return!0}return dl(`Unknown optional content policy ${l.policy}.`),!0}return dl(`Unknown group type ${l.type}.`),!0}setVisibility(l,d=!0,Z=!0){var t;const F=a(this,Jl).get(l);if(!F){dl(`Optional content group not found: ${l}`);return}if(Z&&d&&F.rbGroups.length)for(const c of F.rbGroups)for(const W of c)W!==l&&((t=a(this,Jl).get(W))==null||t._setVisible(p0,!1,!0));F._setVisible(p0,!!d,!0),R(this,ZF,null)}setOCGState({state:l,preserveRB:d}){let Z;for(const t of l){switch(t){case"ON":case"OFF":case"Toggle":Z=t;continue}const F=a(this,Jl).get(t);if(F)switch(Z){case"ON":this.setVisibility(t,!0,d);break;case"OFF":this.setVisibility(t,!1,d);break;case"Toggle":this.setVisibility(t,!F.visible,d);break}}R(this,ZF,null)}get hasInitialVisibility(){return a(this,ma)===null||this.getHash()===a(this,ma)}getOrder(){return a(this,Jl).size?a(this,Ma)?a(this,Ma).slice():[...a(this,Jl).keys()]:null}getGroups(){return a(this,Jl).size>0?LR(a(this,Jl)):null}getGroup(l){return a(this,Jl).get(l)||null}getHash(){if(a(this,ZF)!==null)return a(this,ZF);const l=new Ve;for(const[d,Z]of a(this,Jl))l.update(`${d}:${Z.visible}`);return R(this,ZF,l.hexdigest())}}ZF=new WeakMap,Jl=new WeakMap,ma=new WeakMap,Ma=new WeakMap,BV=new WeakSet,zi=function(U){const l=U.length;if(l<2)return!0;const d=U[0];for(let Z=1;Z0){const s=F instanceof Uint8Array&&F.byteLength===F.buffer.byteLength?F.buffer:new Uint8Array(F).buffer;this._queuedChunks.push(s)}this._pdfDataRangeTransport=l,this._isStreamingSupported=!Z,this._isRangeSupported=!d,this._contentLength=t,this._fullRequestReader=null,this._rangeReaders=[],l.addRangeListener((s,n)=>{this._onReceiveData({begin:s,chunk:n})}),l.addProgressListener((s,n)=>{this._onProgress({loaded:s,total:n})}),l.addProgressiveReadListener(s=>{this._onReceiveData({chunk:s})}),l.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),l.transportReady()}_onReceiveData({begin:l,chunk:d}){const Z=d instanceof Uint8Array&&d.byteLength===d.buffer.byteLength?d.buffer:new Uint8Array(d).buffer;if(l===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(Z):this._queuedChunks.push(Z);else{const t=this._rangeReaders.some(function(F){return F._begin!==l?!1:(F._enqueue(Z),!0)});Al(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var l;return((l=this._fullRequestReader)==null?void 0:l._loaded)??0}_onProgress(l){var d,Z,t,F;l.total===void 0?(Z=(d=this._rangeReaders[0])==null?void 0:d.onProgress)==null||Z.call(d,{loaded:l.loaded}):(F=(t=this._fullRequestReader)==null?void 0:t.onProgress)==null||F.call(t,{loaded:l.loaded,total:l.total})}_onProgressiveDone(){var l;(l=this._fullRequestReader)==null||l.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(l){const d=this._rangeReaders.indexOf(l);d>=0&&this._rangeReaders.splice(d,1)}getFullReader(){Al(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const l=this._queuedChunks;return this._queuedChunks=null,new g2(this,l,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(l,d){if(d<=this._progressiveDataLength)return null;const Z=new K2(this,l,d);return this._pdfDataRangeTransport.requestDataRange(l,d),this._rangeReaders.push(Z),Z}cancelAllRequests(l){var d;(d=this._fullRequestReader)==null||d.cancel(l);for(const Z of this._rangeReaders.slice(0))Z.cancel(l);this._pdfDataRangeTransport.abort()}}class g2{constructor(l,d,Z=!1,t=null){this._stream=l,this._done=Z||!1,this._filename=ER(t)?t:null,this._queuedChunks=d||[],this._loaded=0;for(const F of this._queuedChunks)this._loaded+=F.byteLength;this._requests=[],this._headersReady=Promise.resolve(),l._fullRequestReader=this,this.onProgress=null}_enqueue(l){this._done||(this._requests.length>0?this._requests.shift().resolve({value:l,done:!1}):this._queuedChunks.push(l),this._loaded+=l.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const l=Promise.withResolvers();return this._requests.push(l),l.promise}cancel(l){this._done=!0;for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class K2{constructor(l,d,Z){this._stream=l,this._begin=d,this._end=Z,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(l){if(!this._done){if(this._requests.length===0)this._queuedChunk=l;else{this._requests.shift().resolve({value:l,done:!1});for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const d=this._queuedChunk;return this._queuedChunk=null,{value:d,done:!1}}if(this._done)return{value:void 0,done:!0};const l=Promise.withResolvers();return this._requests.push(l),l.promise}cancel(l){this._done=!0;for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function v2(U){let l=!0,d=Z("filename\\*","i").exec(U);if(d){d=d[1];let V=W(d);return V=unescape(V),V=s(V),V=n(V),F(V)}if(d=c(U),d){const V=n(d);return F(V)}if(d=Z("filename","i").exec(U),d){d=d[1];let V=W(d);return V=n(V),F(V)}function Z(V,Q){return new RegExp("(?:^|;)\\s*"+V+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',Q)}function t(V,Q){if(V){if(!/^[\x00-\xFF]+$/.test(Q))return Q;try{const i=new TextDecoder(V,{fatal:!0}),N=ZQ(Q);Q=i.decode(N),l=!1}catch{}}return Q}function F(V){return l&&/[\x80-\xff]/.test(V)&&(V=t("utf-8",V),l&&(V=t("iso-8859-1",V))),V}function c(V){const Q=[];let i;const N=Z("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(i=N.exec(V))!==null;){let[,m,M,J]=i;if(m=parseInt(m,10),m in Q){if(m===0)break;continue}Q[m]=[M,J]}const e=[];for(let m=0;m {if(l._responseOrigin=cQ(F.url),!Be(F.status))throw aQ(F.status,t);this._reader=F.body.getReader(),this._headersCapability.resolve();const c=F.headers,{allowRangeRequests:W,suggestedLength:s}=ue({responseHeaders:c,isHttp:l.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=W,this._contentLength=s||this._contentLength,this._filename=Ye(c),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Bt("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var l;await this._headersCapability.promise;const{value:d,done:Z}=await this._reader.read();return Z?{value:d,done:Z}:(this._loaded+=d.byteLength,(l=this.onProgress)==null||l.call(this,{loaded:this._loaded,total:this._contentLength}),{value:ye(d),done:!1})}cancel(l){var d;(d=this._reader)==null||d.cancel(l),this._abortController.abort()}}class P2{constructor(l,d,Z){this._stream=l,this._reader=null,this._loaded=0;const t=l.source;this._withCredentials=t.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!t.disableStream,this._abortController=new AbortController;const F=new Headers(l.headers);F.append("Range",`bytes=${d}-${Z-1}`);const c=t.url;fetch(c,oe(F,this._withCredentials,this._abortController)).then(W=>{const s=cQ(W.url);if(s!==l._responseOrigin)throw new Error(`Expected range response-origin "${s}" to match "${l._responseOrigin}".`);if(!Be(W.status))throw aQ(W.status,c);this._readCapability.resolve(),this._reader=W.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var l;await this._readCapability.promise;const{value:d,done:Z}=await this._reader.read();return Z?{value:d,done:Z}:(this._loaded+=d.byteLength,(l=this.onProgress)==null||l.call(this,{loaded:this._loaded}),{value:ye(d),done:!1})}cancel(l){var d;(d=this._reader)==null||d.cancel(l),this._abortController.abort()}}const BQ=200,oQ=206;function f2(U){const l=U.response;return typeof l!="string"?l:ZQ(l).buffer}class A2{constructor({url:l,httpHeaders:d,withCredentials:Z}){f(this,"_responseOrigin",null),this.url=l,this.isHttp=/^https?:/i.test(l),this.headers=pe(this.isHttp,d),this.withCredentials=Z||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(l){const d=new XMLHttpRequest,Z=this.currXhrId++,t=this.pendingRequests[Z]={xhr:d};d.open("GET",this.url),d.withCredentials=this.withCredentials;for(const[F,c]of this.headers)d.setRequestHeader(F,c);return this.isHttp&&"begin"in l&&"end"in l?(d.setRequestHeader("Range",`bytes=${l.begin}-${l.end-1}`),t.expectedStatus=oQ):t.expectedStatus=BQ,d.responseType="arraybuffer",Al(l.onError,"Expected `onError` callback to be provided."),d.onerror=()=>{l.onError(d.status)},d.onreadystatechange=this.onStateChange.bind(this,Z),d.onprogress=this.onProgress.bind(this,Z),t.onHeadersReceived=l.onHeadersReceived,t.onDone=l.onDone,t.onError=l.onError,t.onProgress=l.onProgress,d.send(null),Z}onProgress(l,d){var Z;const t=this.pendingRequests[l];t&&((Z=t.onProgress)==null||Z.call(t,d))}onStateChange(l,d){const Z=this.pendingRequests[l];if(!Z)return;const t=Z.xhr;if(t.readyState>=2&&Z.onHeadersReceived&&(Z.onHeadersReceived(),delete Z.onHeadersReceived),t.readyState!==4||!(l in this.pendingRequests))return;if(delete this.pendingRequests[l],t.status===0&&this.isHttp){Z.onError(t.status);return}const F=t.status||BQ;if(!(F===BQ&&Z.expectedStatus===oQ)&&F!==Z.expectedStatus){Z.onError(t.status);return}const c=f2(t);if(F===oQ){const W=t.getResponseHeader("Content-Range"),s=/bytes (\d+)-(\d+)\/(\d+)/.exec(W);s?Z.onDone({begin:parseInt(s[1],10),chunk:c}):(dl('Missing or invalid "Content-Range" header.'),Z.onError(0))}else c?Z.onDone({begin:0,chunk:c}):Z.onError(t.status)}getRequestXhr(l){return this.pendingRequests[l].xhr}isPendingRequest(l){return l in this.pendingRequests}abortRequest(l){const d=this.pendingRequests[l].xhr;delete this.pendingRequests[l],d.abort()}}class _2{constructor(l){this._source=l,this._manager=new A2(l),this._rangeChunkSize=l.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(l){const d=this._rangeRequestReaders.indexOf(l);d>=0&&this._rangeRequestReaders.splice(d,1)}getFullReader(){return Al(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new q2(this._manager,this._source),this._fullRequestReader}getRangeReader(l,d){const Z=new $2(this._manager,l,d);return Z.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(Z),Z}cancelAllRequests(l){var d;(d=this._fullRequestReader)==null||d.cancel(l);for(const Z of this._rangeRequestReaders.slice(0))Z.cancel(l)}}class q2{constructor(l,d){this._manager=l,this._url=d.url,this._fullRequestId=l.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=d.disableRange||!1,this._contentLength=d.length,this._rangeChunkSize=d.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const l=this._fullRequestId,d=this._manager.getRequestXhr(l);this._manager._responseOrigin=cQ(d.responseURL);const Z=d.getAllResponseHeaders(),t=new Headers(Z?Z.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(W=>{const[s,...n]=W.split(": ");return[s,n.join(": ")]}):[]),{allowRangeRequests:F,suggestedLength:c}=ue({responseHeaders:t,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});F&&(this._isRangeSupported=!0),this._contentLength=c||this._contentLength,this._filename=Ye(t),this._isRangeSupported&&this._manager.abortRequest(l),this._headersCapability.resolve()}_onDone(l){if(l&&(this._requests.length>0?this._requests.shift().resolve({value:l.chunk,done:!1}):this._cachedChunks.push(l.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(l){this._storedError=aQ(l,this._url),this._headersCapability.reject(this._storedError);for(const d of this._requests)d.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(l){var d;(d=this.onProgress)==null||d.call(this,{loaded:l.loaded,total:l.lengthComputable?l.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const l=Promise.withResolvers();return this._requests.push(l),l.promise}cancel(l){this._done=!0,this._headersCapability.reject(l);for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class $2{constructor(l,d,Z){this._manager=l,this._url=l.url,this._requestId=l.request({begin:d,end:Z,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){var l;const d=cQ((l=this._manager.getRequestXhr(this._requestId))==null?void 0:l.responseURL);d!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${d}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){var l;(l=this.onClosed)==null||l.call(this,this)}_onDone(l){const d=l.chunk;this._requests.length>0?this._requests.shift().resolve({value:d,done:!1}):this._queuedChunk=d,this._done=!0;for(const Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(l){this._storedError??(this._storedError=aQ(l,this._url));for(const d of this._requests)d.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(l){var d;this.isStreamingSupported||(d=this.onProgress)==null||d.call(this,{loaded:l.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const d=this._queuedChunk;return this._queuedChunk=null,{value:d,done:!1}}if(this._done)return{value:void 0,done:!0};const l=Promise.withResolvers();return this._requests.push(l),l.promise}cancel(l){this._done=!0;for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const lM=/^[a-z][a-z0-9\-+.]+:/i;function dM(U){if(lM.test(U))return new URL(U);const l=process.getBuiltinModule("url");return new URL(l.pathToFileURL(U))}class UM{constructor(l){this.source=l,this.url=dM(l.url),Al(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var l;return((l=this._fullRequestReader)==null?void 0:l._loaded)??0}getFullReader(){return Al(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new ZM(this),this._fullRequestReader}getRangeReader(l,d){if(d<=this._progressiveDataLength)return null;const Z=new tM(this,l,d);return this._rangeRequestReaders.push(Z),Z}cancelAllRequests(l){var d;(d=this._fullRequestReader)==null||d.cancel(l);for(const Z of this._rangeRequestReaders.slice(0))Z.cancel(l)}}class ZM{constructor(l){this._url=l.url,this._done=!1,this._storedError=null,this.onProgress=null;const d=l.source;this._contentLength=d.length,this._loaded=0,this._filename=null,this._disableRange=d.disableRange||!1,this._rangeChunkSize=d.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!d.disableStream,this._isRangeSupported=!d.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const Z=process.getBuiltinModule("fs");Z.promises.lstat(this._url).then(t=>{this._contentLength=t.size,this._setReadableStream(Z.createReadStream(this._url)),this._headersCapability.resolve()},t=>{t.code==="ENOENT"&&(t=new zW(`Missing PDF "${this._url}".`)),this._storedError=t,this._headersCapability.reject(t)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var l;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const d=this._readableStream.read();return d===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=d.length,(l=this.onProgress)==null||l.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(d).buffer,done:!1})}cancel(l){if(!this._readableStream){this._error(l);return}this._readableStream.destroy(l)}_error(l){this._storedError=l,this._readCapability.resolve()}_setReadableStream(l){this._readableStream=l,l.on("readable",()=>{this._readCapability.resolve()}),l.on("end",()=>{l.destroy(),this._done=!0,this._readCapability.resolve()}),l.on("error",d=>{this._error(d)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Bt("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class tM{constructor(l,d,Z){this._url=l.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const t=l.source;this._isStreamingSupported=!t.disableStream;const F=process.getBuiltinModule("fs");this._setReadableStream(F.createReadStream(this._url,{start:d,end:Z-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){var l;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const d=this._readableStream.read();return d===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=d.length,(l=this.onProgress)==null||l.call(this,{loaded:this._loaded}),{value:new Uint8Array(d).buffer,done:!1})}cancel(l){if(!this._readableStream){this._error(l);return}this._readableStream.destroy(l)}_error(l){this._storedError=l,this._readCapability.resolve()}_setReadableStream(l){this._readableStream=l,l.on("readable",()=>{this._readCapability.resolve()}),l.on("end",()=>{l.destroy(),this._done=!0,this._readCapability.resolve()}),l.on("error",d=>{this._error(d)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const FM=1e5,Dd=30,cM=.8;var LN,jt,Hd,es,bs,Ot,jZ,ms,Ms,d0,Ec,wc,gt,Cc,Js,rc,U0,Gs,Ss,ql,Z0,t0,Ts,Kt,xc,F0,IN,DN,yQ,sZ,Xs,kQ,EN,wN;let Li=(ql=class{constructor({textContentSource:U,container:l,viewport:d}){b(this,F0),b(this,jt,Promise.withResolvers()),b(this,Hd,null),b(this,es,!1),b(this,bs,!!((LN=globalThis.FontInspector)!=null&&LN.enabled)),b(this,Ot,null),b(this,jZ,null),b(this,ms,0),b(this,Ms,0),b(this,d0,null),b(this,Ec,null),b(this,wc,0),b(this,gt,0),b(this,Cc,Object.create(null)),b(this,Js,[]),b(this,rc,null),b(this,U0,[]),b(this,Gs,new WeakMap),b(this,Ss,null);var Z;if(U instanceof ReadableStream)R(this,rc,U);else if(typeof U=="object")R(this,rc,new ReadableStream({start(s){s.enqueue(U),s.close()}}));else throw new Error('No "textContentSource" parameter specified.');R(this,Hd,R(this,Ec,l)),R(this,gt,d.scale*(globalThis.devicePixelRatio||1)),R(this,wc,d.rotation),R(this,jZ,{div:null,properties:null,ctx:null});const{pageWidth:t,pageHeight:F,pageX:c,pageY:W}=d.rawDims;R(this,Ss,[1,0,0,-1,-c,W+F]),R(this,Ms,t),R(this,ms,F),h(Z=ql,sZ,EN).call(Z),wF(l,d),a(this,jt).promise.finally(()=>{a(ql,xc).delete(this),R(this,jZ,null),R(this,Cc,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:U,isFirefox:l}=Id.platform;return tl(this,"fontFamilyMap",new Map([["sans-serif",`${U&&l?"Calibri, ":""}sans-serif`],["monospace",`${U&&l?"Lucida Console, ":""}monospace`]]))}render(){const U=()=>{a(this,d0).read().then(({value:l,done:d})=>{if(d){a(this,jt).resolve();return}a(this,Ot)??R(this,Ot,l.lang),Object.assign(a(this,Cc),l.styles),h(this,F0,IN).call(this,l.items),U()},a(this,jt).reject)};return R(this,d0,a(this,rc).getReader()),a(ql,xc).add(this),U(),a(this,jt).promise}update({viewport:U,onBefore:l=null}){var d;const Z=U.scale*(globalThis.devicePixelRatio||1),t=U.rotation;if(t!==a(this,wc)&&(l==null||l(),R(this,wc,t),wF(a(this,Ec),{rotation:t})),Z!==a(this,gt)){l==null||l(),R(this,gt,Z);const F={div:null,properties:null,ctx:h(d=ql,sZ,Xs).call(d,a(this,Ot))};for(const c of a(this,U0))F.properties=a(this,Gs).get(c),F.div=c,h(this,F0,yQ).call(this,F)}}cancel(){var U;const l=new Bt("TextLayer task cancelled.");(U=a(this,d0))==null||U.cancel(l).catch(()=>{}),R(this,d0,null),a(this,jt).reject(l)}get textDivs(){return a(this,U0)}get textContentItemsStr(){return a(this,Js)}static cleanup(){if(!(a(this,xc).size>0)){a(this,Z0).clear();for(const{canvas:U}of a(this,t0).values())U.remove();a(this,t0).clear()}}},jt=new WeakMap,Hd=new WeakMap,es=new WeakMap,bs=new WeakMap,Ot=new WeakMap,jZ=new WeakMap,ms=new WeakMap,Ms=new WeakMap,d0=new WeakMap,Ec=new WeakMap,wc=new WeakMap,gt=new WeakMap,Cc=new WeakMap,Js=new WeakMap,rc=new WeakMap,U0=new WeakMap,Gs=new WeakMap,Ss=new WeakMap,Z0=new WeakMap,t0=new WeakMap,Ts=new WeakMap,Kt=new WeakMap,xc=new WeakMap,F0=new WeakSet,IN=function(U){var l,d;if(a(this,es))return;(d=a(this,jZ)).ctx??(d.ctx=h(l=ql,sZ,Xs).call(l,a(this,Ot)));const Z=a(this,U0),t=a(this,Js);for(const F of U){if(Z.length>FM){dl("Ignoring additional textDivs for performance reasons."),R(this,es,!0);return}if(F.str===void 0){if(F.type==="beginMarkedContentProps"||F.type==="beginMarkedContent"){const c=a(this,Hd);R(this,Hd,document.createElement("span")),a(this,Hd).classList.add("markedContent"),F.id!==null&&a(this,Hd).setAttribute("id",`${F.id}`),c.append(a(this,Hd))}else F.type==="endMarkedContent"&&R(this,Hd,a(this,Hd).parentNode);continue}t.push(F.str),h(this,F0,DN).call(this,F)}},DN=function(U){var l;const d=document.createElement("span"),Z={angle:0,canvasWidth:0,hasText:U.str!=="",hasEOL:U.hasEOL,fontSize:0};a(this,U0).push(d);const t=O.transform(a(this,Ss),U.transform);let F=Math.atan2(t[1],t[0]);const c=a(this,Cc)[U.fontName];c.vertical&&(F+=Math.PI/2);let W=a(this,bs)&&c.fontSubstitution||c.fontFamily;W=ql.fontFamilyMap.get(W)||W;const s=Math.hypot(t[2],t[3]),n=s*h(l=ql,sZ,wN).call(l,W,a(this,Ot));let V,Q;F===0?(V=t[4],Q=t[5]-n):(V=t[4]+n*Math.sin(F),Q=t[5]-n*Math.cos(F));const i="calc(var(--scale-factor)*",N=d.style;a(this,Hd)===a(this,Ec)?(N.left=`${(100*V/a(this,Ms)).toFixed(2)}%`,N.top=`${(100*Q/a(this,ms)).toFixed(2)}%`):(N.left=`${i}${V.toFixed(2)}px)`,N.top=`${i}${Q.toFixed(2)}px)`),N.fontSize=`${i}${(a(ql,Kt)*s).toFixed(2)}px)`,N.fontFamily=W,Z.fontSize=s,d.setAttribute("role","presentation"),d.textContent=U.str,d.dir=U.dir,a(this,bs)&&(d.dataset.fontName=c.fontSubstitutionLoadedName||U.fontName),F!==0&&(Z.angle=F*(180/Math.PI));let e=!1;if(U.str.length>1)e=!0;else if(U.str!==" "&&U.transform[0]!==U.transform[3]){const m=Math.abs(U.transform[0]),M=Math.abs(U.transform[3]);m!==M&&Math.max(m,M)/Math.min(m,M)>1.5&&(e=!0)}if(e&&(Z.canvasWidth=c.vertical?U.height:U.width),a(this,Gs).set(d,Z),a(this,jZ).div=d,a(this,jZ).properties=Z,h(this,F0,yQ).call(this,a(this,jZ)),Z.hasText&&a(this,Hd).append(d),Z.hasEOL){const m=document.createElement("br");m.setAttribute("role","presentation"),a(this,Hd).append(m)}},yQ=function(U){var l;const{div:d,properties:Z,ctx:t}=U,{style:F}=d;let c="";if(a(ql,Kt)>1&&(c=`scale(${1/a(ql,Kt)})`),Z.canvasWidth!==0&&Z.hasText){const{fontFamily:W}=F,{canvasWidth:s,fontSize:n}=Z;h(l=ql,sZ,kQ).call(l,t,n*a(this,gt),W);const{width:V}=t.measureText(d.textContent);V>0&&(c=`scaleX(${s*a(this,gt)/V}) ${c}`)}Z.angle!==0&&(c=`rotate(${Z.angle}deg) ${c}`),c.length>0&&(F.transform=c)},sZ=new WeakSet,Xs=function(U=null){let l=a(this,t0).get(U||(U=""));if(!l){const d=document.createElement("canvas");d.className="hiddenCanvasElement",d.lang=U,document.body.append(d),l=d.getContext("2d",{alpha:!1,willReadFrequently:!0}),a(this,t0).set(U,l),a(this,Ts).set(l,{size:0,family:""})}return l},kQ=function(U,l,d){const Z=a(this,Ts).get(U);l===Z.size&&d===Z.family||(U.font=`${l}px ${d}`,Z.size=l,Z.family=d)},EN=function(){if(a(this,Kt)!==null)return;const U=document.createElement("div");U.style.opacity=0,U.style.lineHeight=1,U.style.fontSize="1px",U.style.position="absolute",U.textContent="X",document.body.append(U),R(this,Kt,U.getBoundingClientRect().height),U.remove()},wN=function(U,l){const d=a(this,Z0).get(U);if(d)return d;const Z=h(this,sZ,Xs).call(this,l);Z.canvas.width=Z.canvas.height=Dd,h(this,sZ,kQ).call(this,Z,Dd,U);const t=Z.measureText("");let F=t.fontBoundingBoxAscent,c=Math.abs(t.fontBoundingBoxDescent);if(F){const n=F/(F+c);return a(this,Z0).set(U,n),Z.canvas.width=Z.canvas.height=0,n}Z.strokeStyle="red",Z.clearRect(0,0,Dd,Dd),Z.strokeText("g",0,0);let W=Z.getImageData(0,0,Dd,Dd).data;c=0;for(let n=W.length-1-3;n>=0;n-=4)if(W[n]>0){c=Math.ceil(n/4/Dd);break}Z.clearRect(0,0,Dd,Dd),Z.strokeText("A",0,Dd),W=Z.getImageData(0,0,Dd,Dd).data,F=0;for(let n=0,V=W.length;n 0){F=Dd-Math.floor(n/4/Dd);break}Z.canvas.width=Z.canvas.height=0;const s=F?F/(F+c):cM;return a(this,Z0).set(U,s),s},b(ql,sZ),b(ql,Z0,new Map),b(ql,t0,new Map),b(ql,Ts,new WeakMap),b(ql,Kt,null),b(ql,xc,new Set),ql);class IW{static textContent(l){const d=[],Z={items:d,styles:Object.create(null)};function t(F){var c;if(!F)return;let W=null;const s=F.name;if(s==="#text")W=F.value;else if(IW.shouldBuildText(s))(c=F==null?void 0:F.attributes)!=null&&c.textContent?W=F.attributes.textContent:F.value&&(W=F.value);else return;if(W!==null&&d.push({str:W}),!!F.children)for(const n of F.children)t(n)}return t(l),Z}static shouldBuildText(l){return!(l==="textarea"||l==="input"||l==="option"||l==="select")}}const aM=65536,WM=100,sM=5e3,nM=Bd?G2:m2,VM=Bd?S2:ee,QM=Bd?J2:M2,iM=Bd?T2:Je;function RM(U={}){typeof U=="string"||U instanceof URL?U={url:U}:(U instanceof ArrayBuffer||ArrayBuffer.isView(U))&&(U={data:U});const l=new eM,{docId:d}=l,Z=U.url?NM(U.url):null,t=U.data?hM(U.data):null,F=U.httpHeaders||null,c=U.withCredentials===!0,W=U.password??null,s=U.range instanceof Le?U.range:null,n=Number.isInteger(U.rangeChunkSize)&&U.rangeChunkSize>0?U.rangeChunkSize:aM;let V=U.worker instanceof sn?U.worker:null;const Q=U.verbosity,i=typeof U.docBaseUrl=="string"&&!FQ(U.docBaseUrl)?U.docBaseUrl:null,N=typeof U.cMapUrl=="string"?U.cMapUrl:null,e=U.cMapPacked!==!1,m=U.CMapReaderFactory||VM,M=typeof U.standardFontDataUrl=="string"?U.standardFontDataUrl:null,J=U.StandardFontDataFactory||iM,S=U.stopAtErrors!==!0,G=Number.isInteger(U.maxImageSize)&&U.maxImageSize>-1?U.maxImageSize:-1,T=U.isEvalSupported!==!1,p=typeof U.isOffscreenCanvasSupported=="boolean"?U.isOffscreenCanvasSupported:!Bd,u=typeof U.isImageDecoderSupported=="boolean"?U.isImageDecoderSupported:!Bd&&(Id.platform.isFirefox||!globalThis.chrome),Y=Number.isInteger(U.canvasMaxAreaInBytes)?U.canvasMaxAreaInBytes:-1,o=typeof U.disableFontFace=="boolean"?U.disableFontFace:Bd,X=U.fontExtraProperties===!0,B=U.enableXfa===!0,y=U.ownerDocument||globalThis.document,E=U.disableRange===!0,D=U.disableStream===!0,w=U.disableAutoFetch===!0,I=U.pdfBug===!0,L=U.CanvasFactory||nM,g=U.FilterFactory||QM,A=U.enableHWA===!0,Vl=s?s.length:U.length??NaN,Sl=typeof U.useSystemFonts=="boolean"?U.useSystemFonts:!Bd&&!o,Tl=typeof U.useWorkerFetch=="boolean"?U.useWorkerFetch:m===ee&&J===Je&&N&&M&&Fa(N,document.baseURI)&&Fa(M,document.baseURI),Rl=null;Pm(Q);const bl={canvasFactory:new L({ownerDocument:y,enableHWA:A}),filterFactory:new g({docId:d,ownerDocument:y}),cMapReaderFactory:Tl?null:new m({baseUrl:N,isCompressed:e}),standardFontDataFactory:Tl?null:new J({baseUrl:M})};if(!V){const C={verbosity:Q,port:f0.workerPort};V=C.port?sn.fromPort(C):new sn(C),l._worker=V}const FU={docId:d,apiVersion:"4.10.38",data:t,password:W,disableAutoFetch:w,rangeChunkSize:n,length:Vl,docBaseUrl:i,enableXfa:B,evaluatorOptions:{maxImageSize:G,disableFontFace:o,ignoreErrors:S,isEvalSupported:T,isOffscreenCanvasSupported:p,isImageDecoderSupported:u,canvasMaxAreaInBytes:Y,fontExtraProperties:X,useSystemFonts:Sl,cMapUrl:Tl?N:null,standardFontDataUrl:Tl?M:null}},gd={disableFontFace:o,fontExtraProperties:X,ownerDocument:y,pdfBug:I,styleElement:Rl,loadingParams:{disableAutoFetch:w,enableXfa:B}};return V.promise.then(function(){if(l.destroyed)throw new Error("Loading aborted");if(V.destroyed)throw new Error("Worker was destroyed");const C=V.messageHandler.sendWithPromise("GetDocRequest",FU,t?[t.buffer]:null);let z;if(s)z=new O2(s,{disableRange:E,disableStream:D});else if(!t){if(!Z)throw new Error("getDocument - no `url` parameter provided.");let r;if(Bd)if(Fa(Z)){if(typeof fetch>"u"||typeof Response>"u"||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");r=zN}else r=UM;else r=Fa(Z)?zN:_2;z=new r({url:Z,length:Vl,httpHeaders:F,withCredentials:c,rangeChunkSize:n,disableRange:E,disableStream:D})}return C.then(r=>{if(l.destroyed)throw new Error("Loading aborted");if(V.destroyed)throw new Error("Worker was destroyed");const ll=new Ra(d,r,V.port),hl=new JM(ll,l,z,gd,bl);l._transport=hl,ll.send("Ready",null)})}).catch(l._capability.reject),l}function NM(U){if(U instanceof URL)return U.href;try{return new URL(U,window.location).href}catch{if(Bd&&typeof U=="string")return U}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function hM(U){if(Bd&&typeof Buffer<"u"&&U instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(U instanceof Uint8Array&&U.byteLength===U.buffer.byteLength)return U;if(typeof U=="string")return ZQ(U);if(U instanceof ArrayBuffer||ArrayBuffer.isView(U)||typeof U=="object"&&!isNaN(U==null?void 0:U.length))return new Uint8Array(U);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function CN(U){return typeof U=="object"&&Number.isInteger(U==null?void 0:U.num)&&U.num>=0&&Number.isInteger(U==null?void 0:U.gen)&&U.gen>=0}var Ii;const ke=class ze{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${Ld(ze,Ii)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var l,d,Z,t;this.destroyed=!0;try{(l=this._worker)!=null&&l.port&&(this._worker._pendingDestroy=!0),await((d=this._transport)==null?void 0:d.destroy())}catch(F){throw(Z=this._worker)!=null&&Z.port&&delete this._worker._pendingDestroy,F}this._transport=null,(t=this._worker)==null||t.destroy(),this._worker=null}};Ii=new WeakMap,b(ke,Ii,0);let eM=ke,Le=class{constructor(U,l,d=!1,Z=null){this.length=U,this.initialData=l,this.progressiveDone=d,this.contentDispositionFilename=Z,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(U){this._rangeListeners.push(U)}addProgressListener(U){this._progressListeners.push(U)}addProgressiveReadListener(U){this._progressiveReadListeners.push(U)}addProgressiveDoneListener(U){this._progressiveDoneListeners.push(U)}onDataRange(U,l){for(const d of this._rangeListeners)d(U,l)}onDataProgress(U,l){this._readyCapability.promise.then(()=>{for(const d of this._progressListeners)d(U,l)})}onDataProgressiveRead(U){this._readyCapability.promise.then(()=>{for(const l of this._progressiveReadListeners)l(U)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const U of this._progressiveDoneListeners)U()})}transportReady(){this._readyCapability.resolve()}requestDataRange(U,l){Gl("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class bM{constructor(l,d){this._pdfInfo=l,this._transport=d}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return tl(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(l){return this._transport.getPage(l)}getPageIndex(l){return this._transport.getPageIndex(l)}getDestinations(){return this._transport.getDestinations()}getDestination(l){return this._transport.getDestination(l)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:l="display"}={}){const{renderingIntent:d}=this._transport.getRenderingIntent(l);return this._transport.getOptionalContentConfig(d)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(l=!1){return this._transport.startCleanup(l||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(l){return this._transport.cachedPageNumber(l)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var tF,ht,AU,A0,oV;class mM{constructor(l,d,Z,t=!1){b(this,AU),b(this,tF,null),b(this,ht,!1),this._pageIndex=l,this._pageInfo=d,this._transport=Z,this._stats=t?new dN:null,this._pdfBug=t,this.commonObjs=Z.commonObjs,this.objs=new Ie,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:l,rotation:d=this.rotate,offsetX:Z=0,offsetY:t=0,dontFlip:F=!1}={}){return new wW({viewBox:this.view,userUnit:this.userUnit,scale:l,rotation:d,offsetX:Z,offsetY:t,dontFlip:F})}getAnnotations({intent:l="display"}={}){const{renderingIntent:d}=this._transport.getRenderingIntent(l);return this._transport.getAnnotations(this._pageIndex,d)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return tl(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var l;return((l=this._transport._htmlForXfa)==null?void 0:l.children[this._pageIndex])||null}render({canvasContext:l,viewport:d,intent:Z="display",annotationMode:t=Rt.ENABLE,transform:F=null,background:c=null,optionalContentConfigPromise:W=null,annotationCanvasMap:s=null,pageColors:n=null,printAnnotationStorage:V=null,isEditing:Q=!1}){var i,N;(i=this._stats)==null||i.time("Overall");const e=this._transport.getRenderingIntent(Z,t,V,Q),{renderingIntent:m,cacheKey:M}=e;R(this,ht,!1),h(this,AU,oV).call(this),W||(W=this._transport.getOptionalContentConfig(m));let J=this._intentStates.get(M);J||(J=Object.create(null),this._intentStates.set(M,J)),J.streamReaderCancelTimeout&&(clearTimeout(J.streamReaderCancelTimeout),J.streamReaderCancelTimeout=null);const S=!!(m&dU.PRINT);J.displayReadyCapability||(J.displayReadyCapability=Promise.withResolvers(),J.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(N=this._stats)==null||N.time("Page Request"),this._pumpOperatorList(e));const G=u=>{var Y;J.renderTasks.delete(T),(this._maybeCleanupAfterRender||S)&&R(this,ht,!0),h(this,AU,A0).call(this,!S),u?(T.capability.reject(u),this._abortOperatorList({intentState:J,reason:u instanceof Error?u:new Error(u)})):T.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(Y=globalThis.Stats)!=null&&Y.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},T=new SM({callback:G,params:{canvasContext:l,viewport:d,transform:F,background:c},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:s,operatorList:J.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!S,pdfBug:this._pdfBug,pageColors:n});(J.renderTasks||(J.renderTasks=new Set)).add(T);const p=T.task;return Promise.all([J.displayReadyCapability.promise,W]).then(([u,Y])=>{var o;if(this.destroyed){G();return}if((o=this._stats)==null||o.time("Rendering"),!(Y.renderingIntent&m))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");T.initializeGraphics({transparency:u,optionalContentConfig:Y}),T.operatorListChanged()}).catch(G),p}getOperatorList({intent:l="display",annotationMode:d=Rt.ENABLE,printAnnotationStorage:Z=null,isEditing:t=!1}={}){var F;function c(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(n))}const W=this._transport.getRenderingIntent(l,d,Z,t,!0);let s=this._intentStates.get(W.cacheKey);s||(s=Object.create(null),this._intentStates.set(W.cacheKey,s));let n;return s.opListReadCapability||(n=Object.create(null),n.operatorListChanged=c,s.opListReadCapability=Promise.withResolvers(),(s.renderTasks||(s.renderTasks=new Set)).add(n),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(F=this._stats)==null||F.time("Page Request"),this._pumpOperatorList(W)),s.opListReadCapability.promise}streamTextContent({includeMarkedContent:l=!1,disableNormalization:d=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:l===!0,disableNormalization:d===!0},{highWaterMark:100,size(Z){return Z.items.length}})}getTextContent(l={}){if(this._transport._htmlForXfa)return this.getXfa().then(Z=>IW.textContent(Z));const d=this.streamTextContent(l);return new Promise(function(Z,t){function F(){c.read().then(function({value:s,done:n}){if(n){Z(W);return}W.lang??(W.lang=s.lang),Object.assign(W.styles,s.styles),W.items.push(...s.items),F()},t)}const c=d.getReader(),W={items:[],styles:Object.create(null),lang:null};F()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const l=[];for(const d of this._intentStates.values())if(this._abortOperatorList({intentState:d,reason:new Error("Page was destroyed."),force:!0}),!d.opListReadCapability)for(const Z of d.renderTasks)l.push(Z.completed),Z.cancel();return this.objs.clear(),R(this,ht,!1),h(this,AU,oV).call(this),Promise.all(l)}cleanup(l=!1){R(this,ht,!0);const d=h(this,AU,A0).call(this,!1);return l&&d&&this._stats&&(this._stats=new dN),d}_startRenderPage(l,d){var Z,t;const F=this._intentStates.get(d);F&&((Z=this._stats)==null||Z.timeEnd("Page Request"),(t=F.displayReadyCapability)==null||t.resolve(l))}_renderPageChunk(l,d){for(let Z=0,t=l.length;Z {W.read().then(({value:V,done:Q})=>{if(Q){s.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(V,s),n())},V=>{if(s.streamReader=null,!this._transport.destroyed){if(s.operatorList){s.operatorList.lastChunk=!0;for(const Q of s.renderTasks)Q.operatorListChanged();h(this,AU,A0).call(this,!0)}if(s.displayReadyCapability)s.displayReadyCapability.reject(V);else if(s.opListReadCapability)s.opListReadCapability.reject(V);else throw V}})};n()}_abortOperatorList({intentState:l,reason:d,force:Z=!1}){if(l.streamReader){if(l.streamReaderCancelTimeout&&(clearTimeout(l.streamReaderCancelTimeout),l.streamReaderCancelTimeout=null),!Z){if(l.renderTasks.size>0)return;if(d instanceof DR){let t=WM;d.extraDelay>0&&d.extraDelay<1e3&&(t+=d.extraDelay),l.streamReaderCancelTimeout=setTimeout(()=>{l.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:l,reason:d,force:!0})},t);return}}if(l.streamReader.cancel(new Bt(d.message)).catch(()=>{}),l.streamReader=null,!this._transport.destroyed){for(const[t,F]of this._intentStates)if(F===l){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}tF=new WeakMap,ht=new WeakMap,AU=new WeakSet,A0=function(U=!1){if(h(this,AU,oV).call(this),!a(this,ht)||this.destroyed)return!1;if(U)return R(this,tF,setTimeout(()=>{R(this,tF,null),h(this,AU,A0).call(this,!1)},sM)),!1;for(const{renderTasks:l,operatorList:d}of this._intentStates.values())if(l.size>0||!d.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),R(this,ht,!1),!0},oV=function(){a(this,tF)&&(clearTimeout(a(this,tF)),R(this,tF,null))};var qZ,Di;class MM{constructor(){b(this,qZ,new Map),b(this,Di,Promise.resolve())}postMessage(l,d){const Z={data:structuredClone(l,d?{transfer:d}:null)};a(this,Di).then(()=>{for(const[t]of a(this,qZ))t.call(this,Z)})}addEventListener(l,d,Z=null){let t=null;if((Z==null?void 0:Z.signal)instanceof AbortSignal){const{signal:F}=Z;if(F.aborted){dl("LoopbackPort - cannot use an `aborted` signal.");return}const c=()=>this.removeEventListener(l,d);t=()=>F.removeEventListener("abort",c),F.addEventListener("abort",c)}a(this,qZ).set(d,t)}removeEventListener(l,d){const Z=a(this,qZ).get(d);Z==null||Z(),a(this,qZ).delete(d)}terminate(){for(const[,l]of a(this,qZ))l==null||l();a(this,qZ).clear()}}qZ=new WeakMap,Di=new WeakMap;var zl,zQ,c0,vt,jc,ps,Oc,us;let sn=(zl=class{constructor({name:U=null,port:l=null,verbosity:d=fm()}={}){b(this,jc);var Z;if(this.name=U,this.destroyed=!1,this.verbosity=d,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,l){if((Z=a(zl,vt))!=null&&Z.has(l))throw new Error("Cannot use more than one PDFWorker per port.");(a(zl,vt)||R(zl,vt,new WeakMap)).set(l,this),this._initializeFromPort(l);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(U){this._port=U,this._messageHandler=new Ra("main","worker",U),this._messageHandler.on("ready",function(){}),h(this,jc,ps).call(this)}_initialize(){if(a(zl,c0)||a(zl,Oc,us)){this._setupFakeWorker();return}let{workerSrc:U}=zl;try{zl._isSameOrigin(window.location.href,U)||(U=zl._createCDNWrapper(new URL(U,window.location).href));const l=new Worker(U,{type:"module"}),d=new Ra("main","worker",l),Z=()=>{t.abort(),d.destroy(),l.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},t=new AbortController;l.addEventListener("error",()=>{this._webWorker||Z()},{signal:t.signal}),d.on("test",c=>{if(t.abort(),this.destroyed||!c){Z();return}this._messageHandler=d,this._port=l,this._webWorker=l,h(this,jc,ps).call(this)}),d.on("ready",c=>{if(t.abort(),this.destroyed){Z();return}try{F()}catch{this._setupFakeWorker()}});const F=()=>{const c=new Uint8Array;d.send("test",c,[c.buffer])};F();return}catch{UQ("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){a(zl,c0)||(dl("Setting up fake worker."),R(zl,c0,!0)),zl._setupFakeWorkerGlobal.then(U=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const l=new MM;this._port=l;const d=`fake${Ld(zl,zQ)._++}`,Z=new Ra(d+"_worker",d,l);U.setup(Z,l),this._messageHandler=new Ra(d,d+"_worker",l),h(this,jc,ps).call(this)}).catch(U=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${U.message}".`))})}destroy(){var U,l,d;this.destroyed=!0,(U=this._webWorker)==null||U.terminate(),this._webWorker=null,(l=a(zl,vt))==null||l.delete(this._port),this._port=null,(d=this._messageHandler)==null||d.destroy(),this._messageHandler=null}static fromPort(U){var l;if(!(U!=null&&U.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const d=(l=a(this,vt))==null?void 0:l.get(U.port);if(d){if(d._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return d}return new zl(U)}static get workerSrc(){if(f0.workerSrc)return f0.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return tl(this,"_setupFakeWorkerGlobal",(async()=>a(this,Oc,us)?a(this,Oc,us):(await import(this.workerSrc)).WorkerMessageHandler)())}},zQ=new WeakMap,c0=new WeakMap,vt=new WeakMap,jc=new WeakSet,ps=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Oc=new WeakSet,us=function(){var U;try{return((U=globalThis.pdfjsWorker)==null?void 0:U.WorkerMessageHandler)||null}catch{return null}},b(zl,Oc),b(zl,zQ,0),b(zl,c0,!1),b(zl,vt),Bd&&(R(zl,c0,!0),f0.workerSrc||(f0.workerSrc="./pdf.worker.mjs")),zl._isSameOrigin=(U,l)=>{let d;try{if(d=new URL(U),!d.origin||d.origin==="null")return!1}catch{return!1}const Z=new URL(l,d);return d.origin===Z.origin},zl._createCDNWrapper=U=>{const l=`await import("${U}");`;return URL.createObjectURL(new Blob([l],{type:"text/javascript"}))},zl);var et,RZ,Ja,Ga,$Z,u0,Sa;class JM{constructor(l,d,Z,t,F){b(this,u0),b(this,et,new Map),b(this,RZ,new Map),b(this,Ja,new Map),b(this,Ga,new Map),b(this,$Z,null),this.messageHandler=l,this.loadingTask=d,this.commonObjs=new Ie,this.fontLoader=new e2({ownerDocument:t.ownerDocument,styleElement:t.styleElement}),this.loadingParams=t.loadingParams,this._params=t,this.canvasFactory=F.canvasFactory,this.filterFactory=F.filterFactory,this.cMapReaderFactory=F.cMapReaderFactory,this.standardFontDataFactory=F.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=Z,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return tl(this,"annotationStorage",new rR)}getRenderingIntent(l,d=Rt.ENABLE,Z=null,t=!1,F=!1){let c=dU.DISPLAY,W=Xi;switch(l){case"any":c=dU.ANY;break;case"display":break;case"print":c=dU.PRINT;break;default:dl(`getRenderingIntent - invalid intent: ${l}`)}const s=c&dU.PRINT&&Z instanceof ie?Z:this.annotationStorage;switch(d){case Rt.DISABLE:c+=dU.ANNOTATIONS_DISABLE;break;case Rt.ENABLE:break;case Rt.ENABLE_FORMS:c+=dU.ANNOTATIONS_FORMS;break;case Rt.ENABLE_STORAGE:c+=dU.ANNOTATIONS_STORAGE,W=s.serializable;break;default:dl(`getRenderingIntent - invalid annotationMode: ${d}`)}t&&(c+=dU.IS_EDITING),F&&(c+=dU.OPLIST);const{ids:n,hash:V}=s.modifiedIds,Q=[c,W.hash,V];return{renderingIntent:c,cacheKey:Q.join("_"),annotationStorageSerializable:W,modifiedIds:n}}destroy(){var l;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(l=a(this,$Z))==null||l.reject(new Error("Worker was destroyed during onPassword callback"));const d=[];for(const t of a(this,RZ).values())d.push(t._destroy());a(this,RZ).clear(),a(this,Ja).clear(),a(this,Ga).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const Z=this.messageHandler.sendWithPromise("Terminate",null);return d.push(Z),Promise.all(d).then(()=>{var t,F;this.commonObjs.clear(),this.fontLoader.clear(),a(this,et).clear(),this.filterFactory.destroy(),Li.cleanup(),(t=this._networkStream)==null||t.cancelAllRequests(new Bt("Worker was terminated.")),(F=this.messageHandler)==null||F.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:l,loadingTask:d}=this;l.on("GetReader",(Z,t)=>{Al(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=F=>{this._lastProgress={loaded:F.loaded,total:F.total}},t.onPull=()=>{this._fullReader.read().then(function({value:F,done:c}){if(c){t.close();return}Al(F instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(F),1,[F])}).catch(F=>{t.error(F)})},t.onCancel=F=>{this._fullReader.cancel(F),t.ready.catch(c=>{if(!this.destroyed)throw c})}}),l.on("ReaderHeadersReady",async Z=>{var t;await this._fullReader.headersReady;const{isStreamingSupported:F,isRangeSupported:c,contentLength:W}=this._fullReader;return(!F||!c)&&(this._lastProgress&&((t=d.onProgress)==null||t.call(d,this._lastProgress)),this._fullReader.onProgress=s=>{var n;(n=d.onProgress)==null||n.call(d,{loaded:s.loaded,total:s.total})}),{isStreamingSupported:F,isRangeSupported:c,contentLength:W}}),l.on("GetRangeReader",(Z,t)=>{Al(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const F=this._networkStream.getRangeReader(Z.begin,Z.end);if(!F){t.close();return}t.onPull=()=>{F.read().then(function({value:c,done:W}){if(W){t.close();return}Al(c instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(c),1,[c])}).catch(c=>{t.error(c)})},t.onCancel=c=>{F.cancel(c),t.ready.catch(W=>{if(!this.destroyed)throw W})}}),l.on("GetDoc",({pdfInfo:Z})=>{this._numPages=Z.numPages,this._htmlForXfa=Z.htmlForXfa,delete Z.htmlForXfa,d._capability.resolve(new bM(Z,this))}),l.on("DocException",Z=>{d._capability.reject(rd(Z))}),l.on("PasswordRequest",Z=>{R(this,$Z,Promise.withResolvers());try{if(!d.onPassword)throw rd(Z);const t=F=>{F instanceof Error?a(this,$Z).reject(F):a(this,$Z).resolve({password:F})};d.onPassword(t,Z.code)}catch(t){a(this,$Z).reject(t)}return a(this,$Z).promise}),l.on("DataLoaded",Z=>{var t;(t=d.onProgress)==null||t.call(d,{loaded:Z.length,total:Z.length}),this.downloadInfoCapability.resolve(Z)}),l.on("StartRenderPage",Z=>{this.destroyed||a(this,RZ).get(Z.pageIndex)._startRenderPage(Z.transparency,Z.cacheKey)}),l.on("commonobj",([Z,t,F])=>{var c;if(this.destroyed||this.commonObjs.has(Z))return null;switch(t){case"Font":const{disableFontFace:W,fontExtraProperties:s,pdfBug:n}=this._params;if("error"in F){const N=F.error;dl(`Error during font loading: ${N}`),this.commonObjs.resolve(Z,N);break}const V=n&&(c=globalThis.FontInspector)!=null&&c.enabled?(N,e)=>globalThis.FontInspector.fontAdded(N,e):null,Q=new b2(F,{disableFontFace:W,fontExtraProperties:s,inspectFont:V});this.fontLoader.bind(Q).catch(()=>l.sendWithPromise("FontFallback",{id:Z})).finally(()=>{!s&&Q.data&&(Q.data=null),this.commonObjs.resolve(Z,Q)});break;case"CopyLocalImage":const{imageRef:i}=F;Al(i,"The imageRef must be defined.");for(const N of a(this,RZ).values())for(const[,e]of N.objs)if((e==null?void 0:e.ref)===i)return e.dataLen?(this.commonObjs.resolve(Z,structuredClone(e)),e.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(Z,F);break;default:throw new Error(`Got unknown common object type ${t}`)}return null}),l.on("obj",([Z,t,F,c])=>{var W;if(this.destroyed)return;const s=a(this,RZ).get(t);if(!s.objs.has(Z)){if(s._intentStates.size===0){(W=c==null?void 0:c.bitmap)==null||W.close();return}switch(F){case"Image":s.objs.resolve(Z,c),(c==null?void 0:c.dataLen)>gm&&(s._maybeCleanupAfterRender=!0);break;case"Pattern":s.objs.resolve(Z,c);break;default:throw new Error(`Got unknown object type ${F}`)}}}),l.on("DocProgress",Z=>{var t;this.destroyed||(t=d.onProgress)==null||t.call(d,{loaded:Z.loaded,total:Z.total})}),l.on("FetchBuiltInCMap",async Z=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(Z)}),l.on("FetchStandardFontData",async Z=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(Z)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var l;this.annotationStorage.size<=0&&dl("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:d,transfer:Z}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:d,filename:((l=this._fullReader)==null?void 0:l.filename)??null},Z).finally(()=>{this.annotationStorage.resetModified()})}getPage(l){if(!Number.isInteger(l)||l<=0||l>this._numPages)return Promise.reject(new Error("Invalid page request."));const d=l-1,Z=a(this,Ja).get(d);if(Z)return Z;const t=this.messageHandler.sendWithPromise("GetPage",{pageIndex:d}).then(F=>{if(this.destroyed)throw new Error("Transport destroyed");F.refStr&&a(this,Ga).set(F.refStr,l);const c=new mM(d,F,this,this._params.pdfBug);return a(this,RZ).set(d,c),c});return a(this,Ja).set(d,t),t}getPageIndex(l){return CN(l)?this.messageHandler.sendWithPromise("GetPageIndex",{num:l.num,gen:l.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(l,d){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:l,intent:d})}getFieldObjects(){return h(this,u0,Sa).call(this,"GetFieldObjects")}hasJSActions(){return h(this,u0,Sa).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(l){return typeof l!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:l})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return h(this,u0,Sa).call(this,"GetDocJSActions")}getPageJSActions(l){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:l})}getStructTree(l){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:l})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(l){return h(this,u0,Sa).call(this,"GetOptionalContentConfig").then(d=>new j2(d,l))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const l="GetMetadata",d=a(this,et).get(l);if(d)return d;const Z=this.messageHandler.sendWithPromise(l,null).then(t=>{var F,c;return{info:t[0],metadata:t[1]?new r2(t[1]):null,contentDispositionFilename:((F=this._fullReader)==null?void 0:F.filename)??null,contentLength:((c=this._fullReader)==null?void 0:c.contentLength)??null}});return a(this,et).set(l,Z),Z}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(l=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const d of a(this,RZ).values())if(!d.cleanup())throw new Error(`startCleanup: Page ${d.pageNumber} is currently rendering.`);this.commonObjs.clear(),l||this.fontLoader.clear(),a(this,et).clear(),this.filterFactory.destroy(!0),Li.cleanup()}}cachedPageNumber(l){if(!CN(l))return null;const d=l.gen===0?`${l.num}R`:`${l.num}R${l.gen}`;return a(this,Ga).get(d)??null}}et=new WeakMap,RZ=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,$Z=new WeakMap,u0=new WeakSet,Sa=function(U,l=null){const d=a(this,et).get(U);if(d)return d;const Z=this.messageHandler.sendWithPromise(U,l);return a(this,et).set(U,Z),Z};const Ta=Symbol("INITIAL_DATA");var iU,nn,Ei;class Ie{constructor(){b(this,nn),b(this,iU,Object.create(null))}get(l,d=null){if(d){const t=h(this,nn,Ei).call(this,l);return t.promise.then(()=>d(t.data)),null}const Z=a(this,iU)[l];if(!Z||Z.data===Ta)throw new Error(`Requesting object that isn't resolved yet ${l}.`);return Z.data}has(l){const d=a(this,iU)[l];return!!d&&d.data!==Ta}delete(l){const d=a(this,iU)[l];return!d||d.data===Ta?!1:(delete a(this,iU)[l],!0)}resolve(l,d=null){const Z=h(this,nn,Ei).call(this,l);Z.data=d,Z.resolve()}clear(){var l;for(const d in a(this,iU)){const{data:Z}=a(this,iU)[d];(l=Z==null?void 0:Z.bitmap)==null||l.close()}R(this,iU,Object.create(null))}*[Symbol.iterator](){for(const l in a(this,iU)){const{data:d}=a(this,iU)[l];d!==Ta&&(yield[l,d])}}}iU=new WeakMap,nn=new WeakSet,Ei=function(U){var l;return(l=a(this,iU))[U]||(l[U]={...Promise.withResolvers(),data:Ta})};var FF;class GM{constructor(l){b(this,FF,null),R(this,FF,l),this.onContinue=null}get promise(){return a(this,FF).capability.promise}cancel(l=0){a(this,FF).cancel(null,l)}get separateAnnots(){const{separateAnnots:l}=a(this,FF).operatorList;if(!l)return!1;const{annotationCanvasMap:d}=a(this,FF);return l.form||l.canvas&&(d==null?void 0:d.size)>0}}FF=new WeakMap;var cF,_0;const De=class Xa{constructor({callback:l,params:d,objs:Z,commonObjs:t,annotationCanvasMap:F,operatorList:c,pageIndex:W,canvasFactory:s,filterFactory:n,useRequestAnimationFrame:V=!1,pdfBug:Q=!1,pageColors:i=null}){b(this,cF,null),this.callback=l,this.params=d,this.objs=Z,this.commonObjs=t,this.annotationCanvasMap=F,this.operatorListIdx=null,this.operatorList=c,this._pageIndex=W,this.canvasFactory=s,this.filterFactory=n,this._pdfBug=Q,this.pageColors=i,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=V===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new GM(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=d.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:l=!1,optionalContentConfig:d}){var Z,t;if(this.cancelled)return;if(this._canvas){if(a(Xa,_0).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");a(Xa,_0).add(this._canvas)}this._pdfBug&&(Z=globalThis.StepperManager)!=null&&Z.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:F,viewport:c,transform:W,background:s}=this.params;this.gfx=new tn(F,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:d},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:W,viewport:c,transparency:l,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(t=this.graphicsReadyCallback)==null||t.call(this)}cancel(l=null,d=0){var Z;this.running=!1,this.cancelled=!0,(Z=this.gfx)==null||Z.endDrawing(),a(this,cF)&&(window.cancelAnimationFrame(a(this,cF)),R(this,cF,null)),a(Xa,_0).delete(this._canvas),this.callback(l||new DR(`Rendering cancelled, page ${this._pageIndex+1}`,d))}operatorListChanged(){var l;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(l=this.stepper)==null||l.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?R(this,cF,window.requestAnimationFrame(()=>{R(this,cF,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),a(Xa,_0).delete(this._canvas),this.callback())))}};cF=new WeakMap,_0=new WeakMap,b(De,_0,new WeakSet);let SM=De;const TM="4.10.38",XM="f9bea397f";nl(670);function rN(U){return Math.floor(Math.max(0,Math.min(1,U))*255).toString(16).padStart(2,"0")}function gc(U){return Math.max(0,Math.min(255,255*U))}class xN{static CMYK_G([l,d,Z,t]){return["G",1-Math.min(1,.3*l+.59*Z+.11*d+t)]}static G_CMYK([l]){return["CMYK",0,0,0,1-l]}static G_RGB([l]){return["RGB",l,l,l]}static G_rgb([l]){return l=gc(l),[l,l,l]}static G_HTML([l]){const d=rN(l);return`#${d}${d}${d}`}static RGB_G([l,d,Z]){return["G",.3*l+.59*d+.11*Z]}static RGB_rgb(l){return l.map(gc)}static RGB_HTML(l){return`#${l.map(rN).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([l,d,Z,t]){return["RGB",1-Math.min(1,l+t),1-Math.min(1,Z+t),1-Math.min(1,d+t)]}static CMYK_rgb([l,d,Z,t]){return[gc(1-Math.min(1,l+t)),gc(1-Math.min(1,Z+t)),gc(1-Math.min(1,d+t))]}static CMYK_HTML(l){const d=this.CMYK_RGB(l).slice(1);return this.RGB_HTML(d)}static RGB_CMYK([l,d,Z]){const t=1-l,F=1-d,c=1-Z,W=Math.min(t,F,c);return["CMYK",t,F,c,W]}}class pM{create(l,d,Z=!1){if(l<=0||d<=0)throw new Error("Invalid SVG dimensions");const t=this._createSVG("svg:svg");return t.setAttribute("version","1.1"),Z||(t.setAttribute("width",`${l}px`),t.setAttribute("height",`${d}px`)),t.setAttribute("preserveAspectRatio","none"),t.setAttribute("viewBox",`0 0 ${l} ${d}`),t}createElement(l){if(typeof l!="string")throw new Error("Invalid SVG element type");return this._createSVG(l)}_createSVG(l){Gl("Abstract method `_createSVG` called.")}}let jR=class extends pM{_createSVG(U){return document.createElementNS(VZ,U)}},Ee=class{static setupStorage(U,l,d,Z,t){const F=Z.getValue(l,{value:null});switch(d.name){case"textarea":if(F.value!==null&&(U.textContent=F.value),t==="print")break;U.addEventListener("input",c=>{Z.setValue(l,{value:c.target.value})});break;case"input":if(d.attributes.type==="radio"||d.attributes.type==="checkbox"){if(F.value===d.attributes.xfaOn?U.setAttribute("checked",!0):F.value===d.attributes.xfaOff&&U.removeAttribute("checked"),t==="print")break;U.addEventListener("change",c=>{Z.setValue(l,{value:c.target.checked?c.target.getAttribute("xfaOn"):c.target.getAttribute("xfaOff")})})}else{if(F.value!==null&&U.setAttribute("value",F.value),t==="print")break;U.addEventListener("input",c=>{Z.setValue(l,{value:c.target.value})})}break;case"select":if(F.value!==null){U.setAttribute("value",F.value);for(const c of d.children)c.attributes.value===F.value?c.attributes.selected=!0:c.attributes.hasOwnProperty("selected")&&delete c.attributes.selected}U.addEventListener("input",c=>{const W=c.target.options,s=W.selectedIndex===-1?"":W[W.selectedIndex].value;Z.setValue(l,{value:s})});break}}static setAttributes({html:U,element:l,storage:d=null,intent:Z,linkService:t}){const{attributes:F}=l,c=U instanceof HTMLAnchorElement;F.type==="radio"&&(F.name=`${F.name}-${Z}`);for(const[W,s]of Object.entries(F))if(s!=null)switch(W){case"class":s.length&&U.setAttribute(W,s.join(" "));break;case"dataId":break;case"id":U.setAttribute("data-element-id",s);break;case"style":Object.assign(U.style,s);break;case"textContent":U.textContent=s;break;default:(!c||W!=="href"&&W!=="newWindow")&&U.setAttribute(W,s)}c&&t.addLinkAttributes(U,F.href,F.newWindow),d&&F.dataId&&this.setupStorage(U,F.dataId,l,d)}static render(U){var l,d;const Z=U.annotationStorage,t=U.linkService,F=U.xfaHtml,c=U.intent||"display",W=document.createElement(F.name);F.attributes&&this.setAttributes({html:W,element:F,intent:c,linkService:t});const s=c!=="richText",n=U.div;if(n.append(W),U.viewport){const i=`matrix(${U.viewport.transform.join(",")})`;n.style.transform=i}s&&n.setAttribute("class","xfaLayer xfaFont");const V=[];if(F.children.length===0){if(F.value){const i=document.createTextNode(F.value);W.append(i),s&&IW.shouldBuildText(F.name)&&V.push(i)}return{textDivs:V}}const Q=[[F,-1,W]];for(;Q.length>0;){const[i,N,e]=Q.at(-1);if(N+1===i.children.length){Q.pop();continue}const m=i.children[++Q.at(-1)[1]];if(m===null)continue;const{name:M}=m;if(M==="#text"){const S=document.createTextNode(m.value);V.push(S),e.append(S);continue}const J=(l=m==null?void 0:m.attributes)!=null&&l.xmlns?document.createElementNS(m.attributes.xmlns,M):document.createElement(M);if(e.append(J),m.attributes&&this.setAttributes({html:J,element:m,storage:Z,intent:c,linkService:t}),((d=m.children)==null?void 0:d.length)>0)Q.push([m,-1,J]);else if(m.value){const S=document.createTextNode(m.value);s&&IW.shouldBuildText(M)&&V.push(S),J.append(S)}}for(const i of n.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))i.setAttribute("readOnly",!0);return{textDivs:V}}static update(U){const l=`matrix(${U.viewport.transform.join(",")})`;U.div.style.transform=l,U.div.hidden=!1}};const rW=1e3,uM=9,CF=new WeakSet;function ot(U){return{width:U[2]-U[0],height:U[3]-U[1]}}class YM{static create(l){switch(l.data.annotationType){case ld.LINK:return new xe(l);case ld.TEXT:return new oM(l);case ld.WIDGET:switch(l.data.fieldType){case"Tx":return new yM(l);case"Btn":return l.data.radioButton?new je(l):l.data.checkBox?new zM(l):new LM(l);case"Ch":return new IM(l);case"Sig":return new kM(l)}return new rF(l);case ld.POPUP:return new Ci(l);case ld.FREETEXT:return new Ke(l);case ld.LINE:return new EM(l);case ld.SQUARE:return new wM(l);case ld.CIRCLE:return new CM(l);case ld.POLYLINE:return new ve(l);case ld.CARET:return new xM(l);case ld.INK:return new OR(l);case ld.POLYGON:return new rM(l);case ld.HIGHLIGHT:return new He(l);case ld.UNDERLINE:return new jM(l);case ld.SQUIGGLY:return new OM(l);case ld.STRIKEOUT:return new gM(l);case ld.STAMP:return new Pe(l);case ld.FILEATTACHMENT:return new KM(l);default:return new Zd(l)}}}var aF,pa,ua,Vn,wi;const BM=class we{constructor(l,{isRenderable:d=!1,ignoreBorder:Z=!1,createQuadrilaterals:t=!1}={}){b(this,Vn),b(this,aF,null),b(this,pa,!1),b(this,ua,null),this.isRenderable=d,this.data=l.data,this.layer=l.layer,this.linkService=l.linkService,this.downloadManager=l.downloadManager,this.imageResourcesPath=l.imageResourcesPath,this.renderForms=l.renderForms,this.svgFactory=l.svgFactory,this.annotationStorage=l.annotationStorage,this.enableScripting=l.enableScripting,this.hasJSActions=l.hasJSActions,this._fieldObjects=l.fieldObjects,this.parent=l.parent,d&&(this.container=this._createContainer(Z)),t&&this._createQuadrilaterals()}static _hasPopupData({titleObj:l,contentsObj:d,richText:Z}){return!!(l!=null&&l.str||d!=null&&d.str||Z!=null&&Z.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return we._hasPopupData(this.data)}updateEdited(l){var d;if(!this.container)return;a(this,aF)||R(this,aF,{rect:this.data.rect.slice(0)});const{rect:Z}=l;Z&&h(this,Vn,wi).call(this,Z),(d=a(this,ua))==null||d.popup.updateEdited(l)}resetEdited(){var l;a(this,aF)&&(h(this,Vn,wi).call(this,a(this,aF).rect),(l=a(this,ua))==null||l.popup.resetEdited(),R(this,aF,null))}_createContainer(l){const{data:d,parent:{page:Z,viewport:t}}=this,F=document.createElement("section");F.setAttribute("data-annotation-id",d.id),this instanceof rF||(F.tabIndex=rW);const{style:c}=F;if(c.zIndex=this.parent.zIndex++,d.alternativeText&&(F.title=d.alternativeText),d.noRotate&&F.classList.add("norotate"),!d.rect||this instanceof Ci){const{rotation:m}=d;return!d.hasOwnCanvas&&m!==0&&this.setRotation(m,F),F}const{width:W,height:s}=ot(d.rect);if(!l&&d.borderStyle.width>0){c.borderWidth=`${d.borderStyle.width}px`;const m=d.borderStyle.horizontalCornerRadius,M=d.borderStyle.verticalCornerRadius;if(m>0||M>0){const S=`calc(${m}px * var(--scale-factor)) / calc(${M}px * var(--scale-factor))`;c.borderRadius=S}else if(this instanceof je){const S=`calc(${W}px * var(--scale-factor)) / calc(${s}px * var(--scale-factor))`;c.borderRadius=S}switch(d.borderStyle.style){case Xc.SOLID:c.borderStyle="solid";break;case Xc.DASHED:c.borderStyle="dashed";break;case Xc.BEVELED:dl("Unimplemented border style: beveled");break;case Xc.INSET:dl("Unimplemented border style: inset");break;case Xc.UNDERLINE:c.borderBottomStyle="solid";break}const J=d.borderColor||null;J?(R(this,pa,!0),c.borderColor=O.makeHexColor(J[0]|0,J[1]|0,J[2]|0)):c.borderWidth=0}const n=O.normalizeRect([d.rect[0],Z.view[3]-d.rect[1]+Z.view[1],d.rect[2],Z.view[3]-d.rect[3]+Z.view[1]]),{pageWidth:V,pageHeight:Q,pageX:i,pageY:N}=t.rawDims;c.left=`${100*(n[0]-i)/V}%`,c.top=`${100*(n[1]-N)/Q}%`;const{rotation:e}=d;return d.hasOwnCanvas||e===0?(c.width=`${100*W/V}%`,c.height=`${100*s/Q}%`):this.setRotation(e,F),F}setRotation(l,d=this.container){if(!this.data.rect)return;const{pageWidth:Z,pageHeight:t}=this.parent.viewport.rawDims,{width:F,height:c}=ot(this.data.rect);let W,s;l%180===0?(W=100*F/Z,s=100*c/t):(W=100*c/Z,s=100*F/t),d.style.width=`${W}%`,d.style.height=`${s}%`,d.setAttribute("data-main-rotation",(360-l)%360)}get _commonActions(){const l=(d,Z,t)=>{const F=t.detail[d],c=F[0],W=F.slice(1);t.target.style[Z]=xN[`${c}_HTML`](W),this.annotationStorage.setValue(this.data.id,{[Z]:xN[`${c}_rgb`](W)})};return tl(this,"_commonActions",{display:d=>{const{display:Z}=d.detail,t=Z%2===1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:t,noPrint:Z===1||Z===2})},print:d=>{this.annotationStorage.setValue(this.data.id,{noPrint:!d.detail.print})},hidden:d=>{const{hidden:Z}=d.detail;this.container.style.visibility=Z?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:Z,noView:Z})},focus:d=>{setTimeout(()=>d.target.focus({preventScroll:!1}),0)},userName:d=>{d.target.title=d.detail.userName},readonly:d=>{d.target.disabled=d.detail.readonly},required:d=>{this._setRequired(d.target,d.detail.required)},bgColor:d=>{l("bgColor","backgroundColor",d)},fillColor:d=>{l("fillColor","backgroundColor",d)},fgColor:d=>{l("fgColor","color",d)},textColor:d=>{l("textColor","color",d)},borderColor:d=>{l("borderColor","borderColor",d)},strokeColor:d=>{l("strokeColor","borderColor",d)},rotation:d=>{const Z=d.detail.rotation;this.setRotation(Z),this.annotationStorage.setValue(this.data.id,{rotation:Z})}})}_dispatchEventFromSandbox(l,d){const Z=this._commonActions;for(const t of Object.keys(d.detail)){const F=l[t]||Z[t];F==null||F(d)}}_setDefaultPropertiesFromJS(l){if(!this.enableScripting)return;const d=this.annotationStorage.getRawValue(this.data.id);if(!d)return;const Z=this._commonActions;for(const[t,F]of Object.entries(d)){const c=Z[t];if(c){const W={detail:{[t]:F},target:l};c(W),delete d[t]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:l}=this.data;if(!l)return;const[d,Z,t,F]=this.data.rect.map(m=>Math.fround(m));if(l.length===8){const[m,M,J,S]=l.subarray(2,6);if(t===m&&F===M&&d===J&&Z===S)return}const{style:c}=this.container;let W;if(a(this,pa)){const{borderColor:m,borderWidth:M}=c;c.borderWidth=0,W=["url('data:image/svg+xml;utf8,",'')"),c.backgroundImage=W.join("")),this.container.append(Q),this.container.style.clipPath=`url(#${e})`}_createPopup(){const{data:l}=this,d=R(this,ua,new Ci({data:{color:l.color,titleObj:l.titleObj,modificationDate:l.modificationDate,contentsObj:l.contentsObj,richText:l.richText,parentRect:l.rect,borderStyle:0,id:`popup_${l.id}`,rotation:l.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(d.render())}render(){Gl("Abstract method `AnnotationElement.render` called")}_getElementsByName(l,d=null){const Z=[];if(this._fieldObjects){const t=this._fieldObjects[l];if(t)for(const{page:F,id:c,exportValues:W}of t){if(F===-1||c===d)continue;const s=typeof W=="string"?W:null,n=document.querySelector(`[data-element-id="${c}"]`);if(n&&!CF.has(n)){dl(`_getElementsByName - element not allowed: ${c}`);continue}Z.push({id:c,exportValue:s,domElement:n})}return Z}for(const t of document.getElementsByName(l)){const{exportValue:F}=t,c=t.getAttribute("data-element-id");c!==d&&CF.has(t)&&Z.push({id:c,exportValue:F,domElement:t})}return Z}show(){var l;this.container&&(this.container.hidden=!1),(l=this.popup)==null||l.maybeShow()}hide(){var l;this.container&&(this.container.hidden=!0),(l=this.popup)==null||l.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const l=this.getElementsToTriggerPopup();if(Array.isArray(l))for(const d of l)d.classList.add("highlightArea");else l.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:l,data:{id:d}}=this;this.container.addEventListener("dblclick",()=>{var Z;(Z=this.linkService.eventBus)==null||Z.dispatch("switchannotationeditormode",{source:this,mode:l,editId:d})})}};aF=new WeakMap,pa=new WeakMap,ua=new WeakMap,Vn=new WeakSet,wi=function(U){const{container:{style:l},data:{rect:d,rotation:Z},parent:{viewport:{rawDims:{pageWidth:t,pageHeight:F,pageX:c,pageY:W}}}}=this;d==null||d.splice(0,4,...U);const{width:s,height:n}=ot(U);l.left=`${100*(U[0]-c)/t}%`,l.top=`${100*(F-U[3]+W)/F}%`,Z===0?(l.width=`${100*s/t}%`,l.height=`${100*n/F}%`):this.setRotation(Z)};let Zd=BM;var _U,kF,Ce,re;class xe extends Zd{constructor(l,d=null){super(l,{isRenderable:!0,ignoreBorder:!!(d!=null&&d.ignoreBorder),createQuadrilaterals:!0}),b(this,_U),this.isTooltipOnly=l.data.isTooltipOnly}render(){const{data:l,linkService:d}=this,Z=document.createElement("a");Z.setAttribute("data-element-id",l.id);let t=!1;return l.url?(d.addLinkAttributes(Z,l.url,l.newWindow),t=!0):l.action?(this._bindNamedAction(Z,l.action),t=!0):l.attachment?(h(this,_U,Ce).call(this,Z,l.attachment,l.attachmentDest),t=!0):l.setOCGState?(h(this,_U,re).call(this,Z,l.setOCGState),t=!0):l.dest?(this._bindLink(Z,l.dest),t=!0):(l.actions&&(l.actions.Action||l.actions["Mouse Up"]||l.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(Z,l),t=!0),l.resetForm?(this._bindResetFormAction(Z,l.resetForm),t=!0):this.isTooltipOnly&&!t&&(this._bindLink(Z,""),t=!0)),this.container.classList.add("linkAnnotation"),t&&this.container.append(Z),this.container}_bindLink(l,d){l.href=this.linkService.getDestinationHash(d),l.onclick=()=>(d&&this.linkService.goToDestination(d),!1),(d||d==="")&&h(this,_U,kF).call(this)}_bindNamedAction(l,d){l.href=this.linkService.getAnchorUrl(""),l.onclick=()=>(this.linkService.executeNamedAction(d),!1),h(this,_U,kF).call(this)}_bindJSAction(l,d){l.href=this.linkService.getAnchorUrl("");const Z=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const t of Object.keys(d.actions)){const F=Z.get(t);F&&(l[F]=()=>{var c;return(c=this.linkService.eventBus)==null||c.dispatch("dispatcheventinsandbox",{source:this,detail:{id:d.id,name:t}}),!1})}l.onclick||(l.onclick=()=>!1),h(this,_U,kF).call(this)}_bindResetFormAction(l,d){const Z=l.onclick;if(Z||(l.href=this.linkService.getAnchorUrl("")),h(this,_U,kF).call(this),!this._fieldObjects){dl('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),Z||(l.onclick=()=>!1);return}l.onclick=()=>{var t;Z==null||Z();const{fields:F,refs:c,include:W}=d,s=[];if(F.length!==0||c.length!==0){const Q=new Set(c);for(const i of F){const N=this._fieldObjects[i]||[];for(const{id:e}of N)Q.add(e)}for(const i of Object.values(this._fieldObjects))for(const N of i)Q.has(N.id)===W&&s.push(N)}else for(const Q of Object.values(this._fieldObjects))s.push(...Q);const n=this.annotationStorage,V=[];for(const Q of s){const{id:i}=Q;switch(V.push(i),Q.type){case"text":{const e=Q.defaultValue||"";n.setValue(i,{value:e});break}case"checkbox":case"radiobutton":{const e=Q.defaultValue===Q.exportValues;n.setValue(i,{value:e});break}case"combobox":case"listbox":{const e=Q.defaultValue||"";n.setValue(i,{value:e});break}default:continue}const N=document.querySelector(`[data-element-id="${i}"]`);if(N){if(!CF.has(N)){dl(`_bindResetFormAction - element not allowed: ${i}`);continue}}else continue;N.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((t=this.linkService.eventBus)==null||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:V,name:"ResetForm"}})),!1}}}_U=new WeakSet,kF=function(){this.container.setAttribute("data-internal-link","")},Ce=function(U,l,d=null){U.href=this.linkService.getAnchorUrl(""),l.description&&(U.title=l.description),U.onclick=()=>{var Z;return(Z=this.downloadManager)==null||Z.openOrDownloadData(l.content,l.filename,d),!1},h(this,_U,kF).call(this)},re=function(U,l){U.href=this.linkService.getAnchorUrl(""),U.onclick=()=>(this.linkService.executeSetOCGState(l),!1),h(this,_U,kF).call(this)};class oM extends Zd{constructor(l){super(l,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const l=document.createElement("img");return l.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",l.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),l.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(l),this.container}}class rF extends Zd{render(){return this.container}showElementAndHideCanvas(l){var d;this.data.hasOwnCanvas&&(((d=l.previousSibling)==null?void 0:d.nodeName)==="CANVAS"&&(l.previousSibling.hidden=!0),l.hidden=!1)}_getKeyModifier(l){return Id.platform.isMac?l.metaKey:l.ctrlKey}_setEventListener(l,d,Z,t,F){Z.includes("mouse")?l.addEventListener(Z,c=>{var W;(W=this.linkService.eventBus)==null||W.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:t,value:F(c),shift:c.shiftKey,modifier:this._getKeyModifier(c)}})}):l.addEventListener(Z,c=>{var W;if(Z==="blur"){if(!d.focused||!c.relatedTarget)return;d.focused=!1}else if(Z==="focus"){if(d.focused)return;d.focused=!0}F&&((W=this.linkService.eventBus)==null||W.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:t,value:F(c)}}))})}_setEventListeners(l,d,Z,t){var F,c,W;for(const[s,n]of Z)(n==="Action"||(F=this.data.actions)!=null&&F[n])&&((n==="Focus"||n==="Blur")&&(d||(d={focused:!1})),this._setEventListener(l,d,s,n,t),n==="Focus"&&!((c=this.data.actions)!=null&&c.Blur)?this._setEventListener(l,d,"blur","Blur",null):n==="Blur"&&!((W=this.data.actions)!=null&&W.Focus)&&this._setEventListener(l,d,"focus","Focus",null))}_setBackgroundColor(l){const d=this.data.backgroundColor||null;l.style.backgroundColor=d===null?"transparent":O.makeHexColor(d[0],d[1],d[2])}_setTextStyle(l){const d=["left","center","right"],{fontColor:Z}=this.data.defaultAppearanceData,t=this.data.defaultAppearanceData.fontSize||uM,F=l.style;let c;const W=2,s=n=>Math.round(10*n)/10;if(this.data.multiLine){const n=Math.abs(this.data.rect[3]-this.data.rect[1]-W),V=Math.round(n/(VQ*t))||1,Q=n/V;c=Math.min(t,s(Q/VQ))}else{const n=Math.abs(this.data.rect[3]-this.data.rect[1]-W);c=Math.min(t,s(n/VQ))}F.fontSize=`calc(${c}px * var(--scale-factor))`,F.color=O.makeHexColor(Z[0],Z[1],Z[2]),this.data.textAlignment!==null&&(F.textAlign=d[this.data.textAlignment])}_setRequired(l,d){d?l.setAttribute("required",!0):l.removeAttribute("required"),l.setAttribute("aria-required",d)}}class yM extends rF{constructor(l){const d=l.renderForms||l.data.hasOwnCanvas||!l.data.hasAppearance&&!!l.data.fieldValue;super(l,{isRenderable:d})}setPropertyOnSiblings(l,d,Z,t){const F=this.annotationStorage;for(const c of this._getElementsByName(l.name,l.id))c.domElement&&(c.domElement[d]=Z),F.setValue(c.id,{[t]:Z})}render(){var l,d;const Z=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let F=null;if(this.renderForms){const c=Z.getValue(t,{value:this.data.fieldValue});let W=c.value||"";const s=Z.getValue(t,{charLimit:this.data.maxLen}).charLimit;s&&W.length>s&&(W=W.slice(0,s));let n=c.formattedValue||((l=this.data.textContent)==null?void 0:l.join(` `))||null;n&&this.data.comb&&(n=n.replaceAll(/\s+/g,""));const V={userValue:W,formattedValue:n,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(F=document.createElement("textarea"),F.textContent=n??W,this.data.doNotScroll&&(F.style.overflowY="hidden")):(F=document.createElement("input"),F.type="text",F.setAttribute("value",n??W),this.data.doNotScroll&&(F.style.overflowX="hidden")),this.data.hasOwnCanvas&&(F.hidden=!0),CF.add(F),F.setAttribute("data-element-id",t),F.disabled=this.data.readOnly,F.name=this.data.fieldName,F.tabIndex=rW,this._setRequired(F,this.data.required),s&&(F.maxLength=s),F.addEventListener("input",i=>{Z.setValue(t,{value:i.target.value}),this.setPropertyOnSiblings(F,"value",i.target.value,"value"),V.formattedValue=null}),F.addEventListener("resetform",i=>{const N=this.data.defaultFieldValue??"";F.value=V.userValue=N,V.formattedValue=null});let Q=i=>{const{formattedValue:N}=V;N!=null&&(i.target.value=N),i.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){F.addEventListener("focus",N=>{var e;if(V.focused)return;const{target:m}=N;V.userValue&&(m.value=V.userValue),V.lastCommittedValue=m.value,V.commitKey=1,(e=this.data.actions)!=null&&e.Focus||(V.focused=!0)}),F.addEventListener("updatefromsandbox",N=>{this.showElementAndHideCanvas(N.target);const e={value(m){V.userValue=m.detail.value??"",Z.setValue(t,{value:V.userValue.toString()}),m.target.value=V.userValue},formattedValue(m){const{formattedValue:M}=m.detail;V.formattedValue=M,M!=null&&m.target!==document.activeElement&&(m.target.value=M),Z.setValue(t,{formattedValue:M})},selRange(m){m.target.setSelectionRange(...m.detail.selRange)},charLimit:m=>{var M;const{charLimit:J}=m.detail,{target:S}=m;if(J===0){S.removeAttribute("maxLength");return}S.setAttribute("maxLength",J);let G=V.userValue;!G||G.length<=J||(G=G.slice(0,J),S.value=V.userValue=G,Z.setValue(t,{value:G}),(M=this.linkService.eventBus)==null||M.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:G,willCommit:!0,commitKey:1,selStart:S.selectionStart,selEnd:S.selectionEnd}}))}};this._dispatchEventFromSandbox(e,N)}),F.addEventListener("keydown",N=>{var e;V.commitKey=1;let m=-1;if(N.key==="Escape"?m=0:N.key==="Enter"&&!this.data.multiLine?m=2:N.key==="Tab"&&(V.commitKey=3),m===-1)return;const{value:M}=N.target;V.lastCommittedValue!==M&&(V.lastCommittedValue=M,V.userValue=M,(e=this.linkService.eventBus)==null||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:M,willCommit:!0,commitKey:m,selStart:N.target.selectionStart,selEnd:N.target.selectionEnd}}))});const i=Q;Q=null,F.addEventListener("blur",N=>{var e,m;if(!V.focused||!N.relatedTarget)return;(e=this.data.actions)!=null&&e.Blur||(V.focused=!1);const{value:M}=N.target;V.userValue=M,V.lastCommittedValue!==M&&((m=this.linkService.eventBus)==null||m.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:M,willCommit:!0,commitKey:V.commitKey,selStart:N.target.selectionStart,selEnd:N.target.selectionEnd}})),i(N)}),(d=this.data.actions)!=null&&d.Keystroke&&F.addEventListener("beforeinput",N=>{var e;V.lastCommittedValue=null;const{data:m,target:M}=N,{value:J,selectionStart:S,selectionEnd:G}=M;let T=S,p=G;switch(N.inputType){case"deleteWordBackward":{const u=J.substring(0,S).match(/\w*[^\w]*$/);u&&(T-=u[0].length);break}case"deleteWordForward":{const u=J.substring(S).match(/^[^\w]*\w*/);u&&(p+=u[0].length);break}case"deleteContentBackward":S===G&&(T-=1);break;case"deleteContentForward":S===G&&(p+=1);break}N.preventDefault(),(e=this.linkService.eventBus)==null||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:J,change:m||"",willCommit:!1,selStart:T,selEnd:p}})}),this._setEventListeners(F,V,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],N=>N.target.value)}if(Q&&F.addEventListener("blur",Q),this.data.comb){const i=(this.data.rect[2]-this.data.rect[0])/s;F.classList.add("comb"),F.style.letterSpacing=`calc(${i}px * var(--scale-factor) - 1ch)`}}else F=document.createElement("div"),F.textContent=this.data.fieldValue,F.style.verticalAlign="middle",F.style.display="table-cell",this.data.hasOwnCanvas&&(F.hidden=!0);return this._setTextStyle(F),this._setBackgroundColor(F),this._setDefaultPropertiesFromJS(F),this.container.append(F),this.container}}class kM extends rF{constructor(l){super(l,{isRenderable:!!l.data.hasOwnCanvas})}}class zM extends rF{constructor(l){super(l,{isRenderable:l.renderForms})}render(){const l=this.annotationStorage,d=this.data,Z=d.id;let t=l.getValue(Z,{value:d.exportValue===d.fieldValue}).value;typeof t=="string"&&(t=t!=="Off",l.setValue(Z,{value:t})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const F=document.createElement("input");return CF.add(F),F.setAttribute("data-element-id",Z),F.disabled=d.readOnly,this._setRequired(F,this.data.required),F.type="checkbox",F.name=d.fieldName,t&&F.setAttribute("checked",!0),F.setAttribute("exportValue",d.exportValue),F.tabIndex=rW,F.addEventListener("change",c=>{const{name:W,checked:s}=c.target;for(const n of this._getElementsByName(W,Z)){const V=s&&n.exportValue===d.exportValue;n.domElement&&(n.domElement.checked=V),l.setValue(n.id,{value:V})}l.setValue(Z,{value:s})}),F.addEventListener("resetform",c=>{const W=d.defaultFieldValue||"Off";c.target.checked=W===d.exportValue}),this.enableScripting&&this.hasJSActions&&(F.addEventListener("updatefromsandbox",c=>{const W={value(s){s.target.checked=s.detail.value!=="Off",l.setValue(Z,{value:s.target.checked})}};this._dispatchEventFromSandbox(W,c)}),this._setEventListeners(F,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],c=>c.target.checked)),this._setBackgroundColor(F),this._setDefaultPropertiesFromJS(F),this.container.append(F),this.container}}class je extends rF{constructor(l){super(l,{isRenderable:l.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const l=this.annotationStorage,d=this.data,Z=d.id;let t=l.getValue(Z,{value:d.fieldValue===d.buttonValue}).value;if(typeof t=="string"&&(t=t!==d.buttonValue,l.setValue(Z,{value:t})),t)for(const c of this._getElementsByName(d.fieldName,Z))l.setValue(c.id,{value:!1});const F=document.createElement("input");if(CF.add(F),F.setAttribute("data-element-id",Z),F.disabled=d.readOnly,this._setRequired(F,this.data.required),F.type="radio",F.name=d.fieldName,t&&F.setAttribute("checked",!0),F.tabIndex=rW,F.addEventListener("change",c=>{const{name:W,checked:s}=c.target;for(const n of this._getElementsByName(W,Z))l.setValue(n.id,{value:!1});l.setValue(Z,{value:s})}),F.addEventListener("resetform",c=>{const W=d.defaultFieldValue;c.target.checked=W!=null&&W===d.buttonValue}),this.enableScripting&&this.hasJSActions){const c=d.buttonValue;F.addEventListener("updatefromsandbox",W=>{const s={value:n=>{const V=c===n.detail.value;for(const Q of this._getElementsByName(n.target.name)){const i=V&&Q.id===Z;Q.domElement&&(Q.domElement.checked=i),l.setValue(Q.id,{value:i})}}};this._dispatchEventFromSandbox(s,W)}),this._setEventListeners(F,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],W=>W.target.checked)}return this._setBackgroundColor(F),this._setDefaultPropertiesFromJS(F),this.container.append(F),this.container}}class LM extends xe{constructor(l){super(l,{ignoreBorder:l.data.hasAppearance})}render(){const l=super.render();l.classList.add("buttonWidgetAnnotation","pushButton");const d=l.lastChild;return this.enableScripting&&this.hasJSActions&&d&&(this._setDefaultPropertiesFromJS(d),d.addEventListener("updatefromsandbox",Z=>{this._dispatchEventFromSandbox({},Z)})),l}}class IM extends rF{constructor(l){super(l,{isRenderable:l.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const l=this.annotationStorage,d=this.data.id,Z=l.getValue(d,{value:this.data.fieldValue}),t=document.createElement("select");CF.add(t),t.setAttribute("data-element-id",d),t.disabled=this.data.readOnly,this._setRequired(t,this.data.required),t.name=this.data.fieldName,t.tabIndex=rW;let F=this.data.combo&&this.data.options.length>0;this.data.combo||(t.size=this.data.options.length,this.data.multiSelect&&(t.multiple=!0)),t.addEventListener("resetform",V=>{const Q=this.data.defaultFieldValue;for(const i of t.options)i.selected=i.value===Q});for(const V of this.data.options){const Q=document.createElement("option");Q.textContent=V.displayValue,Q.value=V.exportValue,Z.value.includes(V.exportValue)&&(Q.setAttribute("selected",!0),F=!1),t.append(Q)}let c=null;if(F){const V=document.createElement("option");V.value=" ",V.setAttribute("hidden",!0),V.setAttribute("selected",!0),t.prepend(V),c=()=>{V.remove(),t.removeEventListener("input",c),c=null},t.addEventListener("input",c)}const W=V=>{const Q=V?"value":"textContent",{options:i,multiple:N}=t;return N?Array.prototype.filter.call(i,e=>e.selected).map(e=>e[Q]):i.selectedIndex===-1?null:i[i.selectedIndex][Q]};let s=W(!1);const n=V=>{const Q=V.target.options;return Array.prototype.map.call(Q,i=>({displayValue:i.textContent,exportValue:i.value}))};return this.enableScripting&&this.hasJSActions?(t.addEventListener("updatefromsandbox",V=>{const Q={value(i){c==null||c();const N=i.detail.value,e=new Set(Array.isArray(N)?N:[N]);for(const m of t.options)m.selected=e.has(m.value);l.setValue(d,{value:W(!0)}),s=W(!1)},multipleSelection(i){t.multiple=!0},remove(i){const N=t.options,e=i.detail.remove;N[e].selected=!1,t.remove(e),N.length>0&&Array.prototype.findIndex.call(N,m=>m.selected)===-1&&(N[0].selected=!0),l.setValue(d,{value:W(!0),items:n(i)}),s=W(!1)},clear(i){for(;t.length!==0;)t.remove(0);l.setValue(d,{value:null,items:[]}),s=W(!1)},insert(i){const{index:N,displayValue:e,exportValue:m}=i.detail.insert,M=t.children[N],J=document.createElement("option");J.textContent=e,J.value=m,M?M.before(J):t.append(J),l.setValue(d,{value:W(!0),items:n(i)}),s=W(!1)},items(i){const{items:N}=i.detail;for(;t.length!==0;)t.remove(0);for(const e of N){const{displayValue:m,exportValue:M}=e,J=document.createElement("option");J.textContent=m,J.value=M,t.append(J)}t.options.length>0&&(t.options[0].selected=!0),l.setValue(d,{value:W(!0),items:n(i)}),s=W(!1)},indices(i){const N=new Set(i.detail.indices);for(const e of i.target.options)e.selected=N.has(e.index);l.setValue(d,{value:W(!0)}),s=W(!1)},editable(i){i.target.disabled=!i.detail.editable}};this._dispatchEventFromSandbox(Q,V)}),t.addEventListener("input",V=>{var Q;const i=W(!0),N=W(!1);l.setValue(d,{value:i}),V.preventDefault(),(Q=this.linkService.eventBus)==null||Q.dispatch("dispatcheventinsandbox",{source:this,detail:{id:d,name:"Keystroke",value:s,change:N,changeEx:i,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(t,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],V=>V.target.value)):t.addEventListener("input",function(V){l.setValue(d,{value:W(!0)})}),this.data.combo&&this._setTextStyle(t),this._setBackgroundColor(t),this._setDefaultPropertiesFromJS(t),this.container.append(t),this.container}}class Ci extends Zd{constructor(l){const{data:d,elements:Z}=l;super(l,{isRenderable:Zd._hasPopupData(d)}),this.elements=Z,this.popup=null}render(){this.container.classList.add("popupAnnotation");const l=this.popup=new DM({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),d=[];for(const Z of this.elements)Z.popup=l,Z.container.ariaHasPopup="dialog",d.push(Z.data.id),Z.addHighlightArea();return this.container.setAttribute("aria-controls",d.map(Z=>`${IR}${Z}`).join(",")),this.container}}var tW,ri,xi,FW,Y0,gl,at,Ya,yV,kV,cW,lt,PU,bt,zV,mt,Qn,WF,B0,Ud,Rn,LQ,jN,Oe,ge,ON,LV,IV,ji;class DM{constructor({container:l,color:d,elements:Z,titleObj:t,modificationDate:F,contentsObj:c,richText:W,parent:s,rect:n,parentRect:V,open:Q}){b(this,Ud),b(this,tW,h(this,Ud,ge).bind(this)),b(this,ri,h(this,Ud,ji).bind(this)),b(this,xi,h(this,Ud,IV).bind(this)),b(this,FW,h(this,Ud,LV).bind(this)),b(this,Y0,null),b(this,gl,null),b(this,at,null),b(this,Ya,null),b(this,yV,null),b(this,kV,null),b(this,cW,null),b(this,lt,!1),b(this,PU,null),b(this,bt,null),b(this,zV,null),b(this,mt,null),b(this,Qn,null),b(this,WF,null),b(this,B0,!1);var i;R(this,gl,l),R(this,Qn,t),R(this,at,c),R(this,mt,W),R(this,kV,s),R(this,Y0,d),R(this,zV,n),R(this,cW,V),R(this,yV,Z),R(this,Ya,Hh.toDateObject(F)),this.trigger=Z.flatMap(N=>N.getElementsToTriggerPopup());for(const N of this.trigger)N.addEventListener("click",a(this,FW)),N.addEventListener("mouseenter",a(this,xi)),N.addEventListener("mouseleave",a(this,ri)),N.classList.add("popupTriggerArea");for(const N of Z)(i=N.container)==null||i.addEventListener("keydown",a(this,tW));a(this,gl).hidden=!0,Q&&h(this,Ud,LV).call(this)}render(){if(a(this,PU))return;const l=R(this,PU,document.createElement("div"));if(l.className="popup",a(this,Y0)){const F=l.style.outlineColor=O.makeHexColor(...a(this,Y0));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?l.style.backgroundColor=`color-mix(in srgb, ${F} 30%, white)`:l.style.backgroundColor=O.makeHexColor(...a(this,Y0).map(c=>Math.floor(.7*(255-c)+c)))}const d=document.createElement("span");d.className="header";const Z=document.createElement("h1");if(d.append(Z),{dir:Z.dir,str:Z.textContent}=a(this,Qn),l.append(d),a(this,Ya)){const F=document.createElement("span");F.classList.add("popupDate"),F.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),F.setAttribute("data-l10n-args",JSON.stringify({dateObj:a(this,Ya).valueOf()})),d.append(F)}const t=a(this,Ud,Rn);if(t)Ee.render({xfaHtml:t,intent:"richText",div:l}),l.lastChild.classList.add("richText","popupContent");else{const F=this._formatContents(a(this,at));l.append(F)}a(this,gl).append(l)}_formatContents({str:l,dir:d}){const Z=document.createElement("p");Z.classList.add("popupContent"),Z.dir=d;const t=l.split(/(?:\r\n?|\n)/);for(let F=0,c=t.length;F xSynergy远程协作系统 - - + +