@quoreadmin/ui 0.27.2 → 0.27.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(J,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(J=typeof globalThis<"u"?globalThis:J||self,l(J.QuoreUI={},J.Vue))})(this,function(J,l){"use strict";var Dfe=Object.defineProperty;var Nfe=(J,l,ut)=>l in J?Dfe(J,l,{enumerable:!0,configurable:!0,writable:!0,value:ut}):J[l]=ut;var pe=(J,l,ut)=>(Nfe(J,typeof l!="symbol"?l+"":l,ut),ut),sv=(J,l,ut)=>{if(!l.has(J))throw TypeError("Cannot "+ut)};var g=(J,l,ut)=>(sv(J,l,"read from private field"),ut?ut.call(J):l.get(J)),M=(J,l,ut)=>{if(l.has(J))throw TypeError("Cannot add the same private member more than once");l instanceof WeakSet?l.add(J):l.set(J,ut)},E=(J,l,ut,me)=>(sv(J,l,"write to private field"),me?me.call(J,ut):l.set(J,ut),ut);var Kn=(J,l,ut,me)=>({set _(M5){E(J,l,M5,ut)},get _(){return g(J,l,me)}}),x=(J,l,ut)=>(sv(J,l,"access private method"),ut);var jc,Qy,Ff,av,jf,Sl,Ml,Qr,El,zf,Hf,h3,XD,p3,JD,m3,eN,zc,Xy,g3,tN,Uf,lv,Zf,Al,Tl,y3,nN,b3,rN,w3,iN,v3,Wf,C3,Dr,qf,cv,jt,qs,Kf,zt,KD,k3,oN,Hc,sr,Ot,en,Uc,Eo,Zc,Xr,Ks,Wc,xl,Oi,Jr,Il,Gf,Yf,qc,Qf,Di,Gs,Kc,Ys,Ni,M3,Qs,Xf,Xs,Ol,Jf,eh,Ht,ze,Ao,Dl,th,nh,Js,Pi,To,rh,Gc,Jy,ih,uv,E3,sN,A3,aN,Yc,e5,T3,lN,x3,cN,I3,uN,oh,dv,O3,dN,sh,fv,ah,hv,D3,fN,tn,In,_i,Ia,N3,hN,P3,pN,lh,pv,_3,mN,Nl,K1,ch,mv,Ut,Li,ei,Bi,ar,Xc,Ri,Zn,xo,Pl,$i,Jc,t5,eu,n5,_l,ti,lt,tu,Ll,nn,Bl,ea,uh,Rl,ta,dh,$l,Io,Vi,nu,ru,Pr,fh,L3,hh,gv,ph,yv,mh,bv,B3,gN,R3,yN,gh,wv,yh,vv,bh,Cv,$3,bN,wh,kv,V3,wN,F3,vN,j3,CN,vh,Sv,Vl,G1,Fl,jl,Zt,z3,kN,Ch,iu,kh,Mv,Sh,Ev,Mh,Eh,U3,SN,Z3,MN,ou,r5,zl,Ah,Th,xh,Ih,su,na,Ke,au,lu,Oh,Av,GD,ra,Wn,Dh,Nh,Hl,Oo,Ph,_h,Ul,cu,uu,ia,du,Lh,fu,Zl,Bh,Rh,Wl,ql,oa,hu,W3,EN,q3,AN,$h,Tv,pu,i5,K3,TN,G3,xN,Kl,Gl,Fi,Do,hn,Y3,Yl,qt,mn,sa,ud,aa,dd,mu,o5,la,fd,Q3,IN,Vh,xv,ca,hd,Ql,Y1,Xl,Q1,Fh,Iv,Jl,X1,YD,X3,ua,No,da,pd,gu,s5,e0,ey,ty,t0,n0,yu,a5,bu,l5,Po,ji,wu,vu,zi,r0,J1,ni,jh,Ov,fa,ha,i0,s0,Cu,ku,zh,Dv,_o,B0,ny,ON,ry,DN,Su,iy,oy,Mu,a0,ht,Lo,Eu,Hh,Uh,Au,Bo,ri,Ro,Zh,$o,Wh,l0,c0,Tu,c5,qh,Nv,sy,NN,ay,PN,ly,_N,cy,LN,xu,u5,Iu,d5,Kh,Pv,Gh,Yh,Qh,Xh,Jh,e1,t1,_v,n1,u0,d0,uy,BN,r1,Lv,ii,lr,i1,f0,cr,Ou,dy,RN,fy,$N,hy,VN,Du,f5,Nu,h5,Pu,p5,py,FN,o1,Bv,my,jN,s1,pa,oi,gy,zN,_u,m5,yy,HN,by,UN,a1,Rv,l1,Lu,Hi,Vo,Bu,Ru,Ui,xe,h0,p0,c1,u1,$u,Vu,ma,d1,wy,vy,f1,$v,Fu,m0,jo,h1,ur,p1,bt,g0,ep,y0,tp,Cy,ZN,m1,g1,si,b0,ju,Dt,y1,zu,b1,w1,ai,Hu,v1,Vv,C1,Fv,ky,WN,zo,R0,Sy,qN,Zi,Oa,Uu,k1,ga,w0,Zu,_r,S1,M1,v0,li,En,dr,Wu,C0,Nt,qu,Wi,E1,A1,jv,T1,zv,My,KN,Ey,GN,Ay,YN,x1,Hv,k0,np,ya,md,Ty,QN,Ku,g5,S0,rp,xy,XN,Iy,JN,Oy,eP,Dy,tP,M0,E0,qi,Uo,Lr,A0,T0,x0,Zo,Gu,I0,O0,ba,Ny,nP,Py,rP,_y,iP,Ly,oP,I1,Uv,By,sP,O1,Zv,Ry,aP,$y,lP,Vy,cP,Fy,uP,jy,dP,Wo,$0,D1,Wv,N1,qv,P1,Kv,Yu,y5,Qu,b5,wa,gd,_1,Gv,Xu,w5,zy,fP,L1,Yv,Hy,hP,Uy,pP,B1,Qv,Ju,v5,D0,ip,wt,rn,va,qo,Ca,ed,Ki,Ko,Gi,Br,R1,N0,op,P0,sp,td,C5,$1,Xv,Zy,mP,V1,Jv,F1,e8,nd,k5,Wy,gP,_0,rd,Yi,ka,Go,fr,Sa,id,od,An,Yo,ce,Ma,qy,yP,z1,t8,H1,n8,U1,r8,sd,S5,Qi,Z1,Pt,Ea,W1,i8,q1,o8,Ky,bP;const ut=l.defineComponent({name:"QAccordion",props:{modelValue:{type:[Boolean,Number],default:!1},variant:{type:String,default:"white"},triggerText:{type:String,default:""},triggerClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},chevronClass:{type:[String,Array,Object],default:""}},emits:["update:modelValue"],setup(n,{emit:e,slots:t}){const r=l.computed({get:()=>!!n.modelValue,set:u=>e("update:modelValue",u)}),i=l.computed(()=>!!t.text),o=l.computed(()=>{const u=r.value?"Hide":"Show";return s.value?u:n.triggerText}),s=l.computed(()=>n.variant==="bubble"),a=l.computed(()=>["leading-normal font-bold",{"text-md":n.variant==="white"},{"text-base":n.variant==="gray"},{"flex-grow":n.variant!=="bubble"},{"flex-shrink mr-2 text-gray-40 text-sm":n.variant==="bubble"}]);return{show:r,hasTextSlot:i,triggerTextClasses:a,isBubbleAccordion:s,triggerTextValue:o,onToggle:()=>{r.value=!r.value}}}}),me=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},M5=["value"],vP={key:0,class:"flex-grow border-t border-gray-20"},CP={key:1,class:"flex-grow border-t border-gray-20"};function kP(n,e,t,r,i,o){const s=l.resolveComponent("q-icon");return l.openBlock(),l.createElementBlock("div",{value:n.modelValue,class:l.normalizeClass(["accordion","accordion-"+n.variant,{"is-open":!!n.modelValue}])},[l.renderSlot(n.$slots,"toggle",l.normalizeProps(l.guardReactiveProps({onToggle:n.onToggle})),()=>[l.createElementVNode("div",{class:l.normalizeClass(["accordion-trigger",n.triggerClass,{"py-5":n.isBubbleAccordion}]),onClick:e[0]||(e[0]=(...a)=>n.onToggle&&n.onToggle(...a))},[n.isBubbleAccordion?(l.openBlock(),l.createElementBlock("div",vP)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["flex items-center",{"w-full":!n.isBubbleAccordion},{"border border-gray-20 rounded-full px-8 py-2 w-32":n.isBubbleAccordion}])},[n.hasTextSlot?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(n.triggerTextClasses)},[l.renderSlot(n.$slots,"text",{},void 0,!0)],2)):(l.openBlock(),l.createElementBlock("h4",{key:1,class:l.normalizeClass(n.triggerTextClasses)},l.toDisplayString(n.triggerTextValue),3)),l.renderSlot(n.$slots,"additionalInfo",{},void 0,!0),l.createVNode(s,{icon:"chevron-down",color:"gray-40",size:n.isBubbleAccordion?"sm":"md",type:"",class:l.normalizeClass(["shrink-0 mr-4",n.chevronClass,{open:!!n.show}])},null,8,["size","class"])],2),n.isBubbleAccordion?(l.openBlock(),l.createElementBlock("div",CP)):l.createCommentVNode("",!0)],2)],!0),l.createVNode(l.Transition,{name:"slide-down"},{default:l.withCtx(()=>[n.show?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["accordion-content",n.contentClass,{"p-0":n.variant==="custom"}])},[l.renderSlot(n.$slots,"content",{},void 0,!0)],2)):l.createCommentVNode("",!0)]),_:3})],10,M5)}const SP=me(ut,[["render",kP],["__scopeId","data-v-7b1ba6ce"]]),MP=l.defineComponent({name:"QAvatar",props:{size:{type:String,default:"sm"},text:{type:[String],default:""},bgColor:{type:String,default:"teal-20"},src:{type:String,default:""}},setup(){const n=l.ref(!0),e=l.ref(!1);return{validSrc:n,isLoaded:e,onImageLoad:()=>{e.value=!0},onImageError:()=>{n.value=!1}}}}),EP={class:"avatar-text"},AP=["src"];function TP(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["avatar flex justify-center items-center",[`avatar-${n.size}`,`bg-${n.bgColor}`]])},[l.createElementVNode("span",EP,l.toDisplayString(n.text),1),n.src&&n.validSrc?(l.openBlock(),l.createElementBlock("img",{key:0,class:"avatar-image",src:n.src,onLoad:e[0]||(e[0]=(...s)=>n.onImageLoad&&n.onImageLoad(...s)),onError:e[1]||(e[1]=(...s)=>n.onImageError&&n.onImageError(...s))},null,40,AP)):l.createCommentVNode("",!0)],2)}const u8=me(MP,[["render",TP],["__scopeId","data-v-ebde1d6f"]]),xP=l.defineComponent({props:{backgroundColor:{type:String,default:"blue-20"},textColor:{type:String,default:"white"}}}),IP={class:"banner-text mb-0"};function OP(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["q-banner flex","bg-"+n.backgroundColor,"text-"+n.textColor]),onClick:e[0]||(e[0]=s=>n.$emit("bannerClick"))},[l.createElementVNode("p",IP,[l.renderSlot(n.$slots,"default",{},void 0,!0)])],2)}const DP=me(xP,[["render",OP],["__scopeId","data-v-8edf76be"]]),NP=l.defineComponent({name:"QBadge",props:{color:{type:String,default:""},shape:{type:String,default:"circle"}},setup(n,e){const t=l.computed(function(){return n.color?`bg-${n.color}`:""}),r=l.computed(function(){return!!e.slots.icon});return{bgColor:t,hasIcon:r}}}),PP={key:1,class:"badge-text"};function _P(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["badge",n.shape,n.bgColor])},[n.hasIcon?l.renderSlot(n.$slots,"icon",{key:0},void 0,!0):(l.openBlock(),l.createElementBlock("p",PP,[l.renderSlot(n.$slots,"text",{},void 0,!0)]))],2)}const Da=me(NP,[["render",_P],["__scopeId","data-v-c8e6730f"]]);function LP(){try{return"constructor"in GestureEvent}catch{return!1}}function d8(){return typeof window<"u"&&"ontouchstart"in window}function f8(n){return"pointerId"in n?null:n.type==="touchend"?n.changedTouches:n.targetTouches}function h8(n){return Array.from(f8(n)).map(e=>e.identifier)}function p8(n){const e="buttons"in n?n.buttons:0,{shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}=n;return{buttons:e,shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}}const BP=n=>n;function m8(n,e=BP){const t=f8(n),{clientX:r,clientY:i}=t?t[0]:n;return e([r,i])}function g8(){}function y8(...n){return n.length===0?g8:n.length===1?n[0]:function(){var e;for(let t of n)e=t.apply(this,arguments)||e;return e}}function Jo(n,e){if(n===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");n=e}return Array.isArray(n)?n:[n,n]}function b8(n,...e){return typeof n=="function"?n(...e):n}function yd(n){return{_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:g8,canceled:!1,memo:void 0,args:void 0,...n}}function E5(){const n={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},e=yd({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),t=yd({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=yd({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=yd({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=yd({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:n,drag:e,pinch:t,wheel:r,move:i,scroll:o}}var RP=Object.defineProperty,$P=(n,e,t)=>e in n?RP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,On=(n,e,t)=>($P(n,typeof e!="symbol"?e+"":e,t),t);class VP{constructor(e){this.classes=e,On(this,"nativeRefs"),On(this,"config"),On(this,"handlers"),On(this,"state"),On(this,"timeouts"),On(this,"domListeners"),On(this,"windowListeners"),On(this,"pointerIds",new Set),On(this,"touchIds",new Set),On(this,"supportsTouchEvents",d8()),On(this,"supportsGestureEvents",LP()),On(this,"bind",(...t)=>{const r={};for(let i of this.classes)new i(this,t).addBindings(r);for(let i in this.nativeRefs)fi(r,i,o=>this.nativeRefs[i]({...this.state.shared,event:o,args:t}));return this.config.domTarget?ZP(this,r):WP(this,r)}),On(this,"clean",()=>{const{eventOptions:t,domTarget:r}=this.config,i=l.unref(r);i&&bd(i,w8(this.domListeners),t),Object.values(this.timeouts).forEach(clearTimeout),zP(this)}),On(this,"reset",()=>{this.state=E5()}),this.classes=e,this.state=E5(),this.timeouts={},this.domListeners=[],this.windowListeners={}}}function FP(n,e){"pointerId"in e?n.pointerIds.add(e.pointerId):n.touchIds=new Set(h8(e))}function jP(n,e){"pointerId"in e?n.pointerIds.delete(e.pointerId):h8(e).forEach(t=>n.touchIds.delete(t))}function zP(n){const{config:{window:e,eventOptions:t},windowListeners:r}=n,i=l.unref(e);if(i){for(let o in r){const s=r[o];bd(i,s,t)}n.windowListeners={}}}function HP({config:n,windowListeners:e},t,r=n.eventOptions){const i=l.unref(n.window);i&&(bd(i,e[t],r),delete e[t])}function UP({config:n,windowListeners:e},t,r=[],i=n.eventOptions){const o=l.unref(n.window);o&&(bd(o,e[t],i),v8(o,e[t]=r,i))}function ZP({config:n,domListeners:e},t){const{eventOptions:r,domTarget:i}=n,o=l.unref(i);if(!o)throw new Error("domTarget must be defined");bd(o,w8(e),r);for(let[s,a]of Object.entries(t)){const c=s.slice(2).toLowerCase();e.push([c,y8(...a)])}v8(o,e,r)}function WP({config:n},e){const t={},r=n.eventOptions.capture?"Capture":"";for(let[i,o]of Object.entries(e)){const s=Array.isArray(o)?o:[o],a=i+r;t[a]=y8(...s)}return t}function w8(n=[]){return n.splice(0,n.length)}function fi(n,e,t){n[e]||(n[e]=[]),n[e].push(t)}function v8(n,e=[],t={}){if(n)for(let[r,i]of e)n.addEventListener(r,i,t)}function bd(n,e=[],t={}){if(n)for(let[r,i]of e)n.removeEventListener(r,i,t)}function A5(n,e){return n.map((t,r)=>t+e[r])}function C8(n,e){return n.map((t,r)=>t-e[r])}function T5(n){return Math.hypot(...n)}function qP(n,e,t){const r=T5(e),i=r===0?0:1/r,o=t===0?0:1/t,s=o*r,a=e.map(d=>o*d),c=e.map(d=>i*d),u=T5(n);return{velocities:a,velocity:s,distance:u,direction:c}}function x5(n){return Math.sign?Math.sign(n):+(n>0)-+(n<0)||+n}function KP(n,e,t){return Math.max(e,Math.min(n,t))}function GP(n,e){return Math.pow(n,e*5)}function k8(n,e,t){return e===0||Math.abs(e)===1/0?GP(n,t):n*e*t/(e+t*n)}function S8(n,e,t,r=.15){return r===0?KP(n,e,t):n<e?-k8(e-n,t-e,r)+e:n>t?+k8(n-t,t-e,r)+t:n}var YP=Object.defineProperty,QP=(n,e,t)=>e in n?YP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ap=(n,e,t)=>(QP(n,typeof e!="symbol"?e+"":e,t),t);const Na=new Map,XP=n=>n;class JP{constructor(e,t=[]){this.controller=e,this.args=t,ap(this,"debounced",!0),ap(this,"setTimeout",(r,i=140,...o)=>{clearTimeout(this.controller.timeouts[this.stateKey]),this.controller.timeouts[this.stateKey]=window.setTimeout(r,i,...o)}),ap(this,"clearTimeout",()=>{clearTimeout(this.controller.timeouts[this.stateKey])}),ap(this,"fireGestureHandler",(r=!1)=>{if(this.state._blocked)return this.debounced||(this.state._active=!1,this.clean()),null;if(!r&&!this.state.intentional&&!this.config.triggerAllEvents)return null;if(this.state.intentional){const c=this.state.active,u=this.state._active;this.state.active=u,this.state.first=u&&!c,this.state.last=c&&!u,this.controller.state.shared[this.ingKey]=u}const i=this.controller.pointerIds.size||this.controller.touchIds.size,o=this.controller.state.shared.buttons>0||i>0,s={...this.controller.state.shared,...this.state,...this.mapStateValues(this.state),locked:!!document.pointerLockElement,touches:i,down:o},a=this.handler(s);return this.state.memo=a!==void 0?a:this.state.memo,s}),this.controller=e,this.args=t}get config(){return this.controller.config[this.stateKey]}get enabled(){return this.controller.config.enabled&&this.config.enabled}get state(){return this.controller.state[this.stateKey]}get handler(){return this.controller.handlers[this.stateKey]}get transform(){return this.config.transform||this.controller.config.transform||XP}updateSharedState(e){Object.assign(this.controller.state.shared,e)}updateGestureState(e){Object.assign(this.state,e)}checkIntentionality(e,t){return{_intentional:e,_blocked:!1}}getMovement(e){const{rubberband:t,threshold:r}=this.config,{_bounds:i,_initial:o,_active:s,_intentional:a,lastOffset:c,movement:u}=this.state,d=this.getInternalMovement(e,this.state),f=this.transform(r).map(Math.abs),h=a[0]===!1?M8(d[0],f[0]):a[0],p=a[1]===!1?M8(d[1],f[1]):a[1],m=this.checkIntentionality([h,p],d);if(m._blocked)return{...m,_movement:d,delta:[0,0]};const y=m._intentional,b=d;let w=[y[0]!==!1?d[0]-y[0]:0,y[1]!==!1?d[1]-y[1]:0];const v=A5(w,c),k=s?t:[0,0];return w=E8(i,A5(w,o),k),{...m,intentional:y[0]!==!1||y[1]!==!1,_initial:o,_movement:b,movement:w,values:e,offset:E8(i,v,k),delta:C8(w,u)}}clean(){this.clearTimeout()}}function M8(n,e){return Math.abs(n)>=e?x5(n)*e:!1}function E8(n,[e,t],[r,i]){const[[o,s],[a,c]]=n;return[S8(e,o,s,r),S8(t,a,c,i)]}function I5({state:n},e,t){const{timeStamp:r,type:i}=e,o=n.values,s=t?0:r-n.startTime;return{_lastEventType:i,event:e,timeStamp:r,elapsedTime:s,previous:o}}function e_({state:n,config:e,stateKey:t,args:r},i,o){const s=n.offset,a=o.timeStamp,{initial:c,bounds:u}=e,d={...E5()[t],_active:!0,args:r,values:i,initial:i,offset:s,lastOffset:s,startTime:a};return{...d,_initial:b8(c,d),_bounds:b8(u,d)}}class t_ extends JP{getInternalMovement(e,t){return C8(e,t.initial)}checkIntentionality(e,t){if(e[0]===!1&&e[1]===!1)return{_intentional:e,axis:this.state.axis};const[r,i]=t.map(Math.abs),o=this.state.axis||(r>i?"x":r<i?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:e,_blocked:!1,axis:o}:o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e[o==="x"?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}}getKinematics(e,t){const r=this.getMovement(e);if(!r._blocked){const i=t.timeStamp-this.state.timeStamp;Object.assign(r,qP(r.movement,r.delta,i))}return r}mapStateValues(e){return{xy:e.values,vxvy:e.velocities}}}var n_=Object.defineProperty,r_=(n,e,t)=>e in n?n_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kt=(n,e,t)=>(r_(n,typeof e!="symbol"?e+"":e,t),t);const i_=3;function A8(n){"persist"in n&&typeof n.persist=="function"&&n.persist()}class o_ extends t_{constructor(){super(...arguments),Kt(this,"ingKey","dragging"),Kt(this,"stateKey","drag"),Kt(this,"setPointerCapture",e=>{if(this.config.useTouch||document.pointerLockElement)return;const{target:t,pointerId:r}=e;t&&"setPointerCapture"in t&&t.setPointerCapture(r),this.updateGestureState({_dragTarget:t,_dragPointerId:r})}),Kt(this,"releasePointerCapture",()=>{if(this.config.useTouch||document.pointerLockElement)return;const{_dragTarget:e,_dragPointerId:t}=this.state;if(t&&e&&"releasePointerCapture"in e&&(!("hasPointerCapture"in e)||e.hasPointerCapture(t)))try{e.releasePointerCapture(t)}catch{}}),Kt(this,"preventScroll",e=>{this.state._dragPreventScroll&&e.cancelable&&e.preventDefault()}),Kt(this,"getEventId",e=>this.config.useTouch?e.changedTouches[0].identifier:e.pointerId),Kt(this,"isValidEvent",e=>this.state._pointerId===this.getEventId(e)),Kt(this,"shouldPreventWindowScrollY",this.config.preventWindowScrollY&&this.controller.supportsTouchEvents),Kt(this,"setUpWindowScrollDetection",e=>{A8(e),UP(this.controller,this.stateKey,[["touchmove",this.preventScroll],["touchend",this.clean.bind(this)],["touchcancel",this.clean.bind(this)]],{passive:!1}),this.setTimeout(this.startDrag.bind(this),250,e)}),Kt(this,"setUpDelayedDragTrigger",e=>{this.state._dragDelayed=!0,A8(e),this.setTimeout(this.startDrag.bind(this),this.config.delay,e)}),Kt(this,"setStartState",e=>{const t=m8(e,this.transform);this.updateSharedState(p8(e)),this.updateGestureState({...e_(this,t,e),...I5(this,e,!0),_pointerId:this.getEventId(e)}),this.updateGestureState(this.getMovement(t))}),Kt(this,"onDragStart",e=>{FP(this.controller,e),!(!this.enabled||this.state._active)&&(this.setStartState(e),this.setPointerCapture(e),this.shouldPreventWindowScrollY?this.setUpWindowScrollDetection(e):this.config.delay>0?this.setUpDelayedDragTrigger(e):this.startDrag(e,!0))}),Kt(this,"onDragChange",e=>{if(this.state.canceled||!this.state._active||!this.isValidEvent(e)||this.state._lastEventType===e.type&&e.timeStamp===this.state.timeStamp)return;let t;if(document.pointerLockElement){const{movementX:c,movementY:u}=e;t=A5(this.transform([c,u]),this.state.values)}else t=m8(e,this.transform);const r=this.getKinematics(t,e);if(!this.state._dragStarted){if(this.state._dragDelayed){this.startDrag(e);return}if(this.shouldPreventWindowScrollY)if(!this.state._dragPreventScroll&&r.axis)if(r.axis==="x")this.startDrag(e);else{this.state._active=!1;return}else return;else return}const i=p8(e);this.updateSharedState(i);const o=I5(this,e),s=T5(r._movement);let{_dragIsTap:a}=this.state;a&&s>=i_&&(a=!1),this.updateGestureState({...o,...r,_dragIsTap:a}),this.fireGestureHandler()}),Kt(this,"onDragEnd",e=>{if(jP(this.controller,e),!this.isValidEvent(e)||(this.clean(),!this.state._active))return;this.state._active=!1;const t=this.state._dragIsTap,[r,i]=this.state.velocities,[o,s]=this.state.movement,[a,c]=this.state._intentional,[u,d]=this.config.swipeVelocity,[f,h]=this.config.swipeDistance,p=this.config.swipeDuration,m={...I5(this,e),...this.getMovement(this.state.values)},y=[0,0];m.elapsedTime<p&&(a!==!1&&Math.abs(r)>u&&Math.abs(o)>f&&(y[0]=x5(r)),c!==!1&&Math.abs(i)>d&&Math.abs(s)>h&&(y[1]=x5(i))),this.updateSharedState({buttons:0}),this.updateGestureState({...m,tap:t,swipe:y}),this.fireGestureHandler(this.config.filterTaps&&t===!0)}),Kt(this,"clean",()=>{super.clean(),this.state._dragStarted=!1,this.releasePointerCapture(),HP(this.controller,this.stateKey)}),Kt(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({canceled:!0,_active:!1}),this.updateSharedState({buttons:0}),l.nextTick(this.fireGestureHandler))}),Kt(this,"onClick",e=>{this.state._dragIsTap||e.stopPropagation()})}startDrag(e,t=!1){!this.state._active||this.state._dragStarted||(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())}addBindings(e){if(this.config.useTouch?(fi(e,"onTouchStart",this.onDragStart),fi(e,"onTouchMove",this.onDragChange),fi(e,"onTouchEnd",this.onDragEnd),fi(e,"onTouchCancel",this.onDragEnd)):(fi(e,"onPointerDown",this.onDragStart),fi(e,"onPointerMove",this.onDragChange),fi(e,"onPointerUp",this.onDragEnd),fi(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){const t=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";fi(e,t,this.onClick)}}}function s_(n,e){let t,r=[],i,o=!1;function s(...a){return o&&t===this&&e(a,r)||(i=n.apply(this,a),o=!0,t=this,r=a),i}return s}function lp(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;let t,r,i;if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!lp(n[r],e[r]))return!1;return!0}let o;if(typeof Map=="function"&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=n.entries();!(r=o.next()).done;)if(!lp(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&n instanceof Element)return!1;for(r=t;r--!==0;)if(!(i[r]==="_owner"&&n.$$typeof)&&!lp(n[i[r]],e[i[r]]))return!1;return!0}return n!==n&&e!==e}function a_(n,e){try{return lp(n,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}function O5(n={},e){const t={};for(const[r,i]of Object.entries(e))switch(typeof i){case"function":t[r]=i.call(t,n[r],r,n);break;case"object":t[r]=O5(n[r],i);break;case"boolean":i&&(t[r]=n[r]);break}return t}const l_=180,c_=.15,u_=.5,d_=50,f_=250,T8={...{threshold(n=0){return Jo(n)},rubberband(n=0){switch(n){case!0:return Jo(c_);case!1:return Jo(0);default:return Jo(n)}},enabled(n=!0){return n},triggerAllEvents(n=!1){return n},initial(n=0){return typeof n=="function"?n:Jo(n)},transform:!0},axis:!0,lockDirection(n=!1){return n},bounds(n={}){if(typeof n=="function")return o=>T8.bounds(n(o));const{left:e=-1/0,right:t=1/0,top:r=-1/0,bottom:i=1/0}=n;return[[e,t],[r,i]]}},h_=typeof window<"u"&&window.document&&window.document.createElement,p_={enabled(n=!0){return n},domTarget:!0,window(n=h_?window:void 0){return n},eventOptions({passive:n=!0,capture:e=!1}={}){return{passive:n,capture:e}},transform:!0},m_={...T8,useTouch(n=!0){return n&&d8()},preventWindowScrollY(n=!1){return n},threshold(n,e,{filterTaps:t=!1,lockDirection:r=!1,axis:i=void 0}){const o=Jo(n,t?3:r||i?1:0);return this.filterTaps=t,o},swipeVelocity(n=u_){return Jo(n)},swipeDistance(n=d_){return Jo(n)},swipeDuration(n=f_){return n},delay(n=0){switch(n){case!0:return l_;case!1:return 0;default:return n}}};function g_(n){return O5(n,p_)}function y_(n={}){return O5(n,m_)}function b_({domTarget:n,eventOptions:e,window:t,enabled:r,...i}){const o=g_({domTarget:n,eventOptions:e,window:t,enabled:r});return o.drag=y_(i),o}function w_(n,e,t={}){const r=v_(n),i=new VP(r);return i.config=e,i.handlers=n,i.nativeRefs=t,l.getCurrentInstance()&&!e.manual&&(l.onMounted(i.bind),l.onUnmounted(i.clean)),i}function v_(n){const e=new Set;return n.drag&&e.add(Na.get("drag")),n.wheel&&e.add(Na.get("wheel")),n.scroll&&e.add(Na.get("scroll")),n.move&&e.add(Na.get("move")),n.pinch&&e.add(Na.get("pinch")),n.hover&&e.add(Na.get("hover")),e}function x8(n,e={}){Na.set("drag",o_);const t=l.ref();return t.value||(t.value=s_(b_,a_)),w_({drag:n},t.value(e))}let C_=Symbol("headlessui.useid"),k_=0;function S_(){return l.inject(C_,()=>`${++k_}`)()}function I8(n){var e;if(n==null||n.value==null)return null;let t=(e=n.value.$el)!=null?e:n.value;return t instanceof Node?t:null}function wd(n,e,...t){if(n in e){let i=e[n];return typeof i=="function"?i(...t):i}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,wd),r}var M_=Object.defineProperty,E_=(n,e,t)=>e in n?M_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,O8=(n,e,t)=>(E_(n,typeof e!="symbol"?e+"":e,t),t);let A_=class{constructor(){O8(this,"current",this.detect()),O8(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},T_=new A_;var D8=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(D8||{}),es=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(es||{});function N8({visible:n=!0,features:e=0,ourProps:t,theirProps:r,...i}){var o;let s=_8(r,t),a=Object.assign(i,{props:s});if(n||e&2&&s.static)return D5(a);if(e&1){let c=(o=s.unmount)==null||o?0:1;return wd(c,{0(){return null},1(){return D5({...i,props:{...s,hidden:!0,style:{display:"none"}}})}})}return D5(a)}function D5({props:n,attrs:e,slots:t,slot:r,name:i}){var o,s;let{as:a,...c}=L8(n,["unmount","static"]),u=(o=t.default)==null?void 0:o.call(t,r),d={};if(r){let f=!1,h=[];for(let[p,m]of Object.entries(r))typeof m=="boolean"&&(f=!0),m===!0&&h.push(p);f&&(d["data-headlessui-state"]=h.join(" "))}if(a==="template"){if(u=P8(u??[]),Object.keys(c).length>0||Object.keys(e).length>0){let[f,...h]=u??[];if(!x_(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(e)).map(y=>y.trim()).filter((y,b,w)=>w.indexOf(y)===b).sort((y,b)=>y.localeCompare(b)).map(y=>` - ${y}`).join(`
1
+ (function(J,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(J=typeof globalThis<"u"?globalThis:J||self,l(J.QuoreUI={},J.Vue))})(this,function(J,l){"use strict";var Ife=Object.defineProperty;var Ofe=(J,l,ut)=>l in J?Ife(J,l,{enumerable:!0,configurable:!0,writable:!0,value:ut}):J[l]=ut;var pe=(J,l,ut)=>(Ofe(J,typeof l!="symbol"?l+"":l,ut),ut),sv=(J,l,ut)=>{if(!l.has(J))throw TypeError("Cannot "+ut)};var g=(J,l,ut)=>(sv(J,l,"read from private field"),ut?ut.call(J):l.get(J)),M=(J,l,ut)=>{if(l.has(J))throw TypeError("Cannot add the same private member more than once");l instanceof WeakSet?l.add(J):l.set(J,ut)},E=(J,l,ut,me)=>(sv(J,l,"write to private field"),me?me.call(J,ut):l.set(J,ut),ut);var Kn=(J,l,ut,me)=>({set _(M5){E(J,l,M5,ut)},get _(){return g(J,l,me)}}),x=(J,l,ut)=>(sv(J,l,"access private method"),ut);var jc,Qy,Ff,av,jf,Sl,Ml,Qr,El,zf,Hf,h3,XD,p3,JD,m3,eN,zc,Xy,g3,tN,Uf,lv,Zf,Al,Tl,y3,nN,b3,rN,w3,iN,v3,Wf,C3,Dr,qf,cv,jt,qs,Kf,zt,KD,k3,oN,Hc,sr,Ot,en,Uc,Eo,Zc,Xr,Ks,Wc,xl,Oi,Jr,Il,Gf,Yf,qc,Qf,Di,Gs,Kc,Ys,Ni,M3,Qs,Xf,Xs,Ol,Jf,eh,Ht,ze,Ao,Dl,th,nh,Js,Pi,To,rh,Gc,Jy,ih,uv,E3,sN,A3,aN,Yc,e5,T3,lN,x3,cN,I3,uN,oh,dv,O3,dN,sh,fv,ah,hv,D3,fN,tn,In,_i,Ia,N3,hN,P3,pN,lh,pv,_3,mN,Nl,K1,ch,mv,Ut,Li,ei,Bi,ar,Xc,Ri,Zn,xo,Pl,$i,Jc,t5,eu,n5,_l,ti,lt,tu,Ll,nn,Bl,ea,uh,Rl,ta,dh,$l,Io,Vi,nu,ru,Pr,fh,L3,hh,gv,ph,yv,mh,bv,B3,gN,R3,yN,gh,wv,yh,vv,bh,Cv,$3,bN,wh,kv,V3,wN,F3,vN,j3,CN,vh,Sv,Vl,G1,Fl,jl,Zt,z3,kN,Ch,iu,kh,Mv,Sh,Ev,Mh,Eh,U3,SN,Z3,MN,ou,r5,zl,Ah,Th,xh,Ih,su,na,Ke,au,lu,Oh,Av,GD,ra,Wn,Dh,Nh,Hl,Oo,Ph,_h,Ul,cu,uu,ia,du,Lh,fu,Zl,Bh,Rh,Wl,ql,oa,hu,W3,EN,q3,AN,$h,Tv,pu,i5,K3,TN,G3,xN,Kl,Gl,Fi,Do,hn,Y3,Yl,qt,mn,sa,ud,aa,dd,mu,o5,la,fd,Q3,IN,Vh,xv,ca,hd,Ql,Y1,Xl,Q1,Fh,Iv,Jl,X1,YD,X3,ua,No,da,pd,gu,s5,e0,ey,ty,t0,n0,yu,a5,bu,l5,Po,ji,wu,vu,zi,r0,J1,ni,jh,Ov,fa,ha,i0,s0,Cu,ku,zh,Dv,_o,B0,ny,ON,ry,DN,Su,iy,oy,Mu,a0,ht,Lo,Eu,Hh,Uh,Au,Bo,ri,Ro,Zh,$o,Wh,l0,c0,Tu,c5,qh,Nv,sy,NN,ay,PN,ly,_N,cy,LN,xu,u5,Iu,d5,Kh,Pv,Gh,Yh,Qh,Xh,Jh,e1,t1,_v,n1,u0,d0,uy,BN,r1,Lv,ii,lr,i1,f0,cr,Ou,dy,RN,fy,$N,hy,VN,Du,f5,Nu,h5,Pu,p5,py,FN,o1,Bv,my,jN,s1,pa,oi,gy,zN,_u,m5,yy,HN,by,UN,a1,Rv,l1,Lu,Hi,Vo,Bu,Ru,Ui,xe,h0,p0,c1,u1,$u,Vu,ma,d1,wy,vy,f1,$v,Fu,m0,jo,h1,ur,p1,bt,g0,ep,y0,tp,Cy,ZN,m1,g1,si,b0,ju,Dt,y1,zu,b1,w1,ai,Hu,v1,Vv,C1,Fv,ky,WN,zo,R0,Sy,qN,Zi,Oa,Uu,k1,ga,w0,Zu,_r,S1,M1,v0,li,En,dr,Wu,C0,Nt,qu,Wi,E1,A1,jv,T1,zv,My,KN,Ey,GN,Ay,YN,x1,Hv,k0,np,ya,md,Ty,QN,Ku,g5,S0,rp,xy,XN,Iy,JN,Oy,eP,Dy,tP,M0,E0,qi,Uo,Lr,A0,T0,x0,Zo,Gu,I0,O0,ba,Ny,nP,Py,rP,_y,iP,Ly,oP,I1,Uv,By,sP,O1,Zv,Ry,aP,$y,lP,Vy,cP,Fy,uP,jy,dP,Wo,$0,D1,Wv,N1,qv,P1,Kv,Yu,y5,Qu,b5,wa,gd,_1,Gv,Xu,w5,zy,fP,L1,Yv,Hy,hP,Uy,pP,B1,Qv,Ju,v5,D0,ip,wt,rn,va,qo,Ca,ed,Ki,Ko,Gi,Br,R1,N0,op,P0,sp,td,C5,$1,Xv,Zy,mP,V1,Jv,F1,e8,nd,k5,Wy,gP,_0,rd,Yi,ka,Go,fr,Sa,id,od,An,Yo,ce,Ma,qy,yP,z1,t8,H1,n8,U1,r8,sd,S5,Qi,Z1,Pt,Ea,W1,i8,q1,o8,Ky,bP;const ut=l.defineComponent({name:"QAccordion",props:{modelValue:{type:[Boolean,Number],default:!1},variant:{type:String,default:"white"},triggerText:{type:String,default:""},triggerClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},chevronClass:{type:[String,Array,Object],default:""}},emits:["update:modelValue"],setup(n,{emit:e,slots:t}){const r=l.computed({get:()=>!!n.modelValue,set:u=>e("update:modelValue",u)}),i=l.computed(()=>!!t.text),o=l.computed(()=>{const u=r.value?"Hide":"Show";return s.value?u:n.triggerText}),s=l.computed(()=>n.variant==="bubble"),a=l.computed(()=>["leading-normal font-bold",{"text-md":n.variant==="white"},{"text-base":n.variant==="gray"},{"flex-grow":n.variant!=="bubble"},{"flex-shrink mr-2 text-gray-40 text-sm":n.variant==="bubble"}]);return{show:r,hasTextSlot:i,triggerTextClasses:a,isBubbleAccordion:s,triggerTextValue:o,onToggle:()=>{r.value=!r.value}}}}),me=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},M5=["value"],vP={key:0,class:"flex-grow border-t border-gray-20"},CP={key:1,class:"flex-grow border-t border-gray-20"};function kP(n,e,t,r,i,o){const s=l.resolveComponent("q-icon");return l.openBlock(),l.createElementBlock("div",{value:n.modelValue,class:l.normalizeClass(["accordion","accordion-"+n.variant,{"is-open":!!n.modelValue}])},[l.renderSlot(n.$slots,"toggle",l.normalizeProps(l.guardReactiveProps({onToggle:n.onToggle})),()=>[l.createElementVNode("div",{class:l.normalizeClass(["accordion-trigger",n.triggerClass,{"py-5":n.isBubbleAccordion}]),onClick:e[0]||(e[0]=(...a)=>n.onToggle&&n.onToggle(...a))},[n.isBubbleAccordion?(l.openBlock(),l.createElementBlock("div",vP)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["flex items-center",{"w-full":!n.isBubbleAccordion},{"border border-gray-20 rounded-full px-8 py-2 w-32":n.isBubbleAccordion}])},[n.hasTextSlot?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(n.triggerTextClasses)},[l.renderSlot(n.$slots,"text",{},void 0,!0)],2)):(l.openBlock(),l.createElementBlock("h4",{key:1,class:l.normalizeClass(n.triggerTextClasses)},l.toDisplayString(n.triggerTextValue),3)),l.renderSlot(n.$slots,"additionalInfo",{},void 0,!0),l.createVNode(s,{icon:"chevron-down",color:"gray-40",size:n.isBubbleAccordion?"sm":"md",type:"",class:l.normalizeClass(["shrink-0 mr-4",n.chevronClass,{open:!!n.show}])},null,8,["size","class"])],2),n.isBubbleAccordion?(l.openBlock(),l.createElementBlock("div",CP)):l.createCommentVNode("",!0)],2)],!0),l.createVNode(l.Transition,{name:"slide-down"},{default:l.withCtx(()=>[n.show?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["accordion-content",n.contentClass,{"p-0":n.variant==="custom"}])},[l.renderSlot(n.$slots,"content",{},void 0,!0)],2)):l.createCommentVNode("",!0)]),_:3})],10,M5)}const SP=me(ut,[["render",kP],["__scopeId","data-v-7b1ba6ce"]]),MP=l.defineComponent({name:"QAvatar",props:{size:{type:String,default:"sm"},text:{type:[String],default:""},bgColor:{type:String,default:"teal-20"},src:{type:String,default:""}},setup(){const n=l.ref(!0),e=l.ref(!1);return{validSrc:n,isLoaded:e,onImageLoad:()=>{e.value=!0},onImageError:()=>{n.value=!1}}}}),EP={class:"avatar-text"},AP=["src"];function TP(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["avatar flex justify-center items-center",[`avatar-${n.size}`,`bg-${n.bgColor}`]])},[l.createElementVNode("span",EP,l.toDisplayString(n.text),1),n.src&&n.validSrc?(l.openBlock(),l.createElementBlock("img",{key:0,class:"avatar-image",src:n.src,onLoad:e[0]||(e[0]=(...s)=>n.onImageLoad&&n.onImageLoad(...s)),onError:e[1]||(e[1]=(...s)=>n.onImageError&&n.onImageError(...s))},null,40,AP)):l.createCommentVNode("",!0)],2)}const u8=me(MP,[["render",TP],["__scopeId","data-v-ebde1d6f"]]),xP=l.defineComponent({props:{backgroundColor:{type:String,default:"blue-20"},textColor:{type:String,default:"white"}}}),IP={class:"banner-text mb-0"};function OP(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["q-banner flex","bg-"+n.backgroundColor,"text-"+n.textColor]),onClick:e[0]||(e[0]=s=>n.$emit("bannerClick"))},[l.createElementVNode("p",IP,[l.renderSlot(n.$slots,"default",{},void 0,!0)])],2)}const DP=me(xP,[["render",OP],["__scopeId","data-v-8edf76be"]]),NP=l.defineComponent({name:"QBadge",props:{color:{type:String,default:""},shape:{type:String,default:"circle"}},setup(n,e){const t=l.computed(function(){return n.color?`bg-${n.color}`:""}),r=l.computed(function(){return!!e.slots.icon});return{bgColor:t,hasIcon:r}}}),PP={key:1,class:"badge-text"};function _P(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["badge",n.shape,n.bgColor])},[n.hasIcon?l.renderSlot(n.$slots,"icon",{key:0},void 0,!0):(l.openBlock(),l.createElementBlock("p",PP,[l.renderSlot(n.$slots,"text",{},void 0,!0)]))],2)}const Da=me(NP,[["render",_P],["__scopeId","data-v-c8e6730f"]]);function LP(){try{return"constructor"in GestureEvent}catch{return!1}}function d8(){return typeof window<"u"&&"ontouchstart"in window}function f8(n){return"pointerId"in n?null:n.type==="touchend"?n.changedTouches:n.targetTouches}function h8(n){return Array.from(f8(n)).map(e=>e.identifier)}function p8(n){const e="buttons"in n?n.buttons:0,{shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}=n;return{buttons:e,shiftKey:t,altKey:r,metaKey:i,ctrlKey:o}}const BP=n=>n;function m8(n,e=BP){const t=f8(n),{clientX:r,clientY:i}=t?t[0]:n;return e([r,i])}function g8(){}function y8(...n){return n.length===0?g8:n.length===1?n[0]:function(){var e;for(let t of n)e=t.apply(this,arguments)||e;return e}}function Jo(n,e){if(n===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");n=e}return Array.isArray(n)?n:[n,n]}function b8(n,...e){return typeof n=="function"?n(...e):n}function yd(n){return{_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:g8,canceled:!1,memo:void 0,args:void 0,...n}}function E5(){const n={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},e=yd({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),t=yd({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=yd({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=yd({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=yd({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:n,drag:e,pinch:t,wheel:r,move:i,scroll:o}}var RP=Object.defineProperty,$P=(n,e,t)=>e in n?RP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,On=(n,e,t)=>($P(n,typeof e!="symbol"?e+"":e,t),t);class VP{constructor(e){this.classes=e,On(this,"nativeRefs"),On(this,"config"),On(this,"handlers"),On(this,"state"),On(this,"timeouts"),On(this,"domListeners"),On(this,"windowListeners"),On(this,"pointerIds",new Set),On(this,"touchIds",new Set),On(this,"supportsTouchEvents",d8()),On(this,"supportsGestureEvents",LP()),On(this,"bind",(...t)=>{const r={};for(let i of this.classes)new i(this,t).addBindings(r);for(let i in this.nativeRefs)fi(r,i,o=>this.nativeRefs[i]({...this.state.shared,event:o,args:t}));return this.config.domTarget?ZP(this,r):WP(this,r)}),On(this,"clean",()=>{const{eventOptions:t,domTarget:r}=this.config,i=l.unref(r);i&&bd(i,w8(this.domListeners),t),Object.values(this.timeouts).forEach(clearTimeout),zP(this)}),On(this,"reset",()=>{this.state=E5()}),this.classes=e,this.state=E5(),this.timeouts={},this.domListeners=[],this.windowListeners={}}}function FP(n,e){"pointerId"in e?n.pointerIds.add(e.pointerId):n.touchIds=new Set(h8(e))}function jP(n,e){"pointerId"in e?n.pointerIds.delete(e.pointerId):h8(e).forEach(t=>n.touchIds.delete(t))}function zP(n){const{config:{window:e,eventOptions:t},windowListeners:r}=n,i=l.unref(e);if(i){for(let o in r){const s=r[o];bd(i,s,t)}n.windowListeners={}}}function HP({config:n,windowListeners:e},t,r=n.eventOptions){const i=l.unref(n.window);i&&(bd(i,e[t],r),delete e[t])}function UP({config:n,windowListeners:e},t,r=[],i=n.eventOptions){const o=l.unref(n.window);o&&(bd(o,e[t],i),v8(o,e[t]=r,i))}function ZP({config:n,domListeners:e},t){const{eventOptions:r,domTarget:i}=n,o=l.unref(i);if(!o)throw new Error("domTarget must be defined");bd(o,w8(e),r);for(let[s,a]of Object.entries(t)){const c=s.slice(2).toLowerCase();e.push([c,y8(...a)])}v8(o,e,r)}function WP({config:n},e){const t={},r=n.eventOptions.capture?"Capture":"";for(let[i,o]of Object.entries(e)){const s=Array.isArray(o)?o:[o],a=i+r;t[a]=y8(...s)}return t}function w8(n=[]){return n.splice(0,n.length)}function fi(n,e,t){n[e]||(n[e]=[]),n[e].push(t)}function v8(n,e=[],t={}){if(n)for(let[r,i]of e)n.addEventListener(r,i,t)}function bd(n,e=[],t={}){if(n)for(let[r,i]of e)n.removeEventListener(r,i,t)}function A5(n,e){return n.map((t,r)=>t+e[r])}function C8(n,e){return n.map((t,r)=>t-e[r])}function T5(n){return Math.hypot(...n)}function qP(n,e,t){const r=T5(e),i=r===0?0:1/r,o=t===0?0:1/t,s=o*r,a=e.map(d=>o*d),c=e.map(d=>i*d),u=T5(n);return{velocities:a,velocity:s,distance:u,direction:c}}function x5(n){return Math.sign?Math.sign(n):+(n>0)-+(n<0)||+n}function KP(n,e,t){return Math.max(e,Math.min(n,t))}function GP(n,e){return Math.pow(n,e*5)}function k8(n,e,t){return e===0||Math.abs(e)===1/0?GP(n,t):n*e*t/(e+t*n)}function S8(n,e,t,r=.15){return r===0?KP(n,e,t):n<e?-k8(e-n,t-e,r)+e:n>t?+k8(n-t,t-e,r)+t:n}var YP=Object.defineProperty,QP=(n,e,t)=>e in n?YP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ap=(n,e,t)=>(QP(n,typeof e!="symbol"?e+"":e,t),t);const Na=new Map,XP=n=>n;class JP{constructor(e,t=[]){this.controller=e,this.args=t,ap(this,"debounced",!0),ap(this,"setTimeout",(r,i=140,...o)=>{clearTimeout(this.controller.timeouts[this.stateKey]),this.controller.timeouts[this.stateKey]=window.setTimeout(r,i,...o)}),ap(this,"clearTimeout",()=>{clearTimeout(this.controller.timeouts[this.stateKey])}),ap(this,"fireGestureHandler",(r=!1)=>{if(this.state._blocked)return this.debounced||(this.state._active=!1,this.clean()),null;if(!r&&!this.state.intentional&&!this.config.triggerAllEvents)return null;if(this.state.intentional){const c=this.state.active,u=this.state._active;this.state.active=u,this.state.first=u&&!c,this.state.last=c&&!u,this.controller.state.shared[this.ingKey]=u}const i=this.controller.pointerIds.size||this.controller.touchIds.size,o=this.controller.state.shared.buttons>0||i>0,s={...this.controller.state.shared,...this.state,...this.mapStateValues(this.state),locked:!!document.pointerLockElement,touches:i,down:o},a=this.handler(s);return this.state.memo=a!==void 0?a:this.state.memo,s}),this.controller=e,this.args=t}get config(){return this.controller.config[this.stateKey]}get enabled(){return this.controller.config.enabled&&this.config.enabled}get state(){return this.controller.state[this.stateKey]}get handler(){return this.controller.handlers[this.stateKey]}get transform(){return this.config.transform||this.controller.config.transform||XP}updateSharedState(e){Object.assign(this.controller.state.shared,e)}updateGestureState(e){Object.assign(this.state,e)}checkIntentionality(e,t){return{_intentional:e,_blocked:!1}}getMovement(e){const{rubberband:t,threshold:r}=this.config,{_bounds:i,_initial:o,_active:s,_intentional:a,lastOffset:c,movement:u}=this.state,d=this.getInternalMovement(e,this.state),f=this.transform(r).map(Math.abs),h=a[0]===!1?M8(d[0],f[0]):a[0],p=a[1]===!1?M8(d[1],f[1]):a[1],m=this.checkIntentionality([h,p],d);if(m._blocked)return{...m,_movement:d,delta:[0,0]};const y=m._intentional,b=d;let w=[y[0]!==!1?d[0]-y[0]:0,y[1]!==!1?d[1]-y[1]:0];const v=A5(w,c),k=s?t:[0,0];return w=E8(i,A5(w,o),k),{...m,intentional:y[0]!==!1||y[1]!==!1,_initial:o,_movement:b,movement:w,values:e,offset:E8(i,v,k),delta:C8(w,u)}}clean(){this.clearTimeout()}}function M8(n,e){return Math.abs(n)>=e?x5(n)*e:!1}function E8(n,[e,t],[r,i]){const[[o,s],[a,c]]=n;return[S8(e,o,s,r),S8(t,a,c,i)]}function I5({state:n},e,t){const{timeStamp:r,type:i}=e,o=n.values,s=t?0:r-n.startTime;return{_lastEventType:i,event:e,timeStamp:r,elapsedTime:s,previous:o}}function e_({state:n,config:e,stateKey:t,args:r},i,o){const s=n.offset,a=o.timeStamp,{initial:c,bounds:u}=e,d={...E5()[t],_active:!0,args:r,values:i,initial:i,offset:s,lastOffset:s,startTime:a};return{...d,_initial:b8(c,d),_bounds:b8(u,d)}}class t_ extends JP{getInternalMovement(e,t){return C8(e,t.initial)}checkIntentionality(e,t){if(e[0]===!1&&e[1]===!1)return{_intentional:e,axis:this.state.axis};const[r,i]=t.map(Math.abs),o=this.state.axis||(r>i?"x":r<i?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:e,_blocked:!1,axis:o}:o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e[o==="x"?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}}getKinematics(e,t){const r=this.getMovement(e);if(!r._blocked){const i=t.timeStamp-this.state.timeStamp;Object.assign(r,qP(r.movement,r.delta,i))}return r}mapStateValues(e){return{xy:e.values,vxvy:e.velocities}}}var n_=Object.defineProperty,r_=(n,e,t)=>e in n?n_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kt=(n,e,t)=>(r_(n,typeof e!="symbol"?e+"":e,t),t);const i_=3;function A8(n){"persist"in n&&typeof n.persist=="function"&&n.persist()}class o_ extends t_{constructor(){super(...arguments),Kt(this,"ingKey","dragging"),Kt(this,"stateKey","drag"),Kt(this,"setPointerCapture",e=>{if(this.config.useTouch||document.pointerLockElement)return;const{target:t,pointerId:r}=e;t&&"setPointerCapture"in t&&t.setPointerCapture(r),this.updateGestureState({_dragTarget:t,_dragPointerId:r})}),Kt(this,"releasePointerCapture",()=>{if(this.config.useTouch||document.pointerLockElement)return;const{_dragTarget:e,_dragPointerId:t}=this.state;if(t&&e&&"releasePointerCapture"in e&&(!("hasPointerCapture"in e)||e.hasPointerCapture(t)))try{e.releasePointerCapture(t)}catch{}}),Kt(this,"preventScroll",e=>{this.state._dragPreventScroll&&e.cancelable&&e.preventDefault()}),Kt(this,"getEventId",e=>this.config.useTouch?e.changedTouches[0].identifier:e.pointerId),Kt(this,"isValidEvent",e=>this.state._pointerId===this.getEventId(e)),Kt(this,"shouldPreventWindowScrollY",this.config.preventWindowScrollY&&this.controller.supportsTouchEvents),Kt(this,"setUpWindowScrollDetection",e=>{A8(e),UP(this.controller,this.stateKey,[["touchmove",this.preventScroll],["touchend",this.clean.bind(this)],["touchcancel",this.clean.bind(this)]],{passive:!1}),this.setTimeout(this.startDrag.bind(this),250,e)}),Kt(this,"setUpDelayedDragTrigger",e=>{this.state._dragDelayed=!0,A8(e),this.setTimeout(this.startDrag.bind(this),this.config.delay,e)}),Kt(this,"setStartState",e=>{const t=m8(e,this.transform);this.updateSharedState(p8(e)),this.updateGestureState({...e_(this,t,e),...I5(this,e,!0),_pointerId:this.getEventId(e)}),this.updateGestureState(this.getMovement(t))}),Kt(this,"onDragStart",e=>{FP(this.controller,e),!(!this.enabled||this.state._active)&&(this.setStartState(e),this.setPointerCapture(e),this.shouldPreventWindowScrollY?this.setUpWindowScrollDetection(e):this.config.delay>0?this.setUpDelayedDragTrigger(e):this.startDrag(e,!0))}),Kt(this,"onDragChange",e=>{if(this.state.canceled||!this.state._active||!this.isValidEvent(e)||this.state._lastEventType===e.type&&e.timeStamp===this.state.timeStamp)return;let t;if(document.pointerLockElement){const{movementX:c,movementY:u}=e;t=A5(this.transform([c,u]),this.state.values)}else t=m8(e,this.transform);const r=this.getKinematics(t,e);if(!this.state._dragStarted){if(this.state._dragDelayed){this.startDrag(e);return}if(this.shouldPreventWindowScrollY)if(!this.state._dragPreventScroll&&r.axis)if(r.axis==="x")this.startDrag(e);else{this.state._active=!1;return}else return;else return}const i=p8(e);this.updateSharedState(i);const o=I5(this,e),s=T5(r._movement);let{_dragIsTap:a}=this.state;a&&s>=i_&&(a=!1),this.updateGestureState({...o,...r,_dragIsTap:a}),this.fireGestureHandler()}),Kt(this,"onDragEnd",e=>{if(jP(this.controller,e),!this.isValidEvent(e)||(this.clean(),!this.state._active))return;this.state._active=!1;const t=this.state._dragIsTap,[r,i]=this.state.velocities,[o,s]=this.state.movement,[a,c]=this.state._intentional,[u,d]=this.config.swipeVelocity,[f,h]=this.config.swipeDistance,p=this.config.swipeDuration,m={...I5(this,e),...this.getMovement(this.state.values)},y=[0,0];m.elapsedTime<p&&(a!==!1&&Math.abs(r)>u&&Math.abs(o)>f&&(y[0]=x5(r)),c!==!1&&Math.abs(i)>d&&Math.abs(s)>h&&(y[1]=x5(i))),this.updateSharedState({buttons:0}),this.updateGestureState({...m,tap:t,swipe:y}),this.fireGestureHandler(this.config.filterTaps&&t===!0)}),Kt(this,"clean",()=>{super.clean(),this.state._dragStarted=!1,this.releasePointerCapture(),HP(this.controller,this.stateKey)}),Kt(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({canceled:!0,_active:!1}),this.updateSharedState({buttons:0}),l.nextTick(this.fireGestureHandler))}),Kt(this,"onClick",e=>{this.state._dragIsTap||e.stopPropagation()})}startDrag(e,t=!1){!this.state._active||this.state._dragStarted||(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())}addBindings(e){if(this.config.useTouch?(fi(e,"onTouchStart",this.onDragStart),fi(e,"onTouchMove",this.onDragChange),fi(e,"onTouchEnd",this.onDragEnd),fi(e,"onTouchCancel",this.onDragEnd)):(fi(e,"onPointerDown",this.onDragStart),fi(e,"onPointerMove",this.onDragChange),fi(e,"onPointerUp",this.onDragEnd),fi(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){const t=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";fi(e,t,this.onClick)}}}function s_(n,e){let t,r=[],i,o=!1;function s(...a){return o&&t===this&&e(a,r)||(i=n.apply(this,a),o=!0,t=this,r=a),i}return s}function lp(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;let t,r,i;if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!lp(n[r],e[r]))return!1;return!0}let o;if(typeof Map=="function"&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=n.entries();!(r=o.next()).done;)if(!lp(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(o=n.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&n instanceof Element)return!1;for(r=t;r--!==0;)if(!(i[r]==="_owner"&&n.$$typeof)&&!lp(n[i[r]],e[i[r]]))return!1;return!0}return n!==n&&e!==e}function a_(n,e){try{return lp(n,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}function O5(n={},e){const t={};for(const[r,i]of Object.entries(e))switch(typeof i){case"function":t[r]=i.call(t,n[r],r,n);break;case"object":t[r]=O5(n[r],i);break;case"boolean":i&&(t[r]=n[r]);break}return t}const l_=180,c_=.15,u_=.5,d_=50,f_=250,T8={...{threshold(n=0){return Jo(n)},rubberband(n=0){switch(n){case!0:return Jo(c_);case!1:return Jo(0);default:return Jo(n)}},enabled(n=!0){return n},triggerAllEvents(n=!1){return n},initial(n=0){return typeof n=="function"?n:Jo(n)},transform:!0},axis:!0,lockDirection(n=!1){return n},bounds(n={}){if(typeof n=="function")return o=>T8.bounds(n(o));const{left:e=-1/0,right:t=1/0,top:r=-1/0,bottom:i=1/0}=n;return[[e,t],[r,i]]}},h_=typeof window<"u"&&window.document&&window.document.createElement,p_={enabled(n=!0){return n},domTarget:!0,window(n=h_?window:void 0){return n},eventOptions({passive:n=!0,capture:e=!1}={}){return{passive:n,capture:e}},transform:!0},m_={...T8,useTouch(n=!0){return n&&d8()},preventWindowScrollY(n=!1){return n},threshold(n,e,{filterTaps:t=!1,lockDirection:r=!1,axis:i=void 0}){const o=Jo(n,t?3:r||i?1:0);return this.filterTaps=t,o},swipeVelocity(n=u_){return Jo(n)},swipeDistance(n=d_){return Jo(n)},swipeDuration(n=f_){return n},delay(n=0){switch(n){case!0:return l_;case!1:return 0;default:return n}}};function g_(n){return O5(n,p_)}function y_(n={}){return O5(n,m_)}function b_({domTarget:n,eventOptions:e,window:t,enabled:r,...i}){const o=g_({domTarget:n,eventOptions:e,window:t,enabled:r});return o.drag=y_(i),o}function w_(n,e,t={}){const r=v_(n),i=new VP(r);return i.config=e,i.handlers=n,i.nativeRefs=t,l.getCurrentInstance()&&!e.manual&&(l.onMounted(i.bind),l.onUnmounted(i.clean)),i}function v_(n){const e=new Set;return n.drag&&e.add(Na.get("drag")),n.wheel&&e.add(Na.get("wheel")),n.scroll&&e.add(Na.get("scroll")),n.move&&e.add(Na.get("move")),n.pinch&&e.add(Na.get("pinch")),n.hover&&e.add(Na.get("hover")),e}function x8(n,e={}){Na.set("drag",o_);const t=l.ref();return t.value||(t.value=s_(b_,a_)),w_({drag:n},t.value(e))}let C_=Symbol("headlessui.useid"),k_=0;function S_(){return l.inject(C_,()=>`${++k_}`)()}function I8(n){var e;if(n==null||n.value==null)return null;let t=(e=n.value.$el)!=null?e:n.value;return t instanceof Node?t:null}function wd(n,e,...t){if(n in e){let i=e[n];return typeof i=="function"?i(...t):i}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,wd),r}var M_=Object.defineProperty,E_=(n,e,t)=>e in n?M_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,O8=(n,e,t)=>(E_(n,typeof e!="symbol"?e+"":e,t),t);let A_=class{constructor(){O8(this,"current",this.detect()),O8(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},T_=new A_;var D8=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(D8||{}),es=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(es||{});function N8({visible:n=!0,features:e=0,ourProps:t,theirProps:r,...i}){var o;let s=_8(r,t),a=Object.assign(i,{props:s});if(n||e&2&&s.static)return D5(a);if(e&1){let c=(o=s.unmount)==null||o?0:1;return wd(c,{0(){return null},1(){return D5({...i,props:{...s,hidden:!0,style:{display:"none"}}})}})}return D5(a)}function D5({props:n,attrs:e,slots:t,slot:r,name:i}){var o,s;let{as:a,...c}=L8(n,["unmount","static"]),u=(o=t.default)==null?void 0:o.call(t,r),d={};if(r){let f=!1,h=[];for(let[p,m]of Object.entries(r))typeof m=="boolean"&&(f=!0),m===!0&&h.push(p);f&&(d["data-headlessui-state"]=h.join(" "))}if(a==="template"){if(u=P8(u??[]),Object.keys(c).length>0||Object.keys(e).length>0){let[f,...h]=u??[];if(!x_(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(e)).map(y=>y.trim()).filter((y,b,w)=>w.indexOf(y)===b).sort((y,b)=>y.localeCompare(b)).map(y=>` - ${y}`).join(`
2
2
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(y=>` - ${y}`).join(`
3
3
  `)].join(`
4
4
  `));let p=_8((s=f.props)!=null?s:{},c,d),m=l.cloneVNode(f,p,!0);for(let y in p)y.startsWith("on")&&(m.props||(m.props={}),m.props[y]=p[y]);return m}return Array.isArray(u)&&u.length===1?u[0]:u}return l.h(a,Object.assign({},c,d),{default:()=>u})}function P8(n){return n.flatMap(e=>e.type===l.Fragment?P8(e.children):[e])}function _8(...n){if(n.length===0)return{};if(n.length===1)return n[0];let e={},t={};for(let r of n)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(t[i]!=null||(t[i]=[]),t[i].push(r[i])):e[i]=r[i];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(e,{[r](i,...o){let s=t[r];for(let a of s){if(i instanceof Event&&i.defaultPrevented)return;a(i,...o)}}});return e}function L8(n,e=[]){let t=Object.assign({},n);for(let r of e)r in t&&delete t[r];return t}function x_(n){return n==null?!1:typeof n.type=="string"||typeof n.type=="object"||typeof n.type=="function"}let B8=Symbol("Context");var to=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(to||{});function I_(){return R8()!==null}function R8(){return l.inject(B8,null)}function O_(n){l.provide(B8,n)}function D_(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(e=>setTimeout(()=>{throw e}))}function N5(){let n=[],e={addEventListener(t,r,i,o){return t.addEventListener(r,i,o),e.add(()=>t.removeEventListener(r,i,o))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);e.add(()=>cancelAnimationFrame(r))},nextFrame(...t){e.requestAnimationFrame(()=>{e.requestAnimationFrame(...t)})},setTimeout(...t){let r=setTimeout(...t);e.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return D_(()=>{r.current&&t[0]()}),e.add(()=>{r.current=!1})},style(t,r,i){let o=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:i}),this.add(()=>{Object.assign(t.style,{[r]:o})})},group(t){let r=N5();return t(r),this.add(()=>r.dispose())},add(t){return n.push(t),()=>{let r=n.indexOf(t);if(r>=0)for(let i of n.splice(r,1))i()}},dispose(){for(let t of n.splice(0))t()}};return e}function N_(n){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,n(...t)}}function P5(n,...e){n&&e.length>0&&n.classList.add(...e)}function cp(n,...e){n&&e.length>0&&n.classList.remove(...e)}var _5=(n=>(n.Finished="finished",n.Cancelled="cancelled",n))(_5||{});function P_(n,e){let t=N5();if(!n)return t.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(n),[o,s]=[r,i].map(a=>{let[c=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,d)=>d-u);return c});return o!==0?t.setTimeout(()=>e("finished"),o+s):e("finished"),t.add(()=>e("cancelled")),t.dispose}function $8(n,e,t,r,i,o){let s=N5(),a=o!==void 0?N_(o):()=>{};return cp(n,...i),P5(n,...e,...t),s.nextFrame(()=>{cp(n,...t),P5(n,...r),s.add(P_(n,c=>(cp(n,...r,...e),P5(n,...i),a(c))))}),s.add(()=>cp(n,...e,...t,...r,...i)),s.add(()=>a("cancelled")),s.dispose}function Pa(n=""){return n.split(/\s+/).filter(e=>e.length>1)}let L5=Symbol("TransitionContext");var __=(n=>(n.Visible="visible",n.Hidden="hidden",n))(__||{});function L_(){return l.inject(L5,null)!==null}function B_(){let n=l.inject(L5,null);if(n===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return n}function R_(){let n=l.inject(B5,null);if(n===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return n}let B5=Symbol("NestingContext");function up(n){return"children"in n?up(n.children):n.value.filter(({state:e})=>e==="visible").length>0}function V8(n){let e=l.ref([]),t=l.ref(!1);l.onMounted(()=>t.value=!0),l.onUnmounted(()=>t.value=!1);function r(o,s=es.Hidden){let a=e.value.findIndex(({id:c})=>c===o);a!==-1&&(wd(s,{[es.Unmount](){e.value.splice(a,1)},[es.Hidden](){e.value[a].state="hidden"}}),!up(e)&&t.value&&(n==null||n()))}function i(o){let s=e.value.find(({id:a})=>a===o);return s?s.state!=="visible"&&(s.state="visible"):e.value.push({id:o,state:"visible"}),()=>r(o,es.Unmount)}return{children:e,register:i,unregister:r}}let F8=D8.RenderStrategy,$_=l.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(n,{emit:e,attrs:t,slots:r,expose:i}){let o=l.ref(0);function s(){o.value|=to.Opening,e("beforeEnter")}function a(){o.value&=~to.Opening,e("afterEnter")}function c(){o.value|=to.Closing,e("beforeLeave")}function u(){o.value&=~to.Closing,e("afterLeave")}if(!L_()&&I_())return()=>l.h(j8,{...n,onBeforeEnter:s,onAfterEnter:a,onBeforeLeave:c,onAfterLeave:u},r);let d=l.ref(null),f=l.computed(()=>n.unmount?es.Unmount:es.Hidden);i({el:d,$el:d});let{show:h,appear:p}=B_(),{register:m,unregister:y}=R_(),b=l.ref(h.value?"visible":"hidden"),w={value:!0},v=S_(),k={value:!1},C=V8(()=>{!k.value&&b.value!=="hidden"&&(b.value="hidden",y(v),u())});l.onMounted(()=>{let B=m(v);l.onUnmounted(B)}),l.watchEffect(()=>{if(f.value===es.Hidden&&v){if(h.value&&b.value!=="visible"){b.value="visible";return}wd(b.value,{hidden:()=>y(v),visible:()=>m(v)})}});let T=Pa(n.enter),S=Pa(n.enterFrom),A=Pa(n.enterTo),D=Pa(n.entered),I=Pa(n.leave),P=Pa(n.leaveFrom),O=Pa(n.leaveTo);l.onMounted(()=>{l.watchEffect(()=>{if(b.value==="visible"){let B=I8(d);if(B instanceof Comment&&B.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function _(B){let $=w.value&&!p.value,R=I8(d);!R||!(R instanceof HTMLElement)||$||(k.value=!0,h.value&&s(),h.value||c(),B(h.value?$8(R,T,S,A,D,N=>{k.value=!1,N===_5.Finished&&a()}):$8(R,I,P,O,D,N=>{k.value=!1,N===_5.Finished&&(up(C)||(b.value="hidden",y(v),u()))})))}return l.onMounted(()=>{l.watch([h],(B,$,R)=>{_(R),w.value=!1},{immediate:!0})}),l.provide(B5,C),O_(l.computed(()=>wd(b.value,{visible:to.Open,hidden:to.Closed})|o.value)),()=>{let{appear:B,show:$,enter:R,enterFrom:N,enterTo:W,entered:F,leave:K,leaveFrom:ae,leaveTo:de,...Q}=n,Z={ref:d},H={...Q,...p.value&&h.value&&T_.isServer?{class:l.normalizeClass([t.class,Q.class,...T,...S])}:{}};return N8({theirProps:H,ourProps:Z,slot:{},slots:r,attrs:t,features:F8,visible:b.value==="visible",name:"TransitionChild"})}}}),V_=$_,j8=l.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(n,{emit:e,attrs:t,slots:r}){let i=R8(),o=l.computed(()=>n.show===null&&i!==null?(i.value&to.Open)===to.Open:n.show);l.watchEffect(()=>{if(![!0,!1].includes(o.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});let s=l.ref(o.value?"visible":"hidden"),a=V8(()=>{s.value="hidden"}),c=l.ref(!0),u={show:o,appear:l.computed(()=>n.appear||!c.value)};return l.onMounted(()=>{l.watchEffect(()=>{c.value=!1,o.value?s.value="visible":up(a)||(s.value="hidden")})}),l.provide(B5,a),l.provide(L5,u),()=>{let d=L8(n,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),f={unmount:n.unmount};return N8({ourProps:{...f,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[l.h(V_,{onBeforeEnter:()=>e("beforeEnter"),onAfterEnter:()=>e("afterEnter"),onBeforeLeave:()=>e("beforeLeave"),onAfterLeave:()=>e("afterLeave"),...t,...f,...d},r.default)]},attrs:{},features:F8,visible:s.value==="visible",name:"Transition"})}}});function R5(n){return l.getCurrentScope()?(l.onScopeDispose(n),!0):!1}function gn(n){return typeof n=="function"?n():l.unref(n)}const $5=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const z8=n=>n!=null,F_=Object.prototype.toString,H8=n=>F_.call(n)==="[object Object]",yn=()=>{},j_=z_();function z_(){var n,e;return $5&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function U8(n,e){function t(...r){return new Promise((i,o)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return t}function H_(n,e={}){let t,r,i=yn;const o=a=>{clearTimeout(a),i(),i=yn};return a=>{const c=gn(n),u=gn(e.maxWait);return t&&o(t),c<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(a())):new Promise((d,f)=>{i=e.rejectOnCancel?f:d,u&&!r&&(r=setTimeout(()=>{t&&o(t),r=null,d(a())},u)),t=setTimeout(()=>{r&&o(r),r=null,d(a())},c)})}}function U_(...n){let e=0,t,r=!0,i=yn,o,s,a,c,u;!l.isRef(n[0])&&typeof n[0]=="object"?{delay:s,trailing:a=!0,leading:c=!0,rejectOnCancel:u=!1}=n[0]:[s,a=!0,c=!0,u=!1]=n;const d=()=>{t&&(clearTimeout(t),t=void 0,i(),i=yn)};return h=>{const p=gn(s),m=Date.now()-e,y=()=>o=h();return d(),p<=0?(e=Date.now(),y()):(m>p&&(c||!r)?(e=Date.now(),y()):a&&(o=new Promise((b,w)=>{i=u?w:b,t=setTimeout(()=>{e=Date.now(),r=!0,b(y()),d()},Math.max(0,p-m))})),!c&&!t&&(t=setTimeout(()=>r=!0,p)),r=!1,o)}}function Z_(n,e){var t;if(typeof n=="number")return n+e;const r=((t=n.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:t[0])||"",i=n.slice(r.length),o=Number.parseFloat(r)+e;return Number.isNaN(o)?n:o+i}function Z8(n){return n||l.getCurrentInstance()}function W_(n,e=200,t={}){return U8(H_(e,t),n)}function q_(n,e=200,t=!1,r=!0,i=!1){return U8(U_(e,t,r,i),n)}function K_(n,e=!0,t){Z8()?l.onMounted(n,t):e?n():l.nextTick(n)}function G_(n,e){Z8(e)&&l.onUnmounted(n,e)}function Vr(n){var e;const t=gn(n);return(e=t==null?void 0:t.$el)!=null?e:t}const ts=$5?window:void 0;function Ye(...n){let e,t,r,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,i]=n,e=ts):[e,t,r,i]=n,!e)return yn;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},a=(d,f,h,p)=>(d.addEventListener(f,h,p),()=>d.removeEventListener(f,h,p)),c=l.watch(()=>[Vr(e),gn(i)],([d,f])=>{if(s(),!d)return;const h=H8(f)?{...f}:f;o.push(...t.flatMap(p=>r.map(m=>a(d,p,m,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return R5(u),u}let W8=!1;function V5(n,e,t={}){const{window:r=ts,ignore:i=[],capture:o=!0,detectIframe:s=!1}=t;if(!r)return yn;j_&&!W8&&(W8=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",yn)),r.document.documentElement.addEventListener("click",yn));let a=!0;const c=h=>i.some(p=>{if(typeof p=="string")return Array.from(r.document.querySelectorAll(p)).some(m=>m===h.target||h.composedPath().includes(m));{const m=Vr(p);return m&&(h.target===m||h.composedPath().includes(m))}}),d=[Ye(r,"click",h=>{const p=Vr(n);if(!(!p||p===h.target||h.composedPath().includes(p))){if(h.detail===0&&(a=!c(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:o}),Ye(r,"pointerdown",h=>{const p=Vr(n);a=!c(h)&&!!(p&&!h.composedPath().includes(p))},{passive:!0}),s&&Ye(r,"blur",h=>{setTimeout(()=>{var p;const m=Vr(n);((p=r.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(h)},0)})].filter(Boolean);return()=>d.forEach(h=>h())}const Y_=500,Q_=10;function X_(n,e,t){var r,i;const o=l.computed(()=>Vr(n));let s,a;function c(){s&&(clearTimeout(s),s=void 0),a=void 0}function u(m){var y,b,w,v;(y=t==null?void 0:t.modifiers)!=null&&y.self&&m.target!==o.value||(c(),(b=t==null?void 0:t.modifiers)!=null&&b.prevent&&m.preventDefault(),(w=t==null?void 0:t.modifiers)!=null&&w.stop&&m.stopPropagation(),a={x:m.x,y:m.y},s=setTimeout(()=>e(m),(v=t==null?void 0:t.delay)!=null?v:Y_))}function d(m){var y,b,w,v;if((y=t==null?void 0:t.modifiers)!=null&&y.self&&m.target!==o.value||!a||(t==null?void 0:t.distanceThreshold)===!1)return;(b=t==null?void 0:t.modifiers)!=null&&b.prevent&&m.preventDefault(),(w=t==null?void 0:t.modifiers)!=null&&w.stop&&m.stopPropagation();const k=m.x-a.x,C=m.y-a.y;Math.sqrt(k*k+C*C)>=((v=t==null?void 0:t.distanceThreshold)!=null?v:Q_)&&c()}const f={capture:(r=t==null?void 0:t.modifiers)==null?void 0:r.capture,once:(i=t==null?void 0:t.modifiers)==null?void 0:i.once},h=[Ye(o,"pointerdown",u,f),Ye(o,"pointermove",d,f),Ye(o,["pointerup","pointerleave"],c,f)];return()=>h.forEach(m=>m())}function J_(){const n=l.ref(!1),e=l.getCurrentInstance();return e&&l.onMounted(()=>{n.value=!0},e),n}function q8(n){const e=J_();return l.computed(()=>(e.value,!!n()))}function vd(n,e={}){const{window:t=ts}=e,r=q8(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let i;const o=l.ref(!1),s=u=>{o.value=u.matches},a=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",s):i.removeListener(s))},c=l.watchEffect(()=>{r.value&&(a(),i=t.matchMedia(gn(n)),"addEventListener"in i?i.addEventListener("change",s):i.addListener(s),o.value=i.matches)});return R5(()=>{c(),a(),i=void 0}),o}const eL={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function K8(n,e={}){function t(d,f){let h=gn(n[gn(d)]);return f!=null&&(h=Z_(h,f)),typeof h=="number"&&(h=`${h}px`),h}const{window:r=ts,strategy:i="min-width"}=e;function o(d){return r?r.matchMedia(d).matches:!1}const s=d=>vd(()=>`(min-width: ${t(d)})`,e),a=d=>vd(()=>`(max-width: ${t(d)})`,e),c=Object.keys(n).reduce((d,f)=>(Object.defineProperty(d,f,{get:()=>i==="min-width"?s(f):a(f),enumerable:!0,configurable:!0}),d),{});function u(){const d=Object.keys(n).map(f=>[f,s(f)]);return l.computed(()=>d.filter(([,f])=>f.value).map(([f])=>f))}return Object.assign(c,{greaterOrEqual:s,smallerOrEqual:a,greater(d){return vd(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return vd(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,f){return vd(()=>`(min-width: ${t(d)}) and (max-width: ${t(f,-.1)})`,e)},isGreater(d){return o(`(min-width: ${t(d,.1)})`)},isGreaterOrEqual(d){return o(`(min-width: ${t(d)})`)},isSmaller(d){return o(`(max-width: ${t(d,-.1)})`)},isSmallerOrEqual(d){return o(`(max-width: ${t(d)})`)},isInBetween(d,f){return o(`(min-width: ${t(d)}) and (max-width: ${t(f,-.1)})`)},current:u,active(){const d=u();return l.computed(()=>d.value.length===0?"":d.value.at(-1))}})}function tL(n,e={}){const t=l.ref(!1),r=l.shallowRef(null);let i=0,o=!0;if($5){const s=typeof e=="function"?{onDrop:e}:e,a=c=>{var u,d;const f=Array.from((d=(u=c.dataTransfer)==null?void 0:u.files)!=null?d:[]);return r.value=f.length===0?null:f};Ye(n,"dragenter",c=>{var u,d;const f=Array.from(((u=c==null?void 0:c.dataTransfer)==null?void 0:u.items)||[]).map(h=>h.kind==="file"?h.type:null).filter(z8);if(s.dataTypes&&c.dataTransfer){const h=l.unref(s.dataTypes);if(o=typeof h=="function"?h(f):h?h.some(p=>f.includes(p)):!0,!o)return}c.preventDefault(),i+=1,t.value=!0,(d=s.onEnter)==null||d.call(s,a(c),c)}),Ye(n,"dragover",c=>{var u;o&&(c.preventDefault(),(u=s.onOver)==null||u.call(s,a(c),c))}),Ye(n,"dragleave",c=>{var u;o&&(c.preventDefault(),i-=1,i===0&&(t.value=!1),(u=s.onLeave)==null||u.call(s,a(c),c))}),Ye(n,"drop",c=>{var u;c.preventDefault(),i=0,t.value=!1,(u=s.onDrop)==null||u.call(s,a(c),c)})}return{files:r,isOverDropZone:t}}function nL(n,e,t={}){const{root:r,rootMargin:i="0px",threshold:o=.1,window:s=ts,immediate:a=!0}=t,c=q8(()=>s&&"IntersectionObserver"in s),u=l.computed(()=>{const m=gn(n);return(Array.isArray(m)?m:[m]).map(Vr).filter(z8)});let d=yn;const f=l.ref(a),h=c.value?l.watch(()=>[u.value,Vr(r),f.value],([m,y])=>{if(d(),!f.value||!m.length)return;const b=new IntersectionObserver(e,{root:Vr(y),rootMargin:i,threshold:o});m.forEach(w=>w&&b.observe(w)),d=()=>{b.disconnect(),d=yn}},{immediate:a,flush:"post"}):yn,p=()=>{d(),h(),f.value=!1};return R5(p),{isSupported:c,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:p}}const G8=1;function rL(n,e={}){const{throttle:t=0,idle:r=200,onStop:i=yn,onScroll:o=yn,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:c="auto",window:u=ts,onError:d=A=>{console.error(A)}}=e,f=l.ref(0),h=l.ref(0),p=l.computed({get(){return f.value},set(A){y(A,void 0)}}),m=l.computed({get(){return h.value},set(A){y(void 0,A)}});function y(A,D){var I,P,O;if(!u)return;const _=gn(n);_&&((O=_ instanceof Document?u.document.body:_)==null||O.scrollTo({top:(I=gn(D))!=null?I:m.value,left:(P=gn(A))!=null?P:p.value,behavior:gn(c)}))}const b=l.ref(!1),w=l.reactive({left:!0,right:!1,top:!0,bottom:!1}),v=l.reactive({left:!1,right:!1,top:!1,bottom:!1}),k=A=>{b.value&&(b.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,i(A))},C=W_(k,t+r),T=A=>{var D;if(!u)return;const I=((D=A==null?void 0:A.document)==null?void 0:D.documentElement)||(A==null?void 0:A.documentElement)||Vr(A),{display:P,flexDirection:O}=getComputedStyle(I),_=I.scrollLeft;v.left=_<f.value,v.right=_>f.value;const B=Math.abs(_)<=(s.left||0),$=Math.abs(_)+I.clientWidth>=I.scrollWidth-(s.right||0)-G8;P==="flex"&&O==="row-reverse"?(w.left=$,w.right=B):(w.left=B,w.right=$),f.value=_;let R=I.scrollTop;A===u.document&&!R&&(R=u.document.body.scrollTop),v.top=R<h.value,v.bottom=R>h.value;const N=Math.abs(R)<=(s.top||0),W=Math.abs(R)+I.clientHeight>=I.scrollHeight-(s.bottom||0)-G8;P==="flex"&&O==="column-reverse"?(w.top=W,w.bottom=N):(w.top=N,w.bottom=W),h.value=R},S=A=>{var D;if(!u)return;const I=(D=A.target.documentElement)!=null?D:A.target;T(I),b.value=!0,C(A),o(A)};return Ye(n,"scroll",t?q_(S,t,!0,!1):S,a),K_(()=>{try{const A=gn(n);if(!A)return;T(A)}catch(A){d(A)}}),Ye(n,"scrollend",k,a),{x:p,y:m,isScrolling:b,arrivedState:w,directions:v,measure(){const A=gn(n);u&&A&&T(A)}}}function iL(n,e={}){const{threshold:t=50,onSwipe:r,onSwipeEnd:i,onSwipeStart:o,passive:s=!0,window:a=ts}=e,c=l.reactive({x:0,y:0}),u=l.reactive({x:0,y:0}),d=l.computed(()=>c.x-u.x),f=l.computed(()=>c.y-u.y),{max:h,abs:p}=Math,m=l.computed(()=>h(p(d.value),p(f.value))>=t),y=l.ref(!1),b=l.computed(()=>m.value?p(d.value)>p(f.value)?d.value>0?"left":"right":f.value>0?"up":"down":"none"),w=I=>[I.touches[0].clientX,I.touches[0].clientY],v=(I,P)=>{c.x=I,c.y=P},k=(I,P)=>{u.x=I,u.y=P};let C;const T=oL(a==null?void 0:a.document);s?C=T?{passive:!0}:{capture:!1}:C=T?{passive:!1,capture:!0}:{capture:!0};const S=I=>{y.value&&(i==null||i(I,b.value)),y.value=!1},A=[Ye(n,"touchstart",I=>{if(I.touches.length!==1)return;C.capture&&!C.passive&&I.preventDefault();const[P,O]=w(I);v(P,O),k(P,O),o==null||o(I)},C),Ye(n,"touchmove",I=>{if(I.touches.length!==1)return;const[P,O]=w(I);k(P,O),!y.value&&m.value&&(y.value=!0),y.value&&(r==null||r(I))},C),Ye(n,["touchend","touchcancel"],S,C)];return{isPassiveEventSupported:T,isSwiping:y,direction:b,coordsStart:c,coordsEnd:u,lengthX:d,lengthY:f,stop:()=>A.forEach(I=>I())}}function oL(n){if(!n)return!1;let e=!1;const t={get passive(){return e=!0,!1}};return n.addEventListener("x",yn,t),n.removeEventListener("x",yn),e}function sL(n={}){const{window:e=ts,behavior:t="auto"}=n;if(!e)return{x:l.ref(0),y:l.ref(0)};const r=l.ref(e.scrollX),i=l.ref(e.scrollY),o=l.computed({get(){return r.value},set(a){scrollTo({left:a,behavior:t})}}),s=l.computed({get(){return i.value},set(a){scrollTo({top:a,behavior:t})}});return Ye(e,"scroll",()=>{r.value=e.scrollX,i.value=e.scrollY},{capture:!1,passive:!0}),{x:o,y:s}}const Y8=1/60*1e3,aL=typeof performance<"u"?()=>performance.now():()=>Date.now(),Q8=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(aL()),Y8);function lL(n){let e=[],t=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const f=d&&i,h=f?e:t;return u&&s.add(c),h.indexOf(c)===-1&&(h.push(c),f&&i&&(r=e.length)),c},cancel:c=>{const u=t.indexOf(c);u!==-1&&t.splice(u,1),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,t]=[t,e],t.length=0,r=e.length,r)for(let u=0;u<r;u++){const d=e[u];d(c),s.has(d)&&(a.schedule(d),n())}i=!1,o&&(o=!1,a.process(c))}};return a}const cL=40;let F5=!0,Cd=!1,j5=!1;const V0={delta:0,timestamp:0},kd=["read","update","preRender","render","postRender"],dp=kd.reduce((n,e)=>(n[e]=lL(()=>Cd=!0),n),{}),z5=kd.reduce((n,e)=>{const t=dp[e];return n[e]=(r,i=!1,o=!1)=>(Cd||fL(),t.schedule(r,i,o)),n},{}),uL=kd.reduce((n,e)=>(n[e]=dp[e].cancel,n),{});kd.reduce((n,e)=>(n[e]=()=>dp[e].process(V0),n),{});const dL=n=>dp[n].process(V0),X8=n=>{Cd=!1,V0.delta=F5?Y8:Math.max(Math.min(n-V0.timestamp,cL),1),V0.timestamp=n,j5=!0,kd.forEach(dL),j5=!1,Cd&&(F5=!1,Q8(X8))},fL=()=>{Cd=!0,F5=!0,j5||Q8(X8)},J8=()=>V0;function e9(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t}var H5=function(){},Sd=function(){};process.env.NODE_ENV!=="production"&&(H5=function(n,e){!n&&typeof console<"u"&&console.warn(e)},Sd=function(n,e){if(!n)throw new Error(e)});const U5=(n,e,t)=>Math.min(Math.max(t,n),e),Z5=.001,hL=.01,t9=10,pL=.05,mL=1;function gL({duration:n=800,bounce:e=.25,velocity:t=0,mass:r=1}){let i,o;H5(n<=t9*1e3,"Spring duration must be 10 seconds or less");let s=1-e;s=U5(pL,mL,s),n=U5(hL,t9,n/1e3),s<1?(i=u=>{const d=u*s,f=d*n,h=d-t,p=W5(u,s),m=Math.exp(-f);return Z5-h/p*m},o=u=>{const f=u*s*n,h=f*t+t,p=Math.pow(s,2)*Math.pow(u,2)*n,m=Math.exp(-f),y=W5(Math.pow(u,2),s);return(-i(u)+Z5>0?-1:1)*((h-p)*m)/y}):(i=u=>{const d=Math.exp(-u*n),f=(u-t)*n+1;return-Z5+d*f},o=u=>{const d=Math.exp(-u*n),f=(t-u)*(n*n);return d*f});const a=5/n,c=bL(i,o,a);if(n=n*1e3,isNaN(c))return{stiffness:100,damping:10,duration:n};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:n}}}const yL=12;function bL(n,e,t){let r=t;for(let i=1;i<yL;i++)r=r-n(r)/e(r);return r}function W5(n,e){return n*Math.sqrt(1-e*e)}const wL=["duration","bounce"],vL=["stiffness","damping","mass"];function n9(n,e){return e.some(t=>n[t]!==void 0)}function CL(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!n9(n,vL)&&n9(n,wL)){const t=gL(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function q5(n){var{from:e=0,to:t=1,restSpeed:r=2,restDelta:i}=n,o=e9(n,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:a,damping:c,mass:u,velocity:d,duration:f,isResolvedFromDuration:h}=CL(o),p=r9,m=r9;function y(){const b=d?-(d/1e3):0,w=t-e,v=c/(2*Math.sqrt(a*u)),k=Math.sqrt(a/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(t-e)/100,.4)),v<1){const C=W5(k,v);p=T=>{const S=Math.exp(-v*k*T);return t-S*((b+v*k*w)/C*Math.sin(C*T)+w*Math.cos(C*T))},m=T=>{const S=Math.exp(-v*k*T);return v*k*S*(Math.sin(C*T)*(b+v*k*w)/C+w*Math.cos(C*T))-S*(Math.cos(C*T)*(b+v*k*w)-C*w*Math.sin(C*T))}}else if(v===1)p=C=>t-Math.exp(-k*C)*(w+(b+k*w)*C);else{const C=k*Math.sqrt(v*v-1);p=T=>{const S=Math.exp(-v*k*T),A=Math.min(C*T,300);return t-S*((b+v*k*w)*Math.sinh(A)+C*w*Math.cosh(A))/C}}}return y(),{next:b=>{const w=p(b);if(h)s.done=b>=f;else{const v=m(b)*1e3,k=Math.abs(v)<=r,C=Math.abs(t-w)<=i;s.done=k&&C}return s.value=s.done?t:w,s},flipTarget:()=>{d=-d,[e,t]=[t,e],y()}}}q5.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const r9=n=>0,i9=(n,e,t)=>{const r=e-n;return r===0?1:(t-n)/r},K5=(n,e,t)=>-t*n+t*e+n,o9=(n,e)=>t=>Math.max(Math.min(t,e),n),Md=n=>n%1?Number(n.toFixed(5)):n,Ed=/(-)?([\d]*\.?[\d])+/g,G5=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,kL=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ad(n){return typeof n=="string"}const Td={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},xd=Object.assign(Object.assign({},Td),{transform:o9(0,1)}),fp=Object.assign(Object.assign({},Td),{default:1}),Y5=n=>({test:e=>Ad(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),_a=Y5("deg"),Id=Y5("%"),ve=Y5("px"),s9=Object.assign(Object.assign({},Id),{parse:n=>Id.parse(n)/100,transform:n=>Id.transform(n*100)}),Q5=(n,e)=>t=>!!(Ad(t)&&kL.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),a9=(n,e,t)=>r=>{if(!Ad(r))return r;const[i,o,s,a]=r.match(Ed);return{[n]:parseFloat(i),[e]:parseFloat(o),[t]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},La={test:Q5("hsl","hue"),parse:a9("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:r=1})=>"hsla("+Math.round(n)+", "+Id.transform(Md(e))+", "+Id.transform(Md(t))+", "+Md(xd.transform(r))+")"},SL=o9(0,255),X5=Object.assign(Object.assign({},Td),{transform:n=>Math.round(SL(n))}),ns={test:Q5("rgb","red"),parse:a9("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:r=1})=>"rgba("+X5.transform(n)+", "+X5.transform(e)+", "+X5.transform(t)+", "+Md(xd.transform(r))+")"};function ML(n){let e="",t="",r="",i="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),r=n.substr(5,2),i=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),r=n.substr(3,1),i=n.substr(4,1),e+=e,t+=t,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const J5={test:Q5("#"),parse:ML,transform:ns.transform},Dn={test:n=>ns.test(n)||J5.test(n)||La.test(n),parse:n=>ns.test(n)?ns.parse(n):La.test(n)?La.parse(n):J5.parse(n),transform:n=>Ad(n)?n:n.hasOwnProperty("red")?ns.transform(n):La.transform(n)},l9="${c}",c9="${n}";function EL(n){var e,t,r,i;return isNaN(n)&&Ad(n)&&((t=(e=n.match(Ed))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((i=(r=n.match(G5))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function u9(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const r=n.match(G5);r&&(t=r.length,n=n.replace(G5,l9),e.push(...r.map(Dn.parse)));const i=n.match(Ed);return i&&(n=n.replace(Ed,c9),e.push(...i.map(Td.parse))),{values:e,numColors:t,tokenised:n}}function d9(n){return u9(n).values}function f9(n){const{values:e,numColors:t,tokenised:r}=u9(n),i=e.length;return o=>{let s=r;for(let a=0;a<i;a++)s=s.replace(a<t?l9:c9,a<t?Dn.transform(o[a]):Md(o[a]));return s}}const AL=n=>typeof n=="number"?0:n;function TL(n){const e=d9(n);return f9(n)(e.map(AL))}const Od={test:EL,parse:d9,createTransformer:f9,getAnimatableNone:TL},xL=new Set(["brightness","contrast","saturate","opacity"]);function IL(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[r]=t.match(Ed)||[];if(!r)return n;const i=t.replace(r,"");let o=xL.has(e)?1:0;return r!==t&&(o*=100),e+"("+o+i+")"}const OL=/([a-z-]*)\(.*?\)/g,eb=Object.assign(Object.assign({},Od),{getAnimatableNone:n=>{const e=n.match(OL);return e?e.map(IL).join(" "):n}});function tb(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function h9({hue:n,saturation:e,lightness:t,alpha:r}){n/=360,e/=100,t/=100;let i=0,o=0,s=0;if(!e)i=o=s=t;else{const a=t<.5?t*(1+e):t+e-t*e,c=2*t-a;i=tb(c,a,n+1/3),o=tb(c,a,n),s=tb(c,a,n-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const DL=(n,e,t)=>{const r=n*n,i=e*e;return Math.sqrt(Math.max(0,t*(i-r)+r))},NL=[J5,ns,La],p9=n=>NL.find(e=>e.test(n)),m9=n=>`'${n}' is not an animatable color. Use the equivalent color code instead.`,g9=(n,e)=>{let t=p9(n),r=p9(e);Sd(!!t,m9(n)),Sd(!!r,m9(e));let i=t.parse(n),o=r.parse(e);t===La&&(i=h9(i),t=ns),r===La&&(o=h9(o),r=ns);const s=Object.assign({},i);return a=>{for(const c in s)c!=="alpha"&&(s[c]=DL(i[c],o[c],a));return s.alpha=K5(i.alpha,o.alpha,a),t.transform(s)}},PL=n=>typeof n=="number",_L=(n,e)=>t=>e(n(t)),y9=(...n)=>n.reduce(_L);function b9(n,e){return PL(n)?t=>K5(n,e,t):Dn.test(n)?g9(n,e):C9(n,e)}const w9=(n,e)=>{const t=[...n],r=t.length,i=n.map((o,s)=>b9(o,e[s]));return o=>{for(let s=0;s<r;s++)t[s]=i[s](o);return t}},LL=(n,e)=>{const t=Object.assign(Object.assign({},n),e),r={};for(const i in t)n[i]!==void 0&&e[i]!==void 0&&(r[i]=b9(n[i],e[i]));return i=>{for(const o in r)t[o]=r[o](i);return t}};function v9(n){const e=Od.parse(n),t=e.length;let r=0,i=0,o=0;for(let s=0;s<t;s++)r||typeof e[s]=="number"?r++:e[s].hue!==void 0?o++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:o}}const C9=(n,e)=>{const t=Od.createTransformer(e),r=v9(n),i=v9(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?y9(w9(r.parsed,i.parsed),t):(H5(!0,`Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),s=>`${s>0?e:n}`)},BL=(n,e)=>t=>K5(n,e,t);function RL(n){if(typeof n=="number")return BL;if(typeof n=="string")return Dn.test(n)?g9:C9;if(Array.isArray(n))return w9;if(typeof n=="object")return LL}function $L(n,e,t){const r=[],i=t||RL(n[0]),o=n.length-1;for(let s=0;s<o;s++){let a=i(n[s],n[s+1]);if(e){const c=Array.isArray(e)?e[s]:e;a=y9(c,a)}r.push(a)}return r}function VL([n,e],[t]){return r=>t(i9(n,e,r))}function FL(n,e){const t=n.length,r=t-1;return i=>{let o=0,s=!1;if(i<=n[0]?s=!0:i>=n[r]&&(o=r-1,s=!0),!s){let c=1;for(;c<t&&!(n[c]>i||c===r);c++);o=c-1}const a=i9(n[o],n[o+1],i);return e[o](a)}}function k9(n,e,{clamp:t=!0,ease:r,mixer:i}={}){const o=n.length;Sd(o===e.length,"Both input and output ranges must be the same length"),Sd(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),n[0]>n[o-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const s=$L(e,r,i),a=o===2?VL(n,s):FL(n,s);return t?c=>a(U5(n[0],n[o-1],c)):a}const hp=n=>e=>1-n(1-e),nb=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,jL=n=>e=>Math.pow(e,n),S9=n=>e=>e*e*((n+1)*e-n),zL=n=>{const e=S9(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},M9=1.525,HL=4/11,UL=8/11,ZL=9/10,E9=n=>n,rb=jL(2),WL=hp(rb),A9=nb(rb),T9=n=>1-Math.sin(Math.acos(n)),x9=hp(T9),qL=nb(x9),ib=S9(M9),KL=hp(ib),GL=nb(ib),YL=zL(M9),QL=4356/361,XL=35442/1805,JL=16061/1805,pp=n=>{if(n===1||n===0)return n;const e=n*n;return n<HL?7.5625*e:n<UL?9.075*e-9.9*n+3.4:n<ZL?QL*e-XL*n+JL:10.8*n*n-20.52*n+10.72},eB=hp(pp),tB=n=>n<.5?.5*(1-pp(1-n*2)):.5*pp(n*2-1)+.5;function nB(n,e){return n.map(()=>e||A9).splice(0,n.length-1)}function rB(n){const e=n.length;return n.map((t,r)=>r!==0?r/(e-1):0)}function iB(n,e){return n.map(t=>t*e)}function mp({from:n=0,to:e=1,ease:t,offset:r,duration:i=300}){const o={done:!1,value:n},s=Array.isArray(e)?e:[n,e],a=iB(r&&r.length===s.length?r:rB(s),i);function c(){return k9(a,s,{ease:Array.isArray(t)?t:nB(s,t)})}let u=c();return{next:d=>(o.value=u(d),o.done=d>=i,o),flipTarget:()=>{s.reverse(),u=c()}}}function oB({velocity:n=0,from:e=0,power:t=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const s={done:!1,value:e};let a=t*n;const c=e+a,u=o===void 0?c:o(c);return u!==c&&(a=u-e),{next:d=>{const f=-a*Math.exp(-d/r);return s.done=!(f>i||f<-i),s.value=s.done?u:u+f,s},flipTarget:()=>{}}}const I9={keyframes:mp,spring:q5,decay:oB};function sB(n){if(Array.isArray(n.to))return mp;if(I9[n.type])return I9[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?mp:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?q5:mp}function O9(n,e,t=0){return n-e-t}function aB(n,e,t=0,r=!0){return r?O9(e+-n,e,t):e-(n-e)+t}function lB(n,e,t,r){return r?n>=e+t:n<=-t}const cB=n=>{const e=({delta:t})=>n(t);return{start:()=>z5.update(e,!0),stop:()=>uL.update(e)}};function D9(n){var e,t,{from:r,autoplay:i=!0,driver:o=cB,elapsed:s=0,repeat:a=0,repeatType:c="loop",repeatDelay:u=0,onPlay:d,onStop:f,onComplete:h,onRepeat:p,onUpdate:m}=n,y=e9(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=y,w,v=0,k=y.duration,C,T=!1,S=!0,A;const D=sB(y);!((t=(e=D).needsInterpolation)===null||t===void 0)&&t.call(e,r,b)&&(A=k9([0,100],[r,b],{clamp:!1}),r=0,b=100);const I=D(Object.assign(Object.assign({},y),{from:r,to:b}));function P(){v++,c==="reverse"?(S=v%2===0,s=aB(s,k,u,S)):(s=O9(s,k,u),c==="mirror"&&I.flipTarget()),T=!1,p&&p()}function O(){w.stop(),h&&h()}function _($){if(S||($=-$),s+=$,!T){const R=I.next(Math.max(0,s));C=R.value,A&&(C=A(C)),T=S?R.done:s<=0}m==null||m(C),T&&(v===0&&(k??(k=s)),v<a?lB(s,k,u,S)&&P():O())}function B(){d==null||d(),w=o(_),w.start()}return i&&B(),{stop:()=>{f==null||f(),w.stop()}}}function N9(n,e){return e?n*(1e3/e):0}function uB({from:n=0,velocity:e=0,min:t,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:d,onUpdate:f,onComplete:h,onStop:p}){let m;function y(k){return t!==void 0&&k<t||r!==void 0&&k>r}function b(k){return t===void 0?r:r===void 0||Math.abs(t-k)<Math.abs(r-k)?t:r}function w(k){m==null||m.stop(),m=D9(Object.assign(Object.assign({},k),{driver:d,onUpdate:C=>{var T;f==null||f(C),(T=k.onUpdate)===null||T===void 0||T.call(k,C)},onComplete:h,onStop:p}))}function v(k){w(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:c},k))}if(y(n))v({from:n,velocity:e,to:b(n)});else{let k=i*e+n;typeof u<"u"&&(k=u(k));const C=b(k),T=C===t?-1:1;let S,A;const D=I=>{S=A,A=I,e=N9(I-S,J8().delta),(T===1&&I>C||T===-1&&I<C)&&v({from:I,to:C,velocity:e})};w({type:"decay",from:n,velocity:e,timeConstant:o,power:i,restDelta:c,modifyTarget:u,onUpdate:y(k)?D:void 0})}return{stop:()=>m==null?void 0:m.stop()}}const P9=(n,e)=>1-3*e+3*n,_9=(n,e)=>3*e-6*n,L9=n=>3*n,gp=(n,e,t)=>((P9(e,t)*n+_9(e,t))*n+L9(e))*n,B9=(n,e,t)=>3*P9(e,t)*n*n+2*_9(e,t)*n+L9(e),dB=1e-7,fB=10;function hB(n,e,t,r,i){let o,s,a=0;do s=e+(t-e)/2,o=gp(s,r,i)-n,o>0?t=s:e=s;while(Math.abs(o)>dB&&++a<fB);return s}const pB=8,mB=.001;function gB(n,e,t,r){for(let i=0;i<pB;++i){const o=B9(e,t,r);if(o===0)return e;const s=gp(e,t,r)-n;e-=s/o}return e}const yp=11,bp=1/(yp-1);function yB(n,e,t,r){if(n===e&&t===r)return E9;const i=new Float32Array(yp);for(let s=0;s<yp;++s)i[s]=gp(s*bp,n,t);function o(s){let a=0,c=1;const u=yp-1;for(;c!==u&&i[c]<=s;++c)a+=bp;--c;const d=(s-i[c])/(i[c+1]-i[c]),f=a+d*bp,h=B9(f,n,t);return h>=mB?gB(s,f,n,t):h===0?f:hB(s,a,a+bp,n,t)}return s=>s===0||s===1?s:gp(o(s),e,r)}/**
@@ -118,7 +118,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
118
118
  }
119
119
  `)}}this.thumbnailsStyle.innerHTML=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible},r=0;r<this.sortedResponsiveOptions.length;r++){var i=this.sortedResponsiveOptions[r];parseInt(i.breakpoint,10)>=e&&(t=i)}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled:function(){return!this.circular&&this.d_activeIndex===0||this.value.length<=this.d_numVisible},isNavForwardDisabled:function(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex:function(){return this.totalShiftedItems*-1},lastItemActiveIndex:function(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive:function(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},components:{ChevronLeftIcon:d4,ChevronRightIcon:t2,ChevronUpIcon:KS,ChevronDownIcon:n2},directives:{ripple:Nn}};function i2(n){"@babel/helpers - typeof";return i2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i2(n)}function QS(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Yp(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?QS(Object(t),!0).forEach(function(r){MH(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):QS(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function MH(n,e,t){return e=EH(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function EH(n){var e=AH(n,"string");return i2(e)=="symbol"?e:String(e)}function AH(n,e){if(i2(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(i2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var TH=["disabled","aria-label"],xH=["data-p-active","aria-selected","aria-controls","onKeydown","data-p-galleria-thumbnail-item-current","data-p-galleria-thumbnail-item-active","data-p-galleria-thumbnail-item-start","data-p-galleria-thumbnail-item-end"],IH=["tabindex","aria-label","aria-current","onClick"],OH=["disabled","aria-label"];function DH(n,e,t,r,i,o){var s=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:n.cx("thumbnailWrapper")},n.ptm("thumbnailWrapper")),[l.createElementVNode("div",l.mergeProps({class:n.cx("thumbnailContainer")},n.ptm("thumbnailContainer")),[t.showThumbnailNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,class:n.cx("previousThumbnailButton"),disabled:o.isNavBackwardDisabled(),type:"button","aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(a){return o.navBackward(a)})},Yp(Yp({},t.prevButtonProps),n.ptm("previousThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.templates.previousthumbnailicon||(t.isVertical?"ChevronUpIcon":"ChevronLeftIcon")),l.mergeProps({class:n.cx("previousThumbnailIcon")},n.ptm("previousThumbnailIcon")),null,16,["class"]))],16,TH)),[[s]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:n.cx("thumbnailItemsContainer"),style:{height:t.isVertical?t.contentHeight:""}},n.ptm("thumbnailItemsContainer")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:n.cx("thumbnailItems"),role:"tablist",onTransitionend:e[1]||(e[1]=function(a){return o.onTransitionEnd(a)}),onTouchstart:e[2]||(e[2]=function(a){return o.onTouchStart(a)}),onTouchmove:e[3]||(e[3]=function(a){return o.onTouchMove(a)}),onTouchend:e[4]||(e[4]=function(a){return o.onTouchEnd(a)})},n.ptm("thumbnailItems")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,function(a,c){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:"p-galleria-thumbnail-item-".concat(c),class:n.cx("thumbnailItem",{index:c,activeIndex:t.activeIndex}),role:"tab","data-p-active":t.activeIndex===c,"aria-selected":t.activeIndex===c,"aria-controls":t.containerId+"_item_"+c,onKeydown:function(d){return o.onThumbnailKeydown(d,c)}},n.ptm("thumbnailItem"),{"data-p-galleria-thumbnail-item-current":t.activeIndex===c,"data-p-galleria-thumbnail-item-active":o.isItemActive(c),"data-p-galleria-thumbnail-item-start":o.firstItemAciveIndex()===c,"data-p-galleria-thumbnail-item-end":o.lastItemActiveIndex()===c}),[l.createElementVNode("div",l.mergeProps({class:n.cx("thumbnailItemContent"),tabindex:t.activeIndex===c?"0":"-1","aria-label":o.ariaPageLabel(c+1),"aria-current":t.activeIndex===c?"page":void 0,onClick:function(d){return o.onItemClick(c)}},n.ptm("thumbnailItemContent")),[t.templates.thumbnail?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.templates.thumbnail),{key:0,item:a},null,8,["item"])):l.createCommentVNode("",!0)],16,IH)],16,xH)}),128))],16)],16),t.showThumbnailNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,class:n.cx("nextThumbnailButton"),disabled:o.isNavForwardDisabled(),type:"button","aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(a){return o.navForward(a)})},Yp(Yp({},t.nextButtonProps),n.ptm("nextThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.templates.nextthumbnailicon||(t.isVertical?"ChevronDownIcon":"ChevronRightIcon")),l.mergeProps({class:n.cx("nextThumbnailIcon")},n.ptm("nextThumbnailIcon")),null,16,["class"]))],16,OH)),[[s]]):l.createCommentVNode("",!0)],16)],16)}YS.render=DH;function o2(n){"@babel/helpers - typeof";return o2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o2(n)}function XS(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function JS(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?XS(Object(t),!0).forEach(function(r){NH(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):XS(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function NH(n,e,t){return e=PH(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function PH(n){var e=_H(n,"string");return o2(e)=="symbol"?e:String(e)}function _H(n,e){if(o2(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(o2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var eM={name:"GalleriaContent",hostName:"Galleria",extends:be,inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data:function(){return{id:this.$attrs.id||Fr(),activeIndex:this.$attrs.activeIndex,numVisible:this.$attrs.numVisible,slideShowActive:!1}},watch:{"$attrs.id":function(e){this.id=e||Fr()},"$attrs.value":function(e){e&&e.length<this.numVisible&&(this.numVisible=e.length)},"$attrs.activeIndex":function(e){this.activeIndex=e},"$attrs.numVisible":function(e){this.numVisible=e},"$attrs.autoPlay":function(e){e?this.startSlideShow():this.stopSlideShow()}},mounted:function(){this.id=this.id||Fr()},updated:function(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount:function(){this.slideShowActive&&this.stopSlideShow()},methods:{getPTOptions:function(e){return this.ptm(e,{props:JS(JS({},this.$attrs),{},{pt:this.pt,unstyled:this.unstyled})})},isAutoPlayActive:function(){return this.slideShowActive},startSlideShow:function(){var e=this;this.interval=setInterval(function(){var t=e.$attrs.circular&&e.$attrs.value.length-1===e.activeIndex?0:e.activeIndex+1;e.activeIndex=t},this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow:function(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass:function(e,t){var r=["top","left","bottom","right"],i=r.find(function(o){return o===t});return i?"".concat(e,"-").concat(i):""},isVertical:function(){return this.$attrs.thumbnailsPosition==="left"||this.$attrs.thumbnailsPosition==="right"}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:GS,GalleriaThumbnails:YS,TimesIcon:Za},directives:{ripple:Nn}};function s2(n){"@babel/helpers - typeof";return s2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s2(n)}function tM(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function nM(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tM(Object(t),!0).forEach(function(r){LH(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):tM(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function LH(n,e,t){return e=BH(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function BH(n){var e=RH(n,"string");return s2(e)=="symbol"?e:String(e)}function RH(n,e){if(s2(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(s2(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var $H=["id","aria-label","aria-roledescription"],VH=["aria-label"],FH=["aria-live"];function jH(n,e,t,r,i,o){var s=l.resolveComponent("GalleriaItem"),a=l.resolveComponent("GalleriaThumbnails"),c=l.resolveDirective("ripple");return n.$attrs.value&&n.$attrs.value.length>0?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,id:i.id,role:"region",class:[n.cx("root"),n.$attrs.containerClass],style:n.$attrs.containerStyle,"aria-label":n.$attrs.ariaLabel,"aria-roledescription":n.$attrs.ariaRoledescription},nM(nM({},n.$attrs.containerProps),o.getPTOptions("root"))),[n.$attrs.fullScreen?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,autofocus:"",type:"button",class:n.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:e[0]||(e[0]=function(u){return n.$emit("mask-hide")})},o.getPTOptions("closeButton")),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.$attrs.templates.closeicon||"TimesIcon"),l.mergeProps({class:n.cx("closeIcon")},o.getPTOptions("closeIcon")),null,16,["class"]))],16,VH)),[[c]]):l.createCommentVNode("",!0),n.$attrs.templates&&n.$attrs.templates.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:n.cx("header")},o.getPTOptions("header")),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.$attrs.templates.header)))],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:n.cx("content"),"aria-live":n.$attrs.autoPlay?"polite":"off"},o.getPTOptions("content")),[l.createVNode(s,{id:i.id,activeIndex:i.activeIndex,"onUpdate:activeIndex":e[1]||(e[1]=function(u){return i.activeIndex=u}),slideShowActive:i.slideShowActive,"onUpdate:slideShowActive":e[2]||(e[2]=function(u){return i.slideShowActive=u}),value:n.$attrs.value,circular:n.$attrs.circular,templates:n.$attrs.templates,showIndicators:n.$attrs.showIndicators,changeItemOnIndicatorHover:n.$attrs.changeItemOnIndicatorHover,showItemNavigators:n.$attrs.showItemNavigators,autoPlay:n.$attrs.autoPlay,onStartSlideshow:o.startSlideShow,onStopSlideshow:o.stopSlideShow,pt:n.pt,unstyled:n.unstyled},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow","pt","unstyled"]),n.$attrs.showThumbnails?(l.openBlock(),l.createBlock(a,{key:0,activeIndex:i.activeIndex,"onUpdate:activeIndex":e[3]||(e[3]=function(u){return i.activeIndex=u}),slideShowActive:i.slideShowActive,"onUpdate:slideShowActive":e[4]||(e[4]=function(u){return i.slideShowActive=u}),containerId:i.id,value:n.$attrs.value,templates:n.$attrs.templates,numVisible:i.numVisible,responsiveOptions:n.$attrs.responsiveOptions,circular:n.$attrs.circular,isVertical:o.isVertical(),contentHeight:n.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:n.$attrs.showThumbnailNavigators,prevButtonProps:n.$attrs.prevButtonProps,nextButtonProps:n.$attrs.nextButtonProps,onStopSlideshow:o.stopSlideShow,pt:n.pt,unstyled:n.unstyled},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow","pt","unstyled"])):l.createCommentVNode("",!0)],16,FH),n.$attrs.templates&&n.$attrs.templates.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:2,class:n.cx("footer")},o.getPTOptions("footer")),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.$attrs.templates.footer)))],16)):l.createCommentVNode("",!0)],16,$H)):l.createCommentVNode("",!0)}eM.render=jH;var rM={name:"Galleria",extends:cH,inheritAttrs:!1,emits:["update:activeIndex","update:visible"],container:null,mask:null,data:function(){return{containerVisible:this.visible}},updated:function(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.fullScreen&&L.unblockBodyScroll(),this.mask=null,this.container&&(no.clear(this.container),this.container=null)},methods:{onBeforeEnter:function(e){no.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter:function(e){this.mask.style.zIndex=String(parseInt(e.style.zIndex,10)-1),L.blockBodyScroll(),this.focus()},onBeforeLeave:function(){!this.isUnstyled&&L.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave:function(e){no.clear(e),this.containerVisible=!1,L.unblockBodyScroll()},onActiveItemChange:function(e){this.activeIndex!==e&&this.$emit("update:activeIndex",e)},maskHide:function(){this.$emit("update:visible",!1)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},focus:function(){var e=this.container.$el.querySelector("[autofocus]");e&&e.focus()}},components:{GalleriaContent:eM,Portal:Gp},directives:{focustrap:ZS}},zH=["aria-modal"];function HH(n,e,t,r,i,o){var s=l.resolveComponent("GalleriaContent"),a=l.resolveComponent("Portal"),c=l.resolveDirective("focustrap");return n.fullScreen?(l.openBlock(),l.createBlock(a,{key:0},{default:l.withCtx(function(){return[i.containerVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:o.maskRef,class:[n.cx("mask"),n.maskClass],role:"dialog","aria-modal":n.fullScreen?"true":void 0},n.ptm("mask")),[l.createVNode(l.Transition,l.mergeProps({name:"p-galleria",onBeforeEnter:o.onBeforeEnter,onEnter:o.onEnter,onBeforeLeave:o.onBeforeLeave,onAfterLeave:o.onAfterLeave,appear:""},n.ptm("transition")),{default:l.withCtx(function(){return[n.visible?l.withDirectives((l.openBlock(),l.createBlock(s,l.mergeProps({key:0,ref:o.containerRef,onMaskHide:o.maskHide,templates:n.$slots,onActiveitemChange:o.onActiveItemChange,pt:n.pt,unstyled:n.unstyled},n.$props),null,16,["onMaskHide","templates","onActiveitemChange","pt","unstyled"])),[[c]]):l.createCommentVNode("",!0)]}),_:1},16,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],16,zH)):l.createCommentVNode("",!0)]}),_:1})):(l.openBlock(),l.createBlock(s,l.mergeProps({key:1,templates:n.$slots,onActiveitemChange:o.onActiveItemChange,pt:n.pt,unstyled:n.unstyled},n.$props),null,16,["templates","onActiveitemChange","pt","unstyled"]))}rM.render=HH;const UH=l.defineComponent({name:"QMenu",props:{modelValue:{type:Boolean,default:!1},actions:{type:Array},dismissibleOverlay:{type:Boolean,default:!0},links:{type:Array,required:!0},linksBackground:{type:String,default:"bg-white"},overlay:{type:String,default:"black-transparent"}},emits:["click:link","click:action"],setup(){return l.onUnmounted(()=>{document.body.classList.remove("scroll-disabled")}),l.onMounted(()=>{document.body.classList.add("scroll-disabled")}),{}}}),ZH=n=>(l.pushScopeId("data-v-bd24b7a3"),n=n(),l.popScopeId(),n),WH=["value"],qH=ZH(()=>l.createElementVNode("div",{class:"overlay"},null,-1)),KH={class:"q-menu-content px-4 pb-10"},GH=["onClick"],YH={class:"actions"},QH=["onClick"];function XH(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["q-menu",n.overlay]),value:n.modelValue},[qH,l.createElementVNode("div",KH,[l.renderSlot(n.$slots,"links",{},()=>[l.createElementVNode("ul",{class:l.normalizeClass(["links rounded-[0.8125rem] mb-2",n.linksBackground])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.links,(s,a)=>(l.openBlock(),l.createElementBlock("li",{key:a},[l.createElementVNode("a",{class:l.normalizeClass(["px-4 py-[1.125rem] flex items-center justify-center cursor-pointer text-inkwell-00 text-md",s.classes]),onClick:c=>n.$emit("click:link",s)},l.toDisplayString(s.text),11,GH)]))),128))],2)],!0),l.renderSlot(n.$slots,"actions",{},()=>[l.createElementVNode("ul",YH,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.actions,(s,a)=>(l.openBlock(),l.createElementBlock("li",{key:a},[l.createElementVNode("a",{class:"bg-white px-4 py-[1.125rem] rounded-[0.8125rem] flex items-center justify-center cursor-pointer text-blue-20 text-md font-semibold",onClick:c=>n.$emit("click:action",s)},l.toDisplayString(s.text),9,QH)]))),128))])],!0)])],10,WH)}const m4=me(UH,[["render",XH],["__scopeId","data-v-bd24b7a3"]]);var JH={9306:(n,e,t)=>{var r=t(4901),i=t(6823),o=TypeError;n.exports=function(s){if(r(s))return s;throw new o(i(s)+" is not a function")}},3506:(n,e,t)=>{var r=t(3925),i=String,o=TypeError;n.exports=function(s){if(r(s))return s;throw new o("Can't set "+i(s)+" as a prototype")}},7080:(n,e,t)=>{var r=t(4402).has;n.exports=function(i){return r(i),i}},679:(n,e,t)=>{var r=t(1625),i=TypeError;n.exports=function(o,s){if(r(s,o))return o;throw new i("Incorrect invocation")}},8551:(n,e,t)=>{var r=t(34),i=String,o=TypeError;n.exports=function(s){if(r(s))return s;throw new o(i(s)+" is not an object")}},7811:n=>{n.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},7394:(n,e,t)=>{var r=t(4576),i=t(6706),o=t(2195),s=r.ArrayBuffer,a=r.TypeError;n.exports=s&&i(s.prototype,"byteLength","get")||function(c){if(o(c)!=="ArrayBuffer")throw new a("ArrayBuffer expected");return c.byteLength}},3238:(n,e,t)=>{var r=t(4576),i=t(7476),o=t(7394),s=r.ArrayBuffer,a=s&&s.prototype,c=a&&i(a.slice);n.exports=function(u){if(o(u)!==0||!c)return!1;try{return c(u,0,0),!1}catch{return!0}}},5169:(n,e,t)=>{var r=t(3238),i=TypeError;n.exports=function(o){if(r(o))throw new i("ArrayBuffer is detached");return o}},5636:(n,e,t)=>{var r=t(4576),i=t(9504),o=t(6706),s=t(7696),a=t(5169),c=t(7394),u=t(4483),d=t(1548),f=r.structuredClone,h=r.ArrayBuffer,p=r.DataView,m=Math.min,y=h.prototype,b=p.prototype,w=i(y.slice),v=o(y,"resizable","get"),k=o(y,"maxByteLength","get"),C=i(b.getInt8),T=i(b.setInt8);n.exports=(d||u)&&function(S,A,D){var I,P=c(S),O=A===void 0?P:s(A),_=!v||!v(S);if(a(S),d&&(S=f(S,{transfer:[S]}),P===O&&(D||_)))return S;if(P>=O&&(!D||_))I=w(S,0,O);else{var B=D&&!_&&k?{maxByteLength:k(S)}:void 0;I=new h(O,B);for(var $=new p(S),R=new p(I),N=m(O,P),W=0;W<N;W++)T(R,W,C($,W))}return d||u(S),I}},4644:(n,e,t)=>{var r,i,o,s=t(7811),a=t(3724),c=t(4576),u=t(4901),d=t(34),f=t(9297),h=t(6955),p=t(6823),m=t(6699),y=t(6840),b=t(2106),w=t(1625),v=t(2787),k=t(2967),C=t(8227),T=t(3392),S=t(1181),A=S.enforce,D=S.get,I=c.Int8Array,P=I&&I.prototype,O=c.Uint8ClampedArray,_=O&&O.prototype,B=I&&v(I),$=P&&v(P),R=Object.prototype,N=c.TypeError,W=C("toStringTag"),F=T("TYPED_ARRAY_TAG"),K="TypedArrayConstructor",ae=s&&!!k&&h(c.opera)!=="Opera",de=!1,Q={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Z={BigInt64Array:8,BigUint64Array:8},H=function(q){var ne=v(q);if(d(ne)){var le=D(ne);return le&&f(le,K)?le[K]:H(ne)}},j=function(q){if(!d(q))return!1;var ne=h(q);return f(Q,ne)||f(Z,ne)};for(r in Q)(o=(i=c[r])&&i.prototype)?A(o)[K]=i:ae=!1;for(r in Z)(o=(i=c[r])&&i.prototype)&&(A(o)[K]=i);if((!ae||!u(B)||B===Function.prototype)&&(B=function(){throw new N("Incorrect invocation")},ae))for(r in Q)c[r]&&k(c[r],B);if((!ae||!$||$===R)&&($=B.prototype,ae))for(r in Q)c[r]&&k(c[r].prototype,$);if(ae&&v(_)!==$&&k(_,$),a&&!f($,W)){de=!0,b($,W,{configurable:!0,get:function(){return d(this)?this[F]:void 0}});for(r in Q)c[r]&&m(c[r],F,r)}n.exports={NATIVE_ARRAY_BUFFER_VIEWS:ae,TYPED_ARRAY_TAG:de&&F,aTypedArray:function(q){if(j(q))return q;throw new N("Target is not a typed array")},aTypedArrayConstructor:function(q){if(u(q)&&(!k||w(B,q)))return q;throw new N(p(q)+" is not a typed array constructor")},exportTypedArrayMethod:function(q,ne,le,Oe){if(a){if(le)for(var Ee in Q){var He=c[Ee];if(He&&f(He.prototype,q))try{delete He.prototype[q]}catch{try{He.prototype[q]=ne}catch{}}}$[q]&&!le||y($,q,le?ne:ae&&P[q]||ne,Oe)}},exportTypedArrayStaticMethod:function(q,ne,le){var Oe,Ee;if(a){if(k){if(le){for(Oe in Q)if((Ee=c[Oe])&&f(Ee,q))try{delete Ee[q]}catch{}}if(B[q]&&!le)return;try{return y(B,q,le?ne:ae&&B[q]||ne)}catch{}}for(Oe in Q)!(Ee=c[Oe])||Ee[q]&&!le||y(Ee,q,ne)}},getTypedArrayConstructor:H,isView:function(ne){if(!d(ne))return!1;var le=h(ne);return le==="DataView"||f(Q,le)||f(Z,le)},isTypedArray:j,TypedArray:B,TypedArrayPrototype:$}},5370:(n,e,t)=>{var r=t(6198);n.exports=function(i,o,s){for(var a=0,c=arguments.length>2?s:r(o),u=new i(c);c>a;)u[a]=o[a++];return u}},9617:(n,e,t)=>{var r=t(5397),i=t(5610),o=t(6198),s=function(a){return function(c,u,d){var f=r(c),h=o(f);if(h===0)return!a&&-1;var p,m=i(d,h);if(a&&u!=u){for(;h>m;)if((p=f[m++])!=p)return!0}else for(;h>m;m++)if((a||m in f)&&f[m]===u)return a||m||0;return!a&&-1}};n.exports={includes:s(!0),indexOf:s(!1)}},4527:(n,e,t)=>{var r=t(3724),i=t(4376),o=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(c){return c instanceof TypeError}}();n.exports=a?function(c,u){if(i(c)&&!s(c,"length").writable)throw new o("Cannot set read only .length");return c.length=u}:function(c,u){return c.length=u}},7628:(n,e,t)=>{var r=t(6198);n.exports=function(i,o){for(var s=r(i),a=new o(s),c=0;c<s;c++)a[c]=i[s-c-1];return a}},9928:(n,e,t)=>{var r=t(6198),i=t(1291),o=RangeError;n.exports=function(s,a,c,u){var d=r(s),f=i(c),h=f<0?d+f:f;if(h>=d||h<0)throw new o("Incorrect index");for(var p=new a(d),m=0;m<d;m++)p[m]=m===h?u:s[m];return p}},6319:(n,e,t)=>{var r=t(8551),i=t(9539);n.exports=function(o,s,a,c){try{return c?s(r(a)[0],a[1]):s(a)}catch(u){i(o,"throw",u)}}},2195:(n,e,t)=>{var r=t(9504),i=r({}.toString),o=r("".slice);n.exports=function(s){return o(i(s),8,-1)}},6955:(n,e,t)=>{var r=t(2140),i=t(4901),o=t(2195),s=t(8227)("toStringTag"),a=Object,c=o(function(){return arguments}())==="Arguments";n.exports=r?o:function(u){var d,f,h;return u===void 0?"Undefined":u===null?"Null":typeof(f=function(p,m){try{return p[m]}catch{}}(d=a(u),s))=="string"?f:c?o(d):(h=o(d))==="Object"&&i(d.callee)?"Arguments":h}},7740:(n,e,t)=>{var r=t(9297),i=t(5031),o=t(7347),s=t(4913);n.exports=function(a,c,u){for(var d=i(c),f=s.f,h=o.f,p=0;p<d.length;p++){var m=d[p];r(a,m)||u&&r(u,m)||f(a,m,h(c,m))}}},2211:(n,e,t)=>{var r=t(9039);n.exports=!r(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype})},2529:n=>{n.exports=function(e,t){return{value:e,done:t}}},6699:(n,e,t)=>{var r=t(3724),i=t(4913),o=t(6980);n.exports=r?function(s,a,c){return i.f(s,a,o(1,c))}:function(s,a,c){return s[a]=c,s}},6980:n=>{n.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4659:(n,e,t)=>{var r=t(3724),i=t(4913),o=t(6980);n.exports=function(s,a,c){r?i.f(s,a,o(0,c)):s[a]=c}},2106:(n,e,t)=>{var r=t(283),i=t(4913);n.exports=function(o,s,a){return a.get&&r(a.get,s,{getter:!0}),a.set&&r(a.set,s,{setter:!0}),i.f(o,s,a)}},6840:(n,e,t)=>{var r=t(4901),i=t(4913),o=t(283),s=t(9433);n.exports=function(a,c,u,d){d||(d={});var f=d.enumerable,h=d.name!==void 0?d.name:c;if(r(u)&&o(u,h,d),d.global)f?a[c]=u:s(c,u);else{try{d.unsafe?a[c]&&(f=!0):delete a[c]}catch{}f?a[c]=u:i.f(a,c,{value:u,enumerable:!1,configurable:!d.nonConfigurable,writable:!d.nonWritable})}return a}},6279:(n,e,t)=>{var r=t(6840);n.exports=function(i,o,s){for(var a in o)r(i,a,o[a],s);return i}},9433:(n,e,t)=>{var r=t(4576),i=Object.defineProperty;n.exports=function(o,s){try{i(r,o,{value:s,configurable:!0,writable:!0})}catch{r[o]=s}return s}},3724:(n,e,t)=>{var r=t(9039);n.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4483:(n,e,t)=>{var r,i,o,s,a=t(4576),c=t(9429),u=t(1548),d=a.structuredClone,f=a.ArrayBuffer,h=a.MessageChannel,p=!1;if(u)p=function(m){d(m,{transfer:[m]})};else if(f)try{h||(r=c("worker_threads"))&&(h=r.MessageChannel),h&&(i=new h,o=new f(2),s=function(m){i.port1.postMessage(null,[m])},o.byteLength===2&&(s(o),o.byteLength===0&&(p=s)))}catch{}n.exports=p},4055:(n,e,t)=>{var r=t(4576),i=t(34),o=r.document,s=i(o)&&i(o.createElement);n.exports=function(a){return s?o.createElement(a):{}}},6837:n=>{var e=TypeError;n.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},5002:n=>{n.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:n=>{n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193:(n,e,t)=>{var r=t(4215);n.exports=r==="NODE"},2839:(n,e,t)=>{var r=t(4576).navigator,i=r&&r.userAgent;n.exports=i?String(i):""},9519:(n,e,t)=>{var r,i,o=t(4576),s=t(2839),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,d=u&&u.v8;d&&(i=(r=d.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),n.exports=i},4215:(n,e,t)=>{var r=t(4576),i=t(2839),o=t(2195),s=function(a){return i.slice(0,a.length)===a};n.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":o(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"},8574:(n,e,t)=>{var r=t(9504),i=Error,o=r("".replace),s=String(new i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(s);n.exports=function(u,d){if(c&&typeof u=="string"&&!i.prepareStackTrace)for(;d--;)u=o(u,a,"");return u}},6518:(n,e,t)=>{var r=t(4576),i=t(7347).f,o=t(6699),s=t(6840),a=t(9433),c=t(7740),u=t(2796);n.exports=function(d,f){var h,p,m,y,b,w=d.target,v=d.global,k=d.stat;if(h=v?r:k?r[w]||a(w,{}):r[w]&&r[w].prototype)for(p in f){if(y=f[p],m=d.dontCallGetSet?(b=i(h,p))&&b.value:h[p],!u(v?p:w+(k?".":"#")+p,d.forced)&&m!==void 0){if(typeof y==typeof m)continue;c(y,m)}(d.sham||m&&m.sham)&&o(y,"sham",!0),s(h,p,y,d)}}},9039:n=>{n.exports=function(e){try{return!!e()}catch{return!0}}},6080:(n,e,t)=>{var r=t(7476),i=t(9306),o=t(616),s=r(r.bind);n.exports=function(a,c){return i(a),c===void 0?a:o?s(a,c):function(){return a.apply(c,arguments)}}},616:(n,e,t)=>{var r=t(9039);n.exports=!r(function(){var i=(function(){}).bind();return typeof i!="function"||i.hasOwnProperty("prototype")})},9565:(n,e,t)=>{var r=t(616),i=Function.prototype.call;n.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},350:(n,e,t)=>{var r=t(3724),i=t(9297),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&(function(){}).name==="something",u=a&&(!r||r&&s(o,"name").configurable);n.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},6706:(n,e,t)=>{var r=t(9504),i=t(9306);n.exports=function(o,s,a){try{return r(i(Object.getOwnPropertyDescriptor(o,s)[a]))}catch{}}},7476:(n,e,t)=>{var r=t(2195),i=t(9504);n.exports=function(o){if(r(o)==="Function")return i(o)}},9504:(n,e,t)=>{var r=t(616),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);n.exports=r?s:function(a){return function(){return o.apply(a,arguments)}}},9429:(n,e,t)=>{var r=t(4576),i=t(6193);n.exports=function(o){if(i){try{return r.process.getBuiltinModule(o)}catch{}try{return Function('return require("'+o+'")')()}catch{}}}},7751:(n,e,t)=>{var r=t(4576),i=t(4901);n.exports=function(o,s){return arguments.length<2?(a=r[o],i(a)?a:void 0):r[o]&&r[o][s];var a}},1767:n=>{n.exports=function(e){return{iterator:e,next:e.next,done:!1}}},8646:(n,e,t)=>{var r=t(9565),i=t(8551),o=t(1767),s=t(851);n.exports=function(a,c){c&&typeof a=="string"||i(a);var u=s(a);return o(i(u!==void 0?r(u,a):a))}},851:(n,e,t)=>{var r=t(6955),i=t(5966),o=t(4117),s=t(6269),a=t(8227)("iterator");n.exports=function(c){if(!o(c))return i(c,a)||i(c,"@@iterator")||s[r(c)]}},81:(n,e,t)=>{var r=t(9565),i=t(9306),o=t(8551),s=t(6823),a=t(851),c=TypeError;n.exports=function(u,d){var f=arguments.length<2?a(u):d;if(i(f))return o(r(f,u));throw new c(s(u)+" is not iterable")}},5966:(n,e,t)=>{var r=t(9306),i=t(4117);n.exports=function(o,s){var a=o[s];return i(a)?void 0:r(a)}},3789:(n,e,t)=>{var r=t(9306),i=t(8551),o=t(9565),s=t(1291),a=t(1767),c="Invalid size",u=RangeError,d=TypeError,f=Math.max,h=function(p,m){this.set=p,this.size=f(m,0),this.has=r(p.has),this.keys=r(p.keys)};h.prototype={getIterator:function(){return a(i(o(this.keys,this.set)))},includes:function(p){return o(this.has,this.set,p)}},n.exports=function(p){i(p);var m=+p.size;if(m!=m)throw new d(c);var y=s(m);if(y<0)throw new u(c);return new h(p,y)}},4576:function(n){var e=function(t){return t&&t.Math===Math&&t};n.exports=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof global=="object"&&global)||e(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:(n,e,t)=>{var r=t(9504),i=t(8981),o=r({}.hasOwnProperty);n.exports=Object.hasOwn||function(a,c){return o(i(a),c)}},421:n=>{n.exports={}},397:(n,e,t)=>{var r=t(7751);n.exports=r("document","documentElement")},5917:(n,e,t)=>{var r=t(3724),i=t(9039),o=t(4055);n.exports=!r&&!i(function(){return Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a!==7})},7055:(n,e,t)=>{var r=t(9504),i=t(9039),o=t(2195),s=Object,a=r("".split);n.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(c){return o(c)==="String"?a(c,""):s(c)}:s},3167:(n,e,t)=>{var r=t(4901),i=t(34),o=t(2967);n.exports=function(s,a,c){var u,d;return o&&r(u=a.constructor)&&u!==c&&i(d=u.prototype)&&d!==c.prototype&&o(s,d),s}},3706:(n,e,t)=>{var r=t(9504),i=t(4901),o=t(7629),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(a){return s(a)}),n.exports=o.inspectSource},1181:(n,e,t)=>{var r,i,o,s=t(8622),a=t(4576),c=t(34),u=t(6699),d=t(9297),f=t(7629),h=t(6119),p=t(421),m="Object already initialized",y=a.TypeError,b=a.WeakMap;if(s||f.state){var w=f.state||(f.state=new b);w.get=w.get,w.has=w.has,w.set=w.set,r=function(k,C){if(w.has(k))throw new y(m);return C.facade=k,w.set(k,C),C},i=function(k){return w.get(k)||{}},o=function(k){return w.has(k)}}else{var v=h("state");p[v]=!0,r=function(k,C){if(d(k,v))throw new y(m);return C.facade=k,u(k,v,C),C},i=function(k){return d(k,v)?k[v]:{}},o=function(k){return d(k,v)}}n.exports={set:r,get:i,has:o,enforce:function(k){return o(k)?i(k):r(k,{})},getterFor:function(k){return function(C){var T;if(!c(C)||(T=i(C)).type!==k)throw new y("Incompatible receiver, "+k+" required");return T}}}},4209:(n,e,t)=>{var r=t(8227),i=t(6269),o=r("iterator"),s=Array.prototype;n.exports=function(a){return a!==void 0&&(i.Array===a||s[o]===a)}},4376:(n,e,t)=>{var r=t(2195);n.exports=Array.isArray||function(o){return r(o)==="Array"}},1108:(n,e,t)=>{var r=t(6955);n.exports=function(i){var o=r(i);return o==="BigInt64Array"||o==="BigUint64Array"}},4901:n=>{var e=typeof document=="object"&&document.all;n.exports=e===void 0&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"}},2796:(n,e,t)=>{var r=t(9039),i=t(4901),o=/#|\.prototype\./,s=function(f,h){var p=c[a(f)];return p===d||p!==u&&(i(h)?r(h):!!h)},a=s.normalize=function(f){return String(f).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",d=s.POLYFILL="P";n.exports=s},4117:n=>{n.exports=function(e){return e==null}},34:(n,e,t)=>{var r=t(4901);n.exports=function(i){return typeof i=="object"?i!==null:r(i)}},3925:(n,e,t)=>{var r=t(34);n.exports=function(i){return r(i)||i===null}},6395:n=>{n.exports=!1},757:(n,e,t)=>{var r=t(7751),i=t(4901),o=t(1625),s=t(7040),a=Object;n.exports=s?function(c){return typeof c=="symbol"}:function(c){var u=r("Symbol");return i(u)&&o(u.prototype,a(c))}},507:(n,e,t)=>{var r=t(9565);n.exports=function(i,o,s){for(var a,c,u=s?i:i.iterator,d=i.next;!(a=r(d,u)).done;)if((c=o(a.value))!==void 0)return c}},2652:(n,e,t)=>{var r=t(6080),i=t(9565),o=t(8551),s=t(6823),a=t(4209),c=t(6198),u=t(1625),d=t(81),f=t(851),h=t(9539),p=TypeError,m=function(b,w){this.stopped=b,this.result=w},y=m.prototype;n.exports=function(b,w,v){var k,C,T,S,A,D,I,P=v&&v.that,O=!(!v||!v.AS_ENTRIES),_=!(!v||!v.IS_RECORD),B=!(!v||!v.IS_ITERATOR),$=!(!v||!v.INTERRUPTED),R=r(w,P),N=function(F){return k&&h(k,"normal",F),new m(!0,F)},W=function(F){return O?(o(F),$?R(F[0],F[1],N):R(F[0],F[1])):$?R(F,N):R(F)};if(_)k=b.iterator;else if(B)k=b;else{if(!(C=f(b)))throw new p(s(b)+" is not iterable");if(a(C)){for(T=0,S=c(b);S>T;T++)if((A=W(b[T]))&&u(y,A))return A;return new m(!1)}k=d(b,C)}for(D=_?b.next:k.next;!(I=i(D,k)).done;){try{A=W(I.value)}catch(F){h(k,"throw",F)}if(typeof A=="object"&&A&&u(y,A))return A}return new m(!1)}},9539:(n,e,t)=>{var r=t(9565),i=t(8551),o=t(5966);n.exports=function(s,a,c){var u,d;i(s);try{if(!(u=o(s,"return"))){if(a==="throw")throw c;return c}u=r(u,s)}catch(f){d=!0,u=f}if(a==="throw")throw c;if(d)throw u;return i(u),c}},9462:(n,e,t)=>{var r=t(9565),i=t(2360),o=t(6699),s=t(6279),a=t(8227),c=t(1181),u=t(5966),d=t(7657).IteratorPrototype,f=t(2529),h=t(9539),p=a("toStringTag"),m="IteratorHelper",y="WrapForValidIterator",b=c.set,w=function(C){var T=c.getterFor(C?y:m);return s(i(d),{next:function(){var A=T(this);if(C)return A.nextHandler();try{var D=A.done?void 0:A.nextHandler();return f(D,A.done)}catch(I){throw A.done=!0,I}},return:function(){var S=T(this),A=S.iterator;if(S.done=!0,C){var D=u(A,"return");return D?r(D,A):f(void 0,!0)}if(S.inner)try{h(S.inner.iterator,"normal")}catch(I){return h(A,"throw",I)}return h(A,"normal"),f(void 0,!0)}})},v=w(!0),k=w(!1);o(k,p,"Iterator Helper"),n.exports=function(C,T){var S=function(D,I){I?(I.iterator=D.iterator,I.next=D.next):I=D,I.type=T?y:m,I.nextHandler=C,I.counter=0,I.done=!1,b(this,I)};return S.prototype=T?v:k,S}},713:(n,e,t)=>{var r=t(9565),i=t(9306),o=t(8551),s=t(1767),a=t(9462),c=t(6319),u=a(function(){var d=this.iterator,f=o(r(this.next,d));if(!(this.done=!!f.done))return c(d,this.mapper,[f.value,this.counter++],!0)});n.exports=function(f){return o(this),i(f),new u(s(this),{mapper:f})}},7657:(n,e,t)=>{var r,i,o,s=t(9039),a=t(4901),c=t(34),u=t(2360),d=t(2787),f=t(6840),h=t(8227),p=t(6395),m=h("iterator"),y=!1;[].keys&&("next"in(o=[].keys())?(i=d(d(o)))!==Object.prototype&&(r=i):y=!0),!c(r)||s(function(){var b={};return r[m].call(b)!==b})?r={}:p&&(r=u(r)),a(r[m])||f(r,m,function(){return this}),n.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:y}},6269:n=>{n.exports={}},6198:(n,e,t)=>{var r=t(8014);n.exports=function(i){return r(i.length)}},283:(n,e,t)=>{var r=t(9504),i=t(9039),o=t(4901),s=t(9297),a=t(3724),c=t(350).CONFIGURABLE,u=t(3706),d=t(1181),f=d.enforce,h=d.get,p=String,m=Object.defineProperty,y=r("".slice),b=r("".replace),w=r([].join),v=a&&!i(function(){return m(function(){},"length",{value:8}).length!==8}),k=String(String).split("String"),C=n.exports=function(T,S,A){y(p(S),0,7)==="Symbol("&&(S="["+b(p(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(S="get "+S),A&&A.setter&&(S="set "+S),(!s(T,"name")||c&&T.name!==S)&&(a?m(T,"name",{value:S,configurable:!0}):T.name=S),v&&A&&s(A,"arity")&&T.length!==A.arity&&m(T,"length",{value:A.arity});try{A&&s(A,"constructor")&&A.constructor?a&&m(T,"prototype",{writable:!1}):T.prototype&&(T.prototype=void 0)}catch{}var D=f(T);return s(D,"source")||(D.source=w(k,typeof S=="string"?S:"")),T};Function.prototype.toString=C(function(){return o(this)&&h(this).source||u(this)},"toString")},741:n=>{var e=Math.ceil,t=Math.floor;n.exports=Math.trunc||function(i){var o=+i;return(o>0?t:e)(o)}},6043:(n,e,t)=>{var r=t(9306),i=TypeError,o=function(s){var a,c;this.promise=new s(function(u,d){if(a!==void 0||c!==void 0)throw new i("Bad Promise constructor");a=u,c=d}),this.resolve=r(a),this.reject=r(c)};n.exports.f=function(s){return new o(s)}},2603:(n,e,t)=>{var r=t(655);n.exports=function(i,o){return i===void 0?arguments.length<2?"":o:r(i)}},4149:n=>{var e=RangeError;n.exports=function(t){if(t==t)return t;throw new e("NaN is not allowed")}},2360:(n,e,t)=>{var r,i=t(8551),o=t(6801),s=t(8727),a=t(421),c=t(397),u=t(4055),d=t(6119),f="prototype",h="script",p=d("IE_PROTO"),m=function(){},y=function(v){return"<"+h+">"+v+"</"+h+">"},b=function(v){v.write(y("")),v.close();var k=v.parentWindow.Object;return v=null,k},w=function(){try{r=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&r?b(r):function(){var k,C=u("iframe"),T="java"+h+":";return C.style.display="none",c.appendChild(C),C.src=String(T),(k=C.contentWindow.document).open(),k.write(y("document.F=Object")),k.close(),k.F}():b(r);for(var v=s.length;v--;)delete w[f][s[v]];return w()};a[p]=!0,n.exports=Object.create||function(k,C){var T;return k!==null?(m[f]=i(k),T=new m,m[f]=null,T[p]=k):T=w(),C===void 0?T:o.f(T,C)}},6801:(n,e,t)=>{var r=t(3724),i=t(8686),o=t(4913),s=t(8551),a=t(5397),c=t(1072);e.f=r&&!i?Object.defineProperties:function(d,f){s(d);for(var h,p=a(f),m=c(f),y=m.length,b=0;y>b;)o.f(d,h=m[b++],p[h]);return d}},4913:(n,e,t)=>{var r=t(3724),i=t(5917),o=t(8686),s=t(8551),a=t(6969),c=TypeError,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";e.f=r?o?function(y,b,w){if(s(y),b=a(b),s(w),typeof y=="function"&&b==="prototype"&&"value"in w&&p in w&&!w[p]){var v=d(y,b);v&&v[p]&&(y[b]=w.value,w={configurable:h in w?w[h]:v[h],enumerable:f in w?w[f]:v[f],writable:!1})}return u(y,b,w)}:u:function(y,b,w){if(s(y),b=a(b),s(w),i)try{return u(y,b,w)}catch{}if("get"in w||"set"in w)throw new c("Accessors not supported");return"value"in w&&(y[b]=w.value),y}},7347:(n,e,t)=>{var r=t(3724),i=t(9565),o=t(8773),s=t(6980),a=t(5397),c=t(6969),u=t(9297),d=t(5917),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(p,m){if(p=a(p),m=c(m),d)try{return f(p,m)}catch{}if(u(p,m))return s(!i(o.f,p,m),p[m])}},8480:(n,e,t)=>{var r=t(1828),i=t(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(s){return r(s,i)}},3717:(n,e)=>{e.f=Object.getOwnPropertySymbols},2787:(n,e,t)=>{var r=t(9297),i=t(4901),o=t(8981),s=t(6119),a=t(2211),c=s("IE_PROTO"),u=Object,d=u.prototype;n.exports=a?u.getPrototypeOf:function(f){var h=o(f);if(r(h,c))return h[c];var p=h.constructor;return i(p)&&h instanceof p?p.prototype:h instanceof u?d:null}},1625:(n,e,t)=>{var r=t(9504);n.exports=r({}.isPrototypeOf)},1828:(n,e,t)=>{var r=t(9504),i=t(9297),o=t(5397),s=t(9617).indexOf,a=t(421),c=r([].push);n.exports=function(u,d){var f,h=o(u),p=0,m=[];for(f in h)!i(a,f)&&i(h,f)&&c(m,f);for(;d.length>p;)i(h,f=d[p++])&&(~s(m,f)||c(m,f));return m}},1072:(n,e,t)=>{var r=t(1828),i=t(8727);n.exports=Object.keys||function(s){return r(s,i)}},8773:(n,e)=>{var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!t.call({1:2},1);e.f=i?function(s){var a=r(this,s);return!!a&&a.enumerable}:t},2967:(n,e,t)=>{var r=t(6706),i=t(34),o=t(7750),s=t(3506);n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var a,c=!1,u={};try{(a=r(Object.prototype,"__proto__","set"))(u,[]),c=u instanceof Array}catch{}return function(f,h){return o(f),s(h),i(f)&&(c?a(f,h):f.__proto__=h),f}}():void 0)},4270:(n,e,t)=>{var r=t(9565),i=t(4901),o=t(34),s=TypeError;n.exports=function(a,c){var u,d;if(c==="string"&&i(u=a.toString)&&!o(d=r(u,a))||i(u=a.valueOf)&&!o(d=r(u,a))||c!=="string"&&i(u=a.toString)&&!o(d=r(u,a)))return d;throw new s("Can't convert object to primitive value")}},5031:(n,e,t)=>{var r=t(7751),i=t(9504),o=t(8480),s=t(3717),a=t(8551),c=i([].concat);n.exports=r("Reflect","ownKeys")||function(d){var f=o.f(a(d)),h=s.f;return h?c(f,h(d)):f}},8235:(n,e,t)=>{var r=t(9504),i=t(9297),o=SyntaxError,s=parseInt,a=String.fromCharCode,c=r("".charAt),u=r("".slice),d=r(/./.exec),f={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
120
120
  `,"\\r":"\r","\\t":" "},h=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;n.exports=function(m,y){for(var b=!0,w="";y<m.length;){var v=c(m,y);if(v==="\\"){var k=u(m,y,y+2);if(i(f,k))w+=f[k],y+=2;else{if(k!=="\\u")throw new o('Unknown escape sequence: "'+k+'"');var C=u(m,y+=2,y+4);if(!d(h,C))throw new o("Bad Unicode escape at: "+y);w+=a(s(C,16)),y+=4}}else{if(v==='"'){b=!1,y++;break}if(d(p,v))throw new o("Bad control character in string literal at: "+y);w+=v,y++}}if(b)throw new o("Unterminated string at: "+y);return{value:w,end:y}}},7750:(n,e,t)=>{var r=t(4117),i=TypeError;n.exports=function(o){if(r(o))throw new i("Can't call method on "+o);return o}},9286:(n,e,t)=>{var r=t(4402),i=t(8469),o=r.Set,s=r.add;n.exports=function(a){var c=new o;return i(a,function(u){s(c,u)}),c}},3440:(n,e,t)=>{var r=t(7080),i=t(4402),o=t(9286),s=t(5170),a=t(3789),c=t(8469),u=t(507),d=i.has,f=i.remove;n.exports=function(p){var m=r(this),y=a(p),b=o(m);return s(m)<=y.size?c(m,function(w){y.includes(w)&&f(b,w)}):u(y.getIterator(),function(w){d(m,w)&&f(b,w)}),b}},4402:(n,e,t)=>{var r=t(9504),i=Set.prototype;n.exports={Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},8750:(n,e,t)=>{var r=t(7080),i=t(4402),o=t(5170),s=t(3789),a=t(8469),c=t(507),u=i.Set,d=i.add,f=i.has;n.exports=function(p){var m=r(this),y=s(p),b=new u;return o(m)>y.size?c(y.getIterator(),function(w){f(m,w)&&d(b,w)}):a(m,function(w){y.includes(w)&&d(b,w)}),b}},4449:(n,e,t)=>{var r=t(7080),i=t(4402).has,o=t(5170),s=t(3789),a=t(8469),c=t(507),u=t(9539);n.exports=function(f){var h=r(this),p=s(f);if(o(h)<=p.size)return a(h,function(y){if(p.includes(y))return!1},!0)!==!1;var m=p.getIterator();return c(m,function(y){if(i(h,y))return u(m,"normal",!1)})!==!1}},3838:(n,e,t)=>{var r=t(7080),i=t(5170),o=t(8469),s=t(3789);n.exports=function(c){var u=r(this),d=s(c);return!(i(u)>d.size)&&o(u,function(f){if(!d.includes(f))return!1},!0)!==!1}},8527:(n,e,t)=>{var r=t(7080),i=t(4402).has,o=t(5170),s=t(3789),a=t(507),c=t(9539);n.exports=function(d){var f=r(this),h=s(d);if(o(f)<h.size)return!1;var p=h.getIterator();return a(p,function(m){if(!i(f,m))return c(p,"normal",!1)})!==!1}},8469:(n,e,t)=>{var r=t(9504),i=t(507),o=t(4402),s=o.Set,a=o.proto,c=r(a.forEach),u=r(a.keys),d=u(new s).next;n.exports=function(f,h,p){return p?i({iterator:u(f),next:d},h):c(f,h)}},4916:(n,e,t)=>{var r=t(7751),i=function(o){return{size:o,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};n.exports=function(o){var s=r("Set");try{new s()[o](i(0));try{return new s()[o](i(-1)),!1}catch{return!0}}catch{return!1}}},5170:(n,e,t)=>{var r=t(6706),i=t(4402);n.exports=r(i.proto,"size","get")||function(o){return o.size}},3650:(n,e,t)=>{var r=t(7080),i=t(4402),o=t(9286),s=t(3789),a=t(507),c=i.add,u=i.has,d=i.remove;n.exports=function(h){var p=r(this),m=s(h).getIterator(),y=o(p);return a(m,function(b){u(p,b)?d(y,b):c(y,b)}),y}},4204:(n,e,t)=>{var r=t(7080),i=t(4402).add,o=t(9286),s=t(3789),a=t(507);n.exports=function(u){var d=r(this),f=s(u).getIterator(),h=o(d);return a(f,function(p){i(h,p)}),h}},6119:(n,e,t)=>{var r=t(5745),i=t(3392),o=r("keys");n.exports=function(s){return o[s]||(o[s]=i(s))}},7629:(n,e,t)=>{var r=t(6395),i=t(4576),o=t(9433),s="__core-js_shared__",a=n.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.38.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(n,e,t)=>{var r=t(7629);n.exports=function(i,o){return r[i]||(r[i]=o||{})}},1548:(n,e,t)=>{var r=t(4576),i=t(9039),o=t(9519),s=t(4215),a=r.structuredClone;n.exports=!!a&&!i(function(){if(s==="DENO"&&o>92||s==="NODE"&&o>94||s==="BROWSER"&&o>97)return!1;var c=new ArrayBuffer(8),u=a(c,{transfer:[c]});return c.byteLength!==0||u.byteLength!==8})},4495:(n,e,t)=>{var r=t(9519),i=t(9039),o=t(4576).String;n.exports=!!Object.getOwnPropertySymbols&&!i(function(){var s=Symbol("symbol detection");return!o(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&r&&r<41})},5610:(n,e,t)=>{var r=t(1291),i=Math.max,o=Math.min;n.exports=function(s,a){var c=r(s);return c<0?i(c+a,0):o(c,a)}},5854:(n,e,t)=>{var r=t(2777),i=TypeError;n.exports=function(o){var s=r(o,"number");if(typeof s=="number")throw new i("Can't convert number to bigint");return BigInt(s)}},7696:(n,e,t)=>{var r=t(1291),i=t(8014),o=RangeError;n.exports=function(s){if(s===void 0)return 0;var a=r(s),c=i(a);if(a!==c)throw new o("Wrong length or index");return c}},5397:(n,e,t)=>{var r=t(7055),i=t(7750);n.exports=function(o){return r(i(o))}},1291:(n,e,t)=>{var r=t(741);n.exports=function(i){var o=+i;return o!=o||o===0?0:r(o)}},8014:(n,e,t)=>{var r=t(1291),i=Math.min;n.exports=function(o){var s=r(o);return s>0?i(s,9007199254740991):0}},8981:(n,e,t)=>{var r=t(7750),i=Object;n.exports=function(o){return i(r(o))}},9590:(n,e,t)=>{var r=t(1291),i=RangeError;n.exports=function(o){var s=r(o);if(s<0)throw new i("The argument can't be less than 0");return s}},2777:(n,e,t)=>{var r=t(9565),i=t(34),o=t(757),s=t(5966),a=t(4270),c=t(8227),u=TypeError,d=c("toPrimitive");n.exports=function(f,h){if(!i(f)||o(f))return f;var p,m=s(f,d);if(m){if(h===void 0&&(h="default"),p=r(m,f,h),!i(p)||o(p))return p;throw new u("Can't convert object to primitive value")}return h===void 0&&(h="number"),a(f,h)}},6969:(n,e,t)=>{var r=t(2777),i=t(757);n.exports=function(o){var s=r(o,"string");return i(s)?s:s+""}},2140:(n,e,t)=>{var r={};r[t(8227)("toStringTag")]="z",n.exports=String(r)==="[object z]"},655:(n,e,t)=>{var r=t(6955),i=String;n.exports=function(o){if(r(o)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return i(o)}},6823:n=>{var e=String;n.exports=function(t){try{return e(t)}catch{return"Object"}}},3392:(n,e,t)=>{var r=t(9504),i=0,o=Math.random(),s=r(1 .toString);n.exports=function(a){return"Symbol("+(a===void 0?"":a)+")_"+s(++i+o,36)}},7040:(n,e,t)=>{var r=t(4495);n.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:(n,e,t)=>{var r=t(3724),i=t(9039);n.exports=r&&i(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2812:n=>{var e=TypeError;n.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},8622:(n,e,t)=>{var r=t(4576),i=t(4901),o=r.WeakMap;n.exports=i(o)&&/native code/.test(String(o))},8227:(n,e,t)=>{var r=t(4576),i=t(5745),o=t(9297),s=t(3392),a=t(4495),c=t(7040),u=r.Symbol,d=i("wks"),f=c?u.for||u:u&&u.withoutSetter||s;n.exports=function(h){return o(d,h)||(d[h]=a&&o(u,h)?u[h]:f("Symbol."+h)),d[h]}},6573:(n,e,t)=>{var r=t(3724),i=t(2106),o=t(3238),s=ArrayBuffer.prototype;r&&!("detached"in s)&&i(s,"detached",{configurable:!0,get:function(){return o(this)}})},7936:(n,e,t)=>{var r=t(6518),i=t(5636);i&&r({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},8100:(n,e,t)=>{var r=t(6518),i=t(5636);i&&r({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},4114:(n,e,t)=>{var r=t(6518),i=t(8981),o=t(6198),s=t(4527),a=t(6837);r({target:"Array",proto:!0,arity:1,forced:t(9039)(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(c){return c instanceof TypeError}}()},{push:function(u){var d=i(this),f=o(d),h=arguments.length;a(f+h);for(var p=0;p<h;p++)d[f]=arguments[p],f++;return s(d,f),f}})},4628:(n,e,t)=>{var r=t(6518),i=t(6043);r({target:"Promise",stat:!0},{withResolvers:function(){var s=i.f(this);return{promise:s.promise,resolve:s.resolve,reject:s.reject}}})},7642:(n,e,t)=>{var r=t(6518),i=t(3440);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("difference")},{difference:i})},8004:(n,e,t)=>{var r=t(6518),i=t(9039),o=t(8750);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("intersection")||i(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"})},{intersection:o})},3853:(n,e,t)=>{var r=t(6518),i=t(4449);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("isDisjointFrom")},{isDisjointFrom:i})},5876:(n,e,t)=>{var r=t(6518),i=t(3838);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("isSubsetOf")},{isSubsetOf:i})},2475:(n,e,t)=>{var r=t(6518),i=t(8527);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("isSupersetOf")},{isSupersetOf:i})},5024:(n,e,t)=>{var r=t(6518),i=t(3650);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("symmetricDifference")},{symmetricDifference:i})},1698:(n,e,t)=>{var r=t(6518),i=t(4204);r({target:"Set",proto:!0,real:!0,forced:!t(4916)("union")},{union:i})},7467:(n,e,t)=>{var r=t(7628),i=t(4644),o=i.aTypedArray,s=i.exportTypedArrayMethod,a=i.getTypedArrayConstructor;s("toReversed",function(){return r(o(this),a(this))})},4732:(n,e,t)=>{var r=t(4644),i=t(9504),o=t(9306),s=t(5370),a=r.aTypedArray,c=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,d=i(r.TypedArrayPrototype.sort);u("toSorted",function(h){h!==void 0&&o(h);var p=a(this),m=s(c(p),p);return d(m,h)})},9577:(n,e,t)=>{var r=t(9928),i=t(4644),o=t(1108),s=t(1291),a=t(5854),c=i.aTypedArray,u=i.getTypedArrayConstructor,d=i.exportTypedArrayMethod,f=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(h){return h===8}}();d("with",function(h,p){var m=c(this),y=s(h),b=o(m)?a(p):+p;return r(m,u(m),y,b)},!f)},8992:(n,e,t)=>{var r=t(6518),i=t(4576),o=t(679),s=t(8551),a=t(4901),c=t(2787),u=t(2106),d=t(4659),f=t(9039),h=t(9297),p=t(8227),m=t(7657).IteratorPrototype,y=t(3724),b=t(6395),w="constructor",v="Iterator",k=p("toStringTag"),C=TypeError,T=i[v],S=b||!a(T)||T.prototype!==m||!f(function(){T({})}),A=function(){if(o(this,m),c(this)===m)throw new C("Abstract class Iterator not directly constructable")},D=function(I,P){y?u(m,I,{configurable:!0,get:function(){return P},set:function(O){if(s(this),this===m)throw new C("You can't redefine this property");h(this,I)?this[I]=O:d(this,I,O)}}):m[I]=P};h(m,k)||D(k,v),!S&&h(m,w)&&m[w]!==Object||D(w,A),A.prototype=m,r({global:!0,constructor:!0,forced:S},{Iterator:A})},4743:(n,e,t)=>{var r=t(6518),i=t(9565),o=t(8551),s=t(1767),a=t(4149),c=t(9590),u=t(9462),d=t(6395),f=u(function(){for(var h,p=this.iterator,m=this.next;this.remaining;)if(this.remaining--,h=o(i(m,p)),this.done=!!h.done)return;if(h=o(i(m,p)),!(this.done=!!h.done))return h.value});r({target:"Iterator",proto:!0,real:!0,forced:d},{drop:function(p){o(this);var m=c(a(+p));return new f(s(this),{remaining:m})}})},3215:(n,e,t)=>{var r=t(6518),i=t(2652),o=t(9306),s=t(8551),a=t(1767);r({target:"Iterator",proto:!0,real:!0},{every:function(u){s(this),o(u);var d=a(this),f=0;return!i(d,function(h,p){if(!u(h,f++))return p()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},4520:(n,e,t)=>{var r=t(6518),i=t(9565),o=t(9306),s=t(8551),a=t(1767),c=t(9462),u=t(6319),d=t(6395),f=c(function(){for(var h,p,m=this.iterator,y=this.predicate,b=this.next;;){if(h=s(i(b,m)),this.done=!!h.done)return;if(p=h.value,u(m,y,[p,this.counter++],!0))return p}});r({target:"Iterator",proto:!0,real:!0,forced:d},{filter:function(p){return s(this),o(p),new f(a(this),{predicate:p})}})},670:(n,e,t)=>{var r=t(6518),i=t(9565),o=t(9306),s=t(8551),a=t(1767),c=t(8646),u=t(9462),d=t(9539),f=t(6395),h=u(function(){for(var p,m,y=this.iterator,b=this.mapper;;){if(m=this.inner)try{if(!(p=s(i(m.next,m.iterator))).done)return p.value;this.inner=null}catch(w){d(y,"throw",w)}if(p=s(i(this.next,y)),this.done=!!p.done)return;try{this.inner=c(b(p.value,this.counter++),!1)}catch(w){d(y,"throw",w)}}});r({target:"Iterator",proto:!0,real:!0,forced:f},{flatMap:function(m){return s(this),o(m),new h(a(this),{mapper:m,inner:null})}})},1454:(n,e,t)=>{var r=t(6518),i=t(713);r({target:"Iterator",proto:!0,real:!0,forced:t(6395)},{map:i})},7550:(n,e,t)=>{var r=t(6518),i=t(2652),o=t(9306),s=t(8551),a=t(1767);r({target:"Iterator",proto:!0,real:!0},{some:function(u){s(this),o(u);var d=a(this),f=0;return i(d,function(h,p){if(u(h,f++))return p()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},8335:(n,e,t)=>{var r=t(6518),i=t(3724),o=t(4576),s=t(7751),a=t(9504),c=t(9565),u=t(4901),d=t(34),f=t(4376),h=t(9297),p=t(655),m=t(6198),y=t(4659),b=t(9039),w=t(8235),v=t(4495),k=o.JSON,C=o.Number,T=o.SyntaxError,S=k&&k.parse,A=s("Object","keys"),D=Object.getOwnPropertyDescriptor,I=a("".charAt),P=a("".slice),O=a(/./.exec),_=a([].push),B=/^\d$/,$=/^[1-9]$/,R=/^[\d-]$/,N=/^[\t\n\r ]$/,W=function(Z,H,j,q){var ne,le,Oe,Ee,He,At=Z[H],qn=q&&At===q.value,Xi=qn&&typeof q.source=="string"?{source:q.source}:{};if(d(At)){var ui=f(At),pn=qn?q.nodes:ui?[]:{};if(ui)for(ne=pn.length,Oe=m(At),Ee=0;Ee<Oe;Ee++)F(At,Ee,W(At,""+Ee,j,Ee<ne?pn[Ee]:void 0));else for(le=A(At),Oe=m(le),Ee=0;Ee<Oe;Ee++)He=le[Ee],F(At,He,W(At,He,j,h(pn,He)?pn[He]:void 0))}return c(j,Z,H,At,Xi)},F=function(Z,H,j){if(i){var q=D(Z,H);if(q&&!q.configurable)return}j===void 0?delete Z[H]:y(Z,H,j)},K=function(Z,H,j,q){this.value=Z,this.end=H,this.source=j,this.nodes=q},ae=function(Z,H){this.source=Z,this.index=H};ae.prototype={fork:function(Z){return new ae(this.source,Z)},parse:function(){var Z=this.source,H=this.skip(N,this.index),j=this.fork(H),q=I(Z,H);if(O(R,q))return j.number();switch(q){case"{":return j.object();case"[":return j.array();case'"':return j.string();case"t":return j.keyword(!0);case"f":return j.keyword(!1);case"n":return j.keyword(null)}throw new T('Unexpected character: "'+q+'" at: '+H)},node:function(Z,H,j,q,ne){return new K(H,q,Z?null:P(this.source,j,q),ne)},object:function(){for(var Z=this.source,H=this.index+1,j=!1,q={},ne={};H<Z.length;){if(H=this.until(['"',"}"],H),I(Z,H)==="}"&&!j){H++;break}var le=this.fork(H).string(),Oe=le.value;H=le.end,H=this.until([":"],H)+1,H=this.skip(N,H),le=this.fork(H).parse(),y(ne,Oe,le),y(q,Oe,le.value),H=this.until([",","}"],le.end);var Ee=I(Z,H);if(Ee===",")j=!0,H++;else if(Ee==="}"){H++;break}}return this.node(1,q,this.index,H,ne)},array:function(){for(var Z=this.source,H=this.index+1,j=!1,q=[],ne=[];H<Z.length;){if(H=this.skip(N,H),I(Z,H)==="]"&&!j){H++;break}var le=this.fork(H).parse();if(_(ne,le),_(q,le.value),H=this.until([",","]"],le.end),I(Z,H)===",")j=!0,H++;else if(I(Z,H)==="]"){H++;break}}return this.node(1,q,this.index,H,ne)},string:function(){var Z=this.index,H=w(this.source,this.index+1);return this.node(0,H.value,Z,H.end)},number:function(){var Z=this.source,H=this.index,j=H;if(I(Z,j)==="-"&&j++,I(Z,j)==="0")j++;else{if(!O($,I(Z,j)))throw new T("Failed to parse number at: "+j);j=this.skip(B,j+1)}if(I(Z,j)==="."&&(j=this.skip(B,j+1)),(I(Z,j)==="e"||I(Z,j)==="E")&&(j++,I(Z,j)!=="+"&&I(Z,j)!=="-"||j++,j===(j=this.skip(B,j))))throw new T("Failed to parse number's exponent value at: "+j);return this.node(0,C(P(Z,H,j)),H,j)},keyword:function(Z){var H=""+Z,j=this.index,q=j+H.length;if(P(this.source,j,q)!==H)throw new T("Failed to parse value at: "+j);return this.node(0,Z,j,q)},skip:function(Z,H){for(var j=this.source;H<j.length&&O(Z,I(j,H));H++);return H},until:function(Z,H){H=this.skip(N,H);for(var j=I(this.source,H),q=0;q<Z.length;q++)if(Z[q]===j)return H;throw new T('Unexpected character: "'+j+'" at: '+H)}};var de=b(function(){var Z,H="9007199254740993";return S(H,function(j,q,ne){Z=ne.source}),Z!==H}),Q=v&&!b(function(){return 1/S("-0 ")!=-1/0});r({target:"JSON",stat:!0,forced:de},{parse:function(H,j){return Q&&!u(j)?S(H):function(q,ne){q=p(q);var le=new ae(q,0),Oe=le.parse(),Ee=Oe.value,He=le.skip(N,Oe.end);if(He<q.length)throw new T('Unexpected extra character: "'+I(q,He)+'" after the parsed data at: '+He);return u(ne)?W({"":Ee},"",ne,Oe):Ee}(H,j)}})},4979:(n,e,t)=>{var r=t(6518),i=t(4576),o=t(7751),s=t(6980),a=t(4913).f,c=t(9297),u=t(679),d=t(3167),f=t(2603),h=t(5002),p=t(8574),m=t(3724),y=t(6395),b="DOMException",w=o("Error"),v=o(b),k=function(){u(this,C);var N=arguments.length,W=f(N<1?void 0:arguments[0]),F=f(N<2?void 0:arguments[1],"Error"),K=new v(W,F),ae=new w(W);return ae.name=b,a(K,"stack",s(1,p(ae.stack,1))),d(K,this,k),K},C=k.prototype=v.prototype,T="stack"in new w(b),S="stack"in new v(1,2),A=v&&m&&Object.getOwnPropertyDescriptor(i,b),D=!(!A||A.writable&&A.configurable),I=T&&!D&&!S;r({global:!0,constructor:!0,forced:y||I},{DOMException:I?k:v});var P=o(b),O=P.prototype;if(O.constructor!==P){y||a(O,"constructor",s(1,P));for(var _ in h)if(c(h,_)){var B=h[_],$=B.s;c(P,$)||a(P,$,s(6,B.c))}}},4603:(n,e,t)=>{var r=t(6840),i=t(9504),o=t(655),s=t(2812),a=URLSearchParams,c=a.prototype,u=i(c.append),d=i(c.delete),f=i(c.forEach),h=i([].push),p=new a("a=1&a=2&b=3");p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&r(c,"delete",function(m){var y=arguments.length,b=y<2?void 0:arguments[1];if(y&&b===void 0)return d(this,m);var w=[];f(this,function(I,P){h(w,{key:P,value:I})}),s(y,1);for(var v,k=o(m),C=o(b),T=0,S=0,A=!1,D=w.length;T<D;)v=w[T++],A||v.key===k?(A=!0,d(this,v.key)):S++;for(;S<D;)(v=w[S++]).key===k&&v.value===C||u(this,v.key,v.value)},{enumerable:!0,unsafe:!0})},7566:(n,e,t)=>{var r=t(6840),i=t(9504),o=t(655),s=t(2812),a=URLSearchParams,c=a.prototype,u=i(c.getAll),d=i(c.has),f=new a("a=1");!f.has("a",2)&&f.has("a",void 0)||r(c,"has",function(p){var m=arguments.length,y=m<2?void 0:arguments[1];if(m&&y===void 0)return d(this,p);var b=u(this,p);s(m,1);for(var w=o(y),v=0;v<b.length;)if(b[v++]===w)return!0;return!1},{enumerable:!0,unsafe:!0})},8721:(n,e,t)=>{var r=t(3724),i=t(9504),o=t(2106),s=URLSearchParams.prototype,a=i(s.forEach);r&&!("size"in s)&&o(s,"size",{get:function(){var u=0;return a(this,function(){u++}),u},configurable:!0,enumerable:!0})}},iM={};function Pe(n){var e=iM[n];if(e!==void 0)return e.exports;var t=iM[n]={exports:{}};return JH[n].call(t.exports,t,t.exports,Pe),t.exports}Pe.d=(n,e)=>{for(var t in e)Pe.o(e,t)&&!Pe.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},Pe.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var ye=globalThis.pdfjsLib={};Pe.d(ye,{AbortException:()=>qa,AnnotationEditorLayer:()=>X4,AnnotationEditorParamsType:()=>he,AnnotationEditorType:()=>Te,AnnotationEditorUIManager:()=>Ga,AnnotationLayer:()=>lW,AnnotationMode:()=>ds,CMapCompressionType:()=>v4,ColorPicker:()=>gm,DOMSVGFactory:()=>A4,DrawLayer:()=>J4,FeatureTest:()=>Bn,GlobalWorkerOptions:()=>uo,ImageKind:()=>Jp,InvalidPDFException:()=>lM,MissingPDFException:()=>Wa,OPS:()=>Zr,PDFDataRangeTransport:()=>WM,PDFDateString:()=>vM,PDFWorker:()=>nc,PasswordResponses:()=>DU,PermissionFlag:()=>sU,PixelsPerInch:()=>hs,RenderingCancelledException:()=>T4,TextLayer:()=>m2,UnexpectedResponseException:()=>rm,Util:()=>se,VerbosityLevel:()=>em,XfaLayer:()=>YM,build:()=>HZ,createValidAbsoluteUrl:()=>_U,fetchData:()=>om,getDocument:()=>BZ,getFilenameFromUrl:()=>qU,getPdfFilenameFromUrl:()=>KU,getXfaPageViewport:()=>GU,isDataScheme:()=>sm,isPdfFile:()=>x4,noContextMenu:()=>br,normalizeUnicode:()=>BU,setLayerDimensions:()=>Ka,shadow:()=>Ie,version:()=>zZ}),Pe(4114),Pe(6573),Pe(8100),Pe(7936),Pe(7467),Pe(4732),Pe(9577),Pe(4603),Pe(7566),Pe(8721);const cn=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser"),oM=[1,0,0,1,0,0],g4=[.001,0,0,.001,0,0],y4=1.35,eU=1,b4=2,Qp=4,tU=16,nU=32,rU=64,iU=128,oU=256,ds={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Te={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},he={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},sU={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Xp=0,w4=1,a2=2,aU=3,sM=3,lU=4,Jp={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},cU=1,uU=2,dU=3,fU=4,hU=5,pU=6,mU=7,gU=8,yU=9,bU=10,wU=11,vU=12,CU=13,kU=14,SU=15,aM=16,MU=17,EU=20,AU=1,TU=2,xU=3,IU=4,OU=5,em={ERRORS:0,WARNINGS:1,INFOS:5},v4={NONE:0,BINARY:1},Zr={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},DU={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let tm=em.WARNINGS;function NU(n){Number.isInteger(n)&&(tm=n)}function PU(){return tm}function nm(n){tm>=em.INFOS&&console.log(`Info: ${n}`)}function Ce(n){tm>=em.WARNINGS&&console.log(`Warning: ${n}`)}function St(n){throw new Error(n)}function xt(n,e){n||St(e)}function _U(n,e=null,t=null){if(!n)return null;try{if(t&&typeof n=="string"){if(t.addDefaultProtocol&&n.startsWith("www.")){const i=n.match(/\./g);(i==null?void 0:i.length)>=2&&(n=`http://${n}`)}if(t.tryConvertEncoding)try{n=function(o){return decodeURIComponent(escape(o))}(n)}catch{}}const r=e?new URL(n,e):new URL(n);if(function(o){switch(o==null?void 0:o.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch{}return null}function Ie(n,e,t,r=!1){return Object.defineProperty(n,e,{value:t,enumerable:!r,configurable:!0,writable:!1}),t}const fs=function(){function e(t,r){this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();class C4 extends fs{constructor(e,t){super(e,"PasswordException"),this.code=t}}class k4 extends fs{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class lM extends fs{constructor(e){super(e,"InvalidPDFException")}}class Wa extends fs{constructor(e){super(e,"MissingPDFException")}}class rm extends fs{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class LU extends fs{constructor(e){super(e,"FormatError")}}class qa extends fs{constructor(e){super(e,"AbortException")}}function cM(n){typeof n=="object"&&(n==null?void 0:n.length)!==void 0||St("Invalid argument for bytesToString");const e=n.length,t=8192;if(e<t)return String.fromCharCode.apply(null,n);const r=[];for(let i=0;i<e;i+=t){const o=Math.min(i+t,e),s=n.subarray(i,o);r.push(String.fromCharCode.apply(null,s))}return r.join("")}function im(n){typeof n!="string"&&St("Invalid argument for stringToBytes");const e=n.length,t=new Uint8Array(e);for(let r=0;r<e;++r)t[r]=255&n.charCodeAt(r);return t}function S4(n){const e=Object.create(null);for(const[t,r]of n)e[t]=r;return e}class Bn{static get isLittleEndian(){return Ie(this,"isLittleEndian",function(){const t=new Uint8Array(4);return t[0]=1,new Uint32Array(t.buffer,0,1)[0]===1}())}static get isEvalSupported(){return Ie(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return Ie(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?Ie(this,"platform",{isMac:navigator.platform.includes("Mac")}):Ie(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){var e,t;return Ie(this,"isCSSRoundSupported",(t=(e=globalThis.CSS)==null?void 0:e.supports)==null?void 0:t.call(e,"width: round(1.5px, 1px)"))}}const M4=Array.from(Array(256).keys(),n=>n.toString(16).padStart(2,"0"));class se{static makeHexColor(e,t,r){return`#${M4[e]}${M4[t]}${M4[r]}`}static scaleMinMax(e,t){let r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[1],t[1]=r,r=t[2],t[2]=t[3],t[3]=r,e[1]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){const r=this.applyTransform(e,t),i=this.applyTransform(e.slice(2,4),t),o=this.applyTransform([e[0],e[3]],t),s=this.applyTransform([e[2],e[1]],t);return[Math.min(r[0],i[0],o[0],s[0]),Math.min(r[1],i[1],o[1],s[1]),Math.max(r[0],i[0],o[0],s[0]),Math.max(r[1],i[1],o[1],s[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],i=e[0]*t[1]+e[1]*t[3],o=e[2]*t[0]+e[3]*t[2],s=e[2]*t[1]+e[3]*t[3],a=(r+s)/2,c=Math.sqrt((r+s)**2-4*(r*s-o*i))/2,u=a+c||1,d=a-c||1;return[Math.sqrt(u),Math.sqrt(d)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),i=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>i)return null;const o=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return o>s?null:[r,o,i,s]}static bezierBoundingBox(e,t,r,i,o,s,a,c,u){return u?(u[0]=Math.min(u[0],e,a),u[1]=Math.min(u[1],t,c),u[2]=Math.max(u[2],e,a),u[3]=Math.max(u[3],t,c)):u=[Math.min(e,a),Math.min(t,c),Math.max(e,a),Math.max(t,c)],x(this,Ff,av).call(this,e,r,o,a,t,i,s,c,3*(3*(r-o)-e+a),6*(e-2*r+o),3*(r-e),u),x(this,Ff,av).call(this,e,r,o,a,t,i,s,c,3*(3*(i-s)-t+c),6*(t-2*i+s),3*(i-t),u),u}}jc=new WeakSet,Qy=function(e,t,r,i,o,s,a,c,u,d){if(u<=0||u>=1)return;const f=1-u,h=u*u,p=h*u,m=f*(f*(f*e+3*u*t)+3*h*r)+p*i,y=f*(f*(f*o+3*u*s)+3*h*a)+p*c;d[0]=Math.min(d[0],m),d[1]=Math.min(d[1],y),d[2]=Math.max(d[2],m),d[3]=Math.max(d[3],y)},Ff=new WeakSet,av=function(e,t,r,i,o,s,a,c,u,d,f,h){if(Math.abs(u)<1e-12){Math.abs(d)>=1e-12&&x(this,jc,Qy).call(this,e,t,r,i,o,s,a,c,-f/d,h);return}const p=d**2-4*f*u;if(p<0)return;const m=Math.sqrt(p),y=2*u;x(this,jc,Qy).call(this,e,t,r,i,o,s,a,c,(-d+m)/y,h),x(this,jc,Qy).call(this,e,t,r,i,o,s,a,c,(-d-m)/y,h)},M(se,jc),M(se,Ff);let E4=null,uM=null;function BU(n){return E4||(E4=/([\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,uM=new Map([["ſt","ſt"]])),n.replaceAll(E4,(e,t,r)=>t?t.normalize("NFKC"):uM.get(r))}const dM="pdfjs_internal_id_",RU=0,$U=1,VU=2,FU=3,jU=4,zU=5,HU=6,UU=7,ZU=8;Pe(4628),Pe(7642),Pe(8004),Pe(3853),Pe(5876),Pe(2475),Pe(5024),Pe(1698),Pe(1454),Pe(4979),Pe(8992),Pe(4743),Pe(3215),Pe(7550),Pe(8335),Pe(4520);class fM{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,r,i,o){return"none"}destroy(e=!1){}}class hM{constructor({enableHWA:e=!1}={}){M(this,jf,!1);E(this,jf,e)}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d",{willReadFrequently:!g(this,jf)})}}reset(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){St("Abstract method `_createCanvas` called.")}}jf=new WeakMap;class pM{constructor({baseUrl:e=null,isCompressed:t=!0}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?v4.BINARY:v4.NONE;return this._fetchData(t,r).catch(i=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)})}_fetchData(e,t){St("Abstract method `_fetchData` called.")}}class mM{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetchData(t).catch(r=>{throw new Error(`Unable to load font data at: ${t}`)})}_fetchData(e){St("Abstract method `_fetchData` called.")}}class WU{create(e,t,r=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),r||(i.setAttribute("width",`${e}px`),i.setAttribute("height",`${t}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${e} ${t}`),i}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){St("Abstract method `_createSVG` called.")}}const lo="http://www.w3.org/2000/svg",kl=class kl{};pe(kl,"CSS",96),pe(kl,"PDF",72),pe(kl,"PDF_TO_CSS_UNITS",kl.CSS/kl.PDF);let hs=kl;async function om(n,e="text"){if(c2(n,document.baseURI)){const t=await fetch(n);if(!t.ok)throw new Error(t.statusText);switch(e){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"json":return t.json()}return t.text()}return new Promise((t,r)=>{const i=new XMLHttpRequest;i.open("GET",n,!0),i.responseType=e,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE)if(i.status!==200&&i.status!==0)r(new Error(i.statusText));else{switch(e){case"arraybuffer":case"blob":case"json":t(i.response);return}t(i.responseText)}},i.send(null)})}class gM extends pM{_fetchData(e,t){return om(e,this.isCompressed?"arraybuffer":"text").then(r=>({cMapData:r instanceof ArrayBuffer?new Uint8Array(r):im(r),compressionType:t}))}}class yM extends mM{_fetchData(e){return om(e,"arraybuffer").then(t=>new Uint8Array(t))}}class A4 extends WU{_createSVG(e){return document.createElementNS(lo,e)}}class l2{constructor({viewBox:e,scale:t,rotation:r,offsetX:i=0,offsetY:o=0,dontFlip:s=!1}){this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=i,this.offsetY=o;const a=(e[2]+e[0])/2,c=(e[3]+e[1])/2;let u,d,f,h,p,m,y,b;switch((r%=360)<0&&(r+=360),r){case 180:u=-1,d=0,f=0,h=1;break;case 90:u=0,d=1,f=1,h=0;break;case 270:u=0,d=-1,f=-1,h=0;break;case 0:u=1,d=0,f=0,h=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(f=-f,h=-h),u===0?(p=Math.abs(c-e[1])*t+i,m=Math.abs(a-e[0])*t+o,y=(e[3]-e[1])*t,b=(e[2]-e[0])*t):(p=Math.abs(a-e[0])*t+i,m=Math.abs(c-e[1])*t+o,y=(e[2]-e[0])*t,b=(e[3]-e[1])*t),this.transform=[u*t,d*t,f*t,h*t,p-u*t*a-f*t*c,m-d*t*a-h*t*c],this.width=y,this.height=b}get rawDims(){const{viewBox:e}=this;return Ie(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:o=!1}={}){return new l2({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:o})}convertToViewportPoint(e,t){return se.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=se.applyTransform([e[0],e[1]],this.transform),r=se.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return se.applyInverseTransform([e,t],this.transform)}}class T4 extends fs{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function sm(n){const e=n.length;let t=0;for(;t<e&&n[t].trim()==="";)t++;return n.substring(t,t+5).toLowerCase()==="data:"}function x4(n){return typeof n=="string"&&/\.pdf$/i.test(n)}function qU(n){return[n]=n.split(/[#?]/,1),n.substring(n.lastIndexOf("/")+1)}function KU(n,e="document.pdf"){if(typeof n!="string")return e;if(sm(n))return Ce('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const t=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(n);let i=t.exec(r[1])||t.exec(r[2])||t.exec(r[3]);if(i&&(i=i[0],i.includes("%")))try{i=t.exec(decodeURIComponent(i))[0]}catch{}return i||e}class bM{constructor(){pe(this,"started",Object.create(null));pe(this,"times",[])}time(e){e in this.started&&Ce(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||Ce(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:r}of this.times)t=Math.max(r.length,t);for(const{name:r,start:i,end:o}of this.times)e.push(`${r.padEnd(t)} ${o-i}ms
121
- `);return e.join("")}}function c2(n,e){try{const{protocol:t}=e?new URL(n,e):new URL(n);return t==="http:"||t==="https:"}catch{return!1}}function br(n){n.preventDefault()}let wM;class vM{static toDateObject(e){if(!e||typeof e!="string")return null;wM||(wM=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=wM.exec(e);if(!t)return null;const r=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let o=parseInt(t[3],10);o=o>=1&&o<=31?o:1;let s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;const u=t[7]||"Z";let d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let f=parseInt(t[9],10)||0;return f=f>=0&&f<=59?f:0,u==="-"?(s+=d,a+=f):u==="+"&&(s-=d,a-=f),new Date(Date.UTC(r,i,o,s,a,c))}}function GU(n,{scale:e=1,rotation:t=0}){const{width:r,height:i}=n.attributes.style,o=[0,0,parseInt(r),parseInt(i)];return new l2({viewBox:o,scale:e,rotation:t})}function I4(n){if(n.startsWith("#")){const e=parseInt(n.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return n.startsWith("rgb(")?n.slice(4,-1).split(",").map(e=>parseInt(e)):n.startsWith("rgba(")?n.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(Ce(`Not a valid color format: "${n}"`),[0,0,0])}function ot(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform();return[e,t,r,i,o,s]}function co(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform().invertSelf();return[e,t,r,i,o,s]}function Ka(n,e,t=!1,r=!0){if(e instanceof l2){const{pageWidth:i,pageHeight:o}=e.rawDims,{style:s}=n,a=Bn.isCSSRoundSupported,c=`var(--scale-factor) * ${i}px`,u=`var(--scale-factor) * ${o}px`,d=a?`round(${c}, 1px)`:`calc(${c})`,f=a?`round(${u}, 1px)`:`calc(${u})`;t&&e.rotation%180!=0?(s.width=f,s.height=d):(s.width=d,s.height=f)}r&&n.setAttribute("data-main-rotation",e.rotation)}const Mo=class Mo{constructor(e){M(this,p3);M(this,m3);M(this,zc);M(this,g3);M(this,Uf);M(this,Sl,null);M(this,Ml,null);M(this,Qr,void 0);M(this,El,null);M(this,zf,null);E(this,Qr,e),g(Mo,Hf)||E(Mo,Hf,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 e=E(this,Sl,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar");const t=g(this,Qr)._uiManager._signal;e.addEventListener("contextmenu",br,{signal:t}),e.addEventListener("pointerdown",x(Mo,h3,XD),{signal:t});const r=E(this,El,document.createElement("div"));r.className="buttons",e.append(r);const i=g(this,Qr).toolbarPosition;if(i){const{style:o}=e,s=g(this,Qr)._uiManager.direction==="ltr"?1-i[0]:i[0];o.insetInlineEnd=100*s+"%",o.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return x(this,g3,tN).call(this),e}hide(){var e;g(this,Sl).classList.add("hidden"),(e=g(this,Ml))==null||e.hideDropdown()}show(){var e;g(this,Sl).classList.remove("hidden"),(e=g(this,zf))==null||e.shown()}async addAltText(e){const t=await e.render();x(this,zc,Xy).call(this,t),g(this,El).prepend(t,g(this,Uf,lv)),E(this,zf,e)}addColorPicker(e){E(this,Ml,e);const t=e.renderButton();x(this,zc,Xy).call(this,t),g(this,El).prepend(t,g(this,Uf,lv))}remove(){var e;g(this,Sl).remove(),(e=g(this,Ml))==null||e.destroy(),E(this,Ml,null)}};Sl=new WeakMap,Ml=new WeakMap,Qr=new WeakMap,El=new WeakMap,zf=new WeakMap,Hf=new WeakMap,h3=new WeakSet,XD=function(e){e.stopPropagation()},p3=new WeakSet,JD=function(e){g(this,Qr)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()},m3=new WeakSet,eN=function(e){g(this,Qr)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()},zc=new WeakSet,Xy=function(e){const t=g(this,Qr)._uiManager._signal;e.addEventListener("focusin",x(this,p3,JD).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",x(this,m3,eN).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",br,{signal:t})},g3=new WeakSet,tN=function(){const{editorType:e,_uiManager:t}=g(this,Qr),r=document.createElement("button");r.className="delete",r.tabIndex=0,r.setAttribute("data-l10n-id",g(Mo,Hf)[e]),x(this,zc,Xy).call(this,r),r.addEventListener("click",i=>{t.delete()},{signal:t._signal}),g(this,El).append(r)},Uf=new WeakSet,lv=function(){const e=document.createElement("div");return e.className="divider",e},M(Mo,h3),M(Mo,Hf,null);let O4=Mo;class YU{constructor(e){M(this,y3);M(this,b3);M(this,w3);M(this,Zf,null);M(this,Al,null);M(this,Tl,void 0);E(this,Tl,e)}show(e,t,r){const[i,o]=x(this,b3,rN).call(this,t,r),{style:s}=g(this,Al)||E(this,Al,x(this,y3,nN).call(this));e.append(g(this,Al)),s.insetInlineEnd=100*i+"%",s.top=`calc(${100*o}% + var(--editor-toolbar-vert-offset))`}hide(){g(this,Al).remove()}}Zf=new WeakMap,Al=new WeakMap,Tl=new WeakMap,y3=new WeakSet,nN=function(){const e=E(this,Al,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",br,{signal:g(this,Tl)._signal});const t=E(this,Zf,document.createElement("div"));return t.className="buttons",e.append(t),x(this,w3,iN).call(this),e},b3=new WeakSet,rN=function(e,t){let r=0,i=0;for(const o of e){const s=o.y+o.height;if(s<r)continue;const a=o.x+(t?o.width:0);s>r?(i=a,r=s):t?a>i&&(i=a):a<i&&(i=a)}return[t?1-i:i,r]},w3=new WeakSet,iN=function(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const r=g(this,Tl)._signal;e.addEventListener("contextmenu",br,{signal:r}),e.addEventListener("click",()=>{g(this,Tl).highlightSelection("floating_button")},{signal:r}),g(this,Zf).append(e)};function am(n,e,t){for(const r of t)e.addEventListener(r,n[r].bind(n))}class QU{constructor(){M(this,v3,0)}get id(){return"pdfjs_internal_editor_"+Kn(this,v3)._++}}v3=new WeakMap;const tv=class tv{constructor(){M(this,qf);M(this,Wf,function(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const t=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(t);else for(let r=0;r<32;r++)t[r]=Math.floor(255*Math.random());return cM(t)}());M(this,C3,0);M(this,Dr,null)}static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',Ie(this,"_isSVGFittingCanvas",t.decode().then(()=>(e.drawImage(t,0,0,1,1,0,0,1,3),new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]===0)))}async getFromFile(e){const{lastModified:t,name:r,size:i,type:o}=e;return x(this,qf,cv).call(this,`${t}_${r}_${i}_${o}`,e)}async getFromUrl(e){return x(this,qf,cv).call(this,e,e)}async getFromId(e){g(this,Dr)||E(this,Dr,new Map);const t=g(this,Dr).get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){const t=g(this,Dr).get(e);return t!=null&&t.isSvg?t.svgUrl:null}deleteId(e){g(this,Dr)||E(this,Dr,new Map);const t=g(this,Dr).get(e);t&&(t.refCounter-=1,t.refCounter===0&&(t.bitmap=null))}isValidId(e){return e.startsWith(`image_${g(this,Wf)}_`)}};Wf=new WeakMap,C3=new WeakMap,Dr=new WeakMap,qf=new WeakSet,cv=async function(e,t){g(this,Dr)||E(this,Dr,new Map);let r=g(this,Dr).get(e);if(r===null)return null;if(r!=null&&r.bitmap)return r.refCounter+=1,r;try{r||(r={bitmap:null,id:`image_${g(this,Wf)}_${Kn(this,C3)._++}`,refCounter:0,isSvg:!1});let i;if(typeof t=="string"?(r.url=t,i=await om(t,"blob")):i=r.file=t,i.type==="image/svg+xml"){const o=tv._isSVGFittingCanvas,s=new FileReader,a=new Image,c=new Promise((u,d)=>{a.onload=()=>{r.bitmap=a,r.isSvg=!0,u()},s.onload=async()=>{const f=r.svgUrl=s.result;a.src=await o?`${f}#svgView(preserveAspectRatio(none))`:f},a.onerror=s.onerror=d});s.readAsDataURL(i),await c}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){console.error(i),r=null}return g(this,Dr).set(e,r),r&&g(this,Dr).set(r.id,r),r};let D4=tv,XU=(KD=class{constructor(e=128){M(this,jt,[]);M(this,qs,!1);M(this,Kf,void 0);M(this,zt,-1);E(this,Kf,e)}add({cmd:e,undo:t,post:r,mustExec:i,type:o=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}){if(i&&e(),g(this,qs))return;const c={cmd:e,undo:t,post:r,type:o};if(g(this,zt)===-1){g(this,jt).length>0&&(g(this,jt).length=0),E(this,zt,0),g(this,jt).push(c);return}if(s&&g(this,jt)[g(this,zt)].type===o){a&&(c.undo=g(this,jt)[g(this,zt)].undo),g(this,jt)[g(this,zt)]=c;return}const u=g(this,zt)+1;u===g(this,Kf)?g(this,jt).splice(0,1):(E(this,zt,u),u<g(this,jt).length&&g(this,jt).splice(u)),g(this,jt).push(c)}undo(){if(g(this,zt)===-1)return;E(this,qs,!0);const{undo:e,post:t}=g(this,jt)[g(this,zt)];e(),t==null||t(),E(this,qs,!1),E(this,zt,g(this,zt)-1)}redo(){if(g(this,zt)<g(this,jt).length-1){E(this,zt,g(this,zt)+1),E(this,qs,!0);const{cmd:e,post:t}=g(this,jt)[g(this,zt)];e(),t==null||t(),E(this,qs,!1)}}hasSomethingToUndo(){return g(this,zt)!==-1}hasSomethingToRedo(){return g(this,zt)<g(this,jt).length-1}destroy(){E(this,jt,null)}},jt=new WeakMap,qs=new WeakMap,Kf=new WeakMap,zt=new WeakMap,KD);class u2{constructor(e){M(this,k3);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=Bn.platform;for(const[r,i,o={}]of e)for(const s of r){const a=s.startsWith("mac+");t&&a?(this.callbacks.set(s.slice(4),{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1))):!t&&!a&&(this.callbacks.set(s,{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const r=this.callbacks.get(x(this,k3,oN).call(this,t));if(!r)return;const{callback:i,options:{bubbles:o=!1,args:s=[],checker:a=null}}=r;(!a||a(e,t))&&(i.bind(e,...s,t)(),o||(t.stopPropagation(),t.preventDefault()))}}k3=new WeakSet,oN=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const S3=class S3{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(r){const i=document.createElement("span");i.style.visibility="hidden",document.body.append(i);for(const o of r.keys()){i.style.color=o;const s=window.getComputedStyle(i).color;r.set(o,I4(s))}i.remove()}(e),Ie(this,"_colors",e)}convert(e){const t=I4(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[r,i]of this._colors)if(i.every((o,s)=>o===t[s]))return S3._colorsMapping.get(r);return t}getHexCode(e){const t=this._colors.get(e);return t?se.makeHexColor(...t):e}};pe(S3,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let N4=S3;const Qc=class Qc{constructor(e,t,r,i,o,s,a,c,u,d,f){M(this,Gc);M(this,ih);M(this,E3);M(this,A3);M(this,Yc);M(this,T3);M(this,x3);M(this,I3);M(this,oh);M(this,O3);M(this,sh);M(this,ah);M(this,D3);M(this,tn);M(this,_i);M(this,N3);M(this,P3);M(this,lh);M(this,_3);M(this,Nl);M(this,ch);M(this,Hc,new AbortController);M(this,sr,null);M(this,Ot,new Map);M(this,en,new Map);M(this,Uc,null);M(this,Eo,null);M(this,Zc,null);M(this,Xr,new XU);M(this,Ks,null);M(this,Wc,0);M(this,xl,new Set);M(this,Oi,null);M(this,Jr,null);M(this,Il,new Set);M(this,Gf,!1);M(this,Yf,!1);M(this,qc,!1);M(this,Qf,null);M(this,Di,null);M(this,Gs,null);M(this,Kc,null);M(this,Ys,!1);M(this,Ni,null);M(this,M3,new QU);M(this,Qs,!1);M(this,Xf,!1);M(this,Xs,null);M(this,Ol,null);M(this,Jf,null);M(this,eh,null);M(this,Ht,Te.NONE);M(this,ze,new Set);M(this,Ao,null);M(this,Dl,null);M(this,th,null);M(this,nh,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});M(this,Js,[0,0]);M(this,Pi,null);M(this,To,null);M(this,rh,null);const h=this._signal=g(this,Hc).signal;E(this,To,e),E(this,rh,t),E(this,Uc,r),this._eventBus=i,i._on("editingaction",this.onEditingAction.bind(this),{signal:h}),i._on("pagechanging",this.onPageChanging.bind(this),{signal:h}),i._on("scalechanging",this.onScaleChanging.bind(this),{signal:h}),i._on("rotationchanging",this.onRotationChanging.bind(this),{signal:h}),i._on("setpreference",this.onSetPreference.bind(this),{signal:h}),i._on("switchannotationeditorparams",p=>this.updateParams(p.type,p.value),{signal:h}),x(this,T3,lN).call(this),x(this,D3,fN).call(this),x(this,oh,dv).call(this),E(this,Eo,o.annotationStorage),E(this,Qf,o.filterFactory),E(this,Dl,s),E(this,Kc,a||null),E(this,Gf,c),E(this,Yf,u),E(this,qc,d),E(this,eh,f||null),this.viewParameters={realScale:hs.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const e=Qc.prototype,t=s=>g(s,To).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&s.hasSomethingToControl(),r=(s,{target:a})=>{if(a instanceof HTMLInputElement){const{type:c}=a;return c!=="text"&&c!=="number"}return!0},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return Ie(this,"_keyboardManager",new u2([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],e.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:r}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(s,{target:a})=>!(a instanceof HTMLButtonElement)&&g(s,To).contains(a)&&!s.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(s,{target:a})=>!(a instanceof HTMLButtonElement)&&g(s,To).contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:t}]]))}destroy(){var e,t,r;(e=g(this,Hc))==null||e.abort(),E(this,Hc,null),this._signal=null;for(const i of g(this,en).values())i.destroy();g(this,en).clear(),g(this,Ot).clear(),g(this,Il).clear(),E(this,sr,null),g(this,ze).clear(),g(this,Xr).destroy(),(t=g(this,Uc))==null||t.destroy(),(r=g(this,Ni))==null||r.hide(),E(this,Ni,null),g(this,Di)&&(clearTimeout(g(this,Di)),E(this,Di,null)),g(this,Pi)&&(clearTimeout(g(this,Pi)),E(this,Pi,null))}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return g(this,eh)}get useNewAltTextFlow(){return g(this,Yf)}get useNewAltTextWhenAddingImage(){return g(this,qc)}get hcmFilter(){return Ie(this,"hcmFilter",g(this,Dl)?g(this,Qf).addHCMFilter(g(this,Dl).foreground,g(this,Dl).background):"none")}get direction(){return Ie(this,"direction",getComputedStyle(g(this,To)).direction)}get highlightColors(){return Ie(this,"highlightColors",g(this,Kc)?new Map(g(this,Kc).split(",").map(e=>e.split("=").map(t=>t.trim()))):null)}get highlightColorNames(){return Ie(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){E(this,Jf,e)}editAltText(e,t=!1){var r;(r=g(this,Uc))==null||r.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){e==="enableNewAltTextWhenAddingImage"&&E(this,qc,t)}onPageChanging({pageNumber:e}){E(this,Wc,e-1)}focusMainContainer(){g(this,To).focus()}findParent(e,t){for(const r of g(this,en).values()){const{x:i,y:o,width:s,height:a}=r.div.getBoundingClientRect();if(e>=i&&e<=i+s&&t>=o&&t<=o+a)return r}return null}disableUserSelect(e=!1){g(this,rh).classList.toggle("noUserSelect",e)}addShouldRescale(e){g(this,Il).add(e)}removeShouldRescale(e){g(this,Il).delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*hs.PDF_TO_CSS_UNITS;for(const t of g(this,Il))t.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=t,a=t.toString(),c=x(this,Gc,Jy).call(this,t).closest(".textLayer"),u=this.getSelectionBoxes(c);if(!u)return;t.empty();const d=x(this,ih,uv).call(this,c),f=g(this,Ht)===Te.NONE,h=()=>{d==null||d.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:u,anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s,text:a}),f&&this.showAllEditors("highlight",!0,!0)};f?this.switchToMode(Te.HIGHLIGHT,h):h()}addToAnnotationStorage(e){e.isEmpty()||!g(this,Eo)||g(this,Eo).has(e.id)||g(this,Eo).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,g(this,Ys)&&(E(this,Ys,!1),x(this,Yc,e5).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of g(this,ze))if(t.div.contains(e)){E(this,Ol,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!g(this,Ol))return;const[e,t]=g(this,Ol);E(this,Ol,null),t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){x(this,oh,dv).call(this),x(this,sh,fv).call(this)}removeEditListeners(){x(this,O3,dN).call(this),x(this,ah,hv).call(this)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const r of g(this,Jr))if(r.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(const t of e.dataTransfer.items)for(const r of g(this,Jr))if(r.isHandlingMimeForPasting(t.type)){r.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){var r;if(e.preventDefault(),(r=g(this,sr))==null||r.commitOrRemove(),!this.hasSelection)return;const t=[];for(const i of g(this,ze)){const o=i.serialize(!0);o&&t.push(o)}t.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:t}=e;for(const o of t.items)for(const s of g(this,Jr))if(s.isHandlingMimeForPasting(o.type)){s.paste(o,this.currentLayer);return}let r=t.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(o){Ce(`paste: "${o.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const i=this.currentLayer;try{const o=[];for(const c of r){const u=i.deserialize(c);if(!u)return;o.push(u)}const s=()=>{for(const c of o)x(this,lh,pv).call(this,c);x(this,ch,mv).call(this,o)},a=()=>{for(const c of o)c.remove()};this.addCommands({cmd:s,undo:a,mustExec:!0})}catch(o){Ce(`paste: "${o.message}".`)}}keydown(e){this.isShiftKeyDown||e.key!=="Shift"||(this.isShiftKeyDown=!0),g(this,Ht)===Te.NONE||this.isEditorHandlingKeyboard||Qc._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,g(this,Ys)&&(E(this,Ys,!1),x(this,Yc,e5).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(e){e?(x(this,x3,cN).call(this),x(this,sh,fv).call(this),x(this,tn,In).call(this,{isEditing:g(this,Ht)!==Te.NONE,isEmpty:x(this,Nl,K1).call(this),hasSomethingToUndo:g(this,Xr).hasSomethingToUndo(),hasSomethingToRedo:g(this,Xr).hasSomethingToRedo(),hasSelectedEditor:!1})):(x(this,I3,uN).call(this),x(this,ah,hv).call(this),x(this,tn,In).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!g(this,Jr)){E(this,Jr,e);for(const t of g(this,Jr))x(this,_i,Ia).call(this,t.defaultPropertiesToUpdate)}}getId(){return g(this,M3).id}get currentLayer(){return g(this,en).get(g(this,Wc))}getLayer(e){return g(this,en).get(e)}get currentPageIndex(){return g(this,Wc)}addLayer(e){g(this,en).set(e.pageIndex,e),g(this,Qs)?e.enable():e.disable()}removeLayer(e){g(this,en).delete(e.pageIndex)}updateMode(e,t=null,r=!1){if(g(this,Ht)!==e)if(E(this,Ht,e),e!==Te.NONE){this.setEditingState(!0),x(this,N3,hN).call(this),this.unselectAll();for(const i of g(this,en).values())i.updateMode(e);if(t||!r){if(t){for(const i of g(this,Ot).values())if(i.annotationElementId===t){this.setSelected(i),i.enterInEditMode();break}}}else this.addNewEditorFromKeyboard()}else this.setEditingState(!1),x(this,P3,pN).call(this)}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==g(this,Ht)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){var r;if(g(this,Jr)){switch(e){case he.CREATE:this.currentLayer.addNewEditor();return;case he.HIGHLIGHT_DEFAULT_COLOR:(r=g(this,Jf))==null||r.updateColor(t);break;case he.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(g(this,th)||E(this,th,new Map)).set(e,t),this.showAllEditors("highlight",t)}for(const i of g(this,ze))i.updateParams(e,t);for(const i of g(this,Jr))i.updateDefaultParams(e,t)}}showAllEditors(e,t,r=!1){var i;for(const o of g(this,Ot).values())o.editorType===e&&o.show(t);(((i=g(this,th))==null?void 0:i.get(he.HIGHLIGHT_SHOW_ALL))??!0)!==t&&x(this,_i,Ia).call(this,[[he.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(g(this,Xf)!==e){E(this,Xf,e);for(const t of g(this,en).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}getEditors(e){const t=[];for(const r of g(this,Ot).values())r.pageIndex===e&&t.push(r);return t}getEditor(e){return g(this,Ot).get(e)}addEditor(e){g(this,Ot).set(e.id,e)}removeEditor(e){var t;e.div.contains(document.activeElement)&&(g(this,Di)&&clearTimeout(g(this,Di)),E(this,Di,setTimeout(()=>{this.focusMainContainer(),E(this,Di,null)},0))),g(this,Ot).delete(e.id),this.unselect(e),e.annotationElementId&&g(this,xl).has(e.annotationElementId)||((t=g(this,Eo))==null||t.remove(e.id))}addDeletedAnnotationElement(e){g(this,xl).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return g(this,xl).has(e)}removeDeletedAnnotationElement(e){g(this,xl).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){g(this,sr)!==e&&(E(this,sr,e),e&&x(this,_i,Ia).call(this,e.propertiesToUpdate))}updateUI(e){g(this,_3,mN)===e&&x(this,_i,Ia).call(this,e.propertiesToUpdate)}toggleSelected(e){g(this,ze).has(e)?(g(this,ze).delete(e),e.unselect(),x(this,tn,In).call(this,{hasSelectedEditor:this.hasSelection})):(g(this,ze).add(e),e.select(),x(this,_i,Ia).call(this,e.propertiesToUpdate),x(this,tn,In).call(this,{hasSelectedEditor:!0}))}setSelected(e){for(const t of g(this,ze))t!==e&&t.unselect();g(this,ze).clear(),g(this,ze).add(e),e.select(),x(this,_i,Ia).call(this,e.propertiesToUpdate),x(this,tn,In).call(this,{hasSelectedEditor:!0})}isSelected(e){return g(this,ze).has(e)}get firstSelectedEditor(){return g(this,ze).values().next().value}unselect(e){e.unselect(),g(this,ze).delete(e),x(this,tn,In).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return g(this,ze).size!==0}get isEnterHandled(){return g(this,ze).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){g(this,Xr).undo(),x(this,tn,In).call(this,{hasSomethingToUndo:g(this,Xr).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:x(this,Nl,K1).call(this)})}redo(){g(this,Xr).redo(),x(this,tn,In).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:g(this,Xr).hasSomethingToRedo(),isEmpty:x(this,Nl,K1).call(this)})}addCommands(e){g(this,Xr).add(e),x(this,tn,In).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:x(this,Nl,K1).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...g(this,ze)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)x(this,lh,pv).call(this,t)},mustExec:!0})}commitOrRemove(){var e;(e=g(this,sr))==null||e.commitOrRemove()}hasSomethingToControl(){return g(this,sr)||this.hasSelection}selectAll(){for(const e of g(this,ze))e.commit();x(this,ch,mv).call(this,g(this,Ot).values())}unselectAll(){if(!(g(this,sr)&&(g(this,sr).commitOrRemove(),g(this,Ht)!==Te.NONE))&&this.hasSelection){for(const e of g(this,ze))e.unselect();g(this,ze).clear(),x(this,tn,In).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;g(this,Js)[0]+=e,g(this,Js)[1]+=t;const[i,o]=g(this,Js),s=[...g(this,ze)];g(this,Pi)&&clearTimeout(g(this,Pi)),E(this,Pi,setTimeout(()=>{E(this,Pi,null),g(this,Js)[0]=g(this,Js)[1]=0,this.addCommands({cmd:()=>{for(const a of s)g(this,Ot).has(a.id)&&a.translateInPage(i,o)},undo:()=>{for(const a of s)g(this,Ot).has(a.id)&&a.translateInPage(-i,-o)},mustExec:!1})},1e3));for(const a of s)a.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),E(this,Oi,new Map);for(const e of g(this,ze))g(this,Oi).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!g(this,Oi))return!1;this.disableUserSelect(!1);const e=g(this,Oi);E(this,Oi,null);let t=!1;for(const[{x:i,y:o,pageIndex:s},a]of e)a.newX=i,a.newY=o,a.newPageIndex=s,t||(t=i!==a.savedX||o!==a.savedY||s!==a.savedPageIndex);if(!t)return!1;const r=(i,o,s,a)=>{if(g(this,Ot).has(i.id)){const c=g(this,en).get(a);c?i._setParentAndPosition(c,o,s):(i.pageIndex=a,i.x=o,i.y=s)}};return this.addCommands({cmd:()=>{for(const[i,{newX:o,newY:s,newPageIndex:a}]of e)r(i,o,s,a)},undo:()=>{for(const[i,{savedX:o,savedY:s,savedPageIndex:a}]of e)r(i,o,s,a)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(g(this,Oi))for(const r of g(this,Oi).keys())r.drag(e,t)}rebuild(e){if(e.parent===null){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return((e=this.getActive())==null?void 0:e.shouldGetKeyboardEvents())||g(this,ze).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return g(this,sr)===e}getActive(){return g(this,sr)}getMode(){return g(this,Ht)}get imageManager(){return Ie(this,"imageManager",new D4)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let u=0,d=t.rangeCount;u<d;u++)if(!e.contains(t.getRangeAt(u).commonAncestorContainer))return null;const{x:r,y:i,width:o,height:s}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(u,d,f,h)=>({x:(d-i)/s,y:1-(u+f-r)/o,width:h/s,height:f/o});break;case"180":a=(u,d,f,h)=>({x:1-(u+f-r)/o,y:1-(d+h-i)/s,width:f/o,height:h/s});break;case"270":a=(u,d,f,h)=>({x:1-(d+h-i)/s,y:(u-r)/o,width:h/s,height:f/o});break;default:a=(u,d,f,h)=>({x:(u-r)/o,y:(d-i)/s,width:f/o,height:h/s})}const c=[];for(let u=0,d=t.rangeCount;u<d;u++){const f=t.getRangeAt(u);if(!f.collapsed)for(const{x:h,y:p,width:m,height:y}of f.getClientRects())m!==0&&y!==0&&c.push(a(h,p,m,y))}return c.length===0?null:c}addChangedExistingAnnotation({annotationElementId:e,id:t}){(g(this,Zc)||E(this,Zc,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;(t=g(this,Zc))==null||t.delete(e)}renderAnnotationElement(e){var i;const t=(i=g(this,Zc))==null?void 0:i.get(e.data.id);if(!t)return;const r=g(this,Eo).getRawValue(t);r&&(g(this,Ht)!==Te.NONE||r.hasBeenModified)&&r.renderAnnotationElement(e)}};Hc=new WeakMap,sr=new WeakMap,Ot=new WeakMap,en=new WeakMap,Uc=new WeakMap,Eo=new WeakMap,Zc=new WeakMap,Xr=new WeakMap,Ks=new WeakMap,Wc=new WeakMap,xl=new WeakMap,Oi=new WeakMap,Jr=new WeakMap,Il=new WeakMap,Gf=new WeakMap,Yf=new WeakMap,qc=new WeakMap,Qf=new WeakMap,Di=new WeakMap,Gs=new WeakMap,Kc=new WeakMap,Ys=new WeakMap,Ni=new WeakMap,M3=new WeakMap,Qs=new WeakMap,Xf=new WeakMap,Xs=new WeakMap,Ol=new WeakMap,Jf=new WeakMap,eh=new WeakMap,Ht=new WeakMap,ze=new WeakMap,Ao=new WeakMap,Dl=new WeakMap,th=new WeakMap,nh=new WeakMap,Js=new WeakMap,Pi=new WeakMap,To=new WeakMap,rh=new WeakMap,Gc=new WeakSet,Jy=function({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},ih=new WeakSet,uv=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const r of g(this,en).values())if(r.hasTextLayer(e))return r;return null},E3=new WeakSet,sN=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=x(this,Gc,Jy).call(this,e).closest(".textLayer"),r=this.getSelectionBoxes(t);r&&(g(this,Ni)||E(this,Ni,new YU(this)),g(this,Ni).show(t,r,this.direction==="ltr"))},A3=new WeakSet,aN=function(){var i,o,s;const e=document.getSelection();if(!e||e.isCollapsed){g(this,Ao)&&((i=g(this,Ni))==null||i.hide(),E(this,Ao,null),x(this,tn,In).call(this,{hasSelectedText:!1}));return}const{anchorNode:t}=e;if(t===g(this,Ao))return;const r=x(this,Gc,Jy).call(this,e).closest(".textLayer");if(r){if((o=g(this,Ni))==null||o.hide(),E(this,Ao,t),x(this,tn,In).call(this,{hasSelectedText:!0}),(g(this,Ht)===Te.HIGHLIGHT||g(this,Ht)===Te.NONE)&&(g(this,Ht)===Te.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),E(this,Ys,this.isShiftKeyDown),!this.isShiftKeyDown)){const a=g(this,Ht)===Te.HIGHLIGHT?x(this,ih,uv).call(this,r):null;a==null||a.toggleDrawing();const c=new AbortController,u=this.combinedSignal(c),d=f=>{(f.type!=="pointerup"||f.button===0)&&(c.abort(),a==null||a.toggleDrawing(!0),f.type==="pointerup"&&x(this,Yc,e5).call(this,"main_toolbar"))};window.addEventListener("pointerup",d,{signal:u}),window.addEventListener("blur",d,{signal:u})}}else g(this,Ao)&&((s=g(this,Ni))==null||s.hide(),E(this,Ao,null),x(this,tn,In).call(this,{hasSelectedText:!1}))},Yc=new WeakSet,e5=function(e=""){g(this,Ht)===Te.HIGHLIGHT?this.highlightSelection(e):g(this,Gf)&&x(this,E3,sN).call(this)},T3=new WeakSet,lN=function(){document.addEventListener("selectionchange",x(this,A3,aN).bind(this),{signal:this._signal})},x3=new WeakSet,cN=function(){if(g(this,Gs))return;E(this,Gs,new AbortController);const e=this.combinedSignal(g(this,Gs));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},I3=new WeakSet,uN=function(){var e;(e=g(this,Gs))==null||e.abort(),E(this,Gs,null)},oh=new WeakSet,dv=function(){if(g(this,Xs))return;E(this,Xs,new AbortController);const e=this.combinedSignal(g(this,Xs));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},O3=new WeakSet,dN=function(){var e;(e=g(this,Xs))==null||e.abort(),E(this,Xs,null)},sh=new WeakSet,fv=function(){if(g(this,Ks))return;E(this,Ks,new AbortController);const e=this.combinedSignal(g(this,Ks));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},ah=new WeakSet,hv=function(){var e;(e=g(this,Ks))==null||e.abort(),E(this,Ks,null)},D3=new WeakSet,fN=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},tn=new WeakSet,In=function(e){Object.entries(e).some(([t,r])=>g(this,nh)[t]!==r)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(g(this,nh),e)}),g(this,Ht)===Te.HIGHLIGHT&&e.hasSelectedEditor===!1&&x(this,_i,Ia).call(this,[[he.HIGHLIGHT_FREE,!0]]))},_i=new WeakSet,Ia=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},N3=new WeakSet,hN=function(){if(!g(this,Qs)){E(this,Qs,!0);for(const e of g(this,en).values())e.enable();for(const e of g(this,Ot).values())e.enable()}},P3=new WeakSet,pN=function(){if(this.unselectAll(),g(this,Qs)){E(this,Qs,!1);for(const e of g(this,en).values())e.disable();for(const e of g(this,Ot).values())e.disable()}},lh=new WeakSet,pv=function(e){const t=g(this,en).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},_3=new WeakSet,mN=function(){let e=null;for(e of g(this,ze));return e},Nl=new WeakSet,K1=function(){if(g(this,Ot).size===0)return!0;if(g(this,Ot).size===1)for(const e of g(this,Ot).values())return e.isEmpty();return!1},ch=new WeakSet,mv=function(e){for(const t of g(this,ze))t.unselect();g(this,ze).clear();for(const t of e)t.isEmpty()||(g(this,ze).add(t),t.select());x(this,tn,In).call(this,{hasSelectedEditor:this.hasSelection})},pe(Qc,"TRANSLATE_SMALL",1),pe(Qc,"TRANSLATE_BIG",10);let Ga=Qc;const Nr=class Nr{constructor(e){M(this,Jc);M(this,eu);M(this,Ut,null);M(this,Li,!1);M(this,ei,null);M(this,Bi,null);M(this,ar,null);M(this,Xc,!1);M(this,Ri,null);M(this,Zn,null);M(this,xo,null);M(this,Pl,null);M(this,$i,!1);E(this,Zn,e),E(this,$i,e._uiManager.useNewAltTextFlow)}static initialize(e){Nr._l10nPromise||(Nr._l10nPromise=e)}async render(){const e=E(this,ei,document.createElement("button"));e.className="altText";let t;g(this,$i)?(e.classList.add("new"),t=await Nr._l10nPromise.get("pdfjs-editor-new-alt-text-missing-button-label")):t=await Nr._l10nPromise.get("pdfjs-editor-alt-text-button-label"),e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0";const r=g(this,Zn)._uiManager._signal;e.addEventListener("contextmenu",br,{signal:r}),e.addEventListener("pointerdown",o=>o.stopPropagation(),{signal:r});const i=o=>{o.preventDefault(),g(this,Zn)._uiManager.editAltText(g(this,Zn)),g(this,$i)&&g(this,Zn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:g(this,Jc,t5)}})};return e.addEventListener("click",i,{capture:!0,signal:r}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(E(this,Xc,!0),i(o))},{signal:r}),await x(this,eu,n5).call(this),e}finish(){g(this,ei)&&(g(this,ei).focus({focusVisible:g(this,Xc)}),E(this,Xc,!1))}isEmpty(){return g(this,$i)?g(this,Ut)===null:!g(this,Ut)&&!g(this,Li)}hasData(){return g(this,$i)?g(this,Ut)!==null||!!g(this,xo):this.isEmpty()}get guessedText(){return g(this,xo)}async setGuessedText(e){g(this,Ut)===null&&(E(this,xo,e),E(this,Pl,await Nr._l10nPromise.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer")({generatedAltText:e})),x(this,eu,n5).call(this))}toggleAltTextBadge(e=!1){var t;if(g(this,$i)&&!g(this,Ut)){if(!g(this,Ri)){const r=E(this,Ri,document.createElement("div"));r.className="noAltTextBadge",g(this,Zn).div.append(r)}g(this,Ri).classList.toggle("hidden",!e)}else(t=g(this,Ri))==null||t.remove(),E(this,Ri,null)}serialize(e){let t=g(this,Ut);return e||g(this,xo)!==t||(t=g(this,Pl)),{altText:t,decorative:g(this,Li),guessedText:g(this,xo),textWithDisclaimer:g(this,Pl)}}get data(){return{altText:g(this,Ut),decorative:g(this,Li)}}set data({altText:e,decorative:t,guessedText:r,textWithDisclaimer:i,cancel:o=!1}){r&&(E(this,xo,r),E(this,Pl,i)),(g(this,Ut)!==e||g(this,Li)!==t)&&(o||(E(this,Ut,e),E(this,Li,t)),x(this,eu,n5).call(this))}toggle(e=!1){g(this,ei)&&(!e&&g(this,ar)&&(clearTimeout(g(this,ar)),E(this,ar,null)),g(this,ei).disabled=!e)}shown(){g(this,Zn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:g(this,Jc,t5)}})}destroy(){var e,t;(e=g(this,ei))==null||e.remove(),E(this,ei,null),E(this,Bi,null),(t=g(this,Ri))==null||t.remove(),E(this,Ri,null)}};Ut=new WeakMap,Li=new WeakMap,ei=new WeakMap,Bi=new WeakMap,ar=new WeakMap,Xc=new WeakMap,Ri=new WeakMap,Zn=new WeakMap,xo=new WeakMap,Pl=new WeakMap,$i=new WeakMap,Jc=new WeakSet,t5=function(){return(g(this,Ut)?"added":g(this,Ut)===null&&this.guessedText&&"review")||"missing"},eu=new WeakSet,n5=async function(){var i,o;const e=g(this,ei);if(!e)return;if(g(this,$i)){const s=g(this,Jc,t5),a=s==="review"?"to-review":s;if(e.classList.toggle("done",!!g(this,Ut)),Nr._l10nPromise.get(`pdfjs-editor-new-alt-text-${a}-button-label`).then(c=>{e.setAttribute("aria-label",c);for(const u of e.childNodes)if(u.nodeType===Node.TEXT_NODE){u.textContent=c;break}}),!g(this,Ut)){(i=g(this,Bi))==null||i.remove();return}}else{if(!g(this,Ut)&&!g(this,Li)){e.classList.remove("done"),(o=g(this,Bi))==null||o.remove();return}e.classList.add("done"),Nr._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(s=>{e.setAttribute("aria-label",s)})}let t=g(this,Bi);if(!t){E(this,Bi,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip");const s=t.id=`alt-text-tooltip-${g(this,Zn).id}`;e.setAttribute("aria-describedby",s);const a=100,c=g(this,Zn)._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(g(this,ar)),E(this,ar,null)},{once:!0}),e.addEventListener("mouseenter",()=>{E(this,ar,setTimeout(()=>{E(this,ar,null),g(this,Bi).classList.add("show"),g(this,Zn)._reportTelemetry({action:"alt_text_tooltip"})},a))},{signal:c}),e.addEventListener("mouseleave",()=>{var u;g(this,ar)&&(clearTimeout(g(this,ar)),E(this,ar,null)),(u=g(this,Bi))==null||u.classList.remove("show")},{signal:c})}t.innerText=g(this,Li)?await Nr._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):g(this,Ut),t.parentNode||e.append(t);const r=g(this,Zn).getImageForAltText();r==null||r.setAttribute("aria-describedby",t.id)},pe(Nr,"_l10nPromise",null);let lm=Nr;const Ve=class Ve{constructor(e){M(this,hh);M(this,mh);M(this,B3);M(this,R3);M(this,gh);M(this,yh);M(this,bh);M(this,$3);M(this,wh);M(this,V3);M(this,F3);M(this,j3);M(this,vh);M(this,Vl);M(this,_l,null);M(this,ti,null);M(this,lt,null);M(this,tu,!1);M(this,Ll,!1);M(this,nn,null);M(this,Bl,null);M(this,ea,null);M(this,uh,"");M(this,Rl,!1);M(this,ta,null);M(this,dh,!1);M(this,$l,!1);M(this,Io,!1);M(this,Vi,null);M(this,nu,0);M(this,ru,0);M(this,Pr,null);pe(this,"_editToolbar",null);pe(this,"_initialOptions",Object.create(null));pe(this,"_isVisible",!0);pe(this,"_uiManager",null);pe(this,"_focusEventsAllowed",!0);M(this,fh,!1);M(this,L3,Ve._zIndex++);this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:r,pageHeight:i,pageX:o,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[o,s];const[a,c]=this.parentDimensions;this.x=e.x/a,this.y=e.y/c,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e=Ve.prototype._resizeWithKeyboard,t=Ga.TRANSLATE_SMALL,r=Ga.TRANSLATE_BIG;return Ie(this,"_resizerKeyboardManager",new u2([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,r]}],[["Escape","mac+Escape"],Ve.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return Ie(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new JU({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t,r){if(Ve._l10nResizer||(Ve._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"})),Ve._l10nPromise||(Ve._l10nPromise=new Map([...["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-new-alt-text-added-button-label","pdfjs-editor-new-alt-text-missing-button-label","pdfjs-editor-new-alt-text-to-review-button-label"].map(o=>[o,e.get(o)]),...["pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer"].map(o=>[o,e.get.bind(e,o)])])),r!=null&&r.strings)for(const o of r.strings)Ve._l10nPromise.set(o,e.get(o));if(Ve._borderLineWidth!==-1)return;const i=getComputedStyle(document.documentElement);Ve._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){St("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return g(this,fh)}set _isDraggable(e){var t;E(this,fh,e),(t=this.div)==null||t.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=g(this,L3)}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):x(this,Vl,G1).call(this),this.parent=e}focusin(e){this._focusEventsAllowed&&(g(this,Rl)?E(this,Rl,!1):this.parent.setSelected(this))}focusout(e){var r;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const t=e.relatedTarget;t!=null&&t.closest(`#${this.id}`)||(e.preventDefault(),(r=this.parent)!=null&&r.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,r,i){const[o,s]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(e+r)/o,this.y=(t+i)/s,this.fixAndSetPosition()}translate(e,t){x(this,hh,gv).call(this,this.parentDimensions,e,t)}translateInPage(e,t){g(this,ta)||E(this,ta,[this.x,this.y]),x(this,hh,gv).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){g(this,ta)||E(this,ta,[this.x,this.y]);const[r,i]=this.parentDimensions;if(this.x+=e/r,this.y+=t/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:u,y:d}=this.div.getBoundingClientRect();this.parent.findNewParent(this,u,d)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:o,y:s}=this;const[a,c]=this.getBaseTranslation();o+=a,s+=c,this.div.style.left=`${(100*o).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!g(this,ta)&&(g(this,ta)[0]!==this.x||g(this,ta)[1]!==this.y)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:r}=Ve,i=r/e,o=r/t;switch(this.rotation){case 90:return[-i,o];case 180:return[i,o];case 270:return[i,-o];default:return[-i,-o]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const[t,r]=this.pageDimensions;let{x:i,y:o,width:s,height:a}=this;if(s*=t,a*=r,i*=t,o*=r,this._mustFixPosition)switch(e){case 0:i=Math.max(0,Math.min(t-s,i)),o=Math.max(0,Math.min(r-a,o));break;case 90:i=Math.max(0,Math.min(t-a,i)),o=Math.min(r,Math.max(s,o));break;case 180:i=Math.min(t,Math.max(s,i)),o=Math.min(r,Math.max(a,o));break;case 270:i=Math.min(t,Math.max(a,i)),o=Math.max(0,Math.min(r-s,o))}this.x=i/=t,this.y=o/=r;const[c,u]=this.getBaseTranslation();i+=c,o+=u;const{style:d}=this.div;d.left=`${(100*i).toFixed(2)}%`,d.top=`${(100*o).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e,t){var r;return x(r=Ve,ph,yv).call(r,e,t,this.parentRotation)}pageTranslationToScreen(e,t){var r;return x(r=Ve,ph,yv).call(r,e,t,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,r]}=this,i=t*e,o=r*e;return Bn.isCSSRoundSupported?[Math.round(i),Math.round(o)]:[i,o]}setDims(e,t){const[r,i]=this.parentDimensions;this.div.style.width=`${(100*e/r).toFixed(2)}%`,g(this,Ll)||(this.div.style.height=`${(100*t/i).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:r}=e,i=r.endsWith("%"),o=!g(this,Ll)&&t.endsWith("%");if(i&&o)return;const[s,a]=this.parentDimensions;i||(e.width=`${(100*parseFloat(r)/s).toFixed(2)}%`),g(this,Ll)||o||(e.height=`${(100*parseFloat(t)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var e;(e=g(this,lt))==null||e.finish()}async addEditToolbar(){return this._editToolbar||g(this,$l)?this._editToolbar:(this._editToolbar=new O4(this),this.div.append(this._editToolbar.render()),g(this,lt)&&await this._editToolbar.addAltText(g(this,lt)),this._editToolbar)}removeEditToolbar(){var e;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(e=g(this,lt))==null||e.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){g(this,lt)||(lm.initialize(Ve._l10nPromise),E(this,lt,new lm(this)),g(this,_l)&&(g(this,lt).data=g(this,_l),E(this,_l,null)),await this.addEditToolbar())}get altTextData(){var e;return(e=g(this,lt))==null?void 0:e.data}set altTextData(e){g(this,lt)&&(g(this,lt).data=e)}get guessedAltText(){var e;return(e=g(this,lt))==null?void 0:e.guessedText}async setGuessedAltText(e){var t;await((t=g(this,lt))==null?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return(t=g(this,lt))==null?void 0:t.serialize(e)}hasAltText(){return!!g(this,lt)&&!g(this,lt).isEmpty()}hasAltTextData(){var e;return((e=g(this,lt))==null?void 0:e.hasData())??!1}render(){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=g(this,tu)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),x(this,wh,kv).call(this);const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[r,i]=this.getInitialTranslation();return this.translate(r,i),am(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=Bn.platform;e.button!==0||e.ctrlKey&&t?e.preventDefault():(E(this,Rl,!0),this._isDraggable?x(this,$3,bN).call(this,e):x(this,bh,Cv).call(this,e))}moveInDOM(){g(this,Vi)&&clearTimeout(g(this,Vi)),E(this,Vi,setTimeout(()=>{var e;E(this,Vi,null),(e=this.parent)==null||e.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,r){e.changeParent(this),this.x=t,this.y=r,this.fixAndSetPosition()}getRect(e,t,r=this.rotation){const i=this.parentScale,[o,s]=this.pageDimensions,[a,c]=this.pageTranslation,u=e/i,d=t/i,f=this.x*o,h=this.y*s,p=this.width*o,m=this.height*s;switch(r){case 0:return[f+u+a,s-h-d-m+c,f+u+p+a,s-h-d+c];case 90:return[f+d+a,s-h+u+c,f+d+m+a,s-h+u+p+c];case 180:return[f-u-p+a,s-h+d+c,f-u+a,s-h+d+m+c];case 270:return[f-d-m+a,s-h-u-p+c,f-d+a,s-h-u+c];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,i,o,s]=e,a=o-r,c=s-i;switch(this.rotation){case 0:return[r,t-s,a,c];case 90:return[r,t-i,c,a];case 180:return[o,t-i,a,c];case 270:return[o,t-s,c,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){E(this,$l,!0)}disableEditMode(){E(this,$l,!1)}isInEditMode(){return g(this,$l)}shouldGetKeyboardEvents(){return g(this,Io)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){x(this,wh,kv).call(this)}rotate(e){}serialize(e=!1,t=null){St("An editor must be serializable")}static deserialize(e,t,r){const i=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:r});i.rotation=e.rotation,E(i,_l,e.accessibilityData);const[o,s]=i.pageDimensions,[a,c,u,d]=i.getRectInCurrentCoords(e.rect,s);return i.x=a/o,i.y=c/s,i.width=u/o,i.height=d/s,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e;if((e=g(this,ea))==null||e.abort(),E(this,ea,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),g(this,Vi)&&(clearTimeout(g(this,Vi)),E(this,Vi,null)),x(this,Vl,G1).call(this),this.removeEditToolbar(),g(this,Pr)){for(const t of g(this,Pr).values())clearTimeout(t);E(this,Pr,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(x(this,B3,gN).call(this),g(this,nn).classList.remove("hidden"),am(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),E(this,Bl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const t=g(this,nn).children;if(!g(this,ti)){E(this,ti,Array.from(t));const s=x(this,V3,wN).bind(this),a=x(this,F3,vN).bind(this),c=this._uiManager._signal;for(const u of g(this,ti)){const d=u.getAttribute("data-resizer-name");u.setAttribute("role","spinbutton"),u.addEventListener("keydown",s,{signal:c}),u.addEventListener("blur",a,{signal:c}),u.addEventListener("focus",x(this,j3,CN).bind(this,d),{signal:c}),u.setAttribute("data-l10n-id",Ve._l10nResizer[d])}}const r=g(this,ti)[0];let i=0;for(const s of t){if(s===r)break;i++}const o=(360-this.rotation+this.parentRotation)%360/90*(g(this,ti).length/4);if(o!==i){if(o<i)for(let a=0;a<i-o;a++)g(this,nn).append(g(this,nn).firstChild);else if(o>i)for(let a=0;a<o-i;a++)g(this,nn).firstChild.before(g(this,nn).lastChild);let s=0;for(const a of t){const c=g(this,ti)[s++].getAttribute("data-resizer-name");a.setAttribute("data-l10n-id",Ve._l10nResizer[c])}}x(this,vh,Sv).call(this,0),E(this,Io,!0),g(this,nn).firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}_resizeWithKeyboard(e,t){g(this,Io)&&x(this,yh,vv).call(this,g(this,uh),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){x(this,Vl,G1).call(this),this.div.focus()}select(){var e,t,r;this.makeResizable(),(e=this.div)==null||e.classList.add("selectedEditor"),this._editToolbar?((t=this._editToolbar)==null||t.show(),(r=g(this,lt))==null||r.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{var i,o;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((o=this._editToolbar)==null||o.show())})}unselect(){var e,t,r,i,o;(e=g(this,nn))==null||e.classList.add("hidden"),(t=this.div)==null||t.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(o=g(this,lt))==null||o.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return g(this,dh)}set isEditing(e){E(this,dh,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){E(this,Ll,!0);const r=e/t,{style:i}=this.div;i.aspectRatio=r,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){g(this,Pr)||E(this,Pr,new Map);const{action:r}=e;let i=g(this,Pr).get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(e),g(this,Pr).delete(r),g(this,Pr).size===0&&E(this,Pr,null)},Ve._telemetryTimeout),g(this,Pr).set(r,i)}else e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),E(this,tu,!1)}disable(){this.div&&(this.div.tabIndex=-1),E(this,tu,!0)}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if(t.nodeName==="CANVAS"){const r=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),r.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;t.nodeName==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}};_l=new WeakMap,ti=new WeakMap,lt=new WeakMap,tu=new WeakMap,Ll=new WeakMap,nn=new WeakMap,Bl=new WeakMap,ea=new WeakMap,uh=new WeakMap,Rl=new WeakMap,ta=new WeakMap,dh=new WeakMap,$l=new WeakMap,Io=new WeakMap,Vi=new WeakMap,nu=new WeakMap,ru=new WeakMap,Pr=new WeakMap,fh=new WeakMap,L3=new WeakMap,hh=new WeakSet,gv=function([e,t],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/e,this.y+=i/t,this.fixAndSetPosition()},ph=new WeakSet,yv=function(e,t,r){switch(r){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},mh=new WeakSet,bv=function(e){switch(e){case 90:{const[t,r]=this.pageDimensions;return[0,-t/r,r/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,r]=this.pageDimensions;return[0,t/r,-r/t,0]}default:return[1,0,0,1]}},B3=new WeakSet,gN=function(){if(g(this,nn))return;E(this,nn,document.createElement("div")),g(this,nn).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const r of e){const i=document.createElement("div");g(this,nn).append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",x(this,R3,yN).bind(this,r),{signal:t}),i.addEventListener("contextmenu",br,{signal:t}),i.tabIndex=-1}this.div.prepend(g(this,nn))},R3=new WeakSet,yN=function(e,t){var m;t.preventDefault();const{isMac:r}=Bn.platform;if(t.button!==0||t.ctrlKey&&r)return;(m=g(this,lt))==null||m.toggle(!1);const i=this._isDraggable;this._isDraggable=!1;const o=new AbortController,s=this._uiManager.combinedSignal(o);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",x(this,yh,vv).bind(this,e),{passive:!0,capture:!0,signal:s}),window.addEventListener("contextmenu",br,{signal:s});const a=this.x,c=this.y,u=this.width,d=this.height,f=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const p=()=>{var y;o.abort(),this.parent.togglePointerEvents(!0),(y=g(this,lt))==null||y.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=f,this.div.style.cursor=h,x(this,gh,wv).call(this,a,c,u,d)};window.addEventListener("pointerup",p,{signal:s}),window.addEventListener("blur",p,{signal:s})},gh=new WeakSet,wv=function(e,t,r,i){const o=this.x,s=this.y,a=this.width,c=this.height;o===e&&s===t&&a===r&&c===i||this.addCommands({cmd:()=>{this.width=a,this.height=c,this.x=o,this.y=s;const[u,d]=this.parentDimensions;this.setDims(u*a,d*c),this.fixAndSetPosition()},undo:()=>{this.width=r,this.height=i,this.x=e,this.y=t;const[u,d]=this.parentDimensions;this.setDims(u*r,d*i),this.fixAndSetPosition()},mustExec:!0})},yh=new WeakSet,vv=function(e,t){const[r,i]=this.parentDimensions,o=this.x,s=this.y,a=this.width,c=this.height,u=Ve.MIN_SIZE/r,d=Ve.MIN_SIZE/i,f=F=>Math.round(1e4*F)/1e4,h=x(this,mh,bv).call(this,this.rotation),p=(F,K)=>[h[0]*F+h[2]*K,h[1]*F+h[3]*K],m=x(this,mh,bv).call(this,360-this.rotation);let y,b,w=!1,v=!1;switch(e){case"topLeft":w=!0,y=(F,K)=>[0,0],b=(F,K)=>[F,K];break;case"topMiddle":y=(F,K)=>[F/2,0],b=(F,K)=>[F/2,K];break;case"topRight":w=!0,y=(F,K)=>[F,0],b=(F,K)=>[0,K];break;case"middleRight":v=!0,y=(F,K)=>[F,K/2],b=(F,K)=>[0,K/2];break;case"bottomRight":w=!0,y=(F,K)=>[F,K],b=(F,K)=>[0,0];break;case"bottomMiddle":y=(F,K)=>[F/2,K],b=(F,K)=>[F/2,0];break;case"bottomLeft":w=!0,y=(F,K)=>[0,K],b=(F,K)=>[F,0];break;case"middleLeft":v=!0,y=(F,K)=>[0,K/2],b=(F,K)=>[F,K/2]}const k=y(a,c),C=b(a,c);let T=p(...C);const S=f(o+T[0]),A=f(s+T[1]);let D=1,I=1,[P,O]=this.screenToPageTranslation(t.movementX,t.movementY);[P,O]=(_=P/r,B=O/i,[m[0]*_+m[2]*B,m[1]*_+m[3]*B]);var _,B;if(w){const F=Math.hypot(a,c);D=I=Math.max(Math.min(Math.hypot(C[0]-k[0]-P,C[1]-k[1]-O)/F,1/a,1/c),u/a,d/c)}else v?D=Math.max(u,Math.min(1,Math.abs(C[0]-k[0]-P)))/a:I=Math.max(d,Math.min(1,Math.abs(C[1]-k[1]-O)))/c;const $=f(a*D),R=f(c*I);T=p(...b($,R));const N=S-T[0],W=A-T[1];this.width=$,this.height=R,this.x=N,this.y=W,this.setDims(r*$,i*R),this.fixAndSetPosition()},bh=new WeakSet,Cv=function(e){const{isMac:t}=Bn.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},$3=new WeakSet,bN=function(e){const t=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();const r=new AbortController,i=this._uiManager.combinedSignal(r);if(t){this.div.classList.add("moving"),E(this,nu,e.clientX),E(this,ru,e.clientY);const s=a=>{const{clientX:c,clientY:u}=a,[d,f]=this.screenToPageTranslation(c-g(this,nu),u-g(this,ru));E(this,nu,c),E(this,ru,u),this._uiManager.dragSelectedEditors(d,f)};window.addEventListener("pointermove",s,{passive:!0,capture:!0,signal:i})}const o=()=>{r.abort(),t&&this.div.classList.remove("moving"),E(this,Rl,!1),this._uiManager.endDragSession()||x(this,bh,Cv).call(this,e)};window.addEventListener("pointerup",o,{signal:i}),window.addEventListener("blur",o,{signal:i})},wh=new WeakSet,kv=function(){if(g(this,ea)||!this.div)return;E(this,ea,new AbortController);const e=this._uiManager.combinedSignal(g(this,ea));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},V3=new WeakSet,wN=function(e){Ve._resizerKeyboardManager.exec(this,e)},F3=new WeakSet,vN=function(e){var t;g(this,Io)&&((t=e.relatedTarget)==null?void 0:t.parentNode)!==g(this,nn)&&x(this,Vl,G1).call(this)},j3=new WeakSet,CN=function(e){E(this,uh,g(this,Io)?e:"")},vh=new WeakSet,Sv=function(e){if(g(this,ti))for(const t of g(this,ti))t.tabIndex=e},Vl=new WeakSet,G1=function(){if(E(this,Io,!1),x(this,vh,Sv).call(this,-1),g(this,Bl)){const{savedX:e,savedY:t,savedWidth:r,savedHeight:i}=g(this,Bl);x(this,gh,wv).call(this,e,t,r,i),E(this,Bl,null)}},M(Ve,ph),pe(Ve,"_l10nPromise",null),pe(Ve,"_l10nResizer",null),pe(Ve,"_borderLineWidth",-1),pe(Ve,"_colorManager",new N4),pe(Ve,"_zIndex",1),pe(Ve,"_telemetryTimeout",1e3);let je=Ve;class JU extends je{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const CM=3285377520,wr=4294901760,ps=65535;class kM{constructor(e){this.h1=e?4294967295&e:CM,this.h2=e?4294967295&e:CM}update(e){let t,r;if(typeof e=="string"){t=new Uint8Array(2*e.length),r=0;for(let y=0,b=e.length;y<b;y++){const w=e.charCodeAt(y);w<=255?t[r++]=w:(t[r++]=w>>>8,t[r++]=255&w)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),r=t.byteLength}const i=r>>2,o=r-4*i,s=new Uint32Array(t.buffer,0,i);let a=0,c=0,u=this.h1,d=this.h2;const f=3432918353,h=461845907,p=11601,m=13715;for(let y=0;y<i;y++)1&y?(a=s[y],a=a*f&wr|a*p&ps,a=a<<15|a>>>17,a=a*h&wr|a*m&ps,u^=a,u=u<<13|u>>>19,u=5*u+3864292196):(c=s[y],c=c*f&wr|c*p&ps,c=c<<15|c>>>17,c=c*h&wr|c*m&ps,d^=c,d=d<<13|d>>>19,d=5*d+3864292196);switch(a=0,o){case 3:a^=t[4*i+2]<<16;case 2:a^=t[4*i+1]<<8;case 1:a^=t[4*i],a=a*f&wr|a*p&ps,a=a<<15|a>>>17,a=a*h&wr|a*m&ps,1&i?u^=a:d^=a}this.h1=u,this.h2=d}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&wr|36045*e&ps,t=4283543511*t&wr|(2950163797*(t<<16|e>>>16)&wr)>>>16,e^=t>>>1,e=444984403*e&wr|60499*e&ps,t=3301882366*t&wr|(3120437893*(t<<16|e>>>16)&wr)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const P4=Object.freeze({map:null,hash:"",transfer:void 0});class _4{constructor(){M(this,z3);M(this,Fl,!1);M(this,jl,null);M(this,Zt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=g(this,Zt).get(e);return r===void 0?t:Object.assign(t,r)}getRawValue(e){return g(this,Zt).get(e)}remove(e){if(g(this,Zt).delete(e),g(this,Zt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const t of g(this,Zt).values())if(t instanceof je)return;this.onAnnotationEditor(null)}}setValue(e,t){const r=g(this,Zt).get(e);let i=!1;if(r!==void 0)for(const[o,s]of Object.entries(t))r[o]!==s&&(i=!0,r[o]=s);else i=!0,g(this,Zt).set(e,t);i&&x(this,z3,kN).call(this),t instanceof je&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(t.constructor._type)}has(e){return g(this,Zt).has(e)}getAll(){return g(this,Zt).size>0?S4(g(this,Zt)):null}setAll(e){for(const[t,r]of Object.entries(e))this.setValue(t,r)}get size(){return g(this,Zt).size}resetModified(){g(this,Fl)&&(E(this,Fl,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new SM(this)}get serializable(){if(g(this,Zt).size===0)return P4;const e=new Map,t=new kM,r=[],i=Object.create(null);let o=!1;for(const[s,a]of g(this,Zt)){const c=a instanceof je?a.serialize(!1,i):a;c&&(e.set(s,c),t.update(`${s}:${JSON.stringify(c)}`),o||(o=!!c.bitmap))}if(o)for(const s of e.values())s.bitmap&&r.push(s.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:r}:P4}get editorStats(){let e=null;const t=new Map;for(const r of g(this,Zt).values()){if(!(r instanceof je))continue;const i=r.telemetryFinalData;if(!i)continue;const{type:o}=i;t.has(o)||t.set(o,Object.getPrototypeOf(r).constructor),e||(e=Object.create(null));const s=e[o]||(e[o]=new Map);for(const[a,c]of Object.entries(i)){if(a==="type")continue;let u=s.get(a);u||(u=new Map,s.set(a,u));const d=u.get(c)??0;u.set(c,d+1)}}for(const[r,i]of t)e[r]=i.computeTelemetryFinalData(e[r]);return e}resetModifiedIds(){E(this,jl,null)}get modifiedIds(){if(g(this,jl))return g(this,jl);const e=[];for(const t of g(this,Zt).values())t instanceof je&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return E(this,jl,{ids:new Set(e),hash:e.join(",")})}}Fl=new WeakMap,jl=new WeakMap,Zt=new WeakMap,z3=new WeakSet,kN=function(){g(this,Fl)||(E(this,Fl,!0),typeof this.onSetModified=="function"&&this.onSetModified())};class SM extends _4{constructor(t){super();M(this,Ch,void 0);const{map:r,hash:i,transfer:o}=t.serializable,s=structuredClone(r,o?{transfer:o}:null);E(this,Ch,{map:s,hash:i,transfer:o})}get print(){St("Should not call PrintAnnotationStorage.print")}get serializable(){return g(this,Ch)}get modifiedIds(){return Ie(this,"modifiedIds",{ids:new Set,hash:""})}}Ch=new WeakMap;class eZ{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){M(this,iu,new Set);this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),g(this,iu).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!g(this,iu).has(e.loadedName))if(xt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:i,style:o}=e,s=new FontFace(r,i,o);this.addNativeFontFace(s);try{await s.load(),g(this,iu).add(r),t==null||t(e)}catch{Ce(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}}else St("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const r=e.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw Ce(`Failed to load font '${r.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(e,i)})}}get isFontLoadingAPISupported(){var e;return Ie(this,"isFontLoadingAPISupported",!!((e=this._document)!=null&&e.fonts))}get isSyncFontLoadingSupported(){let e=!1;return(cn||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),Ie(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,r={done:!1,complete:function(){for(xt(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.length>0&&t[0].done;){const o=t.shift();setTimeout(o.callback,0)}},callback:e};return t.push(r),r}get _loadTestFont(){return Ie(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function r(b,w){return b.charCodeAt(w)<<24|b.charCodeAt(w+1)<<16|b.charCodeAt(w+2)<<8|255&b.charCodeAt(w+3)}function i(b,w,v,k){return b.substring(0,w)+k+b.substring(w+v)}let o,s;const a=this._document.createElement("canvas");a.width=1,a.height=1;const c=a.getContext("2d");let u=0;const d=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=i(f,976,d.length,d);const h=1482184792;let p=r(f,16);for(o=0,s=d.length-3;o<s;o+=4)p=p-h+r(d,o)|0;o<d.length&&(p=p-h+r(d+"XXX",o)|0),f=i(f,16,4,function(w){return String.fromCharCode(w>>24&255,w>>16&255,w>>8&255,255&w)}(p));const m=`@font-face {font-family:"${d}";src:${`url(data:font/opentype;base64,${btoa(f)});`}}`;this.insertRule(m);const y=this._document.createElement("div");y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px";for(const b of[e.loadedName,d]){const w=this._document.createElement("span");w.textContent="Hi",w.style.fontFamily=b,y.append(w)}this._document.body.append(y),function b(w,v){if(++u>30){Ce("Load test font never loaded."),v();return}c.font="30px "+w,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?v():setTimeout(b.bind(null,w,v))}(d,()=>{y.remove(),t.complete()})}}iu=new WeakMap;class tZ{constructor(e,{disableFontFace:t=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const i in e)this[i]=e[i];this.disableFontFace=t===!0,this._inspectFont=r}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else e=new FontFace(this.loadedName,this.data,{});return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var i;if(!this.data||this.disableFontFace)return null;const e=cM(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let o=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(o+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${o}src:${t}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return(i=this._inspectFont)==null||i.call(this,this,t),r}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];let r;try{r=e.get(this.loadedName+"_path_"+t)}catch(o){Ce(`getPathGenerator - ignoring character: "${o}".`)}if(!Array.isArray(r)||r.length===0)return this.compiledGlyphs[t]=function(o,s){};const i=[];for(let o=0,s=r.length;o<s;)switch(r[o++]){case RU:{const[a,c,u,d,f,h]=r.slice(o,o+6);i.push(p=>p.bezierCurveTo(a,c,u,d,f,h)),o+=6}break;case $U:{const[a,c]=r.slice(o,o+2);i.push(u=>u.moveTo(a,c)),o+=2}break;case VU:{const[a,c]=r.slice(o,o+2);i.push(u=>u.lineTo(a,c)),o+=2}break;case FU:{const[a,c,u,d]=r.slice(o,o+4);i.push(f=>f.quadraticCurveTo(a,c,u,d)),o+=4}break;case jU:i.push(a=>a.restore());break;case zU:i.push(a=>a.save());break;case HU:xt(i.length===2,"Scale command is only valid at the third position.");break;case UU:{const[a,c,u,d,f,h]=r.slice(o,o+6);i.push(p=>p.transform(a,c,u,d,f,h)),o+=6}break;case ZU:{const[a,c]=r.slice(o,o+2);i.push(u=>u.translate(a,c)),o+=2}}return this.compiledGlyphs[t]=function(s,a){i[0](s),i[1](s),s.scale(a,-a);for(let c=2,u=i.length;c<u;c++)i[c](s)}}}if(cn){var L4=Promise.withResolvers(),d2=null;(async()=>{const n=await Promise.resolve().then(()=>Rf),e=await Promise.resolve().then(()=>Rf),t=await Promise.resolve().then(()=>Rf),r=await Promise.resolve().then(()=>Rf);let i,o;try{i=await Promise.resolve().then(()=>Rf)}catch{}try{o=await Promise.resolve().then(()=>Ife)}catch{}return new Map(Object.entries({fs:n,http:e,https:t,url:r,canvas:i,path2d:o}))})().then(n=>{var e,t,r,i;if(d2=n,L4.resolve(),!globalThis.DOMMatrix){const o=(e=n.get("canvas"))==null?void 0:e.DOMMatrix;o?globalThis.DOMMatrix=o:Ce("Cannot polyfill `DOMMatrix`, rendering may be broken.")}if(!globalThis.Path2D){const o=(t=n.get("canvas"))==null?void 0:t.CanvasRenderingContext2D,s=(r=n.get("path2d"))==null?void 0:r.applyPath2DToCanvasRenderingContext,a=(i=n.get("path2d"))==null?void 0:i.Path2D;o&&s&&a?(s(o),globalThis.Path2D=a):Ce("Cannot polyfill `Path2D`, rendering may be broken.")}},n=>{Ce(`loadPackages: ${n}`),d2=new Map,L4.resolve()})}class ms{static get promise(){return L4.promise}static get(e){return d2==null?void 0:d2.get(e)}}const MM=function(n){return ms.get("fs").promises.readFile(n).then(e=>new Uint8Array(e))},Ya="Fill",B4="Stroke",f2="Shading";function R4(n,e){if(!e)return;const t=e[2]-e[0],r=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],t,r),n.clip(i)}class $4{getPattern(){St("Abstract method `getPattern` called.")}}class nZ extends $4{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;this._type==="axial"?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const r of this._colorStops)t.addColorStop(r[0],r[1]);return t}getPattern(e,t,r,i){let o;if(i===B4||i===Ya){const s=t.current.getClippedPathBoundingBox(i,ot(e))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,c=Math.ceil(s[3]-s[1])||1,u=t.cachedCanvases.getCanvas("pattern",a,c,!0),d=u.context;d.clearRect(0,0,d.canvas.width,d.canvas.height),d.beginPath(),d.rect(0,0,d.canvas.width,d.canvas.height),d.translate(-s[0],-s[1]),r=se.transform(r,[1,0,0,1,s[0],s[1]]),d.transform(...t.baseTransform),this.matrix&&d.transform(...this.matrix),R4(d,this._bbox),d.fillStyle=this._createGradient(d),d.fill(),o=e.createPattern(u.canvas,"no-repeat");const f=new DOMMatrix(r);o.setTransform(f)}else R4(e,this._bbox),o=this._createGradient(e);return o}}function V4(n,e,t,r,i,o,s,a){const c=e.coords,u=e.colors,d=n.data,f=4*n.width;let h;c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h),c[r+1]>c[i+1]&&(h=r,r=i,i=h,h=s,s=a,a=h),c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h);const p=(c[t]+e.offsetX)*e.scaleX,m=(c[t+1]+e.offsetY)*e.scaleY,y=(c[r]+e.offsetX)*e.scaleX,b=(c[r+1]+e.offsetY)*e.scaleY,w=(c[i]+e.offsetX)*e.scaleX,v=(c[i+1]+e.offsetY)*e.scaleY;if(m>=v)return;const k=u[o],C=u[o+1],T=u[o+2],S=u[s],A=u[s+1],D=u[s+2],I=u[a],P=u[a+1],O=u[a+2],_=Math.round(m),B=Math.round(v);let $,R,N,W,F,K,ae,de;for(let Q=_;Q<=B;Q++){if(Q<b){const ne=Q<m?0:(m-Q)/(m-b);$=p-(p-y)*ne,R=k-(k-S)*ne,N=C-(C-A)*ne,W=T-(T-D)*ne}else{let ne;ne=Q>v?1:b===v?0:(b-Q)/(b-v),$=y-(y-w)*ne,R=S-(S-I)*ne,N=A-(A-P)*ne,W=D-(D-O)*ne}let Z;Z=Q<m?0:Q>v?1:(m-Q)/(m-v),F=p-(p-w)*Z,K=k-(k-I)*Z,ae=C-(C-P)*Z,de=T-(T-O)*Z;const H=Math.round(Math.min($,F)),j=Math.round(Math.max($,F));let q=f*Q+4*H;for(let ne=H;ne<=j;ne++)Z=($-ne)/($-F),Z<0?Z=0:Z>1&&(Z=1),d[q++]=R-(R-K)*Z|0,d[q++]=N-(N-ae)*Z|0,d[q++]=W-(W-de)*Z|0,d[q++]=255}}function rZ(n,e,t){const r=e.coords,i=e.colors;let o,s;switch(e.type){case"lattice":const a=e.verticesPerRow,c=Math.floor(r.length/a)-1,u=a-1;for(o=0;o<c;o++){let d=o*a;for(let f=0;f<u;f++,d++)V4(n,t,r[d],r[d+1],r[d+a],i[d],i[d+1],i[d+a]),V4(n,t,r[d+a+1],r[d+1],r[d+a],i[d+a+1],i[d+1],i[d+a])}break;case"triangles":for(o=0,s=r.length;o<s;o+=3)V4(n,t,r[o],r[o+1],r[o+2],i[o],i[o+1],i[o+2]);break;default:throw new Error("illegal figure")}}class iZ extends $4{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-i,a=Math.ceil(this._bounds[3])-o,c=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),u=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),d=s/c,f=a/u,h={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/d,scaleY:1/f},p=c+4,m=u+4,y=r.getCanvas("mesh",p,m,!1),b=y.context,w=b.createImageData(c,u);if(t){const v=w.data;for(let k=0,C=v.length;k<C;k+=4)v[k]=t[0],v[k+1]=t[1],v[k+2]=t[2],v[k+3]=255}for(const v of this._figures)rZ(w,v,h);return b.putImageData(w,2,2),{canvas:y.canvas,offsetX:i-2*d,offsetY:o-2*f,scaleX:d,scaleY:f}}getPattern(e,t,r,i){R4(e,this._bbox);let o;if(i===f2)o=se.singularValueDecompose2dScale(ot(e));else if(o=se.singularValueDecompose2dScale(t.baseTransform),this.matrix){const a=se.singularValueDecompose2dScale(this.matrix);o=[o[0]*a[0],o[1]*a[1]]}const s=this._createMeshCanvas(o,i===f2?null:this._background,t.cachedCanvases);return i!==f2&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class oZ extends $4{getPattern(){return"hotpink"}}const sZ=1,aZ=2,H3=class H3{constructor(e,t,r,i,o){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=i,this.baseTransform=o}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,i=this.xstep,o=this.ystep,s=this.paintType,a=this.tilingType,c=this.color,u=this.canvasGraphicsFactory;nm("TilingType: "+a);const d=r[0],f=r[1],h=r[2],p=r[3],m=se.singularValueDecompose2dScale(this.matrix),y=se.singularValueDecompose2dScale(this.baseTransform),b=[m[0]*y[0],m[1]*y[1]],w=this.getSizeAndScale(i,this.ctx.canvas.width,b[0]),v=this.getSizeAndScale(o,this.ctx.canvas.height,b[1]),k=e.cachedCanvases.getCanvas("pattern",w.size,v.size,!0),C=k.context,T=u.createCanvasGraphics(C);T.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(T,s,c);let S=d,A=f,D=h,I=p;return d<0&&(S=0,D+=Math.abs(d)),f<0&&(A=0,I+=Math.abs(f)),C.translate(-w.scale*S,-v.scale*A),T.transform(w.scale,0,0,v.scale,0,0),C.save(),this.clipBbox(T,S,A,D,I),T.baseTransform=ot(T.ctx),T.executeOperatorList(t),T.endDrawing(),{canvas:k.canvas,scaleX:w.scale,scaleY:v.scale,offsetX:S,offsetY:A}}getSizeAndScale(e,t,r){e=Math.abs(e);const i=Math.max(H3.MAX_PATTERN_SIZE,t);let o=Math.ceil(e*r);return o>=i?o=i:r=o/e,{scale:r,size:o}}clipBbox(e,t,r,i,o){const s=i-t,a=o-r;e.ctx.rect(t,r,s,a),e.current.updateRectMinMax(ot(e.ctx),[t,r,i,o]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const i=e.ctx,o=e.current;switch(t){case sZ:const s=this.ctx;i.fillStyle=s.fillStyle,i.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case aZ:const a=se.makeHexColor(r[0],r[1],r[2]);i.fillStyle=a,i.strokeStyle=a,o.fillColor=a,o.strokeColor=a;break;default:throw new LU(`Unsupported paint type: ${t}`)}}getPattern(e,t,r,i){let o=r;i!==f2&&(o=se.transform(o,t.baseTransform),this.matrix&&(o=se.transform(o,this.matrix)));const s=this.createPatternCanvas(t);let a=new DOMMatrix(o);a=a.translate(s.offsetX,s.offsetY),a=a.scale(1/s.scaleX,1/s.scaleY);const c=e.createPattern(s.canvas,"repeat");return c.setTransform(a),c}};pe(H3,"MAX_PATTERN_SIZE",3e3);let F4=H3;function lZ({src:n,srcPos:e=0,dest:t,width:r,height:i,nonBlackColor:o=4294967295,inverseDecode:s=!1}){const a=Bn.isLittleEndian?4278190080:255,[c,u]=s?[o,a]:[a,o],d=r>>3,f=7&r,h=n.length;t=new Uint32Array(t.buffer);let p=0;for(let m=0;m<i;m++){for(const b=e+d;e<b;e++){const w=e<h?n[e]:255;t[p++]=128&w?u:c,t[p++]=64&w?u:c,t[p++]=32&w?u:c,t[p++]=16&w?u:c,t[p++]=8&w?u:c,t[p++]=4&w?u:c,t[p++]=2&w?u:c,t[p++]=1&w?u:c}if(f===0)continue;const y=e<h?n[e++]:255;for(let b=0;b<f;b++)t[p++]=y&1<<7-b?u:c}return{srcPos:e,destPos:p}}const Rn=16;class cZ{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let i;return this.cache[e]!==void 0?(i=this.cache[e],this.canvasFactory.reset(i,t,r)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function cm(n,e,t,r,i,o,s,a,c,u){const[d,f,h,p,m,y]=ot(n);if(f===0&&h===0){const b=s*d+m,w=Math.round(b),v=a*p+y,k=Math.round(v),C=(s+c)*d+m,T=Math.abs(Math.round(C)-w)||1,S=(a+u)*p+y,A=Math.abs(Math.round(S)-k)||1;return n.setTransform(Math.sign(d),0,0,Math.sign(p),w,k),n.drawImage(e,t,r,i,o,0,0,T,A),n.setTransform(d,f,h,p,m,y),[T,A]}if(d===0&&p===0){const b=a*h+m,w=Math.round(b),v=s*f+y,k=Math.round(v),C=(a+u)*h+m,T=Math.abs(Math.round(C)-w)||1,S=(s+c)*f+y,A=Math.abs(Math.round(S)-k)||1;return n.setTransform(0,Math.sign(f),Math.sign(h),0,w,k),n.drawImage(e,t,r,i,o,0,0,A,T),n.setTransform(d,f,h,p,m,y),[A,T]}return n.drawImage(e,t,r,i,o,s,a,c,u),[Math.hypot(d,f)*c,Math.hypot(h,p)*u]}class EM{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=oM,this.textMatrixScale=1,this.fontMatrix=g4,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=Xp,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=se.applyTransform([t,r],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,t){const r=se.applyTransform(t,e),i=se.applyTransform(t.slice(2),e),o=se.applyTransform([t[0],t[3]],e),s=se.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,r[0],i[0],o[0],s[0]),this.minY=Math.min(this.minY,r[1],i[1],o[1],s[1]),this.maxX=Math.max(this.maxX,r[0],i[0],o[0],s[0]),this.maxY=Math.max(this.maxY,r[1],i[1],o[1],s[1])}updateScalingPathMinMax(e,t){se.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,i,o,s,a,c,u,d){const f=se.bezierBoundingBox(t,r,i,o,s,a,c,u,d);d||this.updateRectMinMax(e,f)}getPathBoundingBox(e=Ya,t=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(e===B4){t||St("Stroke bounding box must include transform.");const i=se.singularValueDecompose2dScale(t),o=i[0]*this.lineWidth/2,s=i[1]*this.lineWidth/2;r[0]-=o,r[1]-=s,r[2]+=o,r[3]+=s}return r}updateClipFromPath(){const e=se.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=Ya,t=null){return se.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function AM(n,e){if(typeof ImageData<"u"&&e instanceof ImageData){n.putImageData(e,0,0);return}const t=e.height,r=e.width,i=t%Rn,o=(t-i)/Rn,s=i===0?o:o+1,a=n.createImageData(r,Rn);let c,u=0;const d=e.data,f=a.data;let h,p,m,y;if(e.kind===Jp.GRAYSCALE_1BPP){const b=d.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),v=w.length,k=r+7>>3,C=4294967295,T=Bn.isLittleEndian?4278190080:255;for(h=0;h<s;h++){for(m=h<o?Rn:i,c=0,p=0;p<m;p++){const S=b-u;let A=0;const D=S>k?r:8*S-7,I=-8&D;let P=0,O=0;for(;A<I;A+=8)O=d[u++],w[c++]=128&O?C:T,w[c++]=64&O?C:T,w[c++]=32&O?C:T,w[c++]=16&O?C:T,w[c++]=8&O?C:T,w[c++]=4&O?C:T,w[c++]=2&O?C:T,w[c++]=1&O?C:T;for(;A<D;A++)P===0&&(O=d[u++],P=128),w[c++]=O&P?C:T,P>>=1}for(;c<v;)w[c++]=0;n.putImageData(a,0,h*Rn)}}else if(e.kind===Jp.RGBA_32BPP){for(p=0,y=r*Rn*4,h=0;h<o;h++)f.set(d.subarray(u,u+y)),u+=y,n.putImageData(a,0,p),p+=Rn;h<s&&(y=r*i*4,f.set(d.subarray(u,u+y)),n.putImageData(a,0,p))}else{if(e.kind!==Jp.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(m=Rn,y=r*m,h=0;h<s;h++){for(h>=o&&(m=i,y=r*m),c=0,p=y;p--;)f[c++]=d[u++],f[c++]=d[u++],f[c++]=d[u++],f[c++]=255;n.putImageData(a,0,h*Rn)}}}function TM(n,e){if(e.bitmap){n.drawImage(e.bitmap,0,0);return}const t=e.height,r=e.width,i=t%Rn,o=(t-i)/Rn,s=i===0?o:o+1,a=n.createImageData(r,Rn);let c=0;const u=e.data,d=a.data;for(let f=0;f<s;f++){const h=f<o?Rn:i;({srcPos:c}=lZ({src:u,srcPos:c,dest:d,width:r,height:h,nonBlackColor:0})),n.putImageData(a,0,f*Rn)}}function h2(n,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of t)n[r]!==void 0&&(e[r]=n[r]);n.setLineDash!==void 0&&(e.setLineDash(n.getLineDash()),e.lineDashOffset=n.lineDashOffset)}function um(n){if(n.strokeStyle=n.fillStyle="#000000",n.fillRule="nonzero",n.globalAlpha=1,n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=10,n.globalCompositeOperation="source-over",n.font="10px sans-serif",n.setLineDash!==void 0&&(n.setLineDash([]),n.lineDashOffset=0),!cn){const{filter:e}=n;e!=="none"&&e!==""&&(n.filter="none")}}function xM(n,e){if(e)return!0;const t=se.singularValueDecompose2dScale(n);t[0]=Math.fround(t[0]),t[1]=Math.fround(t[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*hs.PDF_TO_CSS_UNITS);return t[0]<=r&&t[1]<=r}const uZ=["butt","round","square"],dZ=["miter","round","bevel"],fZ={},IM={},nv=class nv{constructor(e,t,r,i,o,{optionalContentConfig:s,markedContentStack:a=null},c,u){M(this,kh);M(this,Sh);this.ctx=e,this.current=new EM(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=i,this.filterFactory=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=s,this.cachedCanvases=new cZ(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=u,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return typeof e=="string"?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:r=!1,background:i=null}){const o=this.ctx.canvas.width,s=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,o,s),this.ctx.fillStyle=a,r){const c=this.cachedCanvases.getCanvas("transparent",o,s);this.compositeCtx=this.ctx,this.transparentCanvas=c.canvas,this.ctx=c.context,this.ctx.save(),this.ctx.transform(...ot(this.compositeCtx))}this.ctx.save(),um(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=ot(this.ctx)}executeOperatorList(e,t,r,i){const o=e.argsArray,s=e.fnArray;let a=t||0;const c=o.length;if(c===a)return a;const u=c-a>10&&typeof r=="function",d=u?Date.now()+15:0;let f=0;const h=this.commonObjs,p=this.objs;let m;for(;;){if(i!==void 0&&a===i.nextBreakPoint)return i.breakIt(a,r),a;if(m=s[a],m!==Zr.dependency)this[m].apply(this,o[a]);else for(const y of o[a]){const b=y.startsWith("g_")?h:p;if(!b.has(y))return b.get(y,r),a}if(a++,a===c)return a;if(u&&++f>10){if(Date.now()>d)return r(),a;f=0}}}endDrawing(){x(this,kh,Mv).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),x(this,Sh,Ev).call(this)}_scaleImage(e,t){const r=e.width,i=e.height;let o,s,a=Math.max(Math.hypot(t[0],t[1]),1),c=Math.max(Math.hypot(t[2],t[3]),1),u=r,d=i,f="prescale1";for(;a>2&&u>1||c>2&&d>1;){let h=u,p=d;a>2&&u>1&&(h=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u/2),a/=u/h),c>2&&d>1&&(p=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d)/2,c/=d/p),o=this.cachedCanvases.getCanvas(f,h,p),s=o.context,s.clearRect(0,0,h,p),s.drawImage(e,0,0,u,d,0,0,h,p),e=o.canvas,u=h,d=p,f=f==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:u,paintHeight:d}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:i}=e,o=this.current.fillColor,s=this.current.patternFill,a=ot(t);let c,u,d,f;if((e.bitmap||e.data)&&e.count>1){const D=e.bitmap||e.data.buffer;u=JSON.stringify(s?a:[a.slice(0,4),o]),c=this._cachedBitmapsMap.get(D),c||(c=new Map,this._cachedBitmapsMap.set(D,c));const I=c.get(u);if(I&&!s)return{canvas:I,offsetX:Math.round(Math.min(a[0],a[2])+a[4]),offsetY:Math.round(Math.min(a[1],a[3])+a[5])};d=I}d||(f=this.cachedCanvases.getCanvas("maskCanvas",r,i),TM(f.context,e));let h=se.transform(a,[1/r,0,0,-1/i,0,0]);h=se.transform(h,[1,0,0,1,0,-i]);const[p,m,y,b]=se.getAxialAlignedBoundingBox([0,0,r,i],h),w=Math.round(y-p)||1,v=Math.round(b-m)||1,k=this.cachedCanvases.getCanvas("fillCanvas",w,v),C=k.context,T=p,S=m;C.translate(-T,-S),C.transform(...h),d||(d=this._scaleImage(f.canvas,co(C)),d=d.img,c&&s&&c.set(u,d)),C.imageSmoothingEnabled=xM(ot(C),e.interpolate),cm(C,d,0,0,d.width,d.height,0,0,r,i),C.globalCompositeOperation="source-in";const A=se.transform(co(C),[1,0,0,1,-T,-S]);return C.fillStyle=s?o.getPattern(t,this,A,Ya):o,C.fillRect(0,0,r,i),c&&!s&&(this.cachedCanvases.delete("fillCanvas"),c.set(u,k.canvas)),{canvas:k.canvas,offsetX:Math.round(T),offsetY:Math.round(S)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=uZ[e]}setLineJoin(e){this.ctx.lineJoin=dZ[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=r;break;case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r;break;case"BM":this.ctx.globalCompositeOperation=r;break;case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(r,e,t);this.suspendedCtx=this.ctx,this.ctx=i.context;const o=this.ctx;o.setTransform(...ot(this.suspendedCtx)),h2(this.suspendedCtx,o),function(a,c){if(a._removeMirroring)throw new Error("Context is already forwarding operations.");a.__originalSave=a.save,a.__originalRestore=a.restore,a.__originalRotate=a.rotate,a.__originalScale=a.scale,a.__originalTranslate=a.translate,a.__originalTransform=a.transform,a.__originalSetTransform=a.setTransform,a.__originalResetTransform=a.resetTransform,a.__originalClip=a.clip,a.__originalMoveTo=a.moveTo,a.__originalLineTo=a.lineTo,a.__originalBezierCurveTo=a.bezierCurveTo,a.__originalRect=a.rect,a.__originalClosePath=a.closePath,a.__originalBeginPath=a.beginPath,a._removeMirroring=()=>{a.save=a.__originalSave,a.restore=a.__originalRestore,a.rotate=a.__originalRotate,a.scale=a.__originalScale,a.translate=a.__originalTranslate,a.transform=a.__originalTransform,a.setTransform=a.__originalSetTransform,a.resetTransform=a.__originalResetTransform,a.clip=a.__originalClip,a.moveTo=a.__originalMoveTo,a.lineTo=a.__originalLineTo,a.bezierCurveTo=a.__originalBezierCurveTo,a.rect=a.__originalRect,a.closePath=a.__originalClosePath,a.beginPath=a.__originalBeginPath,delete a._removeMirroring},a.save=function(){c.save(),this.__originalSave()},a.restore=function(){c.restore(),this.__originalRestore()},a.translate=function(d,f){c.translate(d,f),this.__originalTranslate(d,f)},a.scale=function(d,f){c.scale(d,f),this.__originalScale(d,f)},a.transform=function(d,f,h,p,m,y){c.transform(d,f,h,p,m,y),this.__originalTransform(d,f,h,p,m,y)},a.setTransform=function(d,f,h,p,m,y){c.setTransform(d,f,h,p,m,y),this.__originalSetTransform(d,f,h,p,m,y)},a.resetTransform=function(){c.resetTransform(),this.__originalResetTransform()},a.rotate=function(d){c.rotate(d),this.__originalRotate(d)},a.clip=function(d){c.clip(d),this.__originalClip(d)},a.moveTo=function(u,d){c.moveTo(u,d),this.__originalMoveTo(u,d)},a.lineTo=function(u,d){c.lineTo(u,d),this.__originalLineTo(u,d)},a.bezierCurveTo=function(u,d,f,h,p,m){c.bezierCurveTo(u,d,f,h,p,m),this.__originalBezierCurveTo(u,d,f,h,p,m)},a.rect=function(u,d,f,h){c.rect(u,d,f,h),this.__originalRect(u,d,f,h)},a.closePath=function(){c.closePath(),this.__originalClosePath()},a.beginPath=function(){c.beginPath(),this.__originalBeginPath()}}(o,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(),h2(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,t,this.ctx,e),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(e,t,r,i){const o=i[0],s=i[1],a=i[2]-o,c=i[3]-s;a!==0&&c!==0&&(this.genericComposeSMask(t.context,r,a,c,t.subtype,t.backdrop,t.transferMap,o,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}genericComposeSMask(e,t,r,i,o,s,a,c,u,d,f){let h=e.canvas,p=c-d,m=u-f;if(s){if(p<0||m<0||p+r>h.width||m+i>h.height){const b=this.cachedCanvases.getCanvas("maskExtension",r,i),w=b.context;w.drawImage(h,-p,-m),s.some(v=>v!==0)&&(w.globalCompositeOperation="destination-atop",w.fillStyle=se.makeHexColor(...s),w.fillRect(0,0,r,i),w.globalCompositeOperation="source-over"),h=b.canvas,p=m=0}else if(s.some(b=>b!==0)){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(p,m,r,i),e.clip(b),e.globalCompositeOperation="destination-atop",e.fillStyle=se.makeHexColor(...s),e.fillRect(p,m,r,i),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),o==="Alpha"&&a?t.filter=this.filterFactory.addAlphaFilter(a):o==="Luminosity"&&(t.filter=this.filterFactory.addLuminosityFilter(a));const y=new Path2D;y.rect(c,u,r,i),t.clip(y),t.globalCompositeOperation="destination-in",t.drawImage(h,p,m,r,i,c,u,r,i),t.restore()}save(){this.inSMaskMode?(h2(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),h2(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,i,o,s){this.ctx.transform(e,t,r,i,o,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const i=this.ctx,o=this.current;let s,a,c=o.x,u=o.y;const d=ot(i),f=d[0]===0&&d[3]===0||d[1]===0&&d[2]===0,h=f?r.slice(0):null;for(let p=0,m=0,y=e.length;p<y;p++)switch(0|e[p]){case Zr.rectangle:c=t[m++],u=t[m++];const b=t[m++],w=t[m++],v=c+b,k=u+w;i.moveTo(c,u),b===0||w===0?i.lineTo(v,k):(i.lineTo(v,u),i.lineTo(v,k),i.lineTo(c,k)),f||o.updateRectMinMax(d,[c,u,v,k]),i.closePath();break;case Zr.moveTo:c=t[m++],u=t[m++],i.moveTo(c,u),f||o.updatePathMinMax(d,c,u);break;case Zr.lineTo:c=t[m++],u=t[m++],i.lineTo(c,u),f||o.updatePathMinMax(d,c,u);break;case Zr.curveTo:s=c,a=u,c=t[m+4],u=t[m+5],i.bezierCurveTo(t[m],t[m+1],t[m+2],t[m+3],c,u),o.updateCurvePathMinMax(d,s,a,t[m],t[m+1],t[m+2],t[m+3],c,u,h),m+=6;break;case Zr.curveTo2:s=c,a=u,i.bezierCurveTo(c,u,t[m],t[m+1],t[m+2],t[m+3]),o.updateCurvePathMinMax(d,s,a,c,u,t[m],t[m+1],t[m+2],t[m+3],h),c=t[m+2],u=t[m+3],m+=4;break;case Zr.curveTo3:s=c,a=u,c=t[m+2],u=t[m+3],i.bezierCurveTo(t[m],t[m+1],c,u,c,u),o.updateCurvePathMinMax(d,s,a,t[m],t[m+1],c,u,c,u,h),m+=4;break;case Zr.closePath:i.closePath()}f&&o.updateScalingPathMinMax(d,h),o.setCurrentPoint(c,u)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,r=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof r=="object"&&(r!=null&&r.getPattern)?(t.save(),t.strokeStyle=r.getPattern(t,this,co(t),B4),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,r=this.current.fillColor;let i=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,co(t),Ya),i=!0);const o=this.current.getClippedPathBoundingBox();this.contentVisible&&o!==null&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(o)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=fZ}eoClip(){this.pendingClip=IM}beginText(){this.current.textMatrix=oM,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(e!==void 0){t.save(),t.beginPath();for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){var d;const r=this.commonObjs.get(e),i=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(i.fontMatrix=r.fontMatrix||g4,i.fontMatrix[0]!==0&&i.fontMatrix[3]!==0||Ce("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;const o=r.loadedName||"sans-serif",s=((d=r.systemFontInfo)==null?void 0:d.css)||`"${o}", ${r.fallbackName}`;let a="normal";r.black?a="900":r.bold&&(a="bold");const c=r.italic?"italic":"normal";let u=t;t<16?u=16:t>100&&(u=100),this.current.fontSizeScale=t/u,this.ctx.font=`${c} ${a} ${u}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,i,o,s){this.current.textMatrix=[e,t,r,i,o,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,i){const o=this.ctx,s=this.current,a=s.font,c=s.textRenderingMode,u=s.fontSize/s.fontSizeScale,d=c&sM,f=!!(c&lU),h=s.patternFill&&!a.missingFile;let p;(a.disableFontFace||f||h)&&(p=a.getPathGenerator(this.commonObjs,e)),a.disableFontFace||h?(o.save(),o.translate(t,r),o.beginPath(),p(o,u),i&&o.setTransform(...i),d!==Xp&&d!==a2||o.fill(),d!==w4&&d!==a2||o.stroke(),o.restore()):(d!==Xp&&d!==a2||o.fillText(e,t,r),d!==w4&&d!==a2||o.strokeText(e,t,r)),f&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:ot(o),x:t,y:r,fontSize:u,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let r=!1;for(let i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){r=!0;break}return Ie(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);const i=t.fontSize;if(i===0)return;const o=this.ctx,s=t.fontSizeScale,a=t.charSpacing,c=t.wordSpacing,u=t.fontDirection,d=t.textHScale*u,f=e.length,h=r.vertical,p=h?1:-1,m=r.defaultVMetrics,y=i*t.fontMatrix[0],b=t.textRenderingMode===Xp&&!r.disableFontFace&&!t.patternFill;o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),u>0?o.scale(d,-1):o.scale(d,1);let w;if(t.patternFill){o.save();const S=t.fillColor.getPattern(o,this,co(o),Ya);w=ot(o),o.restore(),o.fillStyle=S}let v=t.lineWidth;const k=t.textMatrixScale;if(k===0||v===0){const S=t.textRenderingMode&sM;S!==w4&&S!==a2||(v=this.getSinglePixelWidth())}else v/=k;if(s!==1&&(o.scale(s,s),v/=s),o.lineWidth=v,r.isInvalidPDFjsFont){const S=[];let A=0;for(const D of e)S.push(D.unicode),A+=D.width;o.fillText(S.join(""),0,0),t.x+=A*y*d,o.restore(),this.compose();return}let C,T=0;for(C=0;C<f;++C){const S=e[C];if(typeof S=="number"){T+=p*S*i/1e3;continue}let A=!1;const D=(S.isSpace?c:0)+a,I=S.fontChar,P=S.accent;let O,_,B=S.width;if(h){const $=S.vmetric||m,R=-(S.vmetric?$[1]:.5*B)*y,N=$[2]*y;B=$?-$[0]:B,O=R/s,_=(T+N)/s}else O=T/s,_=0;if(r.remeasure&&B>0){const $=1e3*o.measureText(I).width/i*s;if(B<$&&this.isFontSubpixelAAEnabled){const R=B/$;A=!0,o.save(),o.scale(R,1),O/=R}else B!==$&&(O+=(B-$)/2e3*i/s)}if(this.contentVisible&&(S.isInFont||r.missingFile)){if(b&&!P)o.fillText(I,O,_);else if(this.paintChar(I,O,_,w),P){const $=O+i*P.offset.x/s,R=_-i*P.offset.y/s;this.paintChar(P.fontChar,$,R,w)}}T+=h?B*y-D*u:B*y+D*u,A&&o.restore()}h?t.y-=T:t.x+=T*d,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,i=r.font,o=r.fontSize,s=r.fontDirection,a=i.vertical?1:-1,c=r.charSpacing,u=r.wordSpacing,d=r.textHScale*s,f=r.fontMatrix||g4,h=e.length;let p,m,y,b;if(r.textRenderingMode!==aU&&o!==0){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(d,s),p=0;p<h;++p){if(m=e[p],typeof m=="number"){b=a*m*o/1e3,this.ctx.translate(b,0),r.x+=b*d;continue}const w=(m.isSpace?u:0)+c,v=i.charProcOperatorList[m.operatorListId];if(!v){Ce(`Type3 character "${m.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=m,this.save(),t.scale(o,o),t.transform(...f),this.executeOperatorList(v),this.restore()),y=se.applyTransform([m.width,0],f)[0]*o+w,t.translate(y,0),r.x+=y*d}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,i,o,s){this.ctx.rect(r,i,o-r,s-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if(e[0]==="TilingPattern"){const r=e[1],i=this.baseTransform||ot(this.ctx),o={createCanvasGraphics:s=>new nv(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new F4(e,r,this.ctx,o,i)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){this.ctx.strokeStyle=this.current.strokeColor=se.makeHexColor(e,t,r)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(e,t,r){this.ctx.fillStyle=this.current.fillColor=se.makeHexColor(e,t,r),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let r;return this.cachedPatterns.has(e)?r=this.cachedPatterns.get(e):(r=function(o){switch(o[0]){case"RadialAxial":return new nZ(o);case"Mesh":return new iZ(o);case"Dummy":return new oZ}throw new Error(`Unknown IR type: ${o[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,r)),t&&(r.matrix=t),r}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,co(t),f2);const i=co(t);if(i){const{width:o,height:s}=t.canvas,[a,c,u,d]=se.getAxialAlignedBoundingBox([0,0,o,s],i);this.ctx.fillRect(a,c,u-a,d-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){St("Should not call beginInlineImage")}beginImageData(){St("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=ot(this.ctx),t)){const r=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],r,i),this.current.updateRectMinMax(ot(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||nm("TODO: Support non-isolated groups."),e.knockout&&Ce("Knockout groups not supported.");const r=ot(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=se.getAxialAlignedBoundingBox(e.bbox,ot(t));const o=[0,0,t.canvas.width,t.canvas.height];i=se.intersect(i,o)||[0,0,0,0];const s=Math.floor(i[0]),a=Math.floor(i[1]),c=Math.max(Math.ceil(i[2])-s,1),u=Math.max(Math.ceil(i[3])-a,1);this.current.startNewPathAndClipBox([0,0,c,u]);let d="groupAt"+this.groupLevel;e.smask&&(d+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(d,c,u),h=f.context;h.translate(-s,-a),h.transform(...r),e.smask?this.smaskStack.push({canvas:f.canvas,context:h,offsetX:s,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,a),t.save()),h2(t,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=ot(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const o=se.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],i);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(o)}}beginAnnotation(e,t,r,i,o){if(x(this,kh,Mv).call(this),um(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const s=t[2]-t[0],a=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=s,t[3]=a;const[c,u]=se.singularValueDecompose2dScale(ot(this.ctx)),{viewportScale:d}=this,f=Math.ceil(s*this.outputScaleX*d),h=Math.ceil(a*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(f,h);const{canvas:p,context:m}=this.annotationCanvas;this.annotationCanvasMap.set(e,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.save(),this.ctx.setTransform(c,0,0,-u,0,a*u),um(this.ctx)}else um(this.ctx),this.ctx.rect(t[0],t[1],s,a),this.ctx.clip(),this.endPath()}this.current=new EM(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),x(this,Sh,Ev).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const r=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=function(c){const{width:u,height:d}=c;if(u>1e3||d>1e3)return null;const f=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=u+1;let p,m,y,b=new Uint8Array(h*(d+1));const w=u+7&-8;let v=new Uint8Array(w*d),k=0;for(const A of c.data){let D=128;for(;D>0;)v[k++]=A&D?0:255,D>>=1}let C=0;for(k=0,v[k]!==0&&(b[0]=1,++C),m=1;m<u;m++)v[k]!==v[k+1]&&(b[m]=v[k]?2:1,++C),k++;for(v[k]!==0&&(b[m]=2,++C),p=1;p<d;p++){k=p*w,y=p*h,v[k-w]!==v[k]&&(b[y]=v[k]?1:8,++C);let A=(v[k]?4:0)+(v[k-w]?8:0);for(m=1;m<u;m++)A=(A>>2)+(v[k+1]?4:0)+(v[k-w+1]?8:0),f[A]&&(b[y+m]=f[A],++C),k++;if(v[k-w]!==v[k]&&(b[y+m]=v[k]?2:4,++C),C>1e3)return null}for(k=w*(d-1),y=p*h,v[k]!==0&&(b[y]=8,++C),m=1;m<u;m++)v[k]!==v[k+1]&&(b[y+m]=v[k]?4:8,++C),k++;if(v[k]!==0&&(b[y+m]=4,++C),C>1e3)return null;const T=new Int32Array([0,h,-1,0,-h,0,0,0,1]),S=new Path2D;for(p=0;C&&p<=d;p++){let A=p*h;const D=A+u;for(;A<D&&!b[A];)A++;if(A===D)continue;S.moveTo(A%h,p);const I=A;let P=b[A];do{const O=T[P];do A+=O;while(!b[A]);const _=b[A];_!==5&&_!==10?(P=_,b[A]=0):(P=_&51*P>>4,b[A]&=P>>2|P<<2),S.lineTo(A%h,A/h|0),b[A]||--C}while(I!==A);--p}return v=null,b=null,function(A){A.save(),A.scale(1/u,-1/d),A.translate(0,-d),A.fill(S),A.beginPath(),A.restore()}}(e)),i.compiled)){i.compiled(r);return}const o=this._createMaskCanvas(e),s=o.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(s,o.offsetX,o.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,r=0,i=0,o,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const c=ot(a);a.transform(t,r,i,o,0,0);const u=this._createMaskCanvas(e);a.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5]);for(let d=0,f=s.length;d<f;d+=2){const h=se.transform(c,[t,r,i,o,s[d],s[d+1]]),[p,m]=se.applyTransform([0,0],h);a.drawImage(u.canvas,p,m)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,r=this.current.fillColor,i=this.current.patternFill;for(const o of e){const{data:s,width:a,height:c,transform:u}=o,d=this.cachedCanvases.getCanvas("maskCanvas",a,c),f=d.context;f.save(),TM(f,this.getObject(s,o)),f.globalCompositeOperation="source-in",f.fillStyle=i?r.getPattern(f,this,co(t),Ya):r,f.fillRect(0,0,a,c),f.restore(),t.save(),t.transform(...u),t.scale(1,-1),cm(t,d.canvas,0,0,a,c,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):Ce("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,i){if(!this.contentVisible)return;const o=this.getObject(e);if(!o){Ce("Dependent image isn't ready yet");return}const s=o.width,a=o.height,c=[];for(let u=0,d=i.length;u<d;u+=2)c.push({transform:[t,0,0,r,i[u],i[u+1]],x:0,y:0,w:s,h:a});this.paintInlineImageXObjectGroup(o,c)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return e.bitmap;const{bitmap:t,width:r,height:i}=e,o=this.cachedCanvases.getCanvas("inlineImage",r,i),s=o.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",o.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,r=e.height,i=this.ctx;if(this.save(),!cn){const{filter:a}=i;a!=="none"&&a!==""&&(i.filter="none")}i.scale(1/t,-1/r);let o;if(e.bitmap)o=this.applyTransferMapsToBitmap(e);else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)o=e;else{const a=this.cachedCanvases.getCanvas("inlineImage",t,r).context;AM(a,e),o=this.applyTransferMapsToCanvas(a)}const s=this._scaleImage(o,co(i));i.imageSmoothingEnabled=xM(ot(i),e.interpolate),cm(i,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,t,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const r=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const o=e.width,s=e.height,a=this.cachedCanvases.getCanvas("inlineImage",o,s).context;AM(a,e),i=this.applyTransferMapsToCanvas(a)}for(const o of t)r.save(),r.transform(...o.transform),r.scale(1,-1),cm(r,i,o.x,o.y,o.w,o.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(t||(this.pendingClip===IM?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=ot(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:t,b:r,c:i,d:o}=this.ctx.getTransform();let s,a;if(r===0&&i===0){const c=Math.abs(t),u=Math.abs(o);if(c===u)if(e===0)s=a=1/c;else{const d=c*e;s=a=d<1?1/d:1}else if(e===0)s=1/c,a=1/u;else{const d=c*e,f=u*e;s=d<1?1/d:1,a=f<1?1/f:1}}else{const c=Math.abs(t*o-r*i),u=Math.hypot(t,r),d=Math.hypot(i,o);if(e===0)s=d/c,a=u/c;else{const f=e*c;s=d>f?d/f:1,a=u>f?u/f:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[i,o]=this.getScaleForStroking();if(t.lineWidth=r||1,i===1&&o===1){t.stroke();return}const s=t.getLineDash();if(e&&t.save(),t.scale(i,o),s.length>0){const a=Math.max(i,o);t.setLineDash(s.map(c=>c/a)),t.lineDashOffset/=a}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};kh=new WeakSet,Mv=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)},Sh=new WeakSet,Ev=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}};let tc=nv;for(const n in Zr)tc.prototype[n]!==void 0&&(tc.prototype[Zr[n]]=tc.prototype[n]);class uo{static get workerPort(){return g(this,Mh)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");E(this,Mh,e)}static get workerSrc(){return g(this,Eh)}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");E(this,Eh,e)}}Mh=new WeakMap,Eh=new WeakMap,M(uo,Mh,null),M(uo,Eh,"");const OM=1,DM=2,NM=1,j4=2,PM=3,_M=4,LM=5,BM=6,dm=7,z4=8;function Qn(n){switch(n instanceof Error||typeof n=="object"&&n!==null||St('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),n.name){case"AbortException":return new qa(n.message);case"MissingPDFException":return new Wa(n.message);case"PasswordException":return new C4(n.message,n.code);case"UnexpectedResponseException":return new rm(n.message,n.status);case"UnknownErrorException":return new k4(n.message,n.details);default:return new k4(n.message,n.toString())}}class p2{constructor(e,t,r){M(this,U3);M(this,Z3);M(this,ou);this.sourceName=e,this.targetName=t,this.comObj=r,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),this._onComObjOnMessage=i=>{const o=i.data;if(o.targetName!==this.sourceName)return;if(o.stream){x(this,Z3,MN).call(this,o);return}if(o.callback){const a=o.callbackId,c=this.callbackCapabilities[a];if(!c)throw new Error(`Cannot resolve callback ${a}`);if(delete this.callbackCapabilities[a],o.callback===OM)c.resolve(o.data);else{if(o.callback!==DM)throw new Error("Unexpected callback case");c.reject(Qn(o.reason))}return}const s=this.actionHandler[o.action];if(!s)throw new Error(`Unknown action from worker: ${o.action}`);if(o.callbackId){const a=this.sourceName,c=o.sourceName;new Promise(function(u){u(s(o.data))}).then(function(u){r.postMessage({sourceName:a,targetName:c,callback:OM,callbackId:o.callbackId,data:u})},function(u){r.postMessage({sourceName:a,targetName:c,callback:DM,callbackId:o.callbackId,reason:Qn(u)})})}else o.streamId?x(this,U3,SN).call(this,o):s(o.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const i=this.callbackId++,o=Promise.withResolvers();this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(s){o.reject(s)}return o.promise}sendWithStream(e,t,r,i){const o=this.streamId++,s=this.sourceName,a=this.targetName,c=this.comObj;return new ReadableStream({start:u=>{const d=Promise.withResolvers();return this.streamControllers[o]={controller:u,startCall:d,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:s,targetName:a,action:e,streamId:o,data:t,desiredSize:u.desiredSize},i),d.promise},pull:u=>{const d=Promise.withResolvers();return this.streamControllers[o].pullCall=d,c.postMessage({sourceName:s,targetName:a,stream:BM,streamId:o,desiredSize:u.desiredSize}),d.promise},cancel:u=>{xt(u instanceof Error,"cancel must have a valid reason");const d=Promise.withResolvers();return this.streamControllers[o].cancelCall=d,this.streamControllers[o].isClosed=!0,c.postMessage({sourceName:s,targetName:a,stream:NM,streamId:o,reason:Qn(u)}),d.promise}},r)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}U3=new WeakSet,SN=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this,a=this.actionHandler[e.action],c={enqueue(u,d=1,f){if(this.isCancelled)return;const h=this.desiredSize;this.desiredSize-=d,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:r,targetName:i,stream:_M,streamId:t,chunk:u},f)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:PM,streamId:t}),delete s.streamSinks[t])},error(u){xt(u instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:LM,streamId:t,reason:Qn(u)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise(function(u){u(a(e.data,c))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:z4,streamId:t,success:!0})},function(u){o.postMessage({sourceName:r,targetName:i,stream:z4,streamId:t,reason:Qn(u)})})},Z3=new WeakSet,MN=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case z4:e.success?s.startCall.resolve():s.startCall.reject(Qn(e.reason));break;case dm:e.success?s.pullCall.resolve():s.pullCall.reject(Qn(e.reason));break;case BM:if(!a){o.postMessage({sourceName:r,targetName:i,stream:dm,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise(function(c){var u;c((u=a.onPull)==null?void 0:u.call(a))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:dm,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:dm,streamId:t,reason:Qn(c)})});break;case _M:if(xt(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case PM:if(xt(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),x(this,ou,r5).call(this,s,t);break;case LM:xt(s,"error should have stream controller"),s.controller.error(Qn(e.reason)),x(this,ou,r5).call(this,s,t);break;case j4:e.success?s.cancelCall.resolve():s.cancelCall.reject(Qn(e.reason)),x(this,ou,r5).call(this,s,t);break;case NM:if(!a)break;new Promise(function(c){var u;c((u=a.onCancel)==null?void 0:u.call(a,Qn(e.reason)))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:j4,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:j4,streamId:t,reason:Qn(c)})}),a.sinkCapability.reject(Qn(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},ou=new WeakSet,r5=async function(e,t){var r,i,o;await Promise.allSettled([(r=e.startCall)==null?void 0:r.promise,(i=e.pullCall)==null?void 0:i.promise,(o=e.cancelCall)==null?void 0:o.promise]),delete this.streamControllers[t]};class hZ{constructor({parsedData:e,rawData:t}){M(this,zl,void 0);M(this,Ah,void 0);E(this,zl,e),E(this,Ah,t)}getRaw(){return g(this,Ah)}get(e){return g(this,zl).get(e)??null}getAll(){return S4(g(this,zl))}has(e){return g(this,zl).has(e)}}zl=new WeakMap,Ah=new WeakMap;const gs=Symbol("INTERNAL");class pZ{constructor(e,{name:t,intent:r,usage:i}){M(this,Th,!1);M(this,xh,!1);M(this,Ih,!1);M(this,su,!0);E(this,Th,!!(e&b4)),E(this,xh,!!(e&Qp)),this.name=t,this.intent=r,this.usage=i}get visible(){if(g(this,Ih))return g(this,su);if(!g(this,su))return!1;const{print:e,view:t}=this.usage;return g(this,Th)?(t==null?void 0:t.viewState)!=="OFF":!g(this,xh)||(e==null?void 0:e.printState)!=="OFF"}_setVisible(e,t,r=!1){e!==gs&&St("Internal method `_setVisible` called."),E(this,Ih,r),E(this,su,t)}}Th=new WeakMap,xh=new WeakMap,Ih=new WeakMap,su=new WeakMap;class mZ{constructor(e,t=b4){M(this,Oh);M(this,na,null);M(this,Ke,new Map);M(this,au,null);M(this,lu,null);if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,E(this,lu,e.order);for(const r of e.groups)g(this,Ke).set(r.id,new pZ(t,r));if(e.baseState==="OFF")for(const r of g(this,Ke).values())r._setVisible(gs,!1);for(const r of e.on)g(this,Ke).get(r)._setVisible(gs,!0);for(const r of e.off)g(this,Ke).get(r)._setVisible(gs,!1);E(this,au,this.getHash())}}isVisible(e){if(g(this,Ke).size===0)return!0;if(!e)return nm("Optional content group not defined."),!0;if(e.type==="OCG")return g(this,Ke).has(e.id)?g(this,Ke).get(e.id).visible:(Ce(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return x(this,Oh,Av).call(this,e.expression);if(!e.policy||e.policy==="AnyOn"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(g(this,Ke).get(t).visible)return!0}return!1}if(e.policy==="AllOn"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(!g(this,Ke).get(t).visible)return!1}return!0}if(e.policy==="AnyOff"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(!g(this,Ke).get(t).visible)return!0}return!1}if(e.policy==="AllOff"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(g(this,Ke).get(t).visible)return!1}return!0}return Ce(`Unknown optional content policy ${e.policy}.`),!0}return Ce(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){const r=g(this,Ke).get(e);r?(r._setVisible(gs,!!t,!0),E(this,na,null)):Ce(`Optional content group not found: ${e}`)}setOCGState({state:e,preserveRB:t}){let r;for(const i of e){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}const o=g(this,Ke).get(i);if(o)switch(r){case"ON":o._setVisible(gs,!0);break;case"OFF":o._setVisible(gs,!1);break;case"Toggle":o._setVisible(gs,!o.visible)}}E(this,na,null)}get hasInitialVisibility(){return g(this,au)===null||this.getHash()===g(this,au)}getOrder(){return g(this,Ke).size?g(this,lu)?g(this,lu).slice():[...g(this,Ke).keys()]:null}getGroups(){return g(this,Ke).size>0?S4(g(this,Ke)):null}getGroup(e){return g(this,Ke).get(e)||null}getHash(){if(g(this,na)!==null)return g(this,na);const e=new kM;for(const[t,r]of g(this,Ke))e.update(`${t}:${r.visible}`);return E(this,na,e.hexdigest())}}na=new WeakMap,Ke=new WeakMap,au=new WeakMap,lu=new WeakMap,Oh=new WeakSet,Av=function(e){const t=e.length;if(t<2)return!0;const r=e[0];for(let i=1;i<t;i++){const o=e[i];let s;if(Array.isArray(o))s=x(this,Oh,Av).call(this,o);else{if(!g(this,Ke).has(o))return Ce(`Optional content group not found: ${o}`),!0;s=g(this,Ke).get(o).visible}switch(r){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return r==="And"};class gZ{constructor(e,{disableRange:t=!1,disableStream:r=!1}){xt(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i,initialData:o,progressiveDone:s,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=a,(o==null?void 0:o.length)>0){const c=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(c)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!r,this._isRangeSupported=!t,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((c,u)=>{this._onReceiveData({begin:c,chunk:u})}),e.addProgressListener((c,u)=>{this._onProgress({loaded:c,total:u})}),e.addProgressiveReadListener(c=>{this._onReceiveData({chunk:c})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const r=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;e===void 0?this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r):xt(this._rangeReaders.some(function(i){return i._begin!==e?!1:(i._enqueue(r),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}_onProgress(e){var t,r,i,o;e.total===void 0?(r=(t=this._rangeReaders[0])==null?void 0:t.onProgress)==null||r.call(t,{loaded:e.loaded}):(o=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||o.call(i,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;(e=this._fullRequestReader)==null||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){xt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new yZ(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new bZ(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeReaders.slice(0))r.cancel(e);this._pdfDataRangeTransport.abort()}}class yZ{constructor(e,t,r=!1,i=null){this._stream=e,this._done=r||!1,this._filename=x4(i)?i:null,this._queuedChunks=t||[],this._loaded=0;for(const o of this._queuedChunks)this._loaded+=o.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.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 e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class bZ{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const t of this._requests)t.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 t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function H4({getResponseHeader:n,isHttp:e,rangeChunkSize:t,disableRange:r}){const i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(n("Content-Length"),10);return!Number.isInteger(o)||(i.suggestedLength=o,o<=2*t)||r||!e||n("Accept-Ranges")!=="bytes"||(n("Content-Encoding")||"identity")!=="identity"||(i.allowRangeRequests=!0),i}function U4(n){const e=n("Content-Disposition");if(e){let t=function(i){let o=!0,s=a("filename\\*","i").exec(i);if(s){s=s[1];let p=d(s);return p=unescape(p),p=f(p),p=h(p),u(p)}if(s=function(m){const y=[];let b;const w=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(b=w.exec(m))!==null;){let[,k,C,T]=b;if(k=parseInt(k,10),k in y){if(k===0)break}else y[k]=[C,T]}const v=[];for(let k=0;k<y.length&&k in y;++k){let[C,T]=y[k];T=d(T),C&&(T=unescape(T),k===0&&(T=f(T))),v.push(T)}return v.join("")}(i),s)return u(h(s));if(s=a("filename","i").exec(i),s){s=s[1];let p=d(s);return p=h(p),u(p)}function a(p,m){return new RegExp("(?:^|;)\\s*"+p+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',m)}function c(p,m){if(p){if(!/^[\x00-\xFF]+$/.test(m))return m;try{const y=new TextDecoder(p,{fatal:!0}),b=im(m);m=y.decode(b),o=!1}catch{}}return m}function u(p){return o&&/[\x80-\xff]/.test(p)&&(p=c("utf-8",p),o&&(p=c("iso-8859-1",p))),p}function d(p){if(p.startsWith('"')){const m=p.slice(1).split('\\"');for(let y=0;y<m.length;++y){const b=m[y].indexOf('"');b!==-1&&(m[y]=m[y].slice(0,b),m.length=y+1),m[y]=m[y].replaceAll(/\\(.)/g,"$1")}p=m.join('"')}return p}function f(p){const m=p.indexOf("'");return m===-1?p:c(p.slice(0,m),p.slice(m+1).replace(/^[^']*'/,""))}function h(p){return!p.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(p)?p:p.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(m,y,b,w){if(b==="q"||b==="Q")return c(y,w=(w=w.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(v,k){return String.fromCharCode(parseInt(k,16))}));try{w=atob(w)}catch{}return c(y,w)})}return""}(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(x4(t))return t}return null}function fm(n,e){return n===404||n===0&&e.startsWith("file:")?new Wa('Missing PDF "'+e+'".'):new rm(`Unexpected server response (${n}) while retrieving PDF "${e}".`,n)}function RM(n){return n===200||n===206}function $M(n,e,t){return{method:"GET",headers:n,signal:t.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function VM(n){const e=new Headers;for(const t in n){const r=n[t];r!==void 0&&e.append(t,r)}return e}function FM(n){return n instanceof Uint8Array?n.buffer:n instanceof ArrayBuffer?n:(Ce(`getArrayBuffer - unexpected data format: ${n}`),new Uint8Array(n).buffer)}class jM{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new wZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new vZ(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class wZ{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=VM(this._stream.httpHeaders);const r=t.url;fetch(r,$M(this._headers,this._withCredentials,this._abortController)).then(i=>{if(!RM(i.status))throw fm(i.status,r);this._reader=i.body.getReader(),this._headersCapability.resolve();const o=c=>i.headers.get(c),{allowRangeRequests:s,suggestedLength:a}=H4({getResponseHeader:o,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=U4(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new qa("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 r;await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded,total:this._contentLength}),{value:FM(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class vZ{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const i=e.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController,this._headers=VM(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const o=i.url;fetch(o,$M(this._headers,this._withCredentials,this._abortController)).then(s=>{if(!RM(s.status))throw fm(s.status,o);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var r;await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded}),{value:FM(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class CZ{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const i={begin:e,end:t};for(const o in r)i[o]=r[o];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,r=this.currXhrId++,i=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const o in this.httpHeaders){const s=this.httpHeaders[o];s!==void 0&&t.setRequestHeader(o,s)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.expectedStatus=206):i.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(o){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){var i;const r=this.pendingRequests[e];r&&((i=r.onProgress)==null||i.call(r,t))}onStateChange(e,t){var a,c,u;const r=this.pendingRequests[e];if(!r)return;const i=r.xhr;if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),i.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],i.status===0&&this.isHttp){(a=r.onError)==null||a.call(r,i.status);return}const o=i.status||200;if(!(o===200&&r.expectedStatus===206)&&o!==r.expectedStatus){(c=r.onError)==null||c.call(r,i.status);return}const s=function(f){const h=f.response;return typeof h!="string"?h:im(h).buffer}(i);if(o===206){const d=i.getResponseHeader("Content-Range"),f=/bytes (\d+)-(\d+)\/(\d+)/.exec(d);r.onDone({begin:parseInt(f[1],10),chunk:s})}else s?r.onDone({begin:0,chunk:s}):(u=r.onError)==null||u.call(r,i.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class kZ{constructor(e){this._source=e,this._manager=new CZ(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return xt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new SZ(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new MZ(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class SZ{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.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 e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=s=>t.getResponseHeader(s),{allowRangeRequests:i,suggestedLength:o}=H4({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=U4(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=fm(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;(t=this.onProgress)==null||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.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._headersReceivedCapability.promise}async read(){if(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 e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class MZ{constructor(e,t,r){this._manager=e;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,r,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;(e=this.onClosed)==null||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=fm(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||((t=this.onProgress)==null||t.call(this,{loaded:e.loaded}))}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const EZ=/^[a-z][a-z0-9\-+.]+:/i;function zM(n,e,t){return n.protocol==="http:"?ms.get("http").request(n,{headers:e},t):ms.get("https").request(n,{headers:e},t)}class AZ{constructor(e){this.source=e,this.url=function(r){if(EZ.test(r))return new URL(r);const i=ms.get("url");return new URL(i.pathToFileURL(r))}(e.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new IZ(this):new TZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new OZ(this,e,t):new xZ(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class HM{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}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 t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new qa("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class UM{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class TZ extends HM{constructor(e){super(e),this._request=zM(this._url,e.httpHeaders,t=>{if(t.statusCode===404){const s=new Wa(`Missing PDF "${this._url}".`);this._storedError=s,this._headersCapability.reject(s);return}this._headersCapability.resolve(),this._setReadableStream(t);const r=s=>this._readableStream.headers[s.toLowerCase()],{allowRangeRequests:i,suggestedLength:o}=H4({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=o||this._contentLength,this._filename=U4(r)}),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class xZ extends UM{constructor(e,t,r){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const o=e.httpHeaders[i];o!==void 0&&(this._httpHeaders[i]=o)}this._httpHeaders.Range=`bytes=${t}-${r-1}`,this._request=zM(this._url,this._httpHeaders,i=>{if(i.statusCode!==404)this._setReadableStream(i);else{const o=new Wa(`Missing PDF "${this._url}".`);this._storedError=o}}),this._request.on("error",i=>{this._storedError=i}),this._request.end()}}class IZ extends HM{constructor(e){super(e);const t=ms.get("fs");t.promises.lstat(this._url).then(r=>{this._contentLength=r.size,this._setReadableStream(t.createReadStream(this._url)),this._headersCapability.resolve()},r=>{r.code==="ENOENT"&&(r=new Wa(`Missing PDF "${this._url}".`)),this._storedError=r,this._headersCapability.reject(r)})}}class OZ extends UM{constructor(e,t,r){super(e);const i=ms.get("fs");this._setReadableStream(i.createReadStream(this._url,{start:t,end:r-1}))}}const Xn=30,Wt=class Wt{constructor({textContentSource:e,container:t,viewport:r}){M(this,W3);M(this,q3);M(this,$h);M(this,ra,Promise.withResolvers());M(this,Wn,null);M(this,Dh,!1);M(this,Nh,!!((GD=globalThis.FontInspector)!=null&&GD.enabled));M(this,Hl,null);M(this,Oo,null);M(this,Ph,0);M(this,_h,0);M(this,Ul,null);M(this,cu,null);M(this,uu,0);M(this,ia,0);M(this,du,Object.create(null));M(this,Lh,[]);M(this,fu,null);M(this,Zl,[]);M(this,Bh,new WeakMap);M(this,Rh,null);var c;if(e instanceof ReadableStream)E(this,fu,e);else{if(typeof e!="object")throw new Error('No "textContentSource" parameter specified.');E(this,fu,new ReadableStream({start(u){u.enqueue(e),u.close()}}))}E(this,Wn,E(this,cu,t)),E(this,ia,r.scale*(globalThis.devicePixelRatio||1)),E(this,uu,r.rotation),E(this,Oo,{prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:o,pageX:s,pageY:a}=r.rawDims;E(this,Rh,[1,0,0,-1,-s,a+o]),E(this,_h,i),E(this,Ph,o),x(c=Wt,K3,TN).call(c),Ka(t,r),g(this,ra).promise.catch(()=>{}).then(()=>{g(Wt,hu).delete(this),E(this,Oo,null),E(this,du,null)})}render(){const e=()=>{g(this,Ul).read().then(({value:t,done:r})=>{r?g(this,ra).resolve():(g(this,Hl)??E(this,Hl,t.lang),Object.assign(g(this,du),t.styles),x(this,W3,EN).call(this,t.items),e())},g(this,ra).reject)};return E(this,Ul,g(this,fu).getReader()),g(Wt,hu).add(this),e(),g(this,ra).promise}update({viewport:e,onBefore:t=null}){var o;const r=e.scale*(globalThis.devicePixelRatio||1),i=e.rotation;if(i!==g(this,uu)&&(t==null||t(),E(this,uu,i),Ka(g(this,cu),{rotation:i})),r!==g(this,ia)){t==null||t(),E(this,ia,r);const s={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:x(o=Wt,pu,i5).call(o,g(this,Hl))};for(const a of g(this,Zl))s.properties=g(this,Bh).get(a),s.div=a,x(this,$h,Tv).call(this,s)}}cancel(){var t;const e=new qa("TextLayer task cancelled.");(t=g(this,Ul))==null||t.cancel(e).catch(()=>{}),E(this,Ul,null),g(this,ra).reject(e)}get textDivs(){return g(this,Zl)}get textContentItemsStr(){return g(this,Lh)}static cleanup(){if(!(g(this,hu).size>0)){g(this,Wl).clear();for(const{canvas:e}of g(this,ql).values())e.remove();g(this,ql).clear()}}};ra=new WeakMap,Wn=new WeakMap,Dh=new WeakMap,Nh=new WeakMap,Hl=new WeakMap,Oo=new WeakMap,Ph=new WeakMap,_h=new WeakMap,Ul=new WeakMap,cu=new WeakMap,uu=new WeakMap,ia=new WeakMap,du=new WeakMap,Lh=new WeakMap,fu=new WeakMap,Zl=new WeakMap,Bh=new WeakMap,Rh=new WeakMap,Wl=new WeakMap,ql=new WeakMap,oa=new WeakMap,hu=new WeakMap,W3=new WeakSet,EN=function(e){var i,o;if(g(this,Dh))return;(o=g(this,Oo)).ctx??(o.ctx=x(i=Wt,pu,i5).call(i,g(this,Hl)));const t=g(this,Zl),r=g(this,Lh);for(const s of e){if(t.length>1e5){Ce("Ignoring additional textDivs for performance reasons."),E(this,Dh,!0);return}if(s.str!==void 0)r.push(s.str),x(this,q3,AN).call(this,s);else if(s.type==="beginMarkedContentProps"||s.type==="beginMarkedContent"){const a=g(this,Wn);E(this,Wn,document.createElement("span")),g(this,Wn).classList.add("markedContent"),s.id!==null&&g(this,Wn).setAttribute("id",`${s.id}`),a.append(g(this,Wn))}else s.type==="endMarkedContent"&&E(this,Wn,g(this,Wn).parentNode)}},q3=new WeakSet,AN=function(e){var y;const t=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};g(this,Zl).push(t);const i=se.transform(g(this,Rh),e.transform);let o=Math.atan2(i[1],i[0]);const s=g(this,du)[e.fontName];s.vertical&&(o+=Math.PI/2);const a=g(this,Nh)&&s.fontSubstitution||s.fontFamily,c=Math.hypot(i[2],i[3]),u=c*x(y=Wt,G3,xN).call(y,a,g(this,Hl));let d,f;o===0?(d=i[4],f=i[5]-u):(d=i[4]+u*Math.sin(o),f=i[5]-u*Math.cos(o));const h="calc(var(--scale-factor)*",p=t.style;g(this,Wn)===g(this,cu)?(p.left=`${(100*d/g(this,_h)).toFixed(2)}%`,p.top=`${(100*f/g(this,Ph)).toFixed(2)}%`):(p.left=`${h}${d.toFixed(2)}px)`,p.top=`${h}${f.toFixed(2)}px)`),p.fontSize=`${h}${(g(Wt,oa)*c).toFixed(2)}px)`,p.fontFamily=a,r.fontSize=c,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,g(this,Nh)&&(t.dataset.fontName=s.fontSubstitutionLoadedName||e.fontName),o!==0&&(r.angle=o*(180/Math.PI));let m=!1;if(e.str.length>1)m=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const b=Math.abs(e.transform[0]),w=Math.abs(e.transform[3]);b!==w&&Math.max(b,w)/Math.min(b,w)>1.5&&(m=!0)}if(m&&(r.canvasWidth=s.vertical?e.height:e.width),g(this,Bh).set(t,r),g(this,Oo).div=t,g(this,Oo).properties=r,x(this,$h,Tv).call(this,g(this,Oo)),r.hasText&&g(this,Wn).append(t),r.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),g(this,Wn).append(b)}},$h=new WeakSet,Tv=function(e){const{div:t,properties:r,ctx:i,prevFontSize:o,prevFontFamily:s}=e,{style:a}=t;let c="";if(g(Wt,oa)>1&&(c=`scale(${1/g(Wt,oa)})`),r.canvasWidth!==0&&r.hasText){const{fontFamily:u}=a,{canvasWidth:d,fontSize:f}=r;(o!==f||s!==u)&&(i.font=`${f*g(this,ia)}px ${u}`,e.prevFontSize=f,e.prevFontFamily=u);const{width:h}=i.measureText(t.textContent);h>0&&(c=`scaleX(${d*g(this,ia)/h}) ${c}`)}r.angle!==0&&(c=`rotate(${r.angle}deg) ${c}`),c.length>0&&(a.transform=c)},pu=new WeakSet,i5=function(e=null){let t=g(this,ql).get(e||(e=""));if(!t){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=e,document.body.append(r),t=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),g(this,ql).set(e,t)}return t},K3=new WeakSet,TN=function(){if(g(this,oa)!==null)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),E(this,oa,e.getBoundingClientRect().height),e.remove()},G3=new WeakSet,xN=function(e,t){const r=g(this,Wl).get(e);if(r)return r;const i=x(this,pu,i5).call(this,t),o=i.font;i.canvas.width=i.canvas.height=Xn,i.font=`30px ${e}`;const s=i.measureText("");let a=s.fontBoundingBoxAscent,c=Math.abs(s.fontBoundingBoxDescent);if(a){const f=a/(a+c);return g(this,Wl).set(e,f),i.canvas.width=i.canvas.height=0,i.font=o,f}i.strokeStyle="red",i.clearRect(0,0,Xn,Xn),i.strokeText("g",0,0);let u=i.getImageData(0,0,Xn,Xn).data;c=0;for(let f=u.length-1-3;f>=0;f-=4)if(u[f]>0){c=Math.ceil(f/4/Xn);break}i.clearRect(0,0,Xn,Xn),i.strokeText("A",0,Xn),u=i.getImageData(0,0,Xn,Xn).data,a=0;for(let f=0,h=u.length;f<h;f+=4)if(u[f]>0){a=Xn-Math.floor(f/4/Xn);break}i.canvas.width=i.canvas.height=0,i.font=o;const d=a?a/(a+c):.8;return g(this,Wl).set(e,d),d},M(Wt,pu),M(Wt,K3),M(Wt,G3),M(Wt,Wl,new Map),M(Wt,ql,new Map),M(Wt,oa,null),M(Wt,hu,new Set);let m2=Wt;class g2{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function i(o){var c;if(!o)return;let s=null;const a=o.name;if(a==="#text")s=o.value;else{if(!g2.shouldBuildText(a))return;(c=o==null?void 0:o.attributes)!=null&&c.textContent?s=o.attributes.textContent:o.value&&(s=o.value)}if(s!==null&&t.push({str:s}),o.children)for(const u of o.children)i(u)}(e),r}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}const DZ=65536,NZ=cn?class extends hM{_createCanvas(e,t){return ms.get("canvas").createCanvas(e,t)}}:class extends hM{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}={}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas");return r.width=e,r.height=t,r}},PZ=cn?class extends pM{_fetchData(e,t){return MM(e).then(r=>({cMapData:r,compressionType:t}))}}:gM,_Z=cn?class extends fM{}:(YD=class extends fM{constructor({docId:t,ownerDocument:r=globalThis.document}={}){super();M(this,qt);M(this,sa);M(this,aa);M(this,mu);M(this,la);M(this,Q3);M(this,Vh);M(this,ca);M(this,Ql);M(this,Xl);M(this,Fh);M(this,Jl);M(this,Kl,void 0);M(this,Gl,void 0);M(this,Fi,void 0);M(this,Do,void 0);M(this,hn,void 0);M(this,Y3,void 0);M(this,Yl,0);E(this,Do,t),E(this,hn,r)}addFilter(t){if(!t)return"none";let r=g(this,qt,mn).get(t);if(r)return r;const[i,o,s]=x(this,mu,o5).call(this,t),a=t.length===1?i:`${i}${o}${s}`;if(r=g(this,qt,mn).get(a),r)return g(this,qt,mn).set(t,r),r;const c=`g_${g(this,Do)}_transfer_map_${Kn(this,Yl)._++}`,u=x(this,la,fd).call(this,c);g(this,qt,mn).set(t,u),g(this,qt,mn).set(a,u);const d=x(this,ca,hd).call(this,c);return x(this,Xl,Q1).call(this,i,o,s,d),u}addHCMFilter(t,r){var m;const i=`${t}-${r}`,o="base";let s=g(this,sa,ud).get(o);if((s==null?void 0:s.key)===i||(s?((m=s.filter)==null||m.remove(),s.key=i,s.url="none",s.filter=null):(s={key:i,url:"none",filter:null},g(this,sa,ud).set(o,s)),!t||!r))return s.url;const a=x(this,Jl,X1).call(this,t);t=se.makeHexColor(...a);const c=x(this,Jl,X1).call(this,r);if(r=se.makeHexColor(...c),g(this,aa,dd).style.color="",t==="#000000"&&r==="#ffffff"||t===r)return s.url;const u=new Array(256);for(let y=0;y<=255;y++){const b=y/255;u[y]=b<=.03928?b/12.92:((b+.055)/1.055)**2.4}const d=u.join(","),f=`g_${g(this,Do)}_hcm_filter`,h=s.filter=x(this,ca,hd).call(this,f);x(this,Xl,Q1).call(this,d,d,d,h),x(this,Vh,xv).call(this,h);const p=(y,b)=>{const w=a[y]/255,v=c[y]/255,k=new Array(b+1);for(let C=0;C<=b;C++)k[C]=w+C/b*(v-w);return k.join(",")};return x(this,Xl,Q1).call(this,p(0,5),p(1,5),p(2,5),h),s.url=x(this,la,fd).call(this,f),s.url}addAlphaFilter(t){let r=g(this,qt,mn).get(t);if(r)return r;const[i]=x(this,mu,o5).call(this,[t]),o=`alpha_${i}`;if(r=g(this,qt,mn).get(o),r)return g(this,qt,mn).set(t,r),r;const s=`g_${g(this,Do)}_alpha_map_${Kn(this,Yl)._++}`,a=x(this,la,fd).call(this,s);g(this,qt,mn).set(t,a),g(this,qt,mn).set(o,a);const c=x(this,ca,hd).call(this,s);return x(this,Fh,Iv).call(this,i,c),a}addLuminosityFilter(t){let r,i,o=g(this,qt,mn).get(t||"luminosity");if(o)return o;if(t?([r]=x(this,mu,o5).call(this,[t]),i=`luminosity_${r}`):i="luminosity",o=g(this,qt,mn).get(i),o)return g(this,qt,mn).set(t,o),o;const s=`g_${g(this,Do)}_luminosity_map_${Kn(this,Yl)._++}`,a=x(this,la,fd).call(this,s);g(this,qt,mn).set(t,a),g(this,qt,mn).set(i,a);const c=x(this,ca,hd).call(this,s);return x(this,Q3,IN).call(this,c),t&&x(this,Fh,Iv).call(this,r,c),a}addHighlightHCMFilter(t,r,i,o,s){var v;const a=`${r}-${i}-${o}-${s}`;let c=g(this,sa,ud).get(t);if((c==null?void 0:c.key)===a||(c?((v=c.filter)==null||v.remove(),c.key=a,c.url="none",c.filter=null):(c={key:a,url:"none",filter:null},g(this,sa,ud).set(t,c)),!r||!i))return c.url;const[u,d]=[r,i].map(x(this,Jl,X1).bind(this));let f=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),h=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),[p,m]=[o,s].map(x(this,Jl,X1).bind(this));h<f&&([f,h,p,m]=[h,f,m,p]),g(this,aa,dd).style.color="";const y=(k,C,T)=>{const S=new Array(256),A=(h-f)/T,D=k/255,I=(C-k)/(255*T);let P=0;for(let O=0;O<=T;O++){const _=Math.round(f+O*A),B=D+O*I;for(let $=P;$<=_;$++)S[$]=B;P=_+1}for(let O=P;O<256;O++)S[O]=S[P-1];return S.join(",")},b=`g_${g(this,Do)}_hcm_${t}_filter`,w=c.filter=x(this,ca,hd).call(this,b);return x(this,Vh,xv).call(this,w),x(this,Xl,Q1).call(this,y(p[0],m[0],5),y(p[1],m[1],5),y(p[2],m[2],5),w),c.url=x(this,la,fd).call(this,b),c.url}destroy(t=!1){(!t||g(this,sa,ud).size===0)&&(g(this,Fi)&&(g(this,Fi).parentNode.parentNode.remove(),E(this,Fi,null)),g(this,Gl)&&(g(this,Gl).clear(),E(this,Gl,null)),E(this,Yl,0))}},Kl=new WeakMap,Gl=new WeakMap,Fi=new WeakMap,Do=new WeakMap,hn=new WeakMap,Y3=new WeakMap,Yl=new WeakMap,qt=new WeakSet,mn=function(){return g(this,Gl)||E(this,Gl,new Map)},sa=new WeakSet,ud=function(){return g(this,Y3)||E(this,Y3,new Map)},aa=new WeakSet,dd=function(){if(!g(this,Fi)){const t=g(this,hn).createElement("div"),{style:r}=t;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const i=g(this,hn).createElementNS(lo,"svg");i.setAttribute("width",0),i.setAttribute("height",0),E(this,Fi,g(this,hn).createElementNS(lo,"defs")),t.append(i),i.append(g(this,Fi)),g(this,hn).body.append(t)}return g(this,Fi)},mu=new WeakSet,o5=function(t){if(t.length===1){const u=t[0],d=new Array(256);for(let h=0;h<256;h++)d[h]=u[h]/255;const f=d.join(",");return[f,f,f]}const[r,i,o]=t,s=new Array(256),a=new Array(256),c=new Array(256);for(let u=0;u<256;u++)s[u]=r[u]/255,a[u]=i[u]/255,c[u]=o[u]/255;return[s.join(","),a.join(","),c.join(",")]},la=new WeakSet,fd=function(t){if(g(this,Kl)===void 0){E(this,Kl,"");const r=g(this,hn).URL;r!==g(this,hn).baseURI&&(sm(r)?Ce('#createUrl: ignore "data:"-URL for performance reasons.'):E(this,Kl,r.split("#",1)[0]))}return`url(${g(this,Kl)}#${t})`},Q3=new WeakSet,IN=function(t){const r=g(this,hn).createElementNS(lo,"feColorMatrix");r.setAttribute("type","matrix"),r.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"),t.append(r)},Vh=new WeakSet,xv=function(t){const r=g(this,hn).createElementNS(lo,"feColorMatrix");r.setAttribute("type","matrix"),r.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"),t.append(r)},ca=new WeakSet,hd=function(t){const r=g(this,hn).createElementNS(lo,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",t),g(this,aa,dd).append(r),r},Ql=new WeakSet,Y1=function(t,r,i){const o=g(this,hn).createElementNS(lo,r);o.setAttribute("type","discrete"),o.setAttribute("tableValues",i),t.append(o)},Xl=new WeakSet,Q1=function(t,r,i,o){const s=g(this,hn).createElementNS(lo,"feComponentTransfer");o.append(s),x(this,Ql,Y1).call(this,s,"feFuncR",t),x(this,Ql,Y1).call(this,s,"feFuncG",r),x(this,Ql,Y1).call(this,s,"feFuncB",i)},Fh=new WeakSet,Iv=function(t,r){const i=g(this,hn).createElementNS(lo,"feComponentTransfer");r.append(i),x(this,Ql,Y1).call(this,i,"feFuncA",t)},Jl=new WeakSet,X1=function(t){return g(this,aa,dd).style.color=t,I4(getComputedStyle(g(this,aa,dd)).getPropertyValue("color"))},YD),LZ=cn?class extends mM{_fetchData(e){return MM(e)}}:yM;function BZ(n={}){typeof n=="string"||n instanceof URL?n={url:n}:(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});const e=new Z4,{docId:t}=e,r=n.url?function(j){if(j instanceof URL)return j.href;try{return new URL(j,window.location).href}catch{if(cn&&typeof j=="string")return j}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(n.url):null,i=n.data?function(j){if(cn&&typeof Buffer<"u"&&j instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(j instanceof Uint8Array&&j.byteLength===j.buffer.byteLength)return j;if(typeof j=="string")return im(j);if(j instanceof ArrayBuffer||ArrayBuffer.isView(j)||typeof j=="object"&&!isNaN(j==null?void 0:j.length))return new Uint8Array(j);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(n.data):null,o=n.httpHeaders||null,s=n.withCredentials===!0,a=n.password??null,c=n.range instanceof WM?n.range:null,u=Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>0?n.rangeChunkSize:DZ;let d=n.worker instanceof nc?n.worker:null;const f=n.verbosity,h=typeof n.docBaseUrl!="string"||sm(n.docBaseUrl)?null:n.docBaseUrl,p=typeof n.cMapUrl=="string"?n.cMapUrl:null,m=n.cMapPacked!==!1,y=n.CMapReaderFactory||PZ,b=typeof n.standardFontDataUrl=="string"?n.standardFontDataUrl:null,w=n.StandardFontDataFactory||LZ,v=n.stopAtErrors!==!0,k=Number.isInteger(n.maxImageSize)&&n.maxImageSize>-1?n.maxImageSize:-1,C=n.isEvalSupported!==!1,T=typeof n.isOffscreenCanvasSupported=="boolean"?n.isOffscreenCanvasSupported:!cn,S=Number.isInteger(n.canvasMaxAreaInBytes)?n.canvasMaxAreaInBytes:-1,A=typeof n.disableFontFace=="boolean"?n.disableFontFace:cn,D=n.fontExtraProperties===!0,I=n.enableXfa===!0,P=n.ownerDocument||globalThis.document,O=n.disableRange===!0,_=n.disableStream===!0,B=n.disableAutoFetch===!0,$=n.pdfBug===!0,R=n.enableHWA===!0,N=c?c.length:n.length??NaN,W=typeof n.useSystemFonts=="boolean"?n.useSystemFonts:!cn&&!A,F=typeof n.useWorkerFetch=="boolean"?n.useWorkerFetch:y===gM&&w===yM&&p&&b&&c2(p,document.baseURI)&&c2(b,document.baseURI),K=n.canvasFactory||new NZ({ownerDocument:P,enableHWA:R}),ae=n.filterFactory||new _Z({docId:t,ownerDocument:P});NU(f);const de={canvasFactory:K,filterFactory:ae};if(F||(de.cMapReaderFactory=new y({baseUrl:p,isCompressed:m}),de.standardFontDataFactory=new w({baseUrl:b})),!d){const H={verbosity:f,port:uo.workerPort};d=H.port?nc.fromPort(H):new nc(H),e._worker=d}const Q={docId:t,apiVersion:"4.6.82",data:i,password:a,disableAutoFetch:B,rangeChunkSize:u,length:N,docBaseUrl:h,enableXfa:I,evaluatorOptions:{maxImageSize:k,disableFontFace:A,ignoreErrors:v,isEvalSupported:C,isOffscreenCanvasSupported:T,canvasMaxAreaInBytes:S,fontExtraProperties:D,useSystemFonts:W,cMapUrl:F?p:null,standardFontDataUrl:F?b:null}},Z={disableFontFace:A,fontExtraProperties:D,ownerDocument:P,pdfBug:$,styleElement:null,loadingParams:{disableAutoFetch:B,enableXfa:I}};return d.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const H=d.messageHandler.sendWithPromise("GetDocRequest",Q,i?[i.buffer]:null);let j;if(c)j=new gZ(c,{disableRange:O,disableStream:_});else if(!i){if(!r)throw new Error("getDocument - no `url` parameter provided.");j=(q=>cn?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&c2(q.url)?new jM(q):new AZ(q):c2(q.url)?new jM(q):new kZ(q))({url:r,length:N,httpHeaders:o,withCredentials:s,rangeChunkSize:u,disableRange:O,disableStream:_})}return H.then(q=>{if(e.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const ne=new p2(t,q,d.port),le=new FZ(ne,e,j,Z,de);e._transport=le,ne.send("Ready",null)})}).catch(e._capability.reject),e}function ZM(n){return typeof n=="object"&&Number.isInteger(n==null?void 0:n.num)&&n.num>=0&&Number.isInteger(n==null?void 0:n.gen)&&n.gen>=0}const J3=class J3{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+Kn(J3,X3)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e,t,r;this.destroyed=!0;try{(e=this._worker)!=null&&e.port&&(this._worker._pendingDestroy=!0),await((t=this._transport)==null?void 0:t.destroy())}catch(i){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,i}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};X3=new WeakMap,M(J3,X3,0);let Z4=J3;class WM{constructor(e,t,r=!1,i=null){this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){St("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class RZ{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Ie(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}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:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}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(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}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()}}class $Z{constructor(e,t,r,i=!1){M(this,da);M(this,gu);M(this,ua,null);M(this,No,!1);this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=i?new bM:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new qM,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:e,rotation:t=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:o=!1}={}){return new l2({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:o})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Ie(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return((e=this._transport._htmlForXfa)==null?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,viewport:t,intent:r="display",annotationMode:i=ds.ENABLE,transform:o=null,background:s=null,optionalContentConfigPromise:a=null,annotationCanvasMap:c=null,pageColors:u=null,printAnnotationStorage:d=null,isEditing:f=!1}){var C,T;(C=this._stats)==null||C.time("Overall");const h=this._transport.getRenderingIntent(r,i,d,f),{renderingIntent:p,cacheKey:m}=h;E(this,No,!1),x(this,gu,s5).call(this),a||(a=this._transport.getOptionalContentConfig(p));let y=this._intentStates.get(m);y||(y=Object.create(null),this._intentStates.set(m,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const b=!!(p&Qp);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(T=this._stats)==null||T.time("Page Request"),this._pumpOperatorList(h));const w=S=>{var A;y.renderTasks.delete(v),(this._maybeCleanupAfterRender||b)&&E(this,No,!0),x(this,da,pd).call(this,!b),S?(v.capability.reject(S),this._abortOperatorList({intentState:y,reason:S instanceof Error?S:new Error(S)})):v.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(A=globalThis.Stats)!=null&&A.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},v=new W4({callback:w,params:{canvasContext:e,viewport:t,transform:o,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!b,pdfBug:this._pdfBug,pageColors:u});(y.renderTasks||(y.renderTasks=new Set)).add(v);const k=v.task;return Promise.all([y.displayReadyCapability.promise,a]).then(([S,A])=>{var D;if(this.destroyed)w();else{if((D=this._stats)==null||D.time("Rendering"),!(A.renderingIntent&p))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");v.initializeGraphics({transparency:S,optionalContentConfig:A}),v.operatorListChanged()}}).catch(w),k}getOperatorList({intent:e="display",annotationMode:t=ds.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){var c;const o=this._transport.getRenderingIntent(e,t,r,i,!0);let s,a=this._intentStates.get(o.cacheKey);return a||(a=Object.create(null),this._intentStates.set(o.cacheKey,a)),a.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(s))},a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||(a.renderTasks=new Set)).add(s),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(c=this._stats)==null||c.time("Page Request"),this._pumpOperatorList(o)),a.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size:r=>r.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>g2.textContent(r));const t=this.streamTextContent(e);return new Promise(function(r,i){const o=t.getReader(),s={items:[],styles:Object.create(null),lang:null};(function a(){o.read().then(function({value:c,done:u}){u?r(s):(s.lang??(s.lang=c.lang),Object.assign(s.styles,c.styles),s.items.push(...c.items),a())},i)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),E(this,No,!1),x(this,gu,s5).call(this),Promise.all(e)}cleanup(e=!1){E(this,No,!0);const t=x(this,da,pd).call(this,!1);return e&&t&&this._stats&&(this._stats=new bM),t}_startRenderPage(e,t){var i,o;const r=this._intentStates.get(t);r&&((i=this._stats)==null||i.timeEnd("Page Request"),(o=r.displayReadyCapability)==null||o.resolve(e))}_renderPageChunk(e,t){for(let r=0,i=e.length;r<i;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const r of t.renderTasks)r.operatorListChanged();e.lastChunk&&x(this,da,pd).call(this,!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:r,modifiedIds:i}){const{map:o,transfer:s}=r,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:o,modifiedIds:i},s).getReader(),c=this._intentStates.get(t);c.streamReader=a;const u=()=>{a.read().then(({value:d,done:f})=>{f?c.streamReader=null:this._transport.destroyed||(this._renderPageChunk(d,c),u())},d=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(const f of c.renderTasks)f.operatorListChanged();x(this,da,pd).call(this,!0)}if(c.displayReadyCapability)c.displayReadyCapability.reject(d);else{if(!c.opListReadCapability)throw d;c.opListReadCapability.reject(d)}}})};u()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(t instanceof T4){let i=100;t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},i);return}}if(e.streamReader.cancel(new qa(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[i,o]of this._intentStates)if(o===e){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}ua=new WeakMap,No=new WeakMap,da=new WeakSet,pd=function(e=!1){if(x(this,gu,s5).call(this),!g(this,No)||this.destroyed)return!1;if(e)return E(this,ua,setTimeout(()=>{E(this,ua,null),x(this,da,pd).call(this,!1)},5e3)),!1;for(const{renderTasks:t,operatorList:r}of this._intentStates.values())if(t.size>0||!r.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),E(this,No,!1),!0},gu=new WeakSet,s5=function(){g(this,ua)&&(clearTimeout(g(this,ua)),E(this,ua,null))};class VZ{constructor(){M(this,e0,new Set);M(this,ey,Promise.resolve())}postMessage(e,t){const r={data:structuredClone(e,t?{transfer:t}:null)};g(this,ey).then(()=>{for(const i of g(this,e0))i.call(this,r)})}addEventListener(e,t){g(this,e0).add(t)}removeEventListener(e,t){g(this,e0).delete(t)}terminate(){g(this,e0).clear()}}e0=new WeakMap,ey=new WeakMap;const tt=class tt{constructor({name:e=null,port:t=null,verbosity:r=PU()}={}){M(this,yu);var i;if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if((i=g(tt,n0))!=null&&i.has(t))throw new Error("Cannot use more than one PDFWorker per port.");(g(tt,n0)||E(tt,n0,new WeakMap)).set(t,this),this._initializeFromPort(t)}else this._initialize()}get promise(){return cn?Promise.all([ms.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new p2("main","worker",e),this._messageHandler.on("ready",function(){}),x(this,yu,a5).call(this)}_initialize(){if(g(tt,t0)||g(tt,bu,l5)){this._setupFakeWorker();return}let{workerSrc:e}=tt;try{tt._isSameOrigin(window.location.href,e)||(e=tt._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),r=new p2("main","worker",t),i=()=>{o.abort(),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},o=new AbortController;t.addEventListener("error",()=>{this._webWorker||i()},{signal:o.signal}),r.on("test",a=>{o.abort(),!this.destroyed&&a?(this._messageHandler=r,this._port=t,this._webWorker=t,x(this,yu,a5).call(this)):i()}),r.on("ready",a=>{if(o.abort(),this.destroyed)i();else try{s()}catch{this._setupFakeWorker()}});const s=()=>{const a=new Uint8Array;r.send("test",a,[a.buffer])};s();return}catch{nm("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){g(tt,t0)||(Ce("Setting up fake worker."),E(tt,t0,!0)),tt._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const t=new VZ;this._port=t;const r="fake"+Kn(tt,ty)._++,i=new p2(r+"_worker",r,t);e.setup(i,t),this._messageHandler=new p2(r,r+"_worker",t),x(this,yu,a5).call(this)}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){var e;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(e=g(tt,n0))==null||e.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){var r;if(!(e!=null&&e.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const t=(r=g(this,n0))==null?void 0:r.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new tt(e)}static get workerSrc(){if(uo.workerSrc)return uo.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Ie(this,"_setupFakeWorkerGlobal",(async()=>g(this,bu,l5)?g(this,bu,l5):(await import(this.workerSrc)).WorkerMessageHandler)())}};ty=new WeakMap,t0=new WeakMap,n0=new WeakMap,yu=new WeakSet,a5=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},bu=new WeakSet,l5=function(){var e;try{return((e=globalThis.pdfjsWorker)==null?void 0:e.WorkerMessageHandler)||null}catch{return null}},M(tt,bu),M(tt,ty,0),M(tt,t0,!1),M(tt,n0,void 0),cn&&(E(tt,t0,!0),uo.workerSrc||(uo.workerSrc="./pdf.worker.mjs")),tt._isSameOrigin=(e,t)=>{let r;try{if(r=new URL(e),!r.origin||r.origin==="null")return!1}catch{return!1}const i=new URL(t,r);return r.origin===i.origin},tt._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let nc=tt;class FZ{constructor(e,t,r,i,o){M(this,r0);M(this,Po,new Map);M(this,ji,new Map);M(this,wu,new Map);M(this,vu,new Map);M(this,zi,null);this.messageHandler=e,this.loadingTask=t,this.commonObjs=new qM,this.fontLoader=new eZ({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=o.canvasFactory,this.filterFactory=o.filterFactory,this.cMapReaderFactory=o.cMapReaderFactory,this.standardFontDataFactory=o.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return Ie(this,"annotationStorage",new _4)}getRenderingIntent(e,t=ds.ENABLE,r=null,i=!1,o=!1){let s=b4,a=P4;switch(e){case"any":s=eU;break;case"display":break;case"print":s=Qp;break;default:Ce(`getRenderingIntent - invalid intent: ${e}`)}const c=s&Qp&&r instanceof SM?r:this.annotationStorage;switch(t){case ds.DISABLE:s+=rU;break;case ds.ENABLE:break;case ds.ENABLE_FORMS:s+=tU;break;case ds.ENABLE_STORAGE:s+=nU,a=c.serializable;break;default:Ce(`getRenderingIntent - invalid annotationMode: ${t}`)}i&&(s+=iU),o&&(s+=oU);const{ids:u,hash:d}=c.modifiedIds;return{renderingIntent:s,cacheKey:[s,a.hash,d].join("_"),annotationStorageSerializable:a,modifiedIds:u}}destroy(){var r;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(r=g(this,zi))==null||r.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const i of g(this,ji).values())e.push(i._destroy());g(this,ji).clear(),g(this,wu).clear(),g(this,vu).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{var i;this.commonObjs.clear(),this.fontLoader.clear(),g(this,Po).clear(),this.filterFactory.destroy(),m2.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new qa("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(r,i)=>{xt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=o=>{this._lastProgress={loaded:o.loaded,total:o.total}},i.onPull=()=>{this._fullReader.read().then(function({value:o,done:s}){s?i.close():(xt(o instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(o),1,[o]))}).catch(o=>{i.error(o)})},i.onCancel=o=>{this._fullReader.cancel(o),i.ready.catch(s=>{if(!this.destroyed)throw s})}}),e.on("ReaderHeadersReady",r=>{const i=Promise.withResolvers(),o=this._fullReader;return o.headersReady.then(()=>{var s;(!o.isStreamingSupported||!o.isRangeSupported)&&(this._lastProgress&&((s=t.onProgress)==null||s.call(t,this._lastProgress)),o.onProgress=a=>{var c;(c=t.onProgress)==null||c.call(t,{loaded:a.loaded,total:a.total})}),i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})},i.reject),i.promise}),e.on("GetRangeReader",(r,i)=>{xt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const o=this._networkStream.getRangeReader(r.begin,r.end);o?(i.onPull=()=>{o.read().then(function({value:s,done:a}){a?i.close():(xt(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(s),1,[s]))}).catch(s=>{i.error(s)})},i.onCancel=s=>{o.cancel(s),i.ready.catch(a=>{if(!this.destroyed)throw a})}):i.close()}),e.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,t._capability.resolve(new RZ(r,this))}),e.on("DocException",function(r){let i;switch(r.name){case"PasswordException":i=new C4(r.message,r.code);break;case"InvalidPDFException":i=new lM(r.message);break;case"MissingPDFException":i=new Wa(r.message);break;case"UnexpectedResponseException":i=new rm(r.message,r.status);break;case"UnknownErrorException":i=new k4(r.message,r.details);break;default:St("DocException - expected a valid Error.")}t._capability.reject(i)}),e.on("PasswordRequest",r=>{if(E(this,zi,Promise.withResolvers()),t.onPassword){const i=o=>{o instanceof Error?g(this,zi).reject(o):g(this,zi).resolve({password:o})};try{t.onPassword(i,r.code)}catch(o){g(this,zi).reject(o)}}else g(this,zi).reject(new C4(r.message,r.code));return g(this,zi).promise}),e.on("DataLoaded",r=>{var i;(i=t.onProgress)==null||i.call(t,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),e.on("StartRenderPage",r=>{this.destroyed||g(this,ji).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),e.on("commonobj",([r,i,o])=>{var s;if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":const{disableFontFace:a,fontExtraProperties:c,pdfBug:u}=this._params;if("error"in o){const p=o.error;Ce(`Error during font loading: ${p}`),this.commonObjs.resolve(r,p);break}const d=u&&((s=globalThis.FontInspector)!=null&&s.enabled)?(p,m)=>globalThis.FontInspector.fontAdded(p,m):null,f=new tZ(o,{disableFontFace:a,inspectFont:d});this.fontLoader.bind(f).catch(()=>e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!c&&f.data&&(f.data=null),this.commonObjs.resolve(r,f)});break;case"CopyLocalImage":const{imageRef:h}=o;xt(h,"The imageRef must be defined.");for(const p of g(this,ji).values())for(const[,m]of p.objs)if((m==null?void 0:m.ref)===h)return m.dataLen?(this.commonObjs.resolve(r,structuredClone(m)),m.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(r,o);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),e.on("obj",([r,i,o,s])=>{var c;if(this.destroyed)return;const a=g(this,ji).get(i);if(!a.objs.has(r))if(a._intentStates.size!==0)switch(o){case"Image":a.objs.resolve(r,s),(s==null?void 0:s.dataLen)>1e7&&(a._maybeCleanupAfterRender=!0);break;case"Pattern":a.objs.resolve(r,s);break;default:throw new Error(`Got unknown object type ${o}`)}else(c=s==null?void 0:s.bitmap)==null||c.close()}),e.on("DocProgress",r=>{var i;this.destroyed||((i=t.onProgress)==null||i.call(t,{loaded:r.loaded,total:r.total}))}),e.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var r;this.annotationStorage.size<=0&&Ce("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((r=this._fullReader)==null?void 0:r.filename)??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,r=g(this,wu).get(t);if(r)return r;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(o=>{if(this.destroyed)throw new Error("Transport destroyed");o.refStr&&g(this,vu).set(o.refStr,e);const s=new $Z(t,o,this,this._params.pdfBug);return g(this,ji).set(t,s),s});return g(this,wu).set(t,i),i}getPageIndex(e){return ZM(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return x(this,r0,J1).call(this,"GetFieldObjects")}hasJSActions(){return x(this,r0,J1).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}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 x(this,r0,J1).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return x(this,r0,J1).call(this,"GetOptionalContentConfig").then(t=>new mZ(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=g(this,Po).get(e);if(t)return t;const r=this.messageHandler.sendWithPromise(e,null).then(i=>{var o,s;return{info:i[0],metadata:i[1]?new hZ(i[1]):null,contentDispositionFilename:((o=this._fullReader)==null?void 0:o.filename)??null,contentLength:((s=this._fullReader)==null?void 0:s.contentLength)??null}});return g(this,Po).set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of g(this,ji).values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),g(this,Po).clear(),this.filterFactory.destroy(!0),m2.cleanup()}}cachedPageNumber(e){if(!ZM(e))return null;const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return g(this,vu).get(t)??null}}Po=new WeakMap,ji=new WeakMap,wu=new WeakMap,vu=new WeakMap,zi=new WeakMap,r0=new WeakSet,J1=function(e,t=null){const r=g(this,Po).get(e);if(r)return r;const i=this.messageHandler.sendWithPromise(e,t);return g(this,Po).set(e,i),i};const hm=Symbol("INITIAL_DATA");class qM{constructor(){M(this,jh);M(this,ni,Object.create(null))}get(e,t=null){if(t){const i=x(this,jh,Ov).call(this,e);return i.promise.then(()=>t(i.data)),null}const r=g(this,ni)[e];if(!r||r.data===hm)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=g(this,ni)[e];return!!t&&t.data!==hm}resolve(e,t=null){const r=x(this,jh,Ov).call(this,e);r.data=t,r.resolve()}clear(){var e;for(const t in g(this,ni)){const{data:r}=g(this,ni)[t];(e=r==null?void 0:r.bitmap)==null||e.close()}E(this,ni,Object.create(null))}*[Symbol.iterator](){for(const e in g(this,ni)){const{data:t}=g(this,ni)[e];t!==hm&&(yield[e,t])}}}ni=new WeakMap,jh=new WeakSet,Ov=function(e){var t;return(t=g(this,ni))[e]||(t[e]={...Promise.withResolvers(),data:hm})};class jZ{constructor(e){M(this,fa,null);E(this,fa,e),this.onContinue=null}get promise(){return g(this,fa).capability.promise}cancel(e=0){g(this,fa).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=g(this,fa).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=g(this,fa);return e.form||e.canvas&&(t==null?void 0:t.size)>0}}fa=new WeakMap;const o0=class o0{constructor({callback:e,params:t,objs:r,commonObjs:i,annotationCanvasMap:o,operatorList:s,pageIndex:a,canvasFactory:c,filterFactory:u,useRequestAnimationFrame:d=!1,pdfBug:f=!1,pageColors:h=null}){M(this,ha,null);this.callback=e,this.params=t,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=a,this.canvasFactory=c,this.filterFactory=u,this._pdfBug=f,this.pageColors=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=d===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new jZ(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=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){var a,c;if(this.cancelled)return;if(this._canvas){if(g(o0,i0).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.");g(o0,i0).add(this._canvas)}this._pdfBug&&((a=globalThis.StepperManager)!=null&&a.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:i,transform:o,background:s}=this.params;this.gfx=new tc(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:i,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(c=this.graphicsReadyCallback)==null||c.call(this)}cancel(e=null,t=0){var r;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),g(this,ha)&&(window.cancelAnimationFrame(g(this,ha)),E(this,ha,null)),g(o0,i0).delete(this._canvas),this.callback(e||new T4(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){var e;this.graphicsReady?((e=this.stepper)==null||e.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?E(this,ha,window.requestAnimationFrame(()=>{E(this,ha,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(),g(o0,i0).delete(this._canvas),this.callback())))}};ha=new WeakMap,i0=new WeakMap,M(o0,i0,new WeakSet);let W4=o0;const zZ="4.6.82",HZ="9b541910f";Pe(670);function KM(n){return Math.floor(255*Math.max(0,Math.min(1,n))).toString(16).padStart(2,"0")}function y2(n){return Math.max(0,Math.min(255,255*n))}class GM{static CMYK_G([e,t,r,i]){return["G",1-Math.min(1,.3*e+.59*r+.11*t+i)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=y2(e),e,e]}static G_HTML([e]){const t=KM(e);return`#${t}${t}${t}`}static RGB_G([e,t,r]){return["G",.3*e+.59*t+.11*r]}static RGB_rgb(e){return e.map(y2)}static RGB_HTML(e){return`#${e.map(KM).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,r,i]){return["RGB",1-Math.min(1,e+i),1-Math.min(1,r+i),1-Math.min(1,t+i)]}static CMYK_rgb([e,t,r,i]){return[y2(1-Math.min(1,e+i)),y2(1-Math.min(1,r+i)),y2(1-Math.min(1,t+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,r]){const i=1-e,o=1-t,s=1-r;return["CMYK",i,o,s,Math.min(i,o,s)]}}class YM{static setupStorage(e,t,r,i,o){const s=i.getValue(t,{value:null});switch(r.name){case"textarea":if(s.value!==null&&(e.textContent=s.value),o==="print")break;e.addEventListener("input",a=>{i.setValue(t,{value:a.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(s.value===r.attributes.xfaOn?e.setAttribute("checked",!0):s.value===r.attributes.xfaOff&&e.removeAttribute("checked"),o==="print")break;e.addEventListener("change",a=>{i.setValue(t,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})})}else{if(s.value!==null&&e.setAttribute("value",s.value),o==="print")break;e.addEventListener("input",a=>{i.setValue(t,{value:a.target.value})})}break;case"select":if(s.value!==null){e.setAttribute("value",s.value);for(const a of r.children)a.attributes.value===s.value?a.attributes.selected=!0:a.attributes.hasOwnProperty("selected")&&delete a.attributes.selected}e.addEventListener("input",a=>{const c=a.target.options,u=c.selectedIndex===-1?"":c[c.selectedIndex].value;i.setValue(t,{value:u})})}}static setAttributes({html:e,element:t,storage:r=null,intent:i,linkService:o}){const{attributes:s}=t,a=e instanceof HTMLAnchorElement;s.type==="radio"&&(s.name=`${s.name}-${i}`);for(const[c,u]of Object.entries(s))if(u!=null)switch(c){case"class":u.length&&e.setAttribute(c,u.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",u);break;case"style":Object.assign(e.style,u);break;case"textContent":e.textContent=u;break;default:(!a||c!=="href"&&c!=="newWindow")&&e.setAttribute(c,u)}a&&o.addLinkAttributes(e,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(e,s.dataId,t,r)}static render(e){var f,h;const t=e.annotationStorage,r=e.linkService,i=e.xfaHtml,o=e.intent||"display",s=document.createElement(i.name);i.attributes&&this.setAttributes({html:s,element:i,intent:o,linkService:r});const a=o!=="richText",c=e.div;if(c.append(s),e.viewport){const p=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=p}a&&c.setAttribute("class","xfaLayer xfaFont");const u=[];if(i.children.length===0){if(i.value){const p=document.createTextNode(i.value);s.append(p),a&&g2.shouldBuildText(i.name)&&u.push(p)}return{textDivs:u}}const d=[[i,-1,s]];for(;d.length>0;){const[p,m,y]=d.at(-1);if(m+1===p.children.length){d.pop();continue}const b=p.children[++d.at(-1)[1]];if(b===null)continue;const{name:w}=b;if(w==="#text"){const k=document.createTextNode(b.value);u.push(k),y.append(k);continue}const v=(f=b==null?void 0:b.attributes)!=null&&f.xmlns?document.createElementNS(b.attributes.xmlns,w):document.createElement(w);if(y.append(v),b.attributes&&this.setAttributes({html:v,element:b,storage:t,intent:o,linkService:r}),((h=b.children)==null?void 0:h.length)>0)d.push([b,-1,v]);else if(b.value){const k=document.createTextNode(b.value);a&&g2.shouldBuildText(w)&&u.push(k),v.append(k)}}for(const p of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))p.setAttribute("readOnly",!0);return{textDivs:u}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const b2=1e3,Qa=new WeakSet;function fo(n){return{width:n[2]-n[0],height:n[3]-n[1]}}class UZ{static create(e){switch(e.data.annotationType){case uU:return new QM(e);case cU:return new ZZ(e);case EU:switch(e.data.fieldType){case"Tx":return new WZ(e);case"Btn":return e.data.radioButton?new XM(e):e.data.checkBox?new KZ(e):new GZ(e);case"Ch":return new YZ(e);case"Sig":return new qZ(e)}return new Xa(e);case aM:return new q4(e);case dU:return new JM(e);case fU:return new XZ(e);case hU:return new JZ(e);case pU:return new eW(e);case gU:return new eE(e);case kU:return new nW(e);case SU:return new tE(e);case mU:return new tW(e);case yU:return new rW(e);case bU:return new iW(e);case wU:return new oW(e);case vU:return new sW(e);case CU:return new nE(e);case MU:return new aW(e);default:return new yt(e)}}}const rv=class rv{constructor(e,{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){M(this,zh);M(this,s0,null);M(this,Cu,!1);M(this,ku,null);this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:r}){return!!(e!=null&&e.str||t!=null&&t.str||r!=null&&r.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return rv._hasPopupData(this.data)}updateEdited(e){var r;if(!this.container)return;g(this,s0)||E(this,s0,{rect:this.data.rect.slice(0)});const{rect:t}=e;t&&x(this,zh,Dv).call(this,t),(r=g(this,ku))==null||r.popup.updateEdited(e)}resetEdited(){var e;g(this,s0)&&(x(this,zh,Dv).call(this,g(this,s0).rect),(e=g(this,ku))==null||e.popup.resetEdited(),E(this,s0,null))}_createContainer(e){const{data:t,parent:{page:r,viewport:i}}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",t.id),this instanceof Xa||(o.tabIndex=b2);const{style:s}=o;if(s.zIndex=this.parent.zIndex++,t.popupRef&&o.setAttribute("aria-haspopup","dialog"),t.alternativeText&&(o.title=t.alternativeText),t.noRotate&&o.classList.add("norotate"),!t.rect||this instanceof q4){const{rotation:y}=t;return t.hasOwnCanvas||y===0||this.setRotation(y,o),o}const{width:a,height:c}=fo(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth=`${t.borderStyle.width}px`;const y=t.borderStyle.horizontalCornerRadius,b=t.borderStyle.verticalCornerRadius;if(y>0||b>0){const v=`calc(${y}px * var(--scale-factor)) / calc(${b}px * var(--scale-factor))`;s.borderRadius=v}else if(this instanceof XM){const v=`calc(${a}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`;s.borderRadius=v}switch(t.borderStyle.style){case AU:s.borderStyle="solid";break;case TU:s.borderStyle="dashed";break;case xU:Ce("Unimplemented border style: beveled");break;case IU:Ce("Unimplemented border style: inset");break;case OU:s.borderBottomStyle="solid"}const w=t.borderColor||null;w?(E(this,Cu,!0),s.borderColor=se.makeHexColor(0|w[0],0|w[1],0|w[2])):s.borderWidth=0}const u=se.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]),{pageWidth:d,pageHeight:f,pageX:h,pageY:p}=i.rawDims;s.left=100*(u[0]-h)/d+"%",s.top=100*(u[1]-p)/f+"%";const{rotation:m}=t;return t.hasOwnCanvas||m===0?(s.width=100*a/d+"%",s.height=100*c/f+"%"):this.setRotation(m,o),o}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims,{width:o,height:s}=fo(this.data.rect);let a,c;e%180==0?(a=100*o/r,c=100*s/i):(a=100*s/r,c=100*o/i),t.style.width=`${a}%`,t.style.height=`${c}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(t,r,i)=>{const o=i.detail[t],s=o[0],a=o.slice(1);i.target.style[r]=GM[`${s}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[r]:GM[`${s}_rgb`](a)})};return Ie(this,"_commonActions",{display:t=>{const{display:r}=t.detail,i=r%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:r}=t.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{const r=t.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions;for(const i of Object.keys(t.detail)){const o=e[i]||r[i];o==null||o(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const r=this._commonActions;for(const[i,o]of Object.entries(t)){const s=r[i];s&&(s({detail:{[i]:o},target:e}),delete t[i])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,r,i,o]=this.data.rect.map(y=>Math.fround(y));if(e.length===8){const[y,b,w,v]=e.subarray(2,6);if(i===y&&o===b&&t===w&&r===v)return}const{style:s}=this.container;let a;if(g(this,Cu)){const{borderColor:y,borderWidth:b}=s;s.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${y}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const c=i-t,u=o-r,{svgFactory:d}=this,f=d.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0);const h=d.createElement("defs");f.append(h);const p=d.createElement("clipPath"),m=`clippath_${this.data.id}`;p.setAttribute("id",m),p.setAttribute("clipPathUnits","objectBoundingBox"),h.append(p);for(let y=2,b=e.length;y<b;y+=8){const w=e[y],v=e[y+1],k=e[y+2],C=e[y+3],T=d.createElement("rect"),S=(k-t)/c,A=(o-v)/u,D=(w-k)/c,I=(v-C)/u;T.setAttribute("x",S),T.setAttribute("y",A),T.setAttribute("width",D),T.setAttribute("height",I),p.append(T),a==null||a.push(`<rect vector-effect="non-scaling-stroke" x="${S}" y="${A}" width="${D}" height="${I}"/>`)}g(this,Cu)&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(f),this.container.style.clipPath=`url(#${m})`}_createPopup(){const{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");const r=E(this,ku,new q4({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}render(){St("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const r=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:o,id:s,exportValues:a}of i){if(o===-1||s===t)continue;const c=typeof a=="string"?a:null,u=document.querySelector(`[data-element-id="${s}"]`);!u||Qa.has(u)?r.push({id:s,exportValue:c,domElement:u}):Ce(`_getElementsByName - element not allowed: ${s}`)}return r}for(const i of document.getElementsByName(e)){const{exportValue:o}=i,s=i.getAttribute("data-element-id");s!==t&&Qa.has(i)&&r.push({id:s,exportValue:o,domElement:i})}return r}show(){var e;this.container&&(this.container.hidden=!1),(e=this.popup)==null||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),(e=this.popup)==null||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}};s0=new WeakMap,Cu=new WeakMap,ku=new WeakMap,zh=new WeakSet,Dv=function(e){const{container:{style:t},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:o,pageHeight:s,pageX:a,pageY:c}}}}=this;r==null||r.splice(0,4,...e);const{width:u,height:d}=fo(e);t.left=100*(e[0]-a)/o+"%",t.top=100*(s-e[3]+c)/s+"%",i===0?(t.width=100*u/o+"%",t.height=100*d/s+"%"):this.setRotation(i)};let yt=rv;class QM extends yt{constructor(t,r=null){super(t,{isRenderable:!0,ignoreBorder:!!(r!=null&&r.ignoreBorder),createQuadrilaterals:!0});M(this,_o);M(this,ny);M(this,ry);this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:r}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let o=!1;return t.url?(r.addLinkAttributes(i,t.url,t.newWindow),o=!0):t.action?(this._bindNamedAction(i,t.action),o=!0):t.attachment?(x(this,ny,ON).call(this,i,t.attachment,t.attachmentDest),o=!0):t.setOCGState?(x(this,ry,DN).call(this,i,t.setOCGState),o=!0):t.dest?(this._bindLink(i,t.dest),o=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),o=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),o=!0):this.isTooltipOnly&&!o&&(this._bindLink(i,""),o=!0)),this.container.classList.add("linkAnnotation"),o&&this.container.append(i),this.container}_bindLink(t,r){t.href=this.linkService.getDestinationHash(r),t.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&x(this,_o,B0).call(this)}_bindNamedAction(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(r),!1),x(this,_o,B0).call(this)}_bindJSAction(t,r){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const o of Object.keys(r.actions)){const s=i.get(o);s&&(t[s]=()=>{var a;return(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:o}}),!1})}t.onclick||(t.onclick=()=>!1),x(this,_o,B0).call(this)}_bindResetFormAction(t,r){const i=t.onclick;i||(t.href=this.linkService.getAnchorUrl("")),x(this,_o,B0).call(this),this._fieldObjects?t.onclick=()=>{var f;i==null||i();const{fields:o,refs:s,include:a}=r,c=[];if(o.length!==0||s.length!==0){const h=new Set(s);for(const p of o){const m=this._fieldObjects[p]||[];for(const{id:y}of m)h.add(y)}for(const p of Object.values(this._fieldObjects))for(const m of p)h.has(m.id)===a&&c.push(m)}else for(const h of Object.values(this._fieldObjects))c.push(...h);const u=this.annotationStorage,d=[];for(const h of c){const{id:p}=h;switch(d.push(p),h.type){case"text":{const y=h.defaultValue||"";u.setValue(p,{value:y});break}case"checkbox":case"radiobutton":{const y=h.defaultValue===h.exportValues;u.setValue(p,{value:y});break}case"combobox":case"listbox":{const y=h.defaultValue||"";u.setValue(p,{value:y});break}default:continue}const m=document.querySelector(`[data-element-id="${p}"]`);m&&(Qa.has(m)?m.dispatchEvent(new Event("resetform")):Ce(`_bindResetFormAction - element not allowed: ${p}`))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:d,name:"ResetForm"}})),!1}:(Ce('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(t.onclick=()=>!1))}}_o=new WeakSet,B0=function(){this.container.setAttribute("data-internal-link","")},ny=new WeakSet,ON=function(t,r,i=null){t.href=this.linkService.getAnchorUrl(""),r.description&&(t.title=r.description),t.onclick=()=>{var o;return(o=this.downloadManager)==null||o.openOrDownloadData(r.content,r.filename,i),!1},x(this,_o,B0).call(this)},ry=new WeakSet,DN=function(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(r),!1),x(this,_o,B0).call(this)};class ZZ extends yt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class Xa extends yt{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&(((t=e.previousSibling)==null?void 0:t.nodeName)==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return Bn.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,r,i,o){r.includes("mouse")?e.addEventListener(r,s=>{var a;(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s),shift:s.shiftKey,modifier:this._getKeyModifier(s)}})}):e.addEventListener(r,s=>{var a;if(r==="blur"){if(!t.focused||!s.relatedTarget)return;t.focused=!1}else if(r==="focus"){if(t.focused)return;t.focused=!0}o&&((a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s)}}))})}_setEventListeners(e,t,r,i){var o,s,a;for(const[c,u]of r)(u==="Action"||(o=this.data.actions)!=null&&o[u])&&(u!=="Focus"&&u!=="Blur"||t||(t={focused:!1}),this._setEventListener(e,t,c,u,i),u!=="Focus"||(s=this.data.actions)!=null&&s.Blur?u!=="Blur"||(a=this.data.actions)!=null&&a.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":se.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||9,o=e.style;let s;const a=c=>Math.round(10*c)/10;if(this.data.multiLine){const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2),u=c/(Math.round(c/(y4*i))||1);s=Math.min(i,a(u/y4))}else{const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(i,a(c/y4))}o.fontSize=`calc(${s}px * var(--scale-factor))`,o.color=se.makeHexColor(r[0],r[1],r[2]),this.data.textAlignment!==null&&(o.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class WZ extends Xa{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,i){const o=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=r),o.setValue(s.id,{[i]:r})}render(){var i,o;const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const s=e.getValue(t,{value:this.data.fieldValue});let a=s.value||"";const c=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;c&&a.length>c&&(a=a.slice(0,c));let u=s.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
121
+ `);return e.join("")}}function c2(n,e){try{const{protocol:t}=e?new URL(n,e):new URL(n);return t==="http:"||t==="https:"}catch{return!1}}function br(n){n.preventDefault()}let wM;class vM{static toDateObject(e){if(!e||typeof e!="string")return null;wM||(wM=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=wM.exec(e);if(!t)return null;const r=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let o=parseInt(t[3],10);o=o>=1&&o<=31?o:1;let s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;const u=t[7]||"Z";let d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let f=parseInt(t[9],10)||0;return f=f>=0&&f<=59?f:0,u==="-"?(s+=d,a+=f):u==="+"&&(s-=d,a-=f),new Date(Date.UTC(r,i,o,s,a,c))}}function GU(n,{scale:e=1,rotation:t=0}){const{width:r,height:i}=n.attributes.style,o=[0,0,parseInt(r),parseInt(i)];return new l2({viewBox:o,scale:e,rotation:t})}function I4(n){if(n.startsWith("#")){const e=parseInt(n.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return n.startsWith("rgb(")?n.slice(4,-1).split(",").map(e=>parseInt(e)):n.startsWith("rgba(")?n.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(Ce(`Not a valid color format: "${n}"`),[0,0,0])}function ot(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform();return[e,t,r,i,o,s]}function co(n){const{a:e,b:t,c:r,d:i,e:o,f:s}=n.getTransform().invertSelf();return[e,t,r,i,o,s]}function Ka(n,e,t=!1,r=!0){if(e instanceof l2){const{pageWidth:i,pageHeight:o}=e.rawDims,{style:s}=n,a=Bn.isCSSRoundSupported,c=`var(--scale-factor) * ${i}px`,u=`var(--scale-factor) * ${o}px`,d=a?`round(${c}, 1px)`:`calc(${c})`,f=a?`round(${u}, 1px)`:`calc(${u})`;t&&e.rotation%180!=0?(s.width=f,s.height=d):(s.width=d,s.height=f)}r&&n.setAttribute("data-main-rotation",e.rotation)}const Mo=class Mo{constructor(e){M(this,p3);M(this,m3);M(this,zc);M(this,g3);M(this,Uf);M(this,Sl,null);M(this,Ml,null);M(this,Qr,void 0);M(this,El,null);M(this,zf,null);E(this,Qr,e),g(Mo,Hf)||E(Mo,Hf,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 e=E(this,Sl,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar");const t=g(this,Qr)._uiManager._signal;e.addEventListener("contextmenu",br,{signal:t}),e.addEventListener("pointerdown",x(Mo,h3,XD),{signal:t});const r=E(this,El,document.createElement("div"));r.className="buttons",e.append(r);const i=g(this,Qr).toolbarPosition;if(i){const{style:o}=e,s=g(this,Qr)._uiManager.direction==="ltr"?1-i[0]:i[0];o.insetInlineEnd=100*s+"%",o.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return x(this,g3,tN).call(this),e}hide(){var e;g(this,Sl).classList.add("hidden"),(e=g(this,Ml))==null||e.hideDropdown()}show(){var e;g(this,Sl).classList.remove("hidden"),(e=g(this,zf))==null||e.shown()}async addAltText(e){const t=await e.render();x(this,zc,Xy).call(this,t),g(this,El).prepend(t,g(this,Uf,lv)),E(this,zf,e)}addColorPicker(e){E(this,Ml,e);const t=e.renderButton();x(this,zc,Xy).call(this,t),g(this,El).prepend(t,g(this,Uf,lv))}remove(){var e;g(this,Sl).remove(),(e=g(this,Ml))==null||e.destroy(),E(this,Ml,null)}};Sl=new WeakMap,Ml=new WeakMap,Qr=new WeakMap,El=new WeakMap,zf=new WeakMap,Hf=new WeakMap,h3=new WeakSet,XD=function(e){e.stopPropagation()},p3=new WeakSet,JD=function(e){g(this,Qr)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()},m3=new WeakSet,eN=function(e){g(this,Qr)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()},zc=new WeakSet,Xy=function(e){const t=g(this,Qr)._uiManager._signal;e.addEventListener("focusin",x(this,p3,JD).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",x(this,m3,eN).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",br,{signal:t})},g3=new WeakSet,tN=function(){const{editorType:e,_uiManager:t}=g(this,Qr),r=document.createElement("button");r.className="delete",r.tabIndex=0,r.setAttribute("data-l10n-id",g(Mo,Hf)[e]),x(this,zc,Xy).call(this,r),r.addEventListener("click",i=>{t.delete()},{signal:t._signal}),g(this,El).append(r)},Uf=new WeakSet,lv=function(){const e=document.createElement("div");return e.className="divider",e},M(Mo,h3),M(Mo,Hf,null);let O4=Mo;class YU{constructor(e){M(this,y3);M(this,b3);M(this,w3);M(this,Zf,null);M(this,Al,null);M(this,Tl,void 0);E(this,Tl,e)}show(e,t,r){const[i,o]=x(this,b3,rN).call(this,t,r),{style:s}=g(this,Al)||E(this,Al,x(this,y3,nN).call(this));e.append(g(this,Al)),s.insetInlineEnd=100*i+"%",s.top=`calc(${100*o}% + var(--editor-toolbar-vert-offset))`}hide(){g(this,Al).remove()}}Zf=new WeakMap,Al=new WeakMap,Tl=new WeakMap,y3=new WeakSet,nN=function(){const e=E(this,Al,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",br,{signal:g(this,Tl)._signal});const t=E(this,Zf,document.createElement("div"));return t.className="buttons",e.append(t),x(this,w3,iN).call(this),e},b3=new WeakSet,rN=function(e,t){let r=0,i=0;for(const o of e){const s=o.y+o.height;if(s<r)continue;const a=o.x+(t?o.width:0);s>r?(i=a,r=s):t?a>i&&(i=a):a<i&&(i=a)}return[t?1-i:i,r]},w3=new WeakSet,iN=function(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const r=g(this,Tl)._signal;e.addEventListener("contextmenu",br,{signal:r}),e.addEventListener("click",()=>{g(this,Tl).highlightSelection("floating_button")},{signal:r}),g(this,Zf).append(e)};function am(n,e,t){for(const r of t)e.addEventListener(r,n[r].bind(n))}class QU{constructor(){M(this,v3,0)}get id(){return"pdfjs_internal_editor_"+Kn(this,v3)._++}}v3=new WeakMap;const tv=class tv{constructor(){M(this,qf);M(this,Wf,function(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const t=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(t);else for(let r=0;r<32;r++)t[r]=Math.floor(255*Math.random());return cM(t)}());M(this,C3,0);M(this,Dr,null)}static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',Ie(this,"_isSVGFittingCanvas",t.decode().then(()=>(e.drawImage(t,0,0,1,1,0,0,1,3),new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]===0)))}async getFromFile(e){const{lastModified:t,name:r,size:i,type:o}=e;return x(this,qf,cv).call(this,`${t}_${r}_${i}_${o}`,e)}async getFromUrl(e){return x(this,qf,cv).call(this,e,e)}async getFromId(e){g(this,Dr)||E(this,Dr,new Map);const t=g(this,Dr).get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){const t=g(this,Dr).get(e);return t!=null&&t.isSvg?t.svgUrl:null}deleteId(e){g(this,Dr)||E(this,Dr,new Map);const t=g(this,Dr).get(e);t&&(t.refCounter-=1,t.refCounter===0&&(t.bitmap=null))}isValidId(e){return e.startsWith(`image_${g(this,Wf)}_`)}};Wf=new WeakMap,C3=new WeakMap,Dr=new WeakMap,qf=new WeakSet,cv=async function(e,t){g(this,Dr)||E(this,Dr,new Map);let r=g(this,Dr).get(e);if(r===null)return null;if(r!=null&&r.bitmap)return r.refCounter+=1,r;try{r||(r={bitmap:null,id:`image_${g(this,Wf)}_${Kn(this,C3)._++}`,refCounter:0,isSvg:!1});let i;if(typeof t=="string"?(r.url=t,i=await om(t,"blob")):i=r.file=t,i.type==="image/svg+xml"){const o=tv._isSVGFittingCanvas,s=new FileReader,a=new Image,c=new Promise((u,d)=>{a.onload=()=>{r.bitmap=a,r.isSvg=!0,u()},s.onload=async()=>{const f=r.svgUrl=s.result;a.src=await o?`${f}#svgView(preserveAspectRatio(none))`:f},a.onerror=s.onerror=d});s.readAsDataURL(i),await c}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){console.error(i),r=null}return g(this,Dr).set(e,r),r&&g(this,Dr).set(r.id,r),r};let D4=tv,XU=(KD=class{constructor(e=128){M(this,jt,[]);M(this,qs,!1);M(this,Kf,void 0);M(this,zt,-1);E(this,Kf,e)}add({cmd:e,undo:t,post:r,mustExec:i,type:o=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}){if(i&&e(),g(this,qs))return;const c={cmd:e,undo:t,post:r,type:o};if(g(this,zt)===-1){g(this,jt).length>0&&(g(this,jt).length=0),E(this,zt,0),g(this,jt).push(c);return}if(s&&g(this,jt)[g(this,zt)].type===o){a&&(c.undo=g(this,jt)[g(this,zt)].undo),g(this,jt)[g(this,zt)]=c;return}const u=g(this,zt)+1;u===g(this,Kf)?g(this,jt).splice(0,1):(E(this,zt,u),u<g(this,jt).length&&g(this,jt).splice(u)),g(this,jt).push(c)}undo(){if(g(this,zt)===-1)return;E(this,qs,!0);const{undo:e,post:t}=g(this,jt)[g(this,zt)];e(),t==null||t(),E(this,qs,!1),E(this,zt,g(this,zt)-1)}redo(){if(g(this,zt)<g(this,jt).length-1){E(this,zt,g(this,zt)+1),E(this,qs,!0);const{cmd:e,post:t}=g(this,jt)[g(this,zt)];e(),t==null||t(),E(this,qs,!1)}}hasSomethingToUndo(){return g(this,zt)!==-1}hasSomethingToRedo(){return g(this,zt)<g(this,jt).length-1}destroy(){E(this,jt,null)}},jt=new WeakMap,qs=new WeakMap,Kf=new WeakMap,zt=new WeakMap,KD);class u2{constructor(e){M(this,k3);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=Bn.platform;for(const[r,i,o={}]of e)for(const s of r){const a=s.startsWith("mac+");t&&a?(this.callbacks.set(s.slice(4),{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1))):!t&&!a&&(this.callbacks.set(s,{callback:i,options:o}),this.allKeys.add(s.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const r=this.callbacks.get(x(this,k3,oN).call(this,t));if(!r)return;const{callback:i,options:{bubbles:o=!1,args:s=[],checker:a=null}}=r;(!a||a(e,t))&&(i.bind(e,...s,t)(),o||(t.stopPropagation(),t.preventDefault()))}}k3=new WeakSet,oN=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const S3=class S3{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(r){const i=document.createElement("span");i.style.visibility="hidden",document.body.append(i);for(const o of r.keys()){i.style.color=o;const s=window.getComputedStyle(i).color;r.set(o,I4(s))}i.remove()}(e),Ie(this,"_colors",e)}convert(e){const t=I4(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[r,i]of this._colors)if(i.every((o,s)=>o===t[s]))return S3._colorsMapping.get(r);return t}getHexCode(e){const t=this._colors.get(e);return t?se.makeHexColor(...t):e}};pe(S3,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let N4=S3;const Qc=class Qc{constructor(e,t,r,i,o,s,a,c,u,d,f){M(this,Gc);M(this,ih);M(this,E3);M(this,A3);M(this,Yc);M(this,T3);M(this,x3);M(this,I3);M(this,oh);M(this,O3);M(this,sh);M(this,ah);M(this,D3);M(this,tn);M(this,_i);M(this,N3);M(this,P3);M(this,lh);M(this,_3);M(this,Nl);M(this,ch);M(this,Hc,new AbortController);M(this,sr,null);M(this,Ot,new Map);M(this,en,new Map);M(this,Uc,null);M(this,Eo,null);M(this,Zc,null);M(this,Xr,new XU);M(this,Ks,null);M(this,Wc,0);M(this,xl,new Set);M(this,Oi,null);M(this,Jr,null);M(this,Il,new Set);M(this,Gf,!1);M(this,Yf,!1);M(this,qc,!1);M(this,Qf,null);M(this,Di,null);M(this,Gs,null);M(this,Kc,null);M(this,Ys,!1);M(this,Ni,null);M(this,M3,new QU);M(this,Qs,!1);M(this,Xf,!1);M(this,Xs,null);M(this,Ol,null);M(this,Jf,null);M(this,eh,null);M(this,Ht,Te.NONE);M(this,ze,new Set);M(this,Ao,null);M(this,Dl,null);M(this,th,null);M(this,nh,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});M(this,Js,[0,0]);M(this,Pi,null);M(this,To,null);M(this,rh,null);const h=this._signal=g(this,Hc).signal;E(this,To,e),E(this,rh,t),E(this,Uc,r),this._eventBus=i,i._on("editingaction",this.onEditingAction.bind(this),{signal:h}),i._on("pagechanging",this.onPageChanging.bind(this),{signal:h}),i._on("scalechanging",this.onScaleChanging.bind(this),{signal:h}),i._on("rotationchanging",this.onRotationChanging.bind(this),{signal:h}),i._on("setpreference",this.onSetPreference.bind(this),{signal:h}),i._on("switchannotationeditorparams",p=>this.updateParams(p.type,p.value),{signal:h}),x(this,T3,lN).call(this),x(this,D3,fN).call(this),x(this,oh,dv).call(this),E(this,Eo,o.annotationStorage),E(this,Qf,o.filterFactory),E(this,Dl,s),E(this,Kc,a||null),E(this,Gf,c),E(this,Yf,u),E(this,qc,d),E(this,eh,f||null),this.viewParameters={realScale:hs.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const e=Qc.prototype,t=s=>g(s,To).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&s.hasSomethingToControl(),r=(s,{target:a})=>{if(a instanceof HTMLInputElement){const{type:c}=a;return c!=="text"&&c!=="number"}return!0},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return Ie(this,"_keyboardManager",new u2([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],e.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:r}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(s,{target:a})=>!(a instanceof HTMLButtonElement)&&g(s,To).contains(a)&&!s.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(s,{target:a})=>!(a instanceof HTMLButtonElement)&&g(s,To).contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:t}]]))}destroy(){var e,t,r;(e=g(this,Hc))==null||e.abort(),E(this,Hc,null),this._signal=null;for(const i of g(this,en).values())i.destroy();g(this,en).clear(),g(this,Ot).clear(),g(this,Il).clear(),E(this,sr,null),g(this,ze).clear(),g(this,Xr).destroy(),(t=g(this,Uc))==null||t.destroy(),(r=g(this,Ni))==null||r.hide(),E(this,Ni,null),g(this,Di)&&(clearTimeout(g(this,Di)),E(this,Di,null)),g(this,Pi)&&(clearTimeout(g(this,Pi)),E(this,Pi,null))}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return g(this,eh)}get useNewAltTextFlow(){return g(this,Yf)}get useNewAltTextWhenAddingImage(){return g(this,qc)}get hcmFilter(){return Ie(this,"hcmFilter",g(this,Dl)?g(this,Qf).addHCMFilter(g(this,Dl).foreground,g(this,Dl).background):"none")}get direction(){return Ie(this,"direction",getComputedStyle(g(this,To)).direction)}get highlightColors(){return Ie(this,"highlightColors",g(this,Kc)?new Map(g(this,Kc).split(",").map(e=>e.split("=").map(t=>t.trim()))):null)}get highlightColorNames(){return Ie(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){E(this,Jf,e)}editAltText(e,t=!1){var r;(r=g(this,Uc))==null||r.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){e==="enableNewAltTextWhenAddingImage"&&E(this,qc,t)}onPageChanging({pageNumber:e}){E(this,Wc,e-1)}focusMainContainer(){g(this,To).focus()}findParent(e,t){for(const r of g(this,en).values()){const{x:i,y:o,width:s,height:a}=r.div.getBoundingClientRect();if(e>=i&&e<=i+s&&t>=o&&t<=o+a)return r}return null}disableUserSelect(e=!1){g(this,rh).classList.toggle("noUserSelect",e)}addShouldRescale(e){g(this,Il).add(e)}removeShouldRescale(e){g(this,Il).delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*hs.PDF_TO_CSS_UNITS;for(const t of g(this,Il))t.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=t,a=t.toString(),c=x(this,Gc,Jy).call(this,t).closest(".textLayer"),u=this.getSelectionBoxes(c);if(!u)return;t.empty();const d=x(this,ih,uv).call(this,c),f=g(this,Ht)===Te.NONE,h=()=>{d==null||d.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:u,anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s,text:a}),f&&this.showAllEditors("highlight",!0,!0)};f?this.switchToMode(Te.HIGHLIGHT,h):h()}addToAnnotationStorage(e){e.isEmpty()||!g(this,Eo)||g(this,Eo).has(e.id)||g(this,Eo).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,g(this,Ys)&&(E(this,Ys,!1),x(this,Yc,e5).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of g(this,ze))if(t.div.contains(e)){E(this,Ol,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!g(this,Ol))return;const[e,t]=g(this,Ol);E(this,Ol,null),t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){x(this,oh,dv).call(this),x(this,sh,fv).call(this)}removeEditListeners(){x(this,O3,dN).call(this),x(this,ah,hv).call(this)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const r of g(this,Jr))if(r.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(const t of e.dataTransfer.items)for(const r of g(this,Jr))if(r.isHandlingMimeForPasting(t.type)){r.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){var r;if(e.preventDefault(),(r=g(this,sr))==null||r.commitOrRemove(),!this.hasSelection)return;const t=[];for(const i of g(this,ze)){const o=i.serialize(!0);o&&t.push(o)}t.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:t}=e;for(const o of t.items)for(const s of g(this,Jr))if(s.isHandlingMimeForPasting(o.type)){s.paste(o,this.currentLayer);return}let r=t.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(o){Ce(`paste: "${o.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const i=this.currentLayer;try{const o=[];for(const c of r){const u=i.deserialize(c);if(!u)return;o.push(u)}const s=()=>{for(const c of o)x(this,lh,pv).call(this,c);x(this,ch,mv).call(this,o)},a=()=>{for(const c of o)c.remove()};this.addCommands({cmd:s,undo:a,mustExec:!0})}catch(o){Ce(`paste: "${o.message}".`)}}keydown(e){this.isShiftKeyDown||e.key!=="Shift"||(this.isShiftKeyDown=!0),g(this,Ht)===Te.NONE||this.isEditorHandlingKeyboard||Qc._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,g(this,Ys)&&(E(this,Ys,!1),x(this,Yc,e5).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(e){e?(x(this,x3,cN).call(this),x(this,sh,fv).call(this),x(this,tn,In).call(this,{isEditing:g(this,Ht)!==Te.NONE,isEmpty:x(this,Nl,K1).call(this),hasSomethingToUndo:g(this,Xr).hasSomethingToUndo(),hasSomethingToRedo:g(this,Xr).hasSomethingToRedo(),hasSelectedEditor:!1})):(x(this,I3,uN).call(this),x(this,ah,hv).call(this),x(this,tn,In).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!g(this,Jr)){E(this,Jr,e);for(const t of g(this,Jr))x(this,_i,Ia).call(this,t.defaultPropertiesToUpdate)}}getId(){return g(this,M3).id}get currentLayer(){return g(this,en).get(g(this,Wc))}getLayer(e){return g(this,en).get(e)}get currentPageIndex(){return g(this,Wc)}addLayer(e){g(this,en).set(e.pageIndex,e),g(this,Qs)?e.enable():e.disable()}removeLayer(e){g(this,en).delete(e.pageIndex)}updateMode(e,t=null,r=!1){if(g(this,Ht)!==e)if(E(this,Ht,e),e!==Te.NONE){this.setEditingState(!0),x(this,N3,hN).call(this),this.unselectAll();for(const i of g(this,en).values())i.updateMode(e);if(t||!r){if(t){for(const i of g(this,Ot).values())if(i.annotationElementId===t){this.setSelected(i),i.enterInEditMode();break}}}else this.addNewEditorFromKeyboard()}else this.setEditingState(!1),x(this,P3,pN).call(this)}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==g(this,Ht)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){var r;if(g(this,Jr)){switch(e){case he.CREATE:this.currentLayer.addNewEditor();return;case he.HIGHLIGHT_DEFAULT_COLOR:(r=g(this,Jf))==null||r.updateColor(t);break;case he.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(g(this,th)||E(this,th,new Map)).set(e,t),this.showAllEditors("highlight",t)}for(const i of g(this,ze))i.updateParams(e,t);for(const i of g(this,Jr))i.updateDefaultParams(e,t)}}showAllEditors(e,t,r=!1){var i;for(const o of g(this,Ot).values())o.editorType===e&&o.show(t);(((i=g(this,th))==null?void 0:i.get(he.HIGHLIGHT_SHOW_ALL))??!0)!==t&&x(this,_i,Ia).call(this,[[he.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(g(this,Xf)!==e){E(this,Xf,e);for(const t of g(this,en).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}getEditors(e){const t=[];for(const r of g(this,Ot).values())r.pageIndex===e&&t.push(r);return t}getEditor(e){return g(this,Ot).get(e)}addEditor(e){g(this,Ot).set(e.id,e)}removeEditor(e){var t;e.div.contains(document.activeElement)&&(g(this,Di)&&clearTimeout(g(this,Di)),E(this,Di,setTimeout(()=>{this.focusMainContainer(),E(this,Di,null)},0))),g(this,Ot).delete(e.id),this.unselect(e),e.annotationElementId&&g(this,xl).has(e.annotationElementId)||((t=g(this,Eo))==null||t.remove(e.id))}addDeletedAnnotationElement(e){g(this,xl).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return g(this,xl).has(e)}removeDeletedAnnotationElement(e){g(this,xl).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){g(this,sr)!==e&&(E(this,sr,e),e&&x(this,_i,Ia).call(this,e.propertiesToUpdate))}updateUI(e){g(this,_3,mN)===e&&x(this,_i,Ia).call(this,e.propertiesToUpdate)}toggleSelected(e){g(this,ze).has(e)?(g(this,ze).delete(e),e.unselect(),x(this,tn,In).call(this,{hasSelectedEditor:this.hasSelection})):(g(this,ze).add(e),e.select(),x(this,_i,Ia).call(this,e.propertiesToUpdate),x(this,tn,In).call(this,{hasSelectedEditor:!0}))}setSelected(e){for(const t of g(this,ze))t!==e&&t.unselect();g(this,ze).clear(),g(this,ze).add(e),e.select(),x(this,_i,Ia).call(this,e.propertiesToUpdate),x(this,tn,In).call(this,{hasSelectedEditor:!0})}isSelected(e){return g(this,ze).has(e)}get firstSelectedEditor(){return g(this,ze).values().next().value}unselect(e){e.unselect(),g(this,ze).delete(e),x(this,tn,In).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return g(this,ze).size!==0}get isEnterHandled(){return g(this,ze).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){g(this,Xr).undo(),x(this,tn,In).call(this,{hasSomethingToUndo:g(this,Xr).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:x(this,Nl,K1).call(this)})}redo(){g(this,Xr).redo(),x(this,tn,In).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:g(this,Xr).hasSomethingToRedo(),isEmpty:x(this,Nl,K1).call(this)})}addCommands(e){g(this,Xr).add(e),x(this,tn,In).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:x(this,Nl,K1).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...g(this,ze)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)x(this,lh,pv).call(this,t)},mustExec:!0})}commitOrRemove(){var e;(e=g(this,sr))==null||e.commitOrRemove()}hasSomethingToControl(){return g(this,sr)||this.hasSelection}selectAll(){for(const e of g(this,ze))e.commit();x(this,ch,mv).call(this,g(this,Ot).values())}unselectAll(){if(!(g(this,sr)&&(g(this,sr).commitOrRemove(),g(this,Ht)!==Te.NONE))&&this.hasSelection){for(const e of g(this,ze))e.unselect();g(this,ze).clear(),x(this,tn,In).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;g(this,Js)[0]+=e,g(this,Js)[1]+=t;const[i,o]=g(this,Js),s=[...g(this,ze)];g(this,Pi)&&clearTimeout(g(this,Pi)),E(this,Pi,setTimeout(()=>{E(this,Pi,null),g(this,Js)[0]=g(this,Js)[1]=0,this.addCommands({cmd:()=>{for(const a of s)g(this,Ot).has(a.id)&&a.translateInPage(i,o)},undo:()=>{for(const a of s)g(this,Ot).has(a.id)&&a.translateInPage(-i,-o)},mustExec:!1})},1e3));for(const a of s)a.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),E(this,Oi,new Map);for(const e of g(this,ze))g(this,Oi).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!g(this,Oi))return!1;this.disableUserSelect(!1);const e=g(this,Oi);E(this,Oi,null);let t=!1;for(const[{x:i,y:o,pageIndex:s},a]of e)a.newX=i,a.newY=o,a.newPageIndex=s,t||(t=i!==a.savedX||o!==a.savedY||s!==a.savedPageIndex);if(!t)return!1;const r=(i,o,s,a)=>{if(g(this,Ot).has(i.id)){const c=g(this,en).get(a);c?i._setParentAndPosition(c,o,s):(i.pageIndex=a,i.x=o,i.y=s)}};return this.addCommands({cmd:()=>{for(const[i,{newX:o,newY:s,newPageIndex:a}]of e)r(i,o,s,a)},undo:()=>{for(const[i,{savedX:o,savedY:s,savedPageIndex:a}]of e)r(i,o,s,a)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(g(this,Oi))for(const r of g(this,Oi).keys())r.drag(e,t)}rebuild(e){if(e.parent===null){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return((e=this.getActive())==null?void 0:e.shouldGetKeyboardEvents())||g(this,ze).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return g(this,sr)===e}getActive(){return g(this,sr)}getMode(){return g(this,Ht)}get imageManager(){return Ie(this,"imageManager",new D4)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let u=0,d=t.rangeCount;u<d;u++)if(!e.contains(t.getRangeAt(u).commonAncestorContainer))return null;const{x:r,y:i,width:o,height:s}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(u,d,f,h)=>({x:(d-i)/s,y:1-(u+f-r)/o,width:h/s,height:f/o});break;case"180":a=(u,d,f,h)=>({x:1-(u+f-r)/o,y:1-(d+h-i)/s,width:f/o,height:h/s});break;case"270":a=(u,d,f,h)=>({x:1-(d+h-i)/s,y:(u-r)/o,width:h/s,height:f/o});break;default:a=(u,d,f,h)=>({x:(u-r)/o,y:(d-i)/s,width:f/o,height:h/s})}const c=[];for(let u=0,d=t.rangeCount;u<d;u++){const f=t.getRangeAt(u);if(!f.collapsed)for(const{x:h,y:p,width:m,height:y}of f.getClientRects())m!==0&&y!==0&&c.push(a(h,p,m,y))}return c.length===0?null:c}addChangedExistingAnnotation({annotationElementId:e,id:t}){(g(this,Zc)||E(this,Zc,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;(t=g(this,Zc))==null||t.delete(e)}renderAnnotationElement(e){var i;const t=(i=g(this,Zc))==null?void 0:i.get(e.data.id);if(!t)return;const r=g(this,Eo).getRawValue(t);r&&(g(this,Ht)!==Te.NONE||r.hasBeenModified)&&r.renderAnnotationElement(e)}};Hc=new WeakMap,sr=new WeakMap,Ot=new WeakMap,en=new WeakMap,Uc=new WeakMap,Eo=new WeakMap,Zc=new WeakMap,Xr=new WeakMap,Ks=new WeakMap,Wc=new WeakMap,xl=new WeakMap,Oi=new WeakMap,Jr=new WeakMap,Il=new WeakMap,Gf=new WeakMap,Yf=new WeakMap,qc=new WeakMap,Qf=new WeakMap,Di=new WeakMap,Gs=new WeakMap,Kc=new WeakMap,Ys=new WeakMap,Ni=new WeakMap,M3=new WeakMap,Qs=new WeakMap,Xf=new WeakMap,Xs=new WeakMap,Ol=new WeakMap,Jf=new WeakMap,eh=new WeakMap,Ht=new WeakMap,ze=new WeakMap,Ao=new WeakMap,Dl=new WeakMap,th=new WeakMap,nh=new WeakMap,Js=new WeakMap,Pi=new WeakMap,To=new WeakMap,rh=new WeakMap,Gc=new WeakSet,Jy=function({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},ih=new WeakSet,uv=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const r of g(this,en).values())if(r.hasTextLayer(e))return r;return null},E3=new WeakSet,sN=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=x(this,Gc,Jy).call(this,e).closest(".textLayer"),r=this.getSelectionBoxes(t);r&&(g(this,Ni)||E(this,Ni,new YU(this)),g(this,Ni).show(t,r,this.direction==="ltr"))},A3=new WeakSet,aN=function(){var i,o,s;const e=document.getSelection();if(!e||e.isCollapsed){g(this,Ao)&&((i=g(this,Ni))==null||i.hide(),E(this,Ao,null),x(this,tn,In).call(this,{hasSelectedText:!1}));return}const{anchorNode:t}=e;if(t===g(this,Ao))return;const r=x(this,Gc,Jy).call(this,e).closest(".textLayer");if(r){if((o=g(this,Ni))==null||o.hide(),E(this,Ao,t),x(this,tn,In).call(this,{hasSelectedText:!0}),(g(this,Ht)===Te.HIGHLIGHT||g(this,Ht)===Te.NONE)&&(g(this,Ht)===Te.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),E(this,Ys,this.isShiftKeyDown),!this.isShiftKeyDown)){const a=g(this,Ht)===Te.HIGHLIGHT?x(this,ih,uv).call(this,r):null;a==null||a.toggleDrawing();const c=new AbortController,u=this.combinedSignal(c),d=f=>{(f.type!=="pointerup"||f.button===0)&&(c.abort(),a==null||a.toggleDrawing(!0),f.type==="pointerup"&&x(this,Yc,e5).call(this,"main_toolbar"))};window.addEventListener("pointerup",d,{signal:u}),window.addEventListener("blur",d,{signal:u})}}else g(this,Ao)&&((s=g(this,Ni))==null||s.hide(),E(this,Ao,null),x(this,tn,In).call(this,{hasSelectedText:!1}))},Yc=new WeakSet,e5=function(e=""){g(this,Ht)===Te.HIGHLIGHT?this.highlightSelection(e):g(this,Gf)&&x(this,E3,sN).call(this)},T3=new WeakSet,lN=function(){document.addEventListener("selectionchange",x(this,A3,aN).bind(this),{signal:this._signal})},x3=new WeakSet,cN=function(){if(g(this,Gs))return;E(this,Gs,new AbortController);const e=this.combinedSignal(g(this,Gs));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},I3=new WeakSet,uN=function(){var e;(e=g(this,Gs))==null||e.abort(),E(this,Gs,null)},oh=new WeakSet,dv=function(){if(g(this,Xs))return;E(this,Xs,new AbortController);const e=this.combinedSignal(g(this,Xs));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},O3=new WeakSet,dN=function(){var e;(e=g(this,Xs))==null||e.abort(),E(this,Xs,null)},sh=new WeakSet,fv=function(){if(g(this,Ks))return;E(this,Ks,new AbortController);const e=this.combinedSignal(g(this,Ks));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},ah=new WeakSet,hv=function(){var e;(e=g(this,Ks))==null||e.abort(),E(this,Ks,null)},D3=new WeakSet,fN=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},tn=new WeakSet,In=function(e){Object.entries(e).some(([t,r])=>g(this,nh)[t]!==r)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(g(this,nh),e)}),g(this,Ht)===Te.HIGHLIGHT&&e.hasSelectedEditor===!1&&x(this,_i,Ia).call(this,[[he.HIGHLIGHT_FREE,!0]]))},_i=new WeakSet,Ia=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},N3=new WeakSet,hN=function(){if(!g(this,Qs)){E(this,Qs,!0);for(const e of g(this,en).values())e.enable();for(const e of g(this,Ot).values())e.enable()}},P3=new WeakSet,pN=function(){if(this.unselectAll(),g(this,Qs)){E(this,Qs,!1);for(const e of g(this,en).values())e.disable();for(const e of g(this,Ot).values())e.disable()}},lh=new WeakSet,pv=function(e){const t=g(this,en).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},_3=new WeakSet,mN=function(){let e=null;for(e of g(this,ze));return e},Nl=new WeakSet,K1=function(){if(g(this,Ot).size===0)return!0;if(g(this,Ot).size===1)for(const e of g(this,Ot).values())return e.isEmpty();return!1},ch=new WeakSet,mv=function(e){for(const t of g(this,ze))t.unselect();g(this,ze).clear();for(const t of e)t.isEmpty()||(g(this,ze).add(t),t.select());x(this,tn,In).call(this,{hasSelectedEditor:this.hasSelection})},pe(Qc,"TRANSLATE_SMALL",1),pe(Qc,"TRANSLATE_BIG",10);let Ga=Qc;const Nr=class Nr{constructor(e){M(this,Jc);M(this,eu);M(this,Ut,null);M(this,Li,!1);M(this,ei,null);M(this,Bi,null);M(this,ar,null);M(this,Xc,!1);M(this,Ri,null);M(this,Zn,null);M(this,xo,null);M(this,Pl,null);M(this,$i,!1);E(this,Zn,e),E(this,$i,e._uiManager.useNewAltTextFlow)}static initialize(e){Nr._l10nPromise||(Nr._l10nPromise=e)}async render(){const e=E(this,ei,document.createElement("button"));e.className="altText";let t;g(this,$i)?(e.classList.add("new"),t=await Nr._l10nPromise.get("pdfjs-editor-new-alt-text-missing-button-label")):t=await Nr._l10nPromise.get("pdfjs-editor-alt-text-button-label"),e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0";const r=g(this,Zn)._uiManager._signal;e.addEventListener("contextmenu",br,{signal:r}),e.addEventListener("pointerdown",o=>o.stopPropagation(),{signal:r});const i=o=>{o.preventDefault(),g(this,Zn)._uiManager.editAltText(g(this,Zn)),g(this,$i)&&g(this,Zn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:g(this,Jc,t5)}})};return e.addEventListener("click",i,{capture:!0,signal:r}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(E(this,Xc,!0),i(o))},{signal:r}),await x(this,eu,n5).call(this),e}finish(){g(this,ei)&&(g(this,ei).focus({focusVisible:g(this,Xc)}),E(this,Xc,!1))}isEmpty(){return g(this,$i)?g(this,Ut)===null:!g(this,Ut)&&!g(this,Li)}hasData(){return g(this,$i)?g(this,Ut)!==null||!!g(this,xo):this.isEmpty()}get guessedText(){return g(this,xo)}async setGuessedText(e){g(this,Ut)===null&&(E(this,xo,e),E(this,Pl,await Nr._l10nPromise.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer")({generatedAltText:e})),x(this,eu,n5).call(this))}toggleAltTextBadge(e=!1){var t;if(g(this,$i)&&!g(this,Ut)){if(!g(this,Ri)){const r=E(this,Ri,document.createElement("div"));r.className="noAltTextBadge",g(this,Zn).div.append(r)}g(this,Ri).classList.toggle("hidden",!e)}else(t=g(this,Ri))==null||t.remove(),E(this,Ri,null)}serialize(e){let t=g(this,Ut);return e||g(this,xo)!==t||(t=g(this,Pl)),{altText:t,decorative:g(this,Li),guessedText:g(this,xo),textWithDisclaimer:g(this,Pl)}}get data(){return{altText:g(this,Ut),decorative:g(this,Li)}}set data({altText:e,decorative:t,guessedText:r,textWithDisclaimer:i,cancel:o=!1}){r&&(E(this,xo,r),E(this,Pl,i)),(g(this,Ut)!==e||g(this,Li)!==t)&&(o||(E(this,Ut,e),E(this,Li,t)),x(this,eu,n5).call(this))}toggle(e=!1){g(this,ei)&&(!e&&g(this,ar)&&(clearTimeout(g(this,ar)),E(this,ar,null)),g(this,ei).disabled=!e)}shown(){g(this,Zn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:g(this,Jc,t5)}})}destroy(){var e,t;(e=g(this,ei))==null||e.remove(),E(this,ei,null),E(this,Bi,null),(t=g(this,Ri))==null||t.remove(),E(this,Ri,null)}};Ut=new WeakMap,Li=new WeakMap,ei=new WeakMap,Bi=new WeakMap,ar=new WeakMap,Xc=new WeakMap,Ri=new WeakMap,Zn=new WeakMap,xo=new WeakMap,Pl=new WeakMap,$i=new WeakMap,Jc=new WeakSet,t5=function(){return(g(this,Ut)?"added":g(this,Ut)===null&&this.guessedText&&"review")||"missing"},eu=new WeakSet,n5=async function(){var i,o;const e=g(this,ei);if(!e)return;if(g(this,$i)){const s=g(this,Jc,t5),a=s==="review"?"to-review":s;if(e.classList.toggle("done",!!g(this,Ut)),Nr._l10nPromise.get(`pdfjs-editor-new-alt-text-${a}-button-label`).then(c=>{e.setAttribute("aria-label",c);for(const u of e.childNodes)if(u.nodeType===Node.TEXT_NODE){u.textContent=c;break}}),!g(this,Ut)){(i=g(this,Bi))==null||i.remove();return}}else{if(!g(this,Ut)&&!g(this,Li)){e.classList.remove("done"),(o=g(this,Bi))==null||o.remove();return}e.classList.add("done"),Nr._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(s=>{e.setAttribute("aria-label",s)})}let t=g(this,Bi);if(!t){E(this,Bi,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip");const s=t.id=`alt-text-tooltip-${g(this,Zn).id}`;e.setAttribute("aria-describedby",s);const a=100,c=g(this,Zn)._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(g(this,ar)),E(this,ar,null)},{once:!0}),e.addEventListener("mouseenter",()=>{E(this,ar,setTimeout(()=>{E(this,ar,null),g(this,Bi).classList.add("show"),g(this,Zn)._reportTelemetry({action:"alt_text_tooltip"})},a))},{signal:c}),e.addEventListener("mouseleave",()=>{var u;g(this,ar)&&(clearTimeout(g(this,ar)),E(this,ar,null)),(u=g(this,Bi))==null||u.classList.remove("show")},{signal:c})}t.innerText=g(this,Li)?await Nr._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):g(this,Ut),t.parentNode||e.append(t);const r=g(this,Zn).getImageForAltText();r==null||r.setAttribute("aria-describedby",t.id)},pe(Nr,"_l10nPromise",null);let lm=Nr;const Ve=class Ve{constructor(e){M(this,hh);M(this,mh);M(this,B3);M(this,R3);M(this,gh);M(this,yh);M(this,bh);M(this,$3);M(this,wh);M(this,V3);M(this,F3);M(this,j3);M(this,vh);M(this,Vl);M(this,_l,null);M(this,ti,null);M(this,lt,null);M(this,tu,!1);M(this,Ll,!1);M(this,nn,null);M(this,Bl,null);M(this,ea,null);M(this,uh,"");M(this,Rl,!1);M(this,ta,null);M(this,dh,!1);M(this,$l,!1);M(this,Io,!1);M(this,Vi,null);M(this,nu,0);M(this,ru,0);M(this,Pr,null);pe(this,"_editToolbar",null);pe(this,"_initialOptions",Object.create(null));pe(this,"_isVisible",!0);pe(this,"_uiManager",null);pe(this,"_focusEventsAllowed",!0);M(this,fh,!1);M(this,L3,Ve._zIndex++);this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:r,pageHeight:i,pageX:o,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[o,s];const[a,c]=this.parentDimensions;this.x=e.x/a,this.y=e.y/c,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e=Ve.prototype._resizeWithKeyboard,t=Ga.TRANSLATE_SMALL,r=Ga.TRANSLATE_BIG;return Ie(this,"_resizerKeyboardManager",new u2([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,r]}],[["Escape","mac+Escape"],Ve.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return Ie(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new JU({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t,r){if(Ve._l10nResizer||(Ve._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"})),Ve._l10nPromise||(Ve._l10nPromise=new Map([...["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-new-alt-text-added-button-label","pdfjs-editor-new-alt-text-missing-button-label","pdfjs-editor-new-alt-text-to-review-button-label"].map(o=>[o,e.get(o)]),...["pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer"].map(o=>[o,e.get.bind(e,o)])])),r!=null&&r.strings)for(const o of r.strings)Ve._l10nPromise.set(o,e.get(o));if(Ve._borderLineWidth!==-1)return;const i=getComputedStyle(document.documentElement);Ve._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){St("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return g(this,fh)}set _isDraggable(e){var t;E(this,fh,e),(t=this.div)==null||t.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=g(this,L3)}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):x(this,Vl,G1).call(this),this.parent=e}focusin(e){this._focusEventsAllowed&&(g(this,Rl)?E(this,Rl,!1):this.parent.setSelected(this))}focusout(e){var r;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const t=e.relatedTarget;t!=null&&t.closest(`#${this.id}`)||(e.preventDefault(),(r=this.parent)!=null&&r.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,r,i){const[o,s]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(e+r)/o,this.y=(t+i)/s,this.fixAndSetPosition()}translate(e,t){x(this,hh,gv).call(this,this.parentDimensions,e,t)}translateInPage(e,t){g(this,ta)||E(this,ta,[this.x,this.y]),x(this,hh,gv).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){g(this,ta)||E(this,ta,[this.x,this.y]);const[r,i]=this.parentDimensions;if(this.x+=e/r,this.y+=t/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:u,y:d}=this.div.getBoundingClientRect();this.parent.findNewParent(this,u,d)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:o,y:s}=this;const[a,c]=this.getBaseTranslation();o+=a,s+=c,this.div.style.left=`${(100*o).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!g(this,ta)&&(g(this,ta)[0]!==this.x||g(this,ta)[1]!==this.y)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:r}=Ve,i=r/e,o=r/t;switch(this.rotation){case 90:return[-i,o];case 180:return[i,o];case 270:return[i,-o];default:return[-i,-o]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const[t,r]=this.pageDimensions;let{x:i,y:o,width:s,height:a}=this;if(s*=t,a*=r,i*=t,o*=r,this._mustFixPosition)switch(e){case 0:i=Math.max(0,Math.min(t-s,i)),o=Math.max(0,Math.min(r-a,o));break;case 90:i=Math.max(0,Math.min(t-a,i)),o=Math.min(r,Math.max(s,o));break;case 180:i=Math.min(t,Math.max(s,i)),o=Math.min(r,Math.max(a,o));break;case 270:i=Math.min(t,Math.max(a,i)),o=Math.max(0,Math.min(r-s,o))}this.x=i/=t,this.y=o/=r;const[c,u]=this.getBaseTranslation();i+=c,o+=u;const{style:d}=this.div;d.left=`${(100*i).toFixed(2)}%`,d.top=`${(100*o).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e,t){var r;return x(r=Ve,ph,yv).call(r,e,t,this.parentRotation)}pageTranslationToScreen(e,t){var r;return x(r=Ve,ph,yv).call(r,e,t,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,r]}=this,i=t*e,o=r*e;return Bn.isCSSRoundSupported?[Math.round(i),Math.round(o)]:[i,o]}setDims(e,t){const[r,i]=this.parentDimensions;this.div.style.width=`${(100*e/r).toFixed(2)}%`,g(this,Ll)||(this.div.style.height=`${(100*t/i).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:r}=e,i=r.endsWith("%"),o=!g(this,Ll)&&t.endsWith("%");if(i&&o)return;const[s,a]=this.parentDimensions;i||(e.width=`${(100*parseFloat(r)/s).toFixed(2)}%`),g(this,Ll)||o||(e.height=`${(100*parseFloat(t)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var e;(e=g(this,lt))==null||e.finish()}async addEditToolbar(){return this._editToolbar||g(this,$l)?this._editToolbar:(this._editToolbar=new O4(this),this.div.append(this._editToolbar.render()),g(this,lt)&&await this._editToolbar.addAltText(g(this,lt)),this._editToolbar)}removeEditToolbar(){var e;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(e=g(this,lt))==null||e.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){g(this,lt)||(lm.initialize(Ve._l10nPromise),E(this,lt,new lm(this)),g(this,_l)&&(g(this,lt).data=g(this,_l),E(this,_l,null)),await this.addEditToolbar())}get altTextData(){var e;return(e=g(this,lt))==null?void 0:e.data}set altTextData(e){g(this,lt)&&(g(this,lt).data=e)}get guessedAltText(){var e;return(e=g(this,lt))==null?void 0:e.guessedText}async setGuessedAltText(e){var t;await((t=g(this,lt))==null?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return(t=g(this,lt))==null?void 0:t.serialize(e)}hasAltText(){return!!g(this,lt)&&!g(this,lt).isEmpty()}hasAltTextData(){var e;return((e=g(this,lt))==null?void 0:e.hasData())??!1}render(){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=g(this,tu)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),x(this,wh,kv).call(this);const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[r,i]=this.getInitialTranslation();return this.translate(r,i),am(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=Bn.platform;e.button!==0||e.ctrlKey&&t?e.preventDefault():(E(this,Rl,!0),this._isDraggable?x(this,$3,bN).call(this,e):x(this,bh,Cv).call(this,e))}moveInDOM(){g(this,Vi)&&clearTimeout(g(this,Vi)),E(this,Vi,setTimeout(()=>{var e;E(this,Vi,null),(e=this.parent)==null||e.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,r){e.changeParent(this),this.x=t,this.y=r,this.fixAndSetPosition()}getRect(e,t,r=this.rotation){const i=this.parentScale,[o,s]=this.pageDimensions,[a,c]=this.pageTranslation,u=e/i,d=t/i,f=this.x*o,h=this.y*s,p=this.width*o,m=this.height*s;switch(r){case 0:return[f+u+a,s-h-d-m+c,f+u+p+a,s-h-d+c];case 90:return[f+d+a,s-h+u+c,f+d+m+a,s-h+u+p+c];case 180:return[f-u-p+a,s-h+d+c,f-u+a,s-h+d+m+c];case 270:return[f-d-m+a,s-h-u-p+c,f-d+a,s-h-u+c];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,i,o,s]=e,a=o-r,c=s-i;switch(this.rotation){case 0:return[r,t-s,a,c];case 90:return[r,t-i,c,a];case 180:return[o,t-i,a,c];case 270:return[o,t-s,c,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){E(this,$l,!0)}disableEditMode(){E(this,$l,!1)}isInEditMode(){return g(this,$l)}shouldGetKeyboardEvents(){return g(this,Io)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){x(this,wh,kv).call(this)}rotate(e){}serialize(e=!1,t=null){St("An editor must be serializable")}static deserialize(e,t,r){const i=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:r});i.rotation=e.rotation,E(i,_l,e.accessibilityData);const[o,s]=i.pageDimensions,[a,c,u,d]=i.getRectInCurrentCoords(e.rect,s);return i.x=a/o,i.y=c/s,i.width=u/o,i.height=d/s,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e;if((e=g(this,ea))==null||e.abort(),E(this,ea,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),g(this,Vi)&&(clearTimeout(g(this,Vi)),E(this,Vi,null)),x(this,Vl,G1).call(this),this.removeEditToolbar(),g(this,Pr)){for(const t of g(this,Pr).values())clearTimeout(t);E(this,Pr,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(x(this,B3,gN).call(this),g(this,nn).classList.remove("hidden"),am(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),E(this,Bl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const t=g(this,nn).children;if(!g(this,ti)){E(this,ti,Array.from(t));const s=x(this,V3,wN).bind(this),a=x(this,F3,vN).bind(this),c=this._uiManager._signal;for(const u of g(this,ti)){const d=u.getAttribute("data-resizer-name");u.setAttribute("role","spinbutton"),u.addEventListener("keydown",s,{signal:c}),u.addEventListener("blur",a,{signal:c}),u.addEventListener("focus",x(this,j3,CN).bind(this,d),{signal:c}),u.setAttribute("data-l10n-id",Ve._l10nResizer[d])}}const r=g(this,ti)[0];let i=0;for(const s of t){if(s===r)break;i++}const o=(360-this.rotation+this.parentRotation)%360/90*(g(this,ti).length/4);if(o!==i){if(o<i)for(let a=0;a<i-o;a++)g(this,nn).append(g(this,nn).firstChild);else if(o>i)for(let a=0;a<o-i;a++)g(this,nn).firstChild.before(g(this,nn).lastChild);let s=0;for(const a of t){const c=g(this,ti)[s++].getAttribute("data-resizer-name");a.setAttribute("data-l10n-id",Ve._l10nResizer[c])}}x(this,vh,Sv).call(this,0),E(this,Io,!0),g(this,nn).firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}_resizeWithKeyboard(e,t){g(this,Io)&&x(this,yh,vv).call(this,g(this,uh),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){x(this,Vl,G1).call(this),this.div.focus()}select(){var e,t,r;this.makeResizable(),(e=this.div)==null||e.classList.add("selectedEditor"),this._editToolbar?((t=this._editToolbar)==null||t.show(),(r=g(this,lt))==null||r.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{var i,o;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((o=this._editToolbar)==null||o.show())})}unselect(){var e,t,r,i,o;(e=g(this,nn))==null||e.classList.add("hidden"),(t=this.div)==null||t.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(o=g(this,lt))==null||o.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return g(this,dh)}set isEditing(e){E(this,dh,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){E(this,Ll,!0);const r=e/t,{style:i}=this.div;i.aspectRatio=r,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){g(this,Pr)||E(this,Pr,new Map);const{action:r}=e;let i=g(this,Pr).get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(e),g(this,Pr).delete(r),g(this,Pr).size===0&&E(this,Pr,null)},Ve._telemetryTimeout),g(this,Pr).set(r,i)}else e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),E(this,tu,!1)}disable(){this.div&&(this.div.tabIndex=-1),E(this,tu,!0)}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if(t.nodeName==="CANVAS"){const r=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),r.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;t.nodeName==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}};_l=new WeakMap,ti=new WeakMap,lt=new WeakMap,tu=new WeakMap,Ll=new WeakMap,nn=new WeakMap,Bl=new WeakMap,ea=new WeakMap,uh=new WeakMap,Rl=new WeakMap,ta=new WeakMap,dh=new WeakMap,$l=new WeakMap,Io=new WeakMap,Vi=new WeakMap,nu=new WeakMap,ru=new WeakMap,Pr=new WeakMap,fh=new WeakMap,L3=new WeakMap,hh=new WeakSet,gv=function([e,t],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/e,this.y+=i/t,this.fixAndSetPosition()},ph=new WeakSet,yv=function(e,t,r){switch(r){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},mh=new WeakSet,bv=function(e){switch(e){case 90:{const[t,r]=this.pageDimensions;return[0,-t/r,r/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,r]=this.pageDimensions;return[0,t/r,-r/t,0]}default:return[1,0,0,1]}},B3=new WeakSet,gN=function(){if(g(this,nn))return;E(this,nn,document.createElement("div")),g(this,nn).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const r of e){const i=document.createElement("div");g(this,nn).append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",x(this,R3,yN).bind(this,r),{signal:t}),i.addEventListener("contextmenu",br,{signal:t}),i.tabIndex=-1}this.div.prepend(g(this,nn))},R3=new WeakSet,yN=function(e,t){var m;t.preventDefault();const{isMac:r}=Bn.platform;if(t.button!==0||t.ctrlKey&&r)return;(m=g(this,lt))==null||m.toggle(!1);const i=this._isDraggable;this._isDraggable=!1;const o=new AbortController,s=this._uiManager.combinedSignal(o);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",x(this,yh,vv).bind(this,e),{passive:!0,capture:!0,signal:s}),window.addEventListener("contextmenu",br,{signal:s});const a=this.x,c=this.y,u=this.width,d=this.height,f=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const p=()=>{var y;o.abort(),this.parent.togglePointerEvents(!0),(y=g(this,lt))==null||y.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=f,this.div.style.cursor=h,x(this,gh,wv).call(this,a,c,u,d)};window.addEventListener("pointerup",p,{signal:s}),window.addEventListener("blur",p,{signal:s})},gh=new WeakSet,wv=function(e,t,r,i){const o=this.x,s=this.y,a=this.width,c=this.height;o===e&&s===t&&a===r&&c===i||this.addCommands({cmd:()=>{this.width=a,this.height=c,this.x=o,this.y=s;const[u,d]=this.parentDimensions;this.setDims(u*a,d*c),this.fixAndSetPosition()},undo:()=>{this.width=r,this.height=i,this.x=e,this.y=t;const[u,d]=this.parentDimensions;this.setDims(u*r,d*i),this.fixAndSetPosition()},mustExec:!0})},yh=new WeakSet,vv=function(e,t){const[r,i]=this.parentDimensions,o=this.x,s=this.y,a=this.width,c=this.height,u=Ve.MIN_SIZE/r,d=Ve.MIN_SIZE/i,f=F=>Math.round(1e4*F)/1e4,h=x(this,mh,bv).call(this,this.rotation),p=(F,K)=>[h[0]*F+h[2]*K,h[1]*F+h[3]*K],m=x(this,mh,bv).call(this,360-this.rotation);let y,b,w=!1,v=!1;switch(e){case"topLeft":w=!0,y=(F,K)=>[0,0],b=(F,K)=>[F,K];break;case"topMiddle":y=(F,K)=>[F/2,0],b=(F,K)=>[F/2,K];break;case"topRight":w=!0,y=(F,K)=>[F,0],b=(F,K)=>[0,K];break;case"middleRight":v=!0,y=(F,K)=>[F,K/2],b=(F,K)=>[0,K/2];break;case"bottomRight":w=!0,y=(F,K)=>[F,K],b=(F,K)=>[0,0];break;case"bottomMiddle":y=(F,K)=>[F/2,K],b=(F,K)=>[F/2,0];break;case"bottomLeft":w=!0,y=(F,K)=>[0,K],b=(F,K)=>[F,0];break;case"middleLeft":v=!0,y=(F,K)=>[0,K/2],b=(F,K)=>[F,K/2]}const k=y(a,c),C=b(a,c);let T=p(...C);const S=f(o+T[0]),A=f(s+T[1]);let D=1,I=1,[P,O]=this.screenToPageTranslation(t.movementX,t.movementY);[P,O]=(_=P/r,B=O/i,[m[0]*_+m[2]*B,m[1]*_+m[3]*B]);var _,B;if(w){const F=Math.hypot(a,c);D=I=Math.max(Math.min(Math.hypot(C[0]-k[0]-P,C[1]-k[1]-O)/F,1/a,1/c),u/a,d/c)}else v?D=Math.max(u,Math.min(1,Math.abs(C[0]-k[0]-P)))/a:I=Math.max(d,Math.min(1,Math.abs(C[1]-k[1]-O)))/c;const $=f(a*D),R=f(c*I);T=p(...b($,R));const N=S-T[0],W=A-T[1];this.width=$,this.height=R,this.x=N,this.y=W,this.setDims(r*$,i*R),this.fixAndSetPosition()},bh=new WeakSet,Cv=function(e){const{isMac:t}=Bn.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},$3=new WeakSet,bN=function(e){const t=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();const r=new AbortController,i=this._uiManager.combinedSignal(r);if(t){this.div.classList.add("moving"),E(this,nu,e.clientX),E(this,ru,e.clientY);const s=a=>{const{clientX:c,clientY:u}=a,[d,f]=this.screenToPageTranslation(c-g(this,nu),u-g(this,ru));E(this,nu,c),E(this,ru,u),this._uiManager.dragSelectedEditors(d,f)};window.addEventListener("pointermove",s,{passive:!0,capture:!0,signal:i})}const o=()=>{r.abort(),t&&this.div.classList.remove("moving"),E(this,Rl,!1),this._uiManager.endDragSession()||x(this,bh,Cv).call(this,e)};window.addEventListener("pointerup",o,{signal:i}),window.addEventListener("blur",o,{signal:i})},wh=new WeakSet,kv=function(){if(g(this,ea)||!this.div)return;E(this,ea,new AbortController);const e=this._uiManager.combinedSignal(g(this,ea));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},V3=new WeakSet,wN=function(e){Ve._resizerKeyboardManager.exec(this,e)},F3=new WeakSet,vN=function(e){var t;g(this,Io)&&((t=e.relatedTarget)==null?void 0:t.parentNode)!==g(this,nn)&&x(this,Vl,G1).call(this)},j3=new WeakSet,CN=function(e){E(this,uh,g(this,Io)?e:"")},vh=new WeakSet,Sv=function(e){if(g(this,ti))for(const t of g(this,ti))t.tabIndex=e},Vl=new WeakSet,G1=function(){if(E(this,Io,!1),x(this,vh,Sv).call(this,-1),g(this,Bl)){const{savedX:e,savedY:t,savedWidth:r,savedHeight:i}=g(this,Bl);x(this,gh,wv).call(this,e,t,r,i),E(this,Bl,null)}},M(Ve,ph),pe(Ve,"_l10nPromise",null),pe(Ve,"_l10nResizer",null),pe(Ve,"_borderLineWidth",-1),pe(Ve,"_colorManager",new N4),pe(Ve,"_zIndex",1),pe(Ve,"_telemetryTimeout",1e3);let je=Ve;class JU extends je{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const CM=3285377520,wr=4294901760,ps=65535;class kM{constructor(e){this.h1=e?4294967295&e:CM,this.h2=e?4294967295&e:CM}update(e){let t,r;if(typeof e=="string"){t=new Uint8Array(2*e.length),r=0;for(let y=0,b=e.length;y<b;y++){const w=e.charCodeAt(y);w<=255?t[r++]=w:(t[r++]=w>>>8,t[r++]=255&w)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),r=t.byteLength}const i=r>>2,o=r-4*i,s=new Uint32Array(t.buffer,0,i);let a=0,c=0,u=this.h1,d=this.h2;const f=3432918353,h=461845907,p=11601,m=13715;for(let y=0;y<i;y++)1&y?(a=s[y],a=a*f&wr|a*p&ps,a=a<<15|a>>>17,a=a*h&wr|a*m&ps,u^=a,u=u<<13|u>>>19,u=5*u+3864292196):(c=s[y],c=c*f&wr|c*p&ps,c=c<<15|c>>>17,c=c*h&wr|c*m&ps,d^=c,d=d<<13|d>>>19,d=5*d+3864292196);switch(a=0,o){case 3:a^=t[4*i+2]<<16;case 2:a^=t[4*i+1]<<8;case 1:a^=t[4*i],a=a*f&wr|a*p&ps,a=a<<15|a>>>17,a=a*h&wr|a*m&ps,1&i?u^=a:d^=a}this.h1=u,this.h2=d}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&wr|36045*e&ps,t=4283543511*t&wr|(2950163797*(t<<16|e>>>16)&wr)>>>16,e^=t>>>1,e=444984403*e&wr|60499*e&ps,t=3301882366*t&wr|(3120437893*(t<<16|e>>>16)&wr)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const P4=Object.freeze({map:null,hash:"",transfer:void 0});class _4{constructor(){M(this,z3);M(this,Fl,!1);M(this,jl,null);M(this,Zt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=g(this,Zt).get(e);return r===void 0?t:Object.assign(t,r)}getRawValue(e){return g(this,Zt).get(e)}remove(e){if(g(this,Zt).delete(e),g(this,Zt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const t of g(this,Zt).values())if(t instanceof je)return;this.onAnnotationEditor(null)}}setValue(e,t){const r=g(this,Zt).get(e);let i=!1;if(r!==void 0)for(const[o,s]of Object.entries(t))r[o]!==s&&(i=!0,r[o]=s);else i=!0,g(this,Zt).set(e,t);i&&x(this,z3,kN).call(this),t instanceof je&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(t.constructor._type)}has(e){return g(this,Zt).has(e)}getAll(){return g(this,Zt).size>0?S4(g(this,Zt)):null}setAll(e){for(const[t,r]of Object.entries(e))this.setValue(t,r)}get size(){return g(this,Zt).size}resetModified(){g(this,Fl)&&(E(this,Fl,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new SM(this)}get serializable(){if(g(this,Zt).size===0)return P4;const e=new Map,t=new kM,r=[],i=Object.create(null);let o=!1;for(const[s,a]of g(this,Zt)){const c=a instanceof je?a.serialize(!1,i):a;c&&(e.set(s,c),t.update(`${s}:${JSON.stringify(c)}`),o||(o=!!c.bitmap))}if(o)for(const s of e.values())s.bitmap&&r.push(s.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:r}:P4}get editorStats(){let e=null;const t=new Map;for(const r of g(this,Zt).values()){if(!(r instanceof je))continue;const i=r.telemetryFinalData;if(!i)continue;const{type:o}=i;t.has(o)||t.set(o,Object.getPrototypeOf(r).constructor),e||(e=Object.create(null));const s=e[o]||(e[o]=new Map);for(const[a,c]of Object.entries(i)){if(a==="type")continue;let u=s.get(a);u||(u=new Map,s.set(a,u));const d=u.get(c)??0;u.set(c,d+1)}}for(const[r,i]of t)e[r]=i.computeTelemetryFinalData(e[r]);return e}resetModifiedIds(){E(this,jl,null)}get modifiedIds(){if(g(this,jl))return g(this,jl);const e=[];for(const t of g(this,Zt).values())t instanceof je&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return E(this,jl,{ids:new Set(e),hash:e.join(",")})}}Fl=new WeakMap,jl=new WeakMap,Zt=new WeakMap,z3=new WeakSet,kN=function(){g(this,Fl)||(E(this,Fl,!0),typeof this.onSetModified=="function"&&this.onSetModified())};class SM extends _4{constructor(t){super();M(this,Ch,void 0);const{map:r,hash:i,transfer:o}=t.serializable,s=structuredClone(r,o?{transfer:o}:null);E(this,Ch,{map:s,hash:i,transfer:o})}get print(){St("Should not call PrintAnnotationStorage.print")}get serializable(){return g(this,Ch)}get modifiedIds(){return Ie(this,"modifiedIds",{ids:new Set,hash:""})}}Ch=new WeakMap;class eZ{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){M(this,iu,new Set);this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),g(this,iu).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!g(this,iu).has(e.loadedName))if(xt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:i,style:o}=e,s=new FontFace(r,i,o);this.addNativeFontFace(s);try{await s.load(),g(this,iu).add(r),t==null||t(e)}catch{Ce(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}}else St("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const r=e.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw Ce(`Failed to load font '${r.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(e,i)})}}get isFontLoadingAPISupported(){var e;return Ie(this,"isFontLoadingAPISupported",!!((e=this._document)!=null&&e.fonts))}get isSyncFontLoadingSupported(){let e=!1;return(cn||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),Ie(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,r={done:!1,complete:function(){for(xt(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.length>0&&t[0].done;){const o=t.shift();setTimeout(o.callback,0)}},callback:e};return t.push(r),r}get _loadTestFont(){return Ie(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function r(b,w){return b.charCodeAt(w)<<24|b.charCodeAt(w+1)<<16|b.charCodeAt(w+2)<<8|255&b.charCodeAt(w+3)}function i(b,w,v,k){return b.substring(0,w)+k+b.substring(w+v)}let o,s;const a=this._document.createElement("canvas");a.width=1,a.height=1;const c=a.getContext("2d");let u=0;const d=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=i(f,976,d.length,d);const h=1482184792;let p=r(f,16);for(o=0,s=d.length-3;o<s;o+=4)p=p-h+r(d,o)|0;o<d.length&&(p=p-h+r(d+"XXX",o)|0),f=i(f,16,4,function(w){return String.fromCharCode(w>>24&255,w>>16&255,w>>8&255,255&w)}(p));const m=`@font-face {font-family:"${d}";src:${`url(data:font/opentype;base64,${btoa(f)});`}}`;this.insertRule(m);const y=this._document.createElement("div");y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px";for(const b of[e.loadedName,d]){const w=this._document.createElement("span");w.textContent="Hi",w.style.fontFamily=b,y.append(w)}this._document.body.append(y),function b(w,v){if(++u>30){Ce("Load test font never loaded."),v();return}c.font="30px "+w,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?v():setTimeout(b.bind(null,w,v))}(d,()=>{y.remove(),t.complete()})}}iu=new WeakMap;class tZ{constructor(e,{disableFontFace:t=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const i in e)this[i]=e[i];this.disableFontFace=t===!0,this._inspectFont=r}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else e=new FontFace(this.loadedName,this.data,{});return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var i;if(!this.data||this.disableFontFace)return null;const e=cM(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let o=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(o+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${o}src:${t}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return(i=this._inspectFont)==null||i.call(this,this,t),r}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];let r;try{r=e.get(this.loadedName+"_path_"+t)}catch(o){Ce(`getPathGenerator - ignoring character: "${o}".`)}if(!Array.isArray(r)||r.length===0)return this.compiledGlyphs[t]=function(o,s){};const i=[];for(let o=0,s=r.length;o<s;)switch(r[o++]){case RU:{const[a,c,u,d,f,h]=r.slice(o,o+6);i.push(p=>p.bezierCurveTo(a,c,u,d,f,h)),o+=6}break;case $U:{const[a,c]=r.slice(o,o+2);i.push(u=>u.moveTo(a,c)),o+=2}break;case VU:{const[a,c]=r.slice(o,o+2);i.push(u=>u.lineTo(a,c)),o+=2}break;case FU:{const[a,c,u,d]=r.slice(o,o+4);i.push(f=>f.quadraticCurveTo(a,c,u,d)),o+=4}break;case jU:i.push(a=>a.restore());break;case zU:i.push(a=>a.save());break;case HU:xt(i.length===2,"Scale command is only valid at the third position.");break;case UU:{const[a,c,u,d,f,h]=r.slice(o,o+6);i.push(p=>p.transform(a,c,u,d,f,h)),o+=6}break;case ZU:{const[a,c]=r.slice(o,o+2);i.push(u=>u.translate(a,c)),o+=2}}return this.compiledGlyphs[t]=function(s,a){i[0](s),i[1](s),s.scale(a,-a);for(let c=2,u=i.length;c<u;c++)i[c](s)}}}if(cn){var L4=Promise.withResolvers(),d2=null;(async()=>{const n=await Promise.resolve().then(()=>Rf),e=await Promise.resolve().then(()=>Rf),t=await Promise.resolve().then(()=>Rf),r=await Promise.resolve().then(()=>Rf);let i,o;try{i=await Promise.resolve().then(()=>Rf)}catch{}try{o=await Promise.resolve().then(()=>Tfe)}catch{}return new Map(Object.entries({fs:n,http:e,https:t,url:r,canvas:i,path2d:o}))})().then(n=>{var e,t,r,i;if(d2=n,L4.resolve(),!globalThis.DOMMatrix){const o=(e=n.get("canvas"))==null?void 0:e.DOMMatrix;o?globalThis.DOMMatrix=o:Ce("Cannot polyfill `DOMMatrix`, rendering may be broken.")}if(!globalThis.Path2D){const o=(t=n.get("canvas"))==null?void 0:t.CanvasRenderingContext2D,s=(r=n.get("path2d"))==null?void 0:r.applyPath2DToCanvasRenderingContext,a=(i=n.get("path2d"))==null?void 0:i.Path2D;o&&s&&a?(s(o),globalThis.Path2D=a):Ce("Cannot polyfill `Path2D`, rendering may be broken.")}},n=>{Ce(`loadPackages: ${n}`),d2=new Map,L4.resolve()})}class ms{static get promise(){return L4.promise}static get(e){return d2==null?void 0:d2.get(e)}}const MM=function(n){return ms.get("fs").promises.readFile(n).then(e=>new Uint8Array(e))},Ya="Fill",B4="Stroke",f2="Shading";function R4(n,e){if(!e)return;const t=e[2]-e[0],r=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],t,r),n.clip(i)}class $4{getPattern(){St("Abstract method `getPattern` called.")}}class nZ extends $4{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;this._type==="axial"?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const r of this._colorStops)t.addColorStop(r[0],r[1]);return t}getPattern(e,t,r,i){let o;if(i===B4||i===Ya){const s=t.current.getClippedPathBoundingBox(i,ot(e))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,c=Math.ceil(s[3]-s[1])||1,u=t.cachedCanvases.getCanvas("pattern",a,c,!0),d=u.context;d.clearRect(0,0,d.canvas.width,d.canvas.height),d.beginPath(),d.rect(0,0,d.canvas.width,d.canvas.height),d.translate(-s[0],-s[1]),r=se.transform(r,[1,0,0,1,s[0],s[1]]),d.transform(...t.baseTransform),this.matrix&&d.transform(...this.matrix),R4(d,this._bbox),d.fillStyle=this._createGradient(d),d.fill(),o=e.createPattern(u.canvas,"no-repeat");const f=new DOMMatrix(r);o.setTransform(f)}else R4(e,this._bbox),o=this._createGradient(e);return o}}function V4(n,e,t,r,i,o,s,a){const c=e.coords,u=e.colors,d=n.data,f=4*n.width;let h;c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h),c[r+1]>c[i+1]&&(h=r,r=i,i=h,h=s,s=a,a=h),c[t+1]>c[r+1]&&(h=t,t=r,r=h,h=o,o=s,s=h);const p=(c[t]+e.offsetX)*e.scaleX,m=(c[t+1]+e.offsetY)*e.scaleY,y=(c[r]+e.offsetX)*e.scaleX,b=(c[r+1]+e.offsetY)*e.scaleY,w=(c[i]+e.offsetX)*e.scaleX,v=(c[i+1]+e.offsetY)*e.scaleY;if(m>=v)return;const k=u[o],C=u[o+1],T=u[o+2],S=u[s],A=u[s+1],D=u[s+2],I=u[a],P=u[a+1],O=u[a+2],_=Math.round(m),B=Math.round(v);let $,R,N,W,F,K,ae,de;for(let Q=_;Q<=B;Q++){if(Q<b){const ne=Q<m?0:(m-Q)/(m-b);$=p-(p-y)*ne,R=k-(k-S)*ne,N=C-(C-A)*ne,W=T-(T-D)*ne}else{let ne;ne=Q>v?1:b===v?0:(b-Q)/(b-v),$=y-(y-w)*ne,R=S-(S-I)*ne,N=A-(A-P)*ne,W=D-(D-O)*ne}let Z;Z=Q<m?0:Q>v?1:(m-Q)/(m-v),F=p-(p-w)*Z,K=k-(k-I)*Z,ae=C-(C-P)*Z,de=T-(T-O)*Z;const H=Math.round(Math.min($,F)),j=Math.round(Math.max($,F));let q=f*Q+4*H;for(let ne=H;ne<=j;ne++)Z=($-ne)/($-F),Z<0?Z=0:Z>1&&(Z=1),d[q++]=R-(R-K)*Z|0,d[q++]=N-(N-ae)*Z|0,d[q++]=W-(W-de)*Z|0,d[q++]=255}}function rZ(n,e,t){const r=e.coords,i=e.colors;let o,s;switch(e.type){case"lattice":const a=e.verticesPerRow,c=Math.floor(r.length/a)-1,u=a-1;for(o=0;o<c;o++){let d=o*a;for(let f=0;f<u;f++,d++)V4(n,t,r[d],r[d+1],r[d+a],i[d],i[d+1],i[d+a]),V4(n,t,r[d+a+1],r[d+1],r[d+a],i[d+a+1],i[d+1],i[d+a])}break;case"triangles":for(o=0,s=r.length;o<s;o+=3)V4(n,t,r[o],r[o+1],r[o+2],i[o],i[o+1],i[o+2]);break;default:throw new Error("illegal figure")}}class iZ extends $4{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-i,a=Math.ceil(this._bounds[3])-o,c=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),u=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),d=s/c,f=a/u,h={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/d,scaleY:1/f},p=c+4,m=u+4,y=r.getCanvas("mesh",p,m,!1),b=y.context,w=b.createImageData(c,u);if(t){const v=w.data;for(let k=0,C=v.length;k<C;k+=4)v[k]=t[0],v[k+1]=t[1],v[k+2]=t[2],v[k+3]=255}for(const v of this._figures)rZ(w,v,h);return b.putImageData(w,2,2),{canvas:y.canvas,offsetX:i-2*d,offsetY:o-2*f,scaleX:d,scaleY:f}}getPattern(e,t,r,i){R4(e,this._bbox);let o;if(i===f2)o=se.singularValueDecompose2dScale(ot(e));else if(o=se.singularValueDecompose2dScale(t.baseTransform),this.matrix){const a=se.singularValueDecompose2dScale(this.matrix);o=[o[0]*a[0],o[1]*a[1]]}const s=this._createMeshCanvas(o,i===f2?null:this._background,t.cachedCanvases);return i!==f2&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class oZ extends $4{getPattern(){return"hotpink"}}const sZ=1,aZ=2,H3=class H3{constructor(e,t,r,i,o){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=i,this.baseTransform=o}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,i=this.xstep,o=this.ystep,s=this.paintType,a=this.tilingType,c=this.color,u=this.canvasGraphicsFactory;nm("TilingType: "+a);const d=r[0],f=r[1],h=r[2],p=r[3],m=se.singularValueDecompose2dScale(this.matrix),y=se.singularValueDecompose2dScale(this.baseTransform),b=[m[0]*y[0],m[1]*y[1]],w=this.getSizeAndScale(i,this.ctx.canvas.width,b[0]),v=this.getSizeAndScale(o,this.ctx.canvas.height,b[1]),k=e.cachedCanvases.getCanvas("pattern",w.size,v.size,!0),C=k.context,T=u.createCanvasGraphics(C);T.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(T,s,c);let S=d,A=f,D=h,I=p;return d<0&&(S=0,D+=Math.abs(d)),f<0&&(A=0,I+=Math.abs(f)),C.translate(-w.scale*S,-v.scale*A),T.transform(w.scale,0,0,v.scale,0,0),C.save(),this.clipBbox(T,S,A,D,I),T.baseTransform=ot(T.ctx),T.executeOperatorList(t),T.endDrawing(),{canvas:k.canvas,scaleX:w.scale,scaleY:v.scale,offsetX:S,offsetY:A}}getSizeAndScale(e,t,r){e=Math.abs(e);const i=Math.max(H3.MAX_PATTERN_SIZE,t);let o=Math.ceil(e*r);return o>=i?o=i:r=o/e,{scale:r,size:o}}clipBbox(e,t,r,i,o){const s=i-t,a=o-r;e.ctx.rect(t,r,s,a),e.current.updateRectMinMax(ot(e.ctx),[t,r,i,o]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const i=e.ctx,o=e.current;switch(t){case sZ:const s=this.ctx;i.fillStyle=s.fillStyle,i.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case aZ:const a=se.makeHexColor(r[0],r[1],r[2]);i.fillStyle=a,i.strokeStyle=a,o.fillColor=a,o.strokeColor=a;break;default:throw new LU(`Unsupported paint type: ${t}`)}}getPattern(e,t,r,i){let o=r;i!==f2&&(o=se.transform(o,t.baseTransform),this.matrix&&(o=se.transform(o,this.matrix)));const s=this.createPatternCanvas(t);let a=new DOMMatrix(o);a=a.translate(s.offsetX,s.offsetY),a=a.scale(1/s.scaleX,1/s.scaleY);const c=e.createPattern(s.canvas,"repeat");return c.setTransform(a),c}};pe(H3,"MAX_PATTERN_SIZE",3e3);let F4=H3;function lZ({src:n,srcPos:e=0,dest:t,width:r,height:i,nonBlackColor:o=4294967295,inverseDecode:s=!1}){const a=Bn.isLittleEndian?4278190080:255,[c,u]=s?[o,a]:[a,o],d=r>>3,f=7&r,h=n.length;t=new Uint32Array(t.buffer);let p=0;for(let m=0;m<i;m++){for(const b=e+d;e<b;e++){const w=e<h?n[e]:255;t[p++]=128&w?u:c,t[p++]=64&w?u:c,t[p++]=32&w?u:c,t[p++]=16&w?u:c,t[p++]=8&w?u:c,t[p++]=4&w?u:c,t[p++]=2&w?u:c,t[p++]=1&w?u:c}if(f===0)continue;const y=e<h?n[e++]:255;for(let b=0;b<f;b++)t[p++]=y&1<<7-b?u:c}return{srcPos:e,destPos:p}}const Rn=16;class cZ{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let i;return this.cache[e]!==void 0?(i=this.cache[e],this.canvasFactory.reset(i,t,r)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function cm(n,e,t,r,i,o,s,a,c,u){const[d,f,h,p,m,y]=ot(n);if(f===0&&h===0){const b=s*d+m,w=Math.round(b),v=a*p+y,k=Math.round(v),C=(s+c)*d+m,T=Math.abs(Math.round(C)-w)||1,S=(a+u)*p+y,A=Math.abs(Math.round(S)-k)||1;return n.setTransform(Math.sign(d),0,0,Math.sign(p),w,k),n.drawImage(e,t,r,i,o,0,0,T,A),n.setTransform(d,f,h,p,m,y),[T,A]}if(d===0&&p===0){const b=a*h+m,w=Math.round(b),v=s*f+y,k=Math.round(v),C=(a+u)*h+m,T=Math.abs(Math.round(C)-w)||1,S=(s+c)*f+y,A=Math.abs(Math.round(S)-k)||1;return n.setTransform(0,Math.sign(f),Math.sign(h),0,w,k),n.drawImage(e,t,r,i,o,0,0,A,T),n.setTransform(d,f,h,p,m,y),[A,T]}return n.drawImage(e,t,r,i,o,s,a,c,u),[Math.hypot(d,f)*c,Math.hypot(h,p)*u]}class EM{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=oM,this.textMatrixScale=1,this.fontMatrix=g4,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=Xp,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=se.applyTransform([t,r],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,t){const r=se.applyTransform(t,e),i=se.applyTransform(t.slice(2),e),o=se.applyTransform([t[0],t[3]],e),s=se.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,r[0],i[0],o[0],s[0]),this.minY=Math.min(this.minY,r[1],i[1],o[1],s[1]),this.maxX=Math.max(this.maxX,r[0],i[0],o[0],s[0]),this.maxY=Math.max(this.maxY,r[1],i[1],o[1],s[1])}updateScalingPathMinMax(e,t){se.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,i,o,s,a,c,u,d){const f=se.bezierBoundingBox(t,r,i,o,s,a,c,u,d);d||this.updateRectMinMax(e,f)}getPathBoundingBox(e=Ya,t=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(e===B4){t||St("Stroke bounding box must include transform.");const i=se.singularValueDecompose2dScale(t),o=i[0]*this.lineWidth/2,s=i[1]*this.lineWidth/2;r[0]-=o,r[1]-=s,r[2]+=o,r[3]+=s}return r}updateClipFromPath(){const e=se.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=Ya,t=null){return se.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function AM(n,e){if(typeof ImageData<"u"&&e instanceof ImageData){n.putImageData(e,0,0);return}const t=e.height,r=e.width,i=t%Rn,o=(t-i)/Rn,s=i===0?o:o+1,a=n.createImageData(r,Rn);let c,u=0;const d=e.data,f=a.data;let h,p,m,y;if(e.kind===Jp.GRAYSCALE_1BPP){const b=d.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),v=w.length,k=r+7>>3,C=4294967295,T=Bn.isLittleEndian?4278190080:255;for(h=0;h<s;h++){for(m=h<o?Rn:i,c=0,p=0;p<m;p++){const S=b-u;let A=0;const D=S>k?r:8*S-7,I=-8&D;let P=0,O=0;for(;A<I;A+=8)O=d[u++],w[c++]=128&O?C:T,w[c++]=64&O?C:T,w[c++]=32&O?C:T,w[c++]=16&O?C:T,w[c++]=8&O?C:T,w[c++]=4&O?C:T,w[c++]=2&O?C:T,w[c++]=1&O?C:T;for(;A<D;A++)P===0&&(O=d[u++],P=128),w[c++]=O&P?C:T,P>>=1}for(;c<v;)w[c++]=0;n.putImageData(a,0,h*Rn)}}else if(e.kind===Jp.RGBA_32BPP){for(p=0,y=r*Rn*4,h=0;h<o;h++)f.set(d.subarray(u,u+y)),u+=y,n.putImageData(a,0,p),p+=Rn;h<s&&(y=r*i*4,f.set(d.subarray(u,u+y)),n.putImageData(a,0,p))}else{if(e.kind!==Jp.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(m=Rn,y=r*m,h=0;h<s;h++){for(h>=o&&(m=i,y=r*m),c=0,p=y;p--;)f[c++]=d[u++],f[c++]=d[u++],f[c++]=d[u++],f[c++]=255;n.putImageData(a,0,h*Rn)}}}function TM(n,e){if(e.bitmap){n.drawImage(e.bitmap,0,0);return}const t=e.height,r=e.width,i=t%Rn,o=(t-i)/Rn,s=i===0?o:o+1,a=n.createImageData(r,Rn);let c=0;const u=e.data,d=a.data;for(let f=0;f<s;f++){const h=f<o?Rn:i;({srcPos:c}=lZ({src:u,srcPos:c,dest:d,width:r,height:h,nonBlackColor:0})),n.putImageData(a,0,f*Rn)}}function h2(n,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of t)n[r]!==void 0&&(e[r]=n[r]);n.setLineDash!==void 0&&(e.setLineDash(n.getLineDash()),e.lineDashOffset=n.lineDashOffset)}function um(n){if(n.strokeStyle=n.fillStyle="#000000",n.fillRule="nonzero",n.globalAlpha=1,n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=10,n.globalCompositeOperation="source-over",n.font="10px sans-serif",n.setLineDash!==void 0&&(n.setLineDash([]),n.lineDashOffset=0),!cn){const{filter:e}=n;e!=="none"&&e!==""&&(n.filter="none")}}function xM(n,e){if(e)return!0;const t=se.singularValueDecompose2dScale(n);t[0]=Math.fround(t[0]),t[1]=Math.fround(t[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*hs.PDF_TO_CSS_UNITS);return t[0]<=r&&t[1]<=r}const uZ=["butt","round","square"],dZ=["miter","round","bevel"],fZ={},IM={},nv=class nv{constructor(e,t,r,i,o,{optionalContentConfig:s,markedContentStack:a=null},c,u){M(this,kh);M(this,Sh);this.ctx=e,this.current=new EM(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=i,this.filterFactory=o,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=s,this.cachedCanvases=new cZ(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=u,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return typeof e=="string"?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:r=!1,background:i=null}){const o=this.ctx.canvas.width,s=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,o,s),this.ctx.fillStyle=a,r){const c=this.cachedCanvases.getCanvas("transparent",o,s);this.compositeCtx=this.ctx,this.transparentCanvas=c.canvas,this.ctx=c.context,this.ctx.save(),this.ctx.transform(...ot(this.compositeCtx))}this.ctx.save(),um(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=ot(this.ctx)}executeOperatorList(e,t,r,i){const o=e.argsArray,s=e.fnArray;let a=t||0;const c=o.length;if(c===a)return a;const u=c-a>10&&typeof r=="function",d=u?Date.now()+15:0;let f=0;const h=this.commonObjs,p=this.objs;let m;for(;;){if(i!==void 0&&a===i.nextBreakPoint)return i.breakIt(a,r),a;if(m=s[a],m!==Zr.dependency)this[m].apply(this,o[a]);else for(const y of o[a]){const b=y.startsWith("g_")?h:p;if(!b.has(y))return b.get(y,r),a}if(a++,a===c)return a;if(u&&++f>10){if(Date.now()>d)return r(),a;f=0}}}endDrawing(){x(this,kh,Mv).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),x(this,Sh,Ev).call(this)}_scaleImage(e,t){const r=e.width,i=e.height;let o,s,a=Math.max(Math.hypot(t[0],t[1]),1),c=Math.max(Math.hypot(t[2],t[3]),1),u=r,d=i,f="prescale1";for(;a>2&&u>1||c>2&&d>1;){let h=u,p=d;a>2&&u>1&&(h=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u/2),a/=u/h),c>2&&d>1&&(p=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d)/2,c/=d/p),o=this.cachedCanvases.getCanvas(f,h,p),s=o.context,s.clearRect(0,0,h,p),s.drawImage(e,0,0,u,d,0,0,h,p),e=o.canvas,u=h,d=p,f=f==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:u,paintHeight:d}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:i}=e,o=this.current.fillColor,s=this.current.patternFill,a=ot(t);let c,u,d,f;if((e.bitmap||e.data)&&e.count>1){const D=e.bitmap||e.data.buffer;u=JSON.stringify(s?a:[a.slice(0,4),o]),c=this._cachedBitmapsMap.get(D),c||(c=new Map,this._cachedBitmapsMap.set(D,c));const I=c.get(u);if(I&&!s)return{canvas:I,offsetX:Math.round(Math.min(a[0],a[2])+a[4]),offsetY:Math.round(Math.min(a[1],a[3])+a[5])};d=I}d||(f=this.cachedCanvases.getCanvas("maskCanvas",r,i),TM(f.context,e));let h=se.transform(a,[1/r,0,0,-1/i,0,0]);h=se.transform(h,[1,0,0,1,0,-i]);const[p,m,y,b]=se.getAxialAlignedBoundingBox([0,0,r,i],h),w=Math.round(y-p)||1,v=Math.round(b-m)||1,k=this.cachedCanvases.getCanvas("fillCanvas",w,v),C=k.context,T=p,S=m;C.translate(-T,-S),C.transform(...h),d||(d=this._scaleImage(f.canvas,co(C)),d=d.img,c&&s&&c.set(u,d)),C.imageSmoothingEnabled=xM(ot(C),e.interpolate),cm(C,d,0,0,d.width,d.height,0,0,r,i),C.globalCompositeOperation="source-in";const A=se.transform(co(C),[1,0,0,1,-T,-S]);return C.fillStyle=s?o.getPattern(t,this,A,Ya):o,C.fillRect(0,0,r,i),c&&!s&&(this.cachedCanvases.delete("fillCanvas"),c.set(u,k.canvas)),{canvas:k.canvas,offsetX:Math.round(T),offsetY:Math.round(S)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=uZ[e]}setLineJoin(e){this.ctx.lineJoin=dZ[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=r;break;case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r;break;case"BM":this.ctx.globalCompositeOperation=r;break;case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(r,e,t);this.suspendedCtx=this.ctx,this.ctx=i.context;const o=this.ctx;o.setTransform(...ot(this.suspendedCtx)),h2(this.suspendedCtx,o),function(a,c){if(a._removeMirroring)throw new Error("Context is already forwarding operations.");a.__originalSave=a.save,a.__originalRestore=a.restore,a.__originalRotate=a.rotate,a.__originalScale=a.scale,a.__originalTranslate=a.translate,a.__originalTransform=a.transform,a.__originalSetTransform=a.setTransform,a.__originalResetTransform=a.resetTransform,a.__originalClip=a.clip,a.__originalMoveTo=a.moveTo,a.__originalLineTo=a.lineTo,a.__originalBezierCurveTo=a.bezierCurveTo,a.__originalRect=a.rect,a.__originalClosePath=a.closePath,a.__originalBeginPath=a.beginPath,a._removeMirroring=()=>{a.save=a.__originalSave,a.restore=a.__originalRestore,a.rotate=a.__originalRotate,a.scale=a.__originalScale,a.translate=a.__originalTranslate,a.transform=a.__originalTransform,a.setTransform=a.__originalSetTransform,a.resetTransform=a.__originalResetTransform,a.clip=a.__originalClip,a.moveTo=a.__originalMoveTo,a.lineTo=a.__originalLineTo,a.bezierCurveTo=a.__originalBezierCurveTo,a.rect=a.__originalRect,a.closePath=a.__originalClosePath,a.beginPath=a.__originalBeginPath,delete a._removeMirroring},a.save=function(){c.save(),this.__originalSave()},a.restore=function(){c.restore(),this.__originalRestore()},a.translate=function(d,f){c.translate(d,f),this.__originalTranslate(d,f)},a.scale=function(d,f){c.scale(d,f),this.__originalScale(d,f)},a.transform=function(d,f,h,p,m,y){c.transform(d,f,h,p,m,y),this.__originalTransform(d,f,h,p,m,y)},a.setTransform=function(d,f,h,p,m,y){c.setTransform(d,f,h,p,m,y),this.__originalSetTransform(d,f,h,p,m,y)},a.resetTransform=function(){c.resetTransform(),this.__originalResetTransform()},a.rotate=function(d){c.rotate(d),this.__originalRotate(d)},a.clip=function(d){c.clip(d),this.__originalClip(d)},a.moveTo=function(u,d){c.moveTo(u,d),this.__originalMoveTo(u,d)},a.lineTo=function(u,d){c.lineTo(u,d),this.__originalLineTo(u,d)},a.bezierCurveTo=function(u,d,f,h,p,m){c.bezierCurveTo(u,d,f,h,p,m),this.__originalBezierCurveTo(u,d,f,h,p,m)},a.rect=function(u,d,f,h){c.rect(u,d,f,h),this.__originalRect(u,d,f,h)},a.closePath=function(){c.closePath(),this.__originalClosePath()},a.beginPath=function(){c.beginPath(),this.__originalBeginPath()}}(o,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(),h2(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,t,this.ctx,e),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(e,t,r,i){const o=i[0],s=i[1],a=i[2]-o,c=i[3]-s;a!==0&&c!==0&&(this.genericComposeSMask(t.context,r,a,c,t.subtype,t.backdrop,t.transferMap,o,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}genericComposeSMask(e,t,r,i,o,s,a,c,u,d,f){let h=e.canvas,p=c-d,m=u-f;if(s){if(p<0||m<0||p+r>h.width||m+i>h.height){const b=this.cachedCanvases.getCanvas("maskExtension",r,i),w=b.context;w.drawImage(h,-p,-m),s.some(v=>v!==0)&&(w.globalCompositeOperation="destination-atop",w.fillStyle=se.makeHexColor(...s),w.fillRect(0,0,r,i),w.globalCompositeOperation="source-over"),h=b.canvas,p=m=0}else if(s.some(b=>b!==0)){e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(p,m,r,i),e.clip(b),e.globalCompositeOperation="destination-atop",e.fillStyle=se.makeHexColor(...s),e.fillRect(p,m,r,i),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),o==="Alpha"&&a?t.filter=this.filterFactory.addAlphaFilter(a):o==="Luminosity"&&(t.filter=this.filterFactory.addLuminosityFilter(a));const y=new Path2D;y.rect(c,u,r,i),t.clip(y),t.globalCompositeOperation="destination-in",t.drawImage(h,p,m,r,i,c,u,r,i),t.restore()}save(){this.inSMaskMode?(h2(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),h2(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,i,o,s){this.ctx.transform(e,t,r,i,o,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const i=this.ctx,o=this.current;let s,a,c=o.x,u=o.y;const d=ot(i),f=d[0]===0&&d[3]===0||d[1]===0&&d[2]===0,h=f?r.slice(0):null;for(let p=0,m=0,y=e.length;p<y;p++)switch(0|e[p]){case Zr.rectangle:c=t[m++],u=t[m++];const b=t[m++],w=t[m++],v=c+b,k=u+w;i.moveTo(c,u),b===0||w===0?i.lineTo(v,k):(i.lineTo(v,u),i.lineTo(v,k),i.lineTo(c,k)),f||o.updateRectMinMax(d,[c,u,v,k]),i.closePath();break;case Zr.moveTo:c=t[m++],u=t[m++],i.moveTo(c,u),f||o.updatePathMinMax(d,c,u);break;case Zr.lineTo:c=t[m++],u=t[m++],i.lineTo(c,u),f||o.updatePathMinMax(d,c,u);break;case Zr.curveTo:s=c,a=u,c=t[m+4],u=t[m+5],i.bezierCurveTo(t[m],t[m+1],t[m+2],t[m+3],c,u),o.updateCurvePathMinMax(d,s,a,t[m],t[m+1],t[m+2],t[m+3],c,u,h),m+=6;break;case Zr.curveTo2:s=c,a=u,i.bezierCurveTo(c,u,t[m],t[m+1],t[m+2],t[m+3]),o.updateCurvePathMinMax(d,s,a,c,u,t[m],t[m+1],t[m+2],t[m+3],h),c=t[m+2],u=t[m+3],m+=4;break;case Zr.curveTo3:s=c,a=u,c=t[m+2],u=t[m+3],i.bezierCurveTo(t[m],t[m+1],c,u,c,u),o.updateCurvePathMinMax(d,s,a,t[m],t[m+1],c,u,c,u,h),m+=4;break;case Zr.closePath:i.closePath()}f&&o.updateScalingPathMinMax(d,h),o.setCurrentPoint(c,u)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,r=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof r=="object"&&(r!=null&&r.getPattern)?(t.save(),t.strokeStyle=r.getPattern(t,this,co(t),B4),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,r=this.current.fillColor;let i=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,co(t),Ya),i=!0);const o=this.current.getClippedPathBoundingBox();this.contentVisible&&o!==null&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(o)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=fZ}eoClip(){this.pendingClip=IM}beginText(){this.current.textMatrix=oM,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(e!==void 0){t.save(),t.beginPath();for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){var d;const r=this.commonObjs.get(e),i=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(i.fontMatrix=r.fontMatrix||g4,i.fontMatrix[0]!==0&&i.fontMatrix[3]!==0||Ce("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;const o=r.loadedName||"sans-serif",s=((d=r.systemFontInfo)==null?void 0:d.css)||`"${o}", ${r.fallbackName}`;let a="normal";r.black?a="900":r.bold&&(a="bold");const c=r.italic?"italic":"normal";let u=t;t<16?u=16:t>100&&(u=100),this.current.fontSizeScale=t/u,this.ctx.font=`${c} ${a} ${u}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,i,o,s){this.current.textMatrix=[e,t,r,i,o,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,i){const o=this.ctx,s=this.current,a=s.font,c=s.textRenderingMode,u=s.fontSize/s.fontSizeScale,d=c&sM,f=!!(c&lU),h=s.patternFill&&!a.missingFile;let p;(a.disableFontFace||f||h)&&(p=a.getPathGenerator(this.commonObjs,e)),a.disableFontFace||h?(o.save(),o.translate(t,r),o.beginPath(),p(o,u),i&&o.setTransform(...i),d!==Xp&&d!==a2||o.fill(),d!==w4&&d!==a2||o.stroke(),o.restore()):(d!==Xp&&d!==a2||o.fillText(e,t,r),d!==w4&&d!==a2||o.strokeText(e,t,r)),f&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:ot(o),x:t,y:r,fontSize:u,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let r=!1;for(let i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){r=!0;break}return Ie(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);const i=t.fontSize;if(i===0)return;const o=this.ctx,s=t.fontSizeScale,a=t.charSpacing,c=t.wordSpacing,u=t.fontDirection,d=t.textHScale*u,f=e.length,h=r.vertical,p=h?1:-1,m=r.defaultVMetrics,y=i*t.fontMatrix[0],b=t.textRenderingMode===Xp&&!r.disableFontFace&&!t.patternFill;o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),u>0?o.scale(d,-1):o.scale(d,1);let w;if(t.patternFill){o.save();const S=t.fillColor.getPattern(o,this,co(o),Ya);w=ot(o),o.restore(),o.fillStyle=S}let v=t.lineWidth;const k=t.textMatrixScale;if(k===0||v===0){const S=t.textRenderingMode&sM;S!==w4&&S!==a2||(v=this.getSinglePixelWidth())}else v/=k;if(s!==1&&(o.scale(s,s),v/=s),o.lineWidth=v,r.isInvalidPDFjsFont){const S=[];let A=0;for(const D of e)S.push(D.unicode),A+=D.width;o.fillText(S.join(""),0,0),t.x+=A*y*d,o.restore(),this.compose();return}let C,T=0;for(C=0;C<f;++C){const S=e[C];if(typeof S=="number"){T+=p*S*i/1e3;continue}let A=!1;const D=(S.isSpace?c:0)+a,I=S.fontChar,P=S.accent;let O,_,B=S.width;if(h){const $=S.vmetric||m,R=-(S.vmetric?$[1]:.5*B)*y,N=$[2]*y;B=$?-$[0]:B,O=R/s,_=(T+N)/s}else O=T/s,_=0;if(r.remeasure&&B>0){const $=1e3*o.measureText(I).width/i*s;if(B<$&&this.isFontSubpixelAAEnabled){const R=B/$;A=!0,o.save(),o.scale(R,1),O/=R}else B!==$&&(O+=(B-$)/2e3*i/s)}if(this.contentVisible&&(S.isInFont||r.missingFile)){if(b&&!P)o.fillText(I,O,_);else if(this.paintChar(I,O,_,w),P){const $=O+i*P.offset.x/s,R=_-i*P.offset.y/s;this.paintChar(P.fontChar,$,R,w)}}T+=h?B*y-D*u:B*y+D*u,A&&o.restore()}h?t.y-=T:t.x+=T*d,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,i=r.font,o=r.fontSize,s=r.fontDirection,a=i.vertical?1:-1,c=r.charSpacing,u=r.wordSpacing,d=r.textHScale*s,f=r.fontMatrix||g4,h=e.length;let p,m,y,b;if(r.textRenderingMode!==aU&&o!==0){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(d,s),p=0;p<h;++p){if(m=e[p],typeof m=="number"){b=a*m*o/1e3,this.ctx.translate(b,0),r.x+=b*d;continue}const w=(m.isSpace?u:0)+c,v=i.charProcOperatorList[m.operatorListId];if(!v){Ce(`Type3 character "${m.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=m,this.save(),t.scale(o,o),t.transform(...f),this.executeOperatorList(v),this.restore()),y=se.applyTransform([m.width,0],f)[0]*o+w,t.translate(y,0),r.x+=y*d}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,i,o,s){this.ctx.rect(r,i,o-r,s-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if(e[0]==="TilingPattern"){const r=e[1],i=this.baseTransform||ot(this.ctx),o={createCanvasGraphics:s=>new nv(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new F4(e,r,this.ctx,o,i)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){this.ctx.strokeStyle=this.current.strokeColor=se.makeHexColor(e,t,r)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(e,t,r){this.ctx.fillStyle=this.current.fillColor=se.makeHexColor(e,t,r),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let r;return this.cachedPatterns.has(e)?r=this.cachedPatterns.get(e):(r=function(o){switch(o[0]){case"RadialAxial":return new nZ(o);case"Mesh":return new iZ(o);case"Dummy":return new oZ}throw new Error(`Unknown IR type: ${o[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,r)),t&&(r.matrix=t),r}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,co(t),f2);const i=co(t);if(i){const{width:o,height:s}=t.canvas,[a,c,u,d]=se.getAxialAlignedBoundingBox([0,0,o,s],i);this.ctx.fillRect(a,c,u-a,d-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){St("Should not call beginInlineImage")}beginImageData(){St("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=ot(this.ctx),t)){const r=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],r,i),this.current.updateRectMinMax(ot(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||nm("TODO: Support non-isolated groups."),e.knockout&&Ce("Knockout groups not supported.");const r=ot(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=se.getAxialAlignedBoundingBox(e.bbox,ot(t));const o=[0,0,t.canvas.width,t.canvas.height];i=se.intersect(i,o)||[0,0,0,0];const s=Math.floor(i[0]),a=Math.floor(i[1]),c=Math.max(Math.ceil(i[2])-s,1),u=Math.max(Math.ceil(i[3])-a,1);this.current.startNewPathAndClipBox([0,0,c,u]);let d="groupAt"+this.groupLevel;e.smask&&(d+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(d,c,u),h=f.context;h.translate(-s,-a),h.transform(...r),e.smask?this.smaskStack.push({canvas:f.canvas,context:h,offsetX:s,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,a),t.save()),h2(t,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=ot(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const o=se.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],i);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(o)}}beginAnnotation(e,t,r,i,o){if(x(this,kh,Mv).call(this),um(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const s=t[2]-t[0],a=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=s,t[3]=a;const[c,u]=se.singularValueDecompose2dScale(ot(this.ctx)),{viewportScale:d}=this,f=Math.ceil(s*this.outputScaleX*d),h=Math.ceil(a*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(f,h);const{canvas:p,context:m}=this.annotationCanvas;this.annotationCanvasMap.set(e,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.save(),this.ctx.setTransform(c,0,0,-u,0,a*u),um(this.ctx)}else um(this.ctx),this.ctx.rect(t[0],t[1],s,a),this.ctx.clip(),this.endPath()}this.current=new EM(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),x(this,Sh,Ev).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const r=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=function(c){const{width:u,height:d}=c;if(u>1e3||d>1e3)return null;const f=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=u+1;let p,m,y,b=new Uint8Array(h*(d+1));const w=u+7&-8;let v=new Uint8Array(w*d),k=0;for(const A of c.data){let D=128;for(;D>0;)v[k++]=A&D?0:255,D>>=1}let C=0;for(k=0,v[k]!==0&&(b[0]=1,++C),m=1;m<u;m++)v[k]!==v[k+1]&&(b[m]=v[k]?2:1,++C),k++;for(v[k]!==0&&(b[m]=2,++C),p=1;p<d;p++){k=p*w,y=p*h,v[k-w]!==v[k]&&(b[y]=v[k]?1:8,++C);let A=(v[k]?4:0)+(v[k-w]?8:0);for(m=1;m<u;m++)A=(A>>2)+(v[k+1]?4:0)+(v[k-w+1]?8:0),f[A]&&(b[y+m]=f[A],++C),k++;if(v[k-w]!==v[k]&&(b[y+m]=v[k]?2:4,++C),C>1e3)return null}for(k=w*(d-1),y=p*h,v[k]!==0&&(b[y]=8,++C),m=1;m<u;m++)v[k]!==v[k+1]&&(b[y+m]=v[k]?4:8,++C),k++;if(v[k]!==0&&(b[y+m]=4,++C),C>1e3)return null;const T=new Int32Array([0,h,-1,0,-h,0,0,0,1]),S=new Path2D;for(p=0;C&&p<=d;p++){let A=p*h;const D=A+u;for(;A<D&&!b[A];)A++;if(A===D)continue;S.moveTo(A%h,p);const I=A;let P=b[A];do{const O=T[P];do A+=O;while(!b[A]);const _=b[A];_!==5&&_!==10?(P=_,b[A]=0):(P=_&51*P>>4,b[A]&=P>>2|P<<2),S.lineTo(A%h,A/h|0),b[A]||--C}while(I!==A);--p}return v=null,b=null,function(A){A.save(),A.scale(1/u,-1/d),A.translate(0,-d),A.fill(S),A.beginPath(),A.restore()}}(e)),i.compiled)){i.compiled(r);return}const o=this._createMaskCanvas(e),s=o.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(s,o.offsetX,o.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,r=0,i=0,o,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const c=ot(a);a.transform(t,r,i,o,0,0);const u=this._createMaskCanvas(e);a.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5]);for(let d=0,f=s.length;d<f;d+=2){const h=se.transform(c,[t,r,i,o,s[d],s[d+1]]),[p,m]=se.applyTransform([0,0],h);a.drawImage(u.canvas,p,m)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,r=this.current.fillColor,i=this.current.patternFill;for(const o of e){const{data:s,width:a,height:c,transform:u}=o,d=this.cachedCanvases.getCanvas("maskCanvas",a,c),f=d.context;f.save(),TM(f,this.getObject(s,o)),f.globalCompositeOperation="source-in",f.fillStyle=i?r.getPattern(f,this,co(t),Ya):r,f.fillRect(0,0,a,c),f.restore(),t.save(),t.transform(...u),t.scale(1,-1),cm(t,d.canvas,0,0,a,c,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):Ce("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,i){if(!this.contentVisible)return;const o=this.getObject(e);if(!o){Ce("Dependent image isn't ready yet");return}const s=o.width,a=o.height,c=[];for(let u=0,d=i.length;u<d;u+=2)c.push({transform:[t,0,0,r,i[u],i[u+1]],x:0,y:0,w:s,h:a});this.paintInlineImageXObjectGroup(o,c)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return e.bitmap;const{bitmap:t,width:r,height:i}=e,o=this.cachedCanvases.getCanvas("inlineImage",r,i),s=o.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",o.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,r=e.height,i=this.ctx;if(this.save(),!cn){const{filter:a}=i;a!=="none"&&a!==""&&(i.filter="none")}i.scale(1/t,-1/r);let o;if(e.bitmap)o=this.applyTransferMapsToBitmap(e);else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)o=e;else{const a=this.cachedCanvases.getCanvas("inlineImage",t,r).context;AM(a,e),o=this.applyTransferMapsToCanvas(a)}const s=this._scaleImage(o,co(i));i.imageSmoothingEnabled=xM(ot(i),e.interpolate),cm(i,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,t,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const r=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const o=e.width,s=e.height,a=this.cachedCanvases.getCanvas("inlineImage",o,s).context;AM(a,e),i=this.applyTransferMapsToCanvas(a)}for(const o of t)r.save(),r.transform(...o.transform),r.scale(1,-1),cm(r,i,o.x,o.y,o.w,o.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(t||(this.pendingClip===IM?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=ot(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:t,b:r,c:i,d:o}=this.ctx.getTransform();let s,a;if(r===0&&i===0){const c=Math.abs(t),u=Math.abs(o);if(c===u)if(e===0)s=a=1/c;else{const d=c*e;s=a=d<1?1/d:1}else if(e===0)s=1/c,a=1/u;else{const d=c*e,f=u*e;s=d<1?1/d:1,a=f<1?1/f:1}}else{const c=Math.abs(t*o-r*i),u=Math.hypot(t,r),d=Math.hypot(i,o);if(e===0)s=d/c,a=u/c;else{const f=e*c;s=d>f?d/f:1,a=u>f?u/f:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[i,o]=this.getScaleForStroking();if(t.lineWidth=r||1,i===1&&o===1){t.stroke();return}const s=t.getLineDash();if(e&&t.save(),t.scale(i,o),s.length>0){const a=Math.max(i,o);t.setLineDash(s.map(c=>c/a)),t.lineDashOffset/=a}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};kh=new WeakSet,Mv=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)},Sh=new WeakSet,Ev=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}};let tc=nv;for(const n in Zr)tc.prototype[n]!==void 0&&(tc.prototype[Zr[n]]=tc.prototype[n]);class uo{static get workerPort(){return g(this,Mh)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");E(this,Mh,e)}static get workerSrc(){return g(this,Eh)}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");E(this,Eh,e)}}Mh=new WeakMap,Eh=new WeakMap,M(uo,Mh,null),M(uo,Eh,"");const OM=1,DM=2,NM=1,j4=2,PM=3,_M=4,LM=5,BM=6,dm=7,z4=8;function Qn(n){switch(n instanceof Error||typeof n=="object"&&n!==null||St('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),n.name){case"AbortException":return new qa(n.message);case"MissingPDFException":return new Wa(n.message);case"PasswordException":return new C4(n.message,n.code);case"UnexpectedResponseException":return new rm(n.message,n.status);case"UnknownErrorException":return new k4(n.message,n.details);default:return new k4(n.message,n.toString())}}class p2{constructor(e,t,r){M(this,U3);M(this,Z3);M(this,ou);this.sourceName=e,this.targetName=t,this.comObj=r,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),this._onComObjOnMessage=i=>{const o=i.data;if(o.targetName!==this.sourceName)return;if(o.stream){x(this,Z3,MN).call(this,o);return}if(o.callback){const a=o.callbackId,c=this.callbackCapabilities[a];if(!c)throw new Error(`Cannot resolve callback ${a}`);if(delete this.callbackCapabilities[a],o.callback===OM)c.resolve(o.data);else{if(o.callback!==DM)throw new Error("Unexpected callback case");c.reject(Qn(o.reason))}return}const s=this.actionHandler[o.action];if(!s)throw new Error(`Unknown action from worker: ${o.action}`);if(o.callbackId){const a=this.sourceName,c=o.sourceName;new Promise(function(u){u(s(o.data))}).then(function(u){r.postMessage({sourceName:a,targetName:c,callback:OM,callbackId:o.callbackId,data:u})},function(u){r.postMessage({sourceName:a,targetName:c,callback:DM,callbackId:o.callbackId,reason:Qn(u)})})}else o.streamId?x(this,U3,SN).call(this,o):s(o.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const i=this.callbackId++,o=Promise.withResolvers();this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(s){o.reject(s)}return o.promise}sendWithStream(e,t,r,i){const o=this.streamId++,s=this.sourceName,a=this.targetName,c=this.comObj;return new ReadableStream({start:u=>{const d=Promise.withResolvers();return this.streamControllers[o]={controller:u,startCall:d,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:s,targetName:a,action:e,streamId:o,data:t,desiredSize:u.desiredSize},i),d.promise},pull:u=>{const d=Promise.withResolvers();return this.streamControllers[o].pullCall=d,c.postMessage({sourceName:s,targetName:a,stream:BM,streamId:o,desiredSize:u.desiredSize}),d.promise},cancel:u=>{xt(u instanceof Error,"cancel must have a valid reason");const d=Promise.withResolvers();return this.streamControllers[o].cancelCall=d,this.streamControllers[o].isClosed=!0,c.postMessage({sourceName:s,targetName:a,stream:NM,streamId:o,reason:Qn(u)}),d.promise}},r)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}U3=new WeakSet,SN=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this,a=this.actionHandler[e.action],c={enqueue(u,d=1,f){if(this.isCancelled)return;const h=this.desiredSize;this.desiredSize-=d,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:r,targetName:i,stream:_M,streamId:t,chunk:u},f)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:PM,streamId:t}),delete s.streamSinks[t])},error(u){xt(u instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:LM,streamId:t,reason:Qn(u)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise(function(u){u(a(e.data,c))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:z4,streamId:t,success:!0})},function(u){o.postMessage({sourceName:r,targetName:i,stream:z4,streamId:t,reason:Qn(u)})})},Z3=new WeakSet,MN=function(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,s=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case z4:e.success?s.startCall.resolve():s.startCall.reject(Qn(e.reason));break;case dm:e.success?s.pullCall.resolve():s.pullCall.reject(Qn(e.reason));break;case BM:if(!a){o.postMessage({sourceName:r,targetName:i,stream:dm,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise(function(c){var u;c((u=a.onPull)==null?void 0:u.call(a))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:dm,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:dm,streamId:t,reason:Qn(c)})});break;case _M:if(xt(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case PM:if(xt(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),x(this,ou,r5).call(this,s,t);break;case LM:xt(s,"error should have stream controller"),s.controller.error(Qn(e.reason)),x(this,ou,r5).call(this,s,t);break;case j4:e.success?s.cancelCall.resolve():s.cancelCall.reject(Qn(e.reason)),x(this,ou,r5).call(this,s,t);break;case NM:if(!a)break;new Promise(function(c){var u;c((u=a.onCancel)==null?void 0:u.call(a,Qn(e.reason)))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:j4,streamId:t,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:j4,streamId:t,reason:Qn(c)})}),a.sinkCapability.reject(Qn(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},ou=new WeakSet,r5=async function(e,t){var r,i,o;await Promise.allSettled([(r=e.startCall)==null?void 0:r.promise,(i=e.pullCall)==null?void 0:i.promise,(o=e.cancelCall)==null?void 0:o.promise]),delete this.streamControllers[t]};class hZ{constructor({parsedData:e,rawData:t}){M(this,zl,void 0);M(this,Ah,void 0);E(this,zl,e),E(this,Ah,t)}getRaw(){return g(this,Ah)}get(e){return g(this,zl).get(e)??null}getAll(){return S4(g(this,zl))}has(e){return g(this,zl).has(e)}}zl=new WeakMap,Ah=new WeakMap;const gs=Symbol("INTERNAL");class pZ{constructor(e,{name:t,intent:r,usage:i}){M(this,Th,!1);M(this,xh,!1);M(this,Ih,!1);M(this,su,!0);E(this,Th,!!(e&b4)),E(this,xh,!!(e&Qp)),this.name=t,this.intent=r,this.usage=i}get visible(){if(g(this,Ih))return g(this,su);if(!g(this,su))return!1;const{print:e,view:t}=this.usage;return g(this,Th)?(t==null?void 0:t.viewState)!=="OFF":!g(this,xh)||(e==null?void 0:e.printState)!=="OFF"}_setVisible(e,t,r=!1){e!==gs&&St("Internal method `_setVisible` called."),E(this,Ih,r),E(this,su,t)}}Th=new WeakMap,xh=new WeakMap,Ih=new WeakMap,su=new WeakMap;class mZ{constructor(e,t=b4){M(this,Oh);M(this,na,null);M(this,Ke,new Map);M(this,au,null);M(this,lu,null);if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,E(this,lu,e.order);for(const r of e.groups)g(this,Ke).set(r.id,new pZ(t,r));if(e.baseState==="OFF")for(const r of g(this,Ke).values())r._setVisible(gs,!1);for(const r of e.on)g(this,Ke).get(r)._setVisible(gs,!0);for(const r of e.off)g(this,Ke).get(r)._setVisible(gs,!1);E(this,au,this.getHash())}}isVisible(e){if(g(this,Ke).size===0)return!0;if(!e)return nm("Optional content group not defined."),!0;if(e.type==="OCG")return g(this,Ke).has(e.id)?g(this,Ke).get(e.id).visible:(Ce(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return x(this,Oh,Av).call(this,e.expression);if(!e.policy||e.policy==="AnyOn"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(g(this,Ke).get(t).visible)return!0}return!1}if(e.policy==="AllOn"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(!g(this,Ke).get(t).visible)return!1}return!0}if(e.policy==="AnyOff"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(!g(this,Ke).get(t).visible)return!0}return!1}if(e.policy==="AllOff"){for(const t of e.ids){if(!g(this,Ke).has(t))return Ce(`Optional content group not found: ${t}`),!0;if(g(this,Ke).get(t).visible)return!1}return!0}return Ce(`Unknown optional content policy ${e.policy}.`),!0}return Ce(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){const r=g(this,Ke).get(e);r?(r._setVisible(gs,!!t,!0),E(this,na,null)):Ce(`Optional content group not found: ${e}`)}setOCGState({state:e,preserveRB:t}){let r;for(const i of e){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}const o=g(this,Ke).get(i);if(o)switch(r){case"ON":o._setVisible(gs,!0);break;case"OFF":o._setVisible(gs,!1);break;case"Toggle":o._setVisible(gs,!o.visible)}}E(this,na,null)}get hasInitialVisibility(){return g(this,au)===null||this.getHash()===g(this,au)}getOrder(){return g(this,Ke).size?g(this,lu)?g(this,lu).slice():[...g(this,Ke).keys()]:null}getGroups(){return g(this,Ke).size>0?S4(g(this,Ke)):null}getGroup(e){return g(this,Ke).get(e)||null}getHash(){if(g(this,na)!==null)return g(this,na);const e=new kM;for(const[t,r]of g(this,Ke))e.update(`${t}:${r.visible}`);return E(this,na,e.hexdigest())}}na=new WeakMap,Ke=new WeakMap,au=new WeakMap,lu=new WeakMap,Oh=new WeakSet,Av=function(e){const t=e.length;if(t<2)return!0;const r=e[0];for(let i=1;i<t;i++){const o=e[i];let s;if(Array.isArray(o))s=x(this,Oh,Av).call(this,o);else{if(!g(this,Ke).has(o))return Ce(`Optional content group not found: ${o}`),!0;s=g(this,Ke).get(o).visible}switch(r){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return r==="And"};class gZ{constructor(e,{disableRange:t=!1,disableStream:r=!1}){xt(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i,initialData:o,progressiveDone:s,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=a,(o==null?void 0:o.length)>0){const c=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(c)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!r,this._isRangeSupported=!t,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((c,u)=>{this._onReceiveData({begin:c,chunk:u})}),e.addProgressListener((c,u)=>{this._onProgress({loaded:c,total:u})}),e.addProgressiveReadListener(c=>{this._onReceiveData({chunk:c})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const r=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;e===void 0?this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r):xt(this._rangeReaders.some(function(i){return i._begin!==e?!1:(i._enqueue(r),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}_onProgress(e){var t,r,i,o;e.total===void 0?(r=(t=this._rangeReaders[0])==null?void 0:t.onProgress)==null||r.call(t,{loaded:e.loaded}):(o=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||o.call(i,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;(e=this._fullRequestReader)==null||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){xt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new yZ(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new bZ(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeReaders.slice(0))r.cancel(e);this._pdfDataRangeTransport.abort()}}class yZ{constructor(e,t,r=!1,i=null){this._stream=e,this._done=r||!1,this._filename=x4(i)?i:null,this._queuedChunks=t||[],this._loaded=0;for(const o of this._queuedChunks)this._loaded+=o.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.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 e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class bZ{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const t of this._requests)t.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 t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function H4({getResponseHeader:n,isHttp:e,rangeChunkSize:t,disableRange:r}){const i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(n("Content-Length"),10);return!Number.isInteger(o)||(i.suggestedLength=o,o<=2*t)||r||!e||n("Accept-Ranges")!=="bytes"||(n("Content-Encoding")||"identity")!=="identity"||(i.allowRangeRequests=!0),i}function U4(n){const e=n("Content-Disposition");if(e){let t=function(i){let o=!0,s=a("filename\\*","i").exec(i);if(s){s=s[1];let p=d(s);return p=unescape(p),p=f(p),p=h(p),u(p)}if(s=function(m){const y=[];let b;const w=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(b=w.exec(m))!==null;){let[,k,C,T]=b;if(k=parseInt(k,10),k in y){if(k===0)break}else y[k]=[C,T]}const v=[];for(let k=0;k<y.length&&k in y;++k){let[C,T]=y[k];T=d(T),C&&(T=unescape(T),k===0&&(T=f(T))),v.push(T)}return v.join("")}(i),s)return u(h(s));if(s=a("filename","i").exec(i),s){s=s[1];let p=d(s);return p=h(p),u(p)}function a(p,m){return new RegExp("(?:^|;)\\s*"+p+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',m)}function c(p,m){if(p){if(!/^[\x00-\xFF]+$/.test(m))return m;try{const y=new TextDecoder(p,{fatal:!0}),b=im(m);m=y.decode(b),o=!1}catch{}}return m}function u(p){return o&&/[\x80-\xff]/.test(p)&&(p=c("utf-8",p),o&&(p=c("iso-8859-1",p))),p}function d(p){if(p.startsWith('"')){const m=p.slice(1).split('\\"');for(let y=0;y<m.length;++y){const b=m[y].indexOf('"');b!==-1&&(m[y]=m[y].slice(0,b),m.length=y+1),m[y]=m[y].replaceAll(/\\(.)/g,"$1")}p=m.join('"')}return p}function f(p){const m=p.indexOf("'");return m===-1?p:c(p.slice(0,m),p.slice(m+1).replace(/^[^']*'/,""))}function h(p){return!p.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(p)?p:p.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(m,y,b,w){if(b==="q"||b==="Q")return c(y,w=(w=w.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(v,k){return String.fromCharCode(parseInt(k,16))}));try{w=atob(w)}catch{}return c(y,w)})}return""}(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(x4(t))return t}return null}function fm(n,e){return n===404||n===0&&e.startsWith("file:")?new Wa('Missing PDF "'+e+'".'):new rm(`Unexpected server response (${n}) while retrieving PDF "${e}".`,n)}function RM(n){return n===200||n===206}function $M(n,e,t){return{method:"GET",headers:n,signal:t.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function VM(n){const e=new Headers;for(const t in n){const r=n[t];r!==void 0&&e.append(t,r)}return e}function FM(n){return n instanceof Uint8Array?n.buffer:n instanceof ArrayBuffer?n:(Ce(`getArrayBuffer - unexpected data format: ${n}`),new Uint8Array(n).buffer)}class jM{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new wZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new vZ(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class wZ{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=VM(this._stream.httpHeaders);const r=t.url;fetch(r,$M(this._headers,this._withCredentials,this._abortController)).then(i=>{if(!RM(i.status))throw fm(i.status,r);this._reader=i.body.getReader(),this._headersCapability.resolve();const o=c=>i.headers.get(c),{allowRangeRequests:s,suggestedLength:a}=H4({getResponseHeader:o,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=U4(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new qa("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 r;await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded,total:this._contentLength}),{value:FM(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class vZ{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const i=e.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController,this._headers=VM(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const o=i.url;fetch(o,$M(this._headers,this._withCredentials,this._abortController)).then(s=>{if(!RM(s.status))throw fm(s.status,o);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var r;await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(r=this.onProgress)==null||r.call(this,{loaded:this._loaded}),{value:FM(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class CZ{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const i={begin:e,end:t};for(const o in r)i[o]=r[o];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,r=this.currXhrId++,i=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const o in this.httpHeaders){const s=this.httpHeaders[o];s!==void 0&&t.setRequestHeader(o,s)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.expectedStatus=206):i.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(o){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){var i;const r=this.pendingRequests[e];r&&((i=r.onProgress)==null||i.call(r,t))}onStateChange(e,t){var a,c,u;const r=this.pendingRequests[e];if(!r)return;const i=r.xhr;if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),i.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],i.status===0&&this.isHttp){(a=r.onError)==null||a.call(r,i.status);return}const o=i.status||200;if(!(o===200&&r.expectedStatus===206)&&o!==r.expectedStatus){(c=r.onError)==null||c.call(r,i.status);return}const s=function(f){const h=f.response;return typeof h!="string"?h:im(h).buffer}(i);if(o===206){const d=i.getResponseHeader("Content-Range"),f=/bytes (\d+)-(\d+)\/(\d+)/.exec(d);r.onDone({begin:parseInt(f[1],10),chunk:s})}else s?r.onDone({begin:0,chunk:s}):(u=r.onError)==null||u.call(r,i.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class kZ{constructor(e){this._source=e,this._manager=new CZ(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return xt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new SZ(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new MZ(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class SZ{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.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 e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=s=>t.getResponseHeader(s),{allowRangeRequests:i,suggestedLength:o}=H4({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=U4(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=fm(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;(t=this.onProgress)==null||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.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._headersReceivedCapability.promise}async read(){if(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 e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class MZ{constructor(e,t,r){this._manager=e;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,r,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;(e=this.onClosed)==null||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=fm(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||((t=this.onProgress)==null||t.call(this,{loaded:e.loaded}))}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const EZ=/^[a-z][a-z0-9\-+.]+:/i;function zM(n,e,t){return n.protocol==="http:"?ms.get("http").request(n,{headers:e},t):ms.get("https").request(n,{headers:e},t)}class AZ{constructor(e){this.source=e,this.url=function(r){if(EZ.test(r))return new URL(r);const i=ms.get("url");return new URL(i.pathToFileURL(r))}(e.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return xt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new IZ(this):new TZ(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new OZ(this,e,t):new xZ(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const r of this._rangeRequestReaders.slice(0))r.cancel(e)}}class HM{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}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 t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new qa("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class UM{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,(t=this.onProgress)==null||t.call(this,{loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class TZ extends HM{constructor(e){super(e),this._request=zM(this._url,e.httpHeaders,t=>{if(t.statusCode===404){const s=new Wa(`Missing PDF "${this._url}".`);this._storedError=s,this._headersCapability.reject(s);return}this._headersCapability.resolve(),this._setReadableStream(t);const r=s=>this._readableStream.headers[s.toLowerCase()],{allowRangeRequests:i,suggestedLength:o}=H4({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=o||this._contentLength,this._filename=U4(r)}),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class xZ extends UM{constructor(e,t,r){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const o=e.httpHeaders[i];o!==void 0&&(this._httpHeaders[i]=o)}this._httpHeaders.Range=`bytes=${t}-${r-1}`,this._request=zM(this._url,this._httpHeaders,i=>{if(i.statusCode!==404)this._setReadableStream(i);else{const o=new Wa(`Missing PDF "${this._url}".`);this._storedError=o}}),this._request.on("error",i=>{this._storedError=i}),this._request.end()}}class IZ extends HM{constructor(e){super(e);const t=ms.get("fs");t.promises.lstat(this._url).then(r=>{this._contentLength=r.size,this._setReadableStream(t.createReadStream(this._url)),this._headersCapability.resolve()},r=>{r.code==="ENOENT"&&(r=new Wa(`Missing PDF "${this._url}".`)),this._storedError=r,this._headersCapability.reject(r)})}}class OZ extends UM{constructor(e,t,r){super(e);const i=ms.get("fs");this._setReadableStream(i.createReadStream(this._url,{start:t,end:r-1}))}}const Xn=30,Wt=class Wt{constructor({textContentSource:e,container:t,viewport:r}){M(this,W3);M(this,q3);M(this,$h);M(this,ra,Promise.withResolvers());M(this,Wn,null);M(this,Dh,!1);M(this,Nh,!!((GD=globalThis.FontInspector)!=null&&GD.enabled));M(this,Hl,null);M(this,Oo,null);M(this,Ph,0);M(this,_h,0);M(this,Ul,null);M(this,cu,null);M(this,uu,0);M(this,ia,0);M(this,du,Object.create(null));M(this,Lh,[]);M(this,fu,null);M(this,Zl,[]);M(this,Bh,new WeakMap);M(this,Rh,null);var c;if(e instanceof ReadableStream)E(this,fu,e);else{if(typeof e!="object")throw new Error('No "textContentSource" parameter specified.');E(this,fu,new ReadableStream({start(u){u.enqueue(e),u.close()}}))}E(this,Wn,E(this,cu,t)),E(this,ia,r.scale*(globalThis.devicePixelRatio||1)),E(this,uu,r.rotation),E(this,Oo,{prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:o,pageX:s,pageY:a}=r.rawDims;E(this,Rh,[1,0,0,-1,-s,a+o]),E(this,_h,i),E(this,Ph,o),x(c=Wt,K3,TN).call(c),Ka(t,r),g(this,ra).promise.catch(()=>{}).then(()=>{g(Wt,hu).delete(this),E(this,Oo,null),E(this,du,null)})}render(){const e=()=>{g(this,Ul).read().then(({value:t,done:r})=>{r?g(this,ra).resolve():(g(this,Hl)??E(this,Hl,t.lang),Object.assign(g(this,du),t.styles),x(this,W3,EN).call(this,t.items),e())},g(this,ra).reject)};return E(this,Ul,g(this,fu).getReader()),g(Wt,hu).add(this),e(),g(this,ra).promise}update({viewport:e,onBefore:t=null}){var o;const r=e.scale*(globalThis.devicePixelRatio||1),i=e.rotation;if(i!==g(this,uu)&&(t==null||t(),E(this,uu,i),Ka(g(this,cu),{rotation:i})),r!==g(this,ia)){t==null||t(),E(this,ia,r);const s={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:x(o=Wt,pu,i5).call(o,g(this,Hl))};for(const a of g(this,Zl))s.properties=g(this,Bh).get(a),s.div=a,x(this,$h,Tv).call(this,s)}}cancel(){var t;const e=new qa("TextLayer task cancelled.");(t=g(this,Ul))==null||t.cancel(e).catch(()=>{}),E(this,Ul,null),g(this,ra).reject(e)}get textDivs(){return g(this,Zl)}get textContentItemsStr(){return g(this,Lh)}static cleanup(){if(!(g(this,hu).size>0)){g(this,Wl).clear();for(const{canvas:e}of g(this,ql).values())e.remove();g(this,ql).clear()}}};ra=new WeakMap,Wn=new WeakMap,Dh=new WeakMap,Nh=new WeakMap,Hl=new WeakMap,Oo=new WeakMap,Ph=new WeakMap,_h=new WeakMap,Ul=new WeakMap,cu=new WeakMap,uu=new WeakMap,ia=new WeakMap,du=new WeakMap,Lh=new WeakMap,fu=new WeakMap,Zl=new WeakMap,Bh=new WeakMap,Rh=new WeakMap,Wl=new WeakMap,ql=new WeakMap,oa=new WeakMap,hu=new WeakMap,W3=new WeakSet,EN=function(e){var i,o;if(g(this,Dh))return;(o=g(this,Oo)).ctx??(o.ctx=x(i=Wt,pu,i5).call(i,g(this,Hl)));const t=g(this,Zl),r=g(this,Lh);for(const s of e){if(t.length>1e5){Ce("Ignoring additional textDivs for performance reasons."),E(this,Dh,!0);return}if(s.str!==void 0)r.push(s.str),x(this,q3,AN).call(this,s);else if(s.type==="beginMarkedContentProps"||s.type==="beginMarkedContent"){const a=g(this,Wn);E(this,Wn,document.createElement("span")),g(this,Wn).classList.add("markedContent"),s.id!==null&&g(this,Wn).setAttribute("id",`${s.id}`),a.append(g(this,Wn))}else s.type==="endMarkedContent"&&E(this,Wn,g(this,Wn).parentNode)}},q3=new WeakSet,AN=function(e){var y;const t=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};g(this,Zl).push(t);const i=se.transform(g(this,Rh),e.transform);let o=Math.atan2(i[1],i[0]);const s=g(this,du)[e.fontName];s.vertical&&(o+=Math.PI/2);const a=g(this,Nh)&&s.fontSubstitution||s.fontFamily,c=Math.hypot(i[2],i[3]),u=c*x(y=Wt,G3,xN).call(y,a,g(this,Hl));let d,f;o===0?(d=i[4],f=i[5]-u):(d=i[4]+u*Math.sin(o),f=i[5]-u*Math.cos(o));const h="calc(var(--scale-factor)*",p=t.style;g(this,Wn)===g(this,cu)?(p.left=`${(100*d/g(this,_h)).toFixed(2)}%`,p.top=`${(100*f/g(this,Ph)).toFixed(2)}%`):(p.left=`${h}${d.toFixed(2)}px)`,p.top=`${h}${f.toFixed(2)}px)`),p.fontSize=`${h}${(g(Wt,oa)*c).toFixed(2)}px)`,p.fontFamily=a,r.fontSize=c,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,g(this,Nh)&&(t.dataset.fontName=s.fontSubstitutionLoadedName||e.fontName),o!==0&&(r.angle=o*(180/Math.PI));let m=!1;if(e.str.length>1)m=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const b=Math.abs(e.transform[0]),w=Math.abs(e.transform[3]);b!==w&&Math.max(b,w)/Math.min(b,w)>1.5&&(m=!0)}if(m&&(r.canvasWidth=s.vertical?e.height:e.width),g(this,Bh).set(t,r),g(this,Oo).div=t,g(this,Oo).properties=r,x(this,$h,Tv).call(this,g(this,Oo)),r.hasText&&g(this,Wn).append(t),r.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),g(this,Wn).append(b)}},$h=new WeakSet,Tv=function(e){const{div:t,properties:r,ctx:i,prevFontSize:o,prevFontFamily:s}=e,{style:a}=t;let c="";if(g(Wt,oa)>1&&(c=`scale(${1/g(Wt,oa)})`),r.canvasWidth!==0&&r.hasText){const{fontFamily:u}=a,{canvasWidth:d,fontSize:f}=r;(o!==f||s!==u)&&(i.font=`${f*g(this,ia)}px ${u}`,e.prevFontSize=f,e.prevFontFamily=u);const{width:h}=i.measureText(t.textContent);h>0&&(c=`scaleX(${d*g(this,ia)/h}) ${c}`)}r.angle!==0&&(c=`rotate(${r.angle}deg) ${c}`),c.length>0&&(a.transform=c)},pu=new WeakSet,i5=function(e=null){let t=g(this,ql).get(e||(e=""));if(!t){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=e,document.body.append(r),t=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),g(this,ql).set(e,t)}return t},K3=new WeakSet,TN=function(){if(g(this,oa)!==null)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),E(this,oa,e.getBoundingClientRect().height),e.remove()},G3=new WeakSet,xN=function(e,t){const r=g(this,Wl).get(e);if(r)return r;const i=x(this,pu,i5).call(this,t),o=i.font;i.canvas.width=i.canvas.height=Xn,i.font=`30px ${e}`;const s=i.measureText("");let a=s.fontBoundingBoxAscent,c=Math.abs(s.fontBoundingBoxDescent);if(a){const f=a/(a+c);return g(this,Wl).set(e,f),i.canvas.width=i.canvas.height=0,i.font=o,f}i.strokeStyle="red",i.clearRect(0,0,Xn,Xn),i.strokeText("g",0,0);let u=i.getImageData(0,0,Xn,Xn).data;c=0;for(let f=u.length-1-3;f>=0;f-=4)if(u[f]>0){c=Math.ceil(f/4/Xn);break}i.clearRect(0,0,Xn,Xn),i.strokeText("A",0,Xn),u=i.getImageData(0,0,Xn,Xn).data,a=0;for(let f=0,h=u.length;f<h;f+=4)if(u[f]>0){a=Xn-Math.floor(f/4/Xn);break}i.canvas.width=i.canvas.height=0,i.font=o;const d=a?a/(a+c):.8;return g(this,Wl).set(e,d),d},M(Wt,pu),M(Wt,K3),M(Wt,G3),M(Wt,Wl,new Map),M(Wt,ql,new Map),M(Wt,oa,null),M(Wt,hu,new Set);let m2=Wt;class g2{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function i(o){var c;if(!o)return;let s=null;const a=o.name;if(a==="#text")s=o.value;else{if(!g2.shouldBuildText(a))return;(c=o==null?void 0:o.attributes)!=null&&c.textContent?s=o.attributes.textContent:o.value&&(s=o.value)}if(s!==null&&t.push({str:s}),o.children)for(const u of o.children)i(u)}(e),r}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}const DZ=65536,NZ=cn?class extends hM{_createCanvas(e,t){return ms.get("canvas").createCanvas(e,t)}}:class extends hM{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}={}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas");return r.width=e,r.height=t,r}},PZ=cn?class extends pM{_fetchData(e,t){return MM(e).then(r=>({cMapData:r,compressionType:t}))}}:gM,_Z=cn?class extends fM{}:(YD=class extends fM{constructor({docId:t,ownerDocument:r=globalThis.document}={}){super();M(this,qt);M(this,sa);M(this,aa);M(this,mu);M(this,la);M(this,Q3);M(this,Vh);M(this,ca);M(this,Ql);M(this,Xl);M(this,Fh);M(this,Jl);M(this,Kl,void 0);M(this,Gl,void 0);M(this,Fi,void 0);M(this,Do,void 0);M(this,hn,void 0);M(this,Y3,void 0);M(this,Yl,0);E(this,Do,t),E(this,hn,r)}addFilter(t){if(!t)return"none";let r=g(this,qt,mn).get(t);if(r)return r;const[i,o,s]=x(this,mu,o5).call(this,t),a=t.length===1?i:`${i}${o}${s}`;if(r=g(this,qt,mn).get(a),r)return g(this,qt,mn).set(t,r),r;const c=`g_${g(this,Do)}_transfer_map_${Kn(this,Yl)._++}`,u=x(this,la,fd).call(this,c);g(this,qt,mn).set(t,u),g(this,qt,mn).set(a,u);const d=x(this,ca,hd).call(this,c);return x(this,Xl,Q1).call(this,i,o,s,d),u}addHCMFilter(t,r){var m;const i=`${t}-${r}`,o="base";let s=g(this,sa,ud).get(o);if((s==null?void 0:s.key)===i||(s?((m=s.filter)==null||m.remove(),s.key=i,s.url="none",s.filter=null):(s={key:i,url:"none",filter:null},g(this,sa,ud).set(o,s)),!t||!r))return s.url;const a=x(this,Jl,X1).call(this,t);t=se.makeHexColor(...a);const c=x(this,Jl,X1).call(this,r);if(r=se.makeHexColor(...c),g(this,aa,dd).style.color="",t==="#000000"&&r==="#ffffff"||t===r)return s.url;const u=new Array(256);for(let y=0;y<=255;y++){const b=y/255;u[y]=b<=.03928?b/12.92:((b+.055)/1.055)**2.4}const d=u.join(","),f=`g_${g(this,Do)}_hcm_filter`,h=s.filter=x(this,ca,hd).call(this,f);x(this,Xl,Q1).call(this,d,d,d,h),x(this,Vh,xv).call(this,h);const p=(y,b)=>{const w=a[y]/255,v=c[y]/255,k=new Array(b+1);for(let C=0;C<=b;C++)k[C]=w+C/b*(v-w);return k.join(",")};return x(this,Xl,Q1).call(this,p(0,5),p(1,5),p(2,5),h),s.url=x(this,la,fd).call(this,f),s.url}addAlphaFilter(t){let r=g(this,qt,mn).get(t);if(r)return r;const[i]=x(this,mu,o5).call(this,[t]),o=`alpha_${i}`;if(r=g(this,qt,mn).get(o),r)return g(this,qt,mn).set(t,r),r;const s=`g_${g(this,Do)}_alpha_map_${Kn(this,Yl)._++}`,a=x(this,la,fd).call(this,s);g(this,qt,mn).set(t,a),g(this,qt,mn).set(o,a);const c=x(this,ca,hd).call(this,s);return x(this,Fh,Iv).call(this,i,c),a}addLuminosityFilter(t){let r,i,o=g(this,qt,mn).get(t||"luminosity");if(o)return o;if(t?([r]=x(this,mu,o5).call(this,[t]),i=`luminosity_${r}`):i="luminosity",o=g(this,qt,mn).get(i),o)return g(this,qt,mn).set(t,o),o;const s=`g_${g(this,Do)}_luminosity_map_${Kn(this,Yl)._++}`,a=x(this,la,fd).call(this,s);g(this,qt,mn).set(t,a),g(this,qt,mn).set(i,a);const c=x(this,ca,hd).call(this,s);return x(this,Q3,IN).call(this,c),t&&x(this,Fh,Iv).call(this,r,c),a}addHighlightHCMFilter(t,r,i,o,s){var v;const a=`${r}-${i}-${o}-${s}`;let c=g(this,sa,ud).get(t);if((c==null?void 0:c.key)===a||(c?((v=c.filter)==null||v.remove(),c.key=a,c.url="none",c.filter=null):(c={key:a,url:"none",filter:null},g(this,sa,ud).set(t,c)),!r||!i))return c.url;const[u,d]=[r,i].map(x(this,Jl,X1).bind(this));let f=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),h=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),[p,m]=[o,s].map(x(this,Jl,X1).bind(this));h<f&&([f,h,p,m]=[h,f,m,p]),g(this,aa,dd).style.color="";const y=(k,C,T)=>{const S=new Array(256),A=(h-f)/T,D=k/255,I=(C-k)/(255*T);let P=0;for(let O=0;O<=T;O++){const _=Math.round(f+O*A),B=D+O*I;for(let $=P;$<=_;$++)S[$]=B;P=_+1}for(let O=P;O<256;O++)S[O]=S[P-1];return S.join(",")},b=`g_${g(this,Do)}_hcm_${t}_filter`,w=c.filter=x(this,ca,hd).call(this,b);return x(this,Vh,xv).call(this,w),x(this,Xl,Q1).call(this,y(p[0],m[0],5),y(p[1],m[1],5),y(p[2],m[2],5),w),c.url=x(this,la,fd).call(this,b),c.url}destroy(t=!1){(!t||g(this,sa,ud).size===0)&&(g(this,Fi)&&(g(this,Fi).parentNode.parentNode.remove(),E(this,Fi,null)),g(this,Gl)&&(g(this,Gl).clear(),E(this,Gl,null)),E(this,Yl,0))}},Kl=new WeakMap,Gl=new WeakMap,Fi=new WeakMap,Do=new WeakMap,hn=new WeakMap,Y3=new WeakMap,Yl=new WeakMap,qt=new WeakSet,mn=function(){return g(this,Gl)||E(this,Gl,new Map)},sa=new WeakSet,ud=function(){return g(this,Y3)||E(this,Y3,new Map)},aa=new WeakSet,dd=function(){if(!g(this,Fi)){const t=g(this,hn).createElement("div"),{style:r}=t;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const i=g(this,hn).createElementNS(lo,"svg");i.setAttribute("width",0),i.setAttribute("height",0),E(this,Fi,g(this,hn).createElementNS(lo,"defs")),t.append(i),i.append(g(this,Fi)),g(this,hn).body.append(t)}return g(this,Fi)},mu=new WeakSet,o5=function(t){if(t.length===1){const u=t[0],d=new Array(256);for(let h=0;h<256;h++)d[h]=u[h]/255;const f=d.join(",");return[f,f,f]}const[r,i,o]=t,s=new Array(256),a=new Array(256),c=new Array(256);for(let u=0;u<256;u++)s[u]=r[u]/255,a[u]=i[u]/255,c[u]=o[u]/255;return[s.join(","),a.join(","),c.join(",")]},la=new WeakSet,fd=function(t){if(g(this,Kl)===void 0){E(this,Kl,"");const r=g(this,hn).URL;r!==g(this,hn).baseURI&&(sm(r)?Ce('#createUrl: ignore "data:"-URL for performance reasons.'):E(this,Kl,r.split("#",1)[0]))}return`url(${g(this,Kl)}#${t})`},Q3=new WeakSet,IN=function(t){const r=g(this,hn).createElementNS(lo,"feColorMatrix");r.setAttribute("type","matrix"),r.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"),t.append(r)},Vh=new WeakSet,xv=function(t){const r=g(this,hn).createElementNS(lo,"feColorMatrix");r.setAttribute("type","matrix"),r.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"),t.append(r)},ca=new WeakSet,hd=function(t){const r=g(this,hn).createElementNS(lo,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",t),g(this,aa,dd).append(r),r},Ql=new WeakSet,Y1=function(t,r,i){const o=g(this,hn).createElementNS(lo,r);o.setAttribute("type","discrete"),o.setAttribute("tableValues",i),t.append(o)},Xl=new WeakSet,Q1=function(t,r,i,o){const s=g(this,hn).createElementNS(lo,"feComponentTransfer");o.append(s),x(this,Ql,Y1).call(this,s,"feFuncR",t),x(this,Ql,Y1).call(this,s,"feFuncG",r),x(this,Ql,Y1).call(this,s,"feFuncB",i)},Fh=new WeakSet,Iv=function(t,r){const i=g(this,hn).createElementNS(lo,"feComponentTransfer");r.append(i),x(this,Ql,Y1).call(this,i,"feFuncA",t)},Jl=new WeakSet,X1=function(t){return g(this,aa,dd).style.color=t,I4(getComputedStyle(g(this,aa,dd)).getPropertyValue("color"))},YD),LZ=cn?class extends mM{_fetchData(e){return MM(e)}}:yM;function BZ(n={}){typeof n=="string"||n instanceof URL?n={url:n}:(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});const e=new Z4,{docId:t}=e,r=n.url?function(j){if(j instanceof URL)return j.href;try{return new URL(j,window.location).href}catch{if(cn&&typeof j=="string")return j}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(n.url):null,i=n.data?function(j){if(cn&&typeof Buffer<"u"&&j instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(j instanceof Uint8Array&&j.byteLength===j.buffer.byteLength)return j;if(typeof j=="string")return im(j);if(j instanceof ArrayBuffer||ArrayBuffer.isView(j)||typeof j=="object"&&!isNaN(j==null?void 0:j.length))return new Uint8Array(j);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(n.data):null,o=n.httpHeaders||null,s=n.withCredentials===!0,a=n.password??null,c=n.range instanceof WM?n.range:null,u=Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>0?n.rangeChunkSize:DZ;let d=n.worker instanceof nc?n.worker:null;const f=n.verbosity,h=typeof n.docBaseUrl!="string"||sm(n.docBaseUrl)?null:n.docBaseUrl,p=typeof n.cMapUrl=="string"?n.cMapUrl:null,m=n.cMapPacked!==!1,y=n.CMapReaderFactory||PZ,b=typeof n.standardFontDataUrl=="string"?n.standardFontDataUrl:null,w=n.StandardFontDataFactory||LZ,v=n.stopAtErrors!==!0,k=Number.isInteger(n.maxImageSize)&&n.maxImageSize>-1?n.maxImageSize:-1,C=n.isEvalSupported!==!1,T=typeof n.isOffscreenCanvasSupported=="boolean"?n.isOffscreenCanvasSupported:!cn,S=Number.isInteger(n.canvasMaxAreaInBytes)?n.canvasMaxAreaInBytes:-1,A=typeof n.disableFontFace=="boolean"?n.disableFontFace:cn,D=n.fontExtraProperties===!0,I=n.enableXfa===!0,P=n.ownerDocument||globalThis.document,O=n.disableRange===!0,_=n.disableStream===!0,B=n.disableAutoFetch===!0,$=n.pdfBug===!0,R=n.enableHWA===!0,N=c?c.length:n.length??NaN,W=typeof n.useSystemFonts=="boolean"?n.useSystemFonts:!cn&&!A,F=typeof n.useWorkerFetch=="boolean"?n.useWorkerFetch:y===gM&&w===yM&&p&&b&&c2(p,document.baseURI)&&c2(b,document.baseURI),K=n.canvasFactory||new NZ({ownerDocument:P,enableHWA:R}),ae=n.filterFactory||new _Z({docId:t,ownerDocument:P});NU(f);const de={canvasFactory:K,filterFactory:ae};if(F||(de.cMapReaderFactory=new y({baseUrl:p,isCompressed:m}),de.standardFontDataFactory=new w({baseUrl:b})),!d){const H={verbosity:f,port:uo.workerPort};d=H.port?nc.fromPort(H):new nc(H),e._worker=d}const Q={docId:t,apiVersion:"4.6.82",data:i,password:a,disableAutoFetch:B,rangeChunkSize:u,length:N,docBaseUrl:h,enableXfa:I,evaluatorOptions:{maxImageSize:k,disableFontFace:A,ignoreErrors:v,isEvalSupported:C,isOffscreenCanvasSupported:T,canvasMaxAreaInBytes:S,fontExtraProperties:D,useSystemFonts:W,cMapUrl:F?p:null,standardFontDataUrl:F?b:null}},Z={disableFontFace:A,fontExtraProperties:D,ownerDocument:P,pdfBug:$,styleElement:null,loadingParams:{disableAutoFetch:B,enableXfa:I}};return d.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const H=d.messageHandler.sendWithPromise("GetDocRequest",Q,i?[i.buffer]:null);let j;if(c)j=new gZ(c,{disableRange:O,disableStream:_});else if(!i){if(!r)throw new Error("getDocument - no `url` parameter provided.");j=(q=>cn?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&c2(q.url)?new jM(q):new AZ(q):c2(q.url)?new jM(q):new kZ(q))({url:r,length:N,httpHeaders:o,withCredentials:s,rangeChunkSize:u,disableRange:O,disableStream:_})}return H.then(q=>{if(e.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const ne=new p2(t,q,d.port),le=new FZ(ne,e,j,Z,de);e._transport=le,ne.send("Ready",null)})}).catch(e._capability.reject),e}function ZM(n){return typeof n=="object"&&Number.isInteger(n==null?void 0:n.num)&&n.num>=0&&Number.isInteger(n==null?void 0:n.gen)&&n.gen>=0}const J3=class J3{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+Kn(J3,X3)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e,t,r;this.destroyed=!0;try{(e=this._worker)!=null&&e.port&&(this._worker._pendingDestroy=!0),await((t=this._transport)==null?void 0:t.destroy())}catch(i){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,i}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};X3=new WeakMap,M(J3,X3,0);let Z4=J3;class WM{constructor(e,t,r=!1,i=null){this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){St("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class RZ{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Ie(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}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:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}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(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}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()}}class $Z{constructor(e,t,r,i=!1){M(this,da);M(this,gu);M(this,ua,null);M(this,No,!1);this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=i?new bM:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new qM,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:e,rotation:t=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:o=!1}={}){return new l2({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:o})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Ie(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return((e=this._transport._htmlForXfa)==null?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,viewport:t,intent:r="display",annotationMode:i=ds.ENABLE,transform:o=null,background:s=null,optionalContentConfigPromise:a=null,annotationCanvasMap:c=null,pageColors:u=null,printAnnotationStorage:d=null,isEditing:f=!1}){var C,T;(C=this._stats)==null||C.time("Overall");const h=this._transport.getRenderingIntent(r,i,d,f),{renderingIntent:p,cacheKey:m}=h;E(this,No,!1),x(this,gu,s5).call(this),a||(a=this._transport.getOptionalContentConfig(p));let y=this._intentStates.get(m);y||(y=Object.create(null),this._intentStates.set(m,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const b=!!(p&Qp);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(T=this._stats)==null||T.time("Page Request"),this._pumpOperatorList(h));const w=S=>{var A;y.renderTasks.delete(v),(this._maybeCleanupAfterRender||b)&&E(this,No,!0),x(this,da,pd).call(this,!b),S?(v.capability.reject(S),this._abortOperatorList({intentState:y,reason:S instanceof Error?S:new Error(S)})):v.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(A=globalThis.Stats)!=null&&A.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},v=new W4({callback:w,params:{canvasContext:e,viewport:t,transform:o,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!b,pdfBug:this._pdfBug,pageColors:u});(y.renderTasks||(y.renderTasks=new Set)).add(v);const k=v.task;return Promise.all([y.displayReadyCapability.promise,a]).then(([S,A])=>{var D;if(this.destroyed)w();else{if((D=this._stats)==null||D.time("Rendering"),!(A.renderingIntent&p))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");v.initializeGraphics({transparency:S,optionalContentConfig:A}),v.operatorListChanged()}}).catch(w),k}getOperatorList({intent:e="display",annotationMode:t=ds.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){var c;const o=this._transport.getRenderingIntent(e,t,r,i,!0);let s,a=this._intentStates.get(o.cacheKey);return a||(a=Object.create(null),this._intentStates.set(o.cacheKey,a)),a.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(s))},a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||(a.renderTasks=new Set)).add(s),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(c=this._stats)==null||c.time("Page Request"),this._pumpOperatorList(o)),a.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size:r=>r.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>g2.textContent(r));const t=this.streamTextContent(e);return new Promise(function(r,i){const o=t.getReader(),s={items:[],styles:Object.create(null),lang:null};(function a(){o.read().then(function({value:c,done:u}){u?r(s):(s.lang??(s.lang=c.lang),Object.assign(s.styles,c.styles),s.items.push(...c.items),a())},i)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),E(this,No,!1),x(this,gu,s5).call(this),Promise.all(e)}cleanup(e=!1){E(this,No,!0);const t=x(this,da,pd).call(this,!1);return e&&t&&this._stats&&(this._stats=new bM),t}_startRenderPage(e,t){var i,o;const r=this._intentStates.get(t);r&&((i=this._stats)==null||i.timeEnd("Page Request"),(o=r.displayReadyCapability)==null||o.resolve(e))}_renderPageChunk(e,t){for(let r=0,i=e.length;r<i;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const r of t.renderTasks)r.operatorListChanged();e.lastChunk&&x(this,da,pd).call(this,!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:r,modifiedIds:i}){const{map:o,transfer:s}=r,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:o,modifiedIds:i},s).getReader(),c=this._intentStates.get(t);c.streamReader=a;const u=()=>{a.read().then(({value:d,done:f})=>{f?c.streamReader=null:this._transport.destroyed||(this._renderPageChunk(d,c),u())},d=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(const f of c.renderTasks)f.operatorListChanged();x(this,da,pd).call(this,!0)}if(c.displayReadyCapability)c.displayReadyCapability.reject(d);else{if(!c.opListReadCapability)throw d;c.opListReadCapability.reject(d)}}})};u()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(t instanceof T4){let i=100;t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},i);return}}if(e.streamReader.cancel(new qa(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[i,o]of this._intentStates)if(o===e){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}ua=new WeakMap,No=new WeakMap,da=new WeakSet,pd=function(e=!1){if(x(this,gu,s5).call(this),!g(this,No)||this.destroyed)return!1;if(e)return E(this,ua,setTimeout(()=>{E(this,ua,null),x(this,da,pd).call(this,!1)},5e3)),!1;for(const{renderTasks:t,operatorList:r}of this._intentStates.values())if(t.size>0||!r.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),E(this,No,!1),!0},gu=new WeakSet,s5=function(){g(this,ua)&&(clearTimeout(g(this,ua)),E(this,ua,null))};class VZ{constructor(){M(this,e0,new Set);M(this,ey,Promise.resolve())}postMessage(e,t){const r={data:structuredClone(e,t?{transfer:t}:null)};g(this,ey).then(()=>{for(const i of g(this,e0))i.call(this,r)})}addEventListener(e,t){g(this,e0).add(t)}removeEventListener(e,t){g(this,e0).delete(t)}terminate(){g(this,e0).clear()}}e0=new WeakMap,ey=new WeakMap;const tt=class tt{constructor({name:e=null,port:t=null,verbosity:r=PU()}={}){M(this,yu);var i;if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if((i=g(tt,n0))!=null&&i.has(t))throw new Error("Cannot use more than one PDFWorker per port.");(g(tt,n0)||E(tt,n0,new WeakMap)).set(t,this),this._initializeFromPort(t)}else this._initialize()}get promise(){return cn?Promise.all([ms.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new p2("main","worker",e),this._messageHandler.on("ready",function(){}),x(this,yu,a5).call(this)}_initialize(){if(g(tt,t0)||g(tt,bu,l5)){this._setupFakeWorker();return}let{workerSrc:e}=tt;try{tt._isSameOrigin(window.location.href,e)||(e=tt._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),r=new p2("main","worker",t),i=()=>{o.abort(),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},o=new AbortController;t.addEventListener("error",()=>{this._webWorker||i()},{signal:o.signal}),r.on("test",a=>{o.abort(),!this.destroyed&&a?(this._messageHandler=r,this._port=t,this._webWorker=t,x(this,yu,a5).call(this)):i()}),r.on("ready",a=>{if(o.abort(),this.destroyed)i();else try{s()}catch{this._setupFakeWorker()}});const s=()=>{const a=new Uint8Array;r.send("test",a,[a.buffer])};s();return}catch{nm("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){g(tt,t0)||(Ce("Setting up fake worker."),E(tt,t0,!0)),tt._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const t=new VZ;this._port=t;const r="fake"+Kn(tt,ty)._++,i=new p2(r+"_worker",r,t);e.setup(i,t),this._messageHandler=new p2(r,r+"_worker",t),x(this,yu,a5).call(this)}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){var e;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(e=g(tt,n0))==null||e.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){var r;if(!(e!=null&&e.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const t=(r=g(this,n0))==null?void 0:r.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new tt(e)}static get workerSrc(){if(uo.workerSrc)return uo.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Ie(this,"_setupFakeWorkerGlobal",(async()=>g(this,bu,l5)?g(this,bu,l5):(await import(this.workerSrc)).WorkerMessageHandler)())}};ty=new WeakMap,t0=new WeakMap,n0=new WeakMap,yu=new WeakSet,a5=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},bu=new WeakSet,l5=function(){var e;try{return((e=globalThis.pdfjsWorker)==null?void 0:e.WorkerMessageHandler)||null}catch{return null}},M(tt,bu),M(tt,ty,0),M(tt,t0,!1),M(tt,n0,void 0),cn&&(E(tt,t0,!0),uo.workerSrc||(uo.workerSrc="./pdf.worker.mjs")),tt._isSameOrigin=(e,t)=>{let r;try{if(r=new URL(e),!r.origin||r.origin==="null")return!1}catch{return!1}const i=new URL(t,r);return r.origin===i.origin},tt._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let nc=tt;class FZ{constructor(e,t,r,i,o){M(this,r0);M(this,Po,new Map);M(this,ji,new Map);M(this,wu,new Map);M(this,vu,new Map);M(this,zi,null);this.messageHandler=e,this.loadingTask=t,this.commonObjs=new qM,this.fontLoader=new eZ({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=o.canvasFactory,this.filterFactory=o.filterFactory,this.cMapReaderFactory=o.cMapReaderFactory,this.standardFontDataFactory=o.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return Ie(this,"annotationStorage",new _4)}getRenderingIntent(e,t=ds.ENABLE,r=null,i=!1,o=!1){let s=b4,a=P4;switch(e){case"any":s=eU;break;case"display":break;case"print":s=Qp;break;default:Ce(`getRenderingIntent - invalid intent: ${e}`)}const c=s&Qp&&r instanceof SM?r:this.annotationStorage;switch(t){case ds.DISABLE:s+=rU;break;case ds.ENABLE:break;case ds.ENABLE_FORMS:s+=tU;break;case ds.ENABLE_STORAGE:s+=nU,a=c.serializable;break;default:Ce(`getRenderingIntent - invalid annotationMode: ${t}`)}i&&(s+=iU),o&&(s+=oU);const{ids:u,hash:d}=c.modifiedIds;return{renderingIntent:s,cacheKey:[s,a.hash,d].join("_"),annotationStorageSerializable:a,modifiedIds:u}}destroy(){var r;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(r=g(this,zi))==null||r.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const i of g(this,ji).values())e.push(i._destroy());g(this,ji).clear(),g(this,wu).clear(),g(this,vu).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{var i;this.commonObjs.clear(),this.fontLoader.clear(),g(this,Po).clear(),this.filterFactory.destroy(),m2.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new qa("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(r,i)=>{xt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=o=>{this._lastProgress={loaded:o.loaded,total:o.total}},i.onPull=()=>{this._fullReader.read().then(function({value:o,done:s}){s?i.close():(xt(o instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(o),1,[o]))}).catch(o=>{i.error(o)})},i.onCancel=o=>{this._fullReader.cancel(o),i.ready.catch(s=>{if(!this.destroyed)throw s})}}),e.on("ReaderHeadersReady",r=>{const i=Promise.withResolvers(),o=this._fullReader;return o.headersReady.then(()=>{var s;(!o.isStreamingSupported||!o.isRangeSupported)&&(this._lastProgress&&((s=t.onProgress)==null||s.call(t,this._lastProgress)),o.onProgress=a=>{var c;(c=t.onProgress)==null||c.call(t,{loaded:a.loaded,total:a.total})}),i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})},i.reject),i.promise}),e.on("GetRangeReader",(r,i)=>{xt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const o=this._networkStream.getRangeReader(r.begin,r.end);o?(i.onPull=()=>{o.read().then(function({value:s,done:a}){a?i.close():(xt(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(s),1,[s]))}).catch(s=>{i.error(s)})},i.onCancel=s=>{o.cancel(s),i.ready.catch(a=>{if(!this.destroyed)throw a})}):i.close()}),e.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,t._capability.resolve(new RZ(r,this))}),e.on("DocException",function(r){let i;switch(r.name){case"PasswordException":i=new C4(r.message,r.code);break;case"InvalidPDFException":i=new lM(r.message);break;case"MissingPDFException":i=new Wa(r.message);break;case"UnexpectedResponseException":i=new rm(r.message,r.status);break;case"UnknownErrorException":i=new k4(r.message,r.details);break;default:St("DocException - expected a valid Error.")}t._capability.reject(i)}),e.on("PasswordRequest",r=>{if(E(this,zi,Promise.withResolvers()),t.onPassword){const i=o=>{o instanceof Error?g(this,zi).reject(o):g(this,zi).resolve({password:o})};try{t.onPassword(i,r.code)}catch(o){g(this,zi).reject(o)}}else g(this,zi).reject(new C4(r.message,r.code));return g(this,zi).promise}),e.on("DataLoaded",r=>{var i;(i=t.onProgress)==null||i.call(t,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),e.on("StartRenderPage",r=>{this.destroyed||g(this,ji).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),e.on("commonobj",([r,i,o])=>{var s;if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":const{disableFontFace:a,fontExtraProperties:c,pdfBug:u}=this._params;if("error"in o){const p=o.error;Ce(`Error during font loading: ${p}`),this.commonObjs.resolve(r,p);break}const d=u&&((s=globalThis.FontInspector)!=null&&s.enabled)?(p,m)=>globalThis.FontInspector.fontAdded(p,m):null,f=new tZ(o,{disableFontFace:a,inspectFont:d});this.fontLoader.bind(f).catch(()=>e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!c&&f.data&&(f.data=null),this.commonObjs.resolve(r,f)});break;case"CopyLocalImage":const{imageRef:h}=o;xt(h,"The imageRef must be defined.");for(const p of g(this,ji).values())for(const[,m]of p.objs)if((m==null?void 0:m.ref)===h)return m.dataLen?(this.commonObjs.resolve(r,structuredClone(m)),m.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(r,o);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),e.on("obj",([r,i,o,s])=>{var c;if(this.destroyed)return;const a=g(this,ji).get(i);if(!a.objs.has(r))if(a._intentStates.size!==0)switch(o){case"Image":a.objs.resolve(r,s),(s==null?void 0:s.dataLen)>1e7&&(a._maybeCleanupAfterRender=!0);break;case"Pattern":a.objs.resolve(r,s);break;default:throw new Error(`Got unknown object type ${o}`)}else(c=s==null?void 0:s.bitmap)==null||c.close()}),e.on("DocProgress",r=>{var i;this.destroyed||((i=t.onProgress)==null||i.call(t,{loaded:r.loaded,total:r.total}))}),e.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var r;this.annotationStorage.size<=0&&Ce("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((r=this._fullReader)==null?void 0:r.filename)??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,r=g(this,wu).get(t);if(r)return r;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(o=>{if(this.destroyed)throw new Error("Transport destroyed");o.refStr&&g(this,vu).set(o.refStr,e);const s=new $Z(t,o,this,this._params.pdfBug);return g(this,ji).set(t,s),s});return g(this,wu).set(t,i),i}getPageIndex(e){return ZM(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return x(this,r0,J1).call(this,"GetFieldObjects")}hasJSActions(){return x(this,r0,J1).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}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 x(this,r0,J1).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return x(this,r0,J1).call(this,"GetOptionalContentConfig").then(t=>new mZ(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=g(this,Po).get(e);if(t)return t;const r=this.messageHandler.sendWithPromise(e,null).then(i=>{var o,s;return{info:i[0],metadata:i[1]?new hZ(i[1]):null,contentDispositionFilename:((o=this._fullReader)==null?void 0:o.filename)??null,contentLength:((s=this._fullReader)==null?void 0:s.contentLength)??null}});return g(this,Po).set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of g(this,ji).values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),g(this,Po).clear(),this.filterFactory.destroy(!0),m2.cleanup()}}cachedPageNumber(e){if(!ZM(e))return null;const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return g(this,vu).get(t)??null}}Po=new WeakMap,ji=new WeakMap,wu=new WeakMap,vu=new WeakMap,zi=new WeakMap,r0=new WeakSet,J1=function(e,t=null){const r=g(this,Po).get(e);if(r)return r;const i=this.messageHandler.sendWithPromise(e,t);return g(this,Po).set(e,i),i};const hm=Symbol("INITIAL_DATA");class qM{constructor(){M(this,jh);M(this,ni,Object.create(null))}get(e,t=null){if(t){const i=x(this,jh,Ov).call(this,e);return i.promise.then(()=>t(i.data)),null}const r=g(this,ni)[e];if(!r||r.data===hm)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=g(this,ni)[e];return!!t&&t.data!==hm}resolve(e,t=null){const r=x(this,jh,Ov).call(this,e);r.data=t,r.resolve()}clear(){var e;for(const t in g(this,ni)){const{data:r}=g(this,ni)[t];(e=r==null?void 0:r.bitmap)==null||e.close()}E(this,ni,Object.create(null))}*[Symbol.iterator](){for(const e in g(this,ni)){const{data:t}=g(this,ni)[e];t!==hm&&(yield[e,t])}}}ni=new WeakMap,jh=new WeakSet,Ov=function(e){var t;return(t=g(this,ni))[e]||(t[e]={...Promise.withResolvers(),data:hm})};class jZ{constructor(e){M(this,fa,null);E(this,fa,e),this.onContinue=null}get promise(){return g(this,fa).capability.promise}cancel(e=0){g(this,fa).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=g(this,fa).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=g(this,fa);return e.form||e.canvas&&(t==null?void 0:t.size)>0}}fa=new WeakMap;const o0=class o0{constructor({callback:e,params:t,objs:r,commonObjs:i,annotationCanvasMap:o,operatorList:s,pageIndex:a,canvasFactory:c,filterFactory:u,useRequestAnimationFrame:d=!1,pdfBug:f=!1,pageColors:h=null}){M(this,ha,null);this.callback=e,this.params=t,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=a,this.canvasFactory=c,this.filterFactory=u,this._pdfBug=f,this.pageColors=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=d===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new jZ(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=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){var a,c;if(this.cancelled)return;if(this._canvas){if(g(o0,i0).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.");g(o0,i0).add(this._canvas)}this._pdfBug&&((a=globalThis.StepperManager)!=null&&a.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:i,transform:o,background:s}=this.params;this.gfx=new tc(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:i,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(c=this.graphicsReadyCallback)==null||c.call(this)}cancel(e=null,t=0){var r;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),g(this,ha)&&(window.cancelAnimationFrame(g(this,ha)),E(this,ha,null)),g(o0,i0).delete(this._canvas),this.callback(e||new T4(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){var e;this.graphicsReady?((e=this.stepper)==null||e.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?E(this,ha,window.requestAnimationFrame(()=>{E(this,ha,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(),g(o0,i0).delete(this._canvas),this.callback())))}};ha=new WeakMap,i0=new WeakMap,M(o0,i0,new WeakSet);let W4=o0;const zZ="4.6.82",HZ="9b541910f";Pe(670);function KM(n){return Math.floor(255*Math.max(0,Math.min(1,n))).toString(16).padStart(2,"0")}function y2(n){return Math.max(0,Math.min(255,255*n))}class GM{static CMYK_G([e,t,r,i]){return["G",1-Math.min(1,.3*e+.59*r+.11*t+i)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=y2(e),e,e]}static G_HTML([e]){const t=KM(e);return`#${t}${t}${t}`}static RGB_G([e,t,r]){return["G",.3*e+.59*t+.11*r]}static RGB_rgb(e){return e.map(y2)}static RGB_HTML(e){return`#${e.map(KM).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,r,i]){return["RGB",1-Math.min(1,e+i),1-Math.min(1,r+i),1-Math.min(1,t+i)]}static CMYK_rgb([e,t,r,i]){return[y2(1-Math.min(1,e+i)),y2(1-Math.min(1,r+i)),y2(1-Math.min(1,t+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,r]){const i=1-e,o=1-t,s=1-r;return["CMYK",i,o,s,Math.min(i,o,s)]}}class YM{static setupStorage(e,t,r,i,o){const s=i.getValue(t,{value:null});switch(r.name){case"textarea":if(s.value!==null&&(e.textContent=s.value),o==="print")break;e.addEventListener("input",a=>{i.setValue(t,{value:a.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(s.value===r.attributes.xfaOn?e.setAttribute("checked",!0):s.value===r.attributes.xfaOff&&e.removeAttribute("checked"),o==="print")break;e.addEventListener("change",a=>{i.setValue(t,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})})}else{if(s.value!==null&&e.setAttribute("value",s.value),o==="print")break;e.addEventListener("input",a=>{i.setValue(t,{value:a.target.value})})}break;case"select":if(s.value!==null){e.setAttribute("value",s.value);for(const a of r.children)a.attributes.value===s.value?a.attributes.selected=!0:a.attributes.hasOwnProperty("selected")&&delete a.attributes.selected}e.addEventListener("input",a=>{const c=a.target.options,u=c.selectedIndex===-1?"":c[c.selectedIndex].value;i.setValue(t,{value:u})})}}static setAttributes({html:e,element:t,storage:r=null,intent:i,linkService:o}){const{attributes:s}=t,a=e instanceof HTMLAnchorElement;s.type==="radio"&&(s.name=`${s.name}-${i}`);for(const[c,u]of Object.entries(s))if(u!=null)switch(c){case"class":u.length&&e.setAttribute(c,u.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",u);break;case"style":Object.assign(e.style,u);break;case"textContent":e.textContent=u;break;default:(!a||c!=="href"&&c!=="newWindow")&&e.setAttribute(c,u)}a&&o.addLinkAttributes(e,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(e,s.dataId,t,r)}static render(e){var f,h;const t=e.annotationStorage,r=e.linkService,i=e.xfaHtml,o=e.intent||"display",s=document.createElement(i.name);i.attributes&&this.setAttributes({html:s,element:i,intent:o,linkService:r});const a=o!=="richText",c=e.div;if(c.append(s),e.viewport){const p=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=p}a&&c.setAttribute("class","xfaLayer xfaFont");const u=[];if(i.children.length===0){if(i.value){const p=document.createTextNode(i.value);s.append(p),a&&g2.shouldBuildText(i.name)&&u.push(p)}return{textDivs:u}}const d=[[i,-1,s]];for(;d.length>0;){const[p,m,y]=d.at(-1);if(m+1===p.children.length){d.pop();continue}const b=p.children[++d.at(-1)[1]];if(b===null)continue;const{name:w}=b;if(w==="#text"){const k=document.createTextNode(b.value);u.push(k),y.append(k);continue}const v=(f=b==null?void 0:b.attributes)!=null&&f.xmlns?document.createElementNS(b.attributes.xmlns,w):document.createElement(w);if(y.append(v),b.attributes&&this.setAttributes({html:v,element:b,storage:t,intent:o,linkService:r}),((h=b.children)==null?void 0:h.length)>0)d.push([b,-1,v]);else if(b.value){const k=document.createTextNode(b.value);a&&g2.shouldBuildText(w)&&u.push(k),v.append(k)}}for(const p of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))p.setAttribute("readOnly",!0);return{textDivs:u}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const b2=1e3,Qa=new WeakSet;function fo(n){return{width:n[2]-n[0],height:n[3]-n[1]}}class UZ{static create(e){switch(e.data.annotationType){case uU:return new QM(e);case cU:return new ZZ(e);case EU:switch(e.data.fieldType){case"Tx":return new WZ(e);case"Btn":return e.data.radioButton?new XM(e):e.data.checkBox?new KZ(e):new GZ(e);case"Ch":return new YZ(e);case"Sig":return new qZ(e)}return new Xa(e);case aM:return new q4(e);case dU:return new JM(e);case fU:return new XZ(e);case hU:return new JZ(e);case pU:return new eW(e);case gU:return new eE(e);case kU:return new nW(e);case SU:return new tE(e);case mU:return new tW(e);case yU:return new rW(e);case bU:return new iW(e);case wU:return new oW(e);case vU:return new sW(e);case CU:return new nE(e);case MU:return new aW(e);default:return new yt(e)}}}const rv=class rv{constructor(e,{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){M(this,zh);M(this,s0,null);M(this,Cu,!1);M(this,ku,null);this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:r}){return!!(e!=null&&e.str||t!=null&&t.str||r!=null&&r.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return rv._hasPopupData(this.data)}updateEdited(e){var r;if(!this.container)return;g(this,s0)||E(this,s0,{rect:this.data.rect.slice(0)});const{rect:t}=e;t&&x(this,zh,Dv).call(this,t),(r=g(this,ku))==null||r.popup.updateEdited(e)}resetEdited(){var e;g(this,s0)&&(x(this,zh,Dv).call(this,g(this,s0).rect),(e=g(this,ku))==null||e.popup.resetEdited(),E(this,s0,null))}_createContainer(e){const{data:t,parent:{page:r,viewport:i}}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",t.id),this instanceof Xa||(o.tabIndex=b2);const{style:s}=o;if(s.zIndex=this.parent.zIndex++,t.popupRef&&o.setAttribute("aria-haspopup","dialog"),t.alternativeText&&(o.title=t.alternativeText),t.noRotate&&o.classList.add("norotate"),!t.rect||this instanceof q4){const{rotation:y}=t;return t.hasOwnCanvas||y===0||this.setRotation(y,o),o}const{width:a,height:c}=fo(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth=`${t.borderStyle.width}px`;const y=t.borderStyle.horizontalCornerRadius,b=t.borderStyle.verticalCornerRadius;if(y>0||b>0){const v=`calc(${y}px * var(--scale-factor)) / calc(${b}px * var(--scale-factor))`;s.borderRadius=v}else if(this instanceof XM){const v=`calc(${a}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`;s.borderRadius=v}switch(t.borderStyle.style){case AU:s.borderStyle="solid";break;case TU:s.borderStyle="dashed";break;case xU:Ce("Unimplemented border style: beveled");break;case IU:Ce("Unimplemented border style: inset");break;case OU:s.borderBottomStyle="solid"}const w=t.borderColor||null;w?(E(this,Cu,!0),s.borderColor=se.makeHexColor(0|w[0],0|w[1],0|w[2])):s.borderWidth=0}const u=se.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]),{pageWidth:d,pageHeight:f,pageX:h,pageY:p}=i.rawDims;s.left=100*(u[0]-h)/d+"%",s.top=100*(u[1]-p)/f+"%";const{rotation:m}=t;return t.hasOwnCanvas||m===0?(s.width=100*a/d+"%",s.height=100*c/f+"%"):this.setRotation(m,o),o}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims,{width:o,height:s}=fo(this.data.rect);let a,c;e%180==0?(a=100*o/r,c=100*s/i):(a=100*s/r,c=100*o/i),t.style.width=`${a}%`,t.style.height=`${c}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(t,r,i)=>{const o=i.detail[t],s=o[0],a=o.slice(1);i.target.style[r]=GM[`${s}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[r]:GM[`${s}_rgb`](a)})};return Ie(this,"_commonActions",{display:t=>{const{display:r}=t.detail,i=r%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:r}=t.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{const r=t.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions;for(const i of Object.keys(t.detail)){const o=e[i]||r[i];o==null||o(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const r=this._commonActions;for(const[i,o]of Object.entries(t)){const s=r[i];s&&(s({detail:{[i]:o},target:e}),delete t[i])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,r,i,o]=this.data.rect.map(y=>Math.fround(y));if(e.length===8){const[y,b,w,v]=e.subarray(2,6);if(i===y&&o===b&&t===w&&r===v)return}const{style:s}=this.container;let a;if(g(this,Cu)){const{borderColor:y,borderWidth:b}=s;s.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${y}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const c=i-t,u=o-r,{svgFactory:d}=this,f=d.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0);const h=d.createElement("defs");f.append(h);const p=d.createElement("clipPath"),m=`clippath_${this.data.id}`;p.setAttribute("id",m),p.setAttribute("clipPathUnits","objectBoundingBox"),h.append(p);for(let y=2,b=e.length;y<b;y+=8){const w=e[y],v=e[y+1],k=e[y+2],C=e[y+3],T=d.createElement("rect"),S=(k-t)/c,A=(o-v)/u,D=(w-k)/c,I=(v-C)/u;T.setAttribute("x",S),T.setAttribute("y",A),T.setAttribute("width",D),T.setAttribute("height",I),p.append(T),a==null||a.push(`<rect vector-effect="non-scaling-stroke" x="${S}" y="${A}" width="${D}" height="${I}"/>`)}g(this,Cu)&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(f),this.container.style.clipPath=`url(#${m})`}_createPopup(){const{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");const r=E(this,ku,new q4({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}render(){St("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const r=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:o,id:s,exportValues:a}of i){if(o===-1||s===t)continue;const c=typeof a=="string"?a:null,u=document.querySelector(`[data-element-id="${s}"]`);!u||Qa.has(u)?r.push({id:s,exportValue:c,domElement:u}):Ce(`_getElementsByName - element not allowed: ${s}`)}return r}for(const i of document.getElementsByName(e)){const{exportValue:o}=i,s=i.getAttribute("data-element-id");s!==t&&Qa.has(i)&&r.push({id:s,exportValue:o,domElement:i})}return r}show(){var e;this.container&&(this.container.hidden=!1),(e=this.popup)==null||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),(e=this.popup)==null||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}};s0=new WeakMap,Cu=new WeakMap,ku=new WeakMap,zh=new WeakSet,Dv=function(e){const{container:{style:t},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:o,pageHeight:s,pageX:a,pageY:c}}}}=this;r==null||r.splice(0,4,...e);const{width:u,height:d}=fo(e);t.left=100*(e[0]-a)/o+"%",t.top=100*(s-e[3]+c)/s+"%",i===0?(t.width=100*u/o+"%",t.height=100*d/s+"%"):this.setRotation(i)};let yt=rv;class QM extends yt{constructor(t,r=null){super(t,{isRenderable:!0,ignoreBorder:!!(r!=null&&r.ignoreBorder),createQuadrilaterals:!0});M(this,_o);M(this,ny);M(this,ry);this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:r}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let o=!1;return t.url?(r.addLinkAttributes(i,t.url,t.newWindow),o=!0):t.action?(this._bindNamedAction(i,t.action),o=!0):t.attachment?(x(this,ny,ON).call(this,i,t.attachment,t.attachmentDest),o=!0):t.setOCGState?(x(this,ry,DN).call(this,i,t.setOCGState),o=!0):t.dest?(this._bindLink(i,t.dest),o=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),o=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),o=!0):this.isTooltipOnly&&!o&&(this._bindLink(i,""),o=!0)),this.container.classList.add("linkAnnotation"),o&&this.container.append(i),this.container}_bindLink(t,r){t.href=this.linkService.getDestinationHash(r),t.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&x(this,_o,B0).call(this)}_bindNamedAction(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(r),!1),x(this,_o,B0).call(this)}_bindJSAction(t,r){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const o of Object.keys(r.actions)){const s=i.get(o);s&&(t[s]=()=>{var a;return(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:o}}),!1})}t.onclick||(t.onclick=()=>!1),x(this,_o,B0).call(this)}_bindResetFormAction(t,r){const i=t.onclick;i||(t.href=this.linkService.getAnchorUrl("")),x(this,_o,B0).call(this),this._fieldObjects?t.onclick=()=>{var f;i==null||i();const{fields:o,refs:s,include:a}=r,c=[];if(o.length!==0||s.length!==0){const h=new Set(s);for(const p of o){const m=this._fieldObjects[p]||[];for(const{id:y}of m)h.add(y)}for(const p of Object.values(this._fieldObjects))for(const m of p)h.has(m.id)===a&&c.push(m)}else for(const h of Object.values(this._fieldObjects))c.push(...h);const u=this.annotationStorage,d=[];for(const h of c){const{id:p}=h;switch(d.push(p),h.type){case"text":{const y=h.defaultValue||"";u.setValue(p,{value:y});break}case"checkbox":case"radiobutton":{const y=h.defaultValue===h.exportValues;u.setValue(p,{value:y});break}case"combobox":case"listbox":{const y=h.defaultValue||"";u.setValue(p,{value:y});break}default:continue}const m=document.querySelector(`[data-element-id="${p}"]`);m&&(Qa.has(m)?m.dispatchEvent(new Event("resetform")):Ce(`_bindResetFormAction - element not allowed: ${p}`))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:d,name:"ResetForm"}})),!1}:(Ce('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(t.onclick=()=>!1))}}_o=new WeakSet,B0=function(){this.container.setAttribute("data-internal-link","")},ny=new WeakSet,ON=function(t,r,i=null){t.href=this.linkService.getAnchorUrl(""),r.description&&(t.title=r.description),t.onclick=()=>{var o;return(o=this.downloadManager)==null||o.openOrDownloadData(r.content,r.filename,i),!1},x(this,_o,B0).call(this)},ry=new WeakSet,DN=function(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(r),!1),x(this,_o,B0).call(this)};class ZZ extends yt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class Xa extends yt{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&(((t=e.previousSibling)==null?void 0:t.nodeName)==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return Bn.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,r,i,o){r.includes("mouse")?e.addEventListener(r,s=>{var a;(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s),shift:s.shiftKey,modifier:this._getKeyModifier(s)}})}):e.addEventListener(r,s=>{var a;if(r==="blur"){if(!t.focused||!s.relatedTarget)return;t.focused=!1}else if(r==="focus"){if(t.focused)return;t.focused=!0}o&&((a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(s)}}))})}_setEventListeners(e,t,r,i){var o,s,a;for(const[c,u]of r)(u==="Action"||(o=this.data.actions)!=null&&o[u])&&(u!=="Focus"&&u!=="Blur"||t||(t={focused:!1}),this._setEventListener(e,t,c,u,i),u!=="Focus"||(s=this.data.actions)!=null&&s.Blur?u!=="Blur"||(a=this.data.actions)!=null&&a.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":se.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||9,o=e.style;let s;const a=c=>Math.round(10*c)/10;if(this.data.multiLine){const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2),u=c/(Math.round(c/(y4*i))||1);s=Math.min(i,a(u/y4))}else{const c=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(i,a(c/y4))}o.fontSize=`calc(${s}px * var(--scale-factor))`,o.color=se.makeHexColor(r[0],r[1],r[2]),this.data.textAlignment!==null&&(o.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class WZ extends Xa{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,i){const o=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=r),o.setValue(s.id,{[i]:r})}render(){var i,o;const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const s=e.getValue(t,{value:this.data.fieldValue});let a=s.value||"";const c=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;c&&a.length>c&&(a=a.slice(0,c));let u=s.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
122
122
  `))||null;u&&this.data.comb&&(u=u.replaceAll(/\s+/g,""));const d={userValue:a,formattedValue:u,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=u??a,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",u??a),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),Qa.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=b2,this._setRequired(r,this.data.required),c&&(r.maxLength=c),r.addEventListener("input",h=>{e.setValue(t,{value:h.target.value}),this.setPropertyOnSiblings(r,"value",h.target.value,"value"),d.formattedValue=null}),r.addEventListener("resetform",h=>{const p=this.data.defaultFieldValue??"";r.value=d.userValue=p,d.formattedValue=null});let f=h=>{const{formattedValue:p}=d;p!=null&&(h.target.value=p),h.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",p=>{var y;if(d.focused)return;const{target:m}=p;d.userValue&&(m.value=d.userValue),d.lastCommittedValue=m.value,d.commitKey=1,(y=this.data.actions)!=null&&y.Focus||(d.focused=!0)}),r.addEventListener("updatefromsandbox",p=>{this.showElementAndHideCanvas(p.target);const m={value(y){d.userValue=y.detail.value??"",e.setValue(t,{value:d.userValue.toString()}),y.target.value=d.userValue},formattedValue(y){const{formattedValue:b}=y.detail;d.formattedValue=b,b!=null&&y.target!==document.activeElement&&(y.target.value=b),e.setValue(t,{formattedValue:b})},selRange(y){y.target.setSelectionRange(...y.detail.selRange)},charLimit:y=>{var k;const{charLimit:b}=y.detail,{target:w}=y;if(b===0){w.removeAttribute("maxLength");return}w.setAttribute("maxLength",b);let v=d.userValue;v&&!(v.length<=b)&&(v=v.slice(0,b),w.value=d.userValue=v,e.setValue(t,{value:v}),(k=this.linkService.eventBus)==null||k.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:v,willCommit:!0,commitKey:1,selStart:w.selectionStart,selEnd:w.selectionEnd}}))}};this._dispatchEventFromSandbox(m,p)}),r.addEventListener("keydown",p=>{var b;d.commitKey=1;let m=-1;if(p.key==="Escape"?m=0:p.key!=="Enter"||this.data.multiLine?p.key==="Tab"&&(d.commitKey=3):m=2,m===-1)return;const{value:y}=p.target;d.lastCommittedValue!==y&&(d.lastCommittedValue=y,d.userValue=y,(b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:y,willCommit:!0,commitKey:m,selStart:p.target.selectionStart,selEnd:p.target.selectionEnd}}))});const h=f;f=null,r.addEventListener("blur",p=>{var y,b;if(!d.focused||!p.relatedTarget)return;(y=this.data.actions)!=null&&y.Blur||(d.focused=!1);const{value:m}=p.target;d.userValue=m,d.lastCommittedValue!==m&&((b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:m,willCommit:!0,commitKey:d.commitKey,selStart:p.target.selectionStart,selEnd:p.target.selectionEnd}})),h(p)}),(o=this.data.actions)!=null&&o.Keystroke&&r.addEventListener("beforeinput",p=>{var T;d.lastCommittedValue=null;const{data:m,target:y}=p,{value:b,selectionStart:w,selectionEnd:v}=y;let k=w,C=v;switch(p.inputType){case"deleteWordBackward":{const S=b.substring(0,w).match(/\w*[^\w]*$/);S&&(k-=S[0].length);break}case"deleteWordForward":{const S=b.substring(w).match(/^[^\w]*\w*/);S&&(C+=S[0].length);break}case"deleteContentBackward":w===v&&(k-=1);break;case"deleteContentForward":w===v&&(C+=1)}p.preventDefault(),(T=this.linkService.eventBus)==null||T.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:b,change:m||"",willCommit:!1,selStart:k,selEnd:C}})}),this._setEventListeners(r,d,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],p=>p.target.value)}if(f&&r.addEventListener("blur",f),this.data.comb){const h=(this.data.rect[2]-this.data.rect[0])/c;r.classList.add("comb"),r.style.letterSpacing=`calc(${h}px * var(--scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class qZ extends Xa{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class KZ extends Xa{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,r=t.id;let i=e.getValue(r,{value:t.exportValue===t.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",e.setValue(r,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const o=document.createElement("input");return Qa.add(o),o.setAttribute("data-element-id",r),o.disabled=t.readOnly,this._setRequired(o,this.data.required),o.type="checkbox",o.name=t.fieldName,i&&o.setAttribute("checked",!0),o.setAttribute("exportValue",t.exportValue),o.tabIndex=b2,o.addEventListener("change",s=>{const{name:a,checked:c}=s.target;for(const u of this._getElementsByName(a,r)){const d=c&&u.exportValue===t.exportValue;u.domElement&&(u.domElement.checked=d),e.setValue(u.id,{value:d})}e.setValue(r,{value:c})}),o.addEventListener("resetform",s=>{const a=t.defaultFieldValue||"Off";s.target.checked=a===t.exportValue}),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",s=>{const a={value(c){c.target.checked=c.detail.value!=="Off",e.setValue(r,{value:c.target.checked})}};this._dispatchEventFromSandbox(a,s)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],s=>s.target.checked)),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class XM extends Xa{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,r=t.id;let i=e.getValue(r,{value:t.fieldValue===t.buttonValue}).value;if(typeof i=="string"&&(i=i!==t.buttonValue,e.setValue(r,{value:i})),i)for(const s of this._getElementsByName(t.fieldName,r))e.setValue(s.id,{value:!1});const o=document.createElement("input");if(Qa.add(o),o.setAttribute("data-element-id",r),o.disabled=t.readOnly,this._setRequired(o,this.data.required),o.type="radio",o.name=t.fieldName,i&&o.setAttribute("checked",!0),o.tabIndex=b2,o.addEventListener("change",s=>{const{name:a,checked:c}=s.target;for(const u of this._getElementsByName(a,r))e.setValue(u.id,{value:!1});e.setValue(r,{value:c})}),o.addEventListener("resetform",s=>{const a=t.defaultFieldValue;s.target.checked=a!=null&&a===t.buttonValue}),this.enableScripting&&this.hasJSActions){const s=t.buttonValue;o.addEventListener("updatefromsandbox",a=>{const c={value:u=>{const d=s===u.detail.value;for(const f of this._getElementsByName(u.target.name)){const h=d&&f.id===r;f.domElement&&(f.domElement.checked=h),e.setValue(f.id,{value:h})}}};this._dispatchEventFromSandbox(c,a)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)}return this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}}class GZ extends QM{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),e}}class YZ extends Xa{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,r=e.getValue(t,{value:this.data.fieldValue}),i=document.createElement("select");Qa.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=b2;let o=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",d=>{const f=this.data.defaultFieldValue;for(const h of i.options)h.selected=h.value===f});for(const d of this.data.options){const f=document.createElement("option");f.textContent=d.displayValue,f.value=d.exportValue,r.value.includes(d.exportValue)&&(f.setAttribute("selected",!0),o=!1),i.append(f)}let s=null;if(o){const d=document.createElement("option");d.value=" ",d.setAttribute("hidden",!0),d.setAttribute("selected",!0),i.prepend(d),s=()=>{d.remove(),i.removeEventListener("input",s),s=null},i.addEventListener("input",s)}const a=d=>{const f=d?"value":"textContent",{options:h,multiple:p}=i;return p?Array.prototype.filter.call(h,m=>m.selected).map(m=>m[f]):h.selectedIndex===-1?null:h[h.selectedIndex][f]};let c=a(!1);const u=d=>{const f=d.target.options;return Array.prototype.map.call(f,h=>({displayValue:h.textContent,exportValue:h.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",d=>{const f={value(h){s==null||s();const p=h.detail.value,m=new Set(Array.isArray(p)?p:[p]);for(const y of i.options)y.selected=m.has(y.value);e.setValue(t,{value:a(!0)}),c=a(!1)},multipleSelection(h){i.multiple=!0},remove(h){const p=i.options,m=h.detail.remove;p[m].selected=!1,i.remove(m),p.length>0&&Array.prototype.findIndex.call(p,y=>y.selected)===-1&&(p[0].selected=!0),e.setValue(t,{value:a(!0),items:u(h)}),c=a(!1)},clear(h){for(;i.length!==0;)i.remove(0);e.setValue(t,{value:null,items:[]}),c=a(!1)},insert(h){const{index:p,displayValue:m,exportValue:y}=h.detail.insert,b=i.children[p],w=document.createElement("option");w.textContent=m,w.value=y,b?b.before(w):i.append(w),e.setValue(t,{value:a(!0),items:u(h)}),c=a(!1)},items(h){const{items:p}=h.detail;for(;i.length!==0;)i.remove(0);for(const m of p){const{displayValue:y,exportValue:b}=m,w=document.createElement("option");w.textContent=y,w.value=b,i.append(w)}i.options.length>0&&(i.options[0].selected=!0),e.setValue(t,{value:a(!0),items:u(h)}),c=a(!1)},indices(h){const p=new Set(h.detail.indices);for(const m of h.target.options)m.selected=p.has(m.index);e.setValue(t,{value:a(!0)}),c=a(!1)},editable(h){h.target.disabled=!h.detail.editable}};this._dispatchEventFromSandbox(f,d)}),i.addEventListener("input",d=>{var p;const f=a(!0),h=a(!1);e.setValue(t,{value:f}),d.preventDefault(),(p=this.linkService.eventBus)==null||p.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:c,change:h,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],d=>d.target.value)):i.addEventListener("input",function(d){e.setValue(t,{value:a(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class q4 extends yt{constructor(e){const{data:t,elements:r}=e;super(e,{isRenderable:yt._hasPopupData(t)}),this.elements=r,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new QZ({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}),t=[];for(const r of this.elements)r.popup=e,t.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",t.map(r=>`${dM}${r}`).join(",")),this.container}}class QZ{constructor({container:e,color:t,elements:r,titleObj:i,modificationDate:o,contentsObj:s,richText:a,parent:c,rect:u,parentRect:d,open:f}){M(this,Tu);M(this,qh);M(this,sy);M(this,ay);M(this,ly);M(this,cy);M(this,xu);M(this,Iu);M(this,Kh);M(this,Su,x(this,ly,_N).bind(this));M(this,iy,x(this,Kh,Pv).bind(this));M(this,oy,x(this,Iu,d5).bind(this));M(this,Mu,x(this,xu,u5).bind(this));M(this,a0,null);M(this,ht,null);M(this,Lo,null);M(this,Eu,null);M(this,Hh,null);M(this,Uh,null);M(this,Au,null);M(this,Bo,!1);M(this,ri,null);M(this,Ro,null);M(this,Zh,null);M(this,$o,null);M(this,Wh,null);M(this,l0,null);M(this,c0,!1);var h;E(this,ht,e),E(this,Wh,i),E(this,Lo,s),E(this,$o,a),E(this,Uh,c),E(this,a0,t),E(this,Zh,u),E(this,Au,d),E(this,Hh,r),E(this,Eu,vM.toDateObject(o)),this.trigger=r.flatMap(p=>p.getElementsToTriggerPopup());for(const p of this.trigger)p.addEventListener("click",g(this,Mu)),p.addEventListener("mouseenter",g(this,oy)),p.addEventListener("mouseleave",g(this,iy)),p.classList.add("popupTriggerArea");for(const p of r)(h=p.container)==null||h.addEventListener("keydown",g(this,Su));g(this,ht).hidden=!0,f&&x(this,xu,u5).call(this)}render(){if(g(this,ri))return;const e=E(this,ri,document.createElement("div"));if(e.className="popup",g(this,a0)){const o=e.style.outlineColor=se.makeHexColor(...g(this,a0));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e.style.backgroundColor=`color-mix(in srgb, ${o} 30%, white)`:e.style.backgroundColor=se.makeHexColor(...g(this,a0).map(a=>Math.floor(.7*(255-a)+a)))}const t=document.createElement("span");t.className="header";const r=document.createElement("h1");if(t.append(r),{dir:r.dir,str:r.textContent}=g(this,Wh),e.append(t),g(this,Eu)){const o=document.createElement("span");o.classList.add("popupDate"),o.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),o.setAttribute("data-l10n-args",JSON.stringify({dateObj:g(this,Eu).valueOf()})),t.append(o)}const i=g(this,Tu,c5);if(i)YM.render({xfaHtml:i,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const o=this._formatContents(g(this,Lo));e.append(o)}g(this,ht).append(e)}_formatContents({str:e,dir:t}){const r=document.createElement("p");r.classList.add("popupContent"),r.dir=t;const i=e.split(/(?:\r\n?|\n)/);for(let o=0,s=i.length;o<s;++o){const a=i[o];r.append(document.createTextNode(a)),o<s-1&&r.append(document.createElement("br"))}return r}updateEdited({rect:e,popupContent:t}){var r;g(this,l0)||E(this,l0,{contentsObj:g(this,Lo),richText:g(this,$o)}),e&&E(this,Ro,null),t&&(E(this,$o,x(this,ay,PN).call(this,t)),E(this,Lo,null)),(r=g(this,ri))==null||r.remove(),E(this,ri,null)}resetEdited(){var e;g(this,l0)&&({contentsObj:Kn(this,Lo)._,richText:Kn(this,$o)._}=g(this,l0),E(this,l0,null),(e=g(this,ri))==null||e.remove(),E(this,ri,null),E(this,Ro,null))}forceHide(){E(this,c0,this.isVisible),g(this,c0)&&(g(this,ht).hidden=!0)}maybeShow(){g(this,c0)&&(g(this,ri)||x(this,Iu,d5).call(this),E(this,c0,!1),g(this,ht).hidden=!1)}get isVisible(){return g(this,ht).hidden===!1}}Su=new WeakMap,iy=new WeakMap,oy=new WeakMap,Mu=new WeakMap,a0=new WeakMap,ht=new WeakMap,Lo=new WeakMap,Eu=new WeakMap,Hh=new WeakMap,Uh=new WeakMap,Au=new WeakMap,Bo=new WeakMap,ri=new WeakMap,Ro=new WeakMap,Zh=new WeakMap,$o=new WeakMap,Wh=new WeakMap,l0=new WeakMap,c0=new WeakMap,Tu=new WeakSet,c5=function(){const e=g(this,$o),t=g(this,Lo);return!(e!=null&&e.str)||t!=null&&t.str&&t.str!==e.str?null:g(this,$o).html||null},qh=new WeakSet,Nv=function(){var e,t,r;return((r=(t=(e=g(this,Tu,c5))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:r.fontSize)||0},sy=new WeakSet,NN=function(){var e,t,r;return((r=(t=(e=g(this,Tu,c5))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:r.color)||null},ay=new WeakSet,PN=function(e){const t=[],r={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},i={style:{color:g(this,sy,NN),fontSize:g(this,qh,Nv)?`calc(${g(this,qh,Nv)}px * var(--scale-factor))`:""}};for(const o of e.split(`
123
123
  `))t.push({name:"span",value:o,attributes:i});return r},ly=new WeakSet,_N=function(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&g(this,Bo))&&x(this,xu,u5).call(this)},cy=new WeakSet,LN=function(){if(g(this,Ro)!==null)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:r,pageX:i,pageY:o}}}=g(this,Uh);let s=!!g(this,Au),a=s?g(this,Au):g(this,Zh);for(const p of g(this,Hh))if(!a||se.intersect(p.data.rect,a)!==null){a=p.data.rect,s=!0;break}const c=se.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),u=s?a[2]-a[0]+5:0,d=c[0]+u,f=c[1];E(this,Ro,[100*(d-i)/t,100*(f-o)/r]);const{style:h}=g(this,ht);h.left=`${g(this,Ro)[0]}%`,h.top=`${g(this,Ro)[1]}%`},xu=new WeakSet,u5=function(){E(this,Bo,!g(this,Bo)),g(this,Bo)?(x(this,Iu,d5).call(this),g(this,ht).addEventListener("click",g(this,Mu)),g(this,ht).addEventListener("keydown",g(this,Su))):(x(this,Kh,Pv).call(this),g(this,ht).removeEventListener("click",g(this,Mu)),g(this,ht).removeEventListener("keydown",g(this,Su)))},Iu=new WeakSet,d5=function(){g(this,ri)||this.render(),this.isVisible?g(this,Bo)&&g(this,ht).classList.add("focused"):(x(this,cy,LN).call(this),g(this,ht).hidden=!1,g(this,ht).style.zIndex=parseInt(g(this,ht).style.zIndex)+1e3)},Kh=new WeakSet,Pv=function(){g(this,ht).classList.remove("focused"),!g(this,Bo)&&this.isVisible&&(g(this,ht).hidden=!0,g(this,ht).style.zIndex=parseInt(g(this,ht).style.zIndex)-1e3)};class JM extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=Te.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const r=document.createElement("span");r.textContent=t,e.append(r)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class XZ extends yt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});M(this,Gh,null)}render(){this.container.classList.add("lineAnnotation");const t=this.data,{width:r,height:i}=fo(t.rect),o=this.svgFactory.create(r,i,!0),s=E(this,Gh,this.svgFactory.createElement("svg:line"));return s.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),s.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),s.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),s.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),s.setAttribute("stroke-width",t.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),o.append(s),this.container.append(o),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,Gh)}addHighlightArea(){this.container.classList.add("highlightArea")}}Gh=new WeakMap;class JZ extends yt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});M(this,Yh,null)}render(){this.container.classList.add("squareAnnotation");const t=this.data,{width:r,height:i}=fo(t.rect),o=this.svgFactory.create(r,i,!0),s=t.borderStyle.width,a=E(this,Yh,this.svgFactory.createElement("svg:rect"));return a.setAttribute("x",s/2),a.setAttribute("y",s/2),a.setAttribute("width",r-s),a.setAttribute("height",i-s),a.setAttribute("stroke-width",s||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),o.append(a),this.container.append(o),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,Yh)}addHighlightArea(){this.container.classList.add("highlightArea")}}Yh=new WeakMap;class eW extends yt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});M(this,Qh,null)}render(){this.container.classList.add("circleAnnotation");const t=this.data,{width:r,height:i}=fo(t.rect),o=this.svgFactory.create(r,i,!0),s=t.borderStyle.width,a=E(this,Qh,this.svgFactory.createElement("svg:ellipse"));return a.setAttribute("cx",r/2),a.setAttribute("cy",i/2),a.setAttribute("rx",r/2-s/2),a.setAttribute("ry",i/2-s/2),a.setAttribute("stroke-width",s||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),o.append(a),this.container.append(o),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,Qh)}addHighlightArea(){this.container.classList.add("highlightArea")}}Qh=new WeakMap;class eE extends yt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});M(this,Xh,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:r,borderStyle:i,popupRef:o}}=this;if(!r)return this.container;const{width:s,height:a}=fo(t),c=this.svgFactory.create(s,a,!0);let u=[];for(let f=0,h=r.length;f<h;f+=2){const p=r[f]-t[0],m=t[3]-r[f+1];u.push(`${p},${m}`)}u=u.join(" ");const d=E(this,Xh,this.svgFactory.createElement(this.svgElementName));return d.setAttribute("points",u),d.setAttribute("stroke-width",i.width||1),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),c.append(d),this.container.append(c),!o&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return g(this,Xh)}addHighlightArea(){this.container.classList.add("highlightArea")}}Xh=new WeakMap;class tW extends eE{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class nW extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class tE extends yt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});M(this,Jh,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=Te.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,inkLists:r,borderStyle:i,popupRef:o}}=this,{width:s,height:a}=fo(t),c=this.svgFactory.create(s,a,!0);for(const u of r){let d=[];for(let h=0,p=u.length;h<p;h+=2){const m=u[h]-t[0],y=t[3]-u[h+1];d.push(`${m},${y}`)}d=d.join(" ");const f=this.svgFactory.createElement(this.svgElementName);g(this,Jh).push(f),f.setAttribute("points",d),f.setAttribute("stroke-width",i.width||1),f.setAttribute("stroke","transparent"),f.setAttribute("fill","transparent"),!o&&this.hasPopupData&&this._createPopup(),c.append(f)}return this.container.append(c),this.container}getElementsToTriggerPopup(){return g(this,Jh)}addHighlightArea(){this.container.classList.add("highlightArea")}}Jh=new WeakMap;class rW extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class iW extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class oW extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class sW extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class nE extends yt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class aW extends yt{constructor(t){var i;super(t,{isRenderable:!0});M(this,t1);M(this,e1,null);const{file:r}=this.data;this.filename=r.filename,this.content=r.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:r}=this;let i;r.hasAppearance||r.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(r.name)?"paperclip":"pushpin"}.svg`,r.fillAlpha&&r.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*r.fillAlpha)}%);`)),i.addEventListener("dblclick",x(this,t1,_v).bind(this)),E(this,e1,i);const{isMac:o}=Bn.platform;return t.addEventListener("keydown",s=>{s.key==="Enter"&&(o?s.metaKey:s.ctrlKey)&&x(this,t1,_v).call(this)}),!r.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),t.append(i),t}getElementsToTriggerPopup(){return g(this,e1)}addHighlightArea(){this.container.classList.add("highlightArea")}}e1=new WeakMap,t1=new WeakSet,_v=function(){var t;(t=this.downloadManager)==null||t.openOrDownloadData(this.content,this.filename)};class lW{constructor({div:e,accessibilityManager:t,annotationCanvasMap:r,annotationEditorUIManager:i,page:o,viewport:s}){M(this,uy);M(this,r1);M(this,n1,null);M(this,u0,null);M(this,d0,new Map);this.div=e,E(this,n1,t),E(this,u0,r),this.page=o,this.viewport=s,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return g(this,d0).size>0}async render(e){var s;const{annotations:t}=e,r=this.div;Ka(r,this.viewport);const i=new Map,o={data:null,layer:r,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new A4,annotationStorage:e.annotationStorage||new _4,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const a of t){if(a.noHTML)continue;const c=a.annotationType===aM;if(c){const f=i.get(a.id);if(!f)continue;o.elements=f}else{const{width:f,height:h}=fo(a.rect);if(f<=0||h<=0)continue}o.data=a;const u=UZ.create(o);if(!u.isRenderable)continue;if(!c&&a.popupRef){const f=i.get(a.popupRef);f?f.push(u):i.set(a.popupRef,[u])}const d=u.render();a.hidden&&(d.style.visibility="hidden"),x(this,uy,BN).call(this,d,a.id),u._isEditable&&(g(this,d0).set(u.data.id,u),(s=this._annotationEditorUIManager)==null||s.renderAnnotationElement(u))}x(this,r1,Lv).call(this)}update({viewport:e}){const t=this.div;this.viewport=e,Ka(t,{rotation:e.rotation}),x(this,r1,Lv).call(this),t.hidden=!1}getEditableAnnotations(){return Array.from(g(this,d0).values())}getEditableAnnotation(e){return g(this,d0).get(e)}}n1=new WeakMap,u0=new WeakMap,d0=new WeakMap,uy=new WeakSet,BN=function(e,t){var i;const r=e.firstChild||e;r.id=`${dM}${t}`,this.div.append(e),(i=g(this,n1))==null||i.moveElementInDOM(this.div,e,r,!1)},r1=new WeakSet,Lv=function(){if(!g(this,u0))return;const e=this.div;for(const[t,r]of g(this,u0)){const i=e.querySelector(`[data-annotation-id="${t}"]`);if(!i)continue;r.className="annotationContent";const{firstChild:o}=i;o?o.nodeName==="CANVAS"?o.replaceWith(r):o.classList.contains("annotationContent")?o.after(r):o.before(r):i.append(r)}g(this,u0).clear()};const pm=/\r\n?|\n/g,Qe=class Qe extends je{constructor(t){super({...t,name:"freeTextEditor"});M(this,dy);M(this,fy);M(this,hy);M(this,Du);M(this,Pu);M(this,py);M(this,my);M(this,ii,void 0);M(this,lr,"");M(this,i1,`${this.id}-editor`);M(this,f0,null);M(this,cr,void 0);M(this,Ou,null);E(this,ii,t.color||Qe._defaultColor||je._defaultLineColor),E(this,cr,t.fontSize||Qe._defaultFontSize)}static get _keyboardManager(){const t=Qe.prototype,r=s=>s.isEmpty(),i=Ga.TRANSLATE_SMALL,o=Ga.TRANSLATE_BIG;return Ie(this,"_keyboardManager",new u2([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-o,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[o,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-o],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,o],checker:r}]]))}static initialize(t,r){je.initialize(t,r,{strings:["pdfjs-free-text-default-content"]});const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,r){switch(t){case he.FREETEXT_SIZE:Qe._defaultFontSize=r;break;case he.FREETEXT_COLOR:Qe._defaultColor=r}}updateParams(t,r){switch(t){case he.FREETEXT_SIZE:x(this,dy,RN).call(this,r);break;case he.FREETEXT_COLOR:x(this,fy,$N).call(this,r)}}static get defaultPropertiesToUpdate(){return[[he.FREETEXT_SIZE,Qe._defaultFontSize],[he.FREETEXT_COLOR,Qe._defaultColor||je._defaultLineColor]]}get propertiesToUpdate(){return[[he.FREETEXT_SIZE,g(this,cr)],[he.FREETEXT_COLOR,g(this,ii)]]}_translateEmpty(t,r){this._uiManager.translateSelectedEditors(t,r,!0)}getInitialTranslation(){const t=this.parentScale;return[-Qe._internalPadding*t,-(Qe._internalPadding+g(this,cr))*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(Te.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),E(this,f0,new AbortController);const t=this._uiManager.combinedSignal(g(this,f0));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t})}disableEditMode(){var t;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",g(this,i1)),this._isDraggable=!0,(t=g(this,f0))==null||t.abort(),E(this,f0,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var t;this.width||(this.enableEditMode(),this.editorDiv.focus(),(t=this._initialOptions)!=null&&t.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=g(this,lr),r=E(this,lr,x(this,hy,VN).call(this).trimEnd());if(t===r)return;const i=o=>{E(this,lr,o),o?(x(this,Pu,p5).call(this),this._uiManager.rebuild(this),x(this,Du,f5).call(this)):this.remove()};this.addCommands({cmd:()=>{i(r)},undo:()=>{i(t)},mustExec:!1}),x(this,Du,f5).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){Qe._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let t,r;this.width&&(t=this.x,r=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",g(this,i1)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),je._l10nPromise.get("pdfjs-free-text-default-content").then(o=>{var s;return(s=this.editorDiv)==null?void 0:s.setAttribute("default-content",o)}),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${g(this,cr)}px * var(--scale-factor))`,i.color=g(this,ii),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),am(this,this.div,["dblclick","keydown"]),this.width){const[o,s]=this.parentDimensions;if(this.annotationElementId){const{position:a}=g(this,Ou);let[c,u]=this.getInitialTranslation();[c,u]=this.pageTranslationToScreen(c,u);const[d,f]=this.pageDimensions,[h,p]=this.pageTranslation;let m,y;switch(this.rotation){case 0:m=t+(a[0]-h)/d,y=r+this.height-(a[1]-p)/f;break;case 90:m=t+(a[0]-h)/d,y=r-(a[1]-p)/f,[c,u]=[u,-c];break;case 180:m=t-this.width+(a[0]-h)/d,y=r-(a[1]-p)/f,[c,u]=[-c,-u];break;case 270:m=t+(a[0]-h-this.height*f)/d,y=r+(a[1]-p-this.width*d)/f,[c,u]=[-u,c]}this.setAt(m*o,y*s,c,u)}else this.setAt(t*o,r*s,this.width*o,this.height*s);x(this,Pu,p5).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var m,y,b;const r=t.clipboardData||window.clipboardData,{types:i}=r;if(i.length===1&&i[0]==="text/plain")return;t.preventDefault();const o=x(m=Qe,o1,Bv).call(m,r.getData("text")||"").replaceAll(pm,`
124
124
  `);if(!o)return;const s=window.getSelection();if(!s.rangeCount)return;this.editorDiv.normalize(),s.deleteFromDocument();const a=s.getRangeAt(0);if(!o.includes(`
@@ -224,7 +224,7 @@ img.ProseMirror-separator {
224
224
  `)}function mx(n){return[gJ(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var q2;process.env.NODE_ENV!=="production"&&yJ();function yJ(){q2=new Set}function bo(n,e){if(n&&!q2.has(e)){var t;q2.add(e),(t=console).warn.apply(t,mx(e))}}function C7(n,e){if(n&&!q2.has(e)){var t;q2.add(e),(t=console).error.apply(t,mx(e))}}function bJ(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;C7(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),C7(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var gx={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},wJ={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ir=Object.assign({appendTo:ox,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},gx,wJ),vJ=Object.keys(ir),CJ=function(e){process.env.NODE_ENV!=="production"&&wx(e,[]);var t=Object.keys(e);t.forEach(function(r){ir[r]=e[r]})};function yx(n){var e=n.plugins||[],t=e.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=n[o]!==void 0?n[o]:(a=ir[o])!=null?a:s}return r},{});return Object.assign({},n,t)}function kJ(n,e){var t=e?Object.keys(yx(Object.assign({},ir,{plugins:e}))):vJ,r=t.reduce(function(i,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function bx(n,e){var t=Object.assign({},e,{content:sx(e.content,[n])},e.ignoreAttributes?{}:kJ(n,e.plugins));return t.aria=Object.assign({},ir.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function wx(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var i=tJ(ir,Object.keys(gx)),o=!eJ(i,r);o&&(o=e.filter(function(s){return s.name===r}).length===0),bo(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
225
225
 
226
226
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
227
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var SJ=function(){return"innerHTML"};function k7(n,e){n[SJ()]=e}function vx(n){var e=Z2();return n===!0?e.className=rx:(e.className=ix,W2(n)?e.appendChild(n):k7(e,n)),e}function Cx(n,e){W2(e.content)?(k7(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?k7(n,e.content):n.textContent=e.content)}function S7(n){var e=n.firstElementChild,t=eg(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(nx)}),arrow:t.find(function(r){return r.classList.contains(rx)||r.classList.contains(ix)}),backdrop:t.find(function(r){return r.classList.contains(JX)})}}function kx(n){var e=Z2(),t=Z2();t.className=XX,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Z2();r.className=nx,r.setAttribute("data-state","hidden"),Cx(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props);function i(o,s){var a=S7(e),c=a.box,u=a.content,d=a.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&Cx(u,n.props),s.arrow?d?o.arrow!==s.arrow&&(c.removeChild(d),c.appendChild(vx(s.arrow))):c.appendChild(vx(s.arrow)):d&&c.removeChild(d)}return{popper:e,onUpdate:i}}kx.$$tippy=!0;var MJ=1,tg=[],M7=[];function EJ(n,e){var t=bx(n,Object.assign({},ir,yx(cx(e)))),r,i,o,s=!1,a=!1,c=!1,u=!1,d,f,h,p=[],m=ax(Xi,t.interactiveDebounce),y,b=MJ++,w=null,v=rJ(t.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:b,reference:n,popper:Z2(),popperInstance:w,props:t,state:k,plugins:v,clearDelayTimeouts:z,setProps:G,setContent:Ae,show:ct,hide:Qo,hideWithInteractivity:ad,enable:di,disable:Ge,unmount:xa,destroy:Xo};if(!t.render)return process.env.NODE_ENV!=="production"&&C7(!0,"render() function has not been supplied."),C;var T=t.render(C),S=T.popper,A=T.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+C.id,C.popper=S,n._tippy=C,S._tippy=C;var D=v.map(function(U){return U.fn(C)}),I=n.hasAttribute("aria-expanded");return He(),ae(),W(),F("onCreate",[C]),t.showOnCreate&&eo(),S.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&$().addEventListener("mousemove",m)}),C;function P(){var U=C.props.touch;return Array.isArray(U)?U:[U,0]}function O(){return P()[0]==="hold"}function _(){var U;return!!((U=C.props.render)!=null&&U.$$tippy)}function B(){return y||n}function $(){var U=B().parentNode;return U?cJ(U):document}function R(){return S7(S)}function N(U){return C.state.isMounted&&!C.state.isVisible||Ci.isTouch||d&&d.type==="focus"?0:y7(C.props.delay,U?0:1,ir.delay)}function W(U){U===void 0&&(U=!1),S.style.pointerEvents=C.props.interactive&&!U?"":"none",S.style.zIndex=""+C.props.zIndex}function F(U,ie,fe){if(fe===void 0&&(fe=!0),D.forEach(function(Le){Le[U]&&Le[U].apply(Le,ie)}),fe){var Ue;(Ue=C.props)[U].apply(Ue,ie)}}function K(){var U=C.props.aria;if(U.content){var ie="aria-"+U.content,fe=S.id,Ue=Mc(C.props.triggerTarget||n);Ue.forEach(function(Le){var xn=Le.getAttribute(ie);if(C.state.isVisible)Le.setAttribute(ie,xn?xn+" "+fe:fe);else{var $r=xn&&xn.replace(fe,"").trim();$r?Le.setAttribute(ie,$r):Le.removeAttribute(ie)}})}}function ae(){if(!(I||!C.props.aria.expanded)){var U=Mc(C.props.triggerTarget||n);U.forEach(function(ie){C.props.interactive?ie.setAttribute("aria-expanded",C.state.isVisible&&ie===B()?"true":"false"):ie.removeAttribute("aria-expanded")})}}function de(){$().removeEventListener("mousemove",m),tg=tg.filter(function(U){return U!==m})}function Q(U){if(!(Ci.isTouch&&(c||U.type==="mousedown"))){var ie=U.composedPath&&U.composedPath()[0]||U.target;if(!(C.props.interactive&&dx(S,ie))){if(Mc(C.props.triggerTarget||n).some(function(fe){return dx(fe,ie)})){if(Ci.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[C,U]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||q())}}}function Z(){c=!0}function H(){c=!1}function j(){var U=$();U.addEventListener("mousedown",Q,!0),U.addEventListener("touchend",Q,pl),U.addEventListener("touchstart",H,pl),U.addEventListener("touchmove",Z,pl)}function q(){var U=$();U.removeEventListener("mousedown",Q,!0),U.removeEventListener("touchend",Q,pl),U.removeEventListener("touchstart",H,pl),U.removeEventListener("touchmove",Z,pl)}function ne(U,ie){Oe(U,function(){!C.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&ie()})}function le(U,ie){Oe(U,ie)}function Oe(U,ie){var fe=R().box;function Ue(Le){Le.target===fe&&(v7(fe,"remove",Ue),ie())}if(U===0)return ie();v7(fe,"remove",f),v7(fe,"add",Ue),f=Ue}function Ee(U,ie,fe){fe===void 0&&(fe=!1);var Ue=Mc(C.props.triggerTarget||n);Ue.forEach(function(Le){Le.addEventListener(U,ie,fe),p.push({node:Le,eventType:U,handler:ie,options:fe})})}function He(){O()&&(Ee("touchstart",qn,{passive:!0}),Ee("touchend",ui,{passive:!0})),nJ(C.props.trigger).forEach(function(U){if(U!=="manual")switch(Ee(U,qn),U){case"mouseenter":Ee("mouseleave",ui);break;case"focus":Ee(mJ?"focusout":"blur",pn);break;case"focusin":Ee("focusout",pn);break}})}function At(){p.forEach(function(U){var ie=U.node,fe=U.eventType,Ue=U.handler,Le=U.options;ie.removeEventListener(fe,Ue,Le)}),p=[]}function qn(U){var ie,fe=!1;if(!(!C.state.isEnabled||Ji(U)||a)){var Ue=((ie=d)==null?void 0:ie.type)==="focus";d=U,y=U.currentTarget,ae(),!C.state.isVisible&&sJ(U)&&tg.forEach(function(Le){return Le(U)}),U.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?fe=!0:eo(U),U.type==="click"&&(s=!fe),fe&&!Ue&&Rr(U)}}function Xi(U){var ie=U.target,fe=B().contains(ie)||S.contains(ie);if(!(U.type==="mousemove"&&fe)){var Ue=Tn().concat(S).map(function(Le){var xn,$r=Le._tippy,ld=(xn=$r.popperInstance)==null?void 0:xn.state;return ld?{popperRect:Le.getBoundingClientRect(),popperState:ld,props:t}:null}).filter(Boolean);uJ(Ue,U)&&(de(),Rr(U))}}function ui(U){var ie=Ji(U)||C.props.trigger.indexOf("click")>=0&&s;if(!ie){if(C.props.interactive){C.hideWithInteractivity(U);return}Rr(U)}}function pn(U){C.props.trigger.indexOf("focusin")<0&&U.target!==B()||C.props.interactive&&U.relatedTarget&&S.contains(U.relatedTarget)||Rr(U)}function Ji(U){return Ci.isTouch?O()!==U.type.indexOf("touch")>=0:!1}function Aa(){Ta();var U=C.props,ie=U.popperOptions,fe=U.placement,Ue=U.offset,Le=U.getReferenceClientRect,xn=U.moveTransition,$r=_()?S7(S).arrow:null,ld=Le?{getBoundingClientRect:Le,contextElement:Le.contextElement||B()}:n,QD={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Gy){var cd=Gy.state;if(_()){var Ofe=R(),ov=Ofe.box;["placement","reference-hidden","escaped"].forEach(function(Yy){Yy==="placement"?ov.setAttribute("data-placement",cd.placement):cd.attributes.popper["data-popper-"+Yy]?ov.setAttribute("data-"+Yy,""):ov.removeAttribute("data-"+Yy)}),cd.attributes.popper={}}}},L0=[{name:"offset",options:{offset:Ue}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!xn}},QD];_()&&$r&&L0.push({name:"arrow",options:{element:$r,padding:3}}),L0.push.apply(L0,(ie==null?void 0:ie.modifiers)||[]),C.popperInstance=QX(ld,S,Object.assign({},ie,{placement:fe,onFirstUpdate:h,modifiers:L0}))}function Ta(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function _t(){var U=C.props.appendTo,ie,fe=B();C.props.interactive&&U===ox||U==="parent"?ie=fe.parentNode:ie=sx(U,[fe]),ie.contains(S)||ie.appendChild(S),C.state.isMounted=!0,Aa(),process.env.NODE_ENV!=="production"&&bo(C.props.interactive&&U===ir.appendTo&&fe.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
227
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var SJ=function(){return"innerHTML"};function k7(n,e){n[SJ()]=e}function vx(n){var e=Z2();return n===!0?e.className=rx:(e.className=ix,W2(n)?e.appendChild(n):k7(e,n)),e}function Cx(n,e){W2(e.content)?(k7(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?k7(n,e.content):n.textContent=e.content)}function S7(n){var e=n.firstElementChild,t=eg(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(nx)}),arrow:t.find(function(r){return r.classList.contains(rx)||r.classList.contains(ix)}),backdrop:t.find(function(r){return r.classList.contains(JX)})}}function kx(n){var e=Z2(),t=Z2();t.className=XX,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Z2();r.className=nx,r.setAttribute("data-state","hidden"),Cx(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props);function i(o,s){var a=S7(e),c=a.box,u=a.content,d=a.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&Cx(u,n.props),s.arrow?d?o.arrow!==s.arrow&&(c.removeChild(d),c.appendChild(vx(s.arrow))):c.appendChild(vx(s.arrow)):d&&c.removeChild(d)}return{popper:e,onUpdate:i}}kx.$$tippy=!0;var MJ=1,tg=[],M7=[];function EJ(n,e){var t=bx(n,Object.assign({},ir,yx(cx(e)))),r,i,o,s=!1,a=!1,c=!1,u=!1,d,f,h,p=[],m=ax(Xi,t.interactiveDebounce),y,b=MJ++,w=null,v=rJ(t.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:b,reference:n,popper:Z2(),popperInstance:w,props:t,state:k,plugins:v,clearDelayTimeouts:z,setProps:G,setContent:Ae,show:ct,hide:Qo,hideWithInteractivity:ad,enable:di,disable:Ge,unmount:xa,destroy:Xo};if(!t.render)return process.env.NODE_ENV!=="production"&&C7(!0,"render() function has not been supplied."),C;var T=t.render(C),S=T.popper,A=T.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+C.id,C.popper=S,n._tippy=C,S._tippy=C;var D=v.map(function(U){return U.fn(C)}),I=n.hasAttribute("aria-expanded");return He(),ae(),W(),F("onCreate",[C]),t.showOnCreate&&eo(),S.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&$().addEventListener("mousemove",m)}),C;function P(){var U=C.props.touch;return Array.isArray(U)?U:[U,0]}function O(){return P()[0]==="hold"}function _(){var U;return!!((U=C.props.render)!=null&&U.$$tippy)}function B(){return y||n}function $(){var U=B().parentNode;return U?cJ(U):document}function R(){return S7(S)}function N(U){return C.state.isMounted&&!C.state.isVisible||Ci.isTouch||d&&d.type==="focus"?0:y7(C.props.delay,U?0:1,ir.delay)}function W(U){U===void 0&&(U=!1),S.style.pointerEvents=C.props.interactive&&!U?"":"none",S.style.zIndex=""+C.props.zIndex}function F(U,ie,fe){if(fe===void 0&&(fe=!0),D.forEach(function(Le){Le[U]&&Le[U].apply(Le,ie)}),fe){var Ue;(Ue=C.props)[U].apply(Ue,ie)}}function K(){var U=C.props.aria;if(U.content){var ie="aria-"+U.content,fe=S.id,Ue=Mc(C.props.triggerTarget||n);Ue.forEach(function(Le){var xn=Le.getAttribute(ie);if(C.state.isVisible)Le.setAttribute(ie,xn?xn+" "+fe:fe);else{var $r=xn&&xn.replace(fe,"").trim();$r?Le.setAttribute(ie,$r):Le.removeAttribute(ie)}})}}function ae(){if(!(I||!C.props.aria.expanded)){var U=Mc(C.props.triggerTarget||n);U.forEach(function(ie){C.props.interactive?ie.setAttribute("aria-expanded",C.state.isVisible&&ie===B()?"true":"false"):ie.removeAttribute("aria-expanded")})}}function de(){$().removeEventListener("mousemove",m),tg=tg.filter(function(U){return U!==m})}function Q(U){if(!(Ci.isTouch&&(c||U.type==="mousedown"))){var ie=U.composedPath&&U.composedPath()[0]||U.target;if(!(C.props.interactive&&dx(S,ie))){if(Mc(C.props.triggerTarget||n).some(function(fe){return dx(fe,ie)})){if(Ci.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[C,U]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||q())}}}function Z(){c=!0}function H(){c=!1}function j(){var U=$();U.addEventListener("mousedown",Q,!0),U.addEventListener("touchend",Q,pl),U.addEventListener("touchstart",H,pl),U.addEventListener("touchmove",Z,pl)}function q(){var U=$();U.removeEventListener("mousedown",Q,!0),U.removeEventListener("touchend",Q,pl),U.removeEventListener("touchstart",H,pl),U.removeEventListener("touchmove",Z,pl)}function ne(U,ie){Oe(U,function(){!C.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&ie()})}function le(U,ie){Oe(U,ie)}function Oe(U,ie){var fe=R().box;function Ue(Le){Le.target===fe&&(v7(fe,"remove",Ue),ie())}if(U===0)return ie();v7(fe,"remove",f),v7(fe,"add",Ue),f=Ue}function Ee(U,ie,fe){fe===void 0&&(fe=!1);var Ue=Mc(C.props.triggerTarget||n);Ue.forEach(function(Le){Le.addEventListener(U,ie,fe),p.push({node:Le,eventType:U,handler:ie,options:fe})})}function He(){O()&&(Ee("touchstart",qn,{passive:!0}),Ee("touchend",ui,{passive:!0})),nJ(C.props.trigger).forEach(function(U){if(U!=="manual")switch(Ee(U,qn),U){case"mouseenter":Ee("mouseleave",ui);break;case"focus":Ee(mJ?"focusout":"blur",pn);break;case"focusin":Ee("focusout",pn);break}})}function At(){p.forEach(function(U){var ie=U.node,fe=U.eventType,Ue=U.handler,Le=U.options;ie.removeEventListener(fe,Ue,Le)}),p=[]}function qn(U){var ie,fe=!1;if(!(!C.state.isEnabled||Ji(U)||a)){var Ue=((ie=d)==null?void 0:ie.type)==="focus";d=U,y=U.currentTarget,ae(),!C.state.isVisible&&sJ(U)&&tg.forEach(function(Le){return Le(U)}),U.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?fe=!0:eo(U),U.type==="click"&&(s=!fe),fe&&!Ue&&Rr(U)}}function Xi(U){var ie=U.target,fe=B().contains(ie)||S.contains(ie);if(!(U.type==="mousemove"&&fe)){var Ue=Tn().concat(S).map(function(Le){var xn,$r=Le._tippy,ld=(xn=$r.popperInstance)==null?void 0:xn.state;return ld?{popperRect:Le.getBoundingClientRect(),popperState:ld,props:t}:null}).filter(Boolean);uJ(Ue,U)&&(de(),Rr(U))}}function ui(U){var ie=Ji(U)||C.props.trigger.indexOf("click")>=0&&s;if(!ie){if(C.props.interactive){C.hideWithInteractivity(U);return}Rr(U)}}function pn(U){C.props.trigger.indexOf("focusin")<0&&U.target!==B()||C.props.interactive&&U.relatedTarget&&S.contains(U.relatedTarget)||Rr(U)}function Ji(U){return Ci.isTouch?O()!==U.type.indexOf("touch")>=0:!1}function Aa(){Ta();var U=C.props,ie=U.popperOptions,fe=U.placement,Ue=U.offset,Le=U.getReferenceClientRect,xn=U.moveTransition,$r=_()?S7(S).arrow:null,ld=Le?{getBoundingClientRect:Le,contextElement:Le.contextElement||B()}:n,QD={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Gy){var cd=Gy.state;if(_()){var xfe=R(),ov=xfe.box;["placement","reference-hidden","escaped"].forEach(function(Yy){Yy==="placement"?ov.setAttribute("data-placement",cd.placement):cd.attributes.popper["data-popper-"+Yy]?ov.setAttribute("data-"+Yy,""):ov.removeAttribute("data-"+Yy)}),cd.attributes.popper={}}}},L0=[{name:"offset",options:{offset:Ue}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!xn}},QD];_()&&$r&&L0.push({name:"arrow",options:{element:$r,padding:3}}),L0.push.apply(L0,(ie==null?void 0:ie.modifiers)||[]),C.popperInstance=QX(ld,S,Object.assign({},ie,{placement:fe,onFirstUpdate:h,modifiers:L0}))}function Ta(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function _t(){var U=C.props.appendTo,ie,fe=B();C.props.interactive&&U===ox||U==="parent"?ie=fe.parentNode:ie=sx(U,[fe]),ie.contains(S)||ie.appendChild(S),C.state.isMounted=!0,Aa(),process.env.NODE_ENV!=="production"&&bo(C.props.interactive&&U===ir.appendTo&&fe.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
228
228
 
229
229
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
230
230
 
@@ -386,7 +386,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
386
386
  }
387
387
  `);this.responsiveStyleElement.innerHTML=o}},destroyResponsiveStyle:function(){this.responsiveStyleElement&&(document.head.removeChild(this.responsiveStyleElement),this.responsiveStyleElement=null)},destroyStyleElement:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},dataToRender:function(e){var t=e||this.processedData;if(t&&this.paginator){var r=this.lazy?0:this.d_first;return t.slice(r,r+this.d_rows)}return t},getVirtualScrollerRef:function(){return this.$refs.virtualScroller},hasSpacerStyle:function(e){return V.isNotEmpty(e)}},computed:{columns:function(){var e=this.d_columns.get(this);if(this.reorderableColumns&&this.d_columnOrder){var t=[],r=_f(this.d_columnOrder),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=this.findColumnByKey(e,o);s&&!this.columnProp(s,"hidden")&&t.push(s)}}catch(a){r.e(a)}finally{r.f()}return[].concat(t,et(e.filter(function(a){return t.indexOf(a)<0})))}return e},columnGroups:function(){return this.d_columnGroups.get(this)},headerColumnGroup:function(){var e,t=this;return(e=this.columnGroups)===null||e===void 0?void 0:e.find(function(r){return t.columnProp(r,"type")==="header"})},footerColumnGroup:function(){var e,t=this;return(e=this.columnGroups)===null||e===void 0?void 0:e.find(function(r){return t.columnProp(r,"type")==="footer"})},hasFilters:function(){return this.filters&&Object.keys(this.filters).length>0&&this.filters.constructor===Object},processedData:function(){var e,t=this.value||[];return!this.lazy&&!((e=this.virtualScrollerOptions)!==null&&e!==void 0&&e.lazy)&&t&&t.length&&(this.hasFilters&&(t=this.filter(t)),this.sorted&&(this.sortMode==="single"?t=this.sortSingle(t):this.sortMode==="multiple"&&(t=this.sortMultiple(t)))),t},totalRecordsLength:function(){if(this.lazy)return this.totalRecords;var e=this.processedData;return e?e.length:0},empty:function(){var e=this.processedData;return!e||e.length===0},paginatorTop:function(){return this.paginator&&(this.paginatorPosition!=="bottom"||this.paginatorPosition==="both")},paginatorBottom:function(){return this.paginator&&(this.paginatorPosition!=="top"||this.paginatorPosition==="both")},sorted:function(){return this.d_sortField||this.d_multiSortMeta&&this.d_multiSortMeta.length>0},allRowsSelected:function(){var e=this;if(this.selectAll!==null)return this.selectAll;var t=this.frozenValue?[].concat(et(this.frozenValue),et(this.processedData)):this.processedData;return V.isNotEmpty(t)&&this.selection&&Array.isArray(this.selection)&&t.every(function(r){return e.selection.some(function(i){return e.equals(i,r)})})},attributeSelector:function(){return Fr()},groupRowSortField:function(){return this.sortMode==="single"?this.sortField:this.d_groupRowsSortMeta?this.d_groupRowsSortMeta.field:null},virtualScrollerDisabled:function(){return V.isEmpty(this.virtualScrollerOptions)||!this.scrollable}},components:{DTPaginator:rD,DTTableHeader:ND,DTTableBody:wD,DTTableFooter:MD,DTVirtualScroller:Vw,ArrowDownIcon:EO,ArrowUpIcon:AO,SpinnerIcon:cf}};function Lf(n){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lf(n)}function RD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function $D(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?RD(Object(t),!0).forEach(function(r){n2e(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):RD(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function n2e(n,e,t){return e=r2e(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function r2e(n){var e=i2e(n,"string");return Lf(e)=="symbol"?e:String(e)}function i2e(n,e){if(Lf(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function o2e(n,e,t,r,i,o){var s=l.resolveComponent("SpinnerIcon"),a=l.resolveComponent("DTPaginator"),c=l.resolveComponent("DTTableHeader"),u=l.resolveComponent("DTTableBody"),d=l.resolveComponent("DTTableFooter"),f=l.resolveComponent("DTVirtualScroller");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:n.cx("root"),"data-scrollselectors":".p-datatable-wrapper"},n.ptmi("root")),[l.renderSlot(n.$slots,"default"),n.loading?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:n.cx("loadingOverlay")},n.ptm("loadingOverlay")),[n.$slots.loading?l.renderSlot(n.$slots,"loading",{key:0}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[n.$slots.loadingicon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.$slots.loadingicon),{key:0,class:l.normalizeClass(n.cx("loadingIcon"))},null,8,["class"])):n.loadingIcon?(l.openBlock(),l.createElementBlock("i",l.mergeProps({key:1,class:[n.cx("loadingIcon"),"pi-spin",n.loadingIcon]},n.ptm("loadingIcon")),null,16)):(l.openBlock(),l.createBlock(s,l.mergeProps({key:2,spin:"",class:n.cx("loadingIcon")},n.ptm("loadingIcon")),null,16,["class"]))],64))],16)):l.createCommentVNode("",!0),n.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:n.cx("header")},n.ptm("header")),[l.renderSlot(n.$slots,"header")],16)):l.createCommentVNode("",!0),o.paginatorTop?(l.openBlock(),l.createBlock(a,{key:2,rows:i.d_rows,first:i.d_first,totalRecords:o.totalRecordsLength,pageLinkSize:n.pageLinkSize,template:n.paginatorTemplate,rowsPerPageOptions:n.rowsPerPageOptions,currentPageReportTemplate:n.currentPageReportTemplate,class:l.normalizeClass(n.cx("paginator")),onPage:e[0]||(e[0]=function(h){return o.onPage(h)}),alwaysShow:n.alwaysShowPaginator,unstyled:n.unstyled,pt:n.ptm("paginator")},l.createSlots({_:2},[n.$slots.paginatorstart?{name:"start",fn:l.withCtx(function(){return[l.renderSlot(n.$slots,"paginatorstart")]}),key:"0"}:void 0,n.$slots.paginatorend?{name:"end",fn:l.withCtx(function(){return[l.renderSlot(n.$slots,"paginatorend")]}),key:"1"}:void 0,n.$slots.paginatorfirstpagelinkicon?{name:"firstpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorfirstpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"2"}:void 0,n.$slots.paginatorprevpagelinkicon?{name:"prevpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorprevpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"3"}:void 0,n.$slots.paginatornextpagelinkicon?{name:"nextpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatornextpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"4"}:void 0,n.$slots.paginatorlastpagelinkicon?{name:"lastpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorlastpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"5"}:void 0,n.$slots.paginatorjumptopagedropdownicon?{name:"jumptopagedropdownicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorjumptopagedropdownicon",{class:l.normalizeClass(h.class)})]}),key:"6"}:void 0,n.$slots.paginatorrowsperpagedropdownicon?{name:"rowsperpagedropdownicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorrowsperpagedropdownicon",{class:l.normalizeClass(h.class)})]}),key:"7"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:n.cx("wrapper"),style:[n.sx("wrapper"),{maxHeight:o.virtualScrollerDisabled?n.scrollHeight:""}]},n.ptm("wrapper")),[l.createVNode(f,l.mergeProps({ref:"virtualScroller"},n.virtualScrollerOptions,{items:o.processedData,columns:o.columns,style:n.scrollHeight!=="flex"?{height:n.scrollHeight}:void 0,scrollHeight:n.scrollHeight!=="flex"?void 0:"100%",disabled:o.virtualScrollerDisabled,loaderDisabled:"",inline:"",autoSize:"",showSpacer:!1,pt:n.ptm("virtualScroller")}),{content:l.withCtx(function(h){return[l.createElementVNode("table",l.mergeProps({ref:"table",role:"table",class:[n.cx("table"),n.tableClass],style:[n.tableStyle,h.spacerStyle]},$D($D({},n.tableProps),n.ptm("table"))),[l.createVNode(c,{columnGroup:o.headerColumnGroup,columns:h.columns,rowGroupMode:n.rowGroupMode,groupRowsBy:n.groupRowsBy,groupRowSortField:o.groupRowSortField,reorderableColumns:n.reorderableColumns,resizableColumns:n.resizableColumns,allRowsSelected:o.allRowsSelected,empty:o.empty,sortMode:n.sortMode,sortField:i.d_sortField,sortOrder:i.d_sortOrder,multiSortMeta:i.d_multiSortMeta,filters:i.d_filters,filtersStore:n.filters,filterDisplay:n.filterDisplay,filterInputProps:n.filterInputProps,onColumnClick:e[1]||(e[1]=function(p){return o.onColumnHeaderClick(p)}),onColumnMousedown:e[2]||(e[2]=function(p){return o.onColumnHeaderMouseDown(p)}),onFilterChange:o.onFilterChange,onFilterApply:o.onFilterApply,onColumnDragstart:e[3]||(e[3]=function(p){return o.onColumnHeaderDragStart(p)}),onColumnDragover:e[4]||(e[4]=function(p){return o.onColumnHeaderDragOver(p)}),onColumnDragleave:e[5]||(e[5]=function(p){return o.onColumnHeaderDragLeave(p)}),onColumnDrop:e[6]||(e[6]=function(p){return o.onColumnHeaderDrop(p)}),onColumnResizestart:e[7]||(e[7]=function(p){return o.onColumnResizeStart(p)}),onCheckboxChange:e[8]||(e[8]=function(p){return o.toggleRowsWithCheckbox(p)}),unstyled:n.unstyled,pt:n.pt},null,8,["columnGroup","columns","rowGroupMode","groupRowsBy","groupRowSortField","reorderableColumns","resizableColumns","allRowsSelected","empty","sortMode","sortField","sortOrder","multiSortMeta","filters","filtersStore","filterDisplay","filterInputProps","onFilterChange","onFilterApply","unstyled","pt"]),n.frozenValue?(l.openBlock(),l.createBlock(u,{key:0,ref:"frozenBodyRef",value:n.frozenValue,frozenRow:!0,columns:h.columns,first:i.d_first,dataKey:n.dataKey,selection:n.selection,selectionKeys:i.d_selectionKeys,selectionMode:n.selectionMode,contextMenu:n.contextMenu,contextMenuSelection:n.contextMenuSelection,rowGroupMode:n.rowGroupMode,groupRowsBy:n.groupRowsBy,expandableRowGroups:n.expandableRowGroups,rowClass:n.rowClass,rowStyle:n.rowStyle,editMode:n.editMode,compareSelectionBy:n.compareSelectionBy,scrollable:n.scrollable,expandedRowIcon:n.expandedRowIcon,collapsedRowIcon:n.collapsedRowIcon,expandedRows:n.expandedRows,expandedRowGroups:n.expandedRowGroups,editingRows:n.editingRows,editingRowKeys:i.d_editingRowKeys,templates:n.$slots,responsiveLayout:n.responsiveLayout,isVirtualScrollerDisabled:!0,onRowgroupToggle:o.toggleRowGroup,onRowClick:e[9]||(e[9]=function(p){return o.onRowClick(p)}),onRowDblclick:e[10]||(e[10]=function(p){return o.onRowDblClick(p)}),onRowRightclick:e[11]||(e[11]=function(p){return o.onRowRightClick(p)}),onRowTouchend:o.onRowTouchEnd,onRowKeydown:o.onRowKeyDown,onRowMousedown:o.onRowMouseDown,onRowDragstart:e[12]||(e[12]=function(p){return o.onRowDragStart(p)}),onRowDragover:e[13]||(e[13]=function(p){return o.onRowDragOver(p)}),onRowDragleave:e[14]||(e[14]=function(p){return o.onRowDragLeave(p)}),onRowDragend:e[15]||(e[15]=function(p){return o.onRowDragEnd(p)}),onRowDrop:e[16]||(e[16]=function(p){return o.onRowDrop(p)}),onRowToggle:e[17]||(e[17]=function(p){return o.toggleRow(p)}),onRadioChange:e[18]||(e[18]=function(p){return o.toggleRowWithRadio(p)}),onCheckboxChange:e[19]||(e[19]=function(p){return o.toggleRowWithCheckbox(p)}),onCellEditInit:e[20]||(e[20]=function(p){return o.onCellEditInit(p)}),onCellEditComplete:e[21]||(e[21]=function(p){return o.onCellEditComplete(p)}),onCellEditCancel:e[22]||(e[22]=function(p){return o.onCellEditCancel(p)}),onRowEditInit:e[23]||(e[23]=function(p){return o.onRowEditInit(p)}),onRowEditSave:e[24]||(e[24]=function(p){return o.onRowEditSave(p)}),onRowEditCancel:e[25]||(e[25]=function(p){return o.onRowEditCancel(p)}),editingMeta:i.d_editingMeta,onEditingMetaChange:o.onEditingMetaChange,unstyled:n.unstyled,pt:n.pt},null,8,["value","columns","first","dataKey","selection","selectionKeys","selectionMode","contextMenu","contextMenuSelection","rowGroupMode","groupRowsBy","expandableRowGroups","rowClass","rowStyle","editMode","compareSelectionBy","scrollable","expandedRowIcon","collapsedRowIcon","expandedRows","expandedRowGroups","editingRows","editingRowKeys","templates","responsiveLayout","onRowgroupToggle","onRowTouchend","onRowKeydown","onRowMousedown","editingMeta","onEditingMetaChange","unstyled","pt"])):l.createCommentVNode("",!0),l.createVNode(u,{ref:"bodyRef",value:o.dataToRender(h.rows),class:l.normalizeClass(h.styleClass),columns:h.columns,empty:o.empty,first:i.d_first,dataKey:n.dataKey,selection:n.selection,selectionKeys:i.d_selectionKeys,selectionMode:n.selectionMode,contextMenu:n.contextMenu,contextMenuSelection:n.contextMenuSelection,rowGroupMode:n.rowGroupMode,groupRowsBy:n.groupRowsBy,expandableRowGroups:n.expandableRowGroups,rowClass:n.rowClass,rowStyle:n.rowStyle,editMode:n.editMode,compareSelectionBy:n.compareSelectionBy,scrollable:n.scrollable,expandedRowIcon:n.expandedRowIcon,collapsedRowIcon:n.collapsedRowIcon,expandedRows:n.expandedRows,expandedRowGroups:n.expandedRowGroups,editingRows:n.editingRows,editingRowKeys:i.d_editingRowKeys,templates:n.$slots,responsiveLayout:n.responsiveLayout,virtualScrollerContentProps:h,isVirtualScrollerDisabled:o.virtualScrollerDisabled,onRowgroupToggle:o.toggleRowGroup,onRowClick:e[26]||(e[26]=function(p){return o.onRowClick(p)}),onRowDblclick:e[27]||(e[27]=function(p){return o.onRowDblClick(p)}),onRowRightclick:e[28]||(e[28]=function(p){return o.onRowRightClick(p)}),onRowTouchend:o.onRowTouchEnd,onRowKeydown:function(m){return o.onRowKeyDown(m,h)},onRowMousedown:o.onRowMouseDown,onRowDragstart:e[29]||(e[29]=function(p){return o.onRowDragStart(p)}),onRowDragover:e[30]||(e[30]=function(p){return o.onRowDragOver(p)}),onRowDragleave:e[31]||(e[31]=function(p){return o.onRowDragLeave(p)}),onRowDragend:e[32]||(e[32]=function(p){return o.onRowDragEnd(p)}),onRowDrop:e[33]||(e[33]=function(p){return o.onRowDrop(p)}),onRowToggle:e[34]||(e[34]=function(p){return o.toggleRow(p)}),onRadioChange:e[35]||(e[35]=function(p){return o.toggleRowWithRadio(p)}),onCheckboxChange:e[36]||(e[36]=function(p){return o.toggleRowWithCheckbox(p)}),onCellEditInit:e[37]||(e[37]=function(p){return o.onCellEditInit(p)}),onCellEditComplete:e[38]||(e[38]=function(p){return o.onCellEditComplete(p)}),onCellEditCancel:e[39]||(e[39]=function(p){return o.onCellEditCancel(p)}),onRowEditInit:e[40]||(e[40]=function(p){return o.onRowEditInit(p)}),onRowEditSave:e[41]||(e[41]=function(p){return o.onRowEditSave(p)}),onRowEditCancel:e[42]||(e[42]=function(p){return o.onRowEditCancel(p)}),editingMeta:i.d_editingMeta,onEditingMetaChange:o.onEditingMetaChange,unstyled:n.unstyled,pt:n.pt},null,8,["value","class","columns","empty","first","dataKey","selection","selectionKeys","selectionMode","contextMenu","contextMenuSelection","rowGroupMode","groupRowsBy","expandableRowGroups","rowClass","rowStyle","editMode","compareSelectionBy","scrollable","expandedRowIcon","collapsedRowIcon","expandedRows","expandedRowGroups","editingRows","editingRowKeys","templates","responsiveLayout","virtualScrollerContentProps","isVirtualScrollerDisabled","onRowgroupToggle","onRowTouchend","onRowKeydown","onRowMousedown","editingMeta","onEditingMetaChange","unstyled","pt"]),o.hasSpacerStyle(h.spacerStyle)?(l.openBlock(),l.createElementBlock("tbody",l.mergeProps({key:1,class:n.cx("virtualScrollerSpacer"),style:{height:"calc(".concat(h.spacerStyle.height," - ").concat(h.rows.length*h.itemSize,"px)")}},n.ptm("virtualScrollerSpacer")),null,16)):l.createCommentVNode("",!0),l.createVNode(d,{columnGroup:o.footerColumnGroup,columns:h.columns,pt:n.pt},null,8,["columnGroup","columns","pt"])],16)]}),_:1},16,["items","columns","style","scrollHeight","disabled","pt"])],16),n.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:3,class:n.cx("footer")},n.ptm("footer")),[l.renderSlot(n.$slots,"footer")],16)):l.createCommentVNode("",!0),o.paginatorBottom?(l.openBlock(),l.createBlock(a,{key:4,rows:i.d_rows,first:i.d_first,totalRecords:o.totalRecordsLength,pageLinkSize:n.pageLinkSize,template:n.paginatorTemplate,rowsPerPageOptions:n.rowsPerPageOptions,currentPageReportTemplate:n.currentPageReportTemplate,class:l.normalizeClass(n.cx("paginator")),onPage:e[43]||(e[43]=function(h){return o.onPage(h)}),alwaysShow:n.alwaysShowPaginator,unstyled:n.unstyled,pt:n.ptm("paginator")},l.createSlots({_:2},[n.$slots.paginatorstart?{name:"start",fn:l.withCtx(function(){return[l.renderSlot(n.$slots,"paginatorstart")]}),key:"0"}:void 0,n.$slots.paginatorend?{name:"end",fn:l.withCtx(function(){return[l.renderSlot(n.$slots,"paginatorend")]}),key:"1"}:void 0,n.$slots.paginatorfirstpagelinkicon?{name:"firstpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorfirstpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"2"}:void 0,n.$slots.paginatorprevpagelinkicon?{name:"prevpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorprevpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"3"}:void 0,n.$slots.paginatornextpagelinkicon?{name:"nextpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatornextpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"4"}:void 0,n.$slots.paginatorlastpagelinkicon?{name:"lastpagelinkicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorlastpagelinkicon",{class:l.normalizeClass(h.class)})]}),key:"5"}:void 0,n.$slots.paginatorjumptopagedropdownicon?{name:"jumptopagedropdownicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorjumptopagedropdownicon",{class:l.normalizeClass(h.class)})]}),key:"6"}:void 0,n.$slots.paginatorrowsperpagedropdownicon?{name:"rowsperpagedropdownicon",fn:l.withCtx(function(h){return[l.renderSlot(n.$slots,"paginatorrowsperpagedropdownicon",{class:l.normalizeClass(h.class)})]}),key:"7"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:"resizeHelper",class:n.cx("resizeHelper"),style:{display:"none"}},n.ptm("resizeHelper")),null,16),n.reorderableColumns?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:5,ref:"reorderIndicatorUp",class:n.cx("reorderIndicatorUp"),style:{position:"absolute",display:"none"}},n.ptm("reorderIndicatorUp")),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.$slots.reorderindicatorupicon||"ArrowDownIcon")))],16)):l.createCommentVNode("",!0),n.reorderableColumns?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:6,ref:"reorderIndicatorDown",class:n.cx("reorderIndicatorDown"),style:{position:"absolute",display:"none"}},n.ptm("reorderIndicatorDown")),[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.$slots.reorderindicatordownicon||"ArrowUpIcon")))],16)):l.createCommentVNode("",!0)],16)}BD.render=o2e;var s2e={},a2e={name:"BaseColumn",extends:be,props:{columnKey:{type:null,default:null},field:{type:[String,Function],default:null},sortField:{type:[String,Function],default:null},filterField:{type:[String,Function],default:null},dataType:{type:String,default:"text"},sortable:{type:Boolean,default:!1},header:{type:null,default:null},footer:{type:null,default:null},style:{type:null,default:null},class:{type:String,default:null},headerStyle:{type:null,default:null},headerClass:{type:String,default:null},bodyStyle:{type:null,default:null},bodyClass:{type:String,default:null},footerStyle:{type:null,default:null},footerClass:{type:String,default:null},showFilterMenu:{type:Boolean,default:!0},showFilterOperator:{type:Boolean,default:!0},showClearButton:{type:Boolean,default:!0},showApplyButton:{type:Boolean,default:!0},showFilterMatchModes:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},filterMatchModeOptions:{type:Array,default:null},maxConstraints:{type:Number,default:2},excludeGlobalFilter:{type:Boolean,default:!1},filterHeaderClass:{type:String,default:null},filterHeaderStyle:{type:null,default:null},filterMenuClass:{type:String,default:null},filterMenuStyle:{type:null,default:null},selectionMode:{type:String,default:null},expander:{type:Boolean,default:!1},colspan:{type:Number,default:null},rowspan:{type:Number,default:null},rowReorder:{type:Boolean,default:!1},rowReorderIcon:{type:String,default:void 0},reorderableColumn:{type:Boolean,default:!0},rowEditor:{type:Boolean,default:!1},frozen:{type:Boolean,default:!1},alignFrozen:{type:String,default:"left"},exportable:{type:Boolean,default:!0},exportHeader:{type:String,default:null},exportFooter:{type:String,default:null},filterMatchMode:{type:String,default:null},hidden:{type:Boolean,default:!1}},style:s2e,provide:function(){return{$parentInstance:this}}},l2e={name:"Column",extends:a2e,inheritAttrs:!1,inject:["$columns"],mounted:function(){var e;(e=this.$columns)===null||e===void 0||e.add(this.$)},unmounted:function(){var e;(e=this.$columns)===null||e===void 0||e.delete(this.$)},render:function(){return null}},c2e={},u2e={name:"BaseColumnGroup",extends:be,props:{type:{type:String,default:null}},style:c2e,provide:function(){return{$parentInstance:this}}},d2e={name:"ColumnGroup",extends:u2e,inheritAttrs:!1,inject:["$columnGroups"],mounted:function(){var e;(e=this.$columnGroups)===null||e===void 0||e.add(this.$)},unmounted:function(){var e;(e=this.$columnGroups)===null||e===void 0||e.delete(this.$)},render:function(){return null}},f2e={name:"Row",extends:be,inject:["$rows"],mounted:function(){var e;(e=this.$rows)===null||e===void 0||e.add(this.$)},unmounted:function(){var e;(e=this.$rows)===null||e===void 0||e.delete(this.$)},render:function(){return null}};const h2e="data:image/svg+xml,%3csvg%20width='118'%20height='99'%20viewBox='0%200%20118%2099'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M104.165%2059.815C107.107%2062.7762%20108.893%2066.692%20109.201%2070.8549C109.508%2075.0179%20108.317%2079.1536%20105.842%2082.515L105.642%2082.782L105.412%2083.082L117.521%2095.245C117.828%2095.5546%20118%2095.973%20118%2096.409C118%2096.845%20117.828%2097.2634%20117.521%2097.573C117.232%2097.8651%20116.844%2098.0376%20116.434%2098.0561C116.023%2098.0746%20115.621%2097.9378%20115.307%2097.673L115.207%2097.573L103.122%2085.438L102.822%2085.682C99.4939%2088.3942%2095.2763%2089.772%2090.9889%2089.5476C86.7016%2089.3233%2082.6508%2087.5127%2079.624%2084.468C76.3686%2081.1921%2074.5414%2076.7614%2074.5414%2072.143C74.5414%2067.5247%2076.3686%2063.0939%2079.624%2059.818C81.2316%2058.2001%2083.1433%2056.916%2085.2491%2056.0397C87.3548%2055.1634%2089.6131%2054.7121%2091.8939%2054.7118C94.1747%2054.7115%2096.4331%2055.1622%2098.539%2056.0381C100.645%2056.9139%20102.557%2058.1975%20104.165%2059.815ZM81.935%2062.131C79.2951%2064.7964%2077.8142%2068.3961%2077.8142%2072.1475C77.8142%2075.8989%2079.2951%2079.4986%2081.935%2082.164C83.2368%2083.4792%2084.7865%2084.5233%2086.4944%2085.2358C88.2022%2085.9484%2090.0344%2086.3153%2091.885%2086.3153C93.7355%2086.3153%2095.5678%2085.9484%2097.2756%2085.2358C98.9835%2084.5233%20100.533%2083.4792%20101.835%2082.164C104.475%2079.4986%20105.956%2075.8989%20105.956%2072.1475C105.956%2068.3961%20104.475%2064.7964%20101.835%2062.131C100.533%2060.8158%2098.9835%2059.7717%2097.2756%2059.0592C95.5678%2058.3466%2093.7355%2057.9797%2091.885%2057.9797C90.0344%2057.9797%2088.2022%2058.3466%2086.4944%2059.0592C84.7865%2059.7717%2083.2368%2060.8158%2081.935%2062.131ZM31.4%2075.042V76.442C31.4001%2076.5544%2031.4224%2076.6656%2031.4656%2076.7694C31.5087%2076.8731%2031.5719%2076.9673%2031.6515%2077.0466C31.7311%2077.126%2031.8255%2077.1888%2031.9294%2077.2316C32.0333%2077.2744%2032.1446%2077.2963%2032.257%2077.296H72.357C72.5818%2078.1673%2072.8638%2079.0228%2073.201%2079.857H32.258C31.3506%2079.8589%2030.4796%2079.5003%2029.8366%2078.86C29.1935%2078.2198%2028.8311%2077.3504%2028.829%2076.443V75.043L31.4%2075.042ZM86.162%2022C87.0694%2021.9981%2087.9404%2022.3568%2088.5834%2022.997C89.2265%2023.6372%2089.5889%2024.5066%2089.591%2025.414V51.808C88.7243%2051.9101%2087.8652%2052.0684%2087.019%2052.282V25.414C87.0189%2025.3016%2086.9966%2025.1904%2086.9534%2025.0867C86.9103%2024.9829%2086.8471%2024.8887%2086.7675%2024.8094C86.6879%2024.7301%2086.5935%2024.6672%2086.4896%2024.6244C86.3857%2024.5816%2086.2744%2024.5597%2086.162%2024.56H25.429C25.3166%2024.5597%2025.2053%2024.5816%2025.1014%2024.6244C24.9975%2024.6672%2024.9031%2024.7301%2024.8235%2024.8094C24.7439%2024.8887%2024.6807%2024.9829%2024.6376%2025.0867C24.5944%2025.1904%2024.5721%2025.3016%2024.572%2025.414V69.587C24.5721%2069.6994%2024.5944%2069.8106%2024.6376%2069.9144C24.6807%2070.0181%2024.7439%2070.1123%2024.8235%2070.1916C24.9031%2070.271%2024.9975%2070.3338%2025.1014%2070.3766C25.2053%2070.4194%2025.3166%2070.4413%2025.429%2070.441H71.766C71.697%2071.2932%2071.6806%2072.1488%2071.717%2073.003H25.429C24.5216%2073.0049%2023.6506%2072.6463%2023.0076%2072.006C22.3645%2071.3658%2022.0021%2070.4964%2022%2069.589V25.414C22.0021%2024.5066%2022.3645%2023.6372%2023.0076%2022.997C23.6506%2022.3568%2024.5216%2021.9981%2025.429%2022H86.162ZM77.701%2054.948C77.8695%2054.9484%2078.0362%2054.982%2078.1918%2055.0468C78.3473%2055.1117%2078.4885%2055.2065%2078.6073%2055.3259C78.7262%2055.4453%2078.8204%2055.587%2078.8845%2055.7428C78.9486%2055.8986%2078.9814%2056.0655%2078.981%2056.234C78.9811%2056.2983%2078.9764%2056.3624%2078.967%2056.426C78.557%2056.7693%2078.159%2057.1327%2077.773%2057.516H77.701H34.374C34.0329%2057.516%2033.7058%2057.3805%2033.4647%2057.1393C33.2235%2056.8982%2033.088%2056.5711%2033.088%2056.23C33.088%2055.8889%2033.2235%2055.5618%2033.4647%2055.3207C33.7058%2055.0795%2034.0329%2054.944%2034.374%2054.944L77.701%2054.948ZM92.991%2028.859C93.8984%2028.8571%2094.7694%2029.2158%2095.4124%2029.856C96.0555%2030.4962%2096.4179%2031.3656%2096.42%2032.273V52.168C95.5725%2051.9753%2094.7133%2051.8377%2093.848%2051.756V32.273C93.8479%2032.1606%2093.8256%2032.0494%2093.7824%2031.9457C93.7393%2031.8419%2093.6761%2031.7477%2093.5965%2031.6684C93.5169%2031.5891%2093.4225%2031.5262%2093.3186%2031.4834C93.2147%2031.4406%2093.1034%2031.4187%2092.991%2031.419H91.291V28.858L92.991%2028.859ZM77.701%2046.375C78.0421%2046.375%2078.3692%2046.5105%2078.6103%2046.7517C78.8515%2046.9928%2078.987%2047.3199%2078.987%2047.661C78.987%2048.0021%2078.8515%2048.3292%2078.6103%2048.5703C78.3692%2048.8115%2078.0421%2048.947%2077.701%2048.947H34.374C34.0329%2048.947%2033.7058%2048.8115%2033.4647%2048.5703C33.2235%2048.3292%2033.088%2048.0021%2033.088%2047.661C33.088%2047.3199%2033.2235%2046.9928%2033.4647%2046.7517C33.7058%2046.5105%2034.0329%2046.375%2034.374%2046.375H77.701ZM59.983%2037.801C60.3241%2037.801%2060.6512%2037.9365%2060.8923%2038.1777C61.1335%2038.4188%2061.269%2038.7459%2061.269%2039.087C61.269%2039.4281%2061.1335%2039.7552%2060.8923%2039.9963C60.6512%2040.2375%2060.3241%2040.373%2059.983%2040.373H34.374C34.0329%2040.373%2033.7058%2040.2375%2033.4647%2039.9963C33.2235%2039.7552%2033.088%2039.4281%2033.088%2039.087C33.088%2038.7459%2033.2235%2038.4188%2033.4647%2038.1777C33.7058%2037.9365%2034.0329%2037.801%2034.374%2037.801H59.983Z'%20fill='%238D9AA5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%200C4.2066%200%204.40475%200.0820729%204.55084%200.228164C4.69693%200.374255%204.779%200.572397%204.779%200.779V3.221H7.221C7.41393%203.221%207.6%203.29258%207.74317%203.4219C7.88634%203.55122%207.97643%203.72907%207.996%203.921V4.001C7.996%204.2076%207.91393%204.40575%207.76784%204.55184C7.62175%204.69793%207.4236%204.78%207.217%204.78H4.779V7.222C4.779%207.41493%204.70742%207.601%204.5781%207.74417C4.44878%207.88734%204.27093%207.97744%204.079%207.997H3.999C3.7924%207.997%203.59425%207.91493%203.44816%207.76884C3.30207%207.62275%203.22%207.4246%203.22%207.218V4.779H0.779C0.585538%204.78002%200.398617%204.70902%200.254623%204.57981C0.110629%204.45061%200.0198653%204.27244%200%204.08V4C0%203.7934%200.082073%203.59526%200.228164%203.44916C0.374255%203.30307%200.572396%203.221%200.779%203.221H3.221V0.779C3.221%200.586071%203.29258%200.400004%203.4219%200.256831C3.55122%200.113658%203.72907%200.023565%203.921%200.00399971L4%200Z'%20fill='%238D9AA5'/%3e%3cpath%20d='M11%2099C11.5304%2099%2012.0391%2098.7893%2012.4142%2098.4142C12.7893%2098.0391%2013%2097.5304%2013%2097C13%2096.4696%2012.7893%2095.9609%2012.4142%2095.5858C12.0391%2095.2107%2011.5304%2095%2011%2095C10.4696%2095%209.96086%2095.2107%209.58579%2095.5858C9.21071%2095.9609%209%2096.4696%209%2097C9%2097.5304%209.21071%2098.0391%209.58579%2098.4142C9.96086%2098.7893%2010.4696%2099%2011%2099Z'%20fill='%238D9AA5'/%3e%3cpath%20d='M104.518%2015.035C103.055%2015.035%20101.651%2014.4538%20100.617%2013.4192C99.5817%2012.3846%2099.0003%2010.9813%2099%209.518C99%208.05454%2099.5814%206.65101%20100.616%205.61619C101.651%204.58136%20103.055%204%20104.518%204C105.981%204%20107.385%204.58136%20108.42%205.61619C109.455%206.65101%20110.036%208.05454%20110.036%209.518C110.036%2010.9813%20109.454%2012.3846%20108.419%2013.4192C107.385%2014.4538%20105.981%2015.035%20104.518%2015.035ZM104.518%2013.035C105.451%2013.035%20106.346%2012.6645%20107.005%2012.005C107.665%2011.3454%20108.036%2010.4509%20108.036%209.518C108.036%209.05601%20107.945%208.59854%20107.768%208.17172C107.591%207.7449%20107.332%207.35707%20107.006%207.0304C106.679%206.70372%20106.291%206.44459%20105.864%206.26779C105.437%206.091%20104.98%206%20104.518%206C103.585%206%20102.69%206.37065%20102.03%207.0304C101.371%207.69015%20101%208.58497%20101%209.518C101%2010.4509%20101.371%2011.3454%20102.031%2012.005C102.69%2012.6645%20103.585%2013.035%20104.518%2013.035Z'%20fill='%238D9AA5'/%3e%3c/svg%3e",p2e=l.defineComponent({name:"QTable",components:{Column:l2e,ColumnGroup:d2e,DataTable:BD,Row:f2e,QBadge:Da,QTooltip:t6},props:{id:{type:String,default:""},modelValue:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},hasSearch:{type:Boolean,default:!0},sortBy:{type:String,default:""},itemsPerPage:{type:Number,default:20},currentPage:{type:Number,default:1},searchPlaceholder:{type:String,default:""},filters:{type:Object,default:()=>({})},filtersAction:{type:Function,default:()=>{}},filtersCount:{type:Number,default:0},globalFilters:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},isMultiSort:{type:Boolean,default:!1},isMultiSelect:{type:Boolean,default:!1},rowSelect:{type:Function,default:()=>{}},rowUnselect:{type:Function,default:()=>{}},fixedTopOffset:{type:Number,default:0},skeletonRows:{type:Number,default:6},leftScrollAmount:{type:Number,default:200},rightScrollAmount:{type:Number,default:200}},emits:["is-empty"],setup(n,{emit:e}){const t=l.ref(),r=l.ref(!1),i=l.ref(!1),o=l.ref(!1),s=l.ref(!0),a=l.ref(h2e),c=l.ref(),u=l.ref(""),d=l.ref([]),f=l.ref(),h=l.ref(0),p=l.ref({global:{matchMode:It.CONTAINS,value:null},...n.filters}),m=l.computed(()=>{var _;const O=!n.loading&&((_=t.value)==null?void 0:_.empty);return e("is-empty",O),O}),y=l.computed(()=>{const O=[],_={};let B=0;return n.columns.forEach($=>{_[$.key]=""}),[...Array(n.skeletonRows)].forEach(()=>{O.push({..._,shimmer:B%2?"bg-gray-10":"bg-gray-30"}),B++}),O}),b=()=>{var O,_;c.value.scrollWidth>c.value.clientWidth?(r.value=!0,(O=c.value)==null||O.classList.add("is-scrolled")):(r.value=!1,(_=c.value)==null||_.classList.remove("is-scrolled")),c.value&&c.value.setAttribute("data-scroll",c.value.scrollLeft.toString()),T(),P()},w=O=>{n.rowSelect(O)},v=O=>{n.rowUnselect(O)},k=()=>{var $,R;const O=f.value.offsetTop-n.fixedTopOffset,_=document.querySelector('div[data-pc-section="header"]'),B=($=c.value)==null?void 0:$.querySelector("thead");if(i.value=!!n.fixedTopOffset&&f.value&&window.scrollY>=O,i.value){if(_.style.top=n.fixedTopOffset+"px",!r.value){const N=n.fixedTopOffset+_.clientHeight+1;B.style.top=N+"px"}}else _.style.top="",r.value||(B.style.top="");if(i.value&&r.value){const N=document.querySelector('div[data-pc-section="header"] > div[data-pc-section="wrapper"]');(R=N==null?void 0:N.querySelectorAll("th"))==null||R.forEach((W,F)=>{var de;const K=(de=c.value)==null?void 0:de.querySelector(`th:nth-child(${F+1})`),ae=K==null?void 0:K.getAttribute("aria-sort");W==null||W.setAttribute("aria-sort",ae),W.classList.contains("actions")&&(W.style.minWidth=(K==null?void 0:K.clientWidth)+"px")})}T(),P()},C=()=>{var _,B,$,R;const O=(_=c.value)==null?void 0:_.cloneNode(!0);if(O){const N=document.querySelector('div[data-pc-section="header"]');N==null||N.append(O);const W=N==null?void 0:N.querySelector('div[data-pc-section="wrapper"]');(B=W==null?void 0:W.querySelector("tbody"))==null||B.remove(),W==null||W.addEventListener("scroll",()=>{c.value.scrollLeft=W.scrollLeft;const F=c.value.scrollWidth-c.value.clientWidth;s.value=c.value.scrollLeft===0,o.value=c.value.scrollLeft===F,P()}),($=c.value)==null||$.addEventListener("scroll",()=>{var K;W.scrollLeft=c.value.scrollLeft;const F=c.value.scrollWidth-c.value.clientWidth;s.value=c.value.scrollLeft===0,o.value=c.value.scrollLeft===F,(K=c.value)==null||K.setAttribute("data-scroll",c.value.scrollLeft.toString()),P()}),(R=W==null?void 0:W.querySelectorAll("th"))==null||R.forEach((F,K)=>{F==null||F.addEventListener("click",async()=>{var ae;if(i.value&&r.value){const de=(ae=c.value)==null?void 0:ae.querySelector(`th:nth-child(${K+1})`);await(de==null?void 0:de.click());const Q=de==null?void 0:de.getAttribute("aria-sort");F==null||F.setAttribute("aria-sort",Q)}})})}},T=()=>{const O=c.value.clientWidth+"px",_=document.querySelector('div[data-pc-section="header"]'),B=_.querySelector('div[data-pc-section="wrapper"] thead');_.style.width=O,c.value.querySelector("thead").style.width=O,B&&(B.style.width=O)},S=()=>{if(c.value){const O=i.value?"instant":"smooth";c.value.scrollBy({left:-n.leftScrollAmount,behavior:O})}},A=()=>{if(c.value){const O=i.value?"instant":"smooth";c.value.scrollBy({left:n.rightScrollAmount,behavior:O})}},D=()=>{var O,_,B;if(r.value){const $=s.value?"hidden":"",R=o.value?"hidden":"";(O=f.value)==null||O.insertAdjacentHTML("beforeend",`<button type="button" class="q-table-scroll-button scroll-button scroll-left ${$}"></button>
388
388
  <button type="button" class="q-table-scroll-button scroll-button scroll-right ${R}"></button>`);const N=l.h(z0,{icon:"chevron-left",type:"",size:"sm"}),W=l.h(z0,{icon:"chevron-right",type:"",size:"sm"}),F=(_=f.value)==null?void 0:_.querySelector(".scroll-button.scroll-left"),K=(B=f.value)==null?void 0:B.querySelector(".scroll-button.scroll-right");l.render(N,F),l.render(W,K),F==null||F.addEventListener("click",S),K==null||K.addEventListener("click",A)}P()},I=()=>{var O,_;(_=(O=f.value)==null?void 0:O.querySelectorAll(".scroll-button"))==null||_.forEach(B=>{B.remove()})},P=()=>{var F,K,ae,de;const O=(F=f.value)==null?void 0:F.querySelector(".scroll-button.scroll-left"),_=(K=f.value)==null?void 0:K.querySelector(".scroll-button.scroll-right"),B=(ae=c.value)==null?void 0:ae.querySelector("td.sticky:first-child"),$=(de=f.value)==null?void 0:de.getBoundingClientRect(),R=document.querySelector('div[data-pc-section="header"]'),N=(R==null?void 0:R.getBoundingClientRect().height)||0,W=c.value;if(f.value&&$&&W){const Q=(B==null?void 0:B.getBoundingClientRect().width)||0;f.value.style.setProperty("--first-sticky-width",`${Q}px`);const Z=W.getBoundingClientRect(),H=Math.max(Z.top,N),j=Math.min(Z.bottom,window.innerHeight),q=H<window.innerHeight&&j>N,ne=j-H,le=H+ne/2;if(O&&_)if(q&&r.value){O.classList.remove("hidden"),_.classList.remove("hidden");const Oe=Math.max(H,Math.min(le,j-O.offsetHeight));O.style.top=`${Oe}px`,_.style.top=`${Oe}px`,O.style.left=`${$.left+Q+8}px`,_.style.right=`${window.innerWidth-$.right+8}px`}else O.classList.add("hidden"),_.classList.add("hidden");O&&(s.value?O.classList.add("hidden"):O.classList.remove("hidden")),_&&(o.value?_.classList.add("hidden"):_.classList.remove("hidden"))}};return l.onMounted(()=>{c.value=document.querySelector('div[data-pc-section="wrapper"]'),b(),window.addEventListener("resize",b),window.addEventListener("scroll",k),C()}),l.onUnmounted(()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",k)}),{dataTableRef:t,horizontalScroll:r,isFixed:i,isScrolledToEnd:o,isScrolledToStart:s,noResultsPath:a,scrollableElement:c,scrollLeft:S,scrollRight:A,search:u,selectedRows:d,tableContainer:f,tableFilters:p,tableHeight:h,isEmpty:m,skeletonData:y,addScrollButtons:D,onPageResizeOrLoad:b,onSelectRow:w,onUnselectRow:v,removeScrollButtons:I,mq:_n}}}),m2e=["id"],g2e={class:"search-and-filters"},y2e={class:"inspections-search"},b2e={for:"search",class:"search-label"},w2e={key:0,class:"inspection-actions"},v2e={class:"flex relative"},C2e={key:0},k2e={key:1},S2e={key:0,class:"table-empty flex flex-col items-center justify-center"},M2e=["src"];function E2e(n,e,t,r,i,o){const s=l.resolveComponent("q-icon"),a=l.resolveComponent("q-input"),c=l.resolveComponent("q-badge"),u=l.resolveComponent("q-tooltip"),d=l.resolveComponent("column"),f=l.resolveComponent("data-table");return l.openBlock(),l.createElementBlock("div",{id:n.id,class:l.normalizeClass(["table-container",{"is-fixed":n.isFixed},{"using-scroll":n.horizontalScroll},{"is-loading":n.loading},{"scroll-start":n.isScrolledToStart},{"scroll-end":n.isScrolledToEnd},{"is-empty":n.isEmpty}]),ref:"tableContainer",onMouseenter:e[3]||(e[3]=(...h)=>n.addScrollButtons&&n.addScrollButtons(...h)),onMouseleave:e[4]||(e[4]=(...h)=>n.removeScrollButtons&&n.removeScrollButtons(...h))},[l.createVNode(f,{filters:n.tableFilters,"onUpdate:filters":e[1]||(e[1]=h=>n.tableFilters=h),selection:n.selectedRows,"onUpdate:selection":e[2]||(e[2]=h=>n.selectedRows=h),"global-filter-fields":n.globalFilters,loading:n.loading,"meta-key-selection":!1,"scroll-height":n.horizontalScroll&&n.tableHeight?`${n.tableHeight}px`:"","selection-mode":n.isMultiSelect?"multiple":"single","sort-mode":n.isMultiSort?"multiple":"single",value:n.loading?n.skeletonData:n.modelValue,"data-key":"id","filter-display":"menu",ref:"dataTableRef","removable-sort":"",scrollable:"",onRowSelect:n.onSelectRow,onRowUnselect:n.onUnselectRow},{header:l.withCtx(()=>[n.hasSearch?l.renderSlot(n.$slots,"search-and-filters",{key:0},()=>[l.createElementVNode("div",g2e,[l.createElementVNode("div",y2e,[n.hasSearch?l.renderSlot(n.$slots,"search",{key:0},()=>[l.createElementVNode("label",b2e,[l.createVNode(s,{class:"mr-2",color:"gray-40",icon:"search",size:"md",type:""}),l.createVNode(a,{id:"search",modelValue:n.tableFilters.global.value,"onUpdate:modelValue":e[0]||(e[0]=h=>n.tableFilters.global.value=h),"hide-clear":!!n.mq.md,placeholder:n.searchPlaceholder||n.$t("HC_SEARCH"),class:"text-base","control-class":"!border-0 !px-0"},null,8,["modelValue","hide-clear","placeholder"])])],!0):l.createCommentVNode("",!0)]),Object.keys(n.tableFilters).length||n.$slots.tableActions?(l.openBlock(),l.createElementBlock("div",w2e,[Object.keys(n.tableFilters).length?l.renderSlot(n.$slots,"filters",{key:0},()=>[l.createVNode(u,{class:"z-[45] ml-2"},{trigger:l.withCtx(()=>[l.createElementVNode("div",v2e,[l.createVNode(s,{class:"filters-icon ml-0",color:"gray-40",icon:"filter",size:"md",onClick:n.filtersAction},null,8,["onClick"]),n.filtersCount?(l.openBlock(),l.createBlock(c,{key:0,class:"filters-count",color:"white"},{text:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(n.filtersCount),1)]),_:1})):l.createCommentVNode("",!0)])]),content:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(n.$t("HC_FILTERS")),1)]),_:1})],!0):l.createCommentVNode("",!0),n.$slots.tableActions?l.renderSlot(n.$slots,"tableActions",{key:1},void 0,!0):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])],!0):l.createCommentVNode("",!0)]),empty:l.withCtx(()=>[]),default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.columns,h=>(l.openBlock(),l.createBlock(d,{key:h.key,field:h.key,"filter-field":h.key,header:h.name,sortable:h.sortable,frozen:h.frozen,class:l.normalizeClass([h.key,h.size?`cell-${h.size}`:"",{"text-right":h.key==="actions"}])},{body:l.withCtx(({data:p})=>[n.loading?n.loading?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(["animate-shimmer",p.shimmer])},"   ",2)):l.createCommentVNode("",!0):l.renderSlot(n.$slots,h.key,l.normalizeProps(l.mergeProps({key:0},p)),()=>[h.key.match(/\./)?(l.openBlock(),l.createElementBlock("div",k2e,l.toDisplayString(p[h.key.split(".")[0]][h.key.split(".")[1]]),1)):(l.openBlock(),l.createElementBlock("div",C2e,l.toDisplayString(p[h.key]),1))],!0)]),_:2},1032,["field","filter-field","header","sortable","frozen","class"]))),128))]),_:3},8,["filters","selection","global-filter-fields","loading","scroll-height","selection-mode","sort-mode","value","onRowSelect","onRowUnselect"]),n.isEmpty?(l.openBlock(),l.createElementBlock("div",S2e,[l.renderSlot(n.$slots,"no-results-illustration",{},()=>[l.createElementVNode("img",{class:"mb-5",src:n.noResultsPath},null,8,M2e)],!0),l.renderSlot(n.$slots,"no-results-text",l.normalizeProps(l.guardReactiveProps({tableFilters:n.tableFilters})),void 0,!0)])):l.createCommentVNode("",!0)],42,m2e)}const A2e=me(p2e,[["render",E2e],["__scopeId","data-v-fc37c96f"]]),T2e=l.defineComponent({name:"QTag",components:{},props:{tagClass:{type:String,default:""},bgColor:{type:String,default:"bg-green-0"},textColor:{type:String,default:"text-green-20"},shape:{type:String,default:"square"}},setup(n,{slots:e}){return{hasIcon:!!e.icon}}});function x2e(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["tag flex items-center",[n.tagClass,n.bgColor,n.textColor,"tag-"+n.shape,{"has-icon":n.hasIcon}]])},[n.hasIcon?l.renderSlot(n.$slots,"icon",{key:0},void 0,!0):l.createCommentVNode("",!0),l.renderSlot(n.$slots,"default",{},void 0,!0)],2)}const I2e=me(T2e,[["render",x2e],["__scopeId","data-v-1a01844c"]]),VD="update:model-value",O2e=l.defineComponent({name:"QTextarea",inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},controlClass:{type:String,default:""},persistentPlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},rows:{type:Number,default:2},status:{type:String,default:""},textareaClass:{type:String,default:""},isDisabled:{type:Boolean,default:!1}},emits:[VD],setup(n,{attrs:e,emit:t,slots:r}){const i=l.ref(!1),o=l.ref(),s=l.computed(()=>!!r.actions),a=l.computed(()=>!!e.disabled||!!n.isDisabled),c=l.computed(()=>[{[`has-${n.status}`]:n.status&&!a.value},{"is-focused":i.value},{"is-disabled":a.value}]),u=l.computed(()=>["textarea",n.textareaClass,{[n.status]:n.status&&!a.value},{populated:!!n.modelValue&&n.persistentPlaceholder},{"is-focused":i.value&&n.persistentPlaceholder}]),d=()=>{o.value.style.height="auto",o.value.style.height=o.value.scrollHeight+"px"},f=h=>{t(VD,h.target.value)};return l.onMounted(()=>{d()}),{focused:i,disabled:a,rootClasses:c,textarea:o,textareaClasses:u,hasActions:s,resizeTextarea:d,updateValue:f}}}),D2e=["id","disabled","placeholder","rows","value"],N2e={key:0,class:"action flex items-end py-2 pr-4"},P2e=["for"];function _2e(n,e,t,r,i,o){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([[n.rootClasses,n.controlClass],"control flex"])},[l.createElementVNode("textarea",l.mergeProps({id:String(n.$attrs.id),ref:"textarea",disabled:n.isDisabled,class:[n.textareaClasses],placeholder:n.persistentPlaceholder?"":n.placeholder,rows:n.rows,value:n.modelValue},n.$attrs,{onInput:e[0]||(e[0]=(...s)=>n.updateValue&&n.updateValue(...s)),onFocusin:e[1]||(e[1]=s=>n.focused=!n.focused),onFocusout:e[2]||(e[2]=s=>n.focused=!n.focused),onKeyup:e[3]||(e[3]=(...s)=>n.resizeTextarea&&n.resizeTextarea(...s))}),`
389
- `,16,D2e),n.hasActions?(l.openBlock(),l.createElementBlock("div",N2e,[l.renderSlot(n.$slots,"actions",{},void 0,!0)])):l.createCommentVNode("",!0),n.persistentPlaceholder?(l.openBlock(),l.createElementBlock("label",{key:1,for:String(n.$attrs.id),class:"placeholder"},l.toDisplayString(n.placeholder),9,P2e)):l.createCommentVNode("",!0)],2)}const L2e=me(O2e,[["render",_2e],["__scopeId","data-v-fda73545"]]),FD="update:modelValue",jD="undo-action",zD="timeout-done",B2e=l.defineComponent({name:"QToast",props:{modelValue:{type:Boolean,default:!1,required:!0},icon:{type:String,default:""},message:{type:String,default:""},variant:{type:String,default:""},duration:{type:Number,default:null,required:!1},position:{type:[String,Array],default:null,required:!1},withTransition:{type:Boolean,default:!1},transitionClass:{type:String,default:"component-slide-right"},closeButton:{type:Boolean,default:!1},undoButton:{type:Boolean,default:!1}},emits:[FD,jD,zD],setup(n,{emit:e}){const t=l.ref(null),r=l.computed({get:()=>n.modelValue,set:u=>{e(FD,u)}}),i=l.computed(()=>n.variant?"is-"+n.variant:""),o=l.computed(()=>n.position?"toast-fixed "+n.position:""),s=l.computed(()=>n.withTransition&&n.transitionClass),a=()=>{e(jD)},c=()=>{t.value=setTimeout(()=>{r.value=!1,e(zD)},n.duration)};return l.onBeforeUnmount(()=>{t.value&&(clearTimeout(t.value),t.value=null)}),l.watchEffect(()=>{r.value&&n.duration?c():t.value&&(clearTimeout(t.value),t.value=null)}),{show:r,statusClass:i,positionClass:o,computedTransition:s,startTimeout:c,undoAction:a}}}),R2e=["aria-live"],$2e={class:"message flex-grow"},V2e=["aria-label"];function F2e(n,e,t,r,i,o){const s=l.resolveComponent("q-icon");return l.openBlock(),l.createBlock(l.Transition,{name:String(n.computedTransition),appear:""},{default:l.withCtx(()=>[n.show?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["toast flex",n.statusClass,n.positionClass,n.undoButton?"gap-2":"gap-3"]),role:"alert","aria-live":n.variant=="error"?"assertive":"polite","aria-atomic":"true"},[n.icon?(l.openBlock(),l.createBlock(s,{key:0,icon:n.icon,class:"status-icon",type:"fill","aria-hidden":"true"},null,8,["icon"])):l.createCommentVNode("",!0),l.createElementVNode("span",$2e,[l.renderSlot(n.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(n.message),1)],!0)]),n.undoButton?(l.openBlock(),l.createElementBlock("button",{key:1,class:"button-link",onClick:e[0]||(e[0]=a=>n.undoAction())},[l.renderSlot(n.$slots,"undo-message",{},()=>[l.createTextVNode(l.toDisplayString(n.$t("HC_UNDO")),1)],!0)])):l.createCommentVNode("",!0),n.closeButton?(l.openBlock(),l.createElementBlock("button",{key:2,class:"close-icon",onClick:e[1]||(e[1]=a=>n.show=!n.show),"aria-label":n.$t("HC_CLOSE")},[l.createVNode(s,{icon:"close",type:"line",color:"inkwell-30",class:"close","aria-hidden":"true"})],8,V2e)):l.createCommentVNode("",!0)],10,R2e)):l.createCommentVNode("",!0)]),_:3},8,["name"])}const j2e=me(B2e,[["render",F2e],["__scopeId","data-v-3862f72b"]]),z2e={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0},H2e=(n,e,t)=>{const{container:r,arrow:i,margin:o,padding:s,position:a,variantFlipOrder:c,positionFlipOrder:u}={container:document.documentElement.getBoundingClientRect(),...z2e,...t},{left:d,top:f}=e.style;e.style.left="0",e.style.top="0";const h=n.getBoundingClientRect(),p=e.getBoundingClientRect(),m={t:h.top-p.height-o,b:h.bottom+o,r:h.right+o,l:h.left-p.width-o},y={vs:h.left,vm:h.left+h.width/2-p.width/2,ve:h.left+h.width-p.width,hs:h.top,hm:h.bottom-h.height/2-p.height/2,he:h.bottom-p.height},[b,w="middle"]=a.split("-"),v=u[b],k=c[w],{top:C,left:T,bottom:S,right:A}=r;for(const D of v){const I=D==="t"||D==="b";let P=m[D];const[O,_]=I?["top","left"]:["left","top"],[B,$]=I?[p.height,p.width]:[p.width,p.height],[R,N]=I?[S,A]:[A,S],[W,F]=I?[C,T]:[T,C];if(!(P<W||P+B+s>R))for(const K of k){let ae=y[(I?"v":"h")+K];if(!(ae<F||ae+$+s>N)){if(ae-=p[_],P-=p[O],e.style[_]=`${ae}px`,e.style[O]=`${P}px`,i){const de=I?h.width/2:h.height/2,Q=$/2,Z=de>Q,H={s:Z?Q:de,m:Q,e:Z?Q:$-de},j={t:B,b:0,r:0,l:B},q=ae+H[K],ne=P+j[D];i.style[_]=`${q}px`,i.style[O]=`${ne}px`}return D+K}}}return e.style.left=d,e.style.top=f,null},U2e=(n,e,t)=>{const r=typeof n=="object"&&!(n instanceof HTMLElement)?n:{reference:n,popper:e,...t};return{update(i=r){const{reference:o,popper:s}=Object.assign(r,i);if(!s||!o)throw new Error("Popper- or reference-element missing.");return H2e(o,s,r)}}},Z2e=l.defineComponent({name:"QTour",props:{name:{type:String,default:"default"},steps:{type:Array,required:!0},backdrop:{type:Boolean,default:!0},autoStart:{type:Boolean,default:!1},startDelay:{type:Number,default:2e3},highlight:{type:Boolean,default:!0},margin:{type:Number,default:8},buttonLabels:{type:Object,default:()=>{const{t:n}=ao();return{next:n("HC_NEXT"),back:n("HC_BACK"),end:n("HC_GOT_IT"),snooze:n("HC_SNOOZE")}}},saveProgress:{type:Boolean,default:!0},hideSnooze:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},noScroll:{type:Boolean,default:!1}},emits:["onTourStart","onTourEnd","onTourStep","onTourSnooze"],setup(n,{emit:e,expose:t}){const r=`tour-${n.name}`,i=`${r}-tooltip`,o=`${r}-backdrop`,s=`${r}-arrow`,a=l.ref(null),c=l.ref(null),u=l.ref(!1),d=l.reactive({currentStep:0,lastStep:0,nextStep:1,getCurrentStep:l.computed(()=>n.steps[d.currentStep]),getLastStep:l.computed(()=>n.steps[d.lastStep]),getNextStep:l.computed(()=>n.steps[d.nextStep])}),f=l.computed(()=>d.currentStep===n.steps.length-1?n.buttonLabels.end:n.buttonLabels.next),h=()=>{if(localStorage.getItem("tour-"+n.name)==="true")return;n.saveProgress?d.currentStep=parseInt(localStorage.getItem("tour-"+n.name)||"0"):d.currentStep=0;const O=async()=>{if(await C(d.currentStep),!a.value){const _=document.querySelector(d.getCurrentStep.target);a.value=U2e(_,c.value,{position:d.getCurrentStep.placement||"right",margin:n.margin||8})}T()};n.autoStart?setTimeout(O,n.startDelay):O(),e("onTourStart")},p=()=>{var O,_;n.backdrop&&((O=document.querySelector(`#${o}`))==null||O.setAttribute("data-hidden","")),(n.highlight||d.getLastStep.highlight)&&document.querySelectorAll(".tour-highlight").forEach(B=>B.classList.remove("tour-highlight")),(_=c.value)==null||_.setAttribute("data-hidden","")},m=O=>{p(),d.currentStep=0,d.lastStep=0,d.nextStep=1,localStorage.removeItem("tour-"+n.name),O&&h()},y=async()=>{if(await C(d.nextStep),d.lastStep=d.currentStep,d.currentStep++,d.currentStep>n.steps.length-1){v();return}d.nextStep=d.currentStep+1,T()},b=async()=>{if(await C(d.lastStep),d.currentStep=d.lastStep,d.lastStep--,d.lastStep<0&&(d.lastStep=0),d.currentStep<0){v();return}d.nextStep=d.currentStep+1,T()},w=()=>{p(),e("onTourSnooze")},v=()=>{p(),u.value=!1,localStorage.removeItem("tour-"+n.name),e("onTourEnd")},k=O=>{C(O),d.currentStep=O,d.lastStep=O-1,d.lastStep<0&&(d.lastStep=0),d.nextStep=O+1,T()},C=async O=>{var _,B;await((B=(_=n.steps[O])==null?void 0:_.onBefore)==null?void 0:B.call(_))},T=async()=>{var O,_,B,$,R,N;if(S(),A(),(O=c.value)==null||O.setAttribute("data-hidden",""),!n.noScroll&&!d.getCurrentStep.noScroll){const W=document.querySelector(d.getCurrentStep.target);if(W){const F=W.getBoundingClientRect();F.top>=0&&F.left>=0&&F.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&F.right<=(window.innerWidth||document.documentElement.clientWidth)||W.scrollIntoView({behavior:"smooth",block:"center"})}}(_=c.value)==null||_.removeAttribute("data-hidden"),($=c.value)==null||$.setAttribute("data-arrow",((B=a.value)==null?void 0:B.update({reference:document.querySelector(d.getCurrentStep.target),position:d.getCurrentStep.placement||"right"}))||"right"),n.saveProgress&&localStorage.setItem("tour-"+n.name,d.currentStep.toString()),await((N=(R=d.getCurrentStep).onAfter)==null?void 0:N.call(R)),e("onTourStep")},S=()=>{if(document.querySelectorAll(".tour-highlight").forEach(B=>B.classList.remove("tour-highlight")),!(n.highlight&&d.getCurrentStep.highlight!==!1||d.getCurrentStep.highlight===!0))return;const _=document.querySelector(d.getCurrentStep.target);_==null||_.classList.add("tour-highlight")},A=()=>{var O,_;n.backdrop?(O=document.querySelector(`#${o}`))==null||O.removeAttribute("data-hidden"):(_=document.querySelector(`#${o}`))==null||_.setAttribute("data-hidden","")},D=()=>{u.value=!u.value},I=O=>{u.value=!1,localStorage.setItem("tour-"+n.name,O.toString()),h()},P=O=>Number(localStorage.getItem("tour-"+n.name))>=O;return l.onMounted(()=>{c.value=document.querySelector(`#${i}`),n.autoStart&&h()}),t({startTour:h,nextStep:y,lastStep:b,endTour:v,stopTour:p,snoozeTour:w,goToStep:k,resetTour:m}),{_CurrentStep:d,getNextLabel:f,startTour:h,nextStep:y,lastStep:b,endTour:v,stopTour:p,snoozeTour:w,goToStep:k,resetTour:m,props:n,tooltipId:i,backdropId:o,arrowId:s,showPopover:u,togglePopover:D,startStepFromPopover:I,isStepViewed:P}}}),W2e={class:"tour-popover"},q2e={key:0,class:"tour-steps-container"},K2e=l.createElementVNode("span",{class:"mt-[1px]"},"Hide",-1),G2e={class:"popover-heading"},Y2e=l.createElementVNode("span",{class:"mr-1"},"Continue the",-1),Q2e=l.createElementVNode("span",{class:"ml-1"},"tour",-1),X2e={class:"step-list"},J2e={class:"text-black"},efe={class:"text-black/70"},tfe=["onClick"],nfe=["id"],rfe=["id"],ife={class:"tour-title"},ofe=["innerHTML"],sfe={class:"tour-actions"},afe={class:"flex items-center gap-6"},lfe={class:"flex gap-1"},cfe=["onClick"],ufe={class:"flex items-center gap-1"},dfe=["id"];function ffe(n,e,t,r,i,o){const s=l.resolveComponent("q-icon");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",W2e,[n.showPopover?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,class:"tour-fab",onClick:e[0]||(e[0]=(...a)=>n.togglePopover&&n.togglePopover(...a))},[l.createVNode(s,{icon:"quore-glyph",type:"",size:"sm",color:"white"})])),l.createVNode(l.Transition,{name:"fade"},{default:l.withCtx(()=>[n.showPopover?(l.openBlock(),l.createElementBlock("div",q2e,[l.createElementVNode("button",{class:"hide-button",onClick:e[1]||(e[1]=(...a)=>n.togglePopover&&n.togglePopover(...a))},[K2e,l.createVNode(s,{icon:"close",type:"",size:"sm",color:"inkwell-30"})]),l.createElementVNode("div",G2e,[Y2e,l.createVNode(s,{icon:"quore-glyph",type:"",size:"lg",color:"green-quore"}),Q2e]),l.createElementVNode("div",X2e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.steps,(a,c)=>(l.openBlock(),l.createElementBlock("div",{key:c,class:l.normalizeClass(["step-item",{viewed:n.isStepViewed(c)}])},[l.createElementVNode("div",null,[l.createElementVNode("span",J2e,l.toDisplayString(c+1)+".",1),l.createTextVNode(),l.createElementVNode("span",efe,l.toDisplayString(a.title),1)]),l.createElementVNode("button",{class:l.normalizeClass(["step-button",{viewed:n.isStepViewed(c)}]),onClick:u=>n.startStepFromPopover(c)},l.toDisplayString(n.isStepViewed(c)?"Open":"Start"),11,tfe)],2))),128))]),l.createElementVNode("button",{class:"text-blue-10 text-center mt-5",onClick:e[2]||(e[2]=a=>n.endTour())},"I don’t need help, don’t show the tour")])):l.createCommentVNode("",!0)]),_:1})]),l.createElementVNode("div",{id:n.backdropId,class:"tour-backdrop","data-hidden":!0},null,8,nfe),l.createElementVNode("div",{id:n.tooltipId,class:"tour-tooltip",role:"tooltip","data-arrow":"r","data-hidden":""},[n._CurrentStep.getCurrentStep?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("button",{class:"close-button",onClick:e[3]||(e[3]=l.withModifiers(a=>n.snoozeTour(),["prevent"]))},[l.createVNode(s,{icon:"close",size:"sm",color:"inkwell-40",type:""})]),l.renderSlot(n.$slots,"header",{currentStep:n._CurrentStep.getCurrentStep},()=>[l.createElementVNode("div",ife,l.toDisplayString(n._CurrentStep.getCurrentStep.title),1)]),l.renderSlot(n.$slots,"body",{currentStep:n._CurrentStep.getCurrentStep},()=>[typeof n._CurrentStep.getCurrentStep.content=="object"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n._CurrentStep.getCurrentStep.content),{key:0})):(l.openBlock(),l.createElementBlock("div",{key:1,class:"tour-content",innerHTML:n._CurrentStep.getCurrentStep.content},null,8,ofe))]),l.renderSlot(n.$slots,"footer",{currentStep:n._CurrentStep.getCurrentStep,snoozeTour:n.snoozeTour,lastStep:n.lastStep,nextStep:n.nextStep,buttonLabels:n.props.buttonLabels},()=>[l.createElementVNode("div",sfe,[l.createElementVNode("div",afe,[n.props.hideSnooze?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,class:"snooze-button",onClick:e[4]||(e[4]=l.withModifiers(a=>n.snoozeTour(),["prevent"]))},l.toDisplayString(n.props.buttonLabels.snooze),1)),l.createElementVNode("div",lfe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.steps,(a,c)=>(l.openBlock(),l.createElementBlock("button",{key:c,onClick:u=>n.goToStep(c),class:l.normalizeClass(["w-2 h-2 rounded-full",n._CurrentStep.currentStep===c?"step-button-active bg-blue-20 border border-gray-30 scale-125":"step-button bg-blue-5"])},null,10,cfe))),128))])]),l.createElementVNode("div",ufe,[n._CurrentStep.lastStep<n._CurrentStep.currentStep?(l.openBlock(),l.createElementBlock("button",{key:0,class:"back-button",onClick:e[5]||(e[5]=l.withModifiers(a=>n.lastStep(),["prevent"]))},l.toDisplayString(n.props.buttonLabels.back),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{class:"next-button",onClick:e[6]||(e[6]=l.withModifiers(a=>n.nextStep(),["prevent"]))},l.toDisplayString(n.getNextLabel),1)])])])],64)):l.createCommentVNode("",!0),n.props.hideArrow?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:1,id:n.arrowId,class:"tour-arrow"},null,8,dfe))],8,rfe)],64)}const hfe=me(Z2e,[["render",ffe]]),pfe={install:({config:n,provide:e})=>{n.globalProperties.$datetime=rt,e("$datetime",rt)}};function Bf(n){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bf(n)}function HD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Jw(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?HD(Object(t),!0).forEach(function(r){mfe(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):HD(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function mfe(n,e,t){return e=gfe(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gfe(n){var e=yfe(n,"string");return Bf(e)=="symbol"?e:String(e)}function yfe(n,e){if(Bf(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var UD={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[It.STARTS_WITH,It.CONTAINS,It.NOT_CONTAINS,It.ENDS_WITH,It.EQUALS,It.NOT_EQUALS],numeric:[It.EQUALS,It.NOT_EQUALS,It.LESS_THAN,It.LESS_THAN_OR_EQUAL_TO,It.GREATER_THAN,It.GREATER_THAN_OR_EQUAL_TO],date:[It.DATE_IS,It.DATE_IS_NOT,It.DATE_BEFORE,It.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},unstyled:!1,csp:{nonce:void 0}},bfe=Symbol();function wfe(n,e,t,r){if(n!==e){var i=document.getElementById(t),o=i.cloneNode(!0),s=i.getAttribute("href").replace(n,e);o.setAttribute("id",t+"-clone"),o.setAttribute("href",s),o.addEventListener("load",function(){i.remove(),o.setAttribute("id",t),r&&r()}),i.parentNode&&i.parentNode.insertBefore(o,i.nextSibling)}}var vfe={install:function(e,t){var r=t?Jw(Jw({},UD),t):Jw({},UD),i={config:l.reactive(r),changeTheme:wfe};e.config.globalProperties.$primevue=i,e.provide(bfe,i)}};const Cfe={global:{css:`
389
+ `,16,D2e),n.hasActions?(l.openBlock(),l.createElementBlock("div",N2e,[l.renderSlot(n.$slots,"actions",{},void 0,!0)])):l.createCommentVNode("",!0),n.persistentPlaceholder?(l.openBlock(),l.createElementBlock("label",{key:1,for:String(n.$attrs.id),class:"placeholder"},l.toDisplayString(n.placeholder),9,P2e)):l.createCommentVNode("",!0)],2)}const L2e=me(O2e,[["render",_2e],["__scopeId","data-v-fda73545"]]),FD="update:modelValue",jD="undo-action",zD="timeout-done",B2e=l.defineComponent({name:"QToast",props:{modelValue:{type:Boolean,default:!1,required:!0},icon:{type:String,default:""},message:{type:String,default:""},variant:{type:String,default:""},duration:{type:Number,default:null,required:!1},position:{type:[String,Array],default:null,required:!1},withTransition:{type:Boolean,default:!1},transitionClass:{type:String,default:"component-slide-right"},closeButton:{type:Boolean,default:!1},undoButton:{type:Boolean,default:!1}},emits:[FD,jD,zD],setup(n,{emit:e}){const t=l.ref(null),r=l.computed({get:()=>n.modelValue,set:u=>{e(FD,u)}}),i=l.computed(()=>n.variant?"is-"+n.variant:""),o=l.computed(()=>n.position?"toast-fixed "+n.position:""),s=l.computed(()=>n.withTransition&&n.transitionClass),a=()=>{e(jD)},c=()=>{t.value=setTimeout(()=>{r.value=!1,e(zD)},n.duration)};return l.onBeforeUnmount(()=>{t.value&&(clearTimeout(t.value),t.value=null)}),l.watchEffect(()=>{r.value&&n.duration?c():t.value&&(clearTimeout(t.value),t.value=null)}),{show:r,statusClass:i,positionClass:o,computedTransition:s,startTimeout:c,undoAction:a}}}),R2e=["aria-live"],$2e={class:"message flex-grow"},V2e=["aria-label"];function F2e(n,e,t,r,i,o){const s=l.resolveComponent("q-icon");return l.openBlock(),l.createBlock(l.Transition,{name:String(n.computedTransition),appear:""},{default:l.withCtx(()=>[n.show?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["toast flex",n.statusClass,n.positionClass,n.undoButton?"gap-2":"gap-3"]),role:"alert","aria-live":n.variant=="error"?"assertive":"polite","aria-atomic":"true"},[n.icon?(l.openBlock(),l.createBlock(s,{key:0,icon:n.icon,class:"status-icon",type:"fill","aria-hidden":"true"},null,8,["icon"])):l.createCommentVNode("",!0),l.createElementVNode("span",$2e,[l.renderSlot(n.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(n.message),1)],!0)]),n.undoButton?(l.openBlock(),l.createElementBlock("button",{key:1,class:"button-link",onClick:e[0]||(e[0]=a=>n.undoAction())},[l.renderSlot(n.$slots,"undo-message",{},()=>[l.createTextVNode(l.toDisplayString(n.$t("HC_UNDO")),1)],!0)])):l.createCommentVNode("",!0),n.closeButton?(l.openBlock(),l.createElementBlock("button",{key:2,class:"close-icon",onClick:e[1]||(e[1]=a=>n.show=!n.show),"aria-label":n.$t("HC_CLOSE")},[l.createVNode(s,{icon:"close",type:"line",color:"inkwell-30",class:"close","aria-hidden":"true"})],8,V2e)):l.createCommentVNode("",!0)],10,R2e)):l.createCommentVNode("",!0)]),_:3},8,["name"])}const j2e=me(B2e,[["render",F2e],["__scopeId","data-v-3862f72b"]]),z2e={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0},H2e=(n,e,t)=>{const{container:r,arrow:i,margin:o,padding:s,position:a,variantFlipOrder:c,positionFlipOrder:u}={container:document.documentElement.getBoundingClientRect(),...z2e,...t},{left:d,top:f}=e.style;e.style.left="0",e.style.top="0";const h=n.getBoundingClientRect(),p=e.getBoundingClientRect(),m={t:h.top-p.height-o,b:h.bottom+o,r:h.right+o,l:h.left-p.width-o},y={vs:h.left,vm:h.left+h.width/2-p.width/2,ve:h.left+h.width-p.width,hs:h.top,hm:h.bottom-h.height/2-p.height/2,he:h.bottom-p.height},[b,w="middle"]=a.split("-"),v=u[b],k=c[w],{top:C,left:T,bottom:S,right:A}=r;for(const D of v){const I=D==="t"||D==="b";let P=m[D];const[O,_]=I?["top","left"]:["left","top"],[B,$]=I?[p.height,p.width]:[p.width,p.height],[R,N]=I?[S,A]:[A,S],[W,F]=I?[C,T]:[T,C];if(!(P<W||P+B+s>R))for(const K of k){let ae=y[(I?"v":"h")+K];if(!(ae<F||ae+$+s>N)){if(ae-=p[_],P-=p[O],e.style[_]=`${ae}px`,e.style[O]=`${P}px`,i){const de=I?h.width/2:h.height/2,Q=$/2,Z=de>Q,H={s:Z?Q:de,m:Q,e:Z?Q:$-de},j={t:B,b:0,r:0,l:B},q=ae+H[K],ne=P+j[D];i.style[_]=`${q}px`,i.style[O]=`${ne}px`}return D+K}}}return e.style.left=d,e.style.top=f,null},U2e=(n,e,t)=>{const r=typeof n=="object"&&!(n instanceof HTMLElement)?n:{reference:n,popper:e,...t};return{update(i=r){const{reference:o,popper:s}=Object.assign(r,i);if(!s||!o)throw new Error("Popper- or reference-element missing.");return H2e(o,s,r)}}},Z2e=l.defineComponent({name:"QTour",props:{name:{type:String,default:"default"},steps:{type:Array,required:!0},backdrop:{type:Boolean,default:!0},autoStart:{type:Boolean,default:!1},startDelay:{type:Number,default:2e3},highlight:{type:Boolean,default:!0},margin:{type:Number,default:8},buttonLabels:{type:Object,default:()=>{const{t:n}=ao();return{next:n("HC_NEXT"),back:n("HC_BACK"),end:n("HC_GOT_IT"),snooze:n("HC_SNOOZE")}}},saveProgress:{type:Boolean,default:!0},hideSnooze:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},noScroll:{type:Boolean,default:!1}},emits:["onTourStart","onTourEnd","onTourStep","onTourSnooze"],setup(n,{emit:e,expose:t}){const r=`tour-${n.name}`,i=`${r}-tooltip`,o=`${r}-backdrop`,s=`${r}-arrow`,a=l.ref(null),c=l.ref(null),u=l.ref(!1),d=l.reactive({currentStep:0,lastStep:0,nextStep:1,getCurrentStep:l.computed(()=>n.steps[d.currentStep]),getLastStep:l.computed(()=>n.steps[d.lastStep]),getNextStep:l.computed(()=>n.steps[d.nextStep])}),f=l.computed(()=>d.currentStep===n.steps.length-1?n.buttonLabels.end:n.buttonLabels.next),h=()=>{if(localStorage.getItem("tour-"+n.name)==="true")return;n.saveProgress?d.currentStep=parseInt(localStorage.getItem("tour-"+n.name)||"0"):d.currentStep=0;const O=async()=>{if(await C(d.currentStep),!a.value){const _=document.querySelector(d.getCurrentStep.target);a.value=U2e(_,c.value,{position:d.getCurrentStep.placement||"right",margin:n.margin||8})}T()};n.autoStart?setTimeout(O,n.startDelay):O(),e("onTourStart")},p=async()=>{var O,_;d.currentStep<n.steps.length&&d.getCurrentStep.onAfter&&await d.getCurrentStep.onAfter(),n.backdrop&&((O=document.querySelector(`#${o}`))==null||O.setAttribute("data-hidden","")),(n.highlight||d.getLastStep.highlight)&&document.querySelectorAll(".tour-highlight").forEach(B=>B.classList.remove("tour-highlight")),(_=c.value)==null||_.setAttribute("data-hidden","")},m=O=>{p(),d.currentStep=0,d.lastStep=0,d.nextStep=1,localStorage.removeItem("tour-"+n.name),O&&h()},y=async()=>{if(d.getCurrentStep.onAfter&&await d.getCurrentStep.onAfter(),d.lastStep=d.currentStep,d.currentStep++,d.currentStep>=n.steps.length){v();return}await C(d.nextStep),d.nextStep=d.currentStep+1,T()},b=async()=>{var O,_;if(await((_=(O=d.getCurrentStep).onAfter)==null?void 0:_.call(O)),await C(d.lastStep),d.currentStep=d.lastStep,d.lastStep--,d.lastStep<0&&(d.lastStep=0),d.currentStep<0){v();return}d.nextStep=d.currentStep+1,T()},w=()=>{p(),e("onTourSnooze")},v=()=>{p(),u.value=!1,localStorage.removeItem("tour-"+n.name),e("onTourEnd")},k=O=>{C(O),d.currentStep=O,d.lastStep=O-1,d.lastStep<0&&(d.lastStep=0),d.nextStep=O+1,T()},C=async O=>{var _,B;await((B=(_=n.steps[O])==null?void 0:_.onBefore)==null?void 0:B.call(_))},T=async()=>{var O,_,B,$,R,N;if(S(),A(),(O=c.value)==null||O.setAttribute("data-hidden",""),d.getCurrentStep.tooltipWidth?(_=c.value)==null||_.style.setProperty("width",d.getCurrentStep.tooltipWidth):(B=c.value)==null||B.style.removeProperty("width"),!n.noScroll&&!d.getCurrentStep.noScroll){const W=document.querySelector(d.getCurrentStep.target);if(W){const F=W.getBoundingClientRect();F.top>=0&&F.left>=0&&F.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&F.right<=(window.innerWidth||document.documentElement.clientWidth)||W.scrollIntoView({behavior:"smooth",block:"center"})}}($=c.value)==null||$.removeAttribute("data-hidden"),(N=c.value)==null||N.setAttribute("data-arrow",((R=a.value)==null?void 0:R.update({reference:document.querySelector(d.getCurrentStep.target),position:d.getCurrentStep.placement||"right"}))||"right"),n.saveProgress&&localStorage.setItem("tour-"+n.name,d.currentStep.toString()),e("onTourStep")},S=()=>{if(document.querySelectorAll(".tour-highlight").forEach(B=>B.classList.remove("tour-highlight")),!(n.highlight&&d.getCurrentStep.highlight!==!1||d.getCurrentStep.highlight===!0))return;const _=document.querySelector(d.getCurrentStep.target);_==null||_.classList.add("tour-highlight")},A=()=>{var O,_;n.backdrop?(O=document.querySelector(`#${o}`))==null||O.removeAttribute("data-hidden"):(_=document.querySelector(`#${o}`))==null||_.setAttribute("data-hidden","")},D=()=>{u.value=!u.value},I=O=>{u.value=!1,localStorage.setItem("tour-"+n.name,O.toString()),h()},P=O=>Number(localStorage.getItem("tour-"+n.name))>=O;return l.onMounted(()=>{c.value=document.querySelector(`#${i}`),n.autoStart&&h()}),t({startTour:h,nextStep:y,lastStep:b,endTour:v,stopTour:p,snoozeTour:w,goToStep:k,resetTour:m}),{_CurrentStep:d,getNextLabel:f,startTour:h,nextStep:y,lastStep:b,endTour:v,stopTour:p,snoozeTour:w,goToStep:k,resetTour:m,props:n,tooltipId:i,backdropId:o,arrowId:s,showPopover:u,togglePopover:D,startStepFromPopover:I,isStepViewed:P}}}),W2e={class:"tour-popover"},q2e={key:0,class:"tour-steps-container"},K2e={class:"mt-[1px]"},G2e={class:"popover-heading"},Y2e={class:"step-list"},Q2e={class:"text-black"},X2e={class:"text-black/70"},J2e=["onClick"],efe=["id"],tfe=["id"],nfe={class:"tour-title"},rfe=["innerHTML"],ife={class:"tour-actions"},ofe={class:"flex items-center gap-6"},sfe={class:"flex gap-1"},afe=["onClick"],lfe={class:"flex items-center gap-1"},cfe=["id"];function ufe(n,e,t,r,i,o){const s=l.resolveComponent("q-icon"),a=l.resolveComponent("i18n-t");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",W2e,[n.showPopover?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,class:"tour-fab",onClick:e[0]||(e[0]=(...c)=>n.togglePopover&&n.togglePopover(...c))},[l.createVNode(s,{icon:"quore-glyph",type:"",size:"sm",color:"white"})])),l.createVNode(l.Transition,{name:"fade"},{default:l.withCtx(()=>[n.showPopover?(l.openBlock(),l.createElementBlock("div",q2e,[l.createElementVNode("button",{class:"hide-button",onClick:e[1]||(e[1]=(...c)=>n.togglePopover&&n.togglePopover(...c))},[l.createElementVNode("span",K2e,l.toDisplayString(n.$t("HC_HIDE")),1),l.createVNode(s,{icon:"close",type:"",size:"sm",color:"inkwell-30"})]),l.createElementVNode("div",G2e,[l.createVNode(a,{keypath:"HC_CONTINUE_THE_TOUR",tag:"div",scope:"global",class:"flex items-center"},{icon:l.withCtx(()=>[l.createVNode(s,{icon:"quore-glyph",type:"",size:"lg",color:"green-quore",class:"mx-1"})]),_:1})]),l.createElementVNode("div",Y2e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.steps,(c,u)=>(l.openBlock(),l.createElementBlock("div",{key:u,class:l.normalizeClass(["step-item",{viewed:n.isStepViewed(u)}])},[l.createElementVNode("div",null,[l.createElementVNode("span",Q2e,l.toDisplayString(u+1)+".",1),l.createTextVNode(),l.createElementVNode("span",X2e,l.toDisplayString(c.title),1)]),l.createElementVNode("button",{class:l.normalizeClass(["step-button",{viewed:n.isStepViewed(u)}]),onClick:d=>n.startStepFromPopover(u)},l.toDisplayString(n.isStepViewed(u)?n.$t("HC_OPEN"):n.$t("HC_START")),11,J2e)],2))),128))]),l.createElementVNode("button",{class:"text-blue-10 text-center mt-5",onClick:e[2]||(e[2]=c=>n.endTour())},l.toDisplayString(n.$t("HC_I_DONT_NEED_HELP")),1)])):l.createCommentVNode("",!0)]),_:1})]),l.createElementVNode("div",{id:n.backdropId,class:"tour-backdrop","data-hidden":!0},null,8,efe),l.createElementVNode("div",{id:n.tooltipId,class:"tour-tooltip",role:"tooltip","data-arrow":"r","data-hidden":""},[n._CurrentStep.getCurrentStep?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("button",{class:"close-button",onClick:e[3]||(e[3]=l.withModifiers(c=>n.snoozeTour(),["prevent"]))},[l.createVNode(s,{icon:"close",size:"sm",color:"inkwell-40",type:""})]),l.renderSlot(n.$slots,"header",{currentStep:n._CurrentStep.getCurrentStep},()=>[l.createElementVNode("div",nfe,l.toDisplayString(n._CurrentStep.getCurrentStep.title),1)]),l.renderSlot(n.$slots,"body",{currentStep:n._CurrentStep.getCurrentStep},()=>[typeof n._CurrentStep.getCurrentStep.content=="object"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n._CurrentStep.getCurrentStep.content),{key:0})):(l.openBlock(),l.createElementBlock("div",{key:1,class:"tour-content",innerHTML:n._CurrentStep.getCurrentStep.content},null,8,rfe))]),l.renderSlot(n.$slots,"footer",{currentStep:n._CurrentStep.getCurrentStep,snoozeTour:n.snoozeTour,lastStep:n.lastStep,nextStep:n.nextStep,buttonLabels:n.props.buttonLabels},()=>[l.createElementVNode("div",ife,[l.createElementVNode("div",ofe,[n.props.hideSnooze?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,class:"snooze-button",onClick:e[4]||(e[4]=l.withModifiers(c=>n.snoozeTour(),["prevent"]))},l.toDisplayString(n.props.buttonLabels.snooze),1)),l.createElementVNode("div",sfe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.steps,(c,u)=>(l.openBlock(),l.createElementBlock("button",{key:u,onClick:d=>n.goToStep(u),class:l.normalizeClass(["w-2 h-2 rounded-full",n._CurrentStep.currentStep===u?"step-button-active bg-blue-20 border border-gray-30 scale-125":"step-button bg-blue-5"])},null,10,afe))),128))])]),l.createElementVNode("div",lfe,[n._CurrentStep.lastStep<n._CurrentStep.currentStep?(l.openBlock(),l.createElementBlock("button",{key:0,class:"back-button",onClick:e[5]||(e[5]=l.withModifiers(c=>n.lastStep(),["prevent"]))},l.toDisplayString(n.props.buttonLabels.back),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{class:"next-button",onClick:e[6]||(e[6]=l.withModifiers(c=>n.nextStep(),["prevent"]))},l.toDisplayString(n.getNextLabel),1)])])])],64)):l.createCommentVNode("",!0),n.props.hideArrow?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:1,id:n.arrowId,class:"tour-arrow"},null,8,cfe))],8,tfe)],64)}const dfe=me(Z2e,[["render",ufe]]),ffe={install:({config:n,provide:e})=>{n.globalProperties.$datetime=rt,e("$datetime",rt)}};function Bf(n){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bf(n)}function HD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Jw(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?HD(Object(t),!0).forEach(function(r){hfe(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):HD(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function hfe(n,e,t){return e=pfe(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function pfe(n){var e=mfe(n,"string");return Bf(e)=="symbol"?e:String(e)}function mfe(n,e){if(Bf(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var UD={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[It.STARTS_WITH,It.CONTAINS,It.NOT_CONTAINS,It.ENDS_WITH,It.EQUALS,It.NOT_EQUALS],numeric:[It.EQUALS,It.NOT_EQUALS,It.LESS_THAN,It.LESS_THAN_OR_EQUAL_TO,It.GREATER_THAN,It.GREATER_THAN_OR_EQUAL_TO],date:[It.DATE_IS,It.DATE_IS_NOT,It.DATE_BEFORE,It.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},unstyled:!1,csp:{nonce:void 0}},gfe=Symbol();function yfe(n,e,t,r){if(n!==e){var i=document.getElementById(t),o=i.cloneNode(!0),s=i.getAttribute("href").replace(n,e);o.setAttribute("id",t+"-clone"),o.setAttribute("href",s),o.addEventListener("load",function(){i.remove(),o.setAttribute("id",t),r&&r()}),i.parentNode&&i.parentNode.insertBefore(o,i.nextSibling)}}var bfe={install:function(e,t){var r=t?Jw(Jw({},UD),t):Jw({},UD),i={config:l.reactive(r),changeTheme:yfe};e.config.globalProperties.$primevue=i,e.provide(gfe,i)}};const wfe={global:{css:`
390
390
  *[data-pd-ripple="true"]{
391
391
  overflow: hidden;
392
392
  position: relative;
@@ -473,4 +473,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
473
473
  opacity: 1;
474
474
  }
475
475
  }
476
- `},datatable:{root:({props:n})=>({class:["relative",{"flex flex-col":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),loadingoverlay:{class:["absolute","top-0 left-0","z-20","flex items-center justify-center","w-full h-full","bg-surface-100/0 dark:bg-surface-800/0","transition duration-200"]},loadingicon:{class:"w-8 h-8 animate-spin hidden"},wrapper:({props:n})=>({class:[{relative:n.scrollable,"flex flex-col grow":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),header:({props:n})=>({class:["font-bold",n.showGridlines?"border-x border-t border-b-0":"border-y border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]}),table:{class:"w-full border-spacing-0 border-separate"},thead:({context:n})=>({class:[{"bg-surface-50 z-40 sticky":n.scrollable}]}),tbody:({instance:n,context:e})=>({class:[{"sticky z-20":n.frozenRow&&e.scrollable}]}),tfoot:({context:n})=>({class:[{"bg-surface-50 bottom-0 z-0":n.scrollable}]}),footer:{class:["font-bold","border-t-0 border-b border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]},column:{headercell:({context:n,props:e})=>({class:["font-bold",{"sticky z-20 border-b":e.frozen||e.frozen===""},{relative:n.resizable},"text-left",{"first:border-l border-y border-r":n==null?void 0:n.showGridlines},"border-0 border-b border-solid",(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4",(e.sortable===""||e.sortable)&&n.sorted?"bg-primary-50 text-primary-700":"bg-surface-50 text-surface-700",(e.sortable===""||e.sortable)&&n.sorted?"dark:text-white dark:bg-primary-400/30":"dark:text-white/80 dark:bg-surface-800","border-surface-200 dark:border-surface-700 ",{"hover:bg-surface-100 dark:hover:bg-surface-400/30":(e.sortable===""||e.sortable)&&!(n!=null&&n.sorted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",{"transition duration-200":e.sortable===""||e.sortable},{"cursor-pointer":e.sortable===""||e.sortable},{"overflow-hidden space-nowrap border-y bg-clip-padding":n.resizable}]}),headercontent:{class:"flex items-center"},sort:({context:n})=>({class:[n.sorted?"text-primary-500":"text-surface-700",n.sorted?"dark:text-primary-400":"dark:text-white/80"]}),bodycell:({props:n,context:e,state:t,parent:r})=>({class:[{"sticky box-border border-b":r.instance.frozenRow},{"sticky box-border border-b":n.frozen||n.frozen===""},"text-left","border-0 border-b border-solid",{"first:border-l border-r border-b":e==null?void 0:e.showGridlines},{"bg-surface-0 dark:bg-surface-800":r.instance.frozenRow||n.frozen||n.frozen===""},{"p-2":(e==null?void 0:e.size)==="small"&&!t.d_editing},{"p-5":(e==null?void 0:e.size)==="large"&&!t.d_editing},{"p-4":(e==null?void 0:e.size)!=="large"&&(e==null?void 0:e.size)!=="small"&&!t.d_editing},{"py-[0.6rem] px-2":t.d_editing},"border-surface-200 dark:border-surface-700"]}),footercell:({context:n})=>({class:["font-bold","text-left","border-0 border-b border-solid",{"border-x border-y":n==null?void 0:n.showGridlines},(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80","bg-surface-50 dark:bg-surface-800"]}),sorticon:({context:n})=>({class:["ml-2",n.sorted?"text-primary-700 dark:text-white/80":"text-surface-700 dark:text-white/70"]}),sortbadge:{class:["flex items-center justify-center align-middle","rounded-full","w-[1.143rem] leading-[1.143rem]","ml-2","text-primary-700 dark:text-white","bg-primary-50 dark:bg-primary-400/30"]},columnfilter:{class:"inline-flex items-center ml-auto"},filteroverlay:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","min-w-[12.5rem]","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},filtermatchmodedropdown:{root:({state:n})=>({class:["flex","relative","my-2","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","text-surface-800 dark:text-white/80","placeholder:text-surface-400 dark:placeholder:text-surface-500","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]})},filterrowitems:{class:"m-0 p-0 py-3 list-none"},filterrowitem:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-surface-0 dark:bg-surface-800 text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]}),filteroperator:{class:["px-5 py-3","border-b border-solid","rounded-t-md","text-surface-700 dark:text-white/80","border-surface-200 dark:border-surface-800","bg-surface-0 dark:bg-surface-700"]},filteroperatordropdown:{root:({state:n})=>({class:["inline-flex","relative","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]}),input:({props:n})=>({class:["font-sans","leading-none","block","flex-auto","bg-transparent","border-0",{"text-surface-800 dark:text-white/80":n.modelValue,"text-surface-400 dark:text-surface-500":!n.modelValue},"placeholder:text-surface-400 dark:placeholder:text-surface-500","w-[1%]","p-3","rounded-none","transition","duration-200","focus:outline-none focus:shadow-none","relative","cursor-pointer","overflow-hidden overflow-ellipsis","whitespace-nowrap","appearance-none"]}),trigger:{class:["flex items-center justify-center","shrink-0","bg-transparent","text-surface-500","w-12","rounded-tr-md","rounded-br-md"]},panel:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},item:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!n.focused&&!n.selected},{"bg-surface-50 dark:bg-surface-600/60 text-surface-700 dark:text-white/80":n.focused&&!n.selected},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n.focused&&n.selected},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":!n.focused&&n.selected},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!n.focused&&!n.selected},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":n.focused&&!n.selected},"transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]})},filterconstraint:{class:["py-3 px-5","border-b border-solid","border-surface-200 dark:border-surface-700"]},filteraddrule:{class:"py-3 px-5"},filteraddrulebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full","rounded-md","bg-transparent border-transparent","text-primary-500 dark:text-primary-400","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterremovebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full mt-2","rounded-md","bg-transparent border-transparent","text-red-500 dark:text-red-400","hover:bg-red-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterbuttonbar:{class:["flex items-center justify-between","py-3 px-5"]},filterclearbutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-primary-500 border border-primary-500","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filterapplybutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filtermenubutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","w-8 h-8","ml-2","rounded-full",{"bg-primary-50 text-primary-700":n.active},"dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-800","hover:text-surface-700 hover:bg-surface-300/20","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","transition duration-200","cursor-pointer no-underline overflow-hidden"]}),headerfilterclearbutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","text-left","border-none","m-0 p-0 ml-2","bg-transparent","cursor-pointer no-underline overflow-hidden select-none",{invisible:!n.hidden}]}),rowtoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},columnresizer:{class:["block","absolute top-0 right-0","w-2 h-full","m-0 p-0","border border-transparent","cursor-col-resize"]},rowreordericon:{class:"cursor-move"},roweditorinitbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorsavebutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorcancelbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},radiobuttonwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},radiobutton:({context:n})=>({class:["flex justify-center items-center","w-[1.571rem] h-[1.571rem]","border-2 rounded-full",{"text-surface-700 dark:text-white/80":!n.checked},{"bg-surface-0 dark:bg-surface-900":!n.checked},{"border-surface-300 dark:border-surface-700":!n.checked},{"border-primary-500 dark:border-primary-400":n.checked},{"bg-primary-500 dark:bg-primary-400":n.checked},{"hover:border-primary-500 dark:hover:border-primary-400":!n.disabled},{"outline-none outline-offset-0 ring ring-primary-400/50 ring-inset dark:ring-primary-300/50":n.focused},"transition duration-200 ease-in-out",{"cursor-default opacity-60":n.disabled}]}),radiobuttonicon:({context:n})=>({class:["block","rounded-full","w-3 h-3","bg-surface-0 dark:bg-surface-900","transition duration-200 transform",{"backface-hidden scale-10 invisible":n.checked===!1,"transform scale-100 visible":n.checked===!0}]}),headercheckboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},headercheckbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),headercheckboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},checkboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},checkbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),checkboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},transition:{enterFromClass:"opacity-0 scale-y-[0.8]",enterActiveClass:"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",leaveActiveClass:"transition-opacity duration-100 ease-linear",leaveToClass:"opacity-0"}},bodyrow:({context:n,props:e})=>({class:["dark:text-white/80",{"bg-primary-50 text-primary-600 dark:bg-primary-400/30":n.selected},{"bg-surface-0 text-surface-600 dark:bg-surface-800":!n.selected},{"font-bold bg-surface-0 dark:bg-surface-800":e.frozenRow},{"odd:bg-surface-0 odd:text-surface-600 dark:odd:bg-surface-800 even:bg-surface-50 even:text-surface-600 dark:even:bg-surface-900/50":n.stripedRows},{"hover:bg-surface-300/20 hover:text-surface-600":e.selectionMode&&!n.selected},{"transition duration-200":e.selectionMode&&!n.selected||e.rowHover},{"cursor-pointer":e.selectionMode}]}),rowexpansion:{class:"bg-surface-0 dark:bg-surface-800 text-surface-600 dark:text-white/80"},rowgroupheader:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgroupfooter:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgrouptoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},rowgrouptogglericon:{class:"inline-block w-4 h-4"},resizehelper:{class:"absolute hidden w-[2px] z-20 bg-primary-500 dark:bg-primary-400"}},selectbutton:{root:({props:n})=>({class:[{"opacity-60 select-none pointer-events-none cursor-default":n.disabled}]}),button:({context:n})=>({class:["relative","leading-normal text-base","inline-flex items-center align-bottom text-center","px-4 py-2","rounded-lg",{"bg-gray-0 text-gray-40":!n.active,"button-active bg-white text-inkwell-30":n.active},{"opacity-60 select-none pointer-events-none cursor-default":n.disabled},"transition duration-200","cursor-pointer select-none overflow-hidden"]}),label:{class:"font-bold"}},galleria:{content:({parent:n,props:e})=>({class:["flex",{"flex-col":e.fullScreen},{"flex-col":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-row":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),itemwrapper:({parent:n,props:e})=>({class:["group","flex relative","mt-14 md:mt-20 min-h-[74vh]",{"grow shrink w-0 justify-center":e.fullScreen},{"flex-col":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="top","flex-row items-center":n.props.indicatorsPosition==="left"||n.props.indicatorsPosition==="right"},{"order-2":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left","flex-row":n.props.thumbnailsPosition==="right"}]}),itemcontainer:({parent:n})=>({class:["flex w-full md:w-screen h-full relative grow items-center",{"order-1":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="right","order-2":n.props.indicatorsPosition==="top"||n.props.indicatorsPosition==="left"}]}),item:{class:["flex justify-center items-center","h-full w-full","rounded-lg overflow-auto","md:max-w-[592px] mx-auto"]},thumbnailwrapper:({parent:n})=>({class:["flex flex-col shrink-0",{"order-1":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left"},"overflow-auto"]}),thumbnailcontainer:({parent:n})=>({class:["flex","p-4","bg-transparent","md:max-w-[592px] mx-auto",{"flex-row":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-col grow":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),previousthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 ml-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},thumbnailitemscontainer:{class:"overflow-hidden w-full md:w-[30rem]"},thumbnailitems:({parent:n})=>({class:["flex",{"flex-col h-full":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),thumbnailitem:({parent:n})=>({class:["flex items-center justify-center","grow shrink-0",{"w-full md:w-[25%]":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom"},"overflow-auto","cursor-pointer","hover:opacity-100","hover:transition-opacity","hover:duration-300"]}),nextthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 mr-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},indicators:({parent:n})=>({class:["flex items-center justify-center","p-4",{"order-2":n.props.indicatorsPosition=="bottom","order-1":n.props.indicatorsPosition=="top","order-1 flex-col":n.props.indicatorsPosition=="left","flex-col order-2":n.props.indicatorsPosition=="right"},{"absolute z-10 bg-black/50":n.props.showIndicatorsOnItem},{"bottom-0 left-0 w-full items-start":n.props.indicatorsPosition=="bottom"&&n.props.showIndicatorsOnItem,"top-0 left-0 w-full items-start":n.props.indicatorsPosition=="top"&&n.props.showIndicatorsOnItem,"left-0 top-0 h-full items-start":n.props.indicatorsPosition=="left"&&n.props.showIndicatorsOnItem,"right-0 top-0 h-full items-start":n.props.indicatorsPosition=="right"&&n.props.showIndicatorsOnItem}]}),indicator:({parent:n})=>({class:[{"mr-2":n.props.indicatorsPosition=="bottom"||n.props.indicatorsPosition=="top","mb-2":n.props.indicatorsPosition=="left"||n.props.indicatorsPosition=="right"}]}),indicatorbutton:({context:n})=>({class:["w-2 h-2","rounded-full transition duration-200","focus:outline-none focus:outline-offset-0",{"bg-inkwell-30 hover:bg-surface-300 dark:bg-surface-700 dark:hover:bg-surface-600":!n.highlighted},{"bg-white hover:bg-primary-600":n.highlighted}]}),mask:{class:["fixed top-0 left-0 w-full h-full","flex items-center justify-center","bg-inkwell-40/95","image-overlay"]},closebutton:{class:["!absolute top-0 right-0 z-[1001]","flex justify-center items-center overflow-hidden","m-2","text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out","focus:outline-none"]},closeicon:{class:"w-6 h-6"},previousitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] left-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),nextitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] right-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),caption:{class:["absolute bottom-0 left-0 w-full","bg-black/50 text-white p-4"]},transition:{enterFromClass:"opacity-0 scale-75",enterActiveClass:"transition-all duration-150 ease-in-out",leaveActiveClass:"transition-all duration-150 ease-in",leaveToClass:"opacity-0 scale-75"}},fileupload:{input:{class:"hidden"},buttonbar:{class:["flex","flex-wrap","bg-surface-50","dark:bg-surface-800","text-surface-700","dark:text-white/80","p-5","gap-2","border","border-solid","border-surface-200","dark:border-surface-700","border-b-0","rounded-tr-lg","rounded-tl-lg"]},chooseButton:{class:["relative","items-center inline-flex text-center align-bottom justify-center","px-4 py-3","rounded-md","leading-[normal]","font-bold","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","border-primary-500 dark:border-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300","overflow-hidden","cursor-pointer"]},chooseIcon:{class:["mr-2","inline-block"]},chooseButtonLabel:{class:["flex-1","font-bold"]},uploadbutton:{icon:{class:"mr-2"}},cancelbutton:{icon:{class:"mr-2"}},content:{class:["relative","bg-surface-0","dark:bg-surface-900","text-surface-700","dark:text-white/80","p-8","border","border-surface-200","dark:border-surface-700","rounded-b-lg"]},file:{class:["flex","items-center","flex-wrap","p-4","mb-2","last:mb-0","border","border-surface-200","dark:border-surface-700","gap-2","rounded"]},thumbnail:{class:"shrink-0"},fileName:{class:"mb-2"},fileSize:{class:"mr-2"},uploadicon:{class:"mr-2"},progressbar:{root:{class:["overflow-hidden","absolute top-0 left-0","border-0","h-2","rounded-md","w-full","bg-surface-100 dark:bg-surface-700"]},value:{class:["absolute flex items-center justify-center overflow-hidden","bg-primary-500 dark:bg-primary-400","m-0","h-full w-0","border-0","transition-width duration-1000 ease-in-out"]}}}},Rf=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));var $f={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},kfe=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Sfe=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function Mfe(n){const e=n.match(Sfe);return e?e.map(Number):[]}function ZD(n){const e=[],t=String(n).trim();return t[0]!=="M"&&t[0]!=="m"||t.replace(kfe,(r,i,o)=>{const s=Mfe(o);let a=i.toLowerCase(),c=i;if(a==="m"&&s.length>2&&(e.push([c,...s.splice(0,2)]),a="l",c=c==="m"?"l":"L"),s.length<$f[a])return"";for(e.push([c,...s.splice(0,$f[a])]);s.length>=$f[a]&&s.length&&$f[a];)e.push([c,...s.splice(0,$f[a])]);return""}),e}function WD(n,e){const t=n.x*Math.cos(e)-n.y*Math.sin(e),r=n.y*Math.cos(e)+n.x*Math.sin(e);n.x=t,n.y=r}function Efe(n,e,t){n.x+=e,n.y+=t}function qD(n,e){n.x*=e,n.y*=e}var f3=class c8{constructor(e){this.commands=[],e&&e instanceof c8?this.commands.push(...e.commands):e&&(this.commands=ZD(e))}addPath(e){e&&e instanceof c8&&this.commands.push(...e.commands)}moveTo(e,t){this.commands.push(["M",e,t])}lineTo(e,t){this.commands.push(["L",e,t])}arc(e,t,r,i,o,s){this.commands.push(["AC",e,t,r,i,o,!!s])}arcTo(e,t,r,i,o){this.commands.push(["AT",e,t,r,i,o])}ellipse(e,t,r,i,o,s,a,c){this.commands.push(["E",e,t,r,i,o,s,a,!!c])}closePath(){this.commands.push(["Z"])}bezierCurveTo(e,t,r,i,o,s){this.commands.push(["C",e,t,r,i,o,s])}quadraticCurveTo(e,t,r,i){this.commands.push(["Q",e,t,r,i])}rect(e,t,r,i){this.commands.push(["R",e,t,r,i])}roundRect(e,t,r,i,o){typeof o>"u"?this.commands.push(["RR",e,t,r,i,0]):this.commands.push(["RR",e,t,r,i,o])}};function Vf(n,e){let t=0,r=0,i,o,s,a,c,u,d,f,h,p,m,y,b,w,v,k,C,T,S,A,D,I=null,P=null,O=null,_=null,B=null,$=null;n.beginPath();for(let R=0;R<e.length;++R){T=e[R][0],T!=="S"&&T!=="s"&&T!=="C"&&T!=="c"&&(I=null,P=null),T!=="T"&&T!=="t"&&T!=="Q"&&T!=="q"&&(O=null,_=null);let N;switch(T){case"m":case"M":N=e[R],T==="m"?(t+=N[1],r+=N[2]):(t=N[1],r=N[2]),(T==="M"||!B)&&(B={x:t,y:r}),n.moveTo(t,r);break;case"l":N=e[R],t+=N[1],r+=N[2],n.lineTo(t,r);break;case"L":N=e[R],t=N[1],r=N[2],n.lineTo(t,r);break;case"H":N=e[R],t=N[1],n.lineTo(t,r);break;case"h":N=e[R],t+=N[1],n.lineTo(t,r);break;case"V":N=e[R],r=N[1],n.lineTo(t,r);break;case"v":N=e[R],r+=N[1],n.lineTo(t,r);break;case"a":case"A":if(N=e[R],$===null)throw new Error("This should never happen");T==="a"?(t+=N[6],r+=N[7]):(t=N[6],r=N[7]),w=N[1],v=N[2],d=N[3]*Math.PI/180,s=!!N[4],a=!!N[5],c={x:t,y:r},u={x:($.x-c.x)/2,y:($.y-c.y)/2},WD(u,-d),f=u.x*u.x/(w*w)+u.y*u.y/(v*v),f>1&&(f=Math.sqrt(f),w*=f,v*=f),S={x:w*u.y/v,y:-(v*u.x)/w},h=w*w*v*v,p=w*w*u.y*u.y+v*v*u.x*u.x,a!==s?qD(S,Math.sqrt((h-p)/p)||0):qD(S,-Math.sqrt((h-p)/p)||0),o=Math.atan2((u.y-S.y)/v,(u.x-S.x)/w),i=Math.atan2(-(u.y+S.y)/v,-(u.x+S.x)/w),WD(S,d),Efe(S,(c.x+$.x)/2,(c.y+$.y)/2),n.save(),n.translate(S.x,S.y),n.rotate(d),n.scale(w,v),n.arc(0,0,1,o,i,!a),n.restore();break;case"C":N=e[R],I=N[3],P=N[4],t=N[5],r=N[6],n.bezierCurveTo(N[1],N[2],I,P,t,r);break;case"c":N=e[R],n.bezierCurveTo(N[1]+t,N[2]+r,N[3]+t,N[4]+r,N[5]+t,N[6]+r),I=N[3]+t,P=N[4]+r,t+=N[5],r+=N[6];break;case"S":N=e[R],(I===null||P===null)&&(I=t,P=r),n.bezierCurveTo(2*t-I,2*r-P,N[1],N[2],N[3],N[4]),I=N[1],P=N[2],t=N[3],r=N[4];break;case"s":N=e[R],(I===null||P===null)&&(I=t,P=r),n.bezierCurveTo(2*t-I,2*r-P,N[1]+t,N[2]+r,N[3]+t,N[4]+r),I=N[1]+t,P=N[2]+r,t+=N[3],r+=N[4];break;case"Q":N=e[R],O=N[1],_=N[2],t=N[3],r=N[4],n.quadraticCurveTo(O,_,t,r);break;case"q":N=e[R],O=N[1]+t,_=N[2]+r,t+=N[3],r+=N[4],n.quadraticCurveTo(O,_,t,r);break;case"T":N=e[R],(O===null||_===null)&&(O=t,_=r),O=2*t-O,_=2*r-_,t=N[1],r=N[2],n.quadraticCurveTo(O,_,t,r);break;case"t":N=e[R],(O===null||_===null)&&(O=t,_=r),O=2*t-O,_=2*r-_,t+=N[1],r+=N[2],n.quadraticCurveTo(O,_,t,r);break;case"z":case"Z":B&&(t=B.x,r=B.y),B=null,n.closePath();break;case"AC":N=e[R],t=N[1],r=N[2],b=N[3],o=N[4],i=N[5],A=N[6],n.arc(t,r,b,o,i,A);break;case"AT":N=e[R],m=N[1],y=N[2],t=N[3],r=N[4],b=N[5],n.arcTo(m,y,t,r,b);break;case"E":N=e[R],t=N[1],r=N[2],w=N[3],v=N[4],d=N[5],o=N[6],i=N[7],A=N[8],n.save(),n.translate(t,r),n.rotate(d),n.scale(w,v),n.arc(0,0,1,o,i,A),n.restore();break;case"R":N=e[R],t=N[1],r=N[2],k=N[3],C=N[4],B={x:t,y:r},n.rect(t,r,k,C);break;case"RR":N=e[R],t=N[1],r=N[2],k=N[3],C=N[4],D=N[5],B={x:t,y:r},n.roundRect(t,r,k,C,D);break;default:throw new Error(`Invalid path command: ${T}`)}$?($.x=t,$.y=r):$={x:t,y:r}}}function ev(n,e,t,r,i=0){if(typeof i=="number"&&(i=[i]),Array.isArray(i)){if(i.length===0||i.length>4)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': ${i.length} radii provided. Between one and four radii are necessary.`);i.forEach(d=>{if(d<0)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': Radius value ${d} is negative.`)})}else return;if(i.length===1&&i[0]===0){this.rect(n,e,t,r);return}const o=Math.min(t,r)/2,s=Math.min(o,i[0]);let a=s,c=s,u=s;i.length===2&&(a=Math.min(o,i[1]),u=a),i.length===3&&(a=Math.min(o,i[1]),u=a,c=Math.min(o,i[2])),i.length===4&&(a=Math.min(o,i[1]),c=Math.min(o,i[2]),u=Math.min(o,i[3])),this.moveTo(n,e+r-u),this.arcTo(n,e,n+s,e,s),this.arcTo(n+t,e,n+t,e+a,a),this.arcTo(n+t,e+r,n+t-c,e+r,c),this.arcTo(n,e+r,n,e+r-u,u),this.moveTo(n,e)}function Afe(n){if(!n)return;const e=n.prototype.clip,t=n.prototype.fill,r=n.prototype.stroke,i=n.prototype.isPointInPath;n.prototype.clip=function(...s){if(s[0]instanceof f3){const c=s[0],u=s[1]||"nonzero";return Vf(this,c.commands),e.apply(this,[u])}const a=s[0]||"nonzero";return e.apply(this,[a])},n.prototype.fill=function(...s){if(s[0]instanceof f3){const c=s[0],u=s[1]||"nonzero";return Vf(this,c.commands),t.apply(this,[u])}const a=s[0]||"nonzero";return t.apply(this,[a])},n.prototype.stroke=function(s){s&&Vf(this,s.commands),r.apply(this)},n.prototype.isPointInPath=function(...s){if(s[0]instanceof f3){const a=s[0],c=s[1],u=s[2],d=s[3]||"nonzero";return Vf(this,a.commands),i.apply(this,[c,u,d])}return i.apply(this,s)}}function Tfe(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=ev)}function xfe(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=ev)}const Ife=Object.freeze(Object.defineProperty({__proto__:null,Path2D:f3,applyPath2DToCanvasRenderingContext:Afe,applyRoundRectToCanvasRenderingContext2D:Tfe,applyRoundRectToPath2D:xfe,buildPath:Vf,parsePath:ZD,roundRect:ev},Symbol.toStringTag,{value:"Module"}));J.DateTimePlugin=pfe,J.PrimeVue=vfe,J.PrimeVuePresets=Cfe,J.QAccordion=SP,J.QAvatar=u8,J.QBadge=Da,J.QBanner=DP,J.QBottomSheet=G9,J.QButton=Y9,J.QButtonGroup=oV,J.QCheckbox=mV,J.QComment=_I,J.QCommentSection=doe,J.QCounter=goe,J.QDatePicker=eae,J.QDivider=iae,J.QErrorModal=oE,J.QFileUpload=PI,J.QFooterActions=lae,J.QFormGroup=mae,J.QGrid=Tae,J.QIcon=z0,J.QIconActionGroup=_ae,J.QImageGallery=n6,J.QInput=$ae,J.QList=rle,J.QMenu=m4,J.QModal=e6,J.QModalContent=lle,J.QPageHeading=fle,J.QPageNavigation=gle,J.QPdfViewer=sE,J.QPopover=cE,J.QSelect=e0e,J.QTable=A2e,J.QTag=I2e,J.QTextarea=L2e,J.QToast=j2e,J.QTooltip=t6,J.QTour=hfe,J.QWarningModal=lE,J.QWysiwyg=gw,J.filterData=Lw,J.mq=_n,J.useDeviceType=aE,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
476
+ `},datatable:{root:({props:n})=>({class:["relative",{"flex flex-col":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),loadingoverlay:{class:["absolute","top-0 left-0","z-20","flex items-center justify-center","w-full h-full","bg-surface-100/0 dark:bg-surface-800/0","transition duration-200"]},loadingicon:{class:"w-8 h-8 animate-spin hidden"},wrapper:({props:n})=>({class:[{relative:n.scrollable,"flex flex-col grow":n.scrollable&&n.scrollHeight==="flex"},{"h-full":n.scrollable&&n.scrollHeight==="flex"}]}),header:({props:n})=>({class:["font-bold",n.showGridlines?"border-x border-t border-b-0":"border-y border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]}),table:{class:"w-full border-spacing-0 border-separate"},thead:({context:n})=>({class:[{"bg-surface-50 z-40 sticky":n.scrollable}]}),tbody:({instance:n,context:e})=>({class:[{"sticky z-20":n.frozenRow&&e.scrollable}]}),tfoot:({context:n})=>({class:[{"bg-surface-50 bottom-0 z-0":n.scrollable}]}),footer:{class:["font-bold","border-t-0 border-b border-x-0","p-4","bg-surface-50 dark:bg-surface-800","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80"]},column:{headercell:({context:n,props:e})=>({class:["font-bold",{"sticky z-20 border-b":e.frozen||e.frozen===""},{relative:n.resizable},"text-left",{"first:border-l border-y border-r":n==null?void 0:n.showGridlines},"border-0 border-b border-solid",(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4",(e.sortable===""||e.sortable)&&n.sorted?"bg-primary-50 text-primary-700":"bg-surface-50 text-surface-700",(e.sortable===""||e.sortable)&&n.sorted?"dark:text-white dark:bg-primary-400/30":"dark:text-white/80 dark:bg-surface-800","border-surface-200 dark:border-surface-700 ",{"hover:bg-surface-100 dark:hover:bg-surface-400/30":(e.sortable===""||e.sortable)&&!(n!=null&&n.sorted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",{"transition duration-200":e.sortable===""||e.sortable},{"cursor-pointer":e.sortable===""||e.sortable},{"overflow-hidden space-nowrap border-y bg-clip-padding":n.resizable}]}),headercontent:{class:"flex items-center"},sort:({context:n})=>({class:[n.sorted?"text-primary-500":"text-surface-700",n.sorted?"dark:text-primary-400":"dark:text-white/80"]}),bodycell:({props:n,context:e,state:t,parent:r})=>({class:[{"sticky box-border border-b":r.instance.frozenRow},{"sticky box-border border-b":n.frozen||n.frozen===""},"text-left","border-0 border-b border-solid",{"first:border-l border-r border-b":e==null?void 0:e.showGridlines},{"bg-surface-0 dark:bg-surface-800":r.instance.frozenRow||n.frozen||n.frozen===""},{"p-2":(e==null?void 0:e.size)==="small"&&!t.d_editing},{"p-5":(e==null?void 0:e.size)==="large"&&!t.d_editing},{"p-4":(e==null?void 0:e.size)!=="large"&&(e==null?void 0:e.size)!=="small"&&!t.d_editing},{"py-[0.6rem] px-2":t.d_editing},"border-surface-200 dark:border-surface-700"]}),footercell:({context:n})=>({class:["font-bold","text-left","border-0 border-b border-solid",{"border-x border-y":n==null?void 0:n.showGridlines},(n==null?void 0:n.size)==="small"?"p-2":(n==null?void 0:n.size)==="large"?"p-5":"p-4","border-surface-200 dark:border-surface-700","text-surface-700 dark:text-white/80","bg-surface-50 dark:bg-surface-800"]}),sorticon:({context:n})=>({class:["ml-2",n.sorted?"text-primary-700 dark:text-white/80":"text-surface-700 dark:text-white/70"]}),sortbadge:{class:["flex items-center justify-center align-middle","rounded-full","w-[1.143rem] leading-[1.143rem]","ml-2","text-primary-700 dark:text-white","bg-primary-50 dark:bg-primary-400/30"]},columnfilter:{class:"inline-flex items-center ml-auto"},filteroverlay:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","min-w-[12.5rem]","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},filtermatchmodedropdown:{root:({state:n})=>({class:["flex","relative","my-2","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","text-surface-800 dark:text-white/80","placeholder:text-surface-400 dark:placeholder:text-surface-500","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]})},filterrowitems:{class:"m-0 p-0 py-3 list-none"},filterrowitem:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-surface-0 dark:bg-surface-800 text-surface-700 dark:text-white/80":!(n!=null&&n.highlighted)},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n==null?void 0:n.highlighted},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":!(n!=null&&n.highlighted)},"focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]}),filteroperator:{class:["px-5 py-3","border-b border-solid","rounded-t-md","text-surface-700 dark:text-white/80","border-surface-200 dark:border-surface-800","bg-surface-0 dark:bg-surface-700"]},filteroperatordropdown:{root:({state:n})=>({class:["inline-flex","relative","w-full","rounded-md","bg-surface-0 dark:bg-surface-900","border border-surface-300 dark:border-surface-700","transition-all","duration-200","hover:border-primary-500 dark:hover:border-primary-300",{"outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"cursor-pointer","select-none"]}),input:({props:n})=>({class:["font-sans","leading-none","block","flex-auto","bg-transparent","border-0",{"text-surface-800 dark:text-white/80":n.modelValue,"text-surface-400 dark:text-surface-500":!n.modelValue},"placeholder:text-surface-400 dark:placeholder:text-surface-500","w-[1%]","p-3","rounded-none","transition","duration-200","focus:outline-none focus:shadow-none","relative","cursor-pointer","overflow-hidden overflow-ellipsis","whitespace-nowrap","appearance-none"]}),trigger:{class:["flex items-center justify-center","shrink-0","bg-transparent","text-surface-500","w-12","rounded-tr-md","rounded-br-md"]},panel:{class:["absolute top-0 left-0","border-0 dark:border","rounded-md","shadow-md","bg-surface-0 dark:bg-surface-800","text-surface-800 dark:text-white/80","dark:border-surface-700"]},item:({context:n})=>({class:["font-normal","leading-none","relative","border-0","rounded-none","m-0","py-3 px-5",{"text-surface-700 dark:text-white/80":!n.focused&&!n.selected},{"bg-surface-50 dark:bg-surface-600/60 text-surface-700 dark:text-white/80":n.focused&&!n.selected},{"bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":n.focused&&n.selected},{"bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":!n.focused&&n.selected},{"hover:bg-surface-100 dark:hover:bg-surface-600/80":!n.focused&&!n.selected},{"hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":n.focused&&!n.selected},"transition-shadow","duration-200","cursor-pointer","overflow-hidden","whitespace-nowrap"]})},filterconstraint:{class:["py-3 px-5","border-b border-solid","border-surface-200 dark:border-surface-700"]},filteraddrule:{class:"py-3 px-5"},filteraddrulebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full","rounded-md","bg-transparent border-transparent","text-primary-500 dark:text-primary-400","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterremovebutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3 w-full mt-2","rounded-md","bg-transparent border-transparent","text-red-500 dark:text-red-400","hover:bg-red-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]},label:{class:"flex-auto grow-0"},icon:{class:"mr-2"}},filterbuttonbar:{class:["flex items-center justify-between","py-3 px-5"]},filterclearbutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-primary-500 border border-primary-500","hover:bg-primary-300/20","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filterapplybutton:{root:{class:["relative","items-center inline-flex text-center align-bottom justify-center","text-sm py-2 px-3","rounded-md","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300","transition duration-200 ease-in-out","cursor-pointer overflow-hidden select-none"]}},filtermenubutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","w-8 h-8","ml-2","rounded-full",{"bg-primary-50 text-primary-700":n.active},"dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-800","hover:text-surface-700 hover:bg-surface-300/20","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","transition duration-200","cursor-pointer no-underline overflow-hidden"]}),headerfilterclearbutton:({context:n})=>({class:["relative","inline-flex items-center justify-center","text-left","border-none","m-0 p-0 ml-2","bg-transparent","cursor-pointer no-underline overflow-hidden select-none",{invisible:!n.hidden}]}),rowtoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},columnresizer:{class:["block","absolute top-0 right-0","w-2 h-full","m-0 p-0","border border-transparent","cursor-col-resize"]},rowreordericon:{class:"cursor-move"},roweditorinitbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorsavebutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},roweditorcancelbutton:{class:["relative","inline-flex items-center justify-center","text-left","w-8 h-8","border-0 rounded-full","text-surface-700 dark:text-white/70","border-transparent","focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50","hover:text-surface-700 hover:bg-surface-300/20","transition duration-200","overflow-hidden","cursor-pointer select-none"]},radiobuttonwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},radiobutton:({context:n})=>({class:["flex justify-center items-center","w-[1.571rem] h-[1.571rem]","border-2 rounded-full",{"text-surface-700 dark:text-white/80":!n.checked},{"bg-surface-0 dark:bg-surface-900":!n.checked},{"border-surface-300 dark:border-surface-700":!n.checked},{"border-primary-500 dark:border-primary-400":n.checked},{"bg-primary-500 dark:bg-primary-400":n.checked},{"hover:border-primary-500 dark:hover:border-primary-400":!n.disabled},{"outline-none outline-offset-0 ring ring-primary-400/50 ring-inset dark:ring-primary-300/50":n.focused},"transition duration-200 ease-in-out",{"cursor-default opacity-60":n.disabled}]}),radiobuttonicon:({context:n})=>({class:["block","rounded-full","w-3 h-3","bg-surface-0 dark:bg-surface-900","transition duration-200 transform",{"backface-hidden scale-10 invisible":n.checked===!1,"transform scale-100 visible":n.checked===!0}]}),headercheckboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},headercheckbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),headercheckboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},checkboxwrapper:{class:["relative","inline-flex align-bottom","w-6 h-6","cursor-pointer select-none"]},checkbox:({context:n})=>({class:["flex items-center justify-center","border-2 rounded-lg","w-6 h-6","text-surface-600",{"border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":!n.checked,"border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":n.checked},"focus:outline-none focus:outline-offset-0",{"ring ring-primary-400/50 dark:ring-primary-300/50":n.focused},"transition-colors duration-200",{"cursor-default opacity-60":n.disabled}]}),checkboxicon:{class:["w-4 h-4","text-base leading-none","text-white dark:text-surface-900","transition-all duration-200"]},transition:{enterFromClass:"opacity-0 scale-y-[0.8]",enterActiveClass:"transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",leaveActiveClass:"transition-opacity duration-100 ease-linear",leaveToClass:"opacity-0"}},bodyrow:({context:n,props:e})=>({class:["dark:text-white/80",{"bg-primary-50 text-primary-600 dark:bg-primary-400/30":n.selected},{"bg-surface-0 text-surface-600 dark:bg-surface-800":!n.selected},{"font-bold bg-surface-0 dark:bg-surface-800":e.frozenRow},{"odd:bg-surface-0 odd:text-surface-600 dark:odd:bg-surface-800 even:bg-surface-50 even:text-surface-600 dark:even:bg-surface-900/50":n.stripedRows},{"hover:bg-surface-300/20 hover:text-surface-600":e.selectionMode&&!n.selected},{"transition duration-200":e.selectionMode&&!n.selected||e.rowHover},{"cursor-pointer":e.selectionMode}]}),rowexpansion:{class:"bg-surface-0 dark:bg-surface-800 text-surface-600 dark:text-white/80"},rowgroupheader:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgroupfooter:{class:["sticky z-20","bg-surface-0 text-surface-600 dark:text-white/70","dark:bg-surface-800"]},rowgrouptoggler:{class:["relative","inline-flex items-center justify-center","text-left","m-0 p-0","w-8 h-8","border-0 rounded-full","text-surface-500 dark:text-white/70","bg-transparent","focus-visible:outline-none focus-visible:outline-offset-0","focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50","transition duration-200","overflow-hidden","cursor-pointer select-none"]},rowgrouptogglericon:{class:"inline-block w-4 h-4"},resizehelper:{class:"absolute hidden w-[2px] z-20 bg-primary-500 dark:bg-primary-400"}},selectbutton:{root:({props:n})=>({class:[{"opacity-60 select-none pointer-events-none cursor-default":n.disabled}]}),button:({context:n})=>({class:["relative","leading-normal text-base","inline-flex items-center align-bottom text-center","px-4 py-2","rounded-lg",{"bg-gray-0 text-gray-40":!n.active,"button-active bg-white text-inkwell-30":n.active},{"opacity-60 select-none pointer-events-none cursor-default":n.disabled},"transition duration-200","cursor-pointer select-none overflow-hidden"]}),label:{class:"font-bold"}},galleria:{content:({parent:n,props:e})=>({class:["flex",{"flex-col":e.fullScreen},{"flex-col":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-row":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),itemwrapper:({parent:n,props:e})=>({class:["group","flex relative","mt-14 md:mt-20 min-h-[74vh]",{"grow shrink w-0 justify-center":e.fullScreen},{"flex-col":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="top","flex-row items-center":n.props.indicatorsPosition==="left"||n.props.indicatorsPosition==="right"},{"order-2":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left","flex-row":n.props.thumbnailsPosition==="right"}]}),itemcontainer:({parent:n})=>({class:["flex w-full md:w-screen h-full relative grow items-center",{"order-1":n.props.indicatorsPosition==="bottom"||n.props.indicatorsPosition==="right","order-2":n.props.indicatorsPosition==="top"||n.props.indicatorsPosition==="left"}]}),item:{class:["flex justify-center items-center","h-full w-full","rounded-lg overflow-auto","md:max-w-[592px] mx-auto"]},thumbnailwrapper:({parent:n})=>({class:["flex flex-col shrink-0",{"order-1":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="left"},"overflow-auto"]}),thumbnailcontainer:({parent:n})=>({class:["flex","p-4","bg-transparent","md:max-w-[592px] mx-auto",{"flex-row":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom","flex-col grow":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),previousthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 ml-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},thumbnailitemscontainer:{class:"overflow-hidden w-full md:w-[30rem]"},thumbnailitems:({parent:n})=>({class:["flex",{"flex-col h-full":n.props.thumbnailsPosition==="right"||n.props.thumbnailsPosition==="left"}]}),thumbnailitem:({parent:n})=>({class:["flex items-center justify-center","grow shrink-0",{"w-full md:w-[25%]":n.props.thumbnailsPosition==="top"||n.props.thumbnailsPosition==="bottom"},"overflow-auto","cursor-pointer","hover:opacity-100","hover:transition-opacity","hover:duration-300"]}),nextthumbnailbutton:{class:["self-center relative","flex shrink-0 justify-center items-center overflow-hidden","m-2 mr-0","bg-transparent text-white w-8 h-8 rounded-full transition duration-200 ease-in-out","hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]},indicators:({parent:n})=>({class:["flex items-center justify-center","p-4",{"order-2":n.props.indicatorsPosition=="bottom","order-1":n.props.indicatorsPosition=="top","order-1 flex-col":n.props.indicatorsPosition=="left","flex-col order-2":n.props.indicatorsPosition=="right"},{"absolute z-10 bg-black/50":n.props.showIndicatorsOnItem},{"bottom-0 left-0 w-full items-start":n.props.indicatorsPosition=="bottom"&&n.props.showIndicatorsOnItem,"top-0 left-0 w-full items-start":n.props.indicatorsPosition=="top"&&n.props.showIndicatorsOnItem,"left-0 top-0 h-full items-start":n.props.indicatorsPosition=="left"&&n.props.showIndicatorsOnItem,"right-0 top-0 h-full items-start":n.props.indicatorsPosition=="right"&&n.props.showIndicatorsOnItem}]}),indicator:({parent:n})=>({class:[{"mr-2":n.props.indicatorsPosition=="bottom"||n.props.indicatorsPosition=="top","mb-2":n.props.indicatorsPosition=="left"||n.props.indicatorsPosition=="right"}]}),indicatorbutton:({context:n})=>({class:["w-2 h-2","rounded-full transition duration-200","focus:outline-none focus:outline-offset-0",{"bg-inkwell-30 hover:bg-surface-300 dark:bg-surface-700 dark:hover:bg-surface-600":!n.highlighted},{"bg-white hover:bg-primary-600":n.highlighted}]}),mask:{class:["fixed top-0 left-0 w-full h-full","flex items-center justify-center","bg-inkwell-40/95","image-overlay"]},closebutton:{class:["!absolute top-0 right-0 z-[1001]","flex justify-center items-center overflow-hidden","m-2","text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out","focus:outline-none"]},closeicon:{class:"w-6 h-6"},previousitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] left-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),nextitembutton:({parent:n})=>({class:["inline-flex justify-center items-center overflow-hidden","bg-transparent text-white w-16 h-16 transition duration-200 ease-in-out rounded-md",{"opacity-0 group-hover:opacity-100":n.props.showItemNavigatorsOnHover},"mx-2","top-1/2 mt-[-0.5rem] right-0",{"!absolute":n.props.showItemNavigators,"!fixed":!n.props.showItemNavigators},"hover:bg-surface-0/10 hover:text-white","focus:outline-none focus:outline-offset-0"]}),caption:{class:["absolute bottom-0 left-0 w-full","bg-black/50 text-white p-4"]},transition:{enterFromClass:"opacity-0 scale-75",enterActiveClass:"transition-all duration-150 ease-in-out",leaveActiveClass:"transition-all duration-150 ease-in",leaveToClass:"opacity-0 scale-75"}},fileupload:{input:{class:"hidden"},buttonbar:{class:["flex","flex-wrap","bg-surface-50","dark:bg-surface-800","text-surface-700","dark:text-white/80","p-5","gap-2","border","border-solid","border-surface-200","dark:border-surface-700","border-b-0","rounded-tr-lg","rounded-tl-lg"]},chooseButton:{class:["relative","items-center inline-flex text-center align-bottom justify-center","px-4 py-3","rounded-md","leading-[normal]","font-bold","text-white dark:text-surface-900","bg-primary-500 dark:bg-primary-400","border-primary-500 dark:border-primary-400","hover:bg-primary-600 dark:hover:bg-primary-300","overflow-hidden","cursor-pointer"]},chooseIcon:{class:["mr-2","inline-block"]},chooseButtonLabel:{class:["flex-1","font-bold"]},uploadbutton:{icon:{class:"mr-2"}},cancelbutton:{icon:{class:"mr-2"}},content:{class:["relative","bg-surface-0","dark:bg-surface-900","text-surface-700","dark:text-white/80","p-8","border","border-surface-200","dark:border-surface-700","rounded-b-lg"]},file:{class:["flex","items-center","flex-wrap","p-4","mb-2","last:mb-0","border","border-surface-200","dark:border-surface-700","gap-2","rounded"]},thumbnail:{class:"shrink-0"},fileName:{class:"mb-2"},fileSize:{class:"mr-2"},uploadicon:{class:"mr-2"},progressbar:{root:{class:["overflow-hidden","absolute top-0 left-0","border-0","h-2","rounded-md","w-full","bg-surface-100 dark:bg-surface-700"]},value:{class:["absolute flex items-center justify-center overflow-hidden","bg-primary-500 dark:bg-primary-400","m-0","h-full w-0","border-0","transition-width duration-1000 ease-in-out"]}}}},Rf=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));var $f={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},vfe=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Cfe=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function kfe(n){const e=n.match(Cfe);return e?e.map(Number):[]}function ZD(n){const e=[],t=String(n).trim();return t[0]!=="M"&&t[0]!=="m"||t.replace(vfe,(r,i,o)=>{const s=kfe(o);let a=i.toLowerCase(),c=i;if(a==="m"&&s.length>2&&(e.push([c,...s.splice(0,2)]),a="l",c=c==="m"?"l":"L"),s.length<$f[a])return"";for(e.push([c,...s.splice(0,$f[a])]);s.length>=$f[a]&&s.length&&$f[a];)e.push([c,...s.splice(0,$f[a])]);return""}),e}function WD(n,e){const t=n.x*Math.cos(e)-n.y*Math.sin(e),r=n.y*Math.cos(e)+n.x*Math.sin(e);n.x=t,n.y=r}function Sfe(n,e,t){n.x+=e,n.y+=t}function qD(n,e){n.x*=e,n.y*=e}var f3=class c8{constructor(e){this.commands=[],e&&e instanceof c8?this.commands.push(...e.commands):e&&(this.commands=ZD(e))}addPath(e){e&&e instanceof c8&&this.commands.push(...e.commands)}moveTo(e,t){this.commands.push(["M",e,t])}lineTo(e,t){this.commands.push(["L",e,t])}arc(e,t,r,i,o,s){this.commands.push(["AC",e,t,r,i,o,!!s])}arcTo(e,t,r,i,o){this.commands.push(["AT",e,t,r,i,o])}ellipse(e,t,r,i,o,s,a,c){this.commands.push(["E",e,t,r,i,o,s,a,!!c])}closePath(){this.commands.push(["Z"])}bezierCurveTo(e,t,r,i,o,s){this.commands.push(["C",e,t,r,i,o,s])}quadraticCurveTo(e,t,r,i){this.commands.push(["Q",e,t,r,i])}rect(e,t,r,i){this.commands.push(["R",e,t,r,i])}roundRect(e,t,r,i,o){typeof o>"u"?this.commands.push(["RR",e,t,r,i,0]):this.commands.push(["RR",e,t,r,i,o])}};function Vf(n,e){let t=0,r=0,i,o,s,a,c,u,d,f,h,p,m,y,b,w,v,k,C,T,S,A,D,I=null,P=null,O=null,_=null,B=null,$=null;n.beginPath();for(let R=0;R<e.length;++R){T=e[R][0],T!=="S"&&T!=="s"&&T!=="C"&&T!=="c"&&(I=null,P=null),T!=="T"&&T!=="t"&&T!=="Q"&&T!=="q"&&(O=null,_=null);let N;switch(T){case"m":case"M":N=e[R],T==="m"?(t+=N[1],r+=N[2]):(t=N[1],r=N[2]),(T==="M"||!B)&&(B={x:t,y:r}),n.moveTo(t,r);break;case"l":N=e[R],t+=N[1],r+=N[2],n.lineTo(t,r);break;case"L":N=e[R],t=N[1],r=N[2],n.lineTo(t,r);break;case"H":N=e[R],t=N[1],n.lineTo(t,r);break;case"h":N=e[R],t+=N[1],n.lineTo(t,r);break;case"V":N=e[R],r=N[1],n.lineTo(t,r);break;case"v":N=e[R],r+=N[1],n.lineTo(t,r);break;case"a":case"A":if(N=e[R],$===null)throw new Error("This should never happen");T==="a"?(t+=N[6],r+=N[7]):(t=N[6],r=N[7]),w=N[1],v=N[2],d=N[3]*Math.PI/180,s=!!N[4],a=!!N[5],c={x:t,y:r},u={x:($.x-c.x)/2,y:($.y-c.y)/2},WD(u,-d),f=u.x*u.x/(w*w)+u.y*u.y/(v*v),f>1&&(f=Math.sqrt(f),w*=f,v*=f),S={x:w*u.y/v,y:-(v*u.x)/w},h=w*w*v*v,p=w*w*u.y*u.y+v*v*u.x*u.x,a!==s?qD(S,Math.sqrt((h-p)/p)||0):qD(S,-Math.sqrt((h-p)/p)||0),o=Math.atan2((u.y-S.y)/v,(u.x-S.x)/w),i=Math.atan2(-(u.y+S.y)/v,-(u.x+S.x)/w),WD(S,d),Sfe(S,(c.x+$.x)/2,(c.y+$.y)/2),n.save(),n.translate(S.x,S.y),n.rotate(d),n.scale(w,v),n.arc(0,0,1,o,i,!a),n.restore();break;case"C":N=e[R],I=N[3],P=N[4],t=N[5],r=N[6],n.bezierCurveTo(N[1],N[2],I,P,t,r);break;case"c":N=e[R],n.bezierCurveTo(N[1]+t,N[2]+r,N[3]+t,N[4]+r,N[5]+t,N[6]+r),I=N[3]+t,P=N[4]+r,t+=N[5],r+=N[6];break;case"S":N=e[R],(I===null||P===null)&&(I=t,P=r),n.bezierCurveTo(2*t-I,2*r-P,N[1],N[2],N[3],N[4]),I=N[1],P=N[2],t=N[3],r=N[4];break;case"s":N=e[R],(I===null||P===null)&&(I=t,P=r),n.bezierCurveTo(2*t-I,2*r-P,N[1]+t,N[2]+r,N[3]+t,N[4]+r),I=N[1]+t,P=N[2]+r,t+=N[3],r+=N[4];break;case"Q":N=e[R],O=N[1],_=N[2],t=N[3],r=N[4],n.quadraticCurveTo(O,_,t,r);break;case"q":N=e[R],O=N[1]+t,_=N[2]+r,t+=N[3],r+=N[4],n.quadraticCurveTo(O,_,t,r);break;case"T":N=e[R],(O===null||_===null)&&(O=t,_=r),O=2*t-O,_=2*r-_,t=N[1],r=N[2],n.quadraticCurveTo(O,_,t,r);break;case"t":N=e[R],(O===null||_===null)&&(O=t,_=r),O=2*t-O,_=2*r-_,t+=N[1],r+=N[2],n.quadraticCurveTo(O,_,t,r);break;case"z":case"Z":B&&(t=B.x,r=B.y),B=null,n.closePath();break;case"AC":N=e[R],t=N[1],r=N[2],b=N[3],o=N[4],i=N[5],A=N[6],n.arc(t,r,b,o,i,A);break;case"AT":N=e[R],m=N[1],y=N[2],t=N[3],r=N[4],b=N[5],n.arcTo(m,y,t,r,b);break;case"E":N=e[R],t=N[1],r=N[2],w=N[3],v=N[4],d=N[5],o=N[6],i=N[7],A=N[8],n.save(),n.translate(t,r),n.rotate(d),n.scale(w,v),n.arc(0,0,1,o,i,A),n.restore();break;case"R":N=e[R],t=N[1],r=N[2],k=N[3],C=N[4],B={x:t,y:r},n.rect(t,r,k,C);break;case"RR":N=e[R],t=N[1],r=N[2],k=N[3],C=N[4],D=N[5],B={x:t,y:r},n.roundRect(t,r,k,C,D);break;default:throw new Error(`Invalid path command: ${T}`)}$?($.x=t,$.y=r):$={x:t,y:r}}}function ev(n,e,t,r,i=0){if(typeof i=="number"&&(i=[i]),Array.isArray(i)){if(i.length===0||i.length>4)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': ${i.length} radii provided. Between one and four radii are necessary.`);i.forEach(d=>{if(d<0)throw new RangeError(`Failed to execute 'roundRect' on '${this.constructor.name}': Radius value ${d} is negative.`)})}else return;if(i.length===1&&i[0]===0){this.rect(n,e,t,r);return}const o=Math.min(t,r)/2,s=Math.min(o,i[0]);let a=s,c=s,u=s;i.length===2&&(a=Math.min(o,i[1]),u=a),i.length===3&&(a=Math.min(o,i[1]),u=a,c=Math.min(o,i[2])),i.length===4&&(a=Math.min(o,i[1]),c=Math.min(o,i[2]),u=Math.min(o,i[3])),this.moveTo(n,e+r-u),this.arcTo(n,e,n+s,e,s),this.arcTo(n+t,e,n+t,e+a,a),this.arcTo(n+t,e+r,n+t-c,e+r,c),this.arcTo(n,e+r,n,e+r-u,u),this.moveTo(n,e)}function Mfe(n){if(!n)return;const e=n.prototype.clip,t=n.prototype.fill,r=n.prototype.stroke,i=n.prototype.isPointInPath;n.prototype.clip=function(...s){if(s[0]instanceof f3){const c=s[0],u=s[1]||"nonzero";return Vf(this,c.commands),e.apply(this,[u])}const a=s[0]||"nonzero";return e.apply(this,[a])},n.prototype.fill=function(...s){if(s[0]instanceof f3){const c=s[0],u=s[1]||"nonzero";return Vf(this,c.commands),t.apply(this,[u])}const a=s[0]||"nonzero";return t.apply(this,[a])},n.prototype.stroke=function(s){s&&Vf(this,s.commands),r.apply(this)},n.prototype.isPointInPath=function(...s){if(s[0]instanceof f3){const a=s[0],c=s[1],u=s[2],d=s[3]||"nonzero";return Vf(this,a.commands),i.apply(this,[c,u,d])}return i.apply(this,s)}}function Efe(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=ev)}function Afe(n){n&&!n.prototype.roundRect&&(n.prototype.roundRect=ev)}const Tfe=Object.freeze(Object.defineProperty({__proto__:null,Path2D:f3,applyPath2DToCanvasRenderingContext:Mfe,applyRoundRectToCanvasRenderingContext2D:Efe,applyRoundRectToPath2D:Afe,buildPath:Vf,parsePath:ZD,roundRect:ev},Symbol.toStringTag,{value:"Module"}));J.DateTimePlugin=ffe,J.PrimeVue=bfe,J.PrimeVuePresets=wfe,J.QAccordion=SP,J.QAvatar=u8,J.QBadge=Da,J.QBanner=DP,J.QBottomSheet=G9,J.QButton=Y9,J.QButtonGroup=oV,J.QCheckbox=mV,J.QComment=_I,J.QCommentSection=doe,J.QCounter=goe,J.QDatePicker=eae,J.QDivider=iae,J.QErrorModal=oE,J.QFileUpload=PI,J.QFooterActions=lae,J.QFormGroup=mae,J.QGrid=Tae,J.QIcon=z0,J.QIconActionGroup=_ae,J.QImageGallery=n6,J.QInput=$ae,J.QList=rle,J.QMenu=m4,J.QModal=e6,J.QModalContent=lle,J.QPageHeading=fle,J.QPageNavigation=gle,J.QPdfViewer=sE,J.QPopover=cE,J.QSelect=e0e,J.QTable=A2e,J.QTag=I2e,J.QTextarea=L2e,J.QToast=j2e,J.QTooltip=t6,J.QTour=dfe,J.QWarningModal=lE,J.QWysiwyg=gw,J.filterData=Lw,J.mq=_n,J.useDeviceType=aE,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});