@formbird/angular-elements 7.5.8 → 7.5.9

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,2 +1,2 @@
1
- var Aj=Object.defineProperty,Sj=Object.defineProperties,Tj=Object.getOwnPropertyDescriptors,bD=Object.getOwnPropertySymbols,wj=Object.prototype.hasOwnProperty,Mj=Object.prototype.propertyIsEnumerable,ls=Math.pow,Lp=(Re,I,_e)=>I in Re?Aj(Re,I,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Re[I]=_e,Vp=(Re,I)=>{for(var _e in I||(I={}))wj.call(I,_e)&&Lp(Re,_e,I[_e]);if(bD)for(var _e of bD(I))Mj.call(I,_e)&&Lp(Re,_e,I[_e]);return Re},jp=(Re,I)=>Sj(Re,Tj(I)),cn=(Re,I,_e)=>(Lp(Re,"symbol"!=typeof I?I+"":I,_e),_e),Bp=(Re,I,_e)=>{if(!I.has(Re))throw TypeError("Cannot "+_e)},q=(Re,I,_e)=>(Bp(Re,I,"read from private field"),_e?_e.call(Re):I.get(Re)),Pe=(Re,I,_e)=>{if(I.has(Re))throw TypeError("Cannot add the same private member more than once");I instanceof WeakSet?I.add(Re):I.set(Re,_e)},$e=(Re,I,_e,k)=>(Bp(Re,I,"write to private field"),k?k.call(Re,_e):I.set(Re,_e),_e),Up=(Re,I,_e,k)=>({set _(j){$e(Re,I,j,_e)},get _(){return q(Re,I,k)}}),Le=(Re,I,_e)=>(Bp(Re,I,"access private method"),_e);(self.webpackChunkwpScThumbnailJsonp=self.webpackChunkwpScThumbnailJsonp||[]).push([[179],{850:(Re,I,_e)=>{"use strict";const k=rxjs,j=rxjs.operators;function fe(n){for(let e in n)if(n[e]===fe)return e;throw Error("Could not find renamed property on target object.")}function ce(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function pe(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(pe).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function ne(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const P=fe({__forward_ref__:fe});function V(n){return n.__forward_ref__=V,n.toString=function(){return pe(this())},n}function O(n){return function G(n){return"function"==typeof n&&n.hasOwnProperty(P)&&n.__forward_ref__===V}(n)?n():n}class E extends Error{constructor(e,t){super(function h(n,e){return`${n?`NG0${n}: `:""}${e}`}(e,t)),this.code=e}}function y(n){return"string"==typeof n?n:null==n?"":String(n)}function w(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():y(n)}function g(n,e){const t=e?` in ${e}`:"";throw new E("201",`No provider for ${w(n)} found${t}`)}function Ae(n,e){null==n&&function xe(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function R(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Y(n){return{providers:n.providers||[],imports:n.imports||[]}}function J(n){return de(n,F)||de(n,K)}function de(n,e){return n.hasOwnProperty(e)?n[e]:null}function S(n){return n&&(n.hasOwnProperty(L)||n.hasOwnProperty(ie))?n[L]:null}const F=fe({\u0275prov:fe}),L=fe({\u0275inj:fe}),K=fe({ngInjectableDef:fe}),ie=fe({ngInjectorDef:fe});var he=(()=>((he=he||{})[he.Default=0]="Default",he[he.Host=1]="Host",he[he.Self=2]="Self",he[he.SkipSelf=4]="SkipSelf",he[he.Optional=8]="Optional",he))();let ke;function we(n){const e=ke;return ke=n,e}function Ee(n,e,t){const i=J(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&he.Optional?null:void 0!==e?e:void g(pe(n),"Injector")}function Ve(n){return{toString:n}.toString()}var X=(()=>((X=X||{})[X.OnPush=0]="OnPush",X[X.Default=1]="Default",X))(),Ke=(()=>{return(n=Ke||(Ke={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Ke;var n})();const lt="undefined"!=typeof globalThis&&globalThis,yt="undefined"!=typeof window&&window,$t="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,vt=lt||"undefined"!=typeof global&&global||yt||$t,Te={},Fe=[],Je=fe({\u0275cmp:fe}),be=fe({\u0275dir:fe}),oe=fe({\u0275pipe:fe}),le=fe({\u0275mod:fe}),Oe=fe({\u0275fac:fe}),Ge=fe({__NG_ELEMENT_ID__:fe});let it=0;function tt(n){return Ve(()=>{const t={},i={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===X.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||Fe,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ke.Emulated,id:"c",styles:n.styles||Fe,_:null,setInput:null,schemas:n.schemas||null,tView:null},r=n.directives,s=n.features,o=n.pipes;return i.id+=it++,i.inputs=vn(n.inputs,t),i.outputs=vn(n.outputs),s&&s.forEach(a=>a(i)),i.directiveDefs=r?()=>("function"==typeof r?r():r).map(Rt):null,i.pipeDefs=o?()=>("function"==typeof o?o():o).map(Et):null,i})}function Rt(n){return Bt(n)||function Tn(n){return n[be]||null}(n)}function Et(n){return function wn(n){return n[oe]||null}(n)}const Ft={};function At(n){return Ve(()=>{const e={type:n.type,bootstrap:n.bootstrap||Fe,declarations:n.declarations||Fe,imports:n.imports||Fe,exports:n.exports||Fe,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Ft[n.id]=n.type),e})}function vn(n,e){if(null==n)return Te;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),t[r]=i,e&&(e[r]=s)}return t}const We=tt;function Bt(n){return n[Je]||null}function Kt(n,e){const t=n[le]||null;if(!t&&!0===e)throw new Error(`Type ${pe(n)} does not have '\u0275mod' property.`);return t}function ki(n){return Array.isArray(n)&&"object"==typeof n[1]}function vi(n){return Array.isArray(n)&&!0===n[1]}function lu(n){return 0!=(8&n.flags)}function Wa(n){return 2==(2&n.flags)}function qa(n){return 1==(1&n.flags)}function Ei(n){return null!==n.template}function HD(n){return 0!=(512&n[2])}function kr(n,e){return n.hasOwnProperty(Oe)?n[Oe]:null}class uu{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function Kp(n){return n.type.prototype.ngOnChanges&&(n.setInput=qD),WD}function WD(){const n=Xp(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===Te)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function qD(n,e,t,i){const r=Xp(n)||function zD(n,e){return n[Yp]=e}(n,{previous:Te,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[t],l=o[a];s[a]=new uu(l&&l.currentValue,e,o===Te),n[i]=e}const Yp="__ngSimpleChanges__";function Xp(n){return n[Yp]||null}let hu;function fu(){return void 0!==hu?hu:"undefined"!=typeof document?document:void 0}function Jt(n){return!!n.listen}const Jp={createRenderer:(n,e)=>fu()};function un(n){for(;Array.isArray(n);)n=n[0];return n}function za(n,e){return un(e[n])}function ai(n,e){return un(e[n.index])}function pu(n,e){return n.data[e]}function Yn(n,e){const t=e[n];return ki(t)?t:t[0]}function eg(n){return 4==(4&n[2])}function gu(n){return 128==(128&n[2])}function gr(n,e){return null==e?null:n[e]}function tg(n){n[18]=0}function mu(n,e){n[5]+=e;let t=n,i=n[3];for(;null!==i&&(1===e&&1===t[5]||-1===e&&0===t[5]);)i[5]+=e,t=i,i=i[3]}const dt={lFrame:cg(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function ng(){return dt.bindingsEnabled}function Be(){return dt.lFrame.lView}function wt(){return dt.lFrame.tView}function bo(n){return dt.lFrame.contextLView=n,n[8]}function pn(){let n=ig();for(;null!==n&&64===n.type;)n=n.parent;return n}function ig(){return dt.lFrame.currentTNode}function Li(n,e){const t=dt.lFrame;t.currentTNode=n,t.isParent=e}function _u(){return dt.lFrame.isParent}function Ka(){return dt.isInCheckNoChangesMode}function Ya(n){dt.isInCheckNoChangesMode=n}function ps(){return dt.lFrame.bindingIndex++}function nr(n){const e=dt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function aA(n,e){const t=dt.lFrame;t.bindingIndex=t.bindingRootIndex=n,vu(e)}function vu(n){dt.lFrame.currentDirectiveIndex=n}function og(){return dt.lFrame.currentQueryIndex}function bu(n){dt.lFrame.currentQueryIndex=n}function cA(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function ag(n,e,t){if(t&he.SkipSelf){let r=e,s=n;for(;!(r=r.parent,null!==r||t&he.Host||(r=cA(s),null===r||(s=s[15],10&r.type))););if(null===r)return!1;e=r,n=s}const i=dt.lFrame=lg();return i.currentTNode=e,i.lView=n,!0}function Xa(n){const e=lg(),t=n[1];dt.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function lg(){const n=dt.lFrame,e=null===n?null:n.child;return null===e?cg(n):e}function cg(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function ug(){const n=dt.lFrame;return dt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const dg=ug;function Qa(){const n=ug();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Vn(){return dt.lFrame.selectedIndex}function mr(n){dt.lFrame.selectedIndex=n}function en(){const n=dt.lFrame;return pu(n.tView,n.selectedIndex)}function Za(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){const s=n.data[t].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=s;o&&(n.contentHooks||(n.contentHooks=[])).push(-t,o),a&&((n.contentHooks||(n.contentHooks=[])).push(t,a),(n.contentCheckHooks||(n.contentCheckHooks=[])).push(t,a)),l&&(n.viewHooks||(n.viewHooks=[])).push(-t,l),c&&((n.viewHooks||(n.viewHooks=[])).push(t,c),(n.viewCheckHooks||(n.viewCheckHooks=[])).push(t,c)),null!=u&&(n.destroyHooks||(n.destroyHooks=[])).push(t,u)}}function Ja(n,e,t){hg(n,e,3,t)}function el(n,e,t,i){(3&n[2])===t&&hg(n,e,t,i)}function Cu(n,e){let t=n[2];(3&t)===e&&(t&=2047,t+=1,n[2]=t)}function hg(n,e,t,i){const s=null!=i?i:-1,o=e.length-1;let a=0;for(let l=void 0!==i?65535&n[18]:0;l<o;l++)if("number"==typeof e[l+1]){if(a=e[l],null!=i&&a>=i)break}else e[l]<0&&(n[18]+=65536),(a<s||-1==s)&&(yA(n,t,e,l),n[18]=(4294901760&n[18])+l+2),l++}function yA(n,e,t,i){const r=t[i]<0,s=t[i+1],a=n[r?-t[i]:t[i]];if(r){if(n[2]>>11<n[18]>>16&&(3&n[2])===e){n[2]+=2048;try{s.call(a)}finally{}}}else try{s.call(a)}finally{}}class Do{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function tl(n,e,t){const i=Jt(n);let r=0;for(;r<t.length;){const s=t[r];if("number"==typeof s){if(0!==s)break;r++;const o=t[r++],a=t[r++],l=t[r++];i?n.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=t[++r];Au(o)?i&&n.setProperty(e,o,a):i?n.setAttribute(e,o,a):e.setAttribute(o,a),r++}}return r}function fg(n){return 3===n||4===n||6===n}function Au(n){return 64===n.charCodeAt(0)}function nl(n,e){if(null!==e&&0!==e.length)if(null===n||0===n.length)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){const r=e[i];"number"==typeof r?t=r:0===t||pg(n,t,r,null,-1===t||2===t?e[++i]:null)}}return n}function pg(n,e,t,i,r){let s=0,o=n.length;if(-1===e)o=-1;else for(;s<n.length;){const a=n[s++];if("number"==typeof a){if(a===e){o=-1;break}if(a>e){o=s-1;break}}}for(;s<n.length;){const a=n[s];if("number"==typeof a)break;if(a===t){if(null===i)return void(null!==r&&(n[s+1]=r));if(i===n[s+1])return void(n[s+2]=r)}s++,null!==i&&s++,null!==r&&s++}-1!==o&&(n.splice(o,0,e),s=o+1),n.splice(s++,0,t),null!==i&&n.splice(s++,0,i),null!==r&&n.splice(s++,0,r)}function gg(n){return-1!==n}function gs(n){return 32767&n}function ms(n,e){let t=function DA(n){return n>>16}(n),i=e;for(;t>0;)i=i[15],t--;return i}let Su=!0;function il(n){const e=Su;return Su=n,e}let AA=0;function So(n,e){const t=wu(n,e);if(-1!==t)return t;const i=e[1];i.firstCreatePass&&(n.injectorIndex=e.length,Tu(i.data,n),Tu(e,null),Tu(i.blueprint,null));const r=rl(n,e),s=n.injectorIndex;if(gg(r)){const o=gs(r),a=ms(r,e),l=a[1].data;for(let c=0;c<8;c++)e[s+c]=a[o+c]|l[o+c]}return e[s+8]=r,s}function Tu(n,e){n.push(0,0,0,0,0,0,0,0,e)}function wu(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function rl(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){const s=r[1],o=s.type;if(i=2===o?s.declTNode:1===o?r[6]:null,null===i)return-1;if(t++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return-1}function sl(n,e,t){!function SA(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(Ge)&&(i=t[Ge]),null==i&&(i=t[Ge]=AA++);const r=255&i;e.data[n+(r>>5)]|=1<<r}(n,e,t)}function yg(n,e,t){if(t&he.Optional)return n;g(e,"NodeInjector")}function vg(n,e,t,i){if(t&he.Optional&&void 0===i&&(i=null),0==(t&(he.Self|he.Host))){const r=n[9],s=we(void 0);try{return r?r.get(e,i,t&he.Optional):Ee(e,i,t&he.Optional)}finally{we(s)}}return yg(i,e,t)}function Eg(n,e,t,i=he.Default,r){if(null!==n){const s=function IA(n){if("string"==typeof n)return n.charCodeAt(0)||0;const e=n.hasOwnProperty(Ge)?n[Ge]:void 0;return"number"==typeof e?e>=0?255&e:wA:e}(t);if("function"==typeof s){if(!ag(e,n,i))return i&he.Host?yg(r,t,i):vg(e,t,i,r);try{const o=s(i);if(null!=o||i&he.Optional)return o;g(t)}finally{dg()}}else if("number"==typeof s){let o=null,a=wu(n,e),l=-1,c=i&he.Host?e[16][6]:null;for((-1===a||i&he.SkipSelf)&&(l=-1===a?rl(n,e):e[a+8],-1!==l&&Dg(i,!1)?(o=e[1],a=gs(l),e=ms(l,e)):a=-1);-1!==a;){const u=e[1];if(Cg(s,a,u.data)){const p=MA(a,e,t,o,i,c);if(p!==bg)return p}l=e[a+8],-1!==l&&Dg(i,e[1].data[a+8]===c)&&Cg(s,a,e)?(o=u,a=gs(l),e=ms(l,e)):a=-1}}}return vg(e,t,i,r)}const bg={};function wA(){return new _s(pn(),Be())}function MA(n,e,t,i,r,s){const o=e[1],a=o.data[n+8],u=ol(a,o,t,null==i?Wa(a)&&Su:i!=o&&0!=(3&a.type),r&he.Host&&s===a);return null!==u?To(e,o,u,a):bg}function ol(n,e,t,i,r){const s=n.providerIndexes,o=e.data,a=1048575&s,l=n.directiveStart,u=s>>20,b=r?a+u:n.directiveEnd;for(let U=i?a:a+u;U<b;U++){const z=o[U];if(U<l&&t===z||U>=l&&z.type===t)return U}if(r){const U=o[l];if(U&&Ei(U)&&U.type===t)return l}return null}function To(n,e,t,i){let r=n[t];const s=e.data;if(function vA(n){return n instanceof Do}(r)){const o=r;o.resolving&&function x(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new E("200",`Circular dependency in DI detected for ${n}${t}`)}(w(s[t]));const a=il(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?we(o.injectImpl):null;ag(n,i,he.Default);try{r=n[t]=o.factory(void 0,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&function _A(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const o=Kp(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o)}r&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,r),s&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s))}(t,s[t],e)}finally{null!==l&&we(l),il(a),o.resolving=!1,dg()}}return r}function Cg(n,e,t){return!!(t[e+(n>>5)]&1<<n)}function Dg(n,e){return!(n&he.Self||n&he.Host&&e)}class _s{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return Eg(this._tNode,this._lView,e,i,t)}}const vs="__parameters__";function Lr(n,e,t){return Ve(()=>{const i=function Iu(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,u){const p=l.hasOwnProperty(vs)?l[vs]:Object.defineProperty(l,vs,{value:[]})[vs];for(;p.length<=u;)p.push(null);return(p[u]=p[u]||[]).push(o),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class ct{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=R({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}function li(n,e){void 0===e&&(e=n);for(let t=0;t<n.length;t++){let i=n[t];Array.isArray(i)?(e===n&&(e=n.slice(0,t)),li(i,e)):e!==n&&e.push(i)}return e}function Vi(n,e){n.forEach(t=>Array.isArray(t)?Vi(t,e):e(t))}function ll(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Vr(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Qn(n,e,t){let i=bs(n,e);return i>=0?n[1|i]=t:(i=~i,function NA(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Fu(n,e){const t=bs(n,e);if(t>=0)return n[1|t]}function bs(n,e){return function wg(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const s=i+(r-i>>1),o=n[s<<t];if(e===o)return s<<t;o>e?r=s:i=s+1}return~(r<<t)}(n,e,1)}const Ro={},xu="__NG_DI_FLAG__",Cs="ngTempTokenPath",UA=/\n/gm,Nu="__source",Ou=fe({provide:String,useValue:fe});let Fo;function Ds(n){const e=Fo;return Fo=n,e}function $A(n,e=he.Default){if(void 0===Fo)throw new Error("inject() must be called from an injection context");return null===Fo?Ee(n,void 0,e):Fo.get(n,e&he.Optional?null:void 0,e)}function ze(n,e=he.Default){return(function me(){return ke}()||$A)(O(n),e)}const Ig=ze;function jr(n){const e=[];for(let t=0;t<n.length;t++){const i=O(n[t]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let r,s=he.Default;for(let o=0;o<i.length;o++){const a=i[o],l=GA(a);"number"==typeof l?-1===l?r=a.token:s|=l:r=a}e.push(ze(r,s))}else e.push(ze(i))}return e}function Po(n,e){return n[xu]=e,n.prototype[xu]=e,n}function GA(n){return n[xu]}function Rg(n,e,t,i){const r=n[Cs];throw e[Nu]&&r.unshift(e[Nu]),n.message=function Fg(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let r=pe(e);if(Array.isArray(e))r=e.map(pe).join(" -> ");else if("object"==typeof e){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):pe(a)))}r=`{${s.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(UA,"\n ")}`}("\n"+n.message,r,t,i),n.ngTokenPath=r,n[Cs]=null,n}const xo=Po(Lr("Inject",n=>({token:n})),-1),ji=Po(Lr("Optional"),8),Br=Po(Lr("SkipSelf"),4);let hl,fl;function Ss(n){var e;return(null===(e=function Lu(){if(void 0===hl&&(hl=null,vt.trustedTypes))try{hl=vt.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return hl}())||void 0===e?void 0:e.createHTML(n))||n}function Og(n){var e;return(null===(e=function Vu(){if(void 0===fl&&(fl=null,vt.trustedTypes))try{fl=vt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return fl}())||void 0===e?void 0:e.createHTML(n))||n}class Ur{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class tS extends Ur{getTypeName(){return"HTML"}}class nS extends Ur{getTypeName(){return"Style"}}class iS extends Ur{getTypeName(){return"Script"}}class rS extends Ur{getTypeName(){return"URL"}}class sS extends Ur{getTypeName(){return"ResourceURL"}}function Zn(n){return n instanceof Ur?n.changingThisBreaksApplicationSecurity:n}function Bi(n,e){const t=Vg(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function Vg(n){return n instanceof Ur&&n.getTypeName()||null}class dS{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{const t=(new window.DOMParser).parseFromString(Ss(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class hS{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const i=this.inertDocument.createElement("body");t.appendChild(i)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=Ss(e),t;const i=this.inertDocument.createElement("body");return i.innerHTML=Ss(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(e){const t=e.attributes;for(let r=t.length-1;0<r;r--){const o=t.item(r).name;("xmlns:ns1"===o||0===o.indexOf("ns1:"))&&e.removeAttribute(o)}let i=e.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const pS=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,gS=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Oo(n){return(n=String(n)).match(pS)||n.match(gS)?n:"unsafe:"+n}function Ui(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function ko(...n){const e={};for(const t of n)for(const i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}const Ug=Ui("area,br,col,hr,img,wbr"),Hg=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$g=Ui("rp,rt"),ju=ko(Ug,ko(Hg,Ui("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),ko($g,Ui("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ko($g,Hg)),Bu=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Uu=Ui("srcset"),Gg=ko(Bu,Uu,Ui("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ui("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),mS=Ui("script,style,template");class _S{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let r=this.checkClobberedElement(t,t.nextSibling);if(r){t=r;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!ju.hasOwnProperty(t))return this.sanitizedSomething=!0,!mS.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const i=e.attributes;for(let r=0;r<i.length;r++){const s=i.item(r),o=s.name,a=o.toLowerCase();if(!Gg.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=s.value;Bu[a]&&(l=Oo(l)),Uu[a]&&(n=l,l=(n=String(n)).split(",").map(e=>Oo(e.trim())).join(", ")),this.buf.push(" ",o,'="',Wg(l),'"')}var n;return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();ju.hasOwnProperty(t)&&!Ug.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Wg(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const yS=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vS=/([^\#-~ |!])/g;function Wg(n){return n.replace(/&/g,"&amp;").replace(yS,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vS,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let pl;function qg(n,e){let t=null;try{pl=pl||function jg(n){const e=new hS(n);return function fS(){try{return!!(new window.DOMParser).parseFromString(Ss(""),"text/html")}catch(n){return!1}}()?new dS(e):e}(n);let i=e?String(e):"";t=pl.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=t.innerHTML,t=pl.getInertBodyElement(i)}while(i!==s);return Ss((new _S).sanitizeChildren(Hu(t)||t))}finally{if(t){const i=Hu(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Hu(n){return"content"in n&&function ES(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Vt=(()=>((Vt=Vt||{})[Vt.NONE=0]="NONE",Vt[Vt.HTML=1]="HTML",Vt[Vt.STYLE=2]="STYLE",Vt[Vt.SCRIPT=3]="SCRIPT",Vt[Vt.URL=4]="URL",Vt[Vt.RESOURCE_URL=5]="RESOURCE_URL",Vt))();function zg(n){const e=Lo();return e?Og(e.sanitize(Vt.HTML,n)||""):Bi(n,"HTML")?Og(Zn(n)):qg(fu(),y(n))}function $u(n){const e=Lo();return e?e.sanitize(Vt.URL,n)||"":Bi(n,"URL")?Zn(n):Oo(y(n))}function Lo(){const n=Be();return n&&n[12]}const Xg="__ngContext__";function In(n,e){n[Xg]=e}function Wu(n){const e=function Vo(n){return n[Xg]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function gl(n){return n.ngOriginalError}function kS(n,...e){n.error(...e)}class Hr{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),i=this._findContext(e),r=function OS(n){return n&&n.ngErrorLogger||kS}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),i&&r(this._console,"ERROR CONTEXT",i)}_findContext(e){return e?function nm(n){return n.ngDebugContext}(e)||this._findContext(gl(e)):null}_findOriginalError(e){let t=e&&gl(e);for(;t&&gl(t);)t=gl(t);return t||null}}const sm=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(vt))();function Hi(n){return n instanceof Function?n():n}var Jn=(()=>((Jn=Jn||{})[Jn.Important=1]="Important",Jn[Jn.DashCase=2]="DashCase",Jn))();function Ku(n,e){return undefined(n,e)}function jo(n){const e=n[3];return vi(e)?e[3]:e}function Yu(n){return um(n[13])}function Xu(n){return um(n[4])}function um(n){for(;null!==n&&!vi(n);)n=n[4];return n}function ws(n,e,t,i,r){if(null!=i){let s,o=!1;vi(i)?s=i:ki(i)&&(o=!0,i=i[0]);const a=un(i);0===n&&null!==t?null==r?mm(e,t,a):$r(e,t,a,r||null,!0):1===n&&null!==t?$r(e,t,a,r||null,!0):2===n?function Dm(n,e,t){const i=_l(n,e);i&&function iT(n,e,t,i){Jt(n)?n.removeChild(e,t,i):e.removeChild(t)}(n,i,e,t)}(e,a,o):3===n&&e.destroyNode(a),null!=s&&function oT(n,e,t,i,r){const s=t[7];s!==un(t)&&ws(e,n,i,s,r);for(let a=10;a<t.length;a++){const l=t[a];Bo(l[1],l,n,e,i,s)}}(e,n,s,t,r)}}function Zu(n,e,t){return Jt(n)?n.createElement(e,t):null===t?n.createElement(e):n.createElementNS(t,e)}function hm(n,e){const t=n[9],i=t.indexOf(e),r=e[3];1024&e[2]&&(e[2]&=-1025,mu(r,-1)),t.splice(i,1)}function Ju(n,e){if(n.length<=10)return;const t=10+e,i=n[t];if(i){const r=i[17];null!==r&&r!==n&&hm(r,i),e>0&&(n[t-1][4]=i[4]);const s=Vr(n,10+e);!function YS(n,e){Bo(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(i[1],i);const o=s[19];null!==o&&o.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function fm(n,e){if(!(256&e[2])){const t=e[11];Jt(t)&&t.destroyNode&&Bo(n,e,t,3,null,null),function ZS(n){let e=n[13];if(!e)return ed(n[1],n);for(;e;){let t=null;if(ki(e))t=e[13];else{const i=e[10];i&&(t=i)}if(!t){for(;e&&!e[4]&&e!==n;)ki(e)&&ed(e[1],e),e=e[3];null===e&&(e=n),ki(e)&&ed(e[1],e),t=e&&e[4]}e=t}}(e)}}function ed(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function nT(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i<t.length;i+=2){const r=e[t[i]];if(!(r instanceof Do)){const s=t[i+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){const a=r[s[o]],l=s[o+1];try{l.call(a)}finally{}}else try{s.call(r)}finally{}}}}(n,e),function tT(n,e){const t=n.cleanup,i=e[7];let r=-1;if(null!==t)for(let s=0;s<t.length-1;s+=2)if("string"==typeof t[s]){const o=t[s+1],a="function"==typeof o?o(e):un(e[o]),l=i[r=t[s+2]],c=t[s+3];"boolean"==typeof c?a.removeEventListener(t[s],l,c):c>=0?i[r=c]():i[r=-c].unsubscribe(),s+=2}else{const o=i[r=t[s+1]];t[s].call(o)}if(null!==i){for(let s=r+1;s<i.length;s++)i[s]();e[7]=null}}(n,e),1===e[1].type&&Jt(e[11])&&e[11].destroy();const t=e[17];if(null!==t&&vi(e[3])){t!==e[3]&&hm(t,e);const i=e[19];null!==i&&i.detachView(n)}}}function pm(n,e,t){return function gm(n,e,t){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return t[0];if(2&i.flags){const r=n.data[i.directiveStart].encapsulation;if(r===Ke.None||r===Ke.Emulated)return null}return ai(i,t)}(n,e.parent,t)}function $r(n,e,t,i,r){Jt(n)?n.insertBefore(e,t,i,r):e.insertBefore(t,i,r)}function mm(n,e,t){Jt(n)?n.appendChild(e,t):e.appendChild(t)}function _m(n,e,t,i,r){null!==i?$r(n,e,t,i,r):mm(n,e,t)}function _l(n,e){return Jt(n)?n.parentNode(e):e.parentNode}let Em=function vm(n,e,t){return 40&n.type?ai(n,t):null};function yl(n,e,t,i){const r=pm(n,i,e),s=e[11],a=function ym(n,e,t){return Em(n,e,t)}(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;l<t.length;l++)_m(s,r,t[l],a,!1);else _m(s,r,t,a,!1)}function vl(n,e){if(null!==e){const t=e.type;if(3&t)return ai(e,n);if(4&t)return nd(-1,n[e.index]);if(8&t){const i=e.child;if(null!==i)return vl(n,i);{const r=n[e.index];return vi(r)?nd(-1,r):un(r)}}if(32&t)return Ku(e,n)()||un(n[e.index]);{const i=Cm(n,e);return null!==i?Array.isArray(i)?i[0]:vl(jo(n[16]),i):vl(n,e.next)}}return null}function Cm(n,e){return null!==e?n[16][6].projection[e.projection]:null}function nd(n,e){const t=10+n+1;if(t<e.length){const i=e[t],r=i[1].firstChild;if(null!==r)return vl(i,r)}return e[7]}function id(n,e,t,i,r,s,o){for(;null!=t;){const a=i[t.index],l=t.type;if(o&&0===e&&(a&&In(un(a),i),t.flags|=4),64!=(64&t.flags))if(8&l)id(n,e,t.child,i,r,s,!1),ws(e,n,r,a,s);else if(32&l){const c=Ku(t,i);let u;for(;u=c();)ws(e,n,r,u,s);ws(e,n,r,a,s)}else 16&l?Am(n,e,i,t,r,s):ws(e,n,r,a,s);t=o?t.projectionNext:t.next}}function Bo(n,e,t,i,r,s){id(t,i,n.firstChild,e,r,s,!1)}function Am(n,e,t,i,r,s){const o=t[16],l=o[6].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)ws(e,n,r,l[c],s);else id(n,e,l,o[3],r,s,!0)}function Sm(n,e,t){Jt(n)?n.setAttribute(e,"style",t):e.style.cssText=t}function rd(n,e,t){Jt(n)?""===t?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t):e.className=t}function Tm(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const s=e.length;if(r+s===i||n.charCodeAt(r+s)<=32)return r}t=r+1}}const wm="ng-template";function lT(n,e,t){let i=0;for(;i<n.length;){let r=n[i++];if(t&&"class"===r){if(r=n[i],-1!==Tm(r.toLowerCase(),e,0))return!0}else if(1===r){for(;i<n.length&&"string"==typeof(r=n[i++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function Mm(n){return 4===n.type&&n.value!==wm}function cT(n,e,t){return e===(4!==n.type||t?n.value:wm)}function uT(n,e,t){let i=4;const r=n.attrs||[],s=function fT(n){for(let e=0;e<n.length;e++)if(fg(n[e]))return e;return n.length}(r);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!cT(n,l,t)||""===l&&1===e.length){if(bi(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==n.attrs){if(!lT(n.attrs,c,t)){if(bi(i))return!1;o=!0}continue}const p=dT(8&i?"class":l,r,Mm(n),t);if(-1===p){if(bi(i))return!1;o=!0;continue}if(""!==c){let b;b=p>s?"":r[p+1].toLowerCase();const U=8&i?b:null;if(U&&-1!==Tm(U,c,0)||2&i&&c!==b){if(bi(i))return!1;o=!0}}}}else{if(!o&&!bi(i)&&!bi(l))return!1;if(o&&bi(l))continue;o=!1,i=l|1&i}}return bi(i)||o}function bi(n){return 0==(1&n)}function dT(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let s=!1;for(;r<e.length;){const o=e[r];if(o===n)return r;if(3===o||6===o)s=!0;else{if(1===o||2===o){let a=e[++r];for(;"string"==typeof a;)a=e[++r];continue}if(4===o)break;if(0===o){r+=4;continue}}r+=s?1:2}return-1}return function pT(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){const i=n[t];if("number"==typeof i)return-1;if(i===e)return t;t++}return-1}(e,n)}function Im(n,e,t=!1){for(let i=0;i<e.length;i++)if(uT(n,e[i],t))return!0;return!1}function Rm(n,e){return n?":not("+e.trim()+")":e}function mT(n){let e=n[0],t=1,i=2,r="",s=!1;for(;t<n.length;){let o=n[t];if("string"==typeof o)if(2&i){const a=n[++t];r+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!bi(o)&&(e+=Rm(s,r),r=""),i=o,s=s||!bi(i);t++}return""!==r&&(e+=Rm(s,r)),e}const gt={};function an(n){Fm(wt(),Be(),Vn()+n,Ka())}function Fm(n,e,t,i){if(!i)if(3==(3&e[2])){const s=n.preOrderCheckHooks;null!==s&&Ja(e,s,t)}else{const s=n.preOrderHooks;null!==s&&el(e,s,0,t)}mr(t)}function El(n,e){return n<<17|e<<2}function Ci(n){return n>>17&32767}function sd(n){return 2|n}function ir(n){return(131068&n)>>2}function od(n,e){return-131069&n|e<<2}function ad(n){return 1|n}function Hm(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;i<t.length;i+=2){const r=t[i],s=t[i+1];if(-1!==s){const o=n.data[s];bu(r),o.contentQueries(2,e[s],s)}}}function Uo(n,e,t,i,r,s,o,a,l,c){const u=e.blueprint.slice();return u[0]=r,u[2]=140|i,tg(u),u[3]=u[15]=n,u[8]=t,u[10]=o||n&&n[10],u[11]=a||n&&n[11],u[12]=l||n&&n[12]||null,u[9]=c||n&&n[9]||null,u[6]=s,u[16]=2==e.type?n[16]:u,u}function Ms(n,e,t,i,r){let s=n.data[e];if(null===s)s=function md(n,e,t,i,r){const s=ig(),o=_u(),l=n.data[e]=function NT(n,e,t,i,r,s){return{type:t,index:i,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,t,e,i,r);return null===n.firstChild&&(n.firstChild=l),null!==s&&(o?null==s.child&&null!==l.parent&&(s.child=l):null===s.next&&(s.next=l)),l}(n,e,t,i,r),function oA(){return dt.lFrame.inI18n}()&&(s.flags|=64);else if(64&s.type){s.type=t,s.value=i,s.attrs=r;const o=function Co(){const n=dt.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}();s.injectorIndex=null===o?-1:o.injectorIndex}return Li(s,!0),s}function Is(n,e,t,i){if(0===t)return-1;const r=e.length;for(let s=0;s<t;s++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function Ho(n,e,t){Xa(e);try{const i=n.viewQuery;null!==i&&Sd(1,i,t);const r=n.template;null!==r&&$m(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&Hm(n,e),n.staticViewQueries&&Sd(2,n.viewQuery,t);const s=n.components;null!==s&&function FT(n,e){for(let t=0;t<e.length;t++)ZT(n,e[t])}(e,s)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[2]&=-5,Qa()}}function Rs(n,e,t,i){const r=e[2];if(256==(256&r))return;Xa(e);const s=Ka();try{tg(e),function rg(n){return dt.lFrame.bindingIndex=n}(n.bindingStartIndex),null!==t&&$m(n,e,t,2,i);const o=3==(3&r);if(!s)if(o){const c=n.preOrderCheckHooks;null!==c&&Ja(e,c,null)}else{const c=n.preOrderHooks;null!==c&&el(e,c,0,null),Cu(e,0)}if(function XT(n){for(let e=Yu(n);null!==e;e=Xu(e)){if(!e[2])continue;const t=e[9];for(let i=0;i<t.length;i++){const r=t[i],s=r[3];0==(1024&r[2])&&mu(s,1),r[2]|=1024}}}(e),function YT(n){for(let e=Yu(n);null!==e;e=Xu(e))for(let t=10;t<e.length;t++){const i=e[t],r=i[1];gu(i)&&Rs(r,i,r.template,i[8])}}(e),null!==n.contentQueries&&Hm(n,e),!s)if(o){const c=n.contentCheckHooks;null!==c&&Ja(e,c)}else{const c=n.contentHooks;null!==c&&el(e,c,1),Cu(e,1)}!function IT(n,e){const t=n.hostBindingOpCodes;if(null!==t)try{for(let i=0;i<t.length;i++){const r=t[i];if(r<0)mr(~r);else{const s=r,o=t[++i],a=t[++i];aA(o,s),a(2,e[s])}}}finally{mr(-1)}}(n,e);const a=n.components;null!==a&&function RT(n,e){for(let t=0;t<e.length;t++)QT(n,e[t])}(e,a);const l=n.viewQuery;if(null!==l&&Sd(2,l,i),!s)if(o){const c=n.viewCheckHooks;null!==c&&Ja(e,c)}else{const c=n.viewHooks;null!==c&&el(e,c,2),Cu(e,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,mu(e[3],-1))}finally{Qa()}}function PT(n,e,t,i){const r=e[10],s=!Ka(),o=eg(e);try{s&&!o&&r.begin&&r.begin(),o&&Ho(n,e,i),Rs(n,e,t,i)}finally{s&&!o&&r.end&&r.end()}}function $m(n,e,t,i,r){const s=Vn(),o=2&i;try{mr(-1),o&&e.length>20&&Fm(n,e,20,Ka()),t(i,r)}finally{mr(s)}}function _d(n,e,t){!ng()||(function UT(n,e,t,i){const r=t.directiveStart,s=t.directiveEnd;n.firstCreatePass||So(t,e),In(i,e);const o=t.initialInputs;for(let a=r;a<s;a++){const l=n.data[a],c=Ei(l);c&&qT(e,t,l);const u=To(e,n,a,t);In(u,e),null!==o&&zT(0,a-r,u,l,0,o),c&&(Yn(t.index,e)[8]=u)}}(n,e,t,ai(t,e)),128==(128&t.flags)&&function HT(n,e,t){const i=t.directiveStart,r=t.directiveEnd,o=t.index,a=function lA(){return dt.lFrame.currentDirectiveIndex}();try{mr(o);for(let l=i;l<r;l++){const c=n.data[l],u=e[l];vu(l),(null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs)&&Zm(c,u)}}finally{mr(-1),vu(a)}}(n,e,t))}function yd(n,e,t=ai){const i=e.localNames;if(null!==i){let r=e.index+1;for(let s=0;s<i.length;s+=2){const o=i[s+1],a=-1===o?t(e,n):n[o];n[r++]=a}}}function Wm(n){const e=n.tView;return null===e||e.incompleteFirstPass?n.tView=Dl(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):e}function Dl(n,e,t,i,r,s,o,a,l,c){const u=20+i,p=u+r,b=function xT(n,e){const t=[];for(let i=0;i<e;i++)t.push(i<n?null:gt);return t}(u,p),U="function"==typeof c?c():c;return b[1]={type:n,blueprint:b,template:t,queries:null,viewQuery:a,declTNode:e,data:b.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:p,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:U,incompleteFirstPass:!1}}function Km(n,e,t,i){const r=r_(e);null===t?r.push(i):(r.push(t),n.firstCreatePass&&s_(n).push(i,r.length-1))}function Ym(n,e,t){for(let i in n)if(n.hasOwnProperty(i)){const r=n[i];(t=null===t?{}:t).hasOwnProperty(i)?t[i].push(e,r):t[i]=[e,r]}return t}function ei(n,e,t,i,r,s,o,a){const l=ai(e,t);let u,c=e.inputs;!a&&null!=c&&(u=c[i])?(l_(n,t,u,i,r),Wa(e)&&function LT(n,e){const t=Yn(e,n);16&t[2]||(t[2]|=64)}(t,e.index)):3&e.type&&(i=function kT(n){return"class"===n?"className":"for"===n?"htmlFor":"formaction"===n?"formAction":"innerHtml"===n?"innerHTML":"readonly"===n?"readOnly":"tabindex"===n?"tabIndex":n}(i),r=null!=o?o(r,e.value||"",i):r,Jt(s)?s.setProperty(l,i,r):Au(i)||(l.setProperty?l.setProperty(i,r):l[i]=r))}function vd(n,e,t,i){let r=!1;if(ng()){const s=function $T(n,e,t){const i=n.directiveRegistry;let r=null;if(i)for(let s=0;s<i.length;s++){const o=i[s];Im(t,o.selectors,!1)&&(r||(r=[]),sl(So(t,e),n,o.type),Ei(o)?(Jm(n,t),r.unshift(o)):r.push(o))}return r}(n,e,t),o=null===i?null:{"":-1};if(null!==s){r=!0,e_(t,n.data.length,s.length);for(let u=0;u<s.length;u++){const p=s[u];p.providersResolver&&p.providersResolver(p)}let a=!1,l=!1,c=Is(n,e,s.length,null);for(let u=0;u<s.length;u++){const p=s[u];t.mergedAttrs=nl(t.mergedAttrs,p.hostAttrs),t_(n,t,e,c,p),WT(c,p,o),null!==p.contentQueries&&(t.flags|=8),(null!==p.hostBindings||null!==p.hostAttrs||0!==p.hostVars)&&(t.flags|=128);const b=p.type.prototype;!a&&(b.ngOnChanges||b.ngOnInit||b.ngDoCheck)&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t.index),a=!0),!l&&(b.ngOnChanges||b.ngDoCheck)&&((n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t.index),l=!0),c++}!function OT(n,e){const i=e.directiveEnd,r=n.data,s=e.attrs,o=[];let a=null,l=null;for(let c=e.directiveStart;c<i;c++){const u=r[c],p=u.inputs,b=null===s||Mm(e)?null:KT(p,s);o.push(b),a=Ym(p,c,a),l=Ym(u.outputs,c,l)}null!==a&&(a.hasOwnProperty("class")&&(e.flags|=16),a.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=o,e.inputs=a,e.outputs=l}(n,t)}o&&function GT(n,e,t){if(e){const i=n.localNames=[];for(let r=0;r<e.length;r+=2){const s=t[e[r+1]];if(null==s)throw new E("301",`Export of name '${e[r+1]}' not found!`);i.push(e[r],s)}}}(t,i,o)}return t.mergedAttrs=nl(t.mergedAttrs,t.attrs),r}function Qm(n,e,t,i,r,s){const o=s.hostBindings;if(o){let a=n.hostBindingOpCodes;null===a&&(a=n.hostBindingOpCodes=[]);const l=~e.index;(function BT(n){let e=n.length;for(;e>0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(i,r,o)}}function Zm(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function Jm(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function WT(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;Ei(e)&&(t[""]=n)}}function e_(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function t_(n,e,t,i,r){n.data[i]=r;const s=r.factory||(r.factory=kr(r.type)),o=new Do(s,Ei(r),null);n.blueprint[i]=o,t[i]=o,Qm(n,e,0,i,Is(n,t,r.hostVars,gt),r)}function qT(n,e,t){const i=ai(e,n),r=Wm(t),s=n[10],o=Al(n,Uo(n,r,null,t.onPush?64:16,i,e,s,s.createRenderer(i,t),null,null));n[e.index]=o}function $i(n,e,t,i,r,s){const o=ai(n,e);!function Ed(n,e,t,i,r,s,o){if(null==s)Jt(n)?n.removeAttribute(e,r,t):e.removeAttribute(r);else{const a=null==o?y(s):o(s,i||"",r);Jt(n)?n.setAttribute(e,r,a,t):t?e.setAttributeNS(t,r,a):e.setAttribute(r,a)}}(e[11],o,s,n.value,t,i,r)}function zT(n,e,t,i,r,s){const o=s[e];if(null!==o){const a=i.setInput;for(let l=0;l<o.length;){const c=o[l++],u=o[l++],p=o[l++];null!==a?i.setInput(t,p,c,u):t[u]=p}}}function KT(n,e){let t=null,i=0;for(;i<e.length;){const r=e[i];if(0!==r)if(5!==r){if("number"==typeof r)break;n.hasOwnProperty(r)&&(null===t&&(t=[]),t.push(r,n[r],e[i+1])),i+=2}else i+=2;else i+=4}return t}function n_(n,e,t,i){return new Array(n,!0,!1,e,null,0,i,t,null,null)}function QT(n,e){const t=Yn(e,n);if(gu(t)){const i=t[1];80&t[2]?Rs(i,t,i.template,t[8]):t[5]>0&&bd(t)}}function bd(n){for(let i=Yu(n);null!==i;i=Xu(i))for(let r=10;r<i.length;r++){const s=i[r];if(1024&s[2]){const o=s[1];Rs(o,s,o.template,s[8])}else s[5]>0&&bd(s)}const t=n[1].components;if(null!==t)for(let i=0;i<t.length;i++){const r=Yn(t[i],n);gu(r)&&r[5]>0&&bd(r)}}function ZT(n,e){const t=Yn(e,n),i=t[1];(function JT(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])})(i,t),Ho(i,t,t[8])}function Al(n,e){return n[13]?n[14][4]=e:n[13]=e,n[14]=e,e}function Cd(n){for(;n;){n[2]|=64;const e=jo(n);if(HD(n)&&!e)return n;n=e}return null}function Ad(n,e,t){const i=e[10];i.begin&&i.begin();try{Rs(n,e,n.template,t)}catch(r){throw a_(e,r),r}finally{i.end&&i.end()}}function i_(n){!function Dd(n){for(let e=0;e<n.components.length;e++){const t=n.components[e],i=Wu(t),r=i[1];PT(r,i,r.template,t)}}(n[8])}function Sd(n,e,t){bu(0),e(n,t)}const iw=(()=>Promise.resolve(null))();function r_(n){return n[7]||(n[7]=[])}function s_(n){return n.cleanup||(n.cleanup=[])}function a_(n,e){const t=n[9],i=t?t.get(Hr,null):null;i&&i.handleError(e)}function l_(n,e,t,i,r){for(let s=0;s<t.length;){const o=t[s++],a=t[s++],l=e[o],c=n.data[o];null!==c.setInput?c.setInput(l,r,i,a):l[a]=r}}function rr(n,e,t){const i=za(e,n);!function dm(n,e,t){Jt(n)?n.setValue(e,t):e.textContent=t}(n[11],i,t)}function Sl(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const a=e[o];"number"==typeof a?s=a:1==s?r=ne(r,a):2==s&&(i=ne(i,a+": "+e[++o]+";"))}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}const $o=new ct("INJECTOR",-1);class c_{get(e,t=Ro){if(t===Ro){const i=new Error(`NullInjectorError: No provider for ${pe(e)}!`);throw i.name="NullInjectorError",i}return t}}const Go=new ct("Set Injector scope."),Wo={},ow={};let Td;function u_(){return void 0===Td&&(Td=new c_),Td}function d_(n,e=null,t=null,i){return new lw(n,t,e||u_(),i)}class lw{constructor(e,t,i,r=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const s=[];t&&Vi(t,a=>this.processProvider(a,e,t)),Vi([e],a=>this.processInjectorType(a,[],s)),this.records.set($o,Fs(void 0,this));const o=this.records.get(Go);this.scope=null!=o?o.value:null,this.source=r||("object"==typeof e?null:pe(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=Ro,i=he.Default){this.assertNotDestroyed();const r=Ds(this),s=we(void 0);try{if(!(i&he.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function mw(n){return"function"==typeof n||"object"==typeof n&&n instanceof ct}(e)&&J(e);a=l&&this.injectableDefInScope(l)?Fs(wd(e),Wo):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&he.Self?u_():this.parent).get(e,t=i&he.Optional&&t===Ro?null:t)}catch(o){if("NullInjectorError"===o.name){if((o[Cs]=o[Cs]||[]).unshift(pe(e)),r)throw o;return Rg(o,e,"R3InjectorError",this.source)}throw o}finally{we(s),Ds(r)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((i,r)=>e.push(pe(r))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(e,t,i){if(!(e=O(e)))return!1;let r=S(e);const s=null==r&&e.ngModule||void 0,o=void 0===s?e:s,a=-1!==i.indexOf(o);if(void 0!==s&&(r=S(s)),null==r)return!1;if(null!=r.imports&&!a){let u;i.push(o);try{Vi(r.imports,p=>{this.processInjectorType(p,t,i)&&(void 0===u&&(u=[]),u.push(p))})}finally{}if(void 0!==u)for(let p=0;p<u.length;p++){const{ngModule:b,providers:U}=u[p];Vi(U,z=>this.processProvider(z,b,U||Fe))}}this.injectorDefTypes.add(o);const l=kr(o)||(()=>new o);this.records.set(o,Fs(l,Wo));const c=r.providers;if(null!=c&&!a){const u=e;Vi(c,p=>this.processProvider(p,u,c))}return void 0!==s&&void 0!==e.providers}processProvider(e,t,i){let r=Ps(e=O(e))?e:O(e&&e.provide);const s=function uw(n,e,t){return f_(n)?Fs(void 0,n.useValue):Fs(h_(n),Wo)}(e);if(Ps(e)||!0!==e.multi)this.records.get(r);else{let o=this.records.get(r);o||(o=Fs(void 0,Wo,!0),o.factory=()=>jr(o.multi),this.records.set(r,o)),r=e,o.multi.push(e)}this.records.set(r,s)}hydrate(e,t){return t.value===Wo&&(t.value=ow,t.value=t.factory()),"object"==typeof t.value&&t.value&&function gw(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=O(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function wd(n){const e=J(n),t=null!==e?e.factory:kr(n);if(null!==t)return t;if(n instanceof ct)throw new Error(`Token ${pe(n)} is missing a \u0275prov definition.`);if(n instanceof Function)return function cw(n){const e=n.length;if(e>0){const i=function yr(n,e){const t=[];for(let i=0;i<n;i++)t.push(e);return t}(e,"?");throw new Error(`Can't resolve all parameters for ${pe(n)}: (${i.join(", ")}).`)}const t=function ue(n){const e=n&&(n[F]||n[K]);if(e){const t=function m(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new Error("unreachable")}function h_(n,e,t){let i;if(Ps(n)){const r=O(n);return kr(r)||wd(r)}if(f_(n))i=()=>O(n.useValue);else if(function hw(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...jr(n.deps||[]));else if(function dw(n){return!(!n||!n.useExisting)}(n))i=()=>ze(O(n.useExisting));else{const r=O(n&&(n.useClass||n.provide));if(!function pw(n){return!!n.deps}(n))return kr(r)||wd(r);i=()=>new r(...jr(n.deps))}return i}function Fs(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function f_(n){return null!==n&&"object"==typeof n&&Ou in n}function Ps(n){return"function"==typeof n}const p_=function _w(n,e,t){return function aw(n,e=null,t=null,i){const r=d_(n,e,t,i);return r._resolveInjectorDefTypes(),r}({name:t},e,n,t)};let Nt=(()=>{class n{static create(t,i){return Array.isArray(t)?p_(t,i,""):p_(t.providers,t.parent,t.name||"")}}return n.THROW_IF_NOT_FOUND=Ro,n.NULL=new c_,n.\u0275prov=R({token:n,providedIn:"any",factory:()=>ze($o)}),n.__NG_ELEMENT_ID__=-1,n})();function Iw(n,e){Za(Wu(n)[1],pn())}function Ot(n){let e=function R_(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const i=[n];for(;e;){let r;if(Ei(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(t){i.push(r);const o=n;o.inputs=xd(n.inputs),o.declaredInputs=xd(n.declaredInputs),o.outputs=xd(n.outputs);const a=r.hostBindings;a&&xw(n,a);const l=r.viewQuery,c=r.contentQueries;if(l&&Fw(n,l),c&&Pw(n,c),ce(n.inputs,r.inputs),ce(n.declaredInputs,r.declaredInputs),ce(n.outputs,r.outputs),Ei(r)&&r.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const s=r.features;if(s)for(let o=0;o<s.length;o++){const a=s[o];a&&a.ngInherit&&a(n),a===Ot&&(t=!1)}}e=Object.getPrototypeOf(e)}!function Rw(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=nl(r.hostAttrs,t=nl(t,r.hostAttrs))}}(i)}function xd(n){return n===Te?{}:n===Fe?[]:n}function Fw(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function Pw(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,s)=>{e(i,r,s),t(i,r,s)}:e}function xw(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}let Tl=null;function xs(){if(!Tl){const n=vt.Symbol;if(n&&n.iterator)Tl=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t<e.length;++t){const i=e[t];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Tl=i)}}}return Tl}function zo(n){return!!Nd(n)&&(Array.isArray(n)||!(n instanceof Map)&&xs()in n)}function Nd(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Rn(n,e,t){return!Object.is(n[e],t)&&(n[e]=t,!0)}function Wi(n,e,t,i){const r=Be();return Rn(r,ps(),e)&&(wt(),$i(en(),r,n,e,t,i)),Wi}function Os(n,e,t,i){return Rn(n,ps(),t)?e+y(t)+i:gt}function ks(n,e,t,i,r,s){const a=function Gr(n,e,t,i){const r=Rn(n,e,t);return Rn(n,e+1,i)||r}(n,function tr(){return dt.lFrame.bindingIndex}(),t,r);return nr(2),a?e+y(t)+i+y(r)+s:gt}function $s(n,e,t,i,r,s,o,a){const l=Be(),c=wt(),u=n+20,p=c.firstCreatePass?function jw(n,e,t,i,r,s,o,a,l){const c=e.consts,u=Ms(e,n,4,o||null,gr(c,a));vd(e,t,u,gr(c,l)),Za(e,u);const p=u.tViews=Dl(2,u,i,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,u),p.queries=e.queries.embeddedTView(u)),u}(u,c,l,e,t,i,r,s,o):c.data[u];Li(p,!1);const b=l[11].createComment("");yl(c,l,b,p),In(b,l),Al(l,l[u]=n_(b,l,b,p)),qa(p)&&_d(c,l,p),null!=o&&yd(l,p,a)}function He(n,e=he.Default){const t=Be();return null===t?ze(n,e):Eg(pn(),t,O(n),e)}function bn(n,e,t){const i=Be();return Rn(i,ps(),e)&&ei(wt(),en(),i,n,e,i[11],t,!1),bn}function jd(n,e,t,i,r){const o=r?"class":"style";l_(n,t,e.inputs[o],o,i)}function St(n,e,t,i){const r=Be(),s=wt(),o=20+n,a=r[11],l=r[o]=Zu(a,e,function mA(){return dt.lFrame.currentNamespace}()),c=s.firstCreatePass?function dM(n,e,t,i,r,s,o){const a=e.consts,c=Ms(e,n,2,r,gr(a,s));return vd(e,t,c,gr(a,o)),null!==c.attrs&&Sl(c,c.attrs,!1),null!==c.mergedAttrs&&Sl(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(o,s,r,0,e,t,i):s.data[o];Li(c,!0);const u=c.mergedAttrs;null!==u&&tl(a,l,u);const p=c.classes;null!==p&&rd(a,l,p);const b=c.styles;null!==b&&Sm(a,l,b),64!=(64&c.flags)&&yl(s,r,l,c),0===function eA(){return dt.lFrame.elementDepthCount}()&&In(l,r),function tA(){dt.lFrame.elementDepthCount++}(),qa(c)&&(_d(s,r,c),function Gm(n,e,t){if(lu(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s<r;s++){const o=n.data[s];o.contentQueries&&o.contentQueries(1,t[s],s)}}}(s,c,r)),null!==i&&yd(r,c)}function Tt(){let n=pn();_u()?function yu(){dt.lFrame.isParent=!1}():(n=n.parent,Li(n,!1));const e=n;!function nA(){dt.lFrame.elementDepthCount--}();const t=wt();t.firstCreatePass&&(Za(t,n),lu(n)&&t.queries.elementEnd(n)),null!=e.classesWithoutHost&&function bA(n){return 0!=(16&n.flags)}(e)&&jd(t,e,Be(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function CA(n){return 0!=(32&n.flags)}(e)&&jd(t,e,Be(),e.stylesWithoutHost,!1)}function Ai(n,e,t,i){St(n,e,t,i),Tt()}function Il(){return Be()}function Rl(n){return!!n&&"function"==typeof n.then}const Bd=function ey(n){return!!n&&"function"==typeof n.subscribe};function mn(n,e,t,i){const r=Be(),s=wt(),o=pn();return function ny(n,e,t,i,r,s,o,a){const l=qa(i),u=n.firstCreatePass&&s_(n),p=e[8],b=r_(e);let U=!0;if(3&i.type||a){const re=ai(i,e),Me=a?a(re):re,Ce=b.length,qe=a?Qe=>a(un(Qe[i.index])):i.index;if(Jt(t)){let Qe=null;if(!a&&l&&(Qe=function pM(n,e,t,i){const r=n.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const o=r[s];if(o===t&&r[s+1]===i){const a=e[7],l=r[s+2];return a.length>l?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,e,r,i.index)),null!==Qe)(Qe.__ngLastListenerFn__||Qe).__ngNextListenerFn__=s,Qe.__ngLastListenerFn__=s,U=!1;else{s=Ud(i,e,p,s,!1);const ut=t.listen(Me,r,s);b.push(s,ut),u&&u.push(r,qe,Ce,Ce+1)}}else s=Ud(i,e,p,s,!0),Me.addEventListener(r,s,o),b.push(s),u&&u.push(r,qe,Ce,o)}else s=Ud(i,e,p,s,!1);const z=i.outputs;let ae;if(U&&null!==z&&(ae=z[r])){const re=ae.length;if(re)for(let Me=0;Me<re;Me+=2){const xt=e[ae[Me]][ae[Me+1]].subscribe(s),kt=b.length;b.push(s,xt),u&&u.push(r,i.index,kt,-(kt+1))}}}(s,r,r[11],o,n,e,!!t,i),mn}function iy(n,e,t,i){try{return!1!==t(i)}catch(r){return a_(n,r),!1}}function Ud(n,e,t,i,r){return function s(o){if(o===Function)return i;const a=2&n.flags?Yn(n.index,e):e;0==(32&e[2])&&Cd(a);let l=iy(e,0,i,o),c=s.__ngNextListenerFn__;for(;c;)l=iy(e,0,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function qi(n=1){return function uA(n){return(dt.lFrame.contextLView=function dA(n,e){for(;n>0;)e=e[15],n--;return e}(n,dt.lFrame.contextLView))[8]}(n)}function Ws(n,e,t,i,r){const s=Be(),o=Os(s,e,t,i);return o!==gt&&ei(wt(),en(),s,n,o,s[11],r,!1),Ws}function fy(n,e,t,i,r){const s=n[t+1],o=null===e;let a=i?Ci(s):ir(s),l=!1;for(;0!==a&&(!1===l||o);){const u=n[a+1];EM(n[a],e)&&(l=!0,n[a+1]=i?ad(u):sd(u)),a=i?Ci(u):ir(u)}l&&(n[t+1]=i?sd(s):ad(s))}function EM(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&bs(n,e)>=0}const _n={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function py(n){return n.substring(_n.key,_n.keyEnd)}function bM(n){return n.substring(_n.value,_n.valueEnd)}function gy(n,e){const t=_n.textEnd;return t===e?-1:(e=_n.keyEnd=function AM(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}(n,_n.key=e,t),qs(n,e,t))}function my(n,e){const t=_n.textEnd;let i=_n.key=qs(n,e,t);return t===i?-1:(i=_n.keyEnd=function SM(n,e,t){let i;for(;e<t&&(45===(i=n.charCodeAt(e))||95===i||(-33&i)>=65&&(-33&i)<=90||i>=48&&i<=57);)e++;return e}(n,i,t),i=yy(n,i,t),i=_n.value=qs(n,i,t),i=_n.valueEnd=function TM(n,e,t){let i=-1,r=-1,s=-1,o=e,a=o;for(;o<t;){const l=n.charCodeAt(o++);if(59===l)return a;34===l||39===l?a=o=vy(n,l,o,t):e===o-4&&85===s&&82===r&&76===i&&40===l?a=o=vy(n,41,o,t):l>32&&(a=o),s=r,r=i,i=-33&l}return a}(n,i,t),yy(n,i,t))}function _y(n){_n.key=0,_n.keyEnd=0,_n.value=0,_n.valueEnd=0,_n.textEnd=n.length}function qs(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function yy(n,e,t,i){return(e=qs(n,e,t))<t&&e++,e}function vy(n,e,t,i){let r=-1,s=t;for(;s<i;){const o=n.charCodeAt(s++);if(o==e&&92!==r)return s;r=92==o&&92===r?0:o}throw new Error}function Yo(n,e){return function Si(n,e,t,i){const r=Be(),s=wt(),o=nr(2);s.firstUpdatePass&&Cy(s,n,o,i),e!==gt&&Rn(r,o,e)&&Ay(s,s.data[Vn()],r,r[11],n,r[o+1]=function OM(n,e){return null==n||("string"==typeof e?n+=e:"object"==typeof n&&(n=pe(Zn(n)))),n}(e,t),i,o)}(n,e,null,!0),Yo}function wM(n,e){for(let t=function DM(n){return _y(n),my(n,qs(n,0,_n.textEnd))}(e);t>=0;t=my(e,t))Dy(n,py(e),bM(e))}function Ki(n,e){for(let t=function CM(n){return _y(n),gy(n,qs(n,0,_n.textEnd))}(e);t>=0;t=gy(e,t))Qn(n,py(e),!0)}function Ti(n,e,t,i){const r=wt(),s=nr(2);r.firstUpdatePass&&Cy(r,null,s,i);const o=Be();if(t!==gt&&Rn(o,s,t)){const a=r.data[Vn()];if(Ty(a,i)&&!by(r,s)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=ne(l,t||"")),jd(r,a,o,t,i)}else!function NM(n,e,t,i,r,s,o,a){r===gt&&(r=Fe);let l=0,c=0,u=0<r.length?r[0]:null,p=0<s.length?s[0]:null;for(;null!==u||null!==p;){const b=l<r.length?r[l+1]:void 0,U=c<s.length?s[c+1]:void 0;let ae,z=null;u===p?(l+=2,c+=2,b!==U&&(z=p,ae=U)):null===p||null!==u&&u<p?(l+=2,z=u):(c+=2,z=p,ae=U),null!==z&&Ay(n,e,t,i,z,ae,o,a),u=l<r.length?r[l]:null,p=c<s.length?s[c]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function xM(n,e,t){if(null==t||""===t)return Fe;const i=[],r=Zn(t);if(Array.isArray(r))for(let s=0;s<r.length;s++)n(i,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&n(i,s,r[s]);else"string"==typeof r&&e(i,r);return i}(n,e,t),i,s)}}function by(n,e){return e>=n.expandoStartIndex}function Cy(n,e,t,i){const r=n.data;if(null===r[t+1]){const s=r[Vn()],o=by(n,t);Ty(s,i)&&null===e&&!o&&(e=!1),e=function IM(n,e,t,i){const r=function Eu(n){const e=dt.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=Xo(t=Hd(null,n,e,t,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||n[o]!==r)if(t=Hd(r,n,e,t,i),null===s){let l=function RM(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==ir(i))return n[Ci(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=Hd(null,n,e,l[1],i),l=Xo(l,e.attrs,i),function FM(n,e,t,i){n[Ci(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else s=function PM(n,e,t){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<r;s++)i=Xo(i,n[s].hostAttrs,t);return Xo(i,e.attrs,t)}(n,e,i)}return void 0!==s&&(i?e.residualClasses=s:e.residualStyles=s),t}(r,s,e,i),function yM(n,e,t,i,r,s){let o=s?e.classBindings:e.styleBindings,a=Ci(o),l=ir(o);n[i]=t;let u,c=!1;if(Array.isArray(t)){const p=t;u=p[1],(null===u||bs(p,u)>0)&&(c=!0)}else u=t;if(r)if(0!==l){const b=Ci(n[a+1]);n[i+1]=El(b,a),0!==b&&(n[b+1]=od(n[b+1],i)),n[a+1]=function vT(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=El(a,0),0!==a&&(n[a+1]=od(n[a+1],i)),a=i;else n[i+1]=El(l,0),0===a?a=i:n[l+1]=od(n[l+1],i),l=i;c&&(n[i+1]=sd(n[i+1])),fy(n,u,i,!0),fy(n,u,i,!1),function vM(n,e,t,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof e&&bs(s,e)>=0&&(t[i+1]=ad(t[i+1]))}(e,u,n,i,s),o=El(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,t,o,i)}}function Hd(n,e,t,i,r){let s=null;const o=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a<o&&(s=e[a],i=Xo(i,s.hostAttrs,r),s!==n);)a++;return null!==n&&(t.directiveStylingLast=a),i}function Xo(n,e,t){const i=t?1:2;let r=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?r=o:r===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),Qn(n,o,!!t||e[++s]))}return void 0===n?null:n}function Dy(n,e,t){Qn(n,e,Zn(t))}function Ay(n,e,t,i,r,s,o,a){if(!(3&e.type))return;const l=n.data,c=l[a+1];Fl(function Nm(n){return 1==(1&n)}(c)?Sy(l,e,t,r,ir(c),o):void 0)||(Fl(s)||function xm(n){return 2==(2&n)}(c)&&(s=Sy(l,null,t,r,a,o)),function aT(n,e,t,i,r){const s=Jt(n);if(e)r?s?n.addClass(t,i):t.classList.add(i):s?n.removeClass(t,i):t.classList.remove(i);else{let o=-1===i.indexOf("-")?void 0:Jn.DashCase;if(null==r)s?n.removeStyle(t,i,o):t.style.removeProperty(i);else{const a="string"==typeof r&&r.endsWith("!important");a&&(r=r.slice(0,-10),o|=Jn.Important),s?n.setStyle(t,i,r,o):t.style.setProperty(i,r,a?"important":"")}}}(i,o,za(Vn(),t),r,s))}function Sy(n,e,t,i,r,s){const o=null===e;let a;for(;r>0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,p=null===u;let b=t[r+1];b===gt&&(b=p?Fe:void 0);let U=p?Fu(b,i):u===i?b:void 0;if(c&&!Fl(U)&&(U=Fu(l,i)),Fl(U)&&(a=U,o))return a;const z=n[r+1];r=o?Ci(z):ir(z)}if(null!==e){let l=s?e.residualClasses:e.residualStyles;null!=l&&(a=Fu(l,i))}return a}function Fl(n){return void 0!==n}function Ty(n,e){return 0!=(n.flags&(e?16:32))}function or(n,e=""){const t=Be(),i=wt(),r=n+20,s=i.firstCreatePass?Ms(i,r,1,e,null):i.data[r],o=t[r]=function Qu(n,e){return Jt(n)?n.createText(e):n.createTextNode(e)}(t[11],e);yl(i,t,o,s),Li(s,!1)}function Pl(n){return $d("",n,""),Pl}function $d(n,e,t){const i=Be(),r=Os(i,n,e,t);return r!==gt&&rr(i,Vn(),r),$d}function Gd(n,e,t,i,r){const s=Be(),o=ks(s,n,e,t,i,r);return o!==gt&&rr(s,Vn(),o),Gd}function xl(n,e,t){Ti(Qn,Ki,Os(Be(),n,e,t),!0)}function Oy(n,e,t){!function zi(n){Ti(Dy,wM,n,!1)}(Os(Be(),n,e,t))}function Wd(n,e,t){const i=Be();return Rn(i,ps(),e)&&ei(wt(),en(),i,n,e,i[11],t,!0),Wd}const Wr=void 0;var ZM=["en",[["a","p"],["AM","PM"],Wr],[["AM","PM"],Wr,Wr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Wr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Wr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Wr,"{1} 'at' {0}",Wr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function QM(n){const t=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===i?1:5}];let zs={};function zy(n){return n in zs||(zs[n]=vt.ng&&vt.ng.common&&vt.ng.common.locales&&vt.ng.common.locales[n]),zs[n]}var Xe=(()=>((Xe=Xe||{})[Xe.LocaleId=0]="LocaleId",Xe[Xe.DayPeriodsFormat=1]="DayPeriodsFormat",Xe[Xe.DayPeriodsStandalone=2]="DayPeriodsStandalone",Xe[Xe.DaysFormat=3]="DaysFormat",Xe[Xe.DaysStandalone=4]="DaysStandalone",Xe[Xe.MonthsFormat=5]="MonthsFormat",Xe[Xe.MonthsStandalone=6]="MonthsStandalone",Xe[Xe.Eras=7]="Eras",Xe[Xe.FirstDayOfWeek=8]="FirstDayOfWeek",Xe[Xe.WeekendRange=9]="WeekendRange",Xe[Xe.DateFormat=10]="DateFormat",Xe[Xe.TimeFormat=11]="TimeFormat",Xe[Xe.DateTimeFormat=12]="DateTimeFormat",Xe[Xe.NumberSymbols=13]="NumberSymbols",Xe[Xe.NumberFormats=14]="NumberFormats",Xe[Xe.CurrencyCode=15]="CurrencyCode",Xe[Xe.CurrencySymbol=16]="CurrencySymbol",Xe[Xe.CurrencyName=17]="CurrencyName",Xe[Xe.Currencies=18]="Currencies",Xe[Xe.Directionality=19]="Directionality",Xe[Xe.PluralCase=20]="PluralCase",Xe[Xe.ExtraData=21]="ExtraData",Xe))();const Nl="en-US";let Ky=Nl;function Kd(n,e,t,i,r){if(n=O(n),Array.isArray(n))for(let s=0;s<n.length;s++)Kd(n[s],e,t,i,r);else{const s=wt(),o=Be();let a=Ps(n)?n:O(n.provide),l=h_(n);const c=pn(),u=1048575&c.providerIndexes,p=c.directiveStart,b=c.providerIndexes>>20;if(Ps(n)||!n.multi){const U=new Do(l,r,He),z=Xd(a,e,r?u:u+b,p);-1===z?(sl(So(c,o),s,a),Yd(s,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(U),o.push(U)):(t[z]=U,o[z]=U)}else{const U=Xd(a,e,u+b,p),z=Xd(a,e,u,u+b),ae=U>=0&&t[U],re=z>=0&&t[z];if(r&&!re||!r&&!ae){sl(So(c,o),s,a);const Me=function QI(n,e,t,i,r){const s=new Do(n,t,He);return s.multi=[],s.index=e,s.componentProviders=0,yv(s,r,i&&!t),s}(r?XI:YI,t.length,r,i,l);!r&&re&&(t[z].providerFactory=Me),Yd(s,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(Me),o.push(Me)}else Yd(s,n,U>-1?U:z,yv(t[r?z:U],l,!r&&i));!r&&i&&re&&t[z].componentProviders++}}}function Yd(n,e,t,i){const r=Ps(e);if(r||function fw(n){return!!n.useClass}(e)){const o=(e.useClass||e).prototype.ngOnDestroy;if(o){const a=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const l=a.indexOf(t);-1===l?a.push(t,[i,o]):a[l+1].push(i,o)}else a.push(t,o)}}}function yv(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function Xd(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function YI(n,e,t,i){return Qd(this.multi,[])}function XI(n,e,t,i){const r=this.multi;let s;if(this.providerFactory){const o=this.providerFactory.componentProviders,a=To(t,t[1],this.providerFactory.index,i);s=a.slice(0,o),Qd(r,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Qd(r,s);return s}function Qd(n,e){for(let t=0;t<n.length;t++)e.push((0,n[t])());return e}function Gt(n,e=[]){return t=>{t.providersResolver=(i,r)=>function KI(n,e,t){const i=wt();if(i.firstCreatePass){const r=Ei(n);Kd(t,i.data,i.blueprint,r,!0),Kd(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class vv{}const bv="ngComponent";class JI{resolveComponentFactory(e){throw function Ev(n){const e=Error(`No component factory found for ${pe(n)}. Did you add it to @NgModule.entryComponents?`);return e[bv]=n,e}(e)}}let br=(()=>{class n{}return n.NULL=new JI,n})();function jl(...n){}function Ys(n,e){return new Cn(ai(n,e))}const nR=function eR(){return Ys(pn(),Be())};let Cn=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=nR,n})();function Cv(n){return n instanceof Cn?n.nativeElement:n}class qr{}let zr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>rR(),n})();const rR=function oR(){const n=Be(),t=Yn(pn().index,n);return function sR(n){return n[11]}(ki(t)?t:n)};let Jd=(()=>{class n{}return n.\u0275prov=R({token:n,providedIn:"root",factory:()=>null}),n})();class Cr{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Dv=new Cr("13.0.1"),Xs={};function Bl(n,e,t,i,r=!1){for(;null!==t;){const s=e[t.index];if(null!==s&&i.push(un(s)),vi(s))for(let a=10;a<s.length;a++){const l=s[a],c=l[1].firstChild;null!==c&&Bl(l[1],l,c,i)}const o=t.type;if(8&o)Bl(n,e,t.child,i);else if(32&o){const a=Ku(t,e);let l;for(;l=a();)i.push(l)}else if(16&o){const a=Cm(e,t);if(Array.isArray(a))i.push(...a);else{const l=jo(e[16]);Bl(l[1],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}class ta{constructor(e,t){this._lView=e,this._cdRefInjectingView=t,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const e=this._lView,t=e[1];return Bl(t,e,t.firstChild,[])}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[3];if(vi(e)){const t=e[8],i=t?t.indexOf(this):-1;i>-1&&(Ju(e,i),Vr(t,i))}this._attachedToViewContainer=!1}fm(this._lView[1],this._lView)}onDestroy(e){Km(this._lView[1],this._lView,null,e)}markForCheck(){Cd(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Ad(this._lView[1],this._lView,this.context)}checkNoChanges(){!function tw(n,e,t){Ya(!0);try{Ad(n,e,t)}finally{Ya(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function QS(n,e){Bo(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}class aR extends ta{constructor(e){super(e),this._view=e}detectChanges(){i_(this._view)}checkNoChanges(){!function nw(n){Ya(!0);try{i_(n)}finally{Ya(!1)}}(this._view)}get context(){return null}}class Av extends br{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=Bt(e);return new eh(t,this.ngModule)}}function Sv(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}const cR=new ct("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>sm});class eh extends vv{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function _T(n){return n.map(mT).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return Sv(this.componentDef.inputs)}get outputs(){return Sv(this.componentDef.outputs)}create(e,t,i,r){const s=(r=r||this.ngModule)?function uR(n,e){return{get:(t,i,r)=>{const s=n.get(t,Xs,r);return s!==Xs||i===Xs?s:e.get(t,i,r)}}}(e,r.injector):e,o=s.get(qr,Jp),a=s.get(Jd,null),l=o.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=i?function zm(n,e,t){if(Jt(n))return n.selectRootElement(e,t===Ke.ShadowDom);let i="string"==typeof e?n.querySelector(e):e;return i.textContent="",i}(l,i,this.componentDef.encapsulation):Zu(o.createRenderer(null,this.componentDef),c,function lR(n){const e=n.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),p=this.componentDef.onPush?576:528,b=function I_(n,e){return{components:[],scheduler:n||sm,clean:iw,playerHandler:e||null,flags:0}}(),U=Dl(0,null,null,1,0,null,null,null,null,null),z=Uo(null,U,b,p,null,null,o,l,a,s);let ae,re;Xa(z);try{const Me=function w_(n,e,t,i,r,s){const o=t[1];t[20]=n;const l=Ms(o,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(Sl(l,c,!0),null!==n&&(tl(r,n,c),null!==l.classes&&rd(r,n,l.classes),null!==l.styles&&Sm(r,n,l.styles)));const u=i.createRenderer(n,e),p=Uo(t,Wm(e),null,e.onPush?64:16,t[20],l,i,u,s||null,null);return o.firstCreatePass&&(sl(So(l,t),o,e.type),Jm(o,l),e_(l,t.length,1)),Al(t,p),t[20]=p}(u,this.componentDef,z,o,l);if(u)if(i)tl(l,u,["ng-version",Dv.full]);else{const{attrs:Ce,classes:qe}=function yT(n){const e=[],t=[];let i=1,r=2;for(;i<n.length;){let s=n[i];if("string"==typeof s)2===r?""!==s&&e.push(s,n[++i]):8===r&&t.push(s);else{if(!bi(r))break;r=s}i++}return{attrs:e,classes:t}}(this.componentDef.selectors[0]);Ce&&tl(l,u,Ce),qe&&qe.length>0&&rd(l,u,qe.join(" "))}if(re=pu(U,20),void 0!==t){const Ce=re.projection=[];for(let qe=0;qe<this.ngContentSelectors.length;qe++){const Qe=t[qe];Ce.push(null!=Qe?Array.from(Qe):null)}}ae=function M_(n,e,t,i,r){const s=t[1],o=function jT(n,e,t){const i=pn();n.firstCreatePass&&(t.providersResolver&&t.providersResolver(t),t_(n,i,e,Is(n,e,1,null),t));const r=To(e,n,i.directiveStart,i);In(r,e);const s=ai(i,e);return s&&In(s,e),r}(s,t,e);if(i.components.push(o),n[8]=o,r&&r.forEach(l=>l(o,e)),e.contentQueries){const l=pn();e.contentQueries(1,o,l.directiveStart)}const a=pn();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(mr(a.index),Qm(t[1],a,0,a.directiveStart,a.directiveEnd,e),Zm(e,o)),o}(Me,this.componentDef,z,b,[Iw]),Ho(U,z,null)}finally{Qa()}return new hR(this.componentType,ae,Ys(re,z),z,re)}}class hR extends class ZI{}{constructor(e,t,i,r,s){super(),this.location=i,this._rootLView=r,this._tNode=s,this.instance=t,this.hostView=this.changeDetectorRef=new aR(r),this.componentType=e}get injector(){return new _s(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Kr{}const Qs=new Map;class wv extends Kr{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Av(this);const i=Kt(e);this._bootstrapComponents=Hi(i.bootstrap),this._r3Injector=d_(e,t,[{provide:Kr,useValue:this},{provide:br,useValue:this.componentFactoryResolver}],pe(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=Nt.THROW_IF_NOT_FOUND,i=he.Default){return e===Nt||e===Kr||e===$o?this:this._r3Injector.get(e,t,i)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class nh extends class pR{}{constructor(e){super(),this.moduleType=e,null!==Kt(e)&&function gR(n){const e=new Set;!function t(i){const r=Kt(i,!0),s=r.id;null!==s&&(function Tv(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${pe(e)} vs ${pe(e.name)}`)}(s,Qs.get(s),i),Qs.set(s,i));const o=Hi(r.imports);for(const a of o)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new wv(this.moduleType,e)}}function ih(n){return e=>{setTimeout(n,void 0,e)}}const dn=class xR extends k.Subject{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){var r,s,o;let a=e,l=t||(()=>null),c=i;if(e&&"object"==typeof e){const p=e;a=null===(r=p.next)||void 0===r?void 0:r.bind(p),l=null===(s=p.error)||void 0===s?void 0:s.bind(p),c=null===(o=p.complete)||void 0===o?void 0:o.bind(p)}this.__isAsync&&(l=ih(l),a&&(a=ih(a)),c&&(c=ih(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof k.Subscription&&e.add(u),u}};function NR(){return this._results[xs()]()}class Ul{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=xs(),i=Ul.prototype;i[t]||(i[t]=NR)}get changes(){return this._changes||(this._changes=new dn)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const i=this;i.dirty=!1;const r=li(e);(this._changesDetected=!function PA(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],s=e[i];if(t&&(r=t(r),s=t(s)),s!==r)return!1}return!0}(i._results,r,t))&&(i._results=r,i.length=r.length,i.last=r[this.length-1],i.first=r[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}Symbol;const kR=function jR(){return Hl(pn(),Be())};let ar=(()=>{class n{}return n.__NG_ELEMENT_ID__=kR,n})();const LR=ar,VR=class extends LR{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e){const t=this._declarationTContainer.tViews,i=Uo(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(i[19]=s.createEmbeddedView(t)),Ho(t,i,e),new ta(i)}};function Hl(n,e){return 4&n.type?new VR(e,n,Ys(n,e)):null}const UR=function HR(){return Ov(pn(),Be())};let Yi=(()=>{class n{}return n.__NG_ELEMENT_ID__=UR,n})();const $R=Yi,xv=class extends $R{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Ys(this._hostTNode,this._hostLView)}get injector(){return new _s(this._hostTNode,this._hostLView)}get parentInjector(){const e=rl(this._hostTNode,this._hostLView);if(gg(e)){const t=ms(e,this._hostLView),i=gs(e);return new _s(t[1].data[i+8],t)}return new _s(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=Nv(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,i){const r=e.createEmbeddedView(t||{});return this.insert(r,i),r}createComponent(e,t,i,r,s){const o=e&&!function Mo(n){return"function"==typeof n}(e);let a;if(o)a=t;else{const p=t||{};a=p.index,i=p.injector,r=p.projectableNodes,s=p.ngModuleRef}const l=o?e:new eh(Bt(e)),c=i||this.parentInjector;if(!s&&null==l.ngModule&&c){const p=c.get(Kr,null);p&&(s=p)}const u=l.create(c,r,void 0,s);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[1];if(function JD(n){return vi(n[3])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const p=i[3],b=new xv(p,p[6],p[3]);b.detach(b.indexOf(e))}}const s=this._adjustIndex(t),o=this._lContainer;!function JS(n,e,t,i){const r=10+i,s=t.length;i>0&&(t[r-1][4]=e),i<s-10?(e[4]=t[r],ll(t,10+i,e)):(t.push(e),e[4]=null),e[3]=t;const o=e[17];null!==o&&t!==o&&function eT(n,e){const t=n[9];e[16]!==e[3][3][16]&&(n[2]=!0),null===t?n[9]=[e]:t.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(n),e[2]|=128}(r,i,o,s);const a=nd(s,o),l=i[11],c=_l(l,o[7]);return null!==c&&function XS(n,e,t,i,r,s){i[0]=r,i[6]=e,Bo(n,i,t,1,r,s)}(r,o[6],l,i,c,a),e.attachToViewContainerRef(),ll(rh(o),s,e),e}move(e,t){return this.insert(e,t)}indexOf(e){const t=Nv(this._lContainer);return null!==t?t.indexOf(e):-1}remove(e){const t=this._adjustIndex(e,-1),i=Ju(this._lContainer,t);i&&(Vr(rh(this._lContainer),t),fm(i[1],i))}detach(e){const t=this._adjustIndex(e,-1),i=Ju(this._lContainer,t);return i&&null!=Vr(rh(this._lContainer),t)?new ta(i):null}_adjustIndex(e,t=0){return null==e?this.length+t:e}};function Nv(n){return n[8]}function rh(n){return n[8]||(n[8]=[])}function Ov(n,e){let t;const i=e[n.index];if(vi(i))t=i;else{let r;if(8&n.type)r=un(i);else{const s=e[11];r=s.createComment("");const o=ai(n,e);$r(s,_l(s,o),r,function rT(n,e){return Jt(n)?n.nextSibling(e):e.nextSibling}(s,o),!1)}e[n.index]=t=n_(i,e,r,n),Al(e,t)}return new xv(t,n,e)}class sh{constructor(e){this.queryList=e,this.matches=null}clone(){return new sh(this.queryList)}setDirty(){this.queryList.setDirty()}}class oh{constructor(e=[]){this.queries=e}createEmbeddedView(e){const t=e.queries;if(null!==t){const i=null!==e.contentQueries?e.contentQueries[0]:t.length,r=[];for(let s=0;s<i;s++){const o=t.getByIndex(s);r.push(this.queries[o.indexInDeclarationView].clone())}return new oh(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==$v(e,t).matches&&this.queries[t].setDirty()}}class kv{constructor(e,t,i=null){this.predicate=e,this.flags=t,this.read=i}}class ah{constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){const r=null!==t?t.length:0,s=this.getByIndex(i).embeddedTView(e,r);s&&(s.indexInDeclarationView=i,null!==t?t.push(s):t=[s])}return null!==t?new ah(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}}class lh{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new lh(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const t=this._declarationNodeIndex;let i=e.parent;for(;null!==i&&8&i.type&&i.index!==t;)i=i.parent;return t===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){const i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){const s=i[r];this.matchTNodeWithReadOption(e,t,qR(t,s)),this.matchTNodeWithReadOption(e,t,ol(t,e,s,!1,!1))}else i===ar?4&t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,ol(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(null!==i){const r=this.metadata.read;if(null!==r)if(r===Cn||r===Yi||r===ar&&4&t.type)this.addMatch(t.index,-2);else{const s=ol(t,e,r,!1,!1);null!==s&&this.addMatch(t.index,s)}else this.addMatch(t.index,i)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}function qR(n,e){const t=n.localNames;if(null!==t)for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1];return null}function KR(n,e,t,i){return-1===t?function zR(n,e){return 11&n.type?Ys(n,e):4&n.type?Hl(n,e):null}(e,n):-2===t?function YR(n,e,t){return t===Cn?Ys(e,n):t===ar?Hl(e,n):t===Yi?Ov(e,n):void 0}(n,e,i):To(n,n[1],t,e)}function Lv(n,e,t,i){const r=e[19].queries[i];if(null===r.matches){const s=n.data,o=t.matches,a=[];for(let l=0;l<o.length;l+=2){const c=o[l];a.push(c<0?null:KR(e,s[c],o[l+1],t.metadata.read))}r.matches=a}return r.matches}function ch(n,e,t,i){const r=n.queries.getByIndex(t),s=r.matches;if(null!==s){const o=Lv(n,e,r,t);for(let a=0;a<s.length;a+=2){const l=s[a];if(l>0)i.push(o[a/2]);else{const c=s[a+1],u=e[-l];for(let p=10;p<u.length;p++){const b=u[p];b[17]===b[3]&&ch(b[1],b,c,i)}if(null!==u[9]){const p=u[9];for(let b=0;b<p.length;b++){const U=p[b];ch(U[1],U,c,i)}}}}}return i}function Vv(n){const e=Be(),t=wt(),i=og();bu(i+1);const r=$v(t,i);if(n.dirty&&eg(e)===(2==(2&r.metadata.flags))){if(null===r.matches)n.reset([]);else{const s=r.crossesNgTemplate?ch(t,e,i,[]):Lv(t,e,r,i);n.reset(s,Cv),n.notifyOnChanges()}return!0}return!1}function jv(n,e,t){const i=wt();i.firstCreatePass&&(function Hv(n,e,t){null===n.queries&&(n.queries=new ah),n.queries.track(new lh(e,t))}(i,new kv(n,e,t),-1),2==(2&e)&&(i.staticViewQueries=!0)),function Uv(n,e,t){const i=new Ul(4==(4&t));Km(n,e,i,i.destroy),null===e[19]&&(e[19]=new oh),e[19].queries.push(new sh(i))}(i,Be(),e)}function $v(n,e){return n.queries.getByIndex(e)}const Wl=new ct("Application Initializer");let Js=(()=>{class n{constructor(t){this.appInits=t,this.resolve=jl,this.reject=jl,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r<this.appInits.length;r++){const s=this.appInits[r]();if(Rl(s))t.push(s);else if(Bd(s)){const o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});t.push(o)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(ze(Wl,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const sa=new ct("AppId"),vF={provide:sa,useFactory:function yF(){return`${gh()}${gh()}${gh()}`},deps:[]};function gh(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const oE=new ct("Platform Initializer"),ql=new ct("Platform ID"),EF=new ct("appBootstrapListener");let mh=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const lr=new ct("LocaleId"),aE=new ct("DefaultCurrencyCode");class CF{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}const _h=function(n){return new nh(n)},DF=_h,AF=function(n){return Promise.resolve(_h(n))},cE=function(n){const e=_h(n),i=Hi(Kt(n).declarations).reduce((r,s)=>{const o=Bt(s);return o&&r.push(new eh(o)),r},[]);return new CF(e,i)},SF=cE,TF=function(n){return Promise.resolve(cE(n))};let uE=(()=>{class n{constructor(){this.compileModuleSync=DF,this.compileModuleAsync=AF,this.compileModuleAndAllComponentsSync=SF,this.compileModuleAndAllComponentsAsync=TF}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const IF=(()=>Promise.resolve(0))();function yh(n){"undefined"==typeof Zone?IF.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Yt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new dn(!1),this.onMicrotaskEmpty=new dn(!1),this.onStable=new dn(!1),this.onError=new dn(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function RF(){let n=vt.requestAnimationFrame,e=vt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function xF(n){const e=()=>{!function PF(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(vt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Eh(n),n.isCheckStableRunning=!0,vh(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Eh(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,s,o,a)=>{try{return dE(n),t.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&e(),hE(n)}},onInvoke:(t,i,r,s,o,a,l)=>{try{return dE(n),t.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),hE(n)}},onHasTask:(t,i,r,s)=>{t.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,Eh(n),vh(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,i,r,s)=>(t.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Yt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Yt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,e,FF,jl,jl);try{return s.runTask(o,t,i)}finally{s.cancelTask(o)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const FF={};function vh(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Eh(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function dE(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function hE(n){n._nesting--,vh(n)}class NF{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new dn,this.onMicrotaskEmpty=new dn,this.onStable=new dn,this.onError=new dn}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}let bh=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Yt.assertNotInAngularZone(),yh(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())yh(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(ze(Yt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),fE=(()=>{class n{constructor(){this._applications=new Map,Ch.addToWindow(this)}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return Ch.findTestabilityInTree(this,t,i)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class OF{addToWindow(e){}findTestabilityInTree(e,t,i){return null}}let Ch=new OF,gE=!1;function Dh(){return gE=!0,true}let wi;const mE=new ct("AllowMultipleToken");function _E(n,e,t=[]){const i=`Platform: ${e}`,r=new ct(i);return(s=[])=>{let o=yE();if(!o||o.injector.get(mE,!1))if(n)n(t.concat(s).concat({provide:r,useValue:!0}));else{const a=t.concat(s).concat({provide:r,useValue:!0},{provide:Go,useValue:"platform"});!function GF(n){if(wi&&!wi.destroyed&&!wi.injector.get(mE,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");wi=n.get(vE);const e=n.get(oE,null);e&&e.forEach(t=>t())}(Nt.create({providers:a,name:i}))}return function WF(n){const e=yE();if(!e)throw new Error("No platform exists!");if(!e.injector.get(n,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function yE(){return wi&&!wi.destroyed?wi:null}let vE=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const a=function qF(n,e){let t;return t="noop"===n?new NF:("zone.js"===n?void 0:n)||new Yt({enableLongStackTrace:Dh(),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(i?i.ngZone:void 0,{ngZoneEventCoalescing:i&&i.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:i&&i.ngZoneRunCoalescing||!1}),l=[{provide:Yt,useValue:a}];return a.run(()=>{const c=Nt.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),p=u.injector.get(Hr,null);if(!p)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(()=>{const b=a.onError.subscribe({next:U=>{p.handleError(U)}});u.onDestroy(()=>{Ah(this._modules,u),b.unsubscribe()})}),function zF(n,e,t){try{const i=t();return Rl(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(p,a,()=>{const b=u.injector.get(Js);return b.runInitializers(),b.donePromise.then(()=>(function iI(n){Ae(n,"Expected localeId to be defined"),"string"==typeof n&&(Ky=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(lr,Nl)||Nl),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,i=[]){const r=EE({},i);return function VF(n,e,t){const i=new nh(t);return Promise.resolve(i)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const i=t.injector.get(eo);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${pe(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(ze(Nt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function EE(n,e){return Array.isArray(e)?e.reduce(EE,n):Object.assign(Object.assign({},n),e)}let eo=(()=>{class n{constructor(t,i,r,s,o){this._zone=t,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=s,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new k.Observable(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new k.Observable(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{Yt.assertNotInAngularZone(),yh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const p=this._zone.onUnstable.subscribe(()=>{Yt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),p.unsubscribe()}});this.isStable=(0,k.merge)(a,l.pipe((0,j.share)()))}bootstrap(t,i){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let r;r=t instanceof vv?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(r.componentType);const s=function HF(n){return n.isBoundToModule}(r)?void 0:this._injector.get(Kr),a=r.create(Nt.NULL,[],i||r.selector,s),l=a.location.nativeElement,c=a.injector.get(bh,null),u=c&&a.injector.get(fE);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Ah(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;Ah(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(EF,[]).concat(this._bootstrapListeners).forEach(r=>r(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(ze(Yt),ze(Nt),ze(Hr),ze(br),ze(Js))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function Ah(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const XF=function QF(n){return function ZF(n,e,t){if(Wa(n)&&!t){const i=Yn(n.index,e);return new ta(i,i)}return 47&n.type?new ta(e[16],e):null}(pn(),Be(),16==(16&n))};let oa=(()=>{class n{}return n.__NG_ELEMENT_ID__=XF,n})();class wE{constructor(){}supports(e){return zo(e)}create(e){return new cP(e)}}const lP=(n,e)=>e;class cP{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||lP}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,s=null;for(;t||i;){const o=!i||t&&t.currentIndex<IE(i,r,s)?t:i,a=IE(o,r,s),l=o.currentIndex;if(o===i)r--,i=i._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{s||(s=[]);const c=a-r,u=l-r;if(c!=u){for(let b=0;b<c;b++){const U=b<s.length?s[b]:s[b]=0,z=U+b;u<=z&&z<c&&(s[b]=U+1)}s[o.previousIndex]=u-c}}a!==l&&e(o,a,l)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!zo(e))throw new Error(`Error trying to diff '${pe(e)}'. Only arrays and iterables are allowed`);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let r,s,o,t=this._itHead,i=!1;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)s=e[a],o=this._trackByFn(a,s),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,s,o,a)),Object.is(t.item,s)||this._addIdentityChange(t,s)):(t=this._mismatch(t,s,o,a),i=!0),t=t._next}else r=0,function Vw(n,e){if(Array.isArray(n))for(let t=0;t<n.length;t++)e(n[t]);else{const t=n[xs()]();let i;for(;!(i=t.next()).done;)e(i.value)}}(e,a=>{o=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,a,o,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,o,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let s;return null===e?s=this._itTail:(s=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):e=this._addAfter(new uP(t,i),s,r),e}_verifyReinsertion(e,t,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,s=e._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new ME),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ME),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class uP{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class dP{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class ME{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new dP,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function IE(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i<t.length&&(r=t[i]),i+e+r}class RE{constructor(){}supports(e){return e instanceof Map||Nd(e)}create(){return new hP}}class hP{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||Nd(e)))throw new Error(`Error trying to diff '${pe(e)}'. Only maps and objects are allowed`)}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(i,r)=>{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new fP(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class fP{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function FE(){return new aa([new wE])}let aa=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||FE()),deps:[[n,new Br,new ji]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new Error(`Cannot find a differ supporting object '${t}' of type '${function pP(n){return n.name||typeof n}(t)}'`)}}return n.\u0275prov=R({token:n,providedIn:"root",factory:FE}),n})();function PE(){return new to([new RE])}let to=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||PE()),deps:[[n,new Br,new ji]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return n.\u0275prov=R({token:n,providedIn:"root",factory:PE}),n})();const gP=[new RE],_P=new aa([new wE]),yP=new to(gP),vP=_E(null,"core",[{provide:ql,useValue:"unknown"},{provide:vE,deps:[Nt]},{provide:fE,deps:[]},{provide:mh,deps:[]}]),AP=[{provide:eo,useClass:eo,deps:[Yt,Nt,Hr,br,Js]},{provide:cR,deps:[Yt],useFactory:function SP(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Js,useClass:Js,deps:[[new ji,Wl]]},{provide:uE,useClass:uE,deps:[]},vF,{provide:aa,useFactory:function EP(){return _P},deps:[]},{provide:to,useFactory:function bP(){return yP},deps:[]},{provide:lr,useFactory:function CP(n){return n||function DP(){return"undefined"!=typeof $localize&&$localize.locale||Nl}()},deps:[[new xo(lr),new ji,new Br]]},{provide:aE,useValue:"USD"}];let TP=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(ze(eo))},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:AP}),n})(),oc=null;function Jr(){return oc}const Qt=new ct("DocumentToken");var hn=(()=>((hn=hn||{})[hn.Zero=0]="Zero",hn[hn.One=1]="One",hn[hn.Two=2]="Two",hn[hn.Few=3]="Few",hn[hn.Many=4]="Many",hn[hn.Other=5]="Other",hn))();const MN=function qy(n){return function Bn(n){const e=function JM(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=zy(e);if(t)return t;const i=e.split("-")[0];if(t=zy(i),t)return t;if("en"===i)return ZM;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[Xe.PluralCase]};class mc{}let iO=(()=>{class n extends mc{constructor(t){super(),this.locale=t}getPluralCategory(t,i){switch(MN(i||this.locale)(t)){case hn.Zero:return"zero";case hn.One:return"one";case hn.Two:return"two";case hn.Few:return"few";case hn.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(ze(lr))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class aO{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Tb=(()=>{class n{constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error(`Cannot find a differ supporting object '${t}' of type '${function lO(n){return n.name||typeof n}(t)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=[];t.forEachOperation((r,s,o)=>{if(null==r.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new aO(null,this._ngForOf,-1,-1),null===o?void 0:o),l=new wb(r,a);i.push(l)}else if(null==o)this._viewContainer.remove(null===s?void 0:s);else if(null!==s){const a=this._viewContainer.get(s);this._viewContainer.move(a,o);const l=new wb(r,a);i.push(l)}});for(let r=0;r<i.length;r++)this._perViewChange(i[r].view,i[r].record);for(let r=0,s=this._viewContainer.length;r<s;r++){const o=this._viewContainer.get(r);o.context.index=r,o.context.count=s,o.context.ngForOf=this._ngForOf}t.forEachIdentityChange(r=>{this._viewContainer.get(r.currentIndex).context.$implicit=r.item})}_perViewChange(t,i){t.context.$implicit=i.item}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(He(Yi),He(ar),He(aa))},n.\u0275dir=We({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();class wb{constructor(e,t){this.record=e,this.view=t}}let Mb=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new cO,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Ib("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Ib("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(He(Yi),He(ar))},n.\u0275dir=We({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class cO{constructor(){this.$implicit=null,this.ngIf=null}}function Ib(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${pe(e)}'.`)}let Fb=(()=>{class n{constructor(t,i,r){this._ngEl=t,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,i){const[r,s]=t.split(".");null!=(i=null!=i&&s?`${i}${s}`:i)?this._renderer.setStyle(this._ngEl.nativeElement,r,i):this._renderer.removeStyle(this._ngEl.nativeElement,r)}_applyChanges(t){t.forEachRemovedItem(i=>this._setStyle(i.key,null)),t.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),t.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(He(Cn),He(to),He(zr))},n.\u0275dir=We({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),n})(),ba=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[{provide:mc,useClass:iO}]}),n})();const xb="browser";class df extends class UO extends class yN{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function _N(n){oc||(oc=n)}(new df)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function HO(){return Ca=Ca||document.querySelector("base"),Ca?Ca.getAttribute("href"):null}();return null==t?null:function $O(n){_c=_c||document.createElement("a"),_c.setAttribute("href",n);const e=_c.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){Ca=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function rO(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,s]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}(document.cookie,e)}}let _c,Ca=null;const Ob=new ct("TRANSITION_ID"),WO=[{provide:Wl,useFactory:function GO(n,e,t){return()=>{t.get(Js).donePromise.then(()=>{const i=Jr(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s<r.length;s++)i.remove(r[s])})}},deps:[Ob,Qt,Nt],multi:!0}];class hf{static init(){!function kF(n){Ch=n}(new hf)}addToWindow(e){vt.getAngularTestability=(i,r=!0)=>{const s=e.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},vt.getAllAngularTestabilities=()=>e.getAllTestabilities(),vt.getAllAngularRootElements=()=>e.getAllRootElements(),vt.frameworkStabilizers||(vt.frameworkStabilizers=[]),vt.frameworkStabilizers.push(i=>{const r=vt.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:i?Jr().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let qO=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Da=new ct("EventManagerPlugins");let vc=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>r.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let s=0;s<r.length;s++){const o=r[s];if(o.supports(t))return this._eventNameToPlugin.set(t,o),o}throw new Error(`No event manager plugin found for event ${t}`)}}return n.\u0275fac=function(t){return new(t||n)(ze(Da),ze(Yt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class ff{constructor(e){this._doc=e}addGlobalEventListener(e,t,i){const r=Jr().getGlobalEventTarget(this._doc,e);if(!r)throw new Error(`Unsupported event target ${r} for event ${t}`);return this.addEventListener(r,t,i)}}let Lb=(()=>{class n{constructor(){this._stylesSet=new Set}addStyles(t){const i=new Set;t.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Aa=(()=>{class n extends Lb{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,i,r){t.forEach(s=>{const o=this._doc.createElement("style");o.textContent=s,r.push(i.appendChild(o))})}addHost(t){const i=[];this._addStylesToHost(this._stylesSet,t,i),this._hostNodes.set(t,i)}removeHost(t){const i=this._hostNodes.get(t);i&&i.forEach(Vb),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(t,r,i)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(Vb))}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function Vb(n){Jr().remove(n)}const pf={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},gf=/%COMP%/g;function Ec(n,e,t){for(let i=0;i<e.length;i++){let r=e[i];Array.isArray(r)?Ec(n,r,t):(r=r.replace(gf,n),t.push(r))}return t}function Ub(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let bc=(()=>{class n{constructor(t,i,r){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new mf(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;switch(i.encapsulation){case Ke.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new l1(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(t),r}case 1:case Ke.ShadowDom:return new c1(this.eventManager,this.sharedStylesHost,t,i);default:if(!this.rendererByCompId.has(i.id)){const r=Ec(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(ze(vc),ze(Aa),ze(sa))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class mf{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(pf[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,i){e&&e.insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const s=pf[r];s?e.setAttributeNS(s,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=pf[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(Jn.DashCase|Jn.Important)?e.style.setProperty(t,i,r&Jn.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&Jn.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Ub(i)):this.eventManager.addEventListener(e,t,Ub(i))}}class l1 extends mf{constructor(e,t,i,r){super(e),this.component=i;const s=Ec(r+"-"+i.id,i.styles,[]);t.addStyles(s),this.contentAttr=function s1(n){return"_ngcontent-%COMP%".replace(gf,n)}(r+"-"+i.id),this.hostAttr=function o1(n){return"_nghost-%COMP%".replace(gf,n)}(r+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}class c1 extends mf{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=Ec(r.id,r.styles,[]);for(let o=0;o<s.length;o++){const a=document.createElement("style");a.textContent=s[o],this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let u1=(()=>{class n extends ff{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Gb=["alt","control","meta","shift"],_1={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Wb={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},y1={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let v1=(()=>{class n extends ff{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Jr().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="";if(Gb.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),o+=l+".")}),o+=s,0!=i.length||0===s.length)return null;const a={};return a.domEventName=r,a.fullKey=o,a}static getEventFullKey(t){let i="",r=function E1(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&Wb.hasOwnProperty(e)&&(e=Wb[e]))}return _1[e]||e}(t);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),Gb.forEach(s=>{s!=r&&y1[s](t)&&(i+=s+".")}),i+=r,i}static eventCallback(t,i,r){return s=>{n.getEventFullKey(s)===t&&r.runGuarded(()=>i(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Cc=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:function(t){let i=null;return i=t?new(t||n):ze(yf),i},providedIn:"root"}),n})(),yf=(()=>{class n extends Cc{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case Vt.NONE:return i;case Vt.HTML:return Bi(i,"HTML")?Zn(i):qg(this._doc,String(i)).toString();case Vt.STYLE:return Bi(i,"Style")?Zn(i):i;case Vt.SCRIPT:if(Bi(i,"Script"))return Zn(i);throw new Error("unsafe value used in a script context");case Vt.URL:return Vg(i),Bi(i,"URL")?Zn(i):Oo(String(i));case Vt.RESOURCE_URL:if(Bi(i,"ResourceURL"))return Zn(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function oS(n){return new tS(n)}(t)}bypassSecurityTrustStyle(t){return function aS(n){return new nS(n)}(t)}bypassSecurityTrustScript(t){return function lS(n){return new iS(n)}(t)}bypassSecurityTrustUrl(t){return function cS(n){return new rS(n)}(t)}bypassSecurityTrustResourceUrl(t){return function uS(n){return new sS(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:function(t){let i=null;return i=t?new t:function b1(n){return new yf(n.get(Qt))}(ze(Nt)),i},providedIn:"root"}),n})();const w1=_E(vP,"browser",[{provide:ql,useValue:xb},{provide:oE,useValue:function C1(){df.makeCurrent(),hf.init()},multi:!0},{provide:Qt,useFactory:function A1(){return function YD(n){hu=n}(document),document},deps:[]}]),M1=[[],{provide:Go,useValue:"root"},{provide:Hr,useFactory:function D1(){return new Hr},deps:[]},{provide:Da,useClass:u1,multi:!0,deps:[Qt,Yt,ql]},{provide:Da,useClass:v1,multi:!0,deps:[Qt]},[],{provide:bc,useClass:bc,deps:[vc,Aa,sa]},{provide:qr,useExisting:bc},{provide:Lb,useExisting:Aa},{provide:Aa,useClass:Aa,deps:[Qt]},{provide:bh,useClass:bh,deps:[Yt]},{provide:vc,useClass:vc,deps:[Da,Yt]},{provide:class BO{},useClass:qO,deps:[]},[]];let I1=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:sa,useValue:t.appId},{provide:Ob,useExisting:sa},WO]}}}return n.\u0275fac=function(t){return new(t||n)(ze(n,12))},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:M1,imports:[ba,TP]}),n})();"undefined"!=typeof window&&window;const Sa=Handlebars,bf={},ao=[{name:"ifEquals",function:"function(arg1, arg2, options) {return (arg1 === arg2) ? options.fn(this) : options.inverse(this);}"},{name:"ifNotEquals",function:"function(arg1, arg2, options) {return (arg1 !== arg2) ? options.fn(this) : options.inverse(this);}"},{name:"switch",function:"function(value, options) {this.switch_value = value;this.switch_break = false; return options.fn(this);}"},{name:"case",function:"function(value, options) {if (value === this.switch_value) {this.switch_break = true;return options.fn(this);}}"},{name:"default",function:"function(value, options) {if (this.switch_break === false) {return value;}}"},{name:"dateFormat",function:"function(date, format, options) { return moment(date).format(format); }"},{name:"dateAdd",function:"function(date, amount, what, options) { return moment(date).add(amount, what).format(); }"},{name:"dateFromNow",function:"function(date, options) { return moment(date).fromNow(); }"},{name:"dateToNow",function:"function(date, options) { return moment(date).toNow(); }"},{name:"dateCalendar",function:"function(date, options) { return moment(date).calendar(); }"}],Xi={initHandlebars(n){for(let e=0;e<ao.length;e++)if("string"==typeof ao[e].name&&"string"==typeof ao[e].function){let t=new Function("return "+ao[e].function)();Sa.registerHelper(ao[e].name,t)}if(null!=n)for(const e of n)if("string"==typeof e.name&&"string"==typeof e.function){let t=e.function;"string"==typeof t&&(t=new Function("return "+t)()),Sa.registerHelper(e.name,t)}},defaultHelpers:()=>ao,checkRegistedHelpers(n){if(!n)return;let e=!0;for(let t=0;t<n.length;t++)if("string"==typeof n[t].name&&"string"==typeof n[t].function&&!(n[t].name in Sa.helpers)){e=!1;break}e||Xi.initHandlebars(n)},processHandlebarsV2(n,e,t,i,r,s){var o,a;if(null==n||void 0===n)return"";if(("string"==typeof n||n instanceof String)&&n.indexOf("{{")<0)return n;let l;Xi.checkRegistedHelpers(i),l="string"==typeof n?n:JSON.stringify(n),t||(t={});const c=["document","doc","account","tpl","componentDefinition","results","resultsCount","resultsIndex","result","row"];if(e)if(Object(e)===e)for(const p in e)if("queryResultDocument"===p){t.row=e[p],t.result=e[p];for(const b in e[p])if(e[p].hasOwnProperty(b)){if(c.indexOf(b)>-1){console.log("Handlebars Context Error: the field "+b+" is already present in document documentId so could not be set. It's values will NOT be available to handlebars expressions. Please advise your Application Developer to not use this field name if possible");continue}t[b]=e[p][b]}}else{if(t.hasOwnProperty(p)){console.log("error : handlebarsString = "+n+"\n\t data = "+JSON.stringify(e)+"\n\t handlebarsContext = "+JSON.stringify(t)+"\n\t helpers = "+JSON.stringify(i));continue}t[p]=e[p]}else console.log("Handlebars Context Error: object "+e+" wasn't passed in and the parameters is being ignored");let u=null;try{let p;if((null==s?void 0:s.handlebarsTemplateName)&&r){const b=`${null===(o=null==r?void 0:r.tpl)||void 0===o?void 0:o.documentId}_${null===(a=null==r?void 0:r.tplItem)||void 0===a?void 0:a.name}_${s.handlebarsTemplateName}`;bf[b]?p=bf[b]:(p=Sa.compile(l),bf[b]=p)}else p=Sa.compile(l);u=p(t)}catch(p){throw p.hStr=l,p}return u},processHandlebars(n,e,t,i,r,s){let o=null;try{r&&(t||(t={}),t.document=r.doc,t.doc=r.doc,t.account=r.account,t.tpl=r.tpl,t.tplItem=r.tplItem),o=Xi.processHandlebarsV2(n,e,t,i,r,s)}catch(a){console.error(a)}return o},processIntHandlebars(n,e,t,i,r,s){const o=Xi.processHandlebars(n,e,t,i,r,s);return o?parseInt(o,0):0},processFloatHandlebars(n,e,t,i,r,s){const o=Xi.processHandlebars(n,e,t,i,r,s);return o?parseFloat(o):0},processBooleanHandlebars:(n,e,t,i,r,s)=>"true"===Xi.processHandlebars(n,e,t,i,r,s),processArrayHandlebars(n,e,t,i,r,s){let o=Xi.processHandlebars(n,e,t,i,r,s);if(!o)return null;try{let a=[];if("string"==typeof o&&o.indexOf(",")>-1){o.indexOf("[")>-1&&(o=o.replace("[","")),o.indexOf("]")>-1&&(o=o.replace("]",""));const l=o.split(",");2==(null==l?void 0:l.length)&&!isNaN(Number(l[0].trim()))&&!isNaN(parseFloat(l[0].trim()))&&!isNaN(Number(l[1].trim()))&&!isNaN(parseFloat(l[1].trim()))&&(a=[parseFloat(l[0].trim()),parseFloat(l[1].trim())])}else{const l=JSON.parse(o);for(const c in l)l.hasOwnProperty(c)&&a.push(l[c])}return a}catch(a){return null}}};let xn=(()=>{class n{constructor(){if(this.injector=window.FormbirdServiceInjector,!this.injector){const t=document.querySelectorAll("#bodyAngularJS div[ui-view]");this.injector=angular.element(t).injector()}}get(t){return this.injector.get(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),B1=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.searchService=t.get("SearchService")}search(t,i){return this.searchService.search(t,i)}generatePit(){return this.searchService.generatePit()}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),U1=(()=>{class n{constructor(){}clientConfig(){return window.ftClientConfig}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),H1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("ModifiedFieldService")}resetFormDirty(){this.ajsService.resetFormDirty()}isDirty(){return this.ajsService.isDirty()}addModifiedField(t,i,r,s,o){return this.ajsService.addModifiedField(t,i,r,s,o)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),$1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("UnsavedDocumentService")}setDocument(t,i){return this.ajsService.setDocument(t,i)}setTemplate(t,i,r){return this.ajsService.setTemplate(t,i,r)}removeDocumentList(t){return this.ajsService.removeDocumentList(t)}createUnsavedDocumentList(t,i){return this.ajsService.createUnsavedDocumentList(t,i)}updateDocumentListInfo(t,i){this.ajsService.updateDocumentListInfo(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),G1=(()=>{class n{constructor(t){this.injector=t,this.ajsClientRulesService=t.get("ClientRulesService")}getSharedValue(t){return this.ajsClientRulesService.getSharedValue(t)}setSharedValue(t,i){return this.ajsClientRulesService.setSharedValue(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),W1=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.ajsService=t.get("OfflineUtilService")}getNextId(){return this.ajsService.getNextId()}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),q1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("BroadcastService"),this.rebroadcastAngularJSEvents()}rebroadcastAngularJSEvents(){if("undefined"!=typeof angular){const t=document.querySelectorAll("div[ui-view]"),i=angular.element(t).injector();i&&i.get("$rootScope").$on("document:updated",(s,o)=>{this.broadcast("document:updated",o)})}}broadcast(t,i){this.ajsService?this.ajsService.broadcast(t,i):console.log("No BroadcastService provided.")}on(t){if(this.ajsService)return this.ajsService.on(t);console.log("No BroadcastService provided.")}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),z1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("NotificationService")}printMessage(t,i,r,s,o,a,l,c,u){return this.ajsService.printMessage(t,i,r,s,o,a,l,c,u)}success(t,i,r){return this.ajsService.success(t,i,r)}error(t,i,r){return this.ajsService.error(t,i,r)}warning(t,i,r){return this.ajsService.warning(t,i,r)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),K1=(()=>{class n{constructor(){if(window.angular){const t=document.querySelectorAll("div[ui-view]"),i=angular.element(t).injector();this.ajsService=i.get("$location")}}go(t){return this.ajsService.path(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Y1=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.ajsService=t.get("ModalService")}showDialog(t,i,r,s,o){this.ajsService.showDialog(t,i,r,s,o)}openDialog(t){this.ajsService.openDialog(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),X1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("DocumentListService")}setupDocumentListId(){return this.ajsService.setupDocumentListId()}save(){return this.ajsService.save()}clearDocuments(t){this.ajsService.clearDocuments(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Q1=(()=>{class n{constructor(t){this.injector=t,this.validationCtrlValues={},this.ajsService=t.get("ValidationService"),this.validationCtrlValues=this.ajsService.validationCtrlValues}loadValidators(t,i){return this.ajsService.loadValidators(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Z1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("WebSocketService")}emit(t,i){return this.ajsService.emit(t,i)}addEventListener(t,i){return this.ajsService.addEventListener(t,i)}removeEventListener(t){return this.ajsService.removeEventListener(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Cf=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("ChangedDocumentService")}watch(t,i,r,s){return this.ajsService.watch(t,i,r,s)}valueChanged(t,i,r,s){this.ajsService.valueChanged(t,i,r,s)}dispatchChanged(t){this.ajsService.dispatchChanged(t)}executeOnFieldChangeWithNoChanges(t){this.ajsService.executeOnFieldChangeWithNoChanges(t)}watchDocument(t){return this.ajsService.watchDocument(t)}watchStoreChanges(){return this.ajsService.watchStoreChanges()}dispatchAction(t){this.ajsService.dispatchAction(t)}watchComponentTemplate(t){return this.ajsService.watchComponentTemplate(t)}watchComponentDef(t,i){return this.ajsService.watchComponentDef(t,i)}notifyIntializedField(t,i){return this.ajsService.notifyIntializedField(t,i)}notifyDocumentChanged(t){return this.ajsService.notifyDocumentChanged(t)}notifyComponentDefinitionUpdated(t,i,r,s){return this.ajsService.notifyComponentDefinitionUpdated(t,i,r,s)}setOrgDocument(t){return this.ajsService.setOrgDocument(t)}setDocumentInfo(t,i){return this.ajsService.setDocumentInfo(t,i)}setDocument(t){return this.ajsService.setDocument(t)}setComponentFlagTemplate(t,i,r,s){return this.ajsService.setComponentFlagTemplate(t,i,r,s)}isLoadedDocument(t,i){return this.ajsService.isLoadedDocument(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),J1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("FinaliseValueFieldService")}addFinaliseValueFunction(t,i,r){this.ajsService.addFinaliseValueFunction(t,i,r)}getFinaliseValueFunction(t,i){return this.ajsService.getFinaliseValueFunction(t,i)}finaliseFieldValues(t,i){this.ajsService.finaliseFieldValues(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ek=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.offlineStatusService=t.get("OfflineStatusService"),this.offlineStatus$=this.offlineStatusService.offlineStatus$,this.offlineStatus=this.offlineStatusService.offlineStatus,this.pageDownloadProgress=this.offlineStatusService.pageDownloadProgress}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),tk=(()=>{class n{constructor(t){this.injector=t,this.service=t.get("RouterService")}getActivatedRouteSnapshot(){return this.service.getActivatedRouteSnapshot()}navigate(t){return this.service.navigate(t)}navigateByUrl(t,i){return this.service.navigateByUrl(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Xb=(()=>{class n{constructor(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[U1,q1,G1,H1,W1,ek,B1,$1,z1,Y1,K1,X1,Q1,Z1,Cf,J1,tk],imports:[[]]}),n})();const Ni=new ct("NgValueAccessor");function Tr(n){return null==n||0===n.length}function e0(n){return null!=n&&"number"==typeof n.length}const ok=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ak{static min(e){return function t0(n){return e=>{if(Tr(e.value)||Tr(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t<n?{min:{min:n,actual:e.value}}:null}}(e)}static max(e){return function n0(n){return e=>{if(Tr(e.value)||Tr(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}(e)}static required(e){return function r0(n){return Tr(n.value)?{required:!0}:null}(e)}static requiredTrue(e){return function s0(n){return!0===n.value?null:{required:!0}}(e)}static email(e){return function o0(n){return Tr(n.value)||ok.test(n.value)?null:{email:!0}}(e)}static minLength(e){return function a0(n){return e=>Tr(e.value)||!e0(e.value)?null:e.value.length<n?{minlength:{requiredLength:n,actualLength:e.value.length}}:null}(e)}static maxLength(e){return function l0(n){return e=>e0(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}(e)}static pattern(e){return function c0(n){if(!n)return Ta;let e,t;return"string"==typeof n?(t="","^"!==n.charAt(0)&&(t+="^"),t+=n,"$"!==n.charAt(n.length-1)&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(Tr(i.value))return null;const r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(e)}static nullValidator(e){return null}static compose(e){return g0(e)}static composeAsync(e){return m0(e)}}function Ta(n){return null}function u0(n){return null!=n}function d0(n){const e=Rl(n)?(0,k.from)(n):n;return Bd(e),e}function h0(n){let e={};return n.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function f0(n,e){return e.map(t=>t(n))}function p0(n){return n.map(e=>function lk(n){return!n.validate}(e)?e:t=>e.validate(t))}function g0(n){if(!n)return null;const e=n.filter(u0);return 0==e.length?null:function(t){return h0(f0(t,e))}}function m0(n){if(!n)return null;const e=n.filter(u0);return 0==e.length?null:function(t){const i=f0(t,e).map(d0);return(0,k.forkJoin)(i).pipe((0,j.map)(h0))}}function Tf(n){return n?Array.isArray(n)?n:[n]:[]}function Ac(n,e){return Array.isArray(n)?n.includes(e):n===e}function E0(n,e){const t=Tf(e);return Tf(n).forEach(r=>{Ac(t,r)||t.push(r)}),t}function b0(n,e){return Tf(e).filter(t=>!Ac(n,t))}function Rc(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const Ma="VALID",Fc="INVALID",lo="PENDING",Ia="DISABLED";function Pf(n){return(Nf(n)?n.validators:n)||null}function w0(n){return Array.isArray(n)?function Af(n){return null!=n?g0(p0(n)):null}(n):n||null}function xf(n,e){return(Nf(e)?e.asyncValidators:n)||null}function M0(n){return Array.isArray(n)?function Sf(n){return null!=n?m0(p0(n)):null}(n):n||null}function Nf(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}class Of{constructor(e,t){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=w0(this._rawValidators),this._composedAsyncValidatorFn=M0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Ma}get invalid(){return this.status===Fc}get pending(){return this.status==lo}get disabled(){return this.status===Ia}get enabled(){return this.status!==Ia}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=w0(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=M0(e)}addValidators(e){this.setValidators(E0(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(E0(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(b0(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(b0(e,this._rawAsyncValidators))}hasValidator(e){return Ac(this._rawValidators,e)}hasAsyncValidator(e){return Ac(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=lo,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ia,this.errors=null,this._forEachChild(i=>{i.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ma,this._forEachChild(i=>{i.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ma||this.status===lo)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ia:Ma}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=lo,this._hasOwnPendingAsyncValidator=!0;const t=d0(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function bk(n,e,t){if(null==e||(Array.isArray(e)||(e=e.split(t)),Array.isArray(e)&&0===e.length))return null;let i=n;return e.forEach(r=>{i=i instanceof Pc?i.controls.hasOwnProperty(r)?i.controls[r]:null:i instanceof Ck&&i.at(r)||null}),i}(this,e,".")}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new dn,this.statusChanges=new dn}_calculateStatus(){return this._allControlsDisabled()?Ia:this.errors?Fc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(lo)?lo:this._anyControlsHaveStatus(Fc)?Fc:Ma}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Nf(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class co extends Of{constructor(e=null,t,i){super(Pf(t),xf(i,t)),this._onChange=[],this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=null,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Rc(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Rc(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class Pc extends Of{constructor(e,t,i){super(Pf(t),xf(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){this._checkAllValuesPresent(e),Object.keys(e).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t instanceof co?t.value:t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error(`Cannot find form control with name: ${e}.`)}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const i=this.controls[t];if(this.contains(t)&&e(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,i)=>((t.enabled||this.disabled)&&(e[i]=t.value),e))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,s)=>{i=t(i,r,s)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(e){this._forEachChild((t,i)=>{if(void 0===e[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class Ck extends Of{constructor(e,t,i){super(Pf(t),xf(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){this._checkAllValuesPresent(e),e.forEach((i,r)=>{this._throwIfControlMissing(r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e instanceof co?e.value:e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error(`Cannot find form control at index ${e}`)}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_checkAllValuesPresent(e){this._forEachChild((t,i)=>{if(void 0===e[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}let N0=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({}),n})();const Lf=new ct("NgModelWithFormControlWarning");let Q0=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[[N0]]}),n})(),Xk=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[Q0]}),n})(),Qk=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Lf,useValue:t.warnOnNgModelWithFormControl}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[Q0]}),n})();const Mt="api/",Ue={appHome:"/",appLogin:"/",appForgotPass:"forgotpass",appForgotPassAction:"auth/forgotpass",appResetPass:"resetpass",appResetpassAction:"auth/resetpass",appActivateAccount:"activateAccount",appActivateAccountAction:"auth/activateAccount",appDefault:"default",logout:"auth/logout",logoutAllDevices:"auth/logoutAllDevices",login:"auth/login/local",loginSaml:"auth/login/saml",loginGoogle:"auth/login/google",loginGoogleCallback:"auth/login/google/callback",loginFacebook:"auth/login/facebook",loginFacebookCallback:"auth/login/facebook/callback",loggedUser:"api/loggedUser",loggedUserData:"api/loggedUserData"};Ue.loggedUserAccountControlDocument=Ue.loggedUser+"/accountControlDocument",Ue.loggedUserAccountGroupConfigDocument=Ue.loggedUser+"/accountGroupConfigDocument",Ue.testPassword="password/test",Ue.publicLogin="/auth/login/public",Ue.uploadFiles=Mt+"uploadFiles",Ue.deleteFile=Mt+"deleteFile",Ue.loadFile=Mt+"getFile",Ue.getFile=Mt+"getFile/:fileNo",Ue.getFileWithName=Mt+"getFile/:fileNo/:fileName",Ue.packageImport=Mt+"uploadPackage",Ue.packageExport=Mt+"packageExport/:id",Ue.packageCleanUp=Mt+"packageCleanUp/:type/:id",Ue.document=Mt+"document",Ue.documentWithUser=Mt+"document/:userId",Ue.documentWithUserBase=Mt+"documentWithUser",Ue.templateAndDocument=Mt+"templateAndDocument",Ue.templateAndDocumentId=Ue.templateAndDocument+"/:id",Ue.templateAndDocumentWithTemplateId=Ue.templateAndDocument+"/:id/:templateId",Ue.documentDeepDiffUpdate=Ue.document+"/deepDiffUpdate",Ue.documentDeepDiffUpdateSingle=Ue.documentDeepDiffUpdate+"/:id",Ue.documentExists=Ue.document+"/exists",Ue.documentExistsFull=Ue.documentExists+"/:id",Ue.documentExistsIncludeDeleted=Ue.documentExists+"/:id/:includeDeleted",Ue.documentSingle=Ue.document+"/:id",Ue.documentSingleWithUser=Ue.documentWithUserBase+"/:id/:userId",Ue.documentDestroy=Ue.document+"/:id",Ue.documentDestroyWithTemplateIdAndPreviousVersionId=Ue.document+"/:id/:templateId/:previousVersionId",Ue.documentSingleOverrideTpl=Ue.documentDeepDiffUpdate+"/:id/:template",Ue.documentDeepDiffUpdateWithUser=Ue.document+"/deepDiffUpdateWithUser",Ue.documentDeepDiffUpdateSingleWithUser=Ue.documentDeepDiffUpdateWithUser+"/:id/:userId",Ue.syncDocuments=Mt+"syncDocuments",Ue.syncRecordsByServerUpdatedDateWithPagination=Ue.syncDocuments+"/:startTime/:pageNumber",Ue.syncDocumentsCountURL=Mt+"syncDocumentsCount",Ue.syncDocumentsCountByDateRoute=Ue.syncDocumentsCountURL+"/:startTime",Ue.undeleteDocument=Mt+"undelete/:id",Ue.bulkUploadDocuments=Mt+"bulkUploadDocuments",Ue.documentAudit=Mt+"documentAudit",Ue.indexHtml="/index.html",Ue.documentSearch=Mt+"documentSearch",Ue.documentFind=Mt+"documentFind/:query",Ue.documentsBaseUrl=Mt+"documents",Ue.documentsUrl=Ue.documentsBaseUrl+"/:query",Ue.documentFetch=Mt+"documentFetch",Ue.versionFetch=Mt+"versionFetch",Ue.loadDocsForRulesBaseUrl=Mt+"documents/loadDocsForRules",Ue.loadDocsForRulesUrl=Ue.loadDocsForRulesBaseUrl+"/:userId",Ue.loadIncludeDocs=Mt+"loadIncludeDocs",Ue.template=Mt+"template",Ue.templateSingle=Ue.template+"/:id",Ue.sessionTest=Mt+"sessionTest",Ue.serverTime=Mt+"time/current",Ue.executeFunction=Mt+"execute",Ue.loadComponentDoc=Mt+"loadComponentDoc/:componentName",Ue.loadVendorLibrary=Mt+"loadVendorLibrary/:name",Ue.loadVendorLibraries=Mt+"loadVendorLibraries",Ue.loadClientConfig="clientConfig",Ue.clientResources=Mt+"clientResources",_,rfc6902,console,console,async;const eC=uuid;class tC{static generateId(){const e="undefined"!=typeof window?window.crypto:void 0;if(void 0!==e&&e.randomUUID)return e.randomUUID();{const t=eC.v4(),i=Math.random().toString();return eC.v5(i,t)}}static isValid(e){return e&&36===e.length}}const ot={ACCEPTED:202,BAD_GATEWAY:502,BAD_REQUEST:400,CONFLICT:409,CONTINUE:100,CREATED:201,EXPECTATION_FAILED:417,FORBIDDEN:403,GATEWAY_TIMEOUT:504,GONE:410,HTTP_VERSION_NOT_SUPPORTED:505,INSUFFICIENT_SPACE_ON_RESOURCE:419,INSUFFICIENT_STORAGE:507,INTERNAL_SERVER_ERROR:500,LENGTH_REQUIRED:411,LOCKED:423,METHOD_FAILURE:420,METHOD_NOT_ALLOWED:405,MOVED_PERMANENTLY:301,MOVED_TEMPORARILY:302,MULTI_STATUS:207,MULTIPLE_CHOICES:300,NO_CONTENT:204,NON_AUTHORITATIVE_INFORMATION:203,NOT_ACCEPTABLE:406,NOT_FOUND:404,NOT_IMPLEMENTED:501,NOT_MODIFIED:304,OK:200,PARTIAL_CONTENT:206,PAYMENT_REQUIRED:402,PRECONDITION_FAILED:412,PROCESSING:102,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,REQUEST_TOO_LONG:413,REQUEST_URI_TOO_LONG:414,REQUESTED_RANGE_NOT_SATISFIABLE:416,RESET_CONTENT:205,SEE_OTHER:303,SERVICE_UNAVAILABLE:503,SWITCHING_PROTOCOLS:101,TEMPORARY_REDIRECT:307,UNAUTHORIZED:401,UNPROCESSABLE_ENTITY:422,UNSUPPORTED_MEDIA_TYPE:415,USE_PROXY:305,ELASTICSEARCH:306,SERVER_UNRESPONSIVE:0,EARLY_HINTS:103},rt={};rt[ot.ACCEPTED]="Accepted",rt[ot.BAD_GATEWAY]="Bad Gateway",rt[ot.BAD_REQUEST]="Bad Request",rt[ot.CONFLICT]="Conflict",rt[ot.CONTINUE]="Continue",rt[ot.CREATED]="Created",rt[ot.EXPECTATION_FAILED]="Expectation Failed",rt[ot.FORBIDDEN]="Forbidden",rt[ot.GATEWAY_TIMEOUT]="Gateway Timeout",rt[ot.GONE]="Gone",rt[ot.HTTP_VERSION_NOT_SUPPORTED]="HTTP Version Not Supported",rt[ot.INSUFFICIENT_SPACE_ON_RESOURCE]="Insufficient Space on Resource",rt[ot.INSUFFICIENT_STORAGE]="Insufficient Storage",rt[ot.INTERNAL_SERVER_ERROR]="Server Error",rt[ot.LENGTH_REQUIRED]="Length Required",rt[ot.LOCKED]="Locked",rt[ot.METHOD_FAILURE]="Method Failure",rt[ot.METHOD_NOT_ALLOWED]="Method Not Allowed",rt[ot.MOVED_PERMANENTLY]="Moved Permanently",rt[ot.MOVED_TEMPORARILY]="Moved Temporarily",rt[ot.MULTI_STATUS]="Multi-Status",rt[ot.MULTIPLE_CHOICES]="Multiple Choices",rt[ot.NO_CONTENT]="No Content",rt[ot.NON_AUTHORITATIVE_INFORMATION]="Non Authoritative Information",rt[ot.NOT_ACCEPTABLE]="Not Acceptable",rt[ot.NOT_FOUND]="Not Found",rt[ot.NOT_IMPLEMENTED]="Not Implemented",rt[ot.NOT_MODIFIED]="Not Modified",rt[ot.OK]="OK",rt[ot.PARTIAL_CONTENT]="Partial Content",rt[ot.PAYMENT_REQUIRED]="Payment Required",rt[ot.PRECONDITION_FAILED]="Precondition Failed",rt[ot.PROCESSING]="Processing",rt[ot.PROXY_AUTHENTICATION_REQUIRED]="Proxy Authentication Required",rt[ot.REQUEST_TIMEOUT]="Request Timeout",rt[ot.REQUEST_TOO_LONG]="Request Entity Too Large",rt[ot.REQUEST_URI_TOO_LONG]="Request-URI Too Long",rt[ot.REQUESTED_RANGE_NOT_SATISFIABLE]="Requested Range Not Satisfiable",rt[ot.RESET_CONTENT]="Reset Content",rt[ot.SEE_OTHER]="See Other",rt[ot.SERVICE_UNAVAILABLE]="Service Unavailable",rt[ot.SWITCHING_PROTOCOLS]="Switching Protocols",rt[ot.TEMPORARY_REDIRECT]="Temporary Redirect",rt[ot.UNAUTHORIZED]="Unauthorized",rt[ot.UNPROCESSABLE_ENTITY]="Unprocessable Entity",rt[ot.UNSUPPORTED_MEDIA_TYPE]="Unsupported Media Type",rt[ot.USE_PROXY]="Use Proxy",rt[ot.ELASTICSEARCH]="Error - search is not running. Please contact a system administrator to configure it",rt[ot.SERVER_UNRESPONSIVE]="Aborted/Timed out request: Server is down or client not connected.",rt[ot.EARLY_HINTS]="Early Hints",ot.getStatusText=function uL(n){if(rt.hasOwnProperty(n))return rt[n];throw new Error("Status code does not exist: "+n)};let Yf=(()=>{class n{constructor(){this.formGroups={}}setupStandardProperties(t){const i=t.componentDefinition;i&&(t.disabled=!1===i.enabled),t.elementName=t.fieldName,t.registeredControlName=t.fieldName+t.key+tC.generateId()}setupStandardComponent(t,i){this.setupStandardProperties(t);const s=this.ensureFormGroupExisted(t.document.documentId),o=t.componentDefinition;this.setupDefaultValidator(o,i);const a=new co({value:t.fieldValue,disabled:this.isComponentDisabled(o)},i);return s.registerControl(t.registeredControlName,a)}setupControl(t,i,r,s){const o=this.ensureFormGroupExisted(t.document.documentId),a=new co(r,s),l=i+t.key+tC.generateId();return o.registerControl(l,a)}enableField(t,i){i&&(!1===t.enabled?i.disable({emitEvent:!1}):i.enable({emitEvent:!1}))}enableFieldByFlag(t,i){i&&(!1===t?i.disable({emitEvent:!1}):i.enable({emitEvent:!1}))}setupDefaultValidator(t,i){i=i||[],t.mandatory&&i.push(ak.required)}isComponentDisabled(t){return!1===t.enabled}ensureFormGroupExisted(t){return this.formGroups[t]||(this.formGroups[t]=new Pc({})),this.formGroups[t]}getControl(t,i){return this.formGroups[t]?this.formGroups[t].get(i):null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class yL{isErrorState(e,t){return!!(e&&e.invalid&&(e.dirty||e.touched||t&&t.submitted))}}let vL=(()=>{class n{constructor(t,i,r,s){this.formbirdInjectorService=t,this.changedDocumentService=i,this.componentSetupService=r,this.cdr=s,this.shouldNotifyCompInitializedInSuper=!0,this.shouldDispatchEmptyFieldValue=!0,this.subs=new k.Subscription,this.matcher=new yL,this.broadcastService=t.get("BroadcastService")}ngOnInit(){this.setupComponent(),this.initializeFieldValue(),this.setupChangeDetection(),this.shouldNotifyCompInitializedInSuper&&this.notifyComponentIntialized()}ngOnDestroy(){this.subs.unsubscribe()}setupComponent(){this.formControl=this.componentSetupService.setupStandardComponent(this,this.validators),this.setFieldActivation(!1)}setupChangeDetection(t){if(this.fieldName){const r=this.changedDocumentService.watch(this.fieldName,this.document.documentId,this.registeredControlName).subscribe(s=>{this.onFieldValueChanged(s)});this.subs.add(r)}const i=this.changedDocumentService.watchComponentDef(this.fieldName,this.template.documentId).subscribe(r=>{this.onComponentDefChanged(r)});if(this.subs.add(i),this.formControl){let r;r=t?this.formControl.valueChanges.subscribe(s=>{this.onControlValueChanged(s)}):this.formControl.valueChanges.pipe((0,j.debounceTime)(500)).subscribe(s=>{this.onControlValueChanged(s)}),this.subs.add(r)}this.setupDocumentCreatedDetection()}setFieldActivation(t){this.componentSetupService.enableField(this.componentDefinition,this.formControl),this.detectChanges(t)}valueChanged(t){this.fieldValue=t,this.changedDocumentService.valueChanged(this,t,this.registeredControlName)}dispatchChanged(t){this.changedDocumentService.notifyDocumentChanged({documentId:this.document.documentId,fieldName:this.fieldName,newValue:this.fieldValue,isInitValue:t})}detectChanges(t){!1!==t&&!this.cdr.destroyed&&this.cdr.detectChanges()}updateComponentDefChange(t){this.componentDefinition=t}onControlValueChanged(t){this.valueChanged(t)}onComponentDefChanged(t){console.log("Change detection on template: ",t.name),this.updateComponentDefChange(t);const i=!1===t.enabled;this.disabled!==i?(this.disabled=i,this.setFieldActivation()):this.detectChanges()}isEqualFieldValue(t){return this.fieldValue===t}onFieldValueChanged(t,i=!0){this.isEqualFieldValue(t)||(console.log(`On field value changed for component: ${this.registeredControlName} - has label: ${this.componentDefinition.label}`),this.fieldValue=t,this.formControl&&this.formControl.patchValue(this.fieldValue,{emitEvent:!1,onlySelf:!0}),i&&this.detectChanges())}setupDocumentCreatedDetection(){const t=this.broadcastService.on("document:new").subscribe(i=>{this.onDocumentCreated(i),this.detectChanges()});this.subs.add(t)}onDocumentCreated(t){const i=null==t?void 0:t.document;if(i){const s=i.documentId;(null==t?void 0:t.unsavedDocumentListId)===this.formParameters.unsavedDocumentListId&&this.document.documentId===s&&(this.fieldValue=i[this.fieldName],this.initializeFieldValue(),this.notifyComponentIntialized())}}initializeFieldValue(){}notifyComponentIntialized(){this.changedDocumentService.notifyIntializedField(this,this.shouldDispatchEmptyFieldValue)}notifyComponentDefChanged(){}}return n.\u0275fac=function(t){return new(t||n)(He(xn),He(Cf),He(Yf),He(oa))},n.\u0275cmp=tt({type:n,selectors:[["ng-component"]],inputs:{document:"document",fieldValue:"fieldValue",template:"template",fieldName:"fieldName",formParameters:"formParameters",key:"key",responsiveLayouts:"responsiveLayouts",message:"message",componentDefinition:"componentDefinition"},decls:0,vars:0,template:function(t,i){},encapsulation:2}),n})();var Nc=_e(915);class EL{getFiles(e,t,i,r){switch(i.fieldType){case"fileReference":this.scUploader(e,t,i,r);break;case"url":this.urlField(e,t,i,r,null,null);break;default:return!1}}scUploader(e,t,i,r){const s=i.fieldName.replace("document.",""),o=t[s];o&&(o.forEach((a,l)=>{var c,u;const p={};p.fileNo=a.fileNo,p.external=!1,p.mime="",p.path="api/getFile/"+a.fileNo,p.resultIndex=l,p.title=e.processHandlebars(i.title,t,a),p.title||(p.title=null!==(u=null===(c=a.systemHeader)||void 0===c?void 0:c.summaryName)&&void 0!==u?u:"File "+a.fileNo),p.documentId=o.documentId,e.files.push(p),e.getFile(p.path,e.files.length-1,r)}),e.cdr.detectChanges())}urlField(e,t,i,r,s,o){const l={};l.fileNo=i.fieldName+"___"+t.documentId,l.mime="",l.external=!0,l.path=t.imageUrl,l.title=e.processHandlebars(i.title,{}),l.title||(l.title=t.imageUrl),e.files.push(l),e.getFile(l.path,e.files.length-1,r),e.cdr.detectChanges()}}let iC=(()=>{class n{constructor(){if(this.injector=window.FormbirdServiceInjector,!this.injector){const t=document.querySelectorAll("#bodyAngularJS div[ui-view]");this.injector=angular.element(t).injector()}}get(t){return this.injector.get(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bL=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.searchService=t.get("SearchService")}search(t,i){return this.searchService.search(t,i)}generatePit(){return this.searchService.generatePit()}}return n.\u0275fac=function(t){return new(t||n)(ze(iC))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const CL=new ct("cdk-dir-doc",{providedIn:"root",factory:function DL(){return Ig(Qt)}});let AL=(()=>{class n{constructor(t){if(this.value="ltr",this.change=new dn,t){const r=t.documentElement?t.documentElement.dir:null,s=(t.body?t.body.dir:null)||r;this.value="ltr"===s||"rtl"===s?s:"ltr"}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(t){return new(t||n)(ze(CL,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),rC=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({}),n})();const sC=new Cr("13.0.1");let Xf;try{Xf="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){Xf=!1}let Na,Zf,Qf=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function VO(n){return n===xb}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Xf)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(ze(ql))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Oc(n){return function SL(){if(null==Na&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Na=!0}))}finally{Na=Na||!1}return Na}()?n:!!n.capture}function Oa(n){return n.composedPath?n.composedPath()[0]:n.target}function Lc(n){return null!=n&&"false"!=`${n}`}function ho(n,e=0){return function $L(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):e}function Jf(n){return n instanceof Cn?n.nativeElement:n}const JL=new ct("cdk-input-modality-detector-options"),eV={ignoreKeys:[18,17,224,91,16]},fo=Oc({passive:!0,capture:!0});let tV=(()=>{class n{constructor(t,i,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new k.BehaviorSubject(null),this._lastTouchMs=0,this._onKeydown=o=>{var a,l;(null===(l=null===(a=this._options)||void 0===a?void 0:a.ignoreKeys)||void 0===l?void 0:l.some(c=>c===o.keyCode))||(this._modality.next("keyboard"),this._mostRecentTarget=Oa(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(function QL(n){return 0===n.offsetX&&0===n.offsetY}(o)?"keyboard":"mouse"),this._mostRecentTarget=Oa(o))},this._onTouchstart=o=>{!function ZL(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(o)?(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Oa(o)):this._modality.next("keyboard")},this._options=Object.assign(Object.assign({},eV),s),this.modalityDetected=this._modality.pipe((0,j.skip)(1)),this.modalityChanged=this.modalityDetected.pipe((0,j.distinctUntilChanged)()),t.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,fo),r.addEventListener("mousedown",this._onMousedown,fo),r.addEventListener("touchstart",this._onTouchstart,fo)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,fo),document.removeEventListener("mousedown",this._onMousedown,fo),document.removeEventListener("touchstart",this._onTouchstart,fo))}}return n.\u0275fac=function(t){return new(t||n)(ze(Qf),ze(Yt),ze(Qt),ze(JL,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const iV=new ct("cdk-focus-monitor-default-options"),Vc=Oc({passive:!0,capture:!0});let rV=(()=>{class n{constructor(t,i,r,s,o){this._ngZone=t,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new k.Subject,this._rootNodeFocusAndBlurListener=a=>{const l=Oa(a),c="focus"===a.type?this._onFocus:this._onBlur;for(let u=l;u;u=u.parentElement)c.call(this,a,u)},this._document=s,this._detectionMode=(null==o?void 0:o.detectionMode)||0}monitor(t,i=!1){const r=Jf(t);if(!this._platform.isBrowser||1!==r.nodeType)return(0,k.of)(null);const s=function wL(n){if(function TL(){if(null==Zf){const n="undefined"!=typeof document?document.head:null;Zf=!(!n||!n.createShadowRoot&&!n.attachShadow)}return Zf}()){const e=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new k.Subject,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){const i=Jf(t),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(t,i,r){const s=Jf(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(t){return 1===this._detectionMode||!!(null==t?void 0:t.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(t,i){t.classList.toggle("cdk-focused",!!i),t.classList.toggle("cdk-touch-focused","touch"===i),t.classList.toggle("cdk-keyboard-focused","keyboard"===i),t.classList.toggle("cdk-mouse-focused","mouse"===i),t.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(t,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,i){const r=this._elementInfo.get(i),s=Oa(t);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(t,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&t.relatedTarget instanceof Node&&i.contains(t.relatedTarget)||(this._setClasses(i),this._emitOrigin(r.subject,null))}_emitOrigin(t,i){this._ngZone.run(()=>t.next(i))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const i=t.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Vc),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Vc)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,j.takeUntil)(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const i=t.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Vc),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Vc),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,i,r){this._setClasses(t,i),this._emitOrigin(r.subject,i),this._lastFocusOrigin=i}_getClosestElementsInfo(t){const i=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&i.push([s,r])}),i}}return n.\u0275fac=function(t){return new(t||n)(ze(Yt),ze(Qf),ze(tV),ze(Qt,8),ze(iV,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const dC="cdk-high-contrast-black-on-white",hC="cdk-high-contrast-white-on-black",ep="cdk-high-contrast-active";let sV=(()=>{class n{constructor(t,i){this._platform=t,this._document=i}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(ep),t.remove(dC),t.remove(hC),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?(t.add(ep),t.add(dC)):2===i&&(t.add(ep),t.add(hC))}}}return n.\u0275fac=function(t){return new(t||n)(ze(Qf),ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const fC=new Cr("13.0.1"),aV=new ct("mat-sanity-checks",{providedIn:"root",factory:function oV(){return!0}});let pC=(()=>{class n{constructor(t,i,r){this._hasDoneGlobalChecks=!1,this._document=r,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=i,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!(!Dh()||function ML(){return"undefined"!=typeof __karma__&&!!__karma__||"undefined"!=typeof jasmine&&!!jasmine||"undefined"!=typeof jest&&!!jest||"undefined"!=typeof Mocha&&!!Mocha}())&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}_checkDoctypeIsDefined(){this._checkIsEnabled("doctype")&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checkIsEnabled("theme")||!this._document.body||"function"!=typeof getComputedStyle)return;const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const i=getComputedStyle(t);i&&"none"!==i.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),t.remove()}_checkCdkVersionMatch(){this._checkIsEnabled("version")&&fC.full!==sC.full&&console.warn("The Angular Material version ("+fC.full+") does not match the Angular CDK version ("+sC.full+").\nPlease ensure the versions of these two packages exactly match.")}}return n.\u0275fac=function(t){return new(t||n)(ze(sV),ze(aV,8),ze(Qt))},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[[rC],rC]}),n})();function lV(n){return class extends n{constructor(...e){super(...e),this._disabled=!1}get disabled(){return this._disabled}set disabled(e){this._disabled=Lc(e)}}}function cV(n,e){return class extends n{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const i=t||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}}}function uV(n,e=0){return class extends n{constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?ho(t):this.defaultTabIndex}}}class yC{}const dr="*";function vC(n,e=null){return{type:2,steps:n,options:e}}function EC(n){return{type:6,styles:n,offset:null}}function bC(n){Promise.resolve(null).then(n)}class po{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){bC(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class CC{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0;const s=this.players.length;0==s?bC(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}function DC(){return"undefined"!=typeof window&&void 0!==window.document}function ip(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Rr(n){switch(n.length){case 0:return new po;case 1:return n[0];default:return new CC(n)}}function AC(n,e,t,i,r={},s={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const p=u.offset,b=p==l,U=b&&c||{};Object.keys(u).forEach(z=>{let ae=z,re=u[z];if("offset"!==z)switch(ae=e.normalizePropertyName(ae,o),re){case"!":re=r[z];break;case dr:re=s[z];break;default:re=e.normalizeStyleValue(z,ae,re,o)}U[ae]=re}),b||a.push(U),c=U,l=p}),o.length){const u="\n - ";throw new Error(`Unable to animate due to the following errors:${u}${o.join(u)}`)}return a}function rp(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&sp(t,"start",n)));break;case"done":n.onDone(()=>i(t&&sp(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&sp(t,"destroy",n)))}}function sp(n,e,t){const i=t.totalTime,s=op(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,null==i?n.totalTime:i,!!t.disabled),o=n._data;return null!=o&&(s._data=o),s}function op(n,e,t,i,r="",s=0,o){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function ti(n,e,t){let i;return n instanceof Map?(i=n.get(e),i||n.set(e,i=t)):(i=n[e],i||(i=n[e]=t)),i}function SC(n){const e=n.indexOf(":");return[n.substring(1,e),n.substr(e+1)]}let ap=(n,e)=>!1,lp=(n,e)=>!1,TC=(n,e,t)=>[];const wC=ip();(wC||"undefined"!=typeof Element)&&(ap=DC()?(n,e)=>{for(;e&&e!==document.documentElement;){if(e===n)return!0;e=e.parentNode||e.host}return!1}:(n,e)=>n.contains(e),lp=(()=>{if(wC||Element.prototype.matches)return(n,e)=>n.matches(e);{const n=Element.prototype,e=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector;return e?(t,i)=>e.apply(t,[i]):lp}})(),TC=(n,e,t)=>{let i=[];if(t){const r=n.querySelectorAll(e);for(let s=0;s<r.length;s++)i.push(r[s])}else{const r=n.querySelector(e);r&&i.push(r)}return i});let is=null,MC=!1;function cp(n){is||(is=function yV(){return"undefined"!=typeof document?document.body:null}()||{},MC=!!is.style&&"WebkitAppearance"in is.style);let e=!0;return is.style&&!function _V(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in is.style,!e&&MC&&(e="Webkit"+n.charAt(0).toUpperCase()+n.substr(1)in is.style)),e}const up=lp,dp=ap,hp=TC;function IC(n){const e={};return Object.keys(n).forEach(t=>{const i=t.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=n[t]}),e}let RC=(()=>{class n{validateStyleProperty(t){return cp(t)}matchesElement(t,i){return up(t,i)}containsElement(t,i){return dp(t,i)}query(t,i,r){return hp(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,s,o,a=[],l){return new po(r,s)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),fp=(()=>{class n{}return n.NOOP=new RC,n})();const pp="ng-enter",jc="ng-leave",Bc="ng-trigger",Uc=".ng-trigger",PC="ng-animating",gp=".ng-animating";function rs(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:mp(parseFloat(e[1]),e[2])}function mp(n,e){return"s"===e?1e3*n:n}function Hc(n,e,t){return n.hasOwnProperty("duration")?n:function bV(n,e,t){let r,s=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(`The provided timing value "${n}" is invalid.`),{duration:0,delay:0,easing:""};r=mp(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=mp(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),a=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),a=!0),a&&e.splice(l,0,`The provided timing value "${n}" is invalid.`)}return{duration:r,delay:s,easing:o}}(n,e,t)}function go(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function Fr(n,e,t={}){if(e)for(let i in n)t[i]=n[i];else go(n,t);return t}function NC(n,e,t){return t?e+":"+t+";":""}function OC(n){let e="";for(let t=0;t<n.style.length;t++){const i=n.style.item(t);e+=NC(0,i,n.style.getPropertyValue(i))}for(const t in n.style)n.style.hasOwnProperty(t)&&!t.startsWith("_")&&(e+=NC(0,AV(t),n.style[t]));n.setAttribute("style",e)}function Qi(n,e,t){n.style&&(Object.keys(e).forEach(i=>{const r=yp(i);t&&!t.hasOwnProperty(i)&&(t[i]=n.style[r]),n.style[r]=e[i]}),ip()&&OC(n))}function ss(n,e){n.style&&(Object.keys(e).forEach(t=>{const i=yp(t);n.style[i]=""}),ip()&&OC(n))}function La(n){return Array.isArray(n)?1==n.length?n[0]:vC(n):n}const _p=new RegExp("{{\\s*(.+?)\\s*}}","g");function kC(n){let e=[];if("string"==typeof n){let t;for(;t=_p.exec(n);)e.push(t[1]);_p.lastIndex=0}return e}function $c(n,e,t){const i=n.toString(),r=i.replace(_p,(s,o)=>{let a=e[o];return e.hasOwnProperty(o)||(t.push(`Please provide a value for the animation param ${o}`),a=""),a.toString()});return r==i?n:r}function Gc(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const DV=/-+([a-z0-9])/g;function yp(n){return n.replace(DV,(...e)=>e[1].toUpperCase())}function AV(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function LC(n,e){return 0===n||0===e}function VC(n,e,t){const i=Object.keys(t);if(i.length&&e.length){let s=e[0],o=[];if(i.forEach(a=>{s.hasOwnProperty(a)||o.push(a),s[a]=t[a]}),o.length)for(var r=1;r<e.length;r++){let a=e[r];o.forEach(function(l){a[l]=vp(n,l)})}}return e}function ni(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function vp(n,e){return window.getComputedStyle(n)[e]}function SV(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function TV(n,e,t){if(":"==n[0]){const l=function wV(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(`The transition alias value "${n}" is not supported`),"* => *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(`The provided transition expression "${n}" is not supported`),e;const r=i[1],s=i[2],o=i[3];e.push(jC(r,o));"<"==s[0]&&!("*"==r&&"*"==o)&&e.push(jC(o,r))}(i,t,e)):t.push(n),t}const qc=new Set(["true","1"]),zc=new Set(["false","0"]);function jC(n,e){const t=qc.has(n)||zc.has(n),i=qc.has(e)||zc.has(e);return(r,s)=>{let o="*"==n||n==r,a="*"==e||e==s;return!o&&t&&"boolean"==typeof r&&(o=r?qc.has(n):zc.has(n)),!a&&i&&"boolean"==typeof s&&(a=s?qc.has(e):zc.has(e)),o&&a}}const MV=new RegExp("s*:selfs*,?","g");function Ep(n,e,t){return new IV(n).build(e,t)}class IV{constructor(e){this._driver=e}build(e,t){const i=new PV(t);return this._resetContextStyleTimingState(i),ni(this,La(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,s.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,o.push(l)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){const s=new Set,o=r||{};if(i.styles.forEach(a=>{if(Kc(a)){const l=a;Object.keys(l).forEach(c=>{kC(l[c]).forEach(u=>{o.hasOwnProperty(u)||s.add(u)})})}}),s.size){const a=Gc(s.values());t.errors.push(`state("${e.name}", ...) must define default values for all the following style substitutions: ${a.join(", ")}`)}}return{type:0,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=ni(this,La(e.animation),t);return{type:1,matchers:SV(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:os(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>ni(this,i,t)),options:os(e.options)}}visitGroup(e,t){const i=t.currentTime;let r=0;const s=e.steps.map(o=>{t.currentTime=i;const a=ni(this,o,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:s,options:os(e.options)}}visitAnimate(e,t){const i=function NV(n,e){let t=null;if(n.hasOwnProperty("duration"))t=n;else if("number"==typeof n)return bp(Hc(n,e).duration,0,"");const i=n;if(i.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=bp(0,0,"");return s.dynamic=!0,s.strValue=i,s}return t=t||Hc(i,e),bp(t.duration,t.delay,t.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let r,s=e.styles?e.styles:EC({});if(5==s.type)r=this.visitKeyframes(s,t);else{let o=e.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=EC(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[];Array.isArray(e.styles)?e.styles.forEach(o=>{"string"==typeof o?o==dr?i.push(o):t.errors.push(`The provided style string value ${o} is not allowed.`):i.push(o)}):i.push(e.styles);let r=!1,s=null;return i.forEach(o=>{if(Kc(o)){const a=o,l=a.easing;if(l&&(s=l,delete a.easing),!r)for(let c in a)if(a[c].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:i,easing:s,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;i&&s>0&&(s-=i.duration+i.delay),e.styles.forEach(o=>{"string"!=typeof o&&Object.keys(o).forEach(a=>{if(!this._driver.validateStyleProperty(a))return void t.errors.push(`The provided animation property "${a}" is not a supported CSS property for animations`);const l=t.collectedStyles[t.currentQuerySelector],c=l[a];let u=!0;c&&(s!=r&&s>=c.startTime&&r<=c.endTime&&(t.errors.push(`The CSS property "${a}" that exists between the times of "${c.startTime}ms" and "${c.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${r}ms"`),u=!1),s=c.startTime),u&&(l[a]={startTime:s,endTime:r}),t.options&&function CV(n,e,t){const i=e.params||{},r=kC(n);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||t.push(`Unable to resolve the local animation param ${s} in the given list of values`)})}(o[a],t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),i;let s=0;const o=[];let a=!1,l=!1,c=0;const u=e.steps.map(Me=>{const Ce=this._makeStyleAst(Me,t);let qe=null!=Ce.offset?Ce.offset:function xV(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(Kc(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(Kc(n)&&n.hasOwnProperty("offset")){const t=n;e=parseFloat(t.offset),delete t.offset}return e}(Ce.styles),Qe=0;return null!=qe&&(s++,Qe=Ce.offset=qe),l=l||Qe<0||Qe>1,a=a||Qe<c,c=Qe,o.push(Qe),Ce});l&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),a&&t.errors.push("Please ensure that all keyframe offsets are in order");const p=e.steps.length;let b=0;s>0&&s<p?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==s&&(b=1/(p-1));const U=p-1,z=t.currentTime,ae=t.currentAnimateTimings,re=ae.duration;return u.forEach((Me,Ce)=>{const qe=b>0?Ce==U?1:b*Ce:o[Ce],Qe=qe*re;t.currentTime=z+ae.delay+Qe,ae.duration=Qe,this._validateStyleAst(Me,t),Me.offset=qe,i.styles.push(Me)}),i}visitReference(e,t){return{type:8,animation:ni(this,La(e.animation),t),options:os(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:os(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:os(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[s,o]=function RV(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(MV,"")),n=n.replace(/@\*/g,Uc).replace(/@\w+/g,t=>Uc+"-"+t.substr(1)).replace(/:animating/g,gp),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+s:s,ti(t.collectedStyles,t.currentQuerySelector,{});const a=ni(this,La(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:os(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:Hc(e.timings,t.errors,!0);return{type:12,animation:ni(this,La(e.animation),t),timings:i,options:null}}}class PV{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Kc(n){return!Array.isArray(n)&&"object"==typeof n}function os(n){return n?(n=go(n)).params&&(n.params=function FV(n){return n?go(n):null}(n.params)):n={},n}function bp(n,e,t){return{duration:n,delay:e,easing:t}}function Cp(n,e,t,i,r,s,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class Yc{constructor(){this._map=new Map}consume(e){let t=this._map.get(e);return t?this._map.delete(e):t=[],t}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const LV=new RegExp(":enter","g"),jV=new RegExp(":leave","g");function Dp(n,e,t,i,r,s={},o={},a,l,c=[]){return(new BV).buildKeyframes(n,e,t,i,r,s,o,a,l,c)}class BV{buildKeyframes(e,t,i,r,s,o,a,l,c,u=[]){c=c||new Yc;const p=new Ap(e,t,c,r,s,u,[]);p.options=l,p.currentTimeline.setStyles([o],null,p.errors,l),ni(this,i,p);const b=p.timelines.filter(U=>U.containsAnimation());if(b.length&&Object.keys(a).length){const U=b[b.length-1];U.allowOnlyTimelineStyles()||U.setStyles([a],null,p.errors,l)}return b.length?b.map(U=>U.buildKeyframes()):[Cp(t,[],[],[],0,0,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.consume(t.element);if(i){const r=t.createSubContext(e.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_visitSubInstructions(e,t,i){let s=t.currentTimeline.currentTime;const o=null!=i.duration?rs(i.duration):null,a=null!=i.delay?rs(i.delay):null;return 0!==o&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(e,t){t.updateOptions(e.options,!0),ni(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let r=t;const s=e.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Xc);const o=rs(s.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>ni(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let r=t.currentTimeline.currentTime;const s=e.options&&e.options.delay?rs(e.options.delay):0;e.steps.forEach(o=>{const a=t.createSubContext(e.options);s&&a.delayNextStep(s),ni(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return Hc(t.params?$c(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const s=e.style;5==s.type?this.visitKeyframes(s,t):(t.incrementTime(i.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.getCurrentStyleProperties().length&&i.forwardFrame();const s=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(s):i.setStyles(e.styles,s,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,s=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+s),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,r=e.options||{},s=r.delay?rs(r.delay):0;s&&(6===t.previousNode.type||0==i&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Xc);let o=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const p=t.createSubContext(e.options,c);s&&p.delayNextStep(s),c===t.element&&(l=p.currentTimeline),ni(this,e.animation,p),p.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,p.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,r=t.currentTimeline,s=e.timings,o=Math.abs(s.duration),a=o*(t.currentQueryTotal-1);let l=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const p=u.currentTime;ni(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-p+(r.startTime-i.currentTimeline.startTime)}}const Xc={};class Ap{constructor(e,t,i,r,s,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Xc,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Qc(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let r=this.options;null!=i.duration&&(r.duration=rs(i.duration)),null!=i.delay&&(r.delay=rs(i.delay));const s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=$c(s[a],o,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){const r=t||this.element,s=new Ap(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=Xc,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+e.delay,easing:""},s=new UV(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,s,o){let a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(LV,"."+this._enterClassName)).replace(jV,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&0==a.length&&o.push(`\`query("${t}")\` returned zero elements. (Use \`query("${t}", { optional: true })\` if you wish to allow this.)`),a}}class Qc{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new Qc(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||dr,this._currentKeyframe[t]=dr}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&(this._previousKeyframe.easing=t);const s=r&&r.params||{},o=function HV(n,e){const t={};let i;return n.forEach(r=>{"*"===r?(i=i||Object.keys(e),i.forEach(s=>{t[s]=dr})):Fr(r,!1,t)}),t}(e,this._globalTimelineStyles);Object.keys(o).forEach(a=>{const l=$c(o[a],s,i);this._pendingStyles[a]=l,this._localTimelineStyles.hasOwnProperty(a)||(this._backFill[a]=this._globalTimelineStyles.hasOwnProperty(a)?this._globalTimelineStyles[a]:dr),this._updateStyle(a,l)})}applyStylesToKeyframe(){const e=this._pendingStyles,t=Object.keys(e);0!=t.length&&(this._pendingStyles={},t.forEach(i=>{this._currentKeyframe[i]=e[i]}),Object.keys(this._localTimelineStyles).forEach(i=>{this._currentKeyframe.hasOwnProperty(i)||(this._currentKeyframe[i]=this._localTimelineStyles[i])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(e=>{const t=this._localTimelineStyles[e];this._pendingStyles[e]=t,this._updateStyle(e,t)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){Object.keys(e._styleSummary).forEach(t=>{const i=this._styleSummary[t],r=e._styleSummary[t];(!i||r.time>i.time)&&this._updateStyle(t,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Fr(a,!0);Object.keys(c).forEach(u=>{const p=c[u];"!"==p?e.add(u):p==dr&&t.add(u)}),i||(c.offset=l/this.duration),r.push(c)});const s=e.size?Gc(e.values()):[],o=t.size?Gc(t.values()):[];if(i){const a=r[0],l=go(a);a.offset=0,l.offset=1,r=[a,l]}return Cp(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class UV extends Qc{constructor(e,t,i,r,s,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=i+t,a=t/o,l=Fr(e[0],!1);l.offset=0,s.push(l);const c=Fr(e[0],!1);c.offset=HC(a),s.push(c);const u=e.length-1;for(let p=1;p<=u;p++){let b=Fr(e[p],!1);b.offset=HC((t+b.offset*i)/o),s.push(b)}i=o,t=0,r="",e=s}return Cp(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function HC(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class Sp{}class $V extends Sp{normalizePropertyName(e,t){return yp(e)}normalizeStyleValue(e,t,i,r){let s="";const o=i.toString().trim();if(GV[t]&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(`Please provide a CSS unit value for ${e}:${i}`)}return o+s}}const GV=(()=>function WV(n){const e={};return n.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function $C(n,e,t,i,r,s,o,a,l,c,u,p,b){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:p,errors:b}}const Tp={};class GC{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return function qV(n,e,t,i,r){return n.some(s=>s(e,t,i,r))}(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){const r=this._stateStyles["*"],s=this._stateStyles[e],o=r?r.buildStyles(t,i):{};return s?s.buildStyles(t,i):o}build(e,t,i,r,s,o,a,l,c,u){const p=[],b=this.ast.options&&this.ast.options.params||Tp,z=this.buildStyles(i,a&&a.params||Tp,p),ae=l&&l.params||Tp,re=this.buildStyles(r,ae,p),Me=new Set,Ce=new Map,qe=new Map,Qe="void"===r,ut={params:Object.assign(Object.assign({},b),ae)},xt=u?[]:Dp(e,t,this.ast.animation,s,o,z,re,ut,c,p);let kt=0;if(xt.forEach(On=>{kt=Math.max(On.duration+On.delay,kt)}),p.length)return $C(t,this._triggerName,i,r,Qe,z,re,[],[],Ce,qe,kt,p);xt.forEach(On=>{const kn=On.element,hr=ti(Ce,kn,{});On.preStyleProps.forEach(Oi=>hr[Oi]=!0);const fr=ti(qe,kn,{});On.postStyleProps.forEach(Oi=>fr[Oi]=!0),kn!==t&&Me.add(kn)});const Gn=Gc(Me.values());return $C(t,this._triggerName,i,r,Qe,z,re,xt,Gn,Ce,qe,kt)}}class zV{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i={},r=go(this.defaultParams);return Object.keys(e).forEach(s=>{const o=e[s];null!=o&&(r[s]=o)}),this.styles.styles.forEach(s=>{if("string"!=typeof s){const o=s;Object.keys(o).forEach(a=>{let l=o[a];l.length>1&&(l=$c(l,r,t));const c=this.normalizer.normalizePropertyName(a,t);l=this.normalizer.normalizeStyleValue(a,c,l,t),i[c]=l})}}),i}}class YV{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states={},t.states.forEach(r=>{this.states[r.name]=new zV(r.style,r.options&&r.options.params||{},i)}),WC(this.states,"true","1"),WC(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new GC(e,r,this.states))}),this.fallbackTransition=function XV(n,e,t){return new GC(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(o=>o.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function WC(n,e,t){n.hasOwnProperty(e)?n.hasOwnProperty(t)||(n[t]=n[e]):n.hasOwnProperty(t)&&(n[e]=n[t])}const QV=new Yc;class ZV{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(e,t){const i=[],r=Ep(this._driver,t,i);if(i.length)throw new Error(`Unable to build the animation due to the following errors: ${i.join("\n")}`);this._animations[e]=r}_buildPlayer(e,t,i){const r=e.element,s=AC(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const r=[],s=this._animations[e];let o;const a=new Map;if(s?(o=Dp(this._driver,t,s,pp,jc,{},{},i,QV,r),o.forEach(u=>{const p=ti(a,u.element,{});u.postStyleProps.forEach(b=>p[b]=null)})):(r.push("The requested animation doesn't exist or has already been destroyed"),o=[]),r.length)throw new Error(`Unable to create the animation due to the following errors: ${r.join("\n")}`);a.forEach((u,p)=>{Object.keys(u).forEach(b=>{u[b]=this._driver.computeStyle(p,b,dr)})});const c=Rr(o.map(u=>{const p=a.get(u.element);return this._buildPlayer(u,{},p)}));return this._playersById[e]=c,c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),delete this._playersById[e];const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById[e];if(!t)throw new Error(`Unable to find the timeline player referenced by ${e}`);return t}listen(e,t,i,r){const s=op(t,"","","");return rp(this._getPlayer(e),i,s,r),()=>{}}command(e,t,i,r){if("register"==i)return void this.register(e,r[0]);if("create"==i)return void this.create(e,t,r[0]||{});const s=this._getPlayer(e);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const qC="ng-animate-queued",zC="ng-animate-disabled",KC=".ng-animate-disabled",n2=[],YC={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},i2={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},pi="__ng_removed";class wp{constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function a2(n){return null!=n?n:null}(i?e.value:e),i){const s=go(e);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const Va="void",Mp=new wp(Va);class r2{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,gi(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.hasOwnProperty(t))throw new Error(`Unable to listen on the animation trigger event "${i}" because the animation trigger "${t}" doesn't exist!`);if(null==i||0==i.length)throw new Error(`Unable to listen on the animation trigger "${t}" because the provided event is undefined!`);if(!function l2(n){return"start"==n||"done"==n}(i))throw new Error(`The provided animation trigger event "${i}" for the animation trigger "${t}" is not supported!`);const s=ti(this._elementListeners,e,[]),o={name:t,phase:i,callback:r};s.push(o);const a=ti(this._engine.statesByElement,e,{});return a.hasOwnProperty(t)||(gi(e,Bc),gi(e,Bc+"-"+t),a[t]=Mp),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers[t]||delete a[t]})}}register(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}_getTrigger(e){const t=this._triggers[e];if(!t)throw new Error(`The provided animation trigger "${e}" has not been registered!`);return t}trigger(e,t,i,r=!0){const s=this._getTrigger(t),o=new Ip(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(gi(e,Bc),gi(e,Bc+"-"+t),this._engine.statesByElement.set(e,a={}));let l=a[t];const c=new wp(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a[t]=c,l||(l=Mp),c.value!==Va&&l.value===c.value){if(!function d2(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r=0;r<t.length;r++){const s=t[r];if(!e.hasOwnProperty(s)||n[s]!==e[s])return!1}return!0}(l.params,c.params)){const ae=[],re=s.matchStyles(l.value,l.params,ae),Me=s.matchStyles(c.value,c.params,ae);ae.length?this._engine.reportError(ae):this._engine.afterFlush(()=>{ss(e,re),Qi(e,Me)})}return}const b=ti(this._engine.playersByElement,e,[]);b.forEach(ae=>{ae.namespaceId==this.id&&ae.triggerName==t&&ae.queued&&ae.destroy()});let U=s.matchTransition(l.value,c.value,e,c.params),z=!1;if(!U){if(!r)return;U=s.fallbackTransition,z=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:U,fromState:l,toState:c,player:o,isFallbackTransition:z}),z||(gi(e,qC),o.onStart(()=>{mo(e,qC)})),o.onDone(()=>{let ae=this.players.indexOf(o);ae>=0&&this.players.splice(ae,1);const re=this._engine.playersByElement.get(e);if(re){let Me=re.indexOf(o);Me>=0&&re.splice(Me,1)}}),this.players.push(o),b.push(o),o}deregister(e){delete this._triggers[e],this._engine.statesByElement.forEach((t,i)=>{delete t[e]}),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,Uc,!0);i.forEach(r=>{if(r[pi])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){const s=this._engine.statesByElement.get(e);if(s){const o=[];if(Object.keys(s).forEach(a=>{if(this._triggers[a]){const l=this.trigger(e,a,Va,r);l&&o.push(l)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),i&&Rr(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers[o].fallbackTransition,c=i[o]||Mp,u=new wp(Va),p=new Ip(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:u,player:p,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(e):[];if(s&&s.length)r=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{const s=e[pi];(!s||s===YC)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){gi(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=op(s,i.triggerName,i.fromState.value,i.toState.value);l._data=e,rp(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const s=i.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class s2{constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new r2(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList.length-1;if(i>=0){let r=!1;for(let s=i;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,t)){this._namespaceList.splice(s+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i){const r=Object.keys(i);for(let s=0;s<r.length;s++){const o=i[r[s]].namespaceId;if(o){const a=this._fetchNamespace(o);a&&t.add(a)}}}return t}trigger(e,t,i,r){if(Zc(t)){const s=this._fetchNamespace(e);if(s)return s.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!Zc(t))return;const s=t[pi];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){const o=this._fetchNamespace(e);o&&o.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),gi(e,zC)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),mo(e,zC))}removeNode(e,t,i,r){if(Zc(t)){const s=e?this._fetchNamespace(e):null;if(s?s.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),i){const o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,i,r){this.collectedLeaveElements.push(t),t[pi]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1}}listen(e,t,i,r,s){return Zc(t)?this._fetchNamespace(e).listen(t,i,r,s):()=>{}}_buildInstruction(e,t,i,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,s)}destroyInnerAnimations(e){let t=this.driver.query(e,Uc,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,gp,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Rr(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[pi];if(t&&t.setForRemoval){if(e[pi]=YC,t.namespaceId){this.destroyInnerAnimations(e);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}this.driver.matchesElement(e,KC)&&this.markElementAsDisabled(e,!1),this.driver.query(e,KC,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)gi(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{t=this._flushAnimations(i,e)}finally{for(let r=0;r<i.length;r++)i[r]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?Rr(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${e.join("\n")}`)}_flushAnimations(e,t){const i=new Yc,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(et=>{u.add(et);const nt=this.driver.query(et,".ng-animate-queued",!0);for(let pt=0;pt<nt.length;pt++)u.add(nt[pt])});const p=this.bodyNode,b=Array.from(this.statesByElement.keys()),U=ZC(b,this.collectedEnterElements),z=new Map;let ae=0;U.forEach((et,nt)=>{const pt=pp+ae++;z.set(nt,pt),et.forEach(It=>gi(It,pt))});const re=[],Me=new Set,Ce=new Set;for(let et=0;et<this.collectedLeaveElements.length;et++){const nt=this.collectedLeaveElements[et],pt=nt[pi];pt&&pt.setForRemoval&&(re.push(nt),Me.add(nt),pt.hasAnimation?this.driver.query(nt,".ng-star-inserted",!0).forEach(It=>Me.add(It)):Ce.add(nt))}const qe=new Map,Qe=ZC(b,Array.from(Me));Qe.forEach((et,nt)=>{const pt=jc+ae++;qe.set(nt,pt),et.forEach(It=>gi(It,pt))}),e.push(()=>{U.forEach((et,nt)=>{const pt=z.get(nt);et.forEach(It=>mo(It,pt))}),Qe.forEach((et,nt)=>{const pt=qe.get(nt);et.forEach(It=>mo(It,pt))}),re.forEach(et=>{this.processLeaveNode(et)})});const ut=[],xt=[];for(let et=this._namespaceList.length-1;et>=0;et--)this._namespaceList[et].drainQueuedTransitions(t).forEach(pt=>{const It=pt.player,Sn=pt.element;if(ut.push(It),this.collectedEnterElements.length){const Ji=Sn[pi];if(Ji&&Ji.setForMove)return void It.destroy()}const Zi=!p||!this.driver.containsElement(p,Sn),ii=qe.get(Sn),Pr=z.get(Sn),nn=this._buildInstruction(pt,i,Pr,ii,Zi);if(nn.errors&&nn.errors.length)xt.push(nn);else{if(Zi)return It.onStart(()=>ss(Sn,nn.fromStyles)),It.onDestroy(()=>Qi(Sn,nn.toStyles)),void r.push(It);if(pt.isFallbackTransition)return It.onStart(()=>ss(Sn,nn.fromStyles)),It.onDestroy(()=>Qi(Sn,nn.toStyles)),void r.push(It);nn.timelines.forEach(Ji=>Ji.stretchStartingKeyframe=!0),i.append(Sn,nn.timelines),o.push({instruction:nn,player:It,element:Sn}),nn.queriedElements.forEach(Ji=>ti(a,Ji,[]).push(It)),nn.preStyleProps.forEach((Ji,Ba)=>{const ru=Object.keys(Ji);if(ru.length){let as=l.get(Ba);as||l.set(Ba,as=new Set),ru.forEach(kp=>as.add(kp))}}),nn.postStyleProps.forEach((Ji,Ba)=>{const ru=Object.keys(Ji);let as=c.get(Ba);as||c.set(Ba,as=new Set),ru.forEach(kp=>as.add(kp))})}});if(xt.length){const et=[];xt.forEach(nt=>{et.push(`@${nt.triggerName} has failed due to:\n`),nt.errors.forEach(pt=>et.push(`- ${pt}\n`))}),ut.forEach(nt=>nt.destroy()),this.reportError(et)}const kt=new Map,Gn=new Map;o.forEach(et=>{const nt=et.element;i.has(nt)&&(Gn.set(nt,nt),this._beforeAnimationBuild(et.player.namespaceId,et.instruction,kt))}),r.forEach(et=>{const nt=et.element;this._getPreviousPlayers(nt,!1,et.namespaceId,et.triggerName,null).forEach(It=>{ti(kt,nt,[]).push(It),It.destroy()})});const On=re.filter(et=>eD(et,l,c)),kn=new Map;QC(kn,this.driver,Ce,c,dr).forEach(et=>{eD(et,l,c)&&On.push(et)});const fr=new Map;U.forEach((et,nt)=>{QC(fr,this.driver,new Set(et),l,"!")}),On.forEach(et=>{const nt=kn.get(et),pt=fr.get(et);kn.set(et,Object.assign(Object.assign({},nt),pt))});const Oi=[],_o=[],yo={};o.forEach(et=>{const{element:nt,player:pt,instruction:It}=et;if(i.has(nt)){if(u.has(nt))return pt.onDestroy(()=>Qi(nt,It.toStyles)),pt.disabled=!0,pt.overrideTotalTime(It.totalTime),void r.push(pt);let Sn=yo;if(Gn.size>1){let ii=nt;const Pr=[];for(;ii=ii.parentNode;){const nn=Gn.get(ii);if(nn){Sn=nn;break}Pr.push(ii)}Pr.forEach(nn=>Gn.set(nn,Sn))}const Zi=this._buildAnimation(pt.namespaceId,It,kt,s,fr,kn);if(pt.setRealPlayer(Zi),Sn===yo)Oi.push(pt);else{const ii=this.playersByElement.get(Sn);ii&&ii.length&&(pt.parentPlayer=Rr(ii)),r.push(pt)}}else ss(nt,It.fromStyles),pt.onDestroy(()=>Qi(nt,It.toStyles)),_o.push(pt),u.has(nt)&&r.push(pt)}),_o.forEach(et=>{const nt=s.get(et.element);if(nt&&nt.length){const pt=Rr(nt);et.setRealPlayer(pt)}}),r.forEach(et=>{et.parentPlayer?et.syncPlayerEvents(et.parentPlayer):et.destroy()});for(let et=0;et<re.length;et++){const nt=re[et],pt=nt[pi];if(mo(nt,jc),pt&&pt.hasAnimation)continue;let It=[];if(a.size){let Zi=a.get(nt);Zi&&Zi.length&&It.push(...Zi);let ii=this.driver.query(nt,gp,!0);for(let Pr=0;Pr<ii.length;Pr++){let nn=a.get(ii[Pr]);nn&&nn.length&&It.push(...nn)}}const Sn=It.filter(Zi=>!Zi.destroyed);Sn.length?c2(this,nt,Sn):this.processLeaveNode(nt)}return re.length=0,Oi.forEach(et=>{this.players.push(et),et.onDone(()=>{et.destroy();const nt=this.players.indexOf(et);this.players.splice(nt,1)}),et.play()}),Oi}elementContainsData(e,t){let i=!1;const r=t[pi];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,s){let o=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(o=a)}else{const a=this.playersByElement.get(e);if(a){const l=!s||s==Va;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){const s=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==s,p=ti(i,c,[]);this._getPreviousPlayers(c,u,o,a,t.toState).forEach(U=>{const z=U.getRealPlayer();z.beforeDestroy&&z.beforeDestroy(),U.destroy(),p.push(U)})}ss(s,t.fromStyles)}_buildAnimation(e,t,i,r,s,o){const a=t.triggerName,l=t.element,c=[],u=new Set,p=new Set,b=t.timelines.map(z=>{const ae=z.element;u.add(ae);const re=ae[pi];if(re&&re.removedBeforeQueried)return new po(z.duration,z.delay);const Me=ae!==l,Ce=function u2(n){const e=[];return JC(n,e),e}((i.get(ae)||n2).map(kt=>kt.getRealPlayer())).filter(kt=>!!kt.element&&kt.element===ae),qe=s.get(ae),Qe=o.get(ae),ut=AC(0,this._normalizer,0,z.keyframes,qe,Qe),xt=this._buildPlayer(z,ut,Ce);if(z.subTimeline&&r&&p.add(ae),Me){const kt=new Ip(e,a,ae);kt.setRealPlayer(xt),c.push(kt)}return xt});c.forEach(z=>{ti(this.playersByQueriedElement,z.element,[]).push(z),z.onDone(()=>function o2(n,e,t){let i;if(n instanceof Map){if(i=n.get(e),i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&n.delete(e)}}else if(i=n[e],i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&delete n[e]}return i}(this.playersByQueriedElement,z.element,z))}),u.forEach(z=>gi(z,PC));const U=Rr(b);return U.onDestroy(()=>{u.forEach(z=>mo(z,PC)),Qi(l,t.toStyles)}),p.forEach(z=>{ti(r,z,[]).push(U)}),U}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new po(e.duration,e.delay)}}class Ip{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new po,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(t=>{this._queuedCallbacks[t].forEach(i=>rp(e,t,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){ti(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function Zc(n){return n&&1===n.nodeType}function XC(n,e){const t=n.style.display;return n.style.display=null!=e?e:"none",t}function QC(n,e,t,i,r){const s=[];t.forEach(l=>s.push(XC(l)));const o=[];i.forEach((l,c)=>{const u={};l.forEach(p=>{const b=u[p]=e.computeStyle(c,p,r);(!b||0==b.length)&&(c[pi]=i2,o.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>XC(l,s[a++])),o}function ZC(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const r=new Set(e),s=new Map;function o(a){if(!a)return 1;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:r.has(c)?1:o(c),s.set(a,l),l}return e.forEach(a=>{const l=o(a);1!==l&&t.get(l).push(a)}),t}const Jc="$$classes";function gi(n,e){if(n.classList)n.classList.add(e);else{let t=n[Jc];t||(t=n[Jc]={}),t[e]=!0}}function mo(n,e){if(n.classList)n.classList.remove(e);else{let t=n[Jc];t&&delete t[e]}}function c2(n,e,t){Rr(t).onDone(()=>n.processLeaveNode(e))}function JC(n,e){for(let t=0;t<n.length;t++){const i=n[t];i instanceof CC?JC(i.players,e):e.push(i)}}function eD(n,e,t){const i=t.get(n);if(!i)return!1;let r=e.get(n);return r?i.forEach(s=>r.add(s)):e.set(n,i),t.delete(n),!0}class eu{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new s2(e,t,i),this._timelineEngine=new ZV(e,t,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(e,t,i,r,s){const o=e+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],c=Ep(this._driver,s,l);if(l.length)throw new Error(`The animation trigger "${r}" has failed to build due to the following errors:\n - ${l.join("\n - ")}`);a=function KV(n,e,t){return new YV(n,e,t)}(r,c,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i,r){this._transitionEngine.removeNode(e,t,r||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if("@"==i.charAt(0)){const[s,o]=SC(i);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,s){if("@"==i.charAt(0)){const[o,a]=SC(i);return this._timelineEngine.listen(o,t,a,s)}return this._transitionEngine.listen(e,t,i,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function tD(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=Rp(e[0]),e.length>1&&(i=Rp(e[e.length-1]))):e&&(t=Rp(e)),t||i?new h2(n,t,i):null}let h2=(()=>{class n{constructor(t,i,r){this._element=t,this._startStyles=i,this._endStyles=r,this._state=0;let s=n.initialStylesByElement.get(t);s||n.initialStylesByElement.set(t,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Qi(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Qi(this._element,this._initialStyles),this._endStyles&&(Qi(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(ss(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ss(this._element,this._endStyles),this._endStyles=null),Qi(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Rp(n){let e=null;const t=Object.keys(n);for(let i=0;i<t.length;i++){const r=t[i];f2(r)&&(e=e||{},e[r]=n[r])}return e}function f2(n){return"display"===n||"position"===n}const nD="animation",iD="animationend";class m2{constructor(e,t,i,r,s,o,a){this._element=e,this._name=t,this._duration=i,this._delay=r,this._easing=s,this._fillMode=o,this._onDoneFn=a,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=l=>this._handleCallback(l)}apply(){(function _2(n,e){const t=Pp(n,"").trim();let i=0;t.length&&(i=function v2(n,e){let t=0;for(let i=0;i<n.length;i++)n.charAt(i)===e&&t++;return t}(t,",")+1,e=`${t}, ${e}`),tu(n,"",e)})(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),oD(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){rD(this._element,this._name,"paused")}resume(){rD(this._element,this._name,"running")}setPosition(e){const t=sD(this._element,this._name);this._position=e*this._duration,tu(this._element,"Delay",`-${this._position}ms`,t)}getPosition(){return this._position}_handleCallback(e){const t=e._ngTestManualTimestamp||Date.now(),i=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&i>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),oD(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function y2(n,e){const i=Pp(n,"").split(","),r=Fp(i,e);r>=0&&(i.splice(r,1),tu(n,"",i.join(",")))}(this._element,this._name))}}function rD(n,e,t){tu(n,"PlayState",t,sD(n,e))}function sD(n,e){const t=Pp(n,"");return t.indexOf(",")>0?Fp(t.split(","),e):Fp([t],e)}function Fp(n,e){for(let t=0;t<n.length;t++)if(n[t].indexOf(e)>=0)return t;return-1}function oD(n,e,t){t?n.removeEventListener(iD,e):n.addEventListener(iD,e)}function tu(n,e,t,i){const r=nD+e;if(null!=i){const s=n.style[r];if(s.length){const o=s.split(",");o[i]=t,t=o.join(",")}}n.style[r]=t}function Pp(n,e){return n.style[nD+e]||""}class aD{constructor(e,t,i,r,s,o,a,l){this.element=e,this.keyframes=t,this.animationName=i,this._duration=r,this._delay=s,this._finalStyles=a,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=r+s,this._buildStyler()}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}destroy(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}finish(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(e){this._styler.setPosition(e)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new m2(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}beforeDestroy(){this.init();const e={};if(this.hasStarted()){const t=this._state>=3;Object.keys(this._finalStyles).forEach(i=>{"offset"!=i&&(e[i]=t?this._finalStyles[i]:vp(this.element,i))})}this.currentSnapshot=e}}class C2 extends po{constructor(e,t){super(),this.element=e,this._startingStyles={},this.__initialized=!1,this._styles=IC(t)}init(){this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEach(e=>{this._startingStyles[e]=this.element.style[e]}),super.init())}play(){!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(e=>this.element.style.setProperty(e,this._styles[e])),super.play())}destroy(){!this._startingStyles||(Object.keys(this._startingStyles).forEach(e=>{const t=this._startingStyles[e];t?this.element.style.setProperty(e,t):this.element.style.removeProperty(e)}),this._startingStyles=null,super.destroy())}}class cD{constructor(){this._count=0}validateStyleProperty(e){return cp(e)}matchesElement(e,t){return up(e,t)}containsElement(e,t){return dp(e,t)}query(e,t,i){return hp(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}buildKeyframeElement(e,t,i){i=i.map(a=>IC(a));let r=`@keyframes ${t} {\n`,s="";i.forEach(a=>{s=" ";const l=parseFloat(a.offset);r+=`${s}${100*l}% {\n`,s+=" ",Object.keys(a).forEach(c=>{const u=a[c];switch(c){case"offset":return;case"easing":return void(u&&(r+=`${s}animation-timing-function: ${u};\n`));default:return void(r+=`${s}${c}: ${u};\n`)}}),r+=`${s}}\n`}),r+="}\n";const o=document.createElement("style");return o.textContent=r,o}animate(e,t,i,r,s,o=[],a){const l=o.filter(re=>re instanceof aD),c={};LC(i,r)&&l.forEach(re=>{let Me=re.currentSnapshot;Object.keys(Me).forEach(Ce=>c[Ce]=Me[Ce])});const u=function S2(n){let e={};return n&&(Array.isArray(n)?n:[n]).forEach(i=>{Object.keys(i).forEach(r=>{"offset"==r||"easing"==r||(e[r]=i[r])})}),e}(t=VC(e,t,c));if(0==i)return new C2(e,u);const p="gen_css_kf_"+this._count++,b=this.buildKeyframeElement(e,p,t);(function A2(n){var e;const t=null===(e=n.getRootNode)||void 0===e?void 0:e.call(n);return"undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot?t:document.head})(e).appendChild(b);const z=tD(e,t),ae=new aD(e,t,p,i,r,s,u,z);return ae.onDestroy(()=>function T2(n){n.parentNode.removeChild(n)}(b)),ae}}class dD{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(e,t,i){return e.animate(t,i)}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(t=>{"offset"!=t&&(e[t]=this._finished?this._finalKeyframe[t]:vp(this.element,t))}),this.currentSnapshot=e}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class w2{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(hD().toString()),this._cssKeyframesDriver=new cD}validateStyleProperty(e){return cp(e)}matchesElement(e,t){return up(e,t)}containsElement(e,t){return dp(e,t)}query(e,t,i){return hp(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}overrideWebAnimationsSupport(e){this._isNativeImpl=e}animate(e,t,i,r,s,o=[],a){if(!a&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,i,r,s,o);const u={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(u.easing=s);const p={},b=o.filter(z=>z instanceof dD);LC(i,r)&&b.forEach(z=>{let ae=z.currentSnapshot;Object.keys(ae).forEach(re=>p[re]=ae[re])});const U=tD(e,t=VC(e,t=t.map(z=>Fr(z,!1)),p));return new dD(e,t,u,U)}}function hD(){return DC()&&Element.prototype.animate||{}}let I2=(()=>{class n extends yC{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Ke.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(t)?vC(t):t;return fD(this._renderer,null,i,"register",[r]),new R2(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(ze(qr),ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class R2 extends class mV{}{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new F2(this._id,e,t||{},this._renderer)}}class F2{constructor(e,t,i,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return fD(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){var e,t;return null!==(t=null===(e=this._renderer.engine.players[+this.id])||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}}function fD(n,e,t,i,r){return n.setProperty(e,`@@${t}:${i}`,r)}const pD="@.disabled";let P2=(()=>{class n{constructor(t,i,r){this.delegate=t,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,o)=>{const a=null==o?void 0:o.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(t,i){const s=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(s);return u||(u=new gD("",s,this.engine),this._rendererCache.set(s,u)),u}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(o,a,t,u.name,u)};return i.data.animation.forEach(l),new x2(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,r){t>=0&&t<this._microtaskId?this._zone.run(()=>i(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(ze(qr),ze(eu),ze(Yt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class gD{constructor(e,t,i){this.namespaceId=e,this.delegate=t,this.engine=i,this.destroyNode=this.delegate.destroyNode?r=>t.destroyNode(r):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==pD?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class x2 extends gD{constructor(e,t,i,r){super(t,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==pD?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.substr(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const r=function N2(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let s=t.substr(1),o="";return"@"!=s.charAt(0)&&([s,o]=function O2(n){const e=n.indexOf(".");return[n.substring(0,e),n.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}let k2=(()=>{class n extends eu{constructor(t,i,r){super(t.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt),ze(fp),ze(Sp))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const xp=new ct("AnimationModuleType"),mD=[{provide:yC,useClass:I2},{provide:Sp,useFactory:function V2(){return new $V}},{provide:eu,useClass:k2},{provide:qr,useFactory:function j2(n,e,t){return new P2(n,e,t)},deps:[bc,eu,Yt]}],_D=[{provide:fp,useFactory:function L2(){return function M2(){return"function"==typeof hD()}()?new w2:new cD}},{provide:xp,useValue:"BrowserAnimations"},...mD],B2=[{provide:fp,useClass:RC},{provide:xp,useValue:"NoopAnimations"},...mD];let U2=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?B2:_D}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:_D,imports:[I1]}),n})();const H2=["sliderWrapper"],mi=Oc({passive:!1}),z2={provide:Ni,useExisting:V(()=>yD),multi:!0};class K2{}const Y2=uV(cV(lV(class{constructor(n){this._elementRef=n}}),"accent"));let yD=(()=>{class n extends Y2{constructor(t,i,r,s,o,a,l,c){super(t),this._focusMonitor=i,this._changeDetectorRef=r,this._dir=s,this._ngZone=a,this._animationMode=c,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new dn,this.input=new dn,this.valueChange=new dn,this.onTouched=()=>{},this._percent=0,this._isSliding=null,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=k.Subscription.EMPTY,this._pointerDown=u=>{this.disabled||this._isSliding||!ja(u)&&0!==u.button||this._ngZone.run(()=>{this._touchId=ja(u)?function X2(n,e){for(let t=0;t<n.touches.length;t++){const i=n.touches[t].target;if(e===i||e.contains(i))return n.touches[t].identifier}}(u,this._elementRef.nativeElement):void 0;const p=vD(u,this._touchId);if(p){const b=this.value;this._isSliding="pointer",this._lastPointerEvent=u,u.preventDefault(),this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(u),this._focusHostElement(),this._updateValueFromPosition(p),this._valueOnSlideStart=b,b!=this.value&&this._emitInputEvent()}})},this._pointerMove=u=>{if("pointer"===this._isSliding){const p=vD(u,this._touchId);if(p){u.preventDefault();const b=this.value;this._lastPointerEvent=u,this._updateValueFromPosition(p),b!=this.value&&this._emitInputEvent()}}},this._pointerUp=u=>{"pointer"===this._isSliding&&(!ja(u)||"number"!=typeof this._touchId||Np(u.changedTouches,this._touchId))&&(u.preventDefault(),this._removeGlobalEvents(),this._isSliding=null,this._touchId=void 0,this._valueOnSlideStart!=this.value&&!this.disabled&&this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=l,this.tabIndex=parseInt(o)||0,a.runOutsideAngular(()=>{const u=t.nativeElement;u.addEventListener("mousedown",this._pointerDown,mi),u.addEventListener("touchstart",this._pointerDown,mi)})}get invert(){return this._invert}set invert(t){this._invert=Lc(t)}get max(){return this._max}set max(t){this._max=ho(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(t){this._min=ho(t,this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(t){this._step=ho(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(t){this._thumbLabel=Lc(t)}get tickInterval(){return this._tickInterval}set tickInterval(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?ho(t,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(t){if(t!==this._value){let i=ho(t,0);this._roundToDecimal&&i!==this.min&&i!==this.max&&(i=parseFloat(i.toFixed(this._roundToDecimal))),this._value=i,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(t){this._vertical=Lc(t)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(t){this._focusHostElement(t)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){const i=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${i})`}}_getTrackFillStyles(){const t=this.percent,r=this.vertical?`1, ${t}, 1`:`${t}, 1, 1`;return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${r})`,display:0===t?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let t=100*this._tickIntervalPercent,a={backgroundSize:this.vertical?`2px ${t}%`:`${t}% 2px`,transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${t/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){const l=this._shouldInvertAxis();let c;c=this.vertical?l?"Bottom":"Top":l?"Right":"Left",a[`padding${c}`]=`${this._getThumbGap()}px`}return a}_getThumbContainerStyles(){const t=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{this._isActive=!!t&&"keyboard"!==t,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,mi),t.removeEventListener("touchstart",this._pointerDown,mi),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(t){if(this.disabled||function HL(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t)||this._isSliding&&"keyboard"!==this._isSliding)return;const i=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}i!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding="keyboard",t.preventDefault()}_onKeyup(){"keyboard"===this._isSliding&&(this._isSliding=null)}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(t){const i=this._document,r=ja(t),o=r?"touchend":"mouseup";i.addEventListener(r?"touchmove":"mousemove",this._pointerMove,mi),i.addEventListener(o,this._pointerUp,mi),r&&i.addEventListener("touchcancel",this._pointerUp,mi);const a=this._getWindow();void 0!==a&&a&&a.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const t=this._document;t.removeEventListener("mousemove",this._pointerMove,mi),t.removeEventListener("mouseup",this._pointerUp,mi),t.removeEventListener("touchmove",this._pointerMove,mi),t.removeEventListener("touchend",this._pointerUp,mi),t.removeEventListener("touchcancel",this._pointerUp,mi);const i=this._getWindow();void 0!==i&&i&&i.removeEventListener("blur",this._windowBlur)}_increment(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}_updateValueFromPosition(t){if(!this._sliderDimensions)return;let o=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(o=1-o),0===o)this.value=this.min;else if(1===o)this.value=this.max;else{const a=this._calculateValue(o),l=Math.round((a-this.min)/this.step)*this.step+this.min;this.value=this._clamp(l,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){let t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,s=Math.ceil(30/(t*this.step/(this.max-this.min)))*this.step;this._tickIntervalPercent=s/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}_createChangeEvent(t=this.value){let i=new K2;return i.source=this,i.value=t,i}_calculatePercentage(t){return((t||0)-this.min)/(this.max-this.min)}_calculateValue(t){return this.min+t*(this.max-this.min)}_clamp(t,i=0,r=1){return Math.max(i,Math.min(t,r))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(t){this._elementRef.nativeElement.focus(t)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(t){this.value=t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}}return n.\u0275fac=function(t){return new(t||n)(He(Cn),He(rV),He(oa),He(AL,8),function al(n){return function TA(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const i=t.length;let r=0;for(;r<i;){const s=t[r];if(fg(s))break;if(0===s)r+=2;else if("number"==typeof s)for(r++;r<i&&"string"==typeof t[r];)r++;else{if(s===e)return t[r+1];r+=2}}}return null}(pn(),n)}("tabindex"),He(Yt),He(Qt),He(xp,8))},n.\u0275cmp=tt({type:n,selectors:[["mat-slider"]],viewQuery:function(t,i){if(1&t&&jv(H2,5),2&t){let r;Vv(r=function Bv(){return function QR(n,e){return n[19].queries[e].queryList}(Be(),og())}())&&(i._sliderWrapper=r.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(t,i){1&t&&mn("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()})("keydown",function(s){return i._onKeydown(s)})("keyup",function(){return i._onKeyup()})("mouseenter",function(){return i._onMouseenter()})("selectstart",function(s){return s.preventDefault()}),2&t&&(Wd("tabIndex",i.tabIndex),Wi("aria-disabled",i.disabled)("aria-valuemax",i.max)("aria-valuemin",i.min)("aria-valuenow",i.value)("aria-valuetext",null==i.valueText?i.displayValue:i.valueText)("aria-orientation",i.vertical?"vertical":"horizontal"),Yo("mat-slider-disabled",i.disabled)("mat-slider-has-ticks",i.tickInterval)("mat-slider-horizontal",!i.vertical)("mat-slider-axis-inverted",i._shouldInvertAxis())("mat-slider-invert-mouse-coords",i._shouldInvertMouseCoords())("mat-slider-sliding",i._isSliding)("mat-slider-thumb-label-showing",i.thumbLabel)("mat-slider-vertical",i.vertical)("mat-slider-min-value",i._isMinValue())("mat-slider-hide-last-tick",i.disabled||i._isMinValue()&&i._getThumbGap()&&i._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",value:"value",displayWith:"displayWith",valueText:"valueText",vertical:"vertical"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[Gt([z2]),Ot],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,i){1&t&&(St(0,"div",0,1),St(2,"div",2),Ai(3,"div",3),Ai(4,"div",4),Tt(),St(5,"div",5),Ai(6,"div",6),Tt(),St(7,"div",7),Ai(8,"div",8),Ai(9,"div",9),St(10,"div",10),St(11,"span",11),or(12),Tt(),Tt(),Tt(),Tt()),2&t&&(an(3),bn("ngStyle",i._getTrackBackgroundStyles()),an(1),bn("ngStyle",i._getTrackFillStyles()),an(1),bn("ngStyle",i._getTicksContainerStyles()),an(1),bn("ngStyle",i._getTicksStyles()),an(1),bn("ngStyle",i._getThumbContainerStyles()),an(5),Pl(i.displayValue))},directives:[Fb],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{-webkit-print-color-adjust:exact;color-adjust:exact;position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{-webkit-background-clip:content-box;background-clip:content-box;background-repeat:repeat;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),n})();function ja(n){return"t"===n.type[0]}function vD(n,e){let t;return t=ja(n)?"number"==typeof e?Np(n.touches,e)||Np(n.changedTouches,e):n.touches[0]||n.changedTouches[0]:n,t?{x:t.clientX,y:t.clientY}:void 0}function Np(n,e){for(let t=0;t<n.length;t++)if(n[t].identifier===e)return n[t]}let Q2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[[ba,pC],pC]}),n})();function Z2(n,e){1&n&&Ai(0,"div",25)}function J2(n,e){if(1&n){const t=Il();St(0,"img",26),mn("click",function(r){bo(t);const s=qi().$implicit;return qi().openThumb(r,s.fileNo,"img",s.documentId,s.path,s.external)}),Tt()}if(2&n){const t=qi().$implicit;xl("card-image-top ",t.class,""),bn("src",t.path,$u)("id",t.fileNo)}}function ej(n,e){if(1&n){const t=Il();St(0,"canvas",27),mn("click",function(r){bo(t);const s=qi().$implicit;return qi().openThumb(r,s.fileNo,"pdf",s.documentId,s.path,s.external)}),Tt()}2&n&&bn("id",qi().$implicit.fileNo+"_canvas")}function tj(n,e){if(1&n&&(St(0,"div",18),St(1,"div",19),Ai(2,"div",20),Tt(),St(3,"div",13),St(4,"div",21),$s(5,Z2,1,0,"div",22),$s(6,J2,1,5,"img",23),$s(7,ej,1,1,"canvas",24),Tt(),Tt(),Tt()),2&n){const t=e.$implicit;bn("hidden",""==t.mime),an(2),bn("innerHtml",t.title,zg),an(3),bn("ngIf",t.loading),an(1),bn("ngIf","application/pdf"!=t.mime),an(1),bn("ngIf","application/pdf"==t.mime)}}function nj(n,e){if(1&n){const t=Il();St(0,"div",28),St(1,"button",29),mn("click",function(){return bo(t),qi().prevPdfPage()}),or(2,"<"),Tt(),St(3,"span"),or(4),Tt(),St(5,"button",29),mn("click",function(){return bo(t),qi().nextPdfPage()}),or(6,">"),Tt(),Tt()}if(2&n){const t=qi();an(4),Gd("",t.pdfViewer.current_page," / ",t.pdfViewer.total_page,"")}}let ED=(()=>{class n extends vL{constructor(t,i,r,s,o,a){super(r,t,i,s),this.changedDocumentService=t,this.componentSetupService=i,this.formbirdInjectorService=r,this.cdr=s,this.searchService=o,this.domSanitizer=a,this.subs=new k.Subscription,this.updateWatchFields=[],this.mimeTypes={image:["image/gif","image/png","image/jpeg","image/jpg","image","jpg","gif","png"],pdf:["application/pdf","pdf"]},this.showModal=!1,this.currentView="img",this.pdfViewer={pdf:null,canvas:null,current_page:1,total_page:0},this.allowedItemTypes=[],this.fileReferences=[]}ngOnDestroy(){this.subs.unsubscribe()}ngOnInit(){if(this.contextParams={document:this.document,doc:this.document,tpl:this.template,template:this.template,tplItem:this.componentDefinition,componentDefinition:this.componentDefinition},this.componentDefinition.documentLocations)for(let i=0;i<this.componentDefinition.documentLocations.length;i++)"fileReference"===this.componentDefinition.documentLocations[i].fieldType&&this.fileReferences.push(this.componentDefinition.documentLocations[i]);this.thumbnailFieldType=new EL,Xi.initHandlebars(this.componentDefinition.handlebarsHelpers),null==this.componentDefinition.openIn||(this.openIn=this.componentDefinition.openIn),this.openIn="newWindow"===this.openIn?"_blank":"_self",this.readOnly=!1===this.componentDefinition.enabled;const t=this.changedDocumentService.watchComponentTemplate(this.template.documentId).subscribe(i=>{i.filter(r=>r.name&&r.name===this.fieldName).forEach(r=>{this.readOnly=!1===r.enabled,this.cdr.detectChanges()})});this.subs.add(t)}ngAfterViewInit(){let t;this.initialImageSize=8,null==this.componentDefinition.initialImageSize||(this.initialImageSize=this.componentDefinition.initialImageSize),this.initialImageSize<3&&(this.initialImageSize=3),this.initialImageSize>12&&(this.initialImageSize=12),this.watchDocument(),this.componentDefinition.filter?this.doSearch():this.doGetFiles(),t=window.hasOwnProperty("pdfWorkerSrc")&&"string"==typeof window.pdfWorkerSrc&&window.pdfWorkerSrc?window.pdfWorkerSrc:`https://cdn.jsdelivr.net/npm/pdfjs-dist@${Nc.version}/legacy/build/pdf.worker.min.js`,Nc.GlobalWorkerOptions.workerSrc=t,this.pdfViewer.canvas=document.getElementById("modalCanvas_"+this.key)}getSearchTerm(){const i=Xi.processHandlebars(this.componentDefinition.filter,null,{document:this.document,doc:this.document,tpl:this.template,template:this.template,componentDefinition:this.componentDefinition,fileReference:this.fileReferences});let r;"string"==typeof i?(r=i.replace(/'/g,'"'),r=JSON.parse(r)):r=i;const s={page:0,pageSize:1e4};return s.filter=r,s}processHandlebars(t,i,r={}){if(i)return Xi.processHandlebars(t,{result:i,fileReference:r},{document:this.document,doc:this.document,tpl:this.template,template:this.template,componentDefinition:this.componentDefinition})}doGetFiles(){this.files=[],this.componentDefinition.documentLocations.forEach(t=>{let i=[];t.itemType.forEach(o=>{i=i.concat(this.mimeTypes[o])}),t.fieldName.replace("document.",""),this.thumbnailFieldType.getFiles(this,this.contextParams.document,t,i)})}doSearch(){const t=this.getSearchTerm();this.files=[],this.searchService.search(t).then(i=>{i&&i.data&&i.data.hits&&i.data.hits.hits&&i.data.hits.hits.length&&(i=i.data.hits.hits).forEach(r=>{const s=r._source;this.componentDefinition.documentLocations.forEach(o=>{let a=[];o.itemType.forEach(l=>{a=a.concat(this.mimeTypes[l])}),this.thumbnailFieldType.getFiles(this,s,o,a)})})},i=>{console.log("error on Fetching Data:"+i)})}getFile(t,i,r){return function L1(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(p){o(p)}}function l(u){try{c(i.throw(u))}catch(p){o(p)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){this.files[i].loading=!0,fetch(t).then(s=>s.blob().then(o=>({contentType:s.headers.get("Content-Type")}))).then(s=>{r.includes(s.contentType)?(this.files[i].loading=!1,this.files[i].mime=s.contentType,"application/pdf"===s.contentType&&this.makeThumb("/api/getFile/"+this.files[i].fileNo,this.files[i].fileNo)):console.log("FileNo:"+this.files[i].fileNo+" Type: "+s.contentType+" is not a supported file type for display"),this.cdr.detectChanges()}).catch(s=>{console.log("Failed Fetch, using the text validation...");const o=this.getFileType(t);r.includes("pdf")?"pdf"===o&&(this.files[i].loading=!1,this.files[i].mime="pdf",this.makeThumb(t,this.files[i].fileNo)):r.includes("image")&&(this.files[i].loading=!1,this.files[i].mime="image"),this.cdr.detectChanges()})})}getFileType(t){return"string"!=typeof t?"":null!==t.match(/^http[^\?]*.(jpg|jpeg|gif|png|tiff|bmp)(\?(.*))?$/gim)?"image":null!==t.match(/^http[^\?]*.(pdf)(\?(.*))?$/gim)?"pdf":void 0}isValidURL(t){return null!==t.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}openThumb(t,i,r,s,o,a=!1){this.selectedItem={documentId:s,path:o,external:a};const l=this.pdfViewer.canvas.getContext("2d"),c=new Image;if("img"===r){this.currentView="img";const u=this;c.addEventListener("load",function(){u.pdfViewer.canvas.width=this.naturalWidth,u.pdfViewer.canvas.height=this.naturalHeight,l.drawImage(c,0,0)}),$("#scThumbnail_modal_"+u.key).css("display","flex"),c.src=t.target.src}else"pdf"===r&&(this.pdfViewer.canvas.width=c.width,this.pdfViewer.canvas.height=c.height,this.pdfviewer(i,this.pdfViewer.current_page));this.showModal=!this.showModal}closeThumb(t){this.showModal=!this.showModal,this.selectedItem=null}openDocument(){window.open(this.selectedItem.path,"_blank")}pdfviewer(t,i=1){const s=Nc.getDocument("/api/getFile/"+t);this.pdfViewer.canvas.getContext("2d").clearRect(0,0,this.pdfViewer.canvas.width,this.pdfViewer.canvas.height),s.promise.then(a=>{this.pdfViewer.pdf=a,this.pdfViewer.total_page=a.numPages,this.pdfViewer.current_page=1,this.getPdfPage()}),$("#scThumbnail_modal_"+this.key).css("display","flex")}prevPdfPage(){1!==this.pdfViewer.current_page&&(this.pdfViewer.current_page--,this.getPdfPage())}nextPdfPage(){this.pdfViewer.current_page!==this.pdfViewer.total_page&&(this.pdfViewer.current_page++,this.getPdfPage())}getPdfPage(){this.pdfViewer.pdf.getPage(this.pdfViewer.current_page).then(t=>{const r=t.getViewport({scale:1.5}),s=window.devicePixelRatio||1,o=this.pdfViewer.canvas.getContext("2d");this.pdfViewer.canvas.width=Math.floor(r.width*s),this.pdfViewer.canvas.height=Math.floor(r.height*s),t.render({canvasContext:o,transform:1!==s?[s,0,0,s,0,0]:null,viewport:r}),this.currentView="pdf",this.cdr.detectChanges()})}makeThumb(t,i){t&&Nc.getDocument(t).promise.then(s=>{s.getPage(1).then(o=>{const l=o.getViewport({scale:1.5}),c=window.devicePixelRatio||1,u=document.getElementById(i+"_canvas"),p=u.getContext("2d");u.width=Math.floor(l.width*c),u.height=Math.floor(l.height*c),o.render({canvasContext:p,transform:1!==c?[c,0,0,c,0,0]:null,viewport:l})})})}onSliderChange(t){const i=t.value;if(i>0){const r=3*i;$(`.${this.fieldName}_${this.key} .listContainer`).css({"grid-template-columns":"repeat(auto-fill, minmax("+r+"%, 1fr))"})}}watchDocument(){(()=>{let i=[];if(this.componentDefinition.filter)i=this.componentDefinition.updateWatchFields||[];else for(const r of this.componentDefinition.documentLocations)i.push(r.fieldName);for(const r of i){const s=r.replace("document.",""),o=this.changedDocumentService.watch(s,this.document.documentId).subscribe(a=>{this.contextParams.document[s]=a,this.componentDefinition.filter?this.doSearch():this.doGetFiles()});this.subs.add(o)}})()}}return n.\u0275fac=function(t){return new(t||n)(He(Cf),He(Yf),He(iC),He(oa),He(bL),He(Cc))},n.\u0275cmp=tt({type:n,selectors:[["ng-component"]],features:[Ot],decls:26,vars:22,consts:[[2,"position","sticky","top","0","background-color","#fff","width","100%","height","60px","z-index","100"],["id","displayWidthSlider",2,"margin-left","6px"],["id","fieldName+'Slider'","min","3","max","12","step","1",3,"value","disabled","valueChange","input"],["id","reportCount",2,"margin-bottom","10px","font-weight","bold","margin-bottom","10px"],["id","centerGrid"],[1,"imageListingComponent"],["id","htmlThumb"],[1,"bigDiv"],["id","hiddenDetails"],[1,"listContainer"],["class","card",3,"hidden",4,"ngFor","ngForOf"],[1,"scThumbnail_backdrop",3,"id","hidden"],[3,"id"],[1,"card-body"],[1,"card-footer"],["class","pdfControls",4,"ngIf"],[1,"mat-focus-indicator","mat-button","mat-raised-button","mat-button-base",2,"background","#a1c539",3,"click"],[1,"mat-focus-indicator","mat-button","mat-raised-button","mat-button-base",2,"background","#c60000",3,"click"],[1,"card",3,"hidden"],[1,"card-link"],[1,"card-header",3,"innerHtml"],[2,"padding","10px"],["class","shimmer placeholder",4,"ngIf"],[3,"src","id","class","click",4,"ngIf"],["class","thumb_canvas",3,"id","click",4,"ngIf"],[1,"shimmer","placeholder"],[3,"src","id","click"],[1,"thumb_canvas",3,"id","click"],[1,"pdfControls"],[1,"mat-focus-indicator","mat-button","mat-raised-button","mat-button-base",3,"click"]],template:function(t,i){1&t&&(St(0,"div"),St(1,"label"),or(2),Tt(),St(3,"div",0),St(4,"div",1),St(5,"div"),or(6,"Display Width"),Tt(),St(7,"mat-slider",2),mn("valueChange",function(s){return i.initialImageSize=s})("input",function(s){return i.onSliderChange(s)}),Tt(),Tt(),Tt(),Ai(8,"div",3),St(9,"div",4),St(10,"div",5),Ai(11,"div",6),St(12,"div",7),St(13,"div",8),St(14,"div",9),$s(15,tj,8,5,"div",10),Tt(),Tt(),Tt(),Tt(),Tt(),Tt(),St(16,"div",11),St(17,"div",12),St(18,"div",13),Ai(19,"canvas",12),Tt(),St(20,"div",14),$s(21,nj,7,2,"div",15),St(22,"button",16),mn("click",function(){return i.openDocument()}),or(23,"Open"),Tt(),St(24,"button",17),mn("click",function(s){return i.closeThumb(s)}),or(25,"Close"),Tt(),Tt(),Tt(),Tt()),2&t&&(function Ny(n,e,t,i,r){Ti(Qn,Ki,ks(Be(),n,e,t,i,r),!0)}("",i.fieldName,"_",i.key,""),an(1),xl("sc-thumbnail-label ",i.componentDefinition.mandatory?"mandatory":""," "),an(1),Pl(i.componentDefinition.label),an(5),bn("value",i.initialImageSize)("disabled",i.readOnly),an(7),Oy("grid-template-columns: repeat(auto-fill, minmax(",3*i.initialImageSize,"%, 1fr));"),an(1),bn("ngForOf",i.files),an(1),Ws("id","scThumbnail_backdrop_",i.key,""),bn("hidden",!i.showModal),an(1),xl("card scThumbnail_modal ",i.currentView,""),Ws("id","scThumbnail_modal_",i.key,""),an(2),Ws("id","modalCanvas_",i.key,""),an(2),bn("ngIf","pdf"===i.currentView))},directives:[yD,Tb,Mb],styles:['.sc-thumbnail-label{display:block;padding:10px 5px}.listContainer{width:100%;display:grid;grid-template-columns:repeat(auto-fill,minmax(30%,1fr));grid-auto-rows:auto;grid-column-gap:20px;column-gap:20px;grid-row-gap:20px;row-gap:20px;grid-auto-flow:row;margin-top:10px}.listRow{display:flex;flex-direction:column;justify-content:flex-start}.thumb_canvas{width:100%;min-height:50px;cursor:pointer}.card{min-height:200px;background:#e2e2e2;display:table}.card-header{background:#01769e;color:#fff;height:30px;padding-left:10px;font-size:14px;line-height:30px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;display:inline-block;overflow-wrap:break-word;position:absolute;width:calc(100% - 10px);overflow:hidden}.card-header:hover{background:#005f80}.card-link{text-decoration:none;display:table-row;height:30px;width:100%;position:relative}.card-image-top{cursor:pointer;width:100%;height:auto}.type-pdf{width:30%}.card-body{width:100%;display:table-cell;text-align:center;vertical-align:middle}.card-footer{position:relative;margin:10px;display:flex;gap:1rem;width:100%;justify-content:end}a{color:inherit}.listContainer:before{content:none!important}.listContainer:after{content:none!important}.slider{background-color:transparent;width:100px!important}.slider.slider-horizontal{position:relative;overflow:visible!important}.slider.slider-horizontal .slider-handle{margin-top:0}.slider-selection{background-image:linear-gradient(to bottom,#1a8fff 0,#1a8fff 100%)!important}.bigDiv{margin-top:20px}.swal-wide{width:90%!important}.modalTable th{font-weight:700;font-size:14px;padding:8px;text-align:left}.modalTable td{border:1px solid #ddd;font-size:14px;text-align:left;height:35px;padding:8px}.thumb-nails-modal-class .modal-header{display:none}.thumb-nails-modal-class .mat-dialog-actions{flex-direction:row-reverse}.thumb-nails-modal-class .mat-dialog-actions button{color:#fff;margin-right:20px}.placeholder{display:block;width:100%;height:50px}.placeholder:before{content:" ";background:#d1d1d1;width:100%;height:50px;position:absolute;top:0;left:0}.placeholder:after{content:" ";background:#d1d1d1;width:100%;height:8px;position:absolute;bottom:9px;left:0}.shimmer{color:gray;display:inline-block;-webkit-mask:linear-gradient(-60deg,#000 30%,#0005,#000 70%) right/300% 100%;background-repeat:no-repeat;animation:shimmer 1s infinite;font-size:50px;max-width:200px;padding-bottom:20px;position:relative}@keyframes shimmer{to{-webkit-mask-position:left}}.scThumbnail_backdrop{width:100vw;height:100vh;position:fixed;top:0;left:0;background:#0000000d;z-index:1000;display:flex;justify-content:center;align-items:center;animation:zoom-in-zoom-out 2s ease-out}.scThumbnail_modal{padding:20px;pointer-events:auto;box-sizing:border-box;z-index:1000;display:none;max-height:100%;background:#fff;border-radius:6px;box-shadow:1px 1px 20px #00000047;max-width:80vw;max-height:80vh;align-items:center;justify-content:center;flex-direction:column}.scThumbnail_modal canvas{max-width:100%;max-height:100%}.scThumbnail_modal .card-body{width:auto;position:relative;overflow:auto}.scThumbnail_modal.img .card-body{padding:0}.pdfControls{position:absolute;left:0;width:100%;display:block;gap:1rem;justify-content:start;align-items:start}\n'],encapsulation:2,changeDetection:0}),n})(),ij=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[Yf],imports:[[ba,Xb]]}),n})();const iu={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if("undefined"==typeof window)return iu.schedule(n,0);if(void 0===window.requestAnimationFrame)return iu.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let Op;function pj(n,e,t){let i=t;return function aj(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((r,s)=>!("*"===r||!function cj(n,e){if(!Op){const t=Element.prototype;Op=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&Op.call(n,e)}(n,r)||(i=s,0))),i}class mj{constructor(e,t){this.componentFactory=t.get(br).resolveComponentFactory(e)}create(e){return new _j(this.componentFactory,e)}}class _j{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new k.ReplaySubject(1),this.events=this.eventEmitters.pipe((0,j.switchMap)(i=>(0,k.merge)(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(Yt),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=iu.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function uj(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=Nt.create({providers:[],parent:this.injector}),i=function fj(n,e){const t=n.childNodes,i=e.map(()=>[]);let r=-1;e.some((s,o)=>"*"===s&&(r=o,!0));for(let s=0,o=t.length;s<o;++s){const a=t[s],l=pj(a,e,r);-1!==l&&i[l].push(a)}return i}(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,i,e),this.viewChangeDetectorRef=this.componentRef.injector.get(oa),this.implementsOnChanges=function lj(n){return"function"==typeof n}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(eo).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:e})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:i,templateName:r})=>e.instance[i].pipe((0,j.map)(o=>({name:r,value:o}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=iu.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[e];if(i)return void(i.currentValue=t);const r=this.unchangedInputs.has(e),s=r?void 0:this.getInputValue(e);this.inputChanges[e]=new uu(s,t,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class yj extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}let Ej=(()=>{class n{constructor(){this.convertToCustomElement=(t,i,r,s,o)=>{if(s||(s="NOT-SET"),!customElements.get(i)){const a=function vj(n,e){const t=function hj(n,e){return e.get(br).resolveComponentFactory(n).inputs}(n,e.injector),i=e.strategyFactory||new mj(n,e.injector),r=function dj(n){const e={};return n.forEach(({propName:t,templateName:i})=>{e[function sj(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(i)]=t}),e}(t);class s extends yj{constructor(a){super(),this.injector=a}get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(r[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=function oj(n,e,t){if("function"!=typeof CustomEvent){const s=n.createEvent("CustomEvent");return s.initCustomEvent(e,!1,!1,t),s}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}(this.ownerDocument,a.name,a.value);this.dispatchEvent(l)})}}return s.observedAttributes=Object.keys(r),t.forEach(({propName:o})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(a){this.ngElementStrategy.setInputValue(o,a)},configurable:!0,enumerable:!0})}),s}(t,{injector:r}),l=a.prototype.connectedCallback||function(){};a.prototype.connectedCallback=function(){this.setAttribute("fb-component-version",s),o&&this.setAttribute("is-static-panel",o.isStaticPanel),l.call(this)},customElements.define(i,a)}}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bj=(()=>{class n{constructor(t,i){this.injector=t,this.customElementService=i,i.convertToCustomElement(ED,"sc-thumbnail",this.injector,"7.5.7")}}return n.\u0275fac=function(t){return new(t||n)(ze(Nt),ze(Ej))},n.\u0275mod=At({type:n,bootstrap:[ED]}),n.\u0275inj=Y({imports:[[ba,Xb,Xk,Q2,U2,Qk,ij]]}),n})(),Cj=(()=>{class n{constructor(){}ngDoBootstrap(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[],imports:[[ba,bj]]}),n})();w1().bootstrapModule(Cj).catch(n=>console.error(n))},915:(module,__unused_webpack_exports,__webpack_require__)=>{var _asyncToGenerator=__webpack_require__(786).default,_e;globalThis,_e=()=>(()=>{"use strict";var __webpack_modules__=[,(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.VerbosityLevel=I.Util=I.UnknownErrorException=I.UnexpectedResponseException=I.UNSUPPORTED_FEATURES=I.TextRenderingMode=I.StreamType=I.RenderingIntentFlag=I.PermissionFlag=I.PasswordResponses=I.PasswordException=I.PageActionEventType=I.OPS=I.MissingPDFException=I.LINE_FACTOR=I.LINE_DESCENT_FACTOR=I.InvalidPDFException=I.ImageKind=I.IDENTITY_MATRIX=I.FormatError=I.FontType=I.FeatureTest=I.FONT_IDENTITY_MATRIX=I.DocumentActionEventType=I.CMapCompressionType=I.BaseException=I.AnnotationType=I.AnnotationStateModelType=I.AnnotationReviewState=I.AnnotationReplyType=I.AnnotationMode=I.AnnotationMarkedState=I.AnnotationFlag=I.AnnotationFieldFlag=I.AnnotationEditorType=I.AnnotationEditorPrefix=I.AnnotationEditorParamsType=I.AnnotationBorderStyleType=I.AnnotationActionEventType=I.AbortException=void 0,I.arrayByteLength=he,I.arraysToBytes=function ke(be){const oe=be.length;if(1===oe&&be[0]instanceof Uint8Array)return be[0];let le=0;for(let it=0;it<oe;it++)le+=he(be[it]);let Oe=0;const Ge=new Uint8Array(le);for(let it=0;it<oe;it++){let tt=be[it];tt instanceof Uint8Array||(tt="string"==typeof tt?ie(tt):new Uint8Array(tt));const Wt=tt.byteLength;Ge.set(tt,Oe),Oe+=Wt}return Ge},I.assert=function D(be,oe){be||te(oe)},I.bytesToString=function K(be){("object"!=typeof be||null===be||void 0===be.length)&&te("Invalid argument for bytesToString");const oe=be.length;if(oe<8192)return String.fromCharCode.apply(null,be);const Oe=[];for(let Ge=0;Ge<oe;Ge+=8192){const it=Math.min(Ge+8192,oe),tt=be.subarray(Ge,it);Oe.push(String.fromCharCode.apply(null,tt))}return Oe.join("")},I.createPromiseCapability=function Je(){const be=Object.create(null);let oe=!1;return Object.defineProperty(be,"settled",{get:()=>oe}),be.promise=new Promise(function(le,Oe){be.resolve=function(Ge){oe=!0,le(Ge)},be.reject=function(Ge){oe=!0,Oe(Ge)}}),be},I.createValidAbsoluteUrl=function R(be,oe=null,le=null){if(!be)return null;try{if(le&&"string"==typeof be){if(le.addDefaultProtocol&&be.startsWith("www.")){const Ge=be.match(/\./g);Ge&&Ge.length>=2&&(be=`http://${be}`)}if(le.tryConvertEncoding)try{be=vt(be)}catch(Ge){}}const Oe=oe?new URL(be,oe):new URL(be);if(function C(be){if(!be)return!1;switch(be.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(Oe))return Oe}catch(Oe){}return null},I.escapeString=function yt(be){return be.replace(/([()\\\n\r])/g,oe=>"\n"===oe?"\\n":"\r"===oe?"\\r":`\\${oe}`)},I.getModificationDate=function Fe(be=new Date){return[be.getUTCFullYear().toString(),(be.getUTCMonth()+1).toString().padStart(2,"0"),be.getUTCDate().toString().padStart(2,"0"),be.getUTCHours().toString().padStart(2,"0"),be.getUTCMinutes().toString().padStart(2,"0"),be.getUTCSeconds().toString().padStart(2,"0")].join("")},I.getVerbosityLevel=function De(){return se},I.info=function Ae(be){se>=ye.INFOS&&console.log(`Info: ${be}`)},I.isArrayBuffer=function rn(be){return"object"==typeof be&&null!==be&&void 0!==be.byteLength},I.isArrayEqual=function Te(be,oe){if(be.length!==oe.length)return!1;for(let le=0,Oe=be.length;le<Oe;le++)if(be[le]!==oe[le])return!1;return!0},I.isAscii=function $t(be){return/^[\x00-\x7F]*$/.test(be)},I.objectFromMap=function Ee(be){const oe=Object.create(null);for(const[le,Oe]of be)oe[le]=Oe;return oe},I.objectSize=function we(be){return Object.keys(be).length},I.setVerbosityLevel=function ee(be){Number.isInteger(be)&&(se=be)},I.shadow=Q,I.string32=function me(be){return String.fromCharCode(be>>24&255,be>>16&255,be>>8&255,255&be)},I.stringToBytes=ie,I.stringToPDFString=function lt(be){if(be[0]>="\xef"){let le;if("\xfe"===be[0]&&"\xff"===be[1]?le="utf-16be":"\xff"===be[0]&&"\xfe"===be[1]?le="utf-16le":"\xef"===be[0]&&"\xbb"===be[1]&&"\xbf"===be[2]&&(le="utf-8"),le)try{const Oe=new TextDecoder(le,{fatal:!0}),Ge=ie(be);return Oe.decode(Ge)}catch(Oe){xe(`stringToPDFString: "${Oe}".`)}}const oe=[];for(let le=0,Oe=be.length;le<Oe;le++){const Ge=Ke[be.charCodeAt(le)];oe.push(Ge?String.fromCharCode(Ge):be.charAt(le))}return oe.join("")},I.stringToUTF16BEString=function Lt(be){const oe=["\xfe\xff"];for(let le=0,Oe=be.length;le<Oe;le++){const Ge=be.charCodeAt(le);oe.push(String.fromCharCode(Ge>>8&255),String.fromCharCode(255&Ge))}return oe.join("")},I.stringToUTF8String=vt,I.unreachable=te,I.utf8StringToString=function Ct(be){return unescape(encodeURIComponent(be))},I.warn=xe,_e(2),I.IDENTITY_MATRIX=[1,0,0,1,0,0],I.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],I.LINE_FACTOR=1.35,I.LINE_DESCENT_FACTOR=.35,I.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},I.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},I.AnnotationEditorPrefix="pdfjs_internal_editor_",I.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},I.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},I.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},I.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},I.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},I.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},I.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},I.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},I.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},I.AnnotationReplyType={GROUP:"Group",REPLY:"R"},I.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},I.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},I.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},I.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},I.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},I.PageActionEventType={O:"PageOpen",C:"PageClose"},I.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},I.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const ye={ERRORS:0,WARNINGS:1,INFOS:5};I.VerbosityLevel=ye,I.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},I.OPS={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,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},I.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"},I.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let se=ye.WARNINGS;function xe(be){se>=ye.WARNINGS&&console.log(`Warning: ${be}`)}function te(be){throw new Error(be)}function Q(be,oe,le){return Object.defineProperty(be,oe,{value:le,enumerable:!0,configurable:!0,writable:!1}),le}const Y=function(){function oe(le,Oe){this.constructor===oe&&te("Cannot initialize BaseException."),this.message=le,this.name=Oe}return oe.prototype=new Error,oe.constructor=oe,oe}();function ie(be){"string"!=typeof be&&te("Invalid argument for stringToBytes");const oe=be.length,le=new Uint8Array(oe);for(let Oe=0;Oe<oe;++Oe)le[Oe]=255&be.charCodeAt(Oe);return le}function he(be){return void 0!==be.length?be.length:void 0!==be.byteLength?be.byteLength:void te("Invalid argument for arrayByteLength")}I.BaseException=Y,I.PasswordException=class J extends Y{constructor(oe,le){super(oe,"PasswordException"),this.code=le}},I.UnknownErrorException=class de extends Y{constructor(oe,le){super(oe,"UnknownErrorException"),this.details=le}},I.InvalidPDFException=class ue extends Y{constructor(oe){super(oe,"InvalidPDFException")}},I.MissingPDFException=class m extends Y{constructor(oe){super(oe,"MissingPDFException")}},I.UnexpectedResponseException=class S extends Y{constructor(oe,le){super(oe,"UnexpectedResponseException"),this.status=le}},I.FormatError=class F extends Y{constructor(oe){super(oe,"FormatError")}},I.AbortException=class L extends Y{constructor(oe){super(oe,"AbortException")}},I.FeatureTest=class X{static get isLittleEndian(){return Q(this,"isLittleEndian",function Ne(){const be=new Uint8Array(4);return be[0]=1,1===new Uint32Array(be.buffer,0,1)[0]}())}static get isEvalSupported(){return Q(this,"isEvalSupported",function Ve(){try{return new Function(""),!0}catch(be){return!1}}())}static get isOffscreenCanvasSupported(){return Q(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}};const je=[...Array(256).keys()].map(be=>be.toString(16).padStart(2,"0"));class Ze{static makeHexColor(oe,le,Oe){return`#${je[oe]}${je[le]}${je[Oe]}`}static scaleMinMax(oe,le){let Oe;oe[0]?(oe[0]<0&&(Oe=le[0],le[0]=le[1],le[1]=Oe),le[0]*=oe[0],le[1]*=oe[0],oe[3]<0&&(Oe=le[2],le[2]=le[3],le[3]=Oe),le[2]*=oe[3],le[3]*=oe[3]):(Oe=le[0],le[0]=le[2],le[2]=Oe,Oe=le[1],le[1]=le[3],le[3]=Oe,oe[1]<0&&(Oe=le[2],le[2]=le[3],le[3]=Oe),le[2]*=oe[1],le[3]*=oe[1],oe[2]<0&&(Oe=le[0],le[0]=le[1],le[1]=Oe),le[0]*=oe[2],le[1]*=oe[2]),le[0]+=oe[4],le[1]+=oe[4],le[2]+=oe[5],le[3]+=oe[5]}static transform(oe,le){return[oe[0]*le[0]+oe[2]*le[1],oe[1]*le[0]+oe[3]*le[1],oe[0]*le[2]+oe[2]*le[3],oe[1]*le[2]+oe[3]*le[3],oe[0]*le[4]+oe[2]*le[5]+oe[4],oe[1]*le[4]+oe[3]*le[5]+oe[5]]}static applyTransform(oe,le){return[oe[0]*le[0]+oe[1]*le[2]+le[4],oe[0]*le[1]+oe[1]*le[3]+le[5]]}static applyInverseTransform(oe,le){const Oe=le[0]*le[3]-le[1]*le[2];return[(oe[0]*le[3]-oe[1]*le[2]+le[2]*le[5]-le[4]*le[3])/Oe,(-oe[0]*le[1]+oe[1]*le[0]+le[4]*le[1]-le[5]*le[0])/Oe]}static getAxialAlignedBoundingBox(oe,le){const Oe=Ze.applyTransform(oe,le),Ge=Ze.applyTransform(oe.slice(2,4),le),it=Ze.applyTransform([oe[0],oe[3]],le),tt=Ze.applyTransform([oe[2],oe[1]],le);return[Math.min(Oe[0],Ge[0],it[0],tt[0]),Math.min(Oe[1],Ge[1],it[1],tt[1]),Math.max(Oe[0],Ge[0],it[0],tt[0]),Math.max(Oe[1],Ge[1],it[1],tt[1])]}static inverseTransform(oe){const le=oe[0]*oe[3]-oe[1]*oe[2];return[oe[3]/le,-oe[1]/le,-oe[2]/le,oe[0]/le,(oe[2]*oe[5]-oe[4]*oe[3])/le,(oe[4]*oe[1]-oe[5]*oe[0])/le]}static apply3dTransform(oe,le){return[oe[0]*le[0]+oe[1]*le[1]+oe[2]*le[2],oe[3]*le[0]+oe[4]*le[1]+oe[5]*le[2],oe[6]*le[0]+oe[7]*le[1]+oe[8]*le[2]]}static singularValueDecompose2dScale(oe){const le=[oe[0],oe[2],oe[1],oe[3]],Oe=oe[0]*le[0]+oe[1]*le[2],Ge=oe[0]*le[1]+oe[1]*le[3],it=oe[2]*le[0]+oe[3]*le[2],tt=oe[2]*le[1]+oe[3]*le[3],Wt=(Oe+tt)/2,Rt=Math.sqrt(ls(Oe+tt,2)-4*(Oe*tt-it*Ge))/2,Ft=Wt-Rt||1;return[Math.sqrt(Wt+Rt||1),Math.sqrt(Ft)]}static normalizeRect(oe){const le=oe.slice(0);return oe[0]>oe[2]&&(le[0]=oe[2],le[2]=oe[0]),oe[1]>oe[3]&&(le[1]=oe[3],le[3]=oe[1]),le}static intersect(oe,le){const Oe=Math.max(Math.min(oe[0],oe[2]),Math.min(le[0],le[2])),Ge=Math.min(Math.max(oe[0],oe[2]),Math.max(le[0],le[2]));if(Oe>Ge)return null;const it=Math.max(Math.min(oe[1],oe[3]),Math.min(le[1],le[3])),tt=Math.min(Math.max(oe[1],oe[3]),Math.max(le[1],le[3]));return it>tt?null:[Oe,it,Ge,tt]}static bezierBoundingBox(oe,le,Oe,Ge,it,tt,Wt,Rt){const Et=[],Ft=[[],[]];let At,sn,vn,We,jt,Bt,Tn,wn;for(let er=0;er<2;++er)if(0===er?(sn=6*oe-12*Oe+6*it,At=-3*oe+9*Oe-9*it+3*Wt,vn=3*Oe-3*oe):(sn=6*le-12*Ge+6*tt,At=-3*le+9*Ge-9*tt+3*Rt,vn=3*Ge-3*le),Math.abs(At)<1e-12){if(Math.abs(sn)<1e-12)continue;We=-vn/sn,0<We&&We<1&&Et.push(We)}else Tn=sn*sn-4*vn*At,wn=Math.sqrt(Tn),!(Tn<0)&&(jt=(-sn+wn)/(2*At),0<jt&&jt<1&&Et.push(jt),Bt=(-sn-wn)/(2*At),0<Bt&&Bt<1&&Et.push(Bt));let qt,Kt=Et.length;const ri=Kt;for(;Kt--;)We=Et[Kt],qt=1-We,Ft[0][Kt]=qt*qt*qt*oe+3*qt*qt*We*Oe+3*qt*We*We*it+We*We*We*Wt,Ft[1][Kt]=qt*qt*qt*le+3*qt*qt*We*Ge+3*qt*We*We*tt+We*We*We*Rt;return Ft[0][ri]=oe,Ft[1][ri]=le,Ft[0][ri+1]=Wt,Ft[1][ri+1]=Rt,Ft[0].length=Ft[1].length=ri+2,[Math.min(...Ft[0]),Math.min(...Ft[1]),Math.max(...Ft[0]),Math.max(...Ft[1])]}}I.Util=Ze;const Ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function vt(be){return decodeURIComponent(escape(be))}},(Re,I,_e)=>{_e(3)},(Re,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.isNodeJS=void 0;const _e=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);I.isNodeJS=_e},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var Re,_e,k,j,fe,ce,pe,ne,P,CD,O,G;Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(5),_display_utils=__w_pdfjs_require__(8),_font_loader=__w_pdfjs_require__(11),_canvas=__w_pdfjs_require__(12),_worker_options=__w_pdfjs_require__(15),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(16),_metadata=__w_pdfjs_require__(17),_optional_content_config=__w_pdfjs_require__(18),_transport_stream=__w_pdfjs_require__(19),_xfa_text=__w_pdfjs_require__(20);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:E,NodeCMapReaderFactory:d,NodeStandardFontDataFactory:h}=__w_pdfjs_require__(21);exports.DefaultCanvasFactory=DefaultCanvasFactory=E,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=d,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=h}function setPDFNetworkStreamFactory(E){createPDFNetworkStream=E}function getDocument(E){const d=new PDFDocumentLoadingTask;let h;if("string"==typeof E||E instanceof URL)h={url:E};else if((0,_util.isArrayBuffer)(E))h={data:E};else if(E instanceof PDFDataRangeTransport)h={range:E};else{if("object"!=typeof E)throw new Error("Invalid parameter in getDocument, need either string, URL, TypedArray, or parameter object.");if(!E.url&&!E.data&&!E.range)throw new Error("Invalid parameter object: need either .data, .range or .url");h=E}const y=Object.create(null);let w=null,x=null;for(const f in h){const g=h[f];switch(f){case"url":if("undefined"!=typeof window)try{y[f]=new URL(g,window.location).href;continue}catch(T){(0,_util.warn)(`Cannot create valid URL: "${T}".`)}else if("string"==typeof g||g instanceof URL){y[f]=g.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":w=g;continue;case"worker":x=g;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&g instanceof Buffer)y[f]=new Uint8Array(g);else{if(g instanceof Uint8Array)break;if("string"==typeof g)y[f]=(0,_util.stringToBytes)(g);else if("object"!=typeof g||null===g||isNaN(g.length)){if(!(0,_util.isArrayBuffer)(g))throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");y[f]=new Uint8Array(g)}else y[f]=new Uint8Array(g)}continue}y[f]=g}if(y.CMapReaderFactory=y.CMapReaderFactory||DefaultCMapReaderFactory,y.StandardFontDataFactory=y.StandardFontDataFactory||DefaultStandardFontDataFactory,y.ignoreErrors=!0!==y.stopAtErrors,y.fontExtraProperties=!0===y.fontExtraProperties,y.pdfBug=!0===y.pdfBug,y.enableXfa=!0===y.enableXfa,(!Number.isInteger(y.rangeChunkSize)||y.rangeChunkSize<1)&&(y.rangeChunkSize=DEFAULT_RANGE_CHUNK_SIZE),("string"!=typeof y.docBaseUrl||(0,_display_utils.isDataScheme)(y.docBaseUrl))&&(y.docBaseUrl=null),(!Number.isInteger(y.maxImageSize)||y.maxImageSize<-1)&&(y.maxImageSize=-1),"string"!=typeof y.cMapUrl&&(y.cMapUrl=null),"string"!=typeof y.standardFontDataUrl&&(y.standardFontDataUrl=null),"boolean"!=typeof y.useWorkerFetch&&(y.useWorkerFetch=y.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&y.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!=typeof y.isEvalSupported&&(y.isEvalSupported=!0),"boolean"!=typeof y.disableFontFace&&(y.disableFontFace=_is_node.isNodeJS),"boolean"!=typeof y.useSystemFonts&&(y.useSystemFonts=!_is_node.isNodeJS&&!y.disableFontFace),("object"!=typeof y.ownerDocument||null===y.ownerDocument)&&(y.ownerDocument=globalThis.document),"boolean"!=typeof y.disableRange&&(y.disableRange=!1),"boolean"!=typeof y.disableStream&&(y.disableStream=!1),"boolean"!=typeof y.disableAutoFetch&&(y.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(y.verbosity),!x){const f={verbosity:y.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};x=f.port?PDFWorker.fromPort(f):new PDFWorker(f),d._worker=x}const v=d.docId;return x.promise.then(function(){if(d.destroyed)throw new Error("Loading aborted");const f=_fetchDocument(x,y,w,v),g=new Promise(function(T){let N;w?N=new _transport_stream.PDFDataTransportStream({length:y.length,initialData:y.initialData,progressiveDone:y.progressiveDone,contentDispositionFilename:y.contentDispositionFilename,disableRange:y.disableRange,disableStream:y.disableStream},w):y.data||(N=createPDFNetworkStream({url:y.url,length:y.length,httpHeaders:y.httpHeaders,withCredentials:y.withCredentials,rangeChunkSize:y.rangeChunkSize,disableRange:y.disableRange,disableStream:y.disableStream})),T(N)});return Promise.all([f,g]).then(function([T,N]){if(d.destroyed)throw new Error("Loading aborted");const H=new _message_handler.MessageHandler(v,T,x.port),M=new WorkerTransport(H,d,N,y);d._transport=M,H.send("Ready",null)})}).catch(d._capability.reject),d}function _fetchDocument(E,d,h,y){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(function*(E,d,h,y){if(E.destroyed)throw new Error("Worker was destroyed");h&&(d.length=h.length,d.initialData=h.initialData,d.progressiveDone=h.progressiveDone,d.contentDispositionFilename=h.contentDispositionFilename);const w=yield E.messageHandler.sendWithPromise("GetDocRequest",{docId:y,apiVersion:"2.16.105",source:{data:d.data,url:d.url,password:d.password,disableAutoFetch:d.disableAutoFetch,rangeChunkSize:d.rangeChunkSize,length:d.length},maxImageSize:d.maxImageSize,disableFontFace:d.disableFontFace,docBaseUrl:d.docBaseUrl,ignoreErrors:d.ignoreErrors,isEvalSupported:d.isEvalSupported,fontExtraProperties:d.fontExtraProperties,enableXfa:d.enableXfa,useSystemFonts:d.useSystemFonts,cMapUrl:d.useWorkerFetch?d.cMapUrl:null,standardFontDataUrl:d.useWorkerFetch?d.standardFontDataUrl:null});if(d.data&&(d.data=null),E.destroyed)throw new Error("Worker was destroyed");return w})).apply(this,arguments)}const I=class{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+Up(I,Re)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){var d=this;return _asyncToGenerator(function*(){var h;d.destroyed=!0,yield null==(h=d._transport)?void 0:h.destroy(),d._transport=null,d._worker&&(d._worker.destroy(),d._worker=null)})()}};let PDFDocumentLoadingTask=I;Re=new WeakMap,Pe(PDFDocumentLoadingTask,Re,0),exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(d,h,y=!1,w=null){this.length=d,this.initialData=h,this.progressiveDone=y,this.contentDispositionFilename=w,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(d){this._rangeListeners.push(d)}addProgressListener(d){this._progressListeners.push(d)}addProgressiveReadListener(d){this._progressiveReadListeners.push(d)}addProgressiveDoneListener(d){this._progressiveDoneListeners.push(d)}onDataRange(d,h){for(const y of this._rangeListeners)y(d,h)}onDataProgress(d,h){this._readyCapability.promise.then(()=>{for(const y of this._progressListeners)y(d,h)})}onDataProgressiveRead(d){this._readyCapability.promise.then(()=>{for(const h of this._progressiveReadListeners)h(d)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const d of this._progressiveDoneListeners)d()})}transportReady(){this._readyCapability.resolve()}requestDataRange(d,h){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(d,h){var w,y=this;this._pdfInfo=d,this._transport=h,Object.defineProperty(this,"fingerprint",{get(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:(w=_asyncToGenerator(function*(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),y.stats||{streamTypes:{},fontTypes:{}}}),function(){return w.apply(this,arguments)})})}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get stats(){return this._transport.stats}get isPureXfa(){return!!this._transport._htmlForXfa}get allXfaHtml(){return this._transport._htmlForXfa}getPage(d){return this._transport.getPage(d)}getPageIndex(d){return this._transport.getPageIndex(d)}getDestinations(){return this._transport.getDestinations()}getDestination(d){return this._transport.getDestination(d)}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()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(d=!1){return this._transport.startCleanup(d||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(d,h,y,w,x=!1){this._pageIndex=d,this._pageInfo=h,this._ownerDocument=w,this._transport=y,this._stats=x?new _display_utils.StatTimer:null,this._pdfBug=x,this.commonObjs=y.commonObjs,this.objs=new PDFObjects,this._bitmaps=new Set,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=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:d,rotation:h=this.rotate,offsetX:y=0,offsetY:w=0,dontFlip:x=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:d,rotation:h,offsetX:y,offsetY:w,dontFlip:x})}getAnnotations({intent:d="display"}={}){const h=this._transport.getRenderingIntent(d);let y=this._annotationPromises.get(h.cacheKey);return y||(y=this._transport.getAnnotations(this._pageIndex,h.renderingIntent),this._annotationPromises.set(h.cacheKey,y),y=y.then(w=>{for(const x of w)void 0!==x.titleObj&&Object.defineProperty(x,"title",{get:()=>((0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),x.titleObj.str)}),void 0!==x.contentsObj&&Object.defineProperty(x,"contents",{get:()=>((0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),x.contentsObj.str)});return w})),y}getJSActions(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}getXfa(){var d=this;return _asyncToGenerator(function*(){var h;return(null==(h=d._transport._htmlForXfa)?void 0:h.children[d._pageIndex])||null})()}render({canvasContext:d,viewport:h,intent:y="display",annotationMode:w=_util.AnnotationMode.ENABLE,transform:x=null,imageLayer:v=null,canvasFactory:f=null,background:g=null,optionalContentConfigPromise:T=null,annotationCanvasMap:N=null,pageColors:H=null,printAnnotationStorage:M=null}){var ee,De;void 0!==(null==(ee=arguments[0])?void 0:ee.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&w===_util.AnnotationMode.ENABLE&&(w=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null==(De=arguments[0])?void 0:De.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&w===_util.AnnotationMode.ENABLE&&(w=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");const W=this._transport.getRenderingIntent(y,w,M);this.pendingCleanup=!1,T||(T=this._transport.getOptionalContentConfig());let ye=this._intentStates.get(W.cacheKey);ye||(ye=Object.create(null),this._intentStates.set(W.cacheKey,ye)),ye.streamReaderCancelTimeout&&(clearTimeout(ye.streamReaderCancelTimeout),ye.streamReaderCancelTimeout=null);const Se=f||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),ve=!!(W.renderingIntent&_util.RenderingIntentFlag.PRINT);ye.displayReadyCapability||(ye.displayReadyCapability=(0,_util.createPromiseCapability)(),ye.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(W));const Ie=Ae=>{ye.renderTasks.delete(ge),(this.cleanupAfterRender||ve)&&(this.pendingCleanup=!0),this._tryCleanup(),Ae?(ge.capability.reject(Ae),this._abortOperatorList({intentState:ye,reason:Ae instanceof Error?Ae:new Error(Ae)})):ge.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},ge=new InternalRenderTask({callback:Ie,params:{canvasContext:d,viewport:h,transform:x,imageLayer:v,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:N,operatorList:ye.operatorList,pageIndex:this._pageIndex,canvasFactory:Se,useRequestAnimationFrame:!ve,pdfBug:this._pdfBug,pageColors:H});(ye.renderTasks||(ye.renderTasks=new Set)).add(ge);const se=ge.task;return Promise.all([ye.displayReadyCapability.promise,T]).then(([Ae,xe])=>{this.pendingCleanup?Ie():(this._stats&&this._stats.time("Rendering"),ge.initializeGraphics({transparency:Ae,optionalContentConfig:xe}),ge.operatorListChanged())}).catch(Ie),se}getOperatorList({intent:d="display",annotationMode:h=_util.AnnotationMode.ENABLE,printAnnotationStorage:y=null}={}){const x=this._transport.getRenderingIntent(d,h,y,!0);let f,v=this._intentStates.get(x.cacheKey);return v||(v=Object.create(null),this._intentStates.set(x.cacheKey,v)),v.opListReadCapability||(f=Object.create(null),f.operatorListChanged=function w(){v.operatorList.lastChunk&&(v.opListReadCapability.resolve(v.operatorList),v.renderTasks.delete(f))},v.opListReadCapability=(0,_util.createPromiseCapability)(),(v.renderTasks||(v.renderTasks=new Set)).add(f),v.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(x)),v.opListReadCapability.promise}streamTextContent({disableCombineTextItems:d=!1,includeMarkedContent:h=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==d,includeMarkedContent:!0===h},{highWaterMark:100,size:w=>w.items.length})}getTextContent(d={}){if(this._transport._htmlForXfa)return this.getXfa().then(y=>_xfa_text.XfaText.textContent(y));const h=this.streamTextContent(d);return new Promise(function(y,w){const v=h.getReader(),f={items:[],styles:Object.create(null)};!function x(){v.read().then(function({value:g,done:T}){T?y(f):(Object.assign(f.styles,g.styles),f.items.push(...g.items),x())},w)}()})}getStructTree(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}_destroy(){this.destroyed=!0;const d=[];for(const h of this._intentStates.values())if(this._abortOperatorList({intentState:h,reason:new Error("Page was destroyed."),force:!0}),!h.opListReadCapability)for(const y of h.renderTasks)d.push(y.completed),y.cancel();this.objs.clear();for(const h of this._bitmaps)h.close();return this._bitmaps.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(d)}cleanup(d=!1){return this.pendingCleanup=!0,this._tryCleanup(d)}_tryCleanup(d=!1){if(!this.pendingCleanup)return!1;for(const{renderTasks:h,operatorList:y}of this._intentStates.values())if(h.size>0||!y.lastChunk)return!1;this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,d&&this._stats&&(this._stats=new _display_utils.StatTimer);for(const h of this._bitmaps)h.close();return this._bitmaps.clear(),this.pendingCleanup=!1,!0}_startRenderPage(d,h){const y=this._intentStates.get(h);!y||(this._stats&&this._stats.timeEnd("Page Request"),y.displayReadyCapability&&y.displayReadyCapability.resolve(d))}_renderPageChunk(d,h){for(let y=0,w=d.length;y<w;y++)h.operatorList.fnArray.push(d.fnArray[y]),h.operatorList.argsArray.push(d.argsArray[y]);h.operatorList.lastChunk=d.lastChunk,h.operatorList.separateAnnots=d.separateAnnots;for(const y of h.renderTasks)y.operatorListChanged();d.lastChunk&&this._tryCleanup()}_pumpOperatorList({renderingIntent:d,cacheKey:h,annotationStorageMap:y}){const x=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:d,cacheKey:h,annotationStorage:y}).getReader(),v=this._intentStates.get(h);v.streamReader=x;const f=()=>{x.read().then(({value:g,done:T})=>{T?v.streamReader=null:this._transport.destroyed||(this._renderPageChunk(g,v),f())},g=>{if(v.streamReader=null,!this._transport.destroyed){if(v.operatorList){v.operatorList.lastChunk=!0;for(const T of v.renderTasks)T.operatorListChanged();this._tryCleanup()}if(v.displayReadyCapability)v.displayReadyCapability.reject(g);else{if(!v.opListReadCapability)throw g;v.opListReadCapability.reject(g)}}})};f()}_abortOperatorList({intentState:d,reason:h,force:y=!1}){if(d.streamReader){if(!y){if(d.renderTasks.size>0)return;if(h instanceof _display_utils.RenderingCancelledException)return void(d.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:d,reason:h,force:!0}),d.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}if(d.streamReader.cancel(new _util.AbortException(h.message)).catch(()=>{}),d.streamReader=null,!this._transport.destroyed){for(const[w,x]of this._intentStates)if(x===d){this._intentStates.delete(w);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[],this._deferred=Promise.resolve()}postMessage(d,h){const y={data:structuredClone(d,h)};this._deferred.then(()=>{for(const w of this._listeners)w.call(this,y)})}addEventListener(d,h){this._listeners.push(h)}removeEventListener(d,h){const y=this._listeners.indexOf(h);this._listeners.splice(y,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const E=null==(_e=null==document?void 0:document.currentScript)?void 0:_e.src;E&&(PDFWorkerUtil.fallbackWorkerSrc=E.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(E,d){let h;try{if(h=new URL(E),!h.origin||"null"===h.origin)return!1}catch(w){return!1}const y=new URL(d,h);return h.origin===y.origin},PDFWorkerUtil.createCDNWrapper=function(E){return URL.createObjectURL(new Blob([`importScripts("${E}");`]))};const _PDFWorker=class{constructor({name:E=null,port:d=null,verbosity:h=(0,_util.getVerbosityLevel)()}={}){if(d&&q(_PDFWorker,k).has(d))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=E,this.destroyed=!1,this.verbosity=h,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,d)return q(_PDFWorker,k).set(d,this),void this._initializeFromPort(d);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(E){this._port=E,this._messageHandler=new _message_handler.MessageHandler("main","worker",E),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:E}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,E)||(E=PDFWorkerUtil.createCDNWrapper(new URL(E,window.location).href));const d=new Worker(E),h=new _message_handler.MessageHandler("main","worker",d),y=()=>{d.removeEventListener("error",w),h.destroy(),d.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},w=()=>{this._webWorker||y()};d.addEventListener("error",w),h.on("test",v=>{d.removeEventListener("error",w),this.destroyed?y():v?(this._messageHandler=h,this._port=d,this._webWorker=d,this._readyCapability.resolve(),h.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),h.destroy(),d.terminate())}),h.on("ready",v=>{if(d.removeEventListener("error",w),this.destroyed)y();else try{x()}catch(f){this._setupFakeWorker()}});const x=()=>{const v=new Uint8Array;h.send("test",v,[v.buffer])};return void x()}catch(d){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(E=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const d=new LoopbackPort;this._port=d;const h="fake"+PDFWorkerUtil.fakeWorkerId++,y=new _message_handler.MessageHandler(h+"_worker",h,d);E.setup(y,d);const w=new _message_handler.MessageHandler(h,h+"_worker",d);this._messageHandler=w,this._readyCapability.resolve(),w.send("configure",{verbosity:this.verbosity})}).catch(E=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${E.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),q(_PDFWorker,k).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(E){if(!(null==E?void 0:E.port))throw new Error("PDFWorker.fromPort - invalid method signature.");return q(this,k).has(E.port)?q(this,k).get(E.port):new _PDFWorker(E)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var E;try{return(null==(E=globalThis.pdfjsWorker)?void 0:E.WorkerMessageHandler)||null}catch(d){return null}}static get _setupFakeWorkerGlobal(){var _this4=this;const loader=function(){var _ref2=_asyncToGenerator(function*(){const mainWorkerMessageHandler=_this4._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(_this4.workerSrc);return worker.WorkerMessageHandler}return yield(0,_display_utils.loadScript)(_this4.workerSrc),window.pdfjsWorker.WorkerMessageHandler});return function E(){return _ref2.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};let PDFWorker=_PDFWorker;k=new WeakMap,Pe(PDFWorker,k,new WeakMap),exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};class WorkerTransport{constructor(d,h,y,w){Pe(this,j,null),Pe(this,fe,new Map),Pe(this,ce,new Map),Pe(this,pe,null),this.messageHandler=d,this.loadingTask=h,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:h.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:w.ownerDocument,styleElement:w.styleElement}),this._params=w,w.useWorkerFetch||(this.CMapReaderFactory=new w.CMapReaderFactory({baseUrl:w.cMapUrl,isCompressed:w.cMapPacked}),this.StandardFontDataFactory=new w.StandardFontDataFactory({baseUrl:w.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=y,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}get stats(){return q(this,j)}getRenderingIntent(d,h=_util.AnnotationMode.ENABLE,y=null,w=!1){let x=_util.RenderingIntentFlag.DISPLAY,v=null;switch(d){case"any":x=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":x=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${d}`)}switch(h){case _util.AnnotationMode.DISABLE:x+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:x+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:x+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,v=(x&_util.RenderingIntentFlag.PRINT&&y instanceof _annotation_storage.PrintAnnotationStorage?y:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${h}`)}return w&&(x+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:x,cacheKey:`${x}_${_annotation_storage.AnnotationStorage.getHash(v)}`,annotationStorageMap:v}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const d=[];for(const y of q(this,fe).values())d.push(y._destroy());q(this,fe).clear(),q(this,ce).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const h=this.messageHandler.sendWithPromise("Terminate",null);return d.push(h),Promise.all(d).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),$e(this,pe,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null,this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:d,loadingTask:h}=this;d.on("GetReader",(y,w)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=x=>{this._lastProgress={loaded:x.loaded,total:x.total}},w.onPull=()=>{this._fullReader.read().then(function({value:x,done:v}){v?w.close():((0,_util.assert)((0,_util.isArrayBuffer)(x),"GetReader - expected an ArrayBuffer."),w.enqueue(new Uint8Array(x),1,[x]))}).catch(x=>{w.error(x)})},w.onCancel=x=>{this._fullReader.cancel(x),w.ready.catch(v=>{if(!this.destroyed)throw v})}}),d.on("ReaderHeadersReady",y=>{const w=(0,_util.createPromiseCapability)(),x=this._fullReader;return x.headersReady.then(()=>{var v;(!x.isStreamingSupported||!x.isRangeSupported)&&(this._lastProgress&&(null==(v=h.onProgress)||v.call(h,this._lastProgress)),x.onProgress=f=>{var g;null==(g=h.onProgress)||g.call(h,{loaded:f.loaded,total:f.total})}),w.resolve({isStreamingSupported:x.isStreamingSupported,isRangeSupported:x.isRangeSupported,contentLength:x.contentLength})},w.reject),w.promise}),d.on("GetRangeReader",(y,w)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const x=this._networkStream.getRangeReader(y.begin,y.end);x?(w.onPull=()=>{x.read().then(function({value:v,done:f}){f?w.close():((0,_util.assert)((0,_util.isArrayBuffer)(v),"GetRangeReader - expected an ArrayBuffer."),w.enqueue(new Uint8Array(v),1,[v]))}).catch(v=>{w.error(v)})},w.onCancel=v=>{x.cancel(v),w.ready.catch(f=>{if(!this.destroyed)throw f})}):w.close()}),d.on("GetDoc",({pdfInfo:y})=>{this._numPages=y.numPages,this._htmlForXfa=y.htmlForXfa,delete y.htmlForXfa,h._capability.resolve(new PDFDocumentProxy(y,this))}),d.on("DocException",function(y){let w;switch(y.name){case"PasswordException":w=new _util.PasswordException(y.message,y.code);break;case"InvalidPDFException":w=new _util.InvalidPDFException(y.message);break;case"MissingPDFException":w=new _util.MissingPDFException(y.message);break;case"UnexpectedResponseException":w=new _util.UnexpectedResponseException(y.message,y.status);break;case"UnknownErrorException":w=new _util.UnknownErrorException(y.message,y.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}h._capability.reject(w)}),d.on("PasswordRequest",y=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),h.onPassword){const w=x=>{x instanceof Error?this._passwordCapability.reject(x):this._passwordCapability.resolve({password:x})};try{h.onPassword(w,y.code)}catch(x){this._passwordCapability.reject(x)}}else this._passwordCapability.reject(new _util.PasswordException(y.message,y.code));return this._passwordCapability.promise}),d.on("DataLoaded",y=>{var w;null==(w=h.onProgress)||w.call(h,{loaded:y.length,total:y.length}),this.downloadInfoCapability.resolve(y)}),d.on("StartRenderPage",y=>{this.destroyed||q(this,fe).get(y.pageIndex)._startRenderPage(y.transparency,y.cacheKey)}),d.on("commonobj",([y,w,x])=>{var v;if(!this.destroyed&&!this.commonObjs.has(y))switch(w){case"Font":const f=this._params;if("error"in x){const N=x.error;(0,_util.warn)(`Error during font loading: ${N}`),this.commonObjs.resolve(y,N);break}let g=null;f.pdfBug&&(null==(v=globalThis.FontInspector)?void 0:v.enabled)&&(g={registerFont(N,H){globalThis.FontInspector.fontAdded(N,H)}});const T=new _font_loader.FontFaceObject(x,{isEvalSupported:f.isEvalSupported,disableFontFace:f.disableFontFace,ignoreErrors:f.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:g});this.fontLoader.bind(T).catch(N=>d.sendWithPromise("FontFallback",{id:y})).finally(()=>{!f.fontExtraProperties&&T.data&&(T.data=null),this.commonObjs.resolve(y,T)});break;case"FontPath":case"Image":this.commonObjs.resolve(y,x);break;default:throw new Error(`Got unknown common object type ${w}`)}}),d.on("obj",([y,w,x,v])=>{var g;if(this.destroyed)return;const f=q(this,fe).get(w);if(!f.objs.has(y))switch(x){case"Image":f.objs.resolve(y,v);const T=8e6;if(v){let N;if(v.bitmap){const{bitmap:H,width:M,height:W}=v;N=M*W*4,f._bitmaps.add(H)}else N=(null==(g=v.data)?void 0:g.length)||0;N>T&&(f.cleanupAfterRender=!0)}break;case"Pattern":f.objs.resolve(y,v);break;default:throw new Error(`Got unknown object type ${x}`)}}),d.on("DocProgress",y=>{var w;this.destroyed||null==(w=h.onProgress)||w.call(h,{loaded:y.loaded,total:y.total})}),d.on("DocStats",y=>{this.destroyed||$e(this,j,Object.freeze({streamTypes:Object.freeze(y.streamTypes),fontTypes:Object.freeze(y.fontTypes)}))}),d.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),d.on("FetchBuiltInCMap",y=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.CMapReaderFactory?this.CMapReaderFactory.fetch(y):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),d.on("FetchStandardFontData",y=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.StandardFontDataFactory?this.StandardFontDataFactory.fetch(y):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}_onUnsupportedFeature({featureId:d}){var h,y;this.destroyed||null==(y=(h=this.loadingTask).onUnsupportedFeature)||y.call(h,d)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(d){if(!Number.isInteger(d)||d<=0||d>this._numPages)return Promise.reject(new Error("Invalid page request."));const h=d-1,y=q(this,ce).get(h);if(y)return y;const w=this.messageHandler.sendWithPromise("GetPage",{pageIndex:h}).then(x=>{if(this.destroyed)throw new Error("Transport destroyed");const v=new PDFPageProxy(h,x,this,this._params.ownerDocument,this._params.pdfBug);return q(this,fe).set(h,v),v});return q(this,ce).set(h,w),w}getPageIndex(d){return"object"!=typeof d||null===d||!Number.isInteger(d.num)||d.num<0||!Number.isInteger(d.gen)||d.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:d.num,gen:d.gen})}getAnnotations(d,h){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:d,intent:h})}saveDocument(){var d,h;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!=(h=null==(d=this._fullReader)?void 0:d.filename)?h:null}).finally(()=>{this.annotationStorage.resetModified()})}getFieldObjects(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}hasJSActions(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(d){return"string"!=typeof d?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:d})}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)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(d){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:d})}getStructTree(d){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:d})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(d=>new _optional_content_config.OptionalContentConfig(d))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return q(this,pe)||$e(this,pe,this.messageHandler.sendWithPromise("GetMetadata",null).then(d=>{var h,y,w,x;return{info:d[0],metadata:d[1]?new _metadata.Metadata(d[1]):null,contentDispositionFilename:null!=(y=null==(h=this._fullReader)?void 0:h.filename)?y:null,contentLength:null!=(x=null==(w=this._fullReader)?void 0:w.contentLength)?x:null}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(d=!1){var h=this;return _asyncToGenerator(function*(){if(yield h.messageHandler.sendWithPromise("Cleanup",null),!h.destroyed){for(const y of q(h,fe).values())if(!y.cleanup())throw new Error(`startCleanup: Page ${y.pageNumber} is currently rendering.`);h.commonObjs.clear(),d||h.fontLoader.clear(),$e(h,pe,null),h._getFieldObjectsPromise=null,h._hasJSActionsPromise=null}})()}get loadingParams(){const d=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:d.disableAutoFetch,enableXfa:d.enableXfa})}}j=new WeakMap,fe=new WeakMap,ce=new WeakMap,pe=new WeakMap;class PDFObjects{constructor(){Pe(this,P),Pe(this,ne,Object.create(null))}get(d,h=null){if(h){const w=Le(this,P,CD).call(this,d);return w.capability.promise.then(()=>h(w.data)),null}const y=q(this,ne)[d];if(!(null==y?void 0:y.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${d}.`);return y.data}has(d){const h=q(this,ne)[d];return(null==h?void 0:h.capability.settled)||!1}resolve(d,h=null){const y=Le(this,P,CD).call(this,d);y.data=h,y.capability.resolve()}clear(){$e(this,ne,Object.create(null))}}ne=new WeakMap,P=new WeakSet,CD=function(d){return q(this,ne)[d]||(q(this,ne)[d]={capability:(0,_util.createPromiseCapability)(),data:null})};class RenderTask{constructor(d){Pe(this,O,null),$e(this,O,d),this.onContinue=null}get promise(){return q(this,O).capability.promise}cancel(){q(this,O).cancel()}get separateAnnots(){const{separateAnnots:d}=q(this,O).operatorList;if(!d)return!1;const{annotationCanvasMap:h}=q(this,O);return d.form||d.canvas&&(null==h?void 0:h.size)>0}}O=new WeakMap,exports.RenderTask=RenderTask;const B=class{constructor({callback:d,params:h,objs:y,commonObjs:w,annotationCanvasMap:x,operatorList:v,pageIndex:f,canvasFactory:g,useRequestAnimationFrame:T=!1,pdfBug:N=!1,pageColors:H=null}){this.callback=d,this.params=h,this.objs=y,this.commonObjs=w,this.annotationCanvasMap=x,this.operatorListIdx=null,this.operatorList=v,this._pageIndex=f,this.canvasFactory=g,this._pdfBug=N,this.pageColors=H,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===T&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(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=h.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:d=!1,optionalContentConfig:h}){var g;if(this.cancelled)return;if(this._canvas){if(q(B,G).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.");q(B,G).add(this._canvas)}this._pdfBug&&(null==(g=globalThis.StepperManager)?void 0:g.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:y,viewport:w,transform:x,imageLayer:v,background:f}=this.params;this.gfx=new _canvas.CanvasGraphics(y,this.commonObjs,this.objs,this.canvasFactory,v,h,this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:x,viewport:w,transparency:d,background:f}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(d=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&q(B,G).delete(this._canvas),this.callback(d||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.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?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){var d=this;return _asyncToGenerator(function*(){d.cancelled||(d.operatorListIdx=d.gfx.executeOperatorList(d.operatorList,d.operatorListIdx,d._continueBound,d.stepper),d.operatorListIdx===d.operatorList.argsArray.length&&(d.running=!1,d.operatorList.lastChunk&&(d.gfx.endDrawing(),d._canvas&&q(B,G).delete(d._canvas),d.callback())))})()}};let InternalRenderTask=B;G=new WeakMap,Pe(InternalRenderTask,G,new WeakSet);const version="2.16.105";exports.version=version;const build="172ccdbe5";exports.build=build},(Re,I,_e)=>{var ne,Ij,V;Object.defineProperty(I,"__esModule",{value:!0}),I.PrintAnnotationStorage=I.AnnotationStorage=void 0;var k=_e(1),j=_e(6),fe=_e(10);class ce{constructor(){Pe(this,ne),this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(G,B){const E=this._storage.get(G);return void 0===E?B:Object.assign(B,E)}getRawValue(G){return this._storage.get(G)}remove(G){if(this._storage.delete(G),0===this._storage.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const B of this._storage.values())if(B instanceof j.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(G,B){const E=this._storage.get(G);let d=!1;if(void 0!==E)for(const[h,y]of Object.entries(B))E[h]!==y&&(d=!0,E[h]=y);else d=!0,this._storage.set(G,B);d&&Le(this,ne,Ij).call(this),B instanceof j.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(B.constructor._type)}has(G){return this._storage.has(G)}getAll(){return this._storage.size>0?(0,k.objectFromMap)(this._storage):null}get size(){return this._storage.size}resetModified(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new pe(this)}get serializable(){if(0===this._storage.size)return null;const G=new Map;for(const[B,E]of this._storage){const d=E instanceof j.AnnotationEditor?E.serialize():E;d&&G.set(B,d)}return G}static getHash(G){if(!G)return"";const B=new fe.MurmurHash3_64;for(const[E,d]of G)B.update(`${E}:${JSON.stringify(d)}`);return B.hexdigest()}}ne=new WeakSet,Ij=function(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())},I.AnnotationStorage=ce;class pe extends ce{constructor(G){super(),Pe(this,V,null),$e(this,V,structuredClone(G.serializable))}get print(){(0,k.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return q(this,V)}}V=new WeakMap,I.PrintAnnotationStorage=pe},(Re,I,_e)=>{var ce,pe,ne,P,V,O;Object.defineProperty(I,"__esModule",{value:!0}),I.AnnotationEditor=void 0;var k=_e(7),j=_e(1);const G=class{constructor(E){Pe(this,ce,this.focusin.bind(this)),Pe(this,pe,this.focusout.bind(this)),Pe(this,ne,!1),Pe(this,P,!1),Pe(this,V,!1),Pe(this,O,G._zIndex++),this.constructor===G&&(0,j.unreachable)("Cannot initialize AnnotationEditor."),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;const[d,h]=this.parent.viewportBaseDimensions;this.x=E.x/d,this.y=E.y/h,this.rotation=this.parent.viewport.rotation,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,j.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=q(this,O)}focusin(E){q(this,ne)?$e(this,ne,!1):this.parent.setSelected(this)}focusout(E){if(!this.isAttachedToDOM)return;const d=E.relatedTarget;(null==d?void 0:d.closest(`#${this.id}`))||(E.preventDefault(),this.parent.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.parent.addToAnnotationStorage(this)}dragstart(E){const d=this.parent.div.getBoundingClientRect();this.startX=E.clientX-d.x,this.startY=E.clientY-d.y,E.dataTransfer.setData("text/plain",this.id),E.dataTransfer.effectAllowed="move"}setAt(E,d,h,y){const[w,x]=this.parent.viewportBaseDimensions;[h,y]=this.screenToPageTranslation(h,y),this.x=(E+h)/w,this.y=(d+y)/x,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(E,d){const[h,y]=this.parent.viewportBaseDimensions;[E,d]=this.screenToPageTranslation(E,d),this.x+=E/h,this.y+=d/y,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(E,d){const{rotation:h}=this.parent.viewport;switch(h){case 90:return[d,-E];case 180:return[-E,-d];case 270:return[-d,E];default:return[E,d]}}setDims(E,d){const[h,y]=this.parent.viewportBaseDimensions;this.div.style.width=100*E/h+"%",this.div.style.height=100*d/y+"%"}getInitialTranslation(){return[0,0]}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.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",q(this,ce)),this.div.addEventListener("focusout",q(this,pe));const[E,d]=this.getInitialTranslation();return this.translate(E,d),(0,k.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(E){const d=k.KeyboardManager.platform.isMac;0!==E.button||E.ctrlKey&&d?E.preventDefault():(E.ctrlKey&&!d||E.shiftKey||E.metaKey&&d?this.parent.toggleSelected(this):this.parent.setSelected(this),$e(this,ne,!0))}getRect(E,d){const[h,y]=this.parent.viewportBaseDimensions,[w,x]=this.parent.pageDimensions,v=w*E/h,f=x*d/y,g=this.x*w,T=this.y*x,N=this.width*w,H=this.height*x;switch(this.rotation){case 0:return[g+v,x-T-f-H,g+v+N,x-T-f];case 90:return[g+f,x-T+v,g+f+H,x-T+v+N];case 180:return[g-v-N,x-T+f,g-v,x-T+f+H];case 270:return[g-f-H,x-T-v-N,g-f,x-T-v];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(E,d){const[h,y,w,x]=E,v=w-h,f=x-y;switch(this.rotation){case 0:return[h,d-x,v,f];case 90:return[h,d-y,f,v];case 180:return[w,d-y,v,f];case 270:return[w,d-x,f,v];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){$e(this,V,!0)}disableEditMode(){$e(this,V,!1)}isInEditMode(){return q(this,V)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var E;null==(E=this.div)||E.addEventListener("focusin",q(this,ce))}serialize(){(0,j.unreachable)("An editor must be serializable")}static deserialize(E,d){const h=new this.prototype.constructor({parent:d,id:d.getNextId()});h.rotation=E.rotation;const[y,w]=d.pageDimensions,[x,v,f,g]=h.getRectInCurrentCoords(E.rect,w);return h.x=x/y,h.y=v/w,h.width=f/y,h.height=g/w,h}remove(){this.div.removeEventListener("focusin",q(this,ce)),this.div.removeEventListener("focusout",q(this,pe)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var E;null==(E=this.div)||E.classList.add("selectedEditor")}unselect(){var E;null==(E=this.div)||E.classList.remove("selectedEditor")}updateParams(E,d){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return q(this,P)}set isEditing(E){$e(this,P,E),E?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}};let fe=G;ce=new WeakMap,pe=new WeakMap,ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,cn(fe,"_colorManager",new k.ColorManager),cn(fe,"_zIndex",1),I.AnnotationEditor=fe},(Re,I,_e)=>{var B,E,d,h,y,w,Rj,f,T,N,H,M,W,ye,Se,ve,Ie,ge,se,ee,De,Ae,xe,te,D,C,Fj,Q,DD,J,_i,ue,su,S,Pj,L,xj,ie,AD,ke,ou,we,Hp;Object.defineProperty(I,"__esModule",{value:!0}),I.KeyboardManager=I.CommandManager=I.ColorManager=I.AnnotationEditorUIManager=void 0,I.bindEvents=function fe(Ve,X,je){for(const Ze of je)X.addEventListener(Ze,Ve[Ze].bind(Ve))},I.opacityToHex=function ce(Ve){return Math.round(Math.min(255,Math.max(1,255*Ve))).toString(16).padStart(2,"0")};var k=_e(1),j=_e(8);class pe{constructor(){Pe(this,B,0)}getId(){return`${k.AnnotationEditorPrefix}${Up(this,B)._++}`}}B=new WeakMap;class ne{constructor(X=128){Pe(this,E,[]),Pe(this,d,!1),Pe(this,h,void 0),Pe(this,y,-1),$e(this,h,X)}add({cmd:X,undo:je,mustExec:Ze,type:Ke=NaN,overwriteIfSameType:lt=!1,keepUndo:yt=!1}){if(Ze&&X(),q(this,d))return;const $t={cmd:X,undo:je,type:Ke};if(-1===q(this,y))return q(this,E).length>0&&(q(this,E).length=0),$e(this,y,0),void q(this,E).push($t);if(lt&&q(this,E)[q(this,y)].type===Ke)return yt&&($t.undo=q(this,E)[q(this,y)].undo),void(q(this,E)[q(this,y)]=$t);const Lt=q(this,y)+1;Lt===q(this,h)?q(this,E).splice(0,1):($e(this,y,Lt),Lt<q(this,E).length&&q(this,E).splice(Lt)),q(this,E).push($t)}undo(){-1!==q(this,y)&&($e(this,d,!0),q(this,E)[q(this,y)].undo(),$e(this,d,!1),$e(this,y,q(this,y)-1))}redo(){q(this,y)<q(this,E).length-1&&($e(this,y,q(this,y)+1),$e(this,d,!0),q(this,E)[q(this,y)].cmd(),$e(this,d,!1))}hasSomethingToUndo(){return-1!==q(this,y)}hasSomethingToRedo(){return q(this,y)<q(this,E).length-1}destroy(){$e(this,E,null)}}E=new WeakMap,d=new WeakMap,h=new WeakMap,y=new WeakMap,I.CommandManager=ne;const v=class{constructor(X){Pe(this,w),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const je=v.platform.isMac;for(const[Ze,Ke]of X)for(const lt of Ze){const yt=lt.startsWith("mac+");je&&yt?(this.callbacks.set(lt.slice(4),Ke),this.allKeys.add(lt.split("+").at(-1))):!je&&!yt&&(this.callbacks.set(lt,Ke),this.allKeys.add(lt.split("+").at(-1)))}}static get platform(){const X="undefined"!=typeof navigator?navigator.platform:"";return(0,k.shadow)(this,"platform",{isWin:X.includes("Win"),isMac:X.includes("Mac")})}exec(X,je){if(!this.allKeys.has(je.key))return;const Ze=this.callbacks.get(Le(this,w,Rj).call(this,je));!Ze||(Ze.bind(X)(),je.stopPropagation(),je.preventDefault())}};let P=v;w=new WeakSet,Rj=function(X){X.altKey&&this.buffer.push("alt"),X.ctrlKey&&this.buffer.push("ctrl"),X.metaKey&&this.buffer.push("meta"),X.shiftKey&&this.buffer.push("shift"),this.buffer.push(X.key);const je=this.buffer.join("+");return this.buffer.length=0,je},I.KeyboardManager=P;class V{constructor(){Pe(this,f,null)}copy(X){!X||(Array.isArray(X)?$e(this,f,X.map(je=>je.serialize())):$e(this,f,[X.serialize()]),$e(this,f,q(this,f).filter(je=>!!je)),0===q(this,f).length&&$e(this,f,null))}paste(){return q(this,f)}isEmpty(){return null===q(this,f)}destroy(){$e(this,f,null)}}f=new WeakMap;const g=class{get _colors(){const X=new Map([["CanvasText",null],["Canvas",null]]);return(0,j.getColorValues)(X),(0,k.shadow)(this,"_colors",X)}convert(X){const je=(0,j.getRGB)(X);if(!window.matchMedia("(forced-colors: active)").matches)return je;for(const[Ze,Ke]of this._colors)if(Ke.every((lt,yt)=>lt===je[yt]))return g._colorsMapping.get(Ze);return je}getHexCode(X){const je=this._colors.get(X);return je?k.Util.makeHexColor(...je):X}};let O=g;cn(O,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),I.ColorManager=O;const Ne=class{constructor(X,je){Pe(this,C),Pe(this,Q),Pe(this,J),Pe(this,ue),Pe(this,S),Pe(this,L),Pe(this,ie),Pe(this,ke),Pe(this,we),Pe(this,T,null),Pe(this,N,new Map),Pe(this,H,new Map),Pe(this,M,new V),Pe(this,W,new ne),Pe(this,ye,0),Pe(this,Se,null),Pe(this,ve,null),Pe(this,Ie,new pe),Pe(this,ge,!1),Pe(this,se,k.AnnotationEditorType.NONE),Pe(this,ee,new Set),Pe(this,De,this.keydown.bind(this)),Pe(this,Ae,this.onEditingAction.bind(this)),Pe(this,xe,this.onPageChanging.bind(this)),Pe(this,te,{isEditing:!1,isEmpty:!0,hasEmptyClipboard:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),Pe(this,D,null),$e(this,D,X),$e(this,ve,je),q(this,ve)._on("editingaction",q(this,Ae)),q(this,ve)._on("pagechanging",q(this,xe))}destroy(){Le(this,Q,DD).call(this),q(this,ve)._off("editingaction",q(this,Ae)),q(this,ve)._off("pagechanging",q(this,xe));for(const X of q(this,H).values())X.destroy();q(this,H).clear(),q(this,N).clear(),$e(this,T,null),q(this,ee).clear(),q(this,M).destroy(),q(this,W).destroy()}onPageChanging({pageNumber:X}){$e(this,ye,X-1)}focusMainContainer(){q(this,D).focus()}keydown(X){var je;(null==(je=this.getActive())?void 0:je.shouldGetKeyboardEvents())||Ne._keyboardManager.exec(this,X)}onEditingAction(X){["undo","redo","cut","copy","paste","delete","selectAll"].includes(X.name)&&this[X.name]()}setEditingState(X){X?(Le(this,C,Fj).call(this),Le(this,J,_i).call(this,{isEditing:q(this,se)!==k.AnnotationEditorType.NONE,isEmpty:Le(this,ke,ou).call(this),hasSomethingToUndo:q(this,W).hasSomethingToUndo(),hasSomethingToRedo:q(this,W).hasSomethingToRedo(),hasSelectedEditor:!1,hasEmptyClipboard:q(this,M).isEmpty()})):(Le(this,Q,DD).call(this),Le(this,J,_i).call(this,{isEditing:!1}))}registerEditorTypes(X){$e(this,Se,X);for(const je of q(this,Se))Le(this,ue,su).call(this,je.defaultPropertiesToUpdate)}getId(){return q(this,Ie).getId()}addLayer(X){q(this,H).set(X.pageIndex,X),q(this,ge)?X.enable():X.disable()}removeLayer(X){q(this,H).delete(X.pageIndex)}updateMode(X){if($e(this,se,X),X===k.AnnotationEditorType.NONE)this.setEditingState(!1),Le(this,L,xj).call(this);else{this.setEditingState(!0),Le(this,S,Pj).call(this);for(const je of q(this,H).values())je.updateMode(X)}}updateToolbar(X){X!==q(this,se)&&q(this,ve).dispatch("switchannotationeditormode",{source:this,mode:X})}updateParams(X,je){for(const Ze of q(this,ee))Ze.updateParams(X,je);for(const Ze of q(this,Se))Ze.updateDefaultParams(X,je)}getEditors(X){const je=[];for(const Ze of q(this,N).values())Ze.pageIndex===X&&je.push(Ze);return je}getEditor(X){return q(this,N).get(X)}addEditor(X){q(this,N).set(X.id,X)}removeEditor(X){q(this,N).delete(X.id),this.unselect(X)}setActiveEditor(X){q(this,T)!==X&&($e(this,T,X),X&&Le(this,ue,su).call(this,X.propertiesToUpdate))}toggleSelected(X){if(q(this,ee).has(X))return q(this,ee).delete(X),X.unselect(),void Le(this,J,_i).call(this,{hasSelectedEditor:this.hasSelection});q(this,ee).add(X),X.select(),Le(this,ue,su).call(this,X.propertiesToUpdate),Le(this,J,_i).call(this,{hasSelectedEditor:!0})}setSelected(X){for(const je of q(this,ee))je!==X&&je.unselect();q(this,ee).clear(),q(this,ee).add(X),X.select(),Le(this,ue,su).call(this,X.propertiesToUpdate),Le(this,J,_i).call(this,{hasSelectedEditor:!0})}isSelected(X){return q(this,ee).has(X)}unselect(X){X.unselect(),q(this,ee).delete(X),Le(this,J,_i).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==q(this,ee).size}undo(){q(this,W).undo(),Le(this,J,_i).call(this,{hasSomethingToUndo:q(this,W).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Le(this,ke,ou).call(this)})}redo(){q(this,W).redo(),Le(this,J,_i).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:q(this,W).hasSomethingToRedo(),isEmpty:Le(this,ke,ou).call(this)})}addCommands(X){q(this,W).add(X),Le(this,J,_i).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Le(this,ke,ou).call(this)})}delete(){if(q(this,T)&&q(this,T).commitOrRemove(),!this.hasSelection)return;const X=[...q(this,ee)];this.addCommands({cmd:()=>{for(const Ke of X)Ke.remove()},undo:()=>{for(const Ke of X)Le(this,ie,AD).call(this,Ke)},mustExec:!0})}copy(){if(q(this,T)&&q(this,T).commitOrRemove(),this.hasSelection){const X=[];for(const je of q(this,ee))je.isEmpty()||X.push(je);if(0===X.length)return;q(this,M).copy(X),Le(this,J,_i).call(this,{hasEmptyClipboard:!1})}}cut(){this.copy(),this.delete()}paste(){if(q(this,M).isEmpty())return;this.unselectAll();const X=q(this,H).get(q(this,ye)),je=q(this,M).paste().map(lt=>X.deserialize(lt));this.addCommands({cmd:()=>{for(const lt of je)Le(this,ie,AD).call(this,lt);Le(this,we,Hp).call(this,je)},undo:()=>{for(const lt of je)lt.remove()},mustExec:!0})}selectAll(){for(const X of q(this,ee))X.commit();Le(this,we,Hp).call(this,q(this,N).values())}unselectAll(){if(q(this,T))q(this,T).commitOrRemove();else if(0!==Le(this,we,Hp).size){for(const X of q(this,ee))X.unselect();q(this,ee).clear(),Le(this,J,_i).call(this,{hasSelectedEditor:!1})}}isActive(X){return q(this,T)===X}getActive(){return q(this,T)}getMode(){return q(this,se)}};let G=Ne;T=new WeakMap,N=new WeakMap,H=new WeakMap,M=new WeakMap,W=new WeakMap,ye=new WeakMap,Se=new WeakMap,ve=new WeakMap,Ie=new WeakMap,ge=new WeakMap,se=new WeakMap,ee=new WeakMap,De=new WeakMap,Ae=new WeakMap,xe=new WeakMap,te=new WeakMap,D=new WeakMap,C=new WeakSet,Fj=function(){q(this,D).addEventListener("keydown",q(this,De))},Q=new WeakSet,DD=function(){q(this,D).removeEventListener("keydown",q(this,De))},J=new WeakSet,_i=function(X){Object.entries(X).some(([Ze,Ke])=>q(this,te)[Ze]!==Ke)&&q(this,ve).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(q(this,te),X)})},ue=new WeakSet,su=function(X){q(this,ve).dispatch("annotationeditorparamschanged",{source:this,details:X})},S=new WeakSet,Pj=function(){if(!q(this,ge)){$e(this,ge,!0);for(const X of q(this,H).values())X.enable()}},L=new WeakSet,xj=function(){if(this.unselectAll(),q(this,ge)){$e(this,ge,!1);for(const X of q(this,H).values())X.disable()}},ie=new WeakSet,AD=function(X){const je=q(this,H).get(X.pageIndex);je?je.addOrRebuild(X):this.addEditor(X)},ke=new WeakSet,ou=function(){if(0===q(this,N).size)return!0;if(1===q(this,N).size)for(const X of q(this,N).values())return X.isEmpty();return!1},we=new WeakSet,Hp=function(X){q(this,ee).clear();for(const je of X)je.isEmpty()||(q(this,ee).add(je),je.select());Le(this,J,_i).call(this,{hasSelectedEditor:!0})},cn(G,"_keyboardManager",new P([[["ctrl+a","mac+meta+a"],Ne.prototype.selectAll],[["ctrl+c","mac+meta+c"],Ne.prototype.copy],[["ctrl+v","mac+meta+v"],Ne.prototype.paste],[["ctrl+x","mac+meta+x"],Ne.prototype.cut],[["ctrl+z","mac+meta+z"],Ne.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],Ne.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],Ne.prototype.delete],[["Escape","mac+Escape"],Ne.prototype.unselectAll]])),I.AnnotationEditorUIManager=G},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.StatTimer=I.RenderingCancelledException=I.PixelsPerInch=I.PageViewport=I.PDFDateString=I.DOMStandardFontDataFactory=I.DOMSVGFactory=I.DOMCanvasFactory=I.DOMCMapReaderFactory=I.AnnotationPrefix=void 0,I.deprecated=function T(ge){console.log("Deprecated API usage: "+ge)},I.getColorValues=function ye(ge){const se=document.createElement("span");se.style.visibility="hidden",document.body.append(se);for(const ee of ge.keys()){se.style.color=ee;const De=window.getComputedStyle(se).color;ge.set(ee,W(De))}se.remove()},I.getCurrentTransform=function Se(ge){const{a:se,b:ee,c:De,d:Ae,e:xe,f:te}=ge.getTransform();return[se,ee,De,Ae,xe,te]},I.getCurrentTransformInverse=function ve(ge){const{a:se,b:ee,c:De,d:Ae,e:xe,f:te}=ge.getTransform().invertSelf();return[se,ee,De,Ae,xe,te]},I.getFilenameFromUrl=function w(ge){const se=ge.indexOf("#"),ee=ge.indexOf("?"),De=Math.min(se>0?se:ge.length,ee>0?ee:ge.length);return ge.substring(ge.lastIndexOf("/",De)+1,De)},I.getPdfFilenameFromUrl=function x(ge,se="document.pdf"){if("string"!=typeof ge)return se;if(h(ge))return(0,j.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),se;const De=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,Ae=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(ge);let xe=De.exec(Ae[1])||De.exec(Ae[2])||De.exec(Ae[3]);if(xe&&(xe=xe[0],xe.includes("%")))try{xe=De.exec(decodeURIComponent(xe))[0]}catch(te){}return xe||se},I.getRGB=W,I.getXfaPageViewport=function M(ge,{scale:se=1,rotation:ee=0}){const{width:De,height:Ae}=ge.attributes.style,xe=[0,0,parseInt(De),parseInt(Ae)];return new E({viewBox:xe,scale:se,rotation:ee})},I.isDataScheme=h,I.isPdfFile=function y(ge){return"string"==typeof ge&&/\.pdf$/i.test(ge)},I.isValidFetchUrl=f,I.loadScript=function g(ge,se=!1){return new Promise((ee,De)=>{const Ae=document.createElement("script");Ae.src=ge,Ae.onload=function(xe){se&&Ae.remove(),ee(xe)},Ae.onerror=function(){De(new Error(`Cannot load script at: ${Ae.src}`))},(document.head||document.documentElement).append(Ae)})};var k=_e(9),j=_e(1);I.AnnotationPrefix="pdfjs_internal_id_";const Ie=class{};let N,pe=Ie;function P(ge){return V.apply(this,arguments)}function V(){return(V=_asyncToGenerator(function*(ge,se=!1){if(f(ge,document.baseURI)){const ee=yield fetch(ge);if(!ee.ok)throw new Error(ee.statusText);return se?new Uint8Array(yield ee.arrayBuffer()):(0,j.stringToBytes)(yield ee.text())}return new Promise((ee,De)=>{const Ae=new XMLHttpRequest;Ae.open("GET",ge,!0),se&&(Ae.responseType="arraybuffer"),Ae.onreadystatechange=()=>{if(Ae.readyState===XMLHttpRequest.DONE){if(200===Ae.status||0===Ae.status){let xe;if(se&&Ae.response?xe=new Uint8Array(Ae.response):!se&&Ae.responseText&&(xe=(0,j.stringToBytes)(Ae.responseText)),xe)return void ee(xe)}De(new Error(Ae.statusText))}},Ae.send(null)})})).apply(this,arguments)}cn(pe,"CSS",96),cn(pe,"PDF",72),cn(pe,"PDF_TO_CSS_UNITS",Ie.CSS/Ie.PDF),I.PixelsPerInch=pe,I.DOMCanvasFactory=class ne extends k.BaseCanvasFactory{constructor({ownerDocument:se=globalThis.document}={}){super(),this._document=se}_createCanvas(se,ee){const De=this._document.createElement("canvas");return De.width=se,De.height=ee,De}},I.DOMCMapReaderFactory=class O extends k.BaseCMapReaderFactory{_fetchData(se,ee){return P(se,this.isCompressed).then(De=>({cMapData:De,compressionType:ee}))}},I.DOMStandardFontDataFactory=class G extends k.BaseStandardFontDataFactory{_fetchData(se){return P(se,!0)}},I.DOMSVGFactory=class B extends k.BaseSVGFactory{_createSVG(se){return document.createElementNS("http://www.w3.org/2000/svg",se)}};class E{constructor({viewBox:se,scale:ee,rotation:De,offsetX:Ae=0,offsetY:xe=0,dontFlip:te=!1}){this.viewBox=se,this.scale=ee,this.rotation=De,this.offsetX=Ae,this.offsetY=xe;const D=(se[2]+se[0])/2,C=(se[3]+se[1])/2;let R,Q,Y,J,de,ue,m,S;switch((De%=360)<0&&(De+=360),De){case 180:R=-1,Q=0,Y=0,J=1;break;case 90:R=0,Q=1,Y=1,J=0;break;case 270:R=0,Q=-1,Y=-1,J=0;break;case 0:R=1,Q=0,Y=0,J=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}te&&(Y=-Y,J=-J),0===R?(de=Math.abs(C-se[1])*ee+Ae,ue=Math.abs(D-se[0])*ee+xe,m=Math.abs(se[3]-se[1])*ee,S=Math.abs(se[2]-se[0])*ee):(de=Math.abs(D-se[0])*ee+Ae,ue=Math.abs(C-se[1])*ee+xe,m=Math.abs(se[2]-se[0])*ee,S=Math.abs(se[3]-se[1])*ee),this.transform=[R*ee,Q*ee,Y*ee,J*ee,de-R*ee*D-Y*ee*C,ue-Q*ee*D-J*ee*C],this.width=m,this.height=S}clone({scale:se=this.scale,rotation:ee=this.rotation,offsetX:De=this.offsetX,offsetY:Ae=this.offsetY,dontFlip:xe=!1}={}){return new E({viewBox:this.viewBox.slice(),scale:se,rotation:ee,offsetX:De,offsetY:Ae,dontFlip:xe})}convertToViewportPoint(se,ee){return j.Util.applyTransform([se,ee],this.transform)}convertToViewportRectangle(se){const ee=j.Util.applyTransform([se[0],se[1]],this.transform),De=j.Util.applyTransform([se[2],se[3]],this.transform);return[ee[0],ee[1],De[0],De[1]]}convertToPdfPoint(se,ee){return j.Util.applyInverseTransform([se,ee],this.transform)}}function h(ge){const se=ge.length;let ee=0;for(;ee<se&&""===ge[ee].trim();)ee++;return"data:"===ge.substring(ee,ee+5).toLowerCase()}function f(ge,se){try{const{protocol:ee}=se?new URL(ge,se):new URL(ge);return"http:"===ee||"https:"===ee}catch(ee){return!1}}function W(ge){if(ge.startsWith("#")){const se=parseInt(ge.slice(1),16);return[(16711680&se)>>16,(65280&se)>>8,255&se]}return ge.startsWith("rgb(")?ge.slice(4,-1).split(",").map(se=>parseInt(se)):ge.startsWith("rgba(")?ge.slice(5,-1).split(",").map(se=>parseInt(se)).slice(0,3):((0,j.warn)(`Not a valid color format: "${ge}"`),[0,0,0])}I.PageViewport=E,I.RenderingCancelledException=class d extends j.BaseException{constructor(se,ee){super(se,"RenderingCancelledException"),this.type=ee}},I.StatTimer=class v{constructor(){this.started=Object.create(null),this.times=[]}time(se){se in this.started&&(0,j.warn)(`Timer is already running for ${se}`),this.started[se]=Date.now()}timeEnd(se){se in this.started||(0,j.warn)(`Timer has not been started for ${se}`),this.times.push({name:se,start:this.started[se],end:Date.now()}),delete this.started[se]}toString(){const se=[];let ee=0;for(const De of this.times){const Ae=De.name;Ae.length>ee&&(ee=Ae.length)}for(const De of this.times){const Ae=De.end-De.start;se.push(`${De.name.padEnd(ee)} ${Ae}ms\n`)}return se.join("")}},I.PDFDateString=class H{static toDateObject(se){if(!se||"string"!=typeof se)return null;N||(N=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const ee=N.exec(se);if(!ee)return null;const De=parseInt(ee[1],10);let Ae=parseInt(ee[2],10);Ae=Ae>=1&&Ae<=12?Ae-1:0;let xe=parseInt(ee[3],10);xe=xe>=1&&xe<=31?xe:1;let te=parseInt(ee[4],10);te=te>=0&&te<=23?te:0;let D=parseInt(ee[5],10);D=D>=0&&D<=59?D:0;let C=parseInt(ee[6],10);C=C>=0&&C<=59?C:0;const R=ee[7]||"Z";let Q=parseInt(ee[8],10);Q=Q>=0&&Q<=23?Q:0;let Y=parseInt(ee[9],10)||0;return Y=Y>=0&&Y<=59?Y:0,"-"===R?(te+=Q,D+=Y):"+"===R&&(te-=Q,D-=Y),new Date(Date.UTC(De,Ae,xe,te,D,C))}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.BaseStandardFontDataFactory=I.BaseSVGFactory=I.BaseCanvasFactory=I.BaseCMapReaderFactory=void 0;var k=_e(1);class j{constructor(){this.constructor===j&&(0,k.unreachable)("Cannot initialize BaseCanvasFactory.")}create(P,V){if(P<=0||V<=0)throw new Error("Invalid canvas size");const O=this._createCanvas(P,V);return{canvas:O,context:O.getContext("2d")}}reset(P,V,O){if(!P.canvas)throw new Error("Canvas is not specified");if(V<=0||O<=0)throw new Error("Invalid canvas size");P.canvas.width=V,P.canvas.height=O}destroy(P){if(!P.canvas)throw new Error("Canvas is not specified");P.canvas.width=0,P.canvas.height=0,P.canvas=null,P.context=null}_createCanvas(P,V){(0,k.unreachable)("Abstract method `_createCanvas` called.")}}I.BaseCanvasFactory=j;class fe{constructor({baseUrl:P=null,isCompressed:V=!1}){this.constructor===fe&&(0,k.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=P,this.isCompressed=V}fetch({name:P}){var V=this;return _asyncToGenerator(function*(){if(!V.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!P)throw new Error("CMap name must be specified.");const O=V.baseUrl+P+(V.isCompressed?".bcmap":"");return V._fetchData(O,V.isCompressed?k.CMapCompressionType.BINARY:k.CMapCompressionType.NONE).catch(B=>{throw new Error(`Unable to load ${V.isCompressed?"binary ":""}CMap at: ${O}`)})})()}_fetchData(P,V){(0,k.unreachable)("Abstract method `_fetchData` called.")}}I.BaseCMapReaderFactory=fe;class ce{constructor({baseUrl:P=null}){this.constructor===ce&&(0,k.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=P}fetch({filename:P}){var V=this;return _asyncToGenerator(function*(){if(!V.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!P)throw new Error("Font filename must be specified.");const O=`${V.baseUrl}${P}`;return V._fetchData(O).catch(G=>{throw new Error(`Unable to load font data at: ${O}`)})})()}_fetchData(P){(0,k.unreachable)("Abstract method `_fetchData` called.")}}I.BaseStandardFontDataFactory=ce;class pe{constructor(){this.constructor===pe&&(0,k.unreachable)("Cannot initialize BaseSVGFactory.")}create(P,V,O=!1){if(P<=0||V<=0)throw new Error("Invalid SVG dimensions");const G=this._createSVG("svg:svg");return G.setAttribute("version","1.1"),O||(G.setAttribute("width",`${P}px`),G.setAttribute("height",`${V}px`)),G.setAttribute("preserveAspectRatio","none"),G.setAttribute("viewBox",`0 0 ${P} ${V}`),G}createElement(P){if("string"!=typeof P)throw new Error("Invalid SVG element type");return this._createSVG(P)}_createSVG(P){(0,k.unreachable)("Abstract method `_createSVG` called.")}}I.BaseSVGFactory=pe},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.MurmurHash3_64=void 0;var k=_e(1);const j=3285377520,fe=4294901760,ce=65535;I.MurmurHash3_64=class pe{constructor(P){this.h1=P?4294967295&P:j,this.h2=P?4294967295&P:j}update(P){let V,O;if("string"==typeof P){V=new Uint8Array(2*P.length),O=0;for(let T=0,N=P.length;T<N;T++){const H=P.charCodeAt(T);H<=255?V[O++]=H:(V[O++]=H>>>8,V[O++]=255&H)}}else{if(!(0,k.isArrayBuffer)(P))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");V=P.slice(),O=V.byteLength}const G=O>>2,B=O-4*G,E=new Uint32Array(V.buffer,0,G);let d=0,h=0,y=this.h1,w=this.h2;const x=3432918353,v=461845907,f=x&ce,g=v&ce;for(let T=0;T<G;T++)1&T?(d=E[T],d=d*x&fe|d*f&ce,d=d<<15|d>>>17,d=d*v&fe|d*g&ce,y^=d,y=y<<13|y>>>19,y=5*y+3864292196):(h=E[T],h=h*x&fe|h*f&ce,h=h<<15|h>>>17,h=h*v&fe|h*g&ce,w^=h,w=w<<13|w>>>19,w=5*w+3864292196);switch(d=0,B){case 3:d^=V[4*G+2]<<16;case 2:d^=V[4*G+1]<<8;case 1:d^=V[4*G],d=d*x&fe|d*f&ce,d=d<<15|d>>>17,d=d*v&fe|d*g&ce,1&G?y^=d:w^=d}this.h1=y,this.h2=w}hexdigest(){let P=this.h1,V=this.h2;P^=V>>>1,P=3981806797*P&fe|36045*P&ce,V=4283543511*V&fe|(2950163797*(V<<16|P>>>16)&fe)>>>16,P^=V>>>1,P=444984403*P&fe|60499*P&ce,V=3301882366*V&fe|(3120437893*(V<<16|P>>>16)&fe)>>>16,P^=V>>>1;const O=(P>>>0).toString(16),G=(V>>>0).toString(16);return O.padStart(8,"0")+G.padStart(8,"0")}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.FontLoader=I.FontFaceObject=void 0;var k=_e(1);class j{constructor({docId:ne,onUnsupportedFeature:P,ownerDocument:V=globalThis.document,styleElement:O=null}){this.constructor===j&&(0,k.unreachable)("Cannot initialize BaseFontLoader."),this.docId=ne,this._onUnsupportedFeature=P,this._document=V,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(ne){this.nativeFontFaces.push(ne),this._document.fonts.add(ne)}insertRule(ne){let P=this.styleElement;P||(P=this.styleElement=this._document.createElement("style"),P.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,this._document.documentElement.getElementsByTagName("head")[0].append(P));const V=P.sheet;V.insertRule(ne,V.cssRules.length)}clear(){for(const ne of this.nativeFontFaces)this._document.fonts.delete(ne);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}bind(ne){var P=this;return _asyncToGenerator(function*(){if(ne.attached||ne.missingFile)return;if(ne.attached=!0,P.isFontLoadingAPISupported){const O=ne.createNativeFontFace();if(O){P.addNativeFontFace(O);try{yield O.loaded}catch(G){throw P._onUnsupportedFeature({featureId:k.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,k.warn)(`Failed to load font '${O.family}': '${G}'.`),ne.disableFontFace=!0,G}}return}const V=ne.createFontFaceRule();if(V){if(P.insertRule(V),P.isSyncFontLoadingSupported)return;yield new Promise(O=>{const G=P._queueLoadingCallback(O);P._prepareFontLoadEvent([V],[ne],G)})}})()}_queueLoadingCallback(ne){(0,k.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){var P;const ne=!!(null==(P=this._document)?void 0:P.fonts);return(0,k.shadow)(this,"isFontLoadingAPISupported",ne)}get isSyncFontLoadingSupported(){(0,k.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,k.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(ne,P,V){(0,k.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let fe;I.FontLoader=fe,I.FontLoader=fe=class extends j{constructor(ne){super(ne),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let ne=!1;if("undefined"==typeof navigator)ne=!0;else{const P=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==P?void 0:P[1])>=14&&(ne=!0)}return(0,k.shadow)(this,"isSyncFontLoadingSupported",ne)}_queueLoadingCallback(ne){const V=this.loadingContext,O={id:"pdfjs-font-loading-"+V.nextRequestId++,done:!1,complete:function P(){for((0,k.assert)(!O.done,"completeRequest() cannot be called twice."),O.done=!0;V.requests.length>0&&V.requests[0].done;){const G=V.requests.shift();setTimeout(G.callback,0)}},callback:ne};return V.requests.push(O),O}get _loadTestFont(){return(0,k.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(ne,P,V){function O(Se,ve){return Se.charCodeAt(ve)<<24|Se.charCodeAt(ve+1)<<16|Se.charCodeAt(ve+2)<<8|255&Se.charCodeAt(ve+3)}function G(Se,ve,Ie,ge){return Se.substring(0,ve)+ge+Se.substring(ve+Ie)}let B,E;const d=this._document.createElement("canvas");d.width=1,d.height=1;const h=d.getContext("2d");let y=0;const x=`lt${Date.now()}${this.loadTestFontId++}`;let v=this._loadTestFont;v=G(v,976,x.length,x);const T=1482184792;let N=O(v,16);for(B=0,E=x.length-3;B<E;B+=4)N=N-T+O(x,B)|0;B<x.length&&(N=N-T+O(x+"XXX",B)|0),v=G(v,16,4,(0,k.string32)(N));const H=`url(data:font/opentype;base64,${btoa(v)});`;this.insertRule(`@font-face {font-family:"${x}";src:${H}}`);const W=[];for(const Se of P)W.push(Se.loadedName);W.push(x);const ye=this._document.createElement("div");ye.style.visibility="hidden",ye.style.width=ye.style.height="10px",ye.style.position="absolute",ye.style.top=ye.style.left="0px";for(const Se of W){const ve=this._document.createElement("span");ve.textContent="Hi",ve.style.fontFamily=Se,ye.append(ve)}this._document.body.append(ye),function w(Se,ve){if(y++,y>30)return(0,k.warn)("Load test font never loaded."),void ve();h.font="30px "+Se,h.fillText(".",0,20),h.getImageData(0,0,1,1).data[3]>0?ve():setTimeout(w.bind(null,Se,ve))}(x,()=>{ye.remove(),V.complete()})}},I.FontFaceObject=class ce{constructor(ne,{isEvalSupported:P=!0,disableFontFace:V=!1,ignoreErrors:O=!1,onUnsupportedFeature:G,fontRegistry:B=null}){this.compiledGlyphs=Object.create(null);for(const E in ne)this[E]=ne[E];this.isEvalSupported=!1!==P,this.disableFontFace=!0===V,this.ignoreErrors=!0===O,this._onUnsupportedFeature=G,this.fontRegistry=B}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let ne;if(this.cssFontInfo){const P={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(P.style=`oblique ${this.cssFontInfo.italicAngle}deg`),ne=new FontFace(this.cssFontInfo.fontFamily,this.data,P)}else ne=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),ne}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const ne=(0,k.bytesToString)(this.data),P=`url(data:${this.mimetype};base64,${btoa(ne)});`;let V;if(this.cssFontInfo){let O=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(O+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),V=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${O}src:${P}}`}else V=`@font-face {font-family:"${this.loadedName}";src:${P}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,P),V}getPathGenerator(ne,P){if(void 0!==this.compiledGlyphs[P])return this.compiledGlyphs[P];let V;try{V=ne.get(this.loadedName+"_path_"+P)}catch(O){if(!this.ignoreErrors)throw O;return this._onUnsupportedFeature({featureId:k.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,k.warn)(`getPathGenerator - ignoring character: "${O}".`),this.compiledGlyphs[P]=function(G,B){}}if(this.isEvalSupported&&k.FeatureTest.isEvalSupported){const O=[];for(const G of V){const B=void 0!==G.args?G.args.join(","):"";O.push("c.",G.cmd,"(",B,");\n")}return this.compiledGlyphs[P]=new Function("c","size",O.join(""))}return this.compiledGlyphs[P]=function(O,G){for(const B of V)"scale"===B.cmd&&(B.args=[G,-G]),O[B.cmd].apply(O,B.args)}}}},(Re,I,_e)=>{var De,SD;Object.defineProperty(I,"__esModule",{value:!0}),I.CanvasGraphics=void 0;var k=_e(8),j=_e(1),fe=_e(13),ce=_e(14),pe=_e(3);const V=4096,B=pe.isNodeJS&&"undefined"==typeof Path2D?-1:1e3,E=16;class h{constructor(D){this.canvasFactory=D,this.cache=Object.create(null)}getCanvas(D,C,R){let Q;return void 0!==this.cache[D]?(Q=this.cache[D],this.canvasFactory.reset(Q,C,R)):(Q=this.canvasFactory.create(C,R),this.cache[D]=Q),Q}delete(D){delete this.cache[D]}clear(){for(const D in this.cache)this.canvasFactory.destroy(this.cache[D]),delete this.cache[D]}}function y(te,D,C,R,Q,Y,J,de,ue,m){const[S,F,L,K,ie,he]=(0,k.getCurrentTransform)(te);if(0===F&&0===L){const Ee=Math.round(J*S+ie),Ve=Math.round(de*K+he),je=Math.abs(Math.round((J+ue)*S+ie)-Ee)||1,Ke=Math.abs(Math.round((de+m)*K+he)-Ve)||1;return te.setTransform(Math.sign(S),0,0,Math.sign(K),Ee,Ve),te.drawImage(D,C,R,Q,Y,0,0,je,Ke),te.setTransform(S,F,L,K,ie,he),[je,Ke]}if(0===S&&0===K){const Ee=Math.round(de*L+ie),Ve=Math.round(J*F+he),je=Math.abs(Math.round((de+m)*L+ie)-Ee)||1,Ke=Math.abs(Math.round((J+ue)*F+he)-Ve)||1;return te.setTransform(0,Math.sign(F),Math.sign(L),0,Ee,Ve),te.drawImage(D,C,R,Q,Y,0,0,Ke,je),te.setTransform(S,F,L,K,ie,he),[Ke,je]}return te.drawImage(D,C,R,Q,Y,J,de,ue,m),[Math.hypot(S,F)*ue,Math.hypot(L,K)*m]}class x{constructor(D,C){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=j.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=j.FONT_IDENTITY_MATRIX,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=j.TextRenderingMode.FILL,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=null,this.startNewPathAndClipBox([0,0,D,C])}clone(){const D=Object.create(this);return D.clipBox=this.clipBox.slice(),D}setCurrentPoint(D,C){this.x=D,this.y=C}updatePathMinMax(D,C,R){[C,R]=j.Util.applyTransform([C,R],D),this.minX=Math.min(this.minX,C),this.minY=Math.min(this.minY,R),this.maxX=Math.max(this.maxX,C),this.maxY=Math.max(this.maxY,R)}updateRectMinMax(D,C){const R=j.Util.applyTransform(C,D),Q=j.Util.applyTransform(C.slice(2),D);this.minX=Math.min(this.minX,R[0],Q[0]),this.minY=Math.min(this.minY,R[1],Q[1]),this.maxX=Math.max(this.maxX,R[0],Q[0]),this.maxY=Math.max(this.maxY,R[1],Q[1])}updateScalingPathMinMax(D,C){j.Util.scaleMinMax(D,C),this.minX=Math.min(this.minX,C[0]),this.maxX=Math.max(this.maxX,C[1]),this.minY=Math.min(this.minY,C[2]),this.maxY=Math.max(this.maxY,C[3])}updateCurvePathMinMax(D,C,R,Q,Y,J,de,ue,m,S){const F=j.Util.bezierBoundingBox(C,R,Q,Y,J,de,ue,m);if(S)return S[0]=Math.min(S[0],F[0],F[2]),S[1]=Math.max(S[1],F[0],F[2]),S[2]=Math.min(S[2],F[1],F[3]),void(S[3]=Math.max(S[3],F[1],F[3]));this.updateRectMinMax(D,F)}getPathBoundingBox(D=fe.PathType.FILL,C=null){const R=[this.minX,this.minY,this.maxX,this.maxY];if(D===fe.PathType.STROKE){C||(0,j.unreachable)("Stroke bounding box must include transform.");const Q=j.Util.singularValueDecompose2dScale(C),Y=Q[0]*this.lineWidth/2,J=Q[1]*this.lineWidth/2;R[0]-=Y,R[1]-=J,R[2]+=Y,R[3]+=J}return R}updateClipFromPath(){const D=j.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(D||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(D){this.clipBox=D,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(D=fe.PathType.FILL,C=null){return j.Util.intersect(this.clipBox,this.getPathBoundingBox(D,C))}}function v(te,D,C=null){if("undefined"!=typeof ImageData&&D instanceof ImageData)return void te.putImageData(D,0,0);const R=D.height,Q=D.width,Y=R%E,J=(R-Y)/E,de=0===Y?J:J+1,ue=te.createImageData(Q,E);let S,m=0;const F=D.data,L=ue.data;let K,ie,he,ke,me,we,Ee,Ne;if(C)switch(C.length){case 1:me=C[0],we=C[0],Ee=C[0],Ne=C[0];break;case 4:me=C[0],we=C[1],Ee=C[2],Ne=C[3]}if(D.kind===j.ImageKind.GRAYSCALE_1BPP){const Ve=F.byteLength,X=new Uint32Array(L.buffer,0,L.byteLength>>2),je=X.length,Ze=Q+7>>3;let Ke=4294967295,lt=j.FeatureTest.isLittleEndian?4278190080:255;for(Ne&&255===Ne[0]&&0===Ne[255]&&([Ke,lt]=[lt,Ke]),K=0;K<de;K++){for(he=K<J?E:Y,S=0,ie=0;ie<he;ie++){const yt=Ve-m;let $t=0;const Lt=yt>Ze?Q:8*yt-7,vt=-8&Lt;let Ct=0,rn=0;for(;$t<vt;$t+=8)rn=F[m++],X[S++]=128&rn?Ke:lt,X[S++]=64&rn?Ke:lt,X[S++]=32&rn?Ke:lt,X[S++]=16&rn?Ke:lt,X[S++]=8&rn?Ke:lt,X[S++]=4&rn?Ke:lt,X[S++]=2&rn?Ke:lt,X[S++]=1&rn?Ke:lt;for(;$t<Lt;$t++)0===Ct&&(rn=F[m++],Ct=128),X[S++]=rn&Ct?Ke:lt,Ct>>=1}for(;S<je;)X[S++]=0;te.putImageData(ue,0,K*E)}}else if(D.kind===j.ImageKind.RGBA_32BPP){const Ve=!!(me||we||Ee);for(ie=0,ke=Q*E*4,K=0;K<J;K++){if(L.set(F.subarray(m,m+ke)),m+=ke,Ve)for(let X=0;X<ke;X+=4)me&&(L[X+0]=me[L[X+0]]),we&&(L[X+1]=we[L[X+1]]),Ee&&(L[X+2]=Ee[L[X+2]]);te.putImageData(ue,0,ie),ie+=E}if(K<de){if(ke=Q*Y*4,L.set(F.subarray(m,m+ke)),Ve)for(let X=0;X<ke;X+=4)me&&(L[X+0]=me[L[X+0]]),we&&(L[X+1]=we[L[X+1]]),Ee&&(L[X+2]=Ee[L[X+2]]);te.putImageData(ue,0,ie)}}else{if(D.kind!==j.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${D.kind}`);{const Ve=!!(me||we||Ee);for(he=E,ke=Q*he,K=0;K<de;K++){for(K>=J&&(he=Y,ke=Q*he),S=0,ie=ke;ie--;)L[S++]=F[m++],L[S++]=F[m++],L[S++]=F[m++],L[S++]=255;if(Ve)for(let X=0;X<S;X+=4)me&&(L[X+0]=me[L[X+0]]),we&&(L[X+1]=we[L[X+1]]),Ee&&(L[X+2]=Ee[L[X+2]]);te.putImageData(ue,0,K*E)}}}}function f(te,D){if(D.bitmap)return void te.drawImage(D.bitmap,0,0);const C=D.height,R=D.width,Q=C%E,Y=(C-Q)/E,J=0===Q?Y:Y+1,de=te.createImageData(R,E);let ue=0;const m=D.data,S=de.data;for(let F=0;F<J;F++){const L=F<Y?E:Q;({srcPos:ue}=(0,ce.applyMaskImageData)({src:m,srcPos:ue,dest:S,width:R,height:L})),te.putImageData(de,0,F*E)}}function g(te,D){const C=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"];for(let R=0,Q=C.length;R<Q;R++){const Y=C[R];void 0!==te[Y]&&(D[Y]=te[Y])}void 0!==te.setLineDash&&(D.setLineDash(te.getLineDash()),D.lineDashOffset=te.lineDashOffset)}function T(te,D){te.strokeStyle=te.fillStyle=D||"#000000",te.fillRule="nonzero",te.globalAlpha=1,te.lineWidth=1,te.lineCap="butt",te.lineJoin="miter",te.miterLimit=10,te.globalCompositeOperation="source-over",te.font="10px sans-serif",void 0!==te.setLineDash&&(te.setLineDash([]),te.lineDashOffset=0)}function N(te,D,C,R){const Q=te.length;for(let Y=3;Y<Q;Y+=4){const J=te[Y];if(0===J)te[Y-3]=D,te[Y-2]=C,te[Y-1]=R;else if(J<255){const de=255-J;te[Y-3]=te[Y-3]*J+D*de>>8,te[Y-2]=te[Y-2]*J+C*de>>8,te[Y-1]=te[Y-1]*J+R*de>>8}}}function H(te,D,C){const R=te.length;for(let Y=3;Y<R;Y+=4)D[Y]=D[Y]*(C?C[te[Y]]:te[Y])*.00392156862745098|0}function M(te,D,C){const R=te.length;for(let Q=3;Q<R;Q+=4){const Y=77*te[Q-3]+152*te[Q-2]+28*te[Q-1];D[Q]=C?D[Q]*C[Y>>8]>>8:D[Q]*Y>>16}}function Se(te,D){const C=j.Util.singularValueDecompose2dScale(te);C[0]=Math.fround(C[0]),C[1]=Math.fround(C[1]);const R=Math.fround((globalThis.devicePixelRatio||1)*k.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==D?D:C[0]<=R||C[1]<=R}const ve=["butt","round","square"],Ie=["miter","round","bevel"],ge={},se={},xe=class{constructor(D,C,R,Q,Y,J,de,ue){Pe(this,De),this.ctx=D,this.current=new x(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=C,this.objs=R,this.canvasFactory=Q,this.imageLayer=Y,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=[],this.optionalContentConfig=J,this.cachedCanvases=new h(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=de,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.backgroundColor=(null==ue?void 0:ue.background)||null,this.foregroundColor=(null==ue?void 0:ue.foreground)||null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(D,C=null){return"string"==typeof D?D.startsWith("g_")?this.commonObjs.get(D):this.objs.get(D):C}beginDrawing({transform:D,viewport:C,transparency:R=!1,background:Q=null}){const Y=this.ctx.canvas.width,J=this.ctx.canvas.height,de=Q||"#ffffff";if(this.ctx.save(),this.foregroundColor&&this.backgroundColor){this.ctx.fillStyle=this.foregroundColor;const ue=this.foregroundColor=this.ctx.fillStyle;this.ctx.fillStyle=this.backgroundColor;const m=this.backgroundColor=this.ctx.fillStyle;let S=!0,F=de;if(this.ctx.fillStyle=de,F=this.ctx.fillStyle,S="string"==typeof F&&/^#[0-9A-Fa-f]{6}$/.test(F),"#000000"===ue&&"#ffffff"===m||ue===m||!S)this.foregroundColor=this.backgroundColor=null;else{const[L,K,ie]=(0,k.getRGB)(F),he=me=>(me/=255)<=.03928?me/12.92:ls((me+.055)/1.055,2.4),ke=Math.round(.2126*he(L)+.7152*he(K)+.0722*he(ie));this.selectColor=(me,we,Ee)=>{const Ne=.2126*he(me)+.7152*he(we)+.0722*he(Ee);return Math.round(Ne)===ke?m:ue}}}if(this.ctx.fillStyle=this.backgroundColor||de,this.ctx.fillRect(0,0,Y,J),this.ctx.restore(),R){const ue=this.cachedCanvases.getCanvas("transparent",Y,J);this.compositeCtx=this.ctx,this.transparentCanvas=ue.canvas,this.ctx=ue.context,this.ctx.save(),this.ctx.transform(...(0,k.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),T(this.ctx,this.foregroundColor),D&&(this.ctx.transform(...D),this.outputScaleX=D[0],this.outputScaleY=D[0]),this.ctx.transform(...C.transform),this.viewportScale=C.scale,this.baseTransform=(0,k.getCurrentTransform)(this.ctx),this.imageLayer&&((0,k.deprecated)("The `imageLayer` functionality will be removed in the future."),this.imageLayer.beginLayout())}executeOperatorList(D,C,R,Q){const Y=D.argsArray,J=D.fnArray;let de=C||0;const ue=Y.length;if(ue===de)return de;const m=ue-de>10&&"function"==typeof R,S=m?Date.now()+15:0;let F=0;const L=this.commonObjs,K=this.objs;let ie;for(;;){if(void 0!==Q&&de===Q.nextBreakPoint)return Q.breakIt(de,R),de;if(ie=J[de],ie!==j.OPS.dependency)this[ie].apply(this,Y[de]);else for(const he of Y[de]){const ke=he.startsWith("g_")?L:K;if(!ke.has(he))return ke.get(he,R),de}if(de++,de===ue)return de;if(m&&++F>10){if(Date.now()>S)return R(),de;F=0}}}endDrawing(){Le(this,De,SD).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const D of this._cachedBitmapsMap.values()){for(const C of D.values())"undefined"!=typeof HTMLCanvasElement&&C instanceof HTMLCanvasElement&&(C.width=C.height=0);D.clear()}this._cachedBitmapsMap.clear(),this.imageLayer&&this.imageLayer.endLayout()}_scaleImage(D,C){const R=D.width,Q=D.height;let S,F,Y=Math.max(Math.hypot(C[0],C[1]),1),J=Math.max(Math.hypot(C[2],C[3]),1),de=R,ue=Q,m="prescale1";for(;Y>2&&de>1||J>2&&ue>1;){let L=de,K=ue;Y>2&&de>1&&(L=Math.ceil(de/2),Y/=de/L),J>2&&ue>1&&(K=Math.ceil(ue/2),J/=ue/K),S=this.cachedCanvases.getCanvas(m,L,K),F=S.context,F.clearRect(0,0,L,K),F.drawImage(D,0,0,de,ue,0,0,L,K),D=S.canvas,de=L,ue=K,m="prescale1"===m?"prescale2":"prescale1"}return{img:D,paintWidth:de,paintHeight:ue}}_createMaskCanvas(D){const C=this.ctx,{width:R,height:Q}=D,Y=this.current.fillColor,J=this.current.patternFill,de=(0,k.getCurrentTransform)(C);let ue,m,S,F;if((D.bitmap||D.data)&&D.count>1){const je=D.bitmap||D.data.buffer,Ze=de.slice(0,4);m=JSON.stringify(J?Ze:[Ze,Y]),ue=this._cachedBitmapsMap.get(je),ue||(ue=new Map,this._cachedBitmapsMap.set(je,ue));const Ke=ue.get(m);if(Ke&&!J)return{canvas:Ke,offsetX:Math.round(Math.min(de[0],de[2])+de[4]),offsetY:Math.round(Math.min(de[1],de[3])+de[5])};S=Ke}S||(F=this.cachedCanvases.getCanvas("maskCanvas",R,Q),f(F.context,D));let L=j.Util.transform(de,[1/R,0,0,-1/Q,0,0]);L=j.Util.transform(L,[1,0,0,1,0,-Q]);const K=j.Util.applyTransform([0,0],L),ie=j.Util.applyTransform([R,Q],L),he=j.Util.normalizeRect([K[0],K[1],ie[0],ie[1]]),ke=Math.round(he[2]-he[0])||1,me=Math.round(he[3]-he[1])||1,we=this.cachedCanvases.getCanvas("fillCanvas",ke,me),Ee=we.context,Ne=Math.min(K[0],ie[0]),Ve=Math.min(K[1],ie[1]);Ee.translate(-Ne,-Ve),Ee.transform(...L),S||(S=this._scaleImage(F.canvas,(0,k.getCurrentTransformInverse)(Ee)),S=S.img,ue&&J&&ue.set(m,S)),Ee.imageSmoothingEnabled=Se((0,k.getCurrentTransform)(Ee),D.interpolate),y(Ee,S,0,0,S.width,S.height,0,0,R,Q),Ee.globalCompositeOperation="source-in";const X=j.Util.transform((0,k.getCurrentTransformInverse)(Ee),[1,0,0,1,-Ne,-Ve]);return Ee.fillStyle=J?Y.getPattern(C,this,X,fe.PathType.FILL):Y,Ee.fillRect(0,0,R,Q),ue&&!J&&(this.cachedCanvases.delete("fillCanvas"),ue.set(m,we.canvas)),{canvas:we.canvas,offsetX:Math.round(Ne),offsetY:Math.round(Ve)}}setLineWidth(D){D!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=D,this.ctx.lineWidth=D}setLineCap(D){this.ctx.lineCap=ve[D]}setLineJoin(D){this.ctx.lineJoin=Ie[D]}setMiterLimit(D){this.ctx.miterLimit=D}setDash(D,C){const R=this.ctx;void 0!==R.setLineDash&&(R.setLineDash(D),R.lineDashOffset=C)}setRenderingIntent(D){}setFlatness(D){}setGState(D){for(let C=0,R=D.length;C<R;C++){const Q=D[C],J=Q[1];switch(Q[0]){case"LW":this.setLineWidth(J);break;case"LC":this.setLineCap(J);break;case"LJ":this.setLineJoin(J);break;case"ML":this.setMiterLimit(J);break;case"D":this.setDash(J[0],J[1]);break;case"RI":this.setRenderingIntent(J);break;case"FL":this.setFlatness(J);break;case"Font":this.setFont(J[0],J[1]);break;case"CA":this.current.strokeAlpha=Q[1];break;case"ca":this.current.fillAlpha=Q[1],this.ctx.globalAlpha=Q[1];break;case"BM":this.ctx.globalCompositeOperation=J;break;case"SMask":this.current.activeSMask=J?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=J}}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const D=this.inSMaskMode;this.current.activeSMask&&!D?this.beginSMaskMode():!this.current.activeSMask&&D&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const Q=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,this.ctx.canvas.width,this.ctx.canvas.height);this.suspendedCtx=this.ctx,this.ctx=Q.context;const Y=this.ctx;Y.setTransform(...(0,k.getCurrentTransform)(this.suspendedCtx)),g(this.suspendedCtx,Y),function d(te,D){if(te._removeMirroring)throw new Error("Context is already forwarding operations.");te.__originalSave=te.save,te.__originalRestore=te.restore,te.__originalRotate=te.rotate,te.__originalScale=te.scale,te.__originalTranslate=te.translate,te.__originalTransform=te.transform,te.__originalSetTransform=te.setTransform,te.__originalResetTransform=te.resetTransform,te.__originalClip=te.clip,te.__originalMoveTo=te.moveTo,te.__originalLineTo=te.lineTo,te.__originalBezierCurveTo=te.bezierCurveTo,te.__originalRect=te.rect,te.__originalClosePath=te.closePath,te.__originalBeginPath=te.beginPath,te._removeMirroring=()=>{te.save=te.__originalSave,te.restore=te.__originalRestore,te.rotate=te.__originalRotate,te.scale=te.__originalScale,te.translate=te.__originalTranslate,te.transform=te.__originalTransform,te.setTransform=te.__originalSetTransform,te.resetTransform=te.__originalResetTransform,te.clip=te.__originalClip,te.moveTo=te.__originalMoveTo,te.lineTo=te.__originalLineTo,te.bezierCurveTo=te.__originalBezierCurveTo,te.rect=te.__originalRect,te.closePath=te.__originalClosePath,te.beginPath=te.__originalBeginPath,delete te._removeMirroring},te.save=function(){D.save(),this.__originalSave()},te.restore=function(){D.restore(),this.__originalRestore()},te.translate=function(R,Q){D.translate(R,Q),this.__originalTranslate(R,Q)},te.scale=function(R,Q){D.scale(R,Q),this.__originalScale(R,Q)},te.transform=function(R,Q,Y,J,de,ue){D.transform(R,Q,Y,J,de,ue),this.__originalTransform(R,Q,Y,J,de,ue)},te.setTransform=function(R,Q,Y,J,de,ue){D.setTransform(R,Q,Y,J,de,ue),this.__originalSetTransform(R,Q,Y,J,de,ue)},te.resetTransform=function(){D.resetTransform(),this.__originalResetTransform()},te.rotate=function(R){D.rotate(R),this.__originalRotate(R)},te.clip=function(R){D.clip(R),this.__originalClip(R)},te.moveTo=function(C,R){D.moveTo(C,R),this.__originalMoveTo(C,R)},te.lineTo=function(C,R){D.lineTo(C,R),this.__originalLineTo(C,R)},te.bezierCurveTo=function(C,R,Q,Y,J,de){D.bezierCurveTo(C,R,Q,Y,J,de),this.__originalBezierCurveTo(C,R,Q,Y,J,de)},te.rect=function(C,R,Q,Y){D.rect(C,R,Q,Y),this.__originalRect(C,R,Q,Y)},te.closePath=function(){D.closePath(),this.__originalClosePath()},te.beginPath=function(){D.beginPath(),this.__originalBeginPath()}}(Y,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(),g(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(D){this.current.activeSMask&&(D?(D[0]=Math.floor(D[0]),D[1]=Math.floor(D[1]),D[2]=Math.ceil(D[2]),D[3]=Math.ceil(D[3])):D=[0,0,this.ctx.canvas.width,this.ctx.canvas.height],function ye(te,D,C,R){const Q=R[0],Y=R[1],J=R[2]-Q,de=R[3]-Y;0===J||0===de||(function W(te,D,C,R,Q,Y,J,de,ue,m,S){const F=!!Y,L=F?Y[0]:0,K=F?Y[1]:0,ie=F?Y[2]:0;let he;he="Luminosity"===Q?M:H;const me=Math.min(R,Math.ceil(1048576/C));for(let we=0;we<R;we+=me){const Ee=Math.min(me,R-we),Ne=te.getImageData(de-m,we+(ue-S),C,Ee),Ve=D.getImageData(de,we+ue,C,Ee);F&&N(Ne.data,L,K,ie),he(Ne.data,Ve.data,J),D.putImageData(Ve,de,we+ue)}}(D.context,C,J,de,D.subtype,D.backdrop,D.transferMap,Q,Y,D.offsetX,D.offsetY),te.save(),te.globalAlpha=1,te.globalCompositeOperation="source-over",te.setTransform(1,0,0,1,0,0),te.drawImage(C.canvas,0,0),te.restore())}(this.suspendedCtx,this.current.activeSMask,this.ctx,D),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())}save(){this.inSMaskMode?(g(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const D=this.current;this.stateStack.push(D),this.current=D.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),g(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(D,C,R,Q,Y,J){this.ctx.transform(D,C,R,Q,Y,J),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(D,C,R){const Q=this.ctx,Y=this.current;let ue,m,J=Y.x,de=Y.y;const S=(0,k.getCurrentTransform)(Q),F=0===S[0]&&0===S[3]||0===S[1]&&0===S[2],L=F?R.slice(0):null;for(let K=0,ie=0,he=D.length;K<he;K++)switch(0|D[K]){case j.OPS.rectangle:J=C[ie++],de=C[ie++];const ke=C[ie++],me=C[ie++],we=J+ke,Ee=de+me;Q.moveTo(J,de),0===ke||0===me?Q.lineTo(we,Ee):(Q.lineTo(we,de),Q.lineTo(we,Ee),Q.lineTo(J,Ee)),F||Y.updateRectMinMax(S,[J,de,we,Ee]),Q.closePath();break;case j.OPS.moveTo:J=C[ie++],de=C[ie++],Q.moveTo(J,de),F||Y.updatePathMinMax(S,J,de);break;case j.OPS.lineTo:J=C[ie++],de=C[ie++],Q.lineTo(J,de),F||Y.updatePathMinMax(S,J,de);break;case j.OPS.curveTo:ue=J,m=de,J=C[ie+4],de=C[ie+5],Q.bezierCurveTo(C[ie],C[ie+1],C[ie+2],C[ie+3],J,de),Y.updateCurvePathMinMax(S,ue,m,C[ie],C[ie+1],C[ie+2],C[ie+3],J,de,L),ie+=6;break;case j.OPS.curveTo2:ue=J,m=de,Q.bezierCurveTo(J,de,C[ie],C[ie+1],C[ie+2],C[ie+3]),Y.updateCurvePathMinMax(S,ue,m,J,de,C[ie],C[ie+1],C[ie+2],C[ie+3],L),J=C[ie+2],de=C[ie+3],ie+=4;break;case j.OPS.curveTo3:ue=J,m=de,J=C[ie+2],de=C[ie+3],Q.bezierCurveTo(C[ie],C[ie+1],J,de,J,de),Y.updateCurvePathMinMax(S,ue,m,C[ie],C[ie+1],J,de,J,de,L),ie+=4;break;case j.OPS.closePath:Q.closePath()}F&&Y.updateScalingPathMinMax(S,L),Y.setCurrentPoint(J,de)}closePath(){this.ctx.closePath()}stroke(D){D=void 0===D||D;const C=this.ctx,R=this.current.strokeColor;C.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof R&&(null==R?void 0:R.getPattern)?(C.save(),C.strokeStyle=R.getPattern(C,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.STROKE),this.rescaleAndStroke(!1),C.restore()):this.rescaleAndStroke(!0)),D&&this.consumePath(this.current.getClippedPathBoundingBox()),C.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(D){D=void 0===D||D;const C=this.ctx,R=this.current.fillColor;let Y=!1;this.current.patternFill&&(C.save(),C.fillStyle=R.getPattern(C,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.FILL),Y=!0);const J=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==J&&(this.pendingEOFill?(C.fill("evenodd"),this.pendingEOFill=!1):C.fill()),Y&&C.restore(),D&&this.consumePath(J)}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=ge}eoClip(){this.pendingClip=se}beginText(){this.current.textMatrix=j.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const D=this.pendingTextPaths,C=this.ctx;if(void 0!==D){C.save(),C.beginPath();for(const R of D)C.setTransform(...R.transform),C.translate(R.x,R.y),R.addToPath(C,R.fontSize);C.restore(),C.clip(),C.beginPath(),delete this.pendingTextPaths}else C.beginPath()}setCharSpacing(D){this.current.charSpacing=D}setWordSpacing(D){this.current.wordSpacing=D}setHScale(D){this.current.textHScale=D/100}setLeading(D){this.current.leading=-D}setFont(D,C){const R=this.commonObjs.get(D),Q=this.current;if(!R)throw new Error(`Can't find font for ${D}`);if(Q.fontMatrix=R.fontMatrix||j.FONT_IDENTITY_MATRIX,(0===Q.fontMatrix[0]||0===Q.fontMatrix[3])&&(0,j.warn)("Invalid font matrix for font "+D),C<0?(C=-C,Q.fontDirection=-1):Q.fontDirection=1,this.current.font=R,this.current.fontSize=C,R.isType3Font)return;let J="normal";R.black?J="900":R.bold&&(J="bold");const de=R.italic?"italic":"normal",ue=`"${R.loadedName||"sans-serif"}", ${R.fallbackName}`;let m=C;C<16?m=16:C>100&&(m=100),this.current.fontSizeScale=C/m,this.ctx.font=`${de} ${J} ${m}px ${ue}`}setTextRenderingMode(D){this.current.textRenderingMode=D}setTextRise(D){this.current.textRise=D}moveText(D,C){this.current.x=this.current.lineX+=D,this.current.y=this.current.lineY+=C}setLeadingMoveText(D,C){this.setLeading(-C),this.moveText(D,C)}setTextMatrix(D,C,R,Q,Y,J){this.current.textMatrix=[D,C,R,Q,Y,J],this.current.textMatrixScale=Math.hypot(D,C),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(D,C,R,Q){const Y=this.ctx,J=this.current,de=J.font,ue=J.textRenderingMode,m=J.fontSize/J.fontSizeScale,S=ue&j.TextRenderingMode.FILL_STROKE_MASK,F=!!(ue&j.TextRenderingMode.ADD_TO_PATH_FLAG),L=J.patternFill&&!de.missingFile;let K;(de.disableFontFace||F||L)&&(K=de.getPathGenerator(this.commonObjs,D)),de.disableFontFace||L?(Y.save(),Y.translate(C,R),Y.beginPath(),K(Y,m),Q&&Y.setTransform(...Q),(S===j.TextRenderingMode.FILL||S===j.TextRenderingMode.FILL_STROKE)&&Y.fill(),(S===j.TextRenderingMode.STROKE||S===j.TextRenderingMode.FILL_STROKE)&&Y.stroke(),Y.restore()):((S===j.TextRenderingMode.FILL||S===j.TextRenderingMode.FILL_STROKE)&&Y.fillText(D,C,R),(S===j.TextRenderingMode.STROKE||S===j.TextRenderingMode.FILL_STROKE)&&Y.strokeText(D,C,R)),F&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,k.getCurrentTransform)(Y),x:C,y:R,fontSize:m,addToPath:K})}get isFontSubpixelAAEnabled(){const{context:D}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);D.scale(1.5,1),D.fillText("I",0,10);const C=D.getImageData(0,0,10,10).data;let R=!1;for(let Q=3;Q<C.length;Q+=4)if(C[Q]>0&&C[Q]<255){R=!0;break}return(0,j.shadow)(this,"isFontSubpixelAAEnabled",R)}showText(D){const C=this.current,R=C.font;if(R.isType3Font)return this.showType3Text(D);const Q=C.fontSize;if(0===Q)return;const Y=this.ctx,J=C.fontSizeScale,de=C.charSpacing,ue=C.wordSpacing,m=C.fontDirection,S=C.textHScale*m,F=D.length,L=R.vertical,K=L?1:-1,ie=R.defaultVMetrics,he=Q*C.fontMatrix[0],ke=C.textRenderingMode===j.TextRenderingMode.FILL&&!R.disableFontFace&&!C.patternFill;let me;if(Y.save(),Y.transform(...C.textMatrix),Y.translate(C.x,C.y+C.textRise),Y.scale(S,m>0?-1:1),C.patternFill){Y.save();const X=C.fillColor.getPattern(Y,this,(0,k.getCurrentTransformInverse)(Y),fe.PathType.FILL);me=(0,k.getCurrentTransform)(Y),Y.restore(),Y.fillStyle=X}let we=C.lineWidth;const Ee=C.textMatrixScale;if(0===Ee||0===we){const X=C.textRenderingMode&j.TextRenderingMode.FILL_STROKE_MASK;(X===j.TextRenderingMode.STROKE||X===j.TextRenderingMode.FILL_STROKE)&&(we=this.getSinglePixelWidth())}else we/=Ee;1!==J&&(Y.scale(J,J),we/=J),Y.lineWidth=we;let Ve,Ne=0;for(Ve=0;Ve<F;++Ve){const X=D[Ve];if("number"==typeof X){Ne+=K*X*Q/1e3;continue}let je=!1;const Ze=(X.isSpace?ue:0)+de,Ke=X.fontChar,lt=X.accent;let yt,$t,vt,Lt=X.width;if(L){const Ct=X.vmetric||ie,rn=-(X.vmetric?Ct[1]:.5*Lt)*he;Lt=Ct?-Ct[0]:Lt,yt=rn/J,$t=(Ne+Ct[2]*he)/J}else yt=Ne/J,$t=0;if(R.remeasure&&Lt>0){const Ct=1e3*Y.measureText(Ke).width/Q*J;if(Lt<Ct&&this.isFontSubpixelAAEnabled){const rn=Lt/Ct;je=!0,Y.save(),Y.scale(rn,1),yt/=rn}else Lt!==Ct&&(yt+=(Lt-Ct)/2e3*Q/J)}this.contentVisible&&(X.isInFont||R.missingFile)&&(ke&&!lt?Y.fillText(Ke,yt,$t):(this.paintChar(Ke,yt,$t,me),lt&&this.paintChar(lt.fontChar,yt+Q*lt.offset.x/J,$t-Q*lt.offset.y/J,me))),vt=L?Lt*he-Ze*m:Lt*he+Ze*m,Ne+=vt,je&&Y.restore()}L?C.y-=Ne:C.x+=Ne*S,Y.restore(),this.compose()}showType3Text(D){const C=this.ctx,R=this.current,Q=R.font,Y=R.fontSize,J=R.fontDirection,de=Q.vertical?1:-1,ue=R.charSpacing,m=R.wordSpacing,S=R.textHScale*J,F=R.fontMatrix||j.FONT_IDENTITY_MATRIX,L=D.length;let ie,he,ke,me;if(R.textRenderingMode!==j.TextRenderingMode.INVISIBLE&&0!==Y){for(this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,C.save(),C.transform(...R.textMatrix),C.translate(R.x,R.y),C.scale(S,J),ie=0;ie<L;++ie){if(he=D[ie],"number"==typeof he){me=de*he*Y/1e3,this.ctx.translate(me,0),R.x+=me*S;continue}const we=(he.isSpace?m:0)+ue,Ee=Q.charProcOperatorList[he.operatorListId];Ee?(this.contentVisible&&(this.processingType3=he,this.save(),C.scale(Y,Y),C.transform(...F),this.executeOperatorList(Ee),this.restore()),ke=j.Util.applyTransform([he.width,0],F)[0]*Y+we,C.translate(ke,0),R.x+=ke*S):(0,j.warn)(`Type3 character "${he.operatorListId}" is not available.`)}C.restore(),this.processingType3=null}}setCharWidth(D,C){}setCharWidthAndBounds(D,C,R,Q,Y,J){this.ctx.rect(R,Q,Y-R,J-Q),this.ctx.clip(),this.endPath()}getColorN_Pattern(D){let C;if("TilingPattern"===D[0]){const R=D[1],Q=this.baseTransform||(0,k.getCurrentTransform)(this.ctx);C=new fe.TilingPattern(D,R,this.ctx,{createCanvasGraphics:J=>new xe(J,this.commonObjs,this.objs,this.canvasFactory)},Q)}else C=this._getPattern(D[1],D[2]);return C}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(D,C,R){var Y;const Q=(null==(Y=this.selectColor)?void 0:Y.call(this,D,C,R))||j.Util.makeHexColor(D,C,R);this.ctx.strokeStyle=Q,this.current.strokeColor=Q}setFillRGBColor(D,C,R){var Y;const Q=(null==(Y=this.selectColor)?void 0:Y.call(this,D,C,R))||j.Util.makeHexColor(D,C,R);this.ctx.fillStyle=Q,this.current.fillColor=Q,this.current.patternFill=!1}_getPattern(D,C=null){let R;return this.cachedPatterns.has(D)?R=this.cachedPatterns.get(D):(R=(0,fe.getShadingPattern)(this.objs.get(D)),this.cachedPatterns.set(D,R)),C&&(R.matrix=C),R}shadingFill(D){if(!this.contentVisible)return;const C=this.ctx;this.save();const R=this._getPattern(D);C.fillStyle=R.getPattern(C,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.SHADING);const Q=(0,k.getCurrentTransformInverse)(C);if(Q){const Y=C.canvas,J=Y.width,de=Y.height,ue=j.Util.applyTransform([0,0],Q),m=j.Util.applyTransform([0,de],Q),S=j.Util.applyTransform([J,0],Q),F=j.Util.applyTransform([J,de],Q),L=Math.min(ue[0],m[0],S[0],F[0]),K=Math.min(ue[1],m[1],S[1],F[1]),ie=Math.max(ue[0],m[0],S[0],F[0]),he=Math.max(ue[1],m[1],S[1],F[1]);this.ctx.fillRect(L,K,ie-L,he-K)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,j.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,j.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(D,C){this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(D)&&6===D.length&&this.transform(...D),this.baseTransform=(0,k.getCurrentTransform)(this.ctx),C)&&(this.ctx.rect(C[0],C[1],C[2]-C[0],C[3]-C[1]),this.current.updateRectMinMax((0,k.getCurrentTransform)(this.ctx),C),this.clip(),this.endPath())}paintFormXObjectEnd(){!this.contentVisible||(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(D){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const C=this.ctx;D.isolated||(0,j.info)("TODO: Support non-isolated groups."),D.knockout&&(0,j.warn)("Knockout groups not supported.");const R=(0,k.getCurrentTransform)(C);if(D.matrix&&C.transform(...D.matrix),!D.bbox)throw new Error("Bounding box is required.");let Q=j.Util.getAxialAlignedBoundingBox(D.bbox,(0,k.getCurrentTransform)(C));Q=j.Util.intersect(Q,[0,0,C.canvas.width,C.canvas.height])||[0,0,0,0];const J=Math.floor(Q[0]),de=Math.floor(Q[1]);let ue=Math.max(Math.ceil(Q[2])-J,1),m=Math.max(Math.ceil(Q[3])-de,1),S=1,F=1;ue>V&&(S=ue/V,ue=V),m>V&&(F=m/V,m=V),this.current.startNewPathAndClipBox([0,0,ue,m]);let L="groupAt"+this.groupLevel;D.smask&&(L+="_smask_"+this.smaskCounter++%2);const K=this.cachedCanvases.getCanvas(L,ue,m),ie=K.context;ie.scale(1/S,1/F),ie.translate(-J,-de),ie.transform(...R),D.smask?this.smaskStack.push({canvas:K.canvas,context:ie,offsetX:J,offsetY:de,scaleX:S,scaleY:F,subtype:D.smask.subtype,backdrop:D.smask.backdrop,transferMap:D.smask.transferMap||null,startTransformInverse:null}):(C.setTransform(1,0,0,1,0,0),C.translate(J,de),C.scale(S,F),C.save()),g(C,ie),this.ctx=ie,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(C),this.groupLevel++}endGroup(D){if(!this.contentVisible)return;this.groupLevel--;const C=this.ctx,R=this.groupStack.pop();if(this.ctx=R,this.ctx.imageSmoothingEnabled=!1,D.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const Q=(0,k.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...Q);const Y=j.Util.getAxialAlignedBoundingBox([0,0,C.canvas.width,C.canvas.height],Q);this.ctx.drawImage(C.canvas,0,0),this.ctx.restore(),this.compose(Y)}}beginAnnotation(D,C,R,Q,Y){if(Le(this,De,SD).call(this),T(this.ctx,this.foregroundColor),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(C)&&4===C.length){const J=C[2]-C[0],de=C[3]-C[1];if(Y&&this.annotationCanvasMap){(R=R.slice())[4]-=C[0],R[5]-=C[1],(C=C.slice())[0]=C[1]=0,C[2]=J,C[3]=de;const[ue,m]=j.Util.singularValueDecompose2dScale((0,k.getCurrentTransform)(this.ctx)),{viewportScale:S}=this,F=Math.ceil(J*this.outputScaleX*S),L=Math.ceil(de*this.outputScaleY*S);this.annotationCanvas=this.canvasFactory.create(F,L);const{canvas:K,context:ie}=this.annotationCanvas;this.annotationCanvasMap.set(D,K),this.annotationCanvas.savedCtx=this.ctx,this.ctx=ie,this.ctx.setTransform(ue,0,0,-m,0,de*m),T(this.ctx,this.foregroundColor)}else T(this.ctx,this.foregroundColor),this.ctx.rect(C[0],C[1],J,de),this.ctx.clip(),this.endPath()}this.current=new x(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...R),this.transform(...Q)}endAnnotation(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(D){if(!this.contentVisible)return;const C=D.count;(D=this.getObject(D.data,D)).count=C;const R=this.ctx,Q=this.processingType3;if(Q&&(void 0===Q.compiled&&(Q.compiled=function w(te){const{width:D,height:C}=te;if(D>B||C>B)return null;const Q=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),Y=D+1;let de,ue,m,J=new Uint8Array(Y*(C+1));const S=D+7&-8;let F=new Uint8Array(S*C),L=0;for(const me of te.data){let we=128;for(;we>0;)F[L++]=me&we?0:255,we>>=1}let K=0;for(L=0,0!==F[L]&&(J[0]=1,++K),ue=1;ue<D;ue++)F[L]!==F[L+1]&&(J[ue]=F[L]?2:1,++K),L++;for(0!==F[L]&&(J[ue]=2,++K),de=1;de<C;de++){L=de*S,m=de*Y,F[L-S]!==F[L]&&(J[m]=F[L]?1:8,++K);let me=(F[L]?4:0)+(F[L-S]?8:0);for(ue=1;ue<D;ue++)me=(me>>2)+(F[L+1]?4:0)+(F[L-S+1]?8:0),Q[me]&&(J[m+ue]=Q[me],++K),L++;if(F[L-S]!==F[L]&&(J[m+ue]=F[L]?2:4,++K),K>1e3)return null}for(L=S*(C-1),m=de*Y,0!==F[L]&&(J[m]=8,++K),ue=1;ue<D;ue++)F[L]!==F[L+1]&&(J[m+ue]=F[L]?4:8,++K),L++;if(0!==F[L]&&(J[m+ue]=4,++K),K>1e3)return null;const ie=new Int32Array([0,Y,-1,0,-Y,0,0,0,1]),he=new Path2D;for(de=0;K&&de<=C;de++){let me=de*Y;const we=me+D;for(;me<we&&!J[me];)me++;if(me===we)continue;he.moveTo(me%Y,de);const Ee=me;let Ne=J[me];do{const Ve=ie[Ne];do{me+=Ve}while(!J[me]);const X=J[me];5!==X&&10!==X?(Ne=X,J[me]=0):(Ne=X&51*Ne>>4,J[me]&=Ne>>2|Ne<<2),he.lineTo(me%Y,me/Y|0),J[me]||--K}while(Ee!==me);--de}return F=null,J=null,function(me){me.save(),me.scale(1/D,-1/C),me.translate(0,-C),me.fill(he),me.beginPath(),me.restore()}}(D)),Q.compiled))return void Q.compiled(R);const Y=this._createMaskCanvas(D),J=Y.canvas;R.save(),R.setTransform(1,0,0,1,0,0),R.drawImage(J,Y.offsetX,Y.offsetY),R.restore(),this.compose()}paintImageMaskXObjectRepeat(D,C,R=0,Q=0,Y,J){if(!this.contentVisible)return;D=this.getObject(D.data,D);const de=this.ctx;de.save();const ue=(0,k.getCurrentTransform)(de);de.transform(C,R,Q,Y,0,0);const m=this._createMaskCanvas(D);de.setTransform(1,0,0,1,0,0);for(let S=0,F=J.length;S<F;S+=2){const L=j.Util.transform(ue,[C,R,Q,Y,J[S],J[S+1]]),[K,ie]=j.Util.applyTransform([0,0],L);de.drawImage(m.canvas,K,ie)}de.restore(),this.compose()}paintImageMaskXObjectGroup(D){if(!this.contentVisible)return;const C=this.ctx,R=this.current.fillColor,Q=this.current.patternFill;for(const Y of D){const{data:J,width:de,height:ue,transform:m}=Y,S=this.cachedCanvases.getCanvas("maskCanvas",de,ue),F=S.context;F.save(),f(F,this.getObject(J,Y)),F.globalCompositeOperation="source-in",F.fillStyle=Q?R.getPattern(F,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.FILL):R,F.fillRect(0,0,de,ue),F.restore(),C.save(),C.transform(...m),C.scale(1,-1),y(C,S.canvas,0,0,de,ue,0,-1,1,1),C.restore()}this.compose()}paintImageXObject(D){if(!this.contentVisible)return;const C=this.getObject(D);C?this.paintInlineImageXObject(C):(0,j.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(D,C,R,Q){if(!this.contentVisible)return;const Y=this.getObject(D);if(!Y)return void(0,j.warn)("Dependent image isn't ready yet");const J=Y.width,de=Y.height,ue=[];for(let m=0,S=Q.length;m<S;m+=2)ue.push({transform:[C,0,0,R,Q[m],Q[m+1]],x:0,y:0,w:J,h:de});this.paintInlineImageXObjectGroup(Y,ue)}paintInlineImageXObject(D){if(!this.contentVisible)return;const C=D.width,R=D.height,Q=this.ctx;let Y;if(this.save(),Q.scale(1/C,-1/R),"function"==typeof HTMLElement&&D instanceof HTMLElement||!D.data)Y=D;else{const m=this.cachedCanvases.getCanvas("inlineImage",C,R);v(m.context,D,this.current.transferMaps),Y=m.canvas}const J=this._scaleImage(Y,(0,k.getCurrentTransformInverse)(Q));Q.imageSmoothingEnabled=Se((0,k.getCurrentTransform)(Q),D.interpolate);const[de,ue]=y(Q,J.img,0,0,J.paintWidth,J.paintHeight,0,-R,C,R);if(this.imageLayer){const[m,S]=j.Util.applyTransform([0,-R],(0,k.getCurrentTransform)(this.ctx));this.imageLayer.appendImage({imgData:D,left:m,top:S,width:de,height:ue})}this.compose(),this.restore()}paintInlineImageXObjectGroup(D,C){if(!this.contentVisible)return;const R=this.ctx,Q=D.width,Y=D.height,J=this.cachedCanvases.getCanvas("inlineImage",Q,Y);v(J.context,D,this.current.transferMaps);for(const ue of C){if(R.save(),R.transform(...ue.transform),R.scale(1,-1),y(R,J.canvas,ue.x,ue.y,ue.w,ue.h,0,-1,1,1),this.imageLayer){const[m,S]=j.Util.applyTransform([ue.x,ue.y],(0,k.getCurrentTransform)(this.ctx));this.imageLayer.appendImage({imgData:D,left:m,top:S,width:Q,height:Y})}R.restore()}this.compose()}paintSolidColorImageMask(){!this.contentVisible||(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(D){}markPointProps(D,C){}beginMarkedContent(D){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(D,C){this.markedContentStack.push("OC"===D?{visible:this.optionalContentConfig.isVisible(C)}:{visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(D){const C=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(D);const R=this.ctx;this.pendingClip&&(C||(this.pendingClip===se?R.clip("evenodd"):R.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),R.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const D=(0,k.getCurrentTransform)(this.ctx);if(0===D[1]&&0===D[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(D[0]),Math.abs(D[3]));else{const C=Math.abs(D[0]*D[3]-D[2]*D[1]),R=Math.hypot(D[0],D[2]),Q=Math.hypot(D[1],D[3]);this._cachedGetSinglePixelWidth=Math.max(R,Q)/C}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(!this._cachedScaleForStroking){const{lineWidth:D}=this.current,C=(0,k.getCurrentTransform)(this.ctx);let R,Q;if(0===C[1]&&0===C[2]){const Y=Math.abs(C[0]),J=Math.abs(C[3]);if(0===D)R=1/Y,Q=1/J;else{const de=Y*D,ue=J*D;R=de<1?1/de:1,Q=ue<1?1/ue:1}}else{const Y=Math.abs(C[0]*C[3]-C[2]*C[1]),J=Math.hypot(C[0],C[1]),de=Math.hypot(C[2],C[3]);if(0===D)R=de/Y,Q=J/Y;else{const ue=D*Y;R=de>ue?de/ue:1,Q=J>ue?J/ue:1}}this._cachedScaleForStroking=[R,Q]}return this._cachedScaleForStroking}rescaleAndStroke(D){const{ctx:C}=this,{lineWidth:R}=this.current,[Q,Y]=this.getScaleForStroking();if(C.lineWidth=R||1,1===Q&&1===Y)return void C.stroke();let J,de,ue;D&&(J=(0,k.getCurrentTransform)(C),de=C.getLineDash().slice(),ue=C.lineDashOffset),C.scale(Q,Y);const m=Math.max(Q,Y);C.setLineDash(C.getLineDash().map(S=>S/m)),C.lineDashOffset/=m,C.stroke(),D&&(C.setTransform(...J),C.setLineDash(de),C.lineDashOffset=ue)}isContentVisible(){for(let D=this.markedContentStack.length-1;D>=0;D--)if(!this.markedContentStack[D].visible)return!1;return!0}};let ee=xe;De=new WeakSet,SD=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();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)},I.CanvasGraphics=ee;for(const te in j.OPS)void 0!==ee.prototype[te]&&(ee.prototype[j.OPS[te]]=ee.prototype[te])},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.TilingPattern=I.PathType=void 0,I.getShadingPattern=function E(y){switch(y[0]){case"RadialAxial":return new P(y);case"Mesh":return new G(y);case"Dummy":return new B}throw new Error(`Unknown IR type: ${y[0]}`)};var k=_e(1),j=_e(8),fe=_e(3);const ce={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function pe(y,w){if(!w||fe.isNodeJS)return;const x=w[2]-w[0],v=w[3]-w[1],f=new Path2D;f.rect(w[0],w[1],x,v),y.clip(f)}I.PathType=ce;class ne{constructor(){this.constructor===ne&&(0,k.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,k.unreachable)("Abstract method `getPattern` called.")}}class P extends ne{constructor(w){super(),this._type=w[1],this._bbox=w[2],this._colorStops=w[3],this._p0=w[4],this._p1=w[5],this._r0=w[6],this._r1=w[7],this.matrix=null}_createGradient(w){let x;"axial"===this._type?x=w.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(x=w.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const v of this._colorStops)x.addColorStop(v[0],v[1]);return x}getPattern(w,x,v,f){let g;if(f===ce.STROKE||f===ce.FILL){const T=x.current.getClippedPathBoundingBox(f,(0,j.getCurrentTransform)(w))||[0,0,0,0],N=Math.ceil(T[2]-T[0])||1,H=Math.ceil(T[3]-T[1])||1,M=x.cachedCanvases.getCanvas("pattern",N,H,!0),W=M.context;W.clearRect(0,0,W.canvas.width,W.canvas.height),W.beginPath(),W.rect(0,0,W.canvas.width,W.canvas.height),W.translate(-T[0],-T[1]),v=k.Util.transform(v,[1,0,0,1,T[0],T[1]]),W.transform(...x.baseTransform),this.matrix&&W.transform(...this.matrix),pe(W,this._bbox),W.fillStyle=this._createGradient(W),W.fill(),g=w.createPattern(M.canvas,"no-repeat");const ye=new DOMMatrix(v);try{g.setTransform(ye)}catch(Se){(0,k.warn)(`RadialAxialShadingPattern.getPattern: "${null==Se?void 0:Se.message}".`)}}else pe(w,this._bbox),g=this._createGradient(w);return g}}function V(y,w,x,v,f,g,T,N){const H=w.coords,M=w.colors,W=y.data,ye=4*y.width;let Se;H[x+1]>H[v+1]&&(Se=x,x=v,v=Se,Se=g,g=T,T=Se),H[v+1]>H[f+1]&&(Se=v,v=f,f=Se,Se=T,T=N,N=Se),H[x+1]>H[v+1]&&(Se=x,x=v,v=Se,Se=g,g=T,T=Se);const ve=(H[x]+w.offsetX)*w.scaleX,Ie=(H[x+1]+w.offsetY)*w.scaleY,ge=(H[v]+w.offsetX)*w.scaleX,se=(H[v+1]+w.offsetY)*w.scaleY,ee=(H[f]+w.offsetX)*w.scaleX,De=(H[f+1]+w.offsetY)*w.scaleY;if(Ie>=De)return;const Ae=M[g],xe=M[g+1],te=M[g+2],D=M[T],C=M[T+1],R=M[T+2],Q=M[N],Y=M[N+1],J=M[N+2],de=Math.round(Ie),ue=Math.round(De);let m,S,F,L,K,ie,he,ke;for(let me=de;me<=ue;me++){if(me<se){let X;X=me<Ie?0:(Ie-me)/(Ie-se),m=ve-(ve-ge)*X,S=Ae-(Ae-D)*X,F=xe-(xe-C)*X,L=te-(te-R)*X}else{let X;X=me>De?1:se===De?0:(se-me)/(se-De),m=ge-(ge-ee)*X,S=D-(D-Q)*X,F=C-(C-Y)*X,L=R-(R-J)*X}let we;we=me<Ie?0:me>De?1:(Ie-me)/(Ie-De),K=ve-(ve-ee)*we,ie=Ae-(Ae-Q)*we,he=xe-(xe-Y)*we,ke=te-(te-J)*we;const Ee=Math.round(Math.min(m,K)),Ne=Math.round(Math.max(m,K));let Ve=ye*me+4*Ee;for(let X=Ee;X<=Ne;X++)we=(m-X)/(m-K),we<0?we=0:we>1&&(we=1),W[Ve++]=S-(S-ie)*we|0,W[Ve++]=F-(F-he)*we|0,W[Ve++]=L-(L-ke)*we|0,W[Ve++]=255}}function O(y,w,x){const v=w.coords,f=w.colors;let g,T;switch(w.type){case"lattice":const N=w.verticesPerRow,H=Math.floor(v.length/N)-1,M=N-1;for(g=0;g<H;g++){let W=g*N;for(let ye=0;ye<M;ye++,W++)V(y,x,v[W],v[W+1],v[W+N],f[W],f[W+1],f[W+N]),V(y,x,v[W+N+1],v[W+1],v[W+N],f[W+N+1],f[W+1],f[W+N])}break;case"triangles":for(g=0,T=v.length;g<T;g+=3)V(y,x,v[g],v[g+1],v[g+2],f[g],f[g+1],f[g+2]);break;default:throw new Error("illegal figure")}}class G extends ne{constructor(w){super(),this._coords=w[2],this._colors=w[3],this._figures=w[4],this._bounds=w[5],this._bbox=w[7],this._background=w[8],this.matrix=null}_createMeshCanvas(w,x,v){const N=Math.floor(this._bounds[0]),H=Math.floor(this._bounds[1]),M=Math.ceil(this._bounds[2])-N,W=Math.ceil(this._bounds[3])-H,ye=Math.min(Math.ceil(Math.abs(M*w[0]*1.1)),3e3),Se=Math.min(Math.ceil(Math.abs(W*w[1]*1.1)),3e3),ve=M/ye,Ie=W/Se,ge={coords:this._coords,colors:this._colors,offsetX:-N,offsetY:-H,scaleX:1/ve,scaleY:1/Ie},De=v.getCanvas("mesh",ye+4,Se+4,!1),Ae=De.context,xe=Ae.createImageData(ye,Se);if(x){const D=xe.data;for(let C=0,R=D.length;C<R;C+=4)D[C]=x[0],D[C+1]=x[1],D[C+2]=x[2],D[C+3]=255}for(const D of this._figures)O(xe,D,ge);return Ae.putImageData(xe,2,2),{canvas:De.canvas,offsetX:N-2*ve,offsetY:H-2*Ie,scaleX:ve,scaleY:Ie}}getPattern(w,x,v,f){let g;if(pe(w,this._bbox),f===ce.SHADING)g=k.Util.singularValueDecompose2dScale((0,j.getCurrentTransform)(w));else if(g=k.Util.singularValueDecompose2dScale(x.baseTransform),this.matrix){const N=k.Util.singularValueDecompose2dScale(this.matrix);g=[g[0]*N[0],g[1]*N[1]]}const T=this._createMeshCanvas(g,f===ce.SHADING?null:this._background,x.cachedCanvases);return f!==ce.SHADING&&(w.setTransform(...x.baseTransform),this.matrix&&w.transform(...this.matrix)),w.translate(T.offsetX,T.offsetY),w.scale(T.scaleX,T.scaleY),w.createPattern(T.canvas,"no-repeat")}}class B extends ne{getPattern(){return"hotpink"}}class h{static get MAX_PATTERN_SIZE(){return(0,k.shadow)(this,"MAX_PATTERN_SIZE",3e3)}constructor(w,x,v,f,g){this.operatorList=w[2],this.matrix=w[3]||[1,0,0,1,0,0],this.bbox=w[4],this.xstep=w[5],this.ystep=w[6],this.paintType=w[7],this.tilingType=w[8],this.color=x,this.ctx=v,this.canvasGraphicsFactory=f,this.baseTransform=g}createPatternCanvas(w){const x=this.operatorList,v=this.bbox,f=this.xstep,g=this.ystep,T=this.paintType,H=this.color,M=this.canvasGraphicsFactory;(0,k.info)("TilingType: "+this.tilingType);const W=v[0],ye=v[1],Se=v[2],ve=v[3],Ie=k.Util.singularValueDecompose2dScale(this.matrix),ge=k.Util.singularValueDecompose2dScale(this.baseTransform),se=[Ie[0]*ge[0],Ie[1]*ge[1]],ee=this.getSizeAndScale(f,this.ctx.canvas.width,se[0]),De=this.getSizeAndScale(g,this.ctx.canvas.height,se[1]),Ae=w.cachedCanvases.getCanvas("pattern",ee.size,De.size,!0),xe=Ae.context,te=M.createCanvasGraphics(xe);te.groupLevel=w.groupLevel,this.setFillAndStrokeStyleToContext(te,T,H);let D=W,C=ye,R=Se,Q=ve;return W<0&&(D=0,R+=Math.abs(W)),ye<0&&(C=0,Q+=Math.abs(ye)),xe.translate(-ee.scale*D,-De.scale*C),te.transform(ee.scale,0,0,De.scale,0,0),xe.save(),this.clipBbox(te,D,C,R,Q),te.baseTransform=(0,j.getCurrentTransform)(te.ctx),te.executeOperatorList(x),te.endDrawing(),{canvas:Ae.canvas,scaleX:ee.scale,scaleY:De.scale,offsetX:D,offsetY:C}}getSizeAndScale(w,x,v){w=Math.abs(w);const f=Math.max(h.MAX_PATTERN_SIZE,x);let g=Math.ceil(w*v);return g>=f?g=f:v=g/w,{scale:v,size:g}}clipBbox(w,x,v,f,g){w.ctx.rect(x,v,f-x,g-v),w.current.updateRectMinMax((0,j.getCurrentTransform)(w.ctx),[x,v,f,g]),w.clip(),w.endPath()}setFillAndStrokeStyleToContext(w,x,v){const f=w.ctx,g=w.current;switch(x){case 1:const T=this.ctx;f.fillStyle=T.fillStyle,f.strokeStyle=T.strokeStyle,g.fillColor=T.fillStyle,g.strokeColor=T.strokeStyle;break;case 2:const N=k.Util.makeHexColor(v[0],v[1],v[2]);f.fillStyle=N,f.strokeStyle=N,g.fillColor=N,g.strokeColor=N;break;default:throw new k.FormatError(`Unsupported paint type: ${x}`)}}getPattern(w,x,v,f){let g=v;f!==ce.SHADING&&(g=k.Util.transform(g,x.baseTransform),this.matrix&&(g=k.Util.transform(g,this.matrix)));const T=this.createPatternCanvas(x);let N=new DOMMatrix(g);N=N.translate(T.offsetX,T.offsetY),N=N.scale(1/T.scaleX,1/T.scaleY);const H=w.createPattern(T.canvas,"repeat");try{H.setTransform(N)}catch(M){(0,k.warn)(`TilingPattern.getPattern: "${null==M?void 0:M.message}".`)}return H}}I.TilingPattern=h},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.applyMaskImageData=function j({src:fe,srcPos:ce=0,dest:pe,destPos:ne=0,width:P,height:V,inverseDecode:O=!1}){const G=k.FeatureTest.isLittleEndian?4278190080:255,[B,E]=O?[0,G]:[G,0],d=P>>3,h=7&P,y=fe.length;pe=new Uint32Array(pe.buffer);for(let w=0;w<V;w++){for(const v=ce+d;ce<v;ce++){const f=ce<y?fe[ce]:255;pe[ne++]=128&f?E:B,pe[ne++]=64&f?E:B,pe[ne++]=32&f?E:B,pe[ne++]=16&f?E:B,pe[ne++]=8&f?E:B,pe[ne++]=4&f?E:B,pe[ne++]=2&f?E:B,pe[ne++]=1&f?E:B}if(0===h)continue;const x=ce<y?fe[ce++]:255;for(let v=0;v<h;v++)pe[ne++]=x&1<<7-v?E:B}return{srcPos:ce,destPos:ne}};var k=_e(1)},(Re,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.GlobalWorkerOptions=void 0;const _e=Object.create(null);I.GlobalWorkerOptions=_e,_e.workerPort=void 0===_e.workerPort?null:_e.workerPort,_e.workerSrc=void 0===_e.workerSrc?"":_e.workerSrc},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.MessageHandler=void 0;var k=_e(1);function ce(ne){switch(ne instanceof Error||"object"==typeof ne&&null!==ne||(0,k.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),ne.name){case"AbortException":return new k.AbortException(ne.message);case"MissingPDFException":return new k.MissingPDFException(ne.message);case"PasswordException":return new k.PasswordException(ne.message,ne.code);case"UnexpectedResponseException":return new k.UnexpectedResponseException(ne.message,ne.status);case"UnknownErrorException":return new k.UnknownErrorException(ne.message,ne.details);default:return new k.UnknownErrorException(ne.message,ne.toString())}}I.MessageHandler=class pe{constructor(P,V,O){this.sourceName=P,this.targetName=V,this.comObj=O,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=G=>{const B=G.data;if(B.targetName!==this.sourceName)return;if(B.stream)return void this._processStreamMessage(B);if(B.callback){const d=B.callbackId,h=this.callbackCapabilities[d];if(!h)throw new Error(`Cannot resolve callback ${d}`);if(delete this.callbackCapabilities[d],1===B.callback)h.resolve(B.data);else{if(2!==B.callback)throw new Error("Unexpected callback case");h.reject(ce(B.reason))}return}const E=this.actionHandler[B.action];if(!E)throw new Error(`Unknown action from worker: ${B.action}`);if(B.callbackId){const d=this.sourceName,h=B.sourceName;new Promise(function(y){y(E(B.data))}).then(function(y){O.postMessage({sourceName:d,targetName:h,callback:1,callbackId:B.callbackId,data:y})},function(y){O.postMessage({sourceName:d,targetName:h,callback:2,callbackId:B.callbackId,reason:ce(y)})})}else B.streamId?this._createStreamSink(B):E(B.data)},O.addEventListener("message",this._onComObjOnMessage)}on(P,V){const O=this.actionHandler;if(O[P])throw new Error(`There is already an actionName called "${P}"`);O[P]=V}send(P,V,O){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,data:V},O)}sendWithPromise(P,V,O){const G=this.callbackId++,B=(0,k.createPromiseCapability)();this.callbackCapabilities[G]=B;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,callbackId:G,data:V},O)}catch(E){B.reject(E)}return B.promise}sendWithStream(P,V,O,G){const B=this.streamId++,E=this.sourceName,d=this.targetName,h=this.comObj;return new ReadableStream({start:y=>{const w=(0,k.createPromiseCapability)();return this.streamControllers[B]={controller:y,startCall:w,pullCall:null,cancelCall:null,isClosed:!1},h.postMessage({sourceName:E,targetName:d,action:P,streamId:B,data:V,desiredSize:y.desiredSize},G),w.promise},pull:y=>{const w=(0,k.createPromiseCapability)();return this.streamControllers[B].pullCall=w,h.postMessage({sourceName:E,targetName:d,stream:6,streamId:B,desiredSize:y.desiredSize}),w.promise},cancel:y=>{(0,k.assert)(y instanceof Error,"cancel must have a valid reason");const w=(0,k.createPromiseCapability)();return this.streamControllers[B].cancelCall=w,this.streamControllers[B].isClosed=!0,h.postMessage({sourceName:E,targetName:d,stream:1,streamId:B,reason:ce(y)}),w.promise}},O)}_createStreamSink(P){const V=P.streamId,O=this.sourceName,G=P.sourceName,B=this.comObj,E=this,d=this.actionHandler[P.action],h={enqueue(y,w=1,x){if(this.isCancelled)return;const v=this.desiredSize;this.desiredSize-=w,v>0&&this.desiredSize<=0&&(this.sinkCapability=(0,k.createPromiseCapability)(),this.ready=this.sinkCapability.promise),B.postMessage({sourceName:O,targetName:G,stream:4,streamId:V,chunk:y},x)},close(){this.isCancelled||(this.isCancelled=!0,B.postMessage({sourceName:O,targetName:G,stream:3,streamId:V}),delete E.streamSinks[V])},error(y){(0,k.assert)(y instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,B.postMessage({sourceName:O,targetName:G,stream:5,streamId:V,reason:ce(y)}))},sinkCapability:(0,k.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:P.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[V]=h,new Promise(function(y){y(d(P.data,h))}).then(function(){B.postMessage({sourceName:O,targetName:G,stream:8,streamId:V,success:!0})},function(y){B.postMessage({sourceName:O,targetName:G,stream:8,streamId:V,reason:ce(y)})})}_processStreamMessage(P){const V=P.streamId,O=this.sourceName,G=P.sourceName,B=this.comObj,E=this.streamControllers[V],d=this.streamSinks[V];switch(P.stream){case 8:P.success?E.startCall.resolve():E.startCall.reject(ce(P.reason));break;case 7:P.success?E.pullCall.resolve():E.pullCall.reject(ce(P.reason));break;case 6:if(!d){B.postMessage({sourceName:O,targetName:G,stream:7,streamId:V,success:!0});break}d.desiredSize<=0&&P.desiredSize>0&&d.sinkCapability.resolve(),d.desiredSize=P.desiredSize,new Promise(function(h){h(d.onPull&&d.onPull())}).then(function(){B.postMessage({sourceName:O,targetName:G,stream:7,streamId:V,success:!0})},function(h){B.postMessage({sourceName:O,targetName:G,stream:7,streamId:V,reason:ce(h)})});break;case 4:if((0,k.assert)(E,"enqueue should have stream controller"),E.isClosed)break;E.controller.enqueue(P.chunk);break;case 3:if((0,k.assert)(E,"close should have stream controller"),E.isClosed)break;E.isClosed=!0,E.controller.close(),this._deleteStreamController(E,V);break;case 5:(0,k.assert)(E,"error should have stream controller"),E.controller.error(ce(P.reason)),this._deleteStreamController(E,V);break;case 2:P.success?E.cancelCall.resolve():E.cancelCall.reject(ce(P.reason)),this._deleteStreamController(E,V);break;case 1:if(!d)break;new Promise(function(h){h(d.onCancel&&d.onCancel(ce(P.reason)))}).then(function(){B.postMessage({sourceName:O,targetName:G,stream:2,streamId:V,success:!0})},function(h){B.postMessage({sourceName:O,targetName:G,stream:2,streamId:V,reason:ce(h)})}),d.sinkCapability.reject(ce(P.reason)),d.isCancelled=!0,delete this.streamSinks[V];break;default:throw new Error("Unexpected stream case")}}_deleteStreamController(P,V){var O=this;return _asyncToGenerator(function*(){yield Promise.allSettled([P.startCall&&P.startCall.promise,P.pullCall&&P.pullCall.promise,P.cancelCall&&P.cancelCall.promise]),delete O.streamControllers[V]})()}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(Re,I,_e)=>{var fe,ce;Object.defineProperty(I,"__esModule",{value:!0}),I.Metadata=void 0;var k=_e(1);fe=new WeakMap,ce=new WeakMap,I.Metadata=class j{constructor({parsedData:ne,rawData:P}){Pe(this,fe,void 0),Pe(this,ce,void 0),$e(this,fe,ne),$e(this,ce,P)}getRaw(){return q(this,ce)}get(ne){var P;return null!=(P=q(this,fe).get(ne))?P:null}getAll(){return(0,k.objectFromMap)(q(this,fe))}has(ne){return q(this,fe).has(ne)}}},(Re,I,_e)=>{var pe,ne,P,V,O,G,TD;Object.defineProperty(I,"__esModule",{value:!0}),I.OptionalContentConfig=void 0;var k=_e(1);const j=Symbol("INTERNAL");class fe{constructor(d,h){Pe(this,pe,!0),this.name=d,this.intent=h}get visible(){return q(this,pe)}_setVisible(d,h){d!==j&&(0,k.unreachable)("Internal method `_setVisible` called."),$e(this,pe,h)}}pe=new WeakMap,ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakSet,TD=function(d){const h=d.length;if(h<2)return!0;const y=d[0];for(let w=1;w<h;w++){const x=d[w];let v;if(Array.isArray(x))v=Le(this,G,TD).call(this,x);else{if(!q(this,P).has(x))return(0,k.warn)(`Optional content group not found: ${x}`),!0;v=q(this,P).get(x).visible}switch(y){case"And":if(!v)return!1;break;case"Or":if(v)return!0;break;case"Not":return!v;default:return!0}}return"And"===y},I.OptionalContentConfig=class ce{constructor(d){if(Pe(this,G),Pe(this,ne,!0),Pe(this,P,new Map),Pe(this,V,null),Pe(this,O,null),this.name=null,this.creator=null,null!==d){this.name=d.name,this.creator=d.creator,$e(this,O,d.order);for(const h of d.groups)q(this,P).set(h.id,new fe(h.name,h.intent));if("OFF"===d.baseState)for(const h of q(this,P).values())h._setVisible(j,!1);for(const h of d.on)q(this,P).get(h)._setVisible(j,!0);for(const h of d.off)q(this,P).get(h)._setVisible(j,!1);$e(this,V,new Map);for(const[h,y]of q(this,P))q(this,V).set(h,y.visible)}}isVisible(d){if(0===q(this,P).size)return!0;if(!d)return(0,k.warn)("Optional content group not defined."),!0;if("OCG"===d.type)return q(this,P).has(d.id)?q(this,P).get(d.id).visible:((0,k.warn)(`Optional content group not found: ${d.id}`),!0);if("OCMD"===d.type){if(d.expression)return Le(this,G,TD).call(this,d.expression);if(!d.policy||"AnyOn"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(q(this,P).get(h).visible)return!0}return!1}if("AllOn"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(!q(this,P).get(h).visible)return!1}return!0}if("AnyOff"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(!q(this,P).get(h).visible)return!0}return!1}if("AllOff"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(q(this,P).get(h).visible)return!1}return!0}return(0,k.warn)(`Unknown optional content policy ${d.policy}.`),!0}return(0,k.warn)(`Unknown group type ${d.type}.`),!0}setVisibility(d,h=!0){q(this,P).has(d)?(q(this,P).get(d)._setVisible(j,!!h),$e(this,ne,null)):(0,k.warn)(`Optional content group not found: ${d}`)}get hasInitialVisibility(){if(null!==q(this,ne))return q(this,ne);for(const[d,h]of q(this,P)){const y=q(this,V).get(d);if(h.visible!==y)return $e(this,ne,!1)}return $e(this,ne,!0)}getOrder(){return q(this,P).size?q(this,O)?q(this,O).slice():[...q(this,P).keys()]:null}getGroups(){return q(this,P).size>0?(0,k.objectFromMap)(q(this,P)):null}getGroup(d){return q(this,P).get(d)||null}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFDataTransportStream=void 0;var k=_e(1),j=_e(8);I.PDFDataTransportStream=class fe{constructor(P,V){(0,k.assert)(V,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=P.progressiveDone||!1,this._contentDispositionFilename=P.contentDispositionFilename||null;const O=P.initialData;if((null==O?void 0:O.length)>0){const G=new Uint8Array(O).buffer;this._queuedChunks.push(G)}this._pdfDataRangeTransport=V,this._isStreamingSupported=!P.disableStream,this._isRangeSupported=!P.disableRange,this._contentLength=P.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((G,B)=>{this._onReceiveData({begin:G,chunk:B})}),this._pdfDataRangeTransport.addProgressListener((G,B)=>{this._onProgress({loaded:G,total:B})}),this._pdfDataRangeTransport.addProgressiveReadListener(G=>{this._onReceiveData({chunk:G})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(P){const V=new Uint8Array(P.chunk).buffer;if(void 0===P.begin)this._fullRequestReader?this._fullRequestReader._enqueue(V):this._queuedChunks.push(V);else{const O=this._rangeReaders.some(function(G){return G._begin===P.begin&&(G._enqueue(V),!0)});(0,k.assert)(O,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var P,V;return null!=(V=null==(P=this._fullRequestReader)?void 0:P._loaded)?V:0}_onProgress(P){if(void 0===P.total){const V=this._rangeReaders[0];(null==V?void 0:V.onProgress)&&V.onProgress({loaded:P.loaded})}else{const V=this._fullRequestReader;(null==V?void 0:V.onProgress)&&V.onProgress({loaded:P.loaded,total:P.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(P){const V=this._rangeReaders.indexOf(P);V>=0&&this._rangeReaders.splice(V,1)}getFullReader(){(0,k.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const P=this._queuedChunks;return this._queuedChunks=null,new ce(this,P,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(P,V){if(V<=this._progressiveDataLength)return null;const O=new pe(this,P,V);return this._pdfDataRangeTransport.requestDataRange(P,V),this._rangeReaders.push(O),O}cancelAllRequests(P){this._fullRequestReader&&this._fullRequestReader.cancel(P);for(const V of this._rangeReaders.slice(0))V.cancel(P);this._pdfDataRangeTransport.abort()}};class ce{constructor(P,V,O=!1,G=null){this._stream=P,this._done=O||!1,this._filename=(0,j.isPdfFile)(G)?G:null,this._queuedChunks=V||[],this._loaded=0;for(const B of this._queuedChunks)this._loaded+=B.byteLength;this._requests=[],this._headersReady=Promise.resolve(),P._fullRequestReader=this,this.onProgress=null}_enqueue(P){this._done||(this._requests.length>0?this._requests.shift().resolve({value:P,done:!1}):this._queuedChunks.push(P),this._loaded+=P.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}read(){var P=this;return _asyncToGenerator(function*(){if(P._queuedChunks.length>0)return{value:P._queuedChunks.shift(),done:!1};if(P._done)return{value:void 0,done:!0};const V=(0,k.createPromiseCapability)();return P._requests.push(V),V.promise})()}cancel(P){this._done=!0;for(const V of this._requests)V.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class pe{constructor(P,V,O){this._stream=P,this._begin=V,this._end=O,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(P){if(!this._done){if(0===this._requests.length)this._queuedChunk=P;else{this._requests.shift().resolve({value:P,done:!1});for(const O of this._requests)O.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){var P=this;return _asyncToGenerator(function*(){if(P._queuedChunk){const O=P._queuedChunk;return P._queuedChunk=null,{value:O,done:!1}}if(P._done)return{value:void 0,done:!0};const V=(0,k.createPromiseCapability)();return P._requests.push(V),V.promise})()}cancel(P){this._done=!0;for(const V of this._requests)V.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(Re,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.XfaText=void 0;class _e{static textContent(j){const fe=[],ce={items:fe,styles:Object.create(null)};return function pe(ne){var O;if(!ne)return;let P=null;const V=ne.name;if("#text"===V)P=ne.value;else{if(!_e.shouldBuildText(V))return;(null==(O=null==ne?void 0:ne.attributes)?void 0:O.textContent)?P=ne.attributes.textContent:ne.value&&(P=ne.value)}if(null!==P&&fe.push({str:P}),ne.children)for(const G of ne.children)pe(G)}(j),ce}static shouldBuildText(j){return!("textarea"===j||"input"===j||"option"===j||"select"===j)}}I.XfaText=_e},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.NodeStandardFontDataFactory=I.NodeCanvasFactory=I.NodeCMapReaderFactory=void 0;var k=_e(9);const j=function(ne){return new Promise((P,V)=>{__webpack_require__(172).readFile(ne,(G,B)=>{!G&&B?P(new Uint8Array(B)):V(new Error(G))})})};I.NodeCanvasFactory=class fe extends k.BaseCanvasFactory{_createCanvas(P,V){return __webpack_require__(414).createCanvas(P,V)}},I.NodeCMapReaderFactory=class ce extends k.BaseCMapReaderFactory{_fetchData(P,V){return j(P).then(O=>({cMapData:O,compressionType:V}))}},I.NodeStandardFontDataFactory=class pe extends k.BaseStandardFontDataFactory{_fetchData(P){return j(P)}}},(Re,I,_e)=>{var ne,P,V,O,G,B,E,d,h,wD,w,Nj,v,MD,g,Oj;Object.defineProperty(I,"__esModule",{value:!0}),I.AnnotationEditorLayer=void 0;var k=_e(7),j=_e(1),fe=_e(23),ce=_e(24);const N=class{constructor(M){Pe(this,h),Pe(this,w),Pe(this,v),Pe(this,g),Pe(this,ne,void 0),Pe(this,P,!1),Pe(this,V,this.pointerup.bind(this)),Pe(this,O,this.pointerdown.bind(this)),Pe(this,G,new Map),Pe(this,B,!1),Pe(this,E,!1),Pe(this,d,void 0),N._initialized||(N._initialized=!0,fe.FreeTextEditor.initialize(M.l10n),ce.InkEditor.initialize(M.l10n),M.uiManager.registerEditorTypes([fe.FreeTextEditor,ce.InkEditor])),$e(this,d,M.uiManager),this.annotationStorage=M.annotationStorage,this.pageIndex=M.pageIndex,this.div=M.div,$e(this,ne,M.accessibilityManager),q(this,d).addLayer(this)}updateToolbar(M){q(this,d).updateToolbar(M)}updateMode(M=q(this,d).getMode()){Le(this,g,Oj).call(this),M===j.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),q(this,d).unselectAll()}addInkEditorIfNeeded(M){if(M||q(this,d).getMode()===j.AnnotationEditorType.INK){if(!M)for(const ye of q(this,G).values())if(ye.isEmpty())return void ye.setInBackground();Le(this,v,MD).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(M){q(this,d).setEditingState(M)}addCommands(M){q(this,d).addCommands(M)}enable(){this.div.style.pointerEvents="auto";for(const M of q(this,G).values())M.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const M of q(this,G).values())M.disableEditing()}setActiveEditor(M){q(this,d).getActive()!==M&&q(this,d).setActiveEditor(M)}enableClick(){this.div.addEventListener("pointerdown",q(this,O)),this.div.addEventListener("pointerup",q(this,V))}disableClick(){this.div.removeEventListener("pointerdown",q(this,O)),this.div.removeEventListener("pointerup",q(this,V))}attach(M){q(this,G).set(M.id,M)}detach(M){var W;q(this,G).delete(M.id),null==(W=q(this,ne))||W.removePointerInTextLayer(M.contentDiv)}remove(M){q(this,d).removeEditor(M),this.detach(M),this.annotationStorage.remove(M.id),M.div.style.display="none",setTimeout(()=>{M.div.style.display="",M.div.remove(),M.isAttachedToDOM=!1,document.activeElement===document.body&&q(this,d).focusMainContainer()},0),q(this,E)||this.addInkEditorIfNeeded(!1)}add(M){if(Le(this,h,wD).call(this,M),q(this,d).addEditor(M),this.attach(M),!M.isAttachedToDOM){const W=M.render();this.div.append(W),M.isAttachedToDOM=!0}this.moveEditorInDOM(M),M.onceAdded(),this.addToAnnotationStorage(M)}moveEditorInDOM(M){var W;null==(W=q(this,ne))||W.moveElementInDOM(this.div,M.div,M.contentDiv,!0)}addToAnnotationStorage(M){!M.isEmpty()&&!this.annotationStorage.has(M.id)&&this.annotationStorage.setValue(M.id,M)}addOrRebuild(M){M.needsToBeRebuilt()?M.rebuild():this.add(M)}addANewEditor(M){this.addCommands({cmd:()=>{this.addOrRebuild(M)},undo:()=>{M.remove()},mustExec:!0})}addUndoableEditor(M){this.addCommands({cmd:()=>{this.addOrRebuild(M)},undo:()=>{M.remove()},mustExec:!1})}getNextId(){return q(this,d).getId()}deserialize(M){switch(M.annotationType){case j.AnnotationEditorType.FREETEXT:return fe.FreeTextEditor.deserialize(M,this);case j.AnnotationEditorType.INK:return ce.InkEditor.deserialize(M,this)}return null}setSelected(M){q(this,d).setSelected(M)}toggleSelected(M){q(this,d).toggleSelected(M)}isSelected(M){return q(this,d).isSelected(M)}unselect(M){q(this,d).unselect(M)}pointerup(M){if(!(0!==M.button||M.ctrlKey&&k.KeyboardManager.platform.isMac)&&M.target===this.div&&q(this,B)){if($e(this,B,!1),!q(this,P))return void $e(this,P,!0);Le(this,v,MD).call(this,M)}}pointerdown(M){if(0!==M.button||M.ctrlKey&&k.KeyboardManager.platform.isMac||M.target!==this.div)return;$e(this,B,!0);const ye=q(this,d).getActive();$e(this,P,!ye||ye.isEmpty())}drop(M){const W=M.dataTransfer.getData("text/plain"),ye=q(this,d).getEditor(W);if(!ye)return;M.preventDefault(),M.dataTransfer.dropEffect="move",Le(this,h,wD).call(this,ye);const Se=this.div.getBoundingClientRect();ye.translate(M.clientX-Se.x-ye.startX,M.clientY-Se.y-ye.startY),this.moveEditorInDOM(ye),ye.div.focus()}dragover(M){M.preventDefault()}destroy(){var M,W;(null==(M=q(this,d).getActive())?void 0:M.parent)===this&&q(this,d).setActiveEditor(null);for(const ye of q(this,G).values())null==(W=q(this,ne))||W.removePointerInTextLayer(ye.contentDiv),ye.isAttachedToDOM=!1,ye.div.remove(),ye.parent=null;this.div=null,q(this,G).clear(),q(this,d).removeLayer(this)}render(M){this.viewport=M.viewport,(0,k.bindEvents)(this,this.div,["dragover","drop"]),this.setDimensions();for(const W of q(this,d).getEditors(this.pageIndex))this.add(W);this.updateMode()}update(M){this.viewport=M.viewport,this.setDimensions(),this.updateMode()}get scaleFactor(){return this.viewport.scale}get pageDimensions(){const[M,W,ye,Se]=this.viewport.viewBox;return[ye-M,Se-W]}get viewportBaseDimensions(){const{width:M,height:W,rotation:ye}=this.viewport;return ye%180==0?[M,W]:[W,M]}setDimensions(){const{width:M,height:W,rotation:ye}=this.viewport,Se=ye%180!=0,ve=Math.floor(M)+"px",Ie=Math.floor(W)+"px";this.div.style.width=Se?Ie:ve,this.div.style.height=Se?ve:Ie,this.div.setAttribute("data-main-rotation",ye)}};let pe=N;ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakMap,B=new WeakMap,E=new WeakMap,d=new WeakMap,h=new WeakSet,wD=function(M){var W;M.parent!==this&&(this.attach(M),M.pageIndex=this.pageIndex,null==(W=M.parent)||W.detach(M),M.parent=this,M.div&&M.isAttachedToDOM&&(M.div.remove(),this.div.append(M.div)))},w=new WeakSet,Nj=function(M){switch(q(this,d).getMode()){case j.AnnotationEditorType.FREETEXT:return new fe.FreeTextEditor(M);case j.AnnotationEditorType.INK:return new ce.InkEditor(M)}return null},v=new WeakSet,MD=function(M){const W=this.getNextId(),ye=Le(this,w,Nj).call(this,{parent:this,id:W,x:M.offsetX,y:M.offsetY});return ye&&this.add(ye),ye},g=new WeakSet,Oj=function(){$e(this,E,!0);for(const M of q(this,G).values())M.isEmpty()&&M.remove();$e(this,E,!1)},cn(pe,"_initialized",!1),I.AnnotationEditorLayer=pe},(Re,I,_e)=>{var pe,ne,P,V,O,G,B,E,kj,h,Lj,w,Vj,v,ID;Object.defineProperty(I,"__esModule",{value:!0}),I.FreeTextEditor=void 0;var k=_e(1),j=_e(7),fe=_e(6);const g=class extends fe.AnnotationEditor{constructor(N){super(jp(Vp({},N),{name:"freeTextEditor"})),Pe(this,E),Pe(this,h),Pe(this,w),Pe(this,v),Pe(this,pe,this.editorDivBlur.bind(this)),Pe(this,ne,this.editorDivFocus.bind(this)),Pe(this,P,this.editorDivKeydown.bind(this)),Pe(this,V,void 0),Pe(this,O,""),Pe(this,G,!1),Pe(this,B,void 0),$e(this,V,N.color||g._defaultColor||fe.AnnotationEditor._defaultLineColor),$e(this,B,N.fontSize||g._defaultFontSize)}static initialize(N){this._l10nPromise=new Map(["free_text_default_content","editor_free_text_aria_label"].map(M=>[M,N.get(M)]));const H=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(H.getPropertyValue("--freetext-padding"))}static updateDefaultParams(N,H){switch(N){case k.AnnotationEditorParamsType.FREETEXT_SIZE:g._defaultFontSize=H;break;case k.AnnotationEditorParamsType.FREETEXT_COLOR:g._defaultColor=H}}updateParams(N,H){switch(N){case k.AnnotationEditorParamsType.FREETEXT_SIZE:Le(this,E,kj).call(this,H);break;case k.AnnotationEditorParamsType.FREETEXT_COLOR:Le(this,h,Lj).call(this,H)}}static get defaultPropertiesToUpdate(){return[[k.AnnotationEditorParamsType.FREETEXT_SIZE,g._defaultFontSize],[k.AnnotationEditorParamsType.FREETEXT_COLOR,g._defaultColor||fe.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[k.AnnotationEditorParamsType.FREETEXT_SIZE,q(this,B)],[k.AnnotationEditorParamsType.FREETEXT_COLOR,q(this,V)]]}getInitialTranslation(){return[-g._internalPadding*this.parent.scaleFactor,-(g._internalPadding+q(this,B))*this.parent.scaleFactor]}rebuild(){super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(k.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.enableEditing(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.editorDiv.addEventListener("keydown",q(this,P)),this.editorDiv.addEventListener("focus",q(this,ne)),this.editorDiv.addEventListener("blur",q(this,pe)))}disableEditMode(){!this.isInEditMode()||(this.parent.setEditingState(!0),super.disableEditMode(),this.disableEditing(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",q(this,P)),this.editorDiv.removeEventListener("focus",q(this,ne)),this.editorDiv.removeEventListener("blur",q(this,pe)),this.div.focus(),this.isEditing=!1)}focusin(N){super.focusin(N),N.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),super.remove()}commit(){super.commit(),q(this,G)||($e(this,G,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),$e(this,O,Le(this,w,Vj).call(this).trimEnd()),Le(this,v,ID).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(N){this.enableEditMode(),this.editorDiv.focus()}keydown(N){N.target===this.div&&"Enter"===N.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(N){g._keyboardManager.exec(this,N)}editorDivFocus(N){this.isEditing=!0}editorDivBlur(N){this.isEditing=!1}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 N,H;this.width&&(N=this.x,H=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",`${this.id}-editor`),this.enableEditing(),g._l10nPromise.get("editor_free_text_aria_label").then(W=>{var ye;return null==(ye=this.editorDiv)?void 0:ye.setAttribute("aria-label",W)}),g._l10nPromise.get("free_text_default_content").then(W=>{var ye;return null==(ye=this.editorDiv)?void 0:ye.setAttribute("default-content",W)}),this.editorDiv.contentEditable=!0;const{style:M}=this.editorDiv;if(M.fontSize=`calc(${q(this,B)}px * var(--scale-factor))`,M.color=q(this,V),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,j.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[W,ye]=this.parent.viewportBaseDimensions;this.setAt(N*W,H*ye,this.width*W,this.height*ye);for(const Se of q(this,O).split("\n")){const ve=document.createElement("div");ve.append(Se?document.createTextNode(Se):document.createElement("br")),this.editorDiv.append(ve)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(N,H){const M=super.deserialize(N,H);return $e(M,B,N.fontSize),$e(M,V,k.Util.makeHexColor(...N.color)),$e(M,O,N.value),M}serialize(){if(this.isEmpty())return null;const N=g._internalPadding*this.parent.scaleFactor,H=this.getRect(N,N),M=fe.AnnotationEditor._colorManager.convert(getComputedStyle(this.editorDiv).color);return{annotationType:k.AnnotationEditorType.FREETEXT,color:M,fontSize:q(this,B),value:q(this,O),pageIndex:this.parent.pageIndex,rect:H,rotation:this.rotation}}};let ce=g;pe=new WeakMap,ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakMap,B=new WeakMap,E=new WeakSet,kj=function(N){const H=W=>{this.editorDiv.style.fontSize=`calc(${W}px * var(--scale-factor))`,this.translate(0,-(W-q(this,B))*this.parent.scaleFactor),$e(this,B,W),Le(this,v,ID).call(this)},M=q(this,B);this.parent.addCommands({cmd:()=>{H(N)},undo:()=>{H(M)},mustExec:!0,type:k.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},h=new WeakSet,Lj=function(N){const H=q(this,V);this.parent.addCommands({cmd:()=>{$e(this,V,N),this.editorDiv.style.color=N},undo:()=>{$e(this,V,H),this.editorDiv.style.color=H},mustExec:!0,type:k.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},w=new WeakSet,Vj=function(){const N=this.editorDiv.getElementsByTagName("div");if(0===N.length)return this.editorDiv.innerText;const H=[];for(let M=0,W=N.length;M<W;M++){const Se=N[M].firstChild;H.push("#text"===(null==Se?void 0:Se.nodeName)?Se.data:"")}return H.join("\n")},v=new WeakSet,ID=function(){const[N,H]=this.parent.viewportBaseDimensions,M=this.div.getBoundingClientRect();this.width=M.width/N,this.height=M.height/H},cn(ce,"_freeTextDefaultContent",""),cn(ce,"_l10nPromise"),cn(ce,"_internalPadding",0),cn(ce,"_defaultColor",null),cn(ce,"_defaultFontSize",10),cn(ce,"_keyboardManager",new j.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],g.prototype.commitOrRemove]])),cn(ce,"_type","freetext"),I.FreeTextEditor=ce},(Re,I,_e)=>{var P,V,O,G,B,E,d,h,y,w,x,v,f,g,T,jj,H,Bj,W,Uj,Se,Hj,Ie,RD,se,$j,De,Gj,xe,Wj,D,pr,R,FD,Y,$p,de,Gp,m,Ua,F,PD,K,Wp,he,xD,me,qj,Ee,zj,Ve,Kj,je,ND,Ke,qp,yt,Ha,Lt,OD;Object.defineProperty(I,"__esModule",{value:!0}),I.InkEditor=void 0,Object.defineProperty(I,"fitCurve",{enumerable:!0,get:function(){return fe.fitCurve}});var k=_e(1),j=_e(6),fe=_e(25),ce=_e(7);const Ct=class extends j.AnnotationEditor{constructor(Te){super(jp(Vp({},Te),{name:"inkEditor"})),Pe(this,T),Pe(this,H),Pe(this,W),Pe(this,Se),Pe(this,Ie),Pe(this,se),Pe(this,De),Pe(this,xe),Pe(this,D),Pe(this,R),Pe(this,Y),Pe(this,de),Pe(this,m),Pe(this,F),Pe(this,K),Pe(this,me),Pe(this,Ee),Pe(this,Ve),Pe(this,je),Pe(this,Ke),Pe(this,yt),Pe(this,Lt),Pe(this,P,0),Pe(this,V,0),Pe(this,O,0),Pe(this,G,this.canvasPointermove.bind(this)),Pe(this,B,this.canvasPointerleave.bind(this)),Pe(this,E,this.canvasPointerup.bind(this)),Pe(this,d,this.canvasPointerdown.bind(this)),Pe(this,h,!1),Pe(this,y,!1),Pe(this,w,null),Pe(this,x,null),Pe(this,v,0),Pe(this,f,0),Pe(this,g,null),this.color=Te.color||null,this.thickness=Te.thickness||null,this.opacity=Te.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(Te){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink_aria_label"].map(Fe=>[Fe,Te.get(Fe)]))}static updateDefaultParams(Te,Fe){switch(Te){case k.AnnotationEditorParamsType.INK_THICKNESS:Ct._defaultThickness=Fe;break;case k.AnnotationEditorParamsType.INK_COLOR:Ct._defaultColor=Fe;break;case k.AnnotationEditorParamsType.INK_OPACITY:Ct._defaultOpacity=Fe/100}}updateParams(Te,Fe){switch(Te){case k.AnnotationEditorParamsType.INK_THICKNESS:Le(this,T,jj).call(this,Fe);break;case k.AnnotationEditorParamsType.INK_COLOR:Le(this,H,Bj).call(this,Fe);break;case k.AnnotationEditorParamsType.INK_OPACITY:Le(this,W,Uj).call(this,Fe)}}static get defaultPropertiesToUpdate(){return[[k.AnnotationEditorParamsType.INK_THICKNESS,Ct._defaultThickness],[k.AnnotationEditorParamsType.INK_COLOR,Ct._defaultColor||j.AnnotationEditor._defaultLineColor],[k.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*Ct._defaultOpacity)]]}get propertiesToUpdate(){var Te;return[[k.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Ct._defaultThickness],[k.AnnotationEditorParamsType.INK_COLOR,this.color||Ct._defaultColor||j.AnnotationEditor._defaultLineColor],[k.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!=(Te=this.opacity)?Te:Ct._defaultOpacity))]]}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(Le(this,Y,$p).call(this),Le(this,de,Gp).call(this)),this.isAttachedToDOM||(this.parent.add(this),Le(this,m,Ua).call(this)),Le(this,yt,Ha).call(this))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,q(this,x).disconnect(),$e(this,x,null),super.remove())}enableEditMode(){q(this,h)||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",q(this,d)),this.canvas.addEventListener("pointerup",q(this,E)))}disableEditMode(){!this.isInEditMode()||null===this.canvas||(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",q(this,d)),this.canvas.removeEventListener("pointerup",q(this,E)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){q(this,h)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),$e(this,h,!0),this.div.classList.add("disabled"),Le(this,yt,Ha).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus())}focusin(Te){super.focusin(Te),this.enableEditMode()}canvasPointerdown(Te){0!==Te.button||!this.isInEditMode()||q(this,h)||(this.setInForeground(),"mouse"!==Te.type&&this.div.focus(),Te.stopPropagation(),this.canvas.addEventListener("pointerleave",q(this,B)),this.canvas.addEventListener("pointermove",q(this,G)),Le(this,se,$j).call(this,Te.offsetX,Te.offsetY))}canvasPointermove(Te){Te.stopPropagation(),Le(this,De,Gj).call(this,Te.offsetX,Te.offsetY)}canvasPointerup(Te){0===Te.button&&this.isInEditMode()&&0!==this.currentPath.length&&(Te.stopPropagation(),Le(this,R,FD).call(this,Te),this.setInBackground())}canvasPointerleave(Te){Le(this,R,FD).call(this,Te),this.setInBackground()}render(){if(this.div)return this.div;let Te,Fe;this.width&&(Te=this.x,Fe=this.y),super.render(),Ct._l10nPromise.get("editor_ink_aria_label").then(Oe=>{var Ge;return null==(Ge=this.div)?void 0:Ge.setAttribute("aria-label",Oe)});const[Je,be,oe,le]=Le(this,Se,Hj).call(this);if(this.setAt(Je,be,0,0),this.setDims(oe,le),Le(this,Y,$p).call(this),this.width){const[Oe,Ge]=this.parent.viewportBaseDimensions;this.setAt(Te*Oe,Fe*Ge,this.width*Oe,this.height*Ge),$e(this,y,!0),Le(this,m,Ua).call(this),this.setDims(this.width*Oe,this.height*Ge),Le(this,D,pr).call(this),Le(this,Lt,OD).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return Le(this,de,Gp).call(this),this.div}setDimensions(Te,Fe){const Je=Math.round(Te),be=Math.round(Fe);if(q(this,v)===Je&&q(this,f)===be)return;$e(this,v,Je),$e(this,f,be),this.canvas.style.visibility="hidden",q(this,P)&&Math.abs(q(this,P)-Te/Fe)>.01&&(Fe=Math.ceil(Te/q(this,P)),this.setDims(Te,Fe));const[oe,le]=this.parent.viewportBaseDimensions;this.width=Te/oe,this.height=Fe/le,q(this,h)&&Le(this,F,PD).call(this,Te,Fe),Le(this,m,Ua).call(this),Le(this,D,pr).call(this),this.canvas.style.visibility="visible"}static deserialize(Te,Fe){var Wt,Rt;const Je=super.deserialize(Te,Fe);Je.thickness=Te.thickness,Je.color=k.Util.makeHexColor(...Te.color),Je.opacity=Te.opacity;const[be,oe]=Fe.pageDimensions,le=Je.width*be,Oe=Je.height*oe,Ge=Fe.scaleFactor,it=Te.thickness/2;$e(Je,P,le/Oe),$e(Je,h,!0),$e(Je,v,Math.round(le)),$e(Je,f,Math.round(Oe));for(const{bezier:Et}of Te.paths){const Ft=[];Je.paths.push(Ft);let At=Ge*(Et[0]-it),sn=Ge*(Oe-Et[1]-it);for(let We=2,jt=Et.length;We<jt;We+=6){const qt=Ge*(Et[We+4]-it),ri=Ge*(Oe-Et[We+5]-it);Ft.push([[At,sn],[Ge*(Et[We]-it),Ge*(Oe-Et[We+1]-it)],[Ge*(Et[We+2]-it),Ge*(Oe-Et[We+3]-it)],[qt,ri]]),At=qt,sn=ri}const vn=Le(this,he,xD).call(this,Ft);Je.bezierPath2D.push(vn)}const tt=Le(Wt=Je,je,ND).call(Wt);return $e(Je,O,Math.max(16,tt[2]-tt[0])),$e(Je,V,Math.max(16,tt[3]-tt[1])),Le(Rt=Je,F,PD).call(Rt,le,Oe),Je}serialize(){if(this.isEmpty())return null;const Te=this.getRect(0,0),Fe=this.rotation%180==0?Te[3]-Te[1]:Te[2]-Te[0],Je=j.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:k.AnnotationEditorType.INK,color:Je,thickness:this.thickness,opacity:this.opacity,paths:Le(this,me,qj).call(this,this.scaleFactor/this.parent.scaleFactor,this.translationX,this.translationY,Fe),pageIndex:this.parent.pageIndex,rect:Te,rotation:this.rotation}}};let ne=Ct;P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakMap,B=new WeakMap,E=new WeakMap,d=new WeakMap,h=new WeakMap,y=new WeakMap,w=new WeakMap,x=new WeakMap,v=new WeakMap,f=new WeakMap,g=new WeakMap,T=new WeakSet,jj=function(Te){const Fe=this.thickness;this.parent.addCommands({cmd:()=>{this.thickness=Te,Le(this,yt,Ha).call(this)},undo:()=>{this.thickness=Fe,Le(this,yt,Ha).call(this)},mustExec:!0,type:k.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},H=new WeakSet,Bj=function(Te){const Fe=this.color;this.parent.addCommands({cmd:()=>{this.color=Te,Le(this,D,pr).call(this)},undo:()=>{this.color=Fe,Le(this,D,pr).call(this)},mustExec:!0,type:k.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},W=new WeakSet,Uj=function(Te){Te/=100;const Fe=this.opacity;this.parent.addCommands({cmd:()=>{this.opacity=Te,Le(this,D,pr).call(this)},undo:()=>{this.opacity=Fe,Le(this,D,pr).call(this)},mustExec:!0,type:k.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},Se=new WeakSet,Hj=function(){const{width:Te,height:Fe,rotation:Je}=this.parent.viewport;switch(Je){case 90:return[0,Te,Te,Fe];case 180:return[Te,Fe,Te,Fe];case 270:return[Fe,0,Te,Fe];default:return[0,0,Te,Fe]}},Ie=new WeakSet,RD=function(){this.ctx.lineWidth=this.thickness*this.parent.scaleFactor/this.scaleFactor,this.ctx.lineCap="round",this.ctx.lineJoin="round",this.ctx.miterLimit=10,this.ctx.strokeStyle=`${this.color}${(0,ce.opacityToHex)(this.opacity)}`},se=new WeakSet,$j=function(Te,Fe){this.isEditing=!0,q(this,y)||($e(this,y,!0),Le(this,m,Ua).call(this),this.thickness||(this.thickness=Ct._defaultThickness),this.color||(this.color=Ct._defaultColor||j.AnnotationEditor._defaultLineColor),null!=this.opacity||(this.opacity=Ct._defaultOpacity)),this.currentPath.push([Te,Fe]),$e(this,w,null),Le(this,Ie,RD).call(this),this.ctx.beginPath(),this.ctx.moveTo(Te,Fe),$e(this,g,()=>{!q(this,g)||(q(this,w)&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):Le(this,D,pr).call(this),this.ctx.lineTo(...q(this,w)),$e(this,w,null),this.ctx.stroke()),window.requestAnimationFrame(q(this,g)))}),window.requestAnimationFrame(q(this,g))},De=new WeakSet,Gj=function(Te,Fe){const[Je,be]=this.currentPath.at(-1);Te===Je&&Fe===be||(this.currentPath.push([Te,Fe]),$e(this,w,[Te,Fe]))},xe=new WeakSet,Wj=function(Te,Fe){var it;this.ctx.closePath(),$e(this,g,null),Te=Math.min(Math.max(Te,0),this.canvas.width),Fe=Math.min(Math.max(Fe,0),this.canvas.height);const[Je,be]=this.currentPath.at(-1);let oe;if((Te!==Je||Fe!==be)&&this.currentPath.push([Te,Fe]),1!==this.currentPath.length)oe=(0,fe.fitCurve)(this.currentPath,30,null);else{const tt=[Te,Fe];oe=[[tt,tt.slice(),tt.slice(),tt]]}const le=Le(it=Ct,he,xD).call(it,oe);this.currentPath.length=0,this.parent.addCommands({cmd:()=>{this.paths.push(oe),this.bezierPath2D.push(le),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(Le(this,Y,$p).call(this),Le(this,de,Gp).call(this)),Le(this,yt,Ha).call(this))},mustExec:!0})},D=new WeakSet,pr=function(){if(this.isEmpty())return void Le(this,K,Wp).call(this);Le(this,Ie,RD).call(this);const{canvas:Te,ctx:Fe}=this;Fe.setTransform(1,0,0,1,0,0),Fe.clearRect(0,0,Te.width,Te.height),Le(this,K,Wp).call(this);for(const Je of this.bezierPath2D)Fe.stroke(Je)},R=new WeakSet,FD=function(Te){Le(this,xe,Wj).call(this,Te.offsetX,Te.offsetY),this.canvas.removeEventListener("pointerleave",q(this,B)),this.canvas.removeEventListener("pointermove",q(this,G)),this.parent.addToAnnotationStorage(this)},Y=new WeakSet,$p=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Ct._l10nPromise.get("editor_ink_canvas_aria_label").then(Te=>{var Fe;return null==(Fe=this.canvas)?void 0:Fe.setAttribute("aria-label",Te)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},de=new WeakSet,Gp=function(){$e(this,x,new ResizeObserver(Te=>{const Fe=Te[0].contentRect;Fe.width&&Fe.height&&this.setDimensions(Fe.width,Fe.height)})),q(this,x).observe(this.div)},m=new WeakSet,Ua=function(){if(!q(this,y))return;const[Te,Fe]=this.parent.viewportBaseDimensions;this.canvas.width=Math.ceil(this.width*Te),this.canvas.height=Math.ceil(this.height*Fe),Le(this,K,Wp).call(this)},F=new WeakSet,PD=function(Te,Fe){const Je=Le(this,Ke,qp).call(this),be=(Te-Je)/q(this,O),oe=(Fe-Je)/q(this,V);this.scaleFactor=Math.min(be,oe)},K=new WeakSet,Wp=function(){const Te=Le(this,Ke,qp).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+Te,this.translationY*this.scaleFactor+Te)},he=new WeakSet,xD=function(Te){const Fe=new Path2D;for(let Je=0,be=Te.length;Je<be;Je++){const[oe,le,Oe,Ge]=Te[Je];0===Je&&Fe.moveTo(...oe),Fe.bezierCurveTo(le[0],le[1],Oe[0],Oe[1],Ge[0],Ge[1])}return Fe},me=new WeakSet,qj=function(Te,Fe,Je,be){const le=[],Oe=this.thickness/2;let Ge,it;for(const tt of this.paths){Ge=[],it=[];for(let Wt=0,Rt=tt.length;Wt<Rt;Wt++){const[Et,Ft,At,sn]=tt[Wt],vn=Te*(Et[0]+Fe)+Oe,We=be-Te*(Et[1]+Je)-Oe,jt=Te*(Ft[0]+Fe)+Oe,Bt=be-Te*(Ft[1]+Je)-Oe,Tn=Te*(At[0]+Fe)+Oe,wn=be-Te*(At[1]+Je)-Oe,Kt=Te*(sn[0]+Fe)+Oe,qt=be-Te*(sn[1]+Je)-Oe;0===Wt&&(Ge.push(vn,We),it.push(vn,We)),Ge.push(jt,Bt,Tn,wn,Kt,qt),Le(this,Ee,zj).call(this,vn,We,jt,Bt,Tn,wn,Kt,qt,4,it)}le.push({bezier:Ge,points:it})}return le},Ee=new WeakSet,zj=function(Te,Fe,Je,be,oe,le,Oe,Ge,it,tt){if(Le(this,Ve,Kj).call(this,Te,Fe,Je,be,oe,le,Oe,Ge))tt.push(Oe,Ge);else{for(let Wt=1;Wt<it-1;Wt++){const Rt=Wt/it,Et=1-Rt;let Ft=Rt*Te+Et*Je,At=Rt*Fe+Et*be,sn=Rt*Je+Et*oe,vn=Rt*be+Et*le;Ft=Rt*Ft+Et*sn,At=Rt*At+Et*vn,sn=Rt*sn+Et*(Rt*oe+Et*Oe),vn=Rt*vn+Et*(Rt*le+Et*Ge),Ft=Rt*Ft+Et*sn,At=Rt*At+Et*vn,tt.push(Ft,At)}tt.push(Oe,Ge)}},Ve=new WeakSet,Kj=function(Te,Fe,Je,be,oe,le,Oe,Ge){const tt=ls(3*Je-2*Te-Oe,2),Wt=ls(3*be-2*Fe-Ge,2),Rt=ls(3*oe-Te-2*Oe,2),Et=ls(3*le-Fe-2*Ge,2);return Math.max(tt,Rt)+Math.max(Wt,Et)<=10},je=new WeakSet,ND=function(){let Te=1/0,Fe=-1/0,Je=1/0,be=-1/0;for(const oe of this.paths)for(const[le,Oe,Ge,it]of oe){const tt=k.Util.bezierBoundingBox(...le,...Oe,...Ge,...it);Te=Math.min(Te,tt[0]),Je=Math.min(Je,tt[1]),Fe=Math.max(Fe,tt[2]),be=Math.max(be,tt[3])}return[Te,Je,Fe,be]},Ke=new WeakSet,qp=function(){return q(this,h)?Math.ceil(this.thickness*this.parent.scaleFactor):0},yt=new WeakSet,Ha=function(Te=!1){if(this.isEmpty())return;if(!q(this,h))return void Le(this,D,pr).call(this);const Fe=Le(this,je,ND).call(this),Je=Le(this,Ke,qp).call(this);$e(this,O,Math.max(16,Fe[2]-Fe[0])),$e(this,V,Math.max(16,Fe[3]-Fe[1]));const be=Math.ceil(Je+q(this,O)*this.scaleFactor),oe=Math.ceil(Je+q(this,V)*this.scaleFactor),[le,Oe]=this.parent.viewportBaseDimensions;this.width=be/le,this.height=oe/Oe,$e(this,P,be/oe),Le(this,Lt,OD).call(this);const Ge=this.translationX,it=this.translationY;this.translationX=-Fe[0],this.translationY=-Fe[1],Le(this,m,Ua).call(this),Le(this,D,pr).call(this),$e(this,v,be),$e(this,f,oe),this.setDims(be,oe);const tt=Te?Je/this.scaleFactor/2:0;this.translate(Ge-this.translationX-tt,it-this.translationY-tt)},Lt=new WeakSet,OD=function(){const{style:Te}=this.div;q(this,P)>=1?(Te.minHeight="16px",Te.minWidth=`${Math.round(16*q(this,P))}px`):(Te.minWidth="16px",Te.minHeight=`${Math.round(16/q(this,P))}px`)},Pe(ne,he),cn(ne,"_defaultColor",null),cn(ne,"_defaultOpacity",1),cn(ne,"_defaultThickness",1),cn(ne,"_l10nPromise"),cn(ne,"_type","ink"),I.InkEditor=ne},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.fitCurve=void 0;const k=_e(26);I.fitCurve=k},Re=>{function _e(E,d,h,y,w){var v,f,g,T,N,H,M,W,ye,Se,ve,Ie,ge;if(2===E.length)return Ie=G.vectorLen(G.subtract(E[0],E[1]))/3,[v=[E[0],G.addArrays(E[0],G.mulItems(d,Ie)),G.addArrays(E[1],G.mulItems(h,Ie)),E[1]]];if(f=function pe(E){var h,y,w,d=[];return E.forEach((x,v)=>{h=v?y+G.vectorLen(G.subtract(x,w)):0,d.push(h),y=h,w=x}),d=d.map(x=>x/y)}(E),[v,T,H]=k(E,f,f,d,h,w),0===T||T<y)return[v];if(T<y*y)for(g=f,N=T,M=H,ge=0;ge<20;ge++){if(g=fe(v,E,g),[v,T,H]=k(E,f,g,d,h,w),T<y)return[v];if(H===M){let se=T/N;if(se>.9999&&se<1.0001)break}N=T,M=H}return ve=[],(W=G.subtract(E[H-1],E[H+1])).every(se=>0===se)&&(W=G.subtract(E[H-1],E[H]),[W[0],W[1]]=[-W[1],W[0]]),ye=G.normalize(W),Se=G.mulItems(ye,-1),(ve=ve.concat(_e(E.slice(0,H+1),d,ye,y,w))).concat(_e(E.slice(H),Se,h,y,w))}function k(E,d,h,y,w,x){var v,f,g;return v=function j(E,d,h,y){var w,x,v,f,g,T,M,W,ye,Se,ve,Ie,ge,se,ee,De=E[0],Ae=E[E.length-1];for(w=[De,null,null,Ae],x=G.zeros_Xx2x2(d.length),ve=0,Ie=d.length;ve<Ie;ve++)(v=x[ve])[0]=G.mulItems(h,3*(se=d[ve])*((ee=1-se)*ee)),v[1]=G.mulItems(y,3*ee*(se*se));for(f=[[0,0],[0,0]],g=[0,0],ve=0,Ie=E.length;ve<Ie;ve++)se=d[ve],f[0][0]+=G.dot((v=x[ve])[0],v[0]),f[0][1]+=G.dot(v[0],v[1]),f[1][0]+=G.dot(v[0],v[1]),f[1][1]+=G.dot(v[1],v[1]),ge=G.subtract(E[ve],B.q([De,De,Ae,Ae],se)),g[0]+=G.dot(v[0],ge),g[1]+=G.dot(v[1],ge);return M=0==(T=f[0][0]*f[1][1]-f[1][0]*f[0][1])?0:(g[0]*f[1][1]-g[1]*f[0][1])/T,W=0===T?0:(f[0][0]*g[1]-f[1][0]*g[0])/T,M<(ye=1e-6*(Se=G.vectorLen(G.subtract(De,Ae))))||W<ye?(w[1]=G.addArrays(De,G.mulItems(h,Se/3)),w[2]=G.addArrays(Ae,G.mulItems(y,Se/3))):(w[1]=G.addArrays(De,G.mulItems(h,M)),w[2]=G.addArrays(Ae,G.mulItems(y,W))),w}(E,h,y,w),[f,g]=function ne(E,d,h){var y,w,x,v,f,g,T,N;w=0,x=Math.floor(E.length/2);const H=P(d,10);for(f=0,g=E.length;f<g;f++)T=E[f],N=V(0,h[f],H,10),(y=(v=G.subtract(B.q(d,N),T))[0]*v[0]+v[1]*v[1])>w&&(w=y,x=f);return[w,x]}(E,v,d),x&&x({bez:v,points:E,params:d,maxErr:f,maxPoint:g}),[v,f,g]}function fe(E,d,h){return h.map((y,w)=>function ce(E,d,h){var y=G.subtract(B.q(E,h),d),w=B.qprime(E,h),x=G.mulMatrix(y,w),v=G.sum(G.squareItems(w))+2*G.mulMatrix(y,B.qprimeprime(E,h));return 0===v?h:h-x/v}(E,d[w],y))}var P=function(E,d){for(var h,y=[0],w=E[0],x=0,v=1;v<=d;v++)h=B.q(E,v/d),x+=G.vectorLen(G.subtract(h,w)),y.push(x),w=h;return y.map(f=>f/x)};function V(E,d,h,y){if(d<0)return 0;if(d>1)return 1;for(var x,f,g,T=1;T<=y;T++)if(d<=h[T]){g=(d-(x=h[T-1]))/(h[T]-x)*(T/y-(f=(T-1)/y))+f;break}return g}function O(E,d){return G.normalize(G.subtract(E,d))}class G{static zeros_Xx2x2(d){for(var h=[];d--;)h.push([0,0]);return h}static mulItems(d,h){return d.map(y=>y*h)}static mulMatrix(d,h){return d.reduce((y,w,x)=>y+w*h[x],0)}static subtract(d,h){return d.map((y,w)=>y-h[w])}static addArrays(d,h){return d.map((y,w)=>y+h[w])}static addItems(d,h){return d.map(y=>y+h)}static sum(d){return d.reduce((h,y)=>h+y)}static dot(d,h){return G.mulMatrix(d,h)}static vectorLen(d){return Math.hypot(...d)}static divItems(d,h){return d.map(y=>y/h)}static squareItems(d){return d.map(h=>h*h)}static normalize(d){return this.divItems(d,this.vectorLen(d))}}class B{static q(d,h){var y=1-h,w=G.mulItems(d[0],y*y*y),x=G.mulItems(d[1],3*y*y*h),v=G.mulItems(d[2],3*y*h*h),f=G.mulItems(d[3],h*h*h);return G.addArrays(G.addArrays(w,x),G.addArrays(v,f))}static qprime(d,h){var y=1-h,w=G.mulItems(G.subtract(d[1],d[0]),3*y*y),x=G.mulItems(G.subtract(d[2],d[1]),6*y*h),v=G.mulItems(G.subtract(d[3],d[2]),3*h*h);return G.addArrays(G.addArrays(w,x),v)}static qprimeprime(d,h){return G.addArrays(G.mulItems(G.addArrays(G.subtract(d[2],G.mulItems(d[1],2)),d[0]),6*(1-h)),G.mulItems(G.addArrays(G.subtract(d[3],G.mulItems(d[2],2)),d[1]),6*h))}}Re.exports=function I(E,d,h){if(!Array.isArray(E))throw new TypeError("First argument should be an array");if(E.forEach(v=>{if(!Array.isArray(v)||v.some(f=>"number"!=typeof f)||v.length!==E[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")}),(E=E.filter((v,f)=>0===f||!v.every((g,T)=>g===E[f-1][T]))).length<2)return[];const y=E.length,w=O(E[1],E[0]),x=O(E[y-2],E[y-1]);return _e(E,w,x,d,h)},Re.exports.fitCubic=_e,Re.exports.createTangent=O},(Re,I,_e)=>{var D,kD,R,LD,Y,VD;Object.defineProperty(I,"__esModule",{value:!0}),I.AnnotationLayer=void 0;var k=_e(1),j=_e(8),fe=_e(5),ce=_e(28),pe=_e(29);const V=new WeakSet;function O(ue){return{width:ue[2]-ue[0],height:ue[3]-ue[1]}}class G{static create(m){switch(m.data.annotationType){case k.AnnotationType.LINK:return new E(m);case k.AnnotationType.TEXT:return new d(m);case k.AnnotationType.WIDGET:switch(m.data.fieldType){case"Tx":return new y(m);case"Btn":return m.data.radioButton?new x(m):m.data.checkBox?new w(m):new v(m);case"Ch":return new f(m)}return new h(m);case k.AnnotationType.POPUP:return new g(m);case k.AnnotationType.FREETEXT:return new N(m);case k.AnnotationType.LINE:return new H(m);case k.AnnotationType.SQUARE:return new M(m);case k.AnnotationType.CIRCLE:return new W(m);case k.AnnotationType.POLYLINE:return new ye(m);case k.AnnotationType.CARET:return new ve(m);case k.AnnotationType.INK:return new Ie(m);case k.AnnotationType.POLYGON:return new Se(m);case k.AnnotationType.HIGHLIGHT:return new ge(m);case k.AnnotationType.UNDERLINE:return new se(m);case k.AnnotationType.SQUIGGLY:return new ee(m);case k.AnnotationType.STRIKEOUT:return new De(m);case k.AnnotationType.STAMP:return new Ae(m);case k.AnnotationType.FILEATTACHMENT:return new xe(m);default:return new B(m)}}}class B{constructor(m,{isRenderable:S=!1,ignoreBorder:F=!1,createQuadrilaterals:L=!1}={}){this.isRenderable=S,this.data=m.data,this.layer=m.layer,this.page=m.page,this.viewport=m.viewport,this.linkService=m.linkService,this.downloadManager=m.downloadManager,this.imageResourcesPath=m.imageResourcesPath,this.renderForms=m.renderForms,this.svgFactory=m.svgFactory,this.annotationStorage=m.annotationStorage,this.enableScripting=m.enableScripting,this.hasJSActions=m.hasJSActions,this._fieldObjects=m.fieldObjects,this._mouseState=m.mouseState,S&&(this.container=this._createContainer(F)),L&&(this.quadrilaterals=this._createQuadrilaterals(F))}_createContainer(m=!1){const S=this.data,F=this.page,L=this.viewport,K=document.createElement("section"),{width:ie,height:he}=O(S.rect),[ke,me,we,Ee]=L.viewBox,Ne=we-ke,Ve=Ee-me;K.setAttribute("data-annotation-id",S.id);const X=k.Util.normalizeRect([S.rect[0],F.view[3]-S.rect[1]+F.view[1],S.rect[2],F.view[3]-S.rect[3]+F.view[1]]);if(!m&&S.borderStyle.width>0){K.style.borderWidth=`${S.borderStyle.width}px`;const Ze=S.borderStyle.horizontalCornerRadius,Ke=S.borderStyle.verticalCornerRadius;switch(Ze>0||Ke>0?K.style.borderRadius=`calc(${Ze}px * var(--scale-factor)) / calc(${Ke}px * var(--scale-factor))`:this instanceof x&&(K.style.borderRadius=`calc(${ie}px * var(--scale-factor)) / calc(${he}px * var(--scale-factor))`),S.borderStyle.style){case k.AnnotationBorderStyleType.SOLID:K.style.borderStyle="solid";break;case k.AnnotationBorderStyleType.DASHED:K.style.borderStyle="dashed";break;case k.AnnotationBorderStyleType.BEVELED:(0,k.warn)("Unimplemented border style: beveled");break;case k.AnnotationBorderStyleType.INSET:(0,k.warn)("Unimplemented border style: inset");break;case k.AnnotationBorderStyleType.UNDERLINE:K.style.borderBottomStyle="solid"}const lt=S.borderColor||null;lt?K.style.borderColor=k.Util.makeHexColor(0|lt[0],0|lt[1],0|lt[2]):K.style.borderWidth=0}K.style.left=100*(X[0]-ke)/Ne+"%",K.style.top=100*(X[1]-me)/Ve+"%";const{rotation:je}=S;return S.hasOwnCanvas||0===je?(K.style.width=100*ie/Ne+"%",K.style.height=100*he/Ve+"%"):this.setRotation(je,K),K}setRotation(m,S=this.container){const[F,L,K,ie]=this.viewport.viewBox,he=K-F,ke=ie-L,{width:me,height:we}=O(this.data.rect);let Ee,Ne;m%180==0?(Ee=100*me/he,Ne=100*we/ke):(Ee=100*we/he,Ne=100*me/ke),S.style.width=`${Ee}%`,S.style.height=`${Ne}%`,S.setAttribute("data-main-rotation",(360-m)%360)}get _commonActions(){const m=(S,F,L)=>{const K=L.detail[S];L.target.style[F]=ce.ColorConverters[`${K[0]}_HTML`](K.slice(1))};return(0,k.shadow)(this,"_commonActions",{display:S=>{const F=S.detail.display%2==1;this.container.style.visibility=F?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:F,print:0===S.detail.display||3===S.detail.display})},print:S=>{this.annotationStorage.setValue(this.data.id,{print:S.detail.print})},hidden:S=>{this.container.style.visibility=S.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:S.detail.hidden})},focus:S=>{setTimeout(()=>S.target.focus({preventScroll:!1}),0)},userName:S=>{S.target.title=S.detail.userName},readonly:S=>{S.detail.readonly?S.target.setAttribute("readonly",""):S.target.removeAttribute("readonly")},required:S=>{this._setRequired(S.target,S.detail.required)},bgColor:S=>{m("bgColor","backgroundColor",S)},fillColor:S=>{m("fillColor","backgroundColor",S)},fgColor:S=>{m("fgColor","color",S)},textColor:S=>{m("textColor","color",S)},borderColor:S=>{m("borderColor","borderColor",S)},strokeColor:S=>{m("strokeColor","borderColor",S)},rotation:S=>{const F=S.detail.rotation;this.setRotation(F),this.annotationStorage.setValue(this.data.id,{rotation:F})}})}_dispatchEventFromSandbox(m,S){const F=this._commonActions;for(const L of Object.keys(S.detail)){const K=m[L]||F[L];K&&K(S)}}_setDefaultPropertiesFromJS(m){if(!this.enableScripting)return;const S=this.annotationStorage.getRawValue(this.data.id);if(!S)return;const F=this._commonActions;for(const[L,K]of Object.entries(S)){const ie=F[L];ie&&(ie({detail:{[L]:K},target:m}),delete S[L])}}_createQuadrilaterals(m=!1){if(!this.data.quadPoints)return null;const S=[],F=this.data.rect;for(const L of this.data.quadPoints)this.data.rect=[L[2].x,L[2].y,L[1].x,L[1].y],S.push(this._createContainer(m));return this.data.rect=F,S}_createPopup(m,S){let F=this.container;this.quadrilaterals&&(m=m||this.quadrilaterals,F=this.quadrilaterals[0]),m||((m=document.createElement("div")).className="popupTriggerArea",F.append(m));const K=new T({container:F,trigger:m,color:S.color,titleObj:S.titleObj,modificationDate:S.modificationDate,contentsObj:S.contentsObj,richText:S.richText,hideWrapper:!0}).render();K.style.left="100%",F.append(K)}_renderQuadrilaterals(m){for(const S of this.quadrilaterals)S.className=m;return this.quadrilaterals}render(){(0,k.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(m,S=null){const F=[];if(this._fieldObjects){const L=this._fieldObjects[m];if(L)for(const{page:K,id:ie,exportValues:he}of L){if(-1===K||ie===S)continue;const ke="string"==typeof he?he:null,me=document.querySelector(`[data-element-id="${ie}"]`);!me||V.has(me)?F.push({id:ie,exportValue:ke,domElement:me}):(0,k.warn)(`_getElementsByName - element not allowed: ${ie}`)}return F}for(const L of document.getElementsByName(m)){const{id:K,exportValue:ie}=L;K!==S&&(!V.has(L)||F.push({id:K,exportValue:ie,domElement:L}))}return F}static get platform(){const m="undefined"!=typeof navigator?navigator.platform:"";return(0,k.shadow)(this,"platform",{isWin:m.includes("Win"),isMac:m.includes("Mac")})}}class E extends B{constructor(m,S=null){super(m,{isRenderable:!0,ignoreBorder:!!(null==S?void 0:S.ignoreBorder),createQuadrilaterals:!0}),this.isTooltipOnly=m.data.isTooltipOnly}render(){const{data:m,linkService:S}=this,F=document.createElement("a");F.setAttribute("data-element-id",m.id);let L=!1;return m.url?(S.addLinkAttributes(F,m.url,m.newWindow),L=!0):m.action?(this._bindNamedAction(F,m.action),L=!0):m.dest?(this._bindLink(F,m.dest),L=!0):(m.actions&&(m.actions.Action||m.actions["Mouse Up"]||m.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(F,m),L=!0),m.resetForm?(this._bindResetFormAction(F,m.resetForm),L=!0):this.isTooltipOnly&&!L&&(this._bindLink(F,""),L=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((K,ie)=>{const he=0===ie?F:F.cloneNode();return K.append(he),K}):(this.container.className="linkAnnotation",L&&this.container.append(F),this.container)}_bindLink(m,S){m.href=this.linkService.getDestinationHash(S),m.onclick=()=>(S&&this.linkService.goToDestination(S),!1),(S||""===S)&&(m.className="internalLink")}_bindNamedAction(m,S){m.href=this.linkService.getAnchorUrl(""),m.onclick=()=>(this.linkService.executeNamedAction(S),!1),m.className="internalLink"}_bindJSAction(m,S){m.href=this.linkService.getAnchorUrl("");const F=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const L of Object.keys(S.actions)){const K=F.get(L);!K||(m[K]=()=>{var ie;return null==(ie=this.linkService.eventBus)||ie.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S.id,name:L}}),!1})}m.onclick||(m.onclick=()=>!1),m.className="internalLink"}_bindResetFormAction(m,S){const F=m.onclick;if(F||(m.href=this.linkService.getAnchorUrl("")),m.className="internalLink",!this._fieldObjects)return(0,k.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(F||(m.onclick=()=>!1));m.onclick=()=>{var we;F&&F();const{fields:L,refs:K,include:ie}=S,he=[];if(0!==L.length||0!==K.length){const Ee=new Set(K);for(const Ne of L){const Ve=this._fieldObjects[Ne]||[];for(const{id:X}of Ve)Ee.add(X)}for(const Ne of Object.values(this._fieldObjects))for(const Ve of Ne)Ee.has(Ve.id)===ie&&he.push(Ve)}else for(const Ee of Object.values(this._fieldObjects))he.push(...Ee);const ke=this.annotationStorage,me=[];for(const Ee of he){const{id:Ne}=Ee;switch(me.push(Ne),Ee.type){case"text":case"combobox":case"listbox":ke.setValue(Ne,{value:Ee.defaultValue||""});break;case"checkbox":case"radiobutton":ke.setValue(Ne,{value:Ee.defaultValue===Ee.exportValues});break;default:continue}const Ve=document.querySelector(`[data-element-id="${Ne}"]`);Ve&&(V.has(Ve)?Ve.dispatchEvent(new Event("resetform")):(0,k.warn)(`_bindResetFormAction - element not allowed: ${Ne}`))}return this.enableScripting&&(null==(we=this.linkService.eventBus)||we.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:me,name:"ResetForm"}})),!1}}}class d extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str))})}render(){this.container.className="textAnnotation";const m=document.createElement("img");return m.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",m.alt="[{{type}} Annotation]",m.dataset.l10nId="text_annotation_type",m.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(m,this.data),this.container.append(m),this.container}}class h extends B{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(m){const{isWin:S,isMac:F}=B.platform;return S&&m.ctrlKey||F&&m.metaKey}_setEventListener(m,S,F,L){S.includes("mouse")?m.addEventListener(S,K=>{var ie;null==(ie=this.linkService.eventBus)||ie.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:F,value:L(K),shift:K.shiftKey,modifier:this._getKeyModifier(K)}})}):m.addEventListener(S,K=>{var ie;null==(ie=this.linkService.eventBus)||ie.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:F,value:L(K)}})})}_setEventListeners(m,S,F){var L;for(const[K,ie]of S)("Action"===ie||(null==(L=this.data.actions)?void 0:L[ie]))&&this._setEventListener(m,K,ie,F)}_setBackgroundColor(m){const S=this.data.backgroundColor||null;m.style.backgroundColor=null===S?"transparent":k.Util.makeHexColor(S[0],S[1],S[2])}_setTextStyle(m){const{fontColor:F}=this.data.defaultAppearanceData,L=this.data.defaultAppearanceData.fontSize||9,K=m.style;let ie;if(this.data.multiLine){const he=Math.abs(this.data.rect[3]-this.data.rect[1]),ke=Math.round(he/(k.LINE_FACTOR*L))||1;ie=Math.min(L,Math.round(he/ke/k.LINE_FACTOR))}else{const he=Math.abs(this.data.rect[3]-this.data.rect[1]);ie=Math.min(L,Math.round(he/k.LINE_FACTOR))}K.fontSize=`calc(${ie}px * var(--scale-factor))`,K.color=k.Util.makeHexColor(F[0],F[1],F[2]),null!==this.data.textAlignment&&(K.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(m,S){S?m.setAttribute("required",!0):m.removeAttribute("required"),m.setAttribute("aria-required",S)}}class y extends h{constructor(m){super(m,{isRenderable:m.renderForms||!m.data.hasAppearance&&!!m.data.fieldValue})}setPropertyOnSiblings(m,S,F,L){const K=this.annotationStorage;for(const ie of this._getElementsByName(m.name,m.id))ie.domElement&&(ie.domElement[S]=F),K.setValue(ie.id,{[L]:F})}render(){var L;const m=this.annotationStorage,S=this.data.id;this.container.className="textWidgetAnnotation";let F=null;if(this.renderForms){const K=m.getValue(S,{value:this.data.fieldValue});let ie=K.formattedValue||K.value||"";const he=m.getValue(S,{charLimit:this.data.maxLen}).charLimit;he&&ie.length>he&&(ie=ie.slice(0,he));const ke={userValue:ie,formattedValue:null,valueOnFocus:""};this.data.multiLine?(F=document.createElement("textarea"),F.textContent=ie,this.data.doNotScroll&&(F.style.overflowY="hidden")):(F=document.createElement("input"),F.type="text",F.setAttribute("value",ie),this.data.doNotScroll&&(F.style.overflowX="hidden")),V.add(F),F.setAttribute("data-element-id",S),F.disabled=this.data.readOnly,F.name=this.data.fieldName,F.tabIndex=1e3,this._setRequired(F,this.data.required),he&&(F.maxLength=he),F.addEventListener("input",we=>{m.setValue(S,{value:we.target.value}),this.setPropertyOnSiblings(F,"value",we.target.value,"value")}),F.addEventListener("resetform",we=>{var Ne;const Ee=null!=(Ne=this.data.defaultFieldValue)?Ne:"";F.value=ke.userValue=Ee,ke.formattedValue=null});let me=we=>{const{formattedValue:Ee}=ke;null!=Ee&&(we.target.value=Ee),we.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){F.addEventListener("focus",Ee=>{ke.userValue&&(Ee.target.value=ke.userValue),ke.valueOnFocus=Ee.target.value}),F.addEventListener("updatefromsandbox",Ee=>{this._dispatchEventFromSandbox({value(Ve){var X;ke.userValue=null!=(X=Ve.detail.value)?X:"",m.setValue(S,{value:ke.userValue.toString()}),Ve.target.value=ke.userValue},formattedValue(Ve){const{formattedValue:X}=Ve.detail;ke.formattedValue=X,null!=X&&Ve.target!==document.activeElement&&(Ve.target.value=X),m.setValue(S,{formattedValue:X})},selRange(Ve){Ve.target.setSelectionRange(...Ve.detail.selRange)},charLimit:Ve=>{var Ke;const{charLimit:X}=Ve.detail,{target:je}=Ve;if(0===X)return void je.removeAttribute("maxLength");je.setAttribute("maxLength",X);let Ze=ke.userValue;!Ze||Ze.length<=X||(Ze=Ze.slice(0,X),je.value=ke.userValue=Ze,m.setValue(S,{value:Ze}),null==(Ke=this.linkService.eventBus)||Ke.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ze,willCommit:!0,commitKey:1,selStart:je.selectionStart,selEnd:je.selectionEnd}}))}},Ee)}),F.addEventListener("keydown",Ee=>{var X;let Ne=-1;if("Escape"===Ee.key?Ne=0:"Enter"===Ee.key?Ne=2:"Tab"===Ee.key&&(Ne=3),-1===Ne)return;const{value:Ve}=Ee.target;ke.valueOnFocus!==Ve&&(ke.userValue=Ve,null==(X=this.linkService.eventBus)||X.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ve,willCommit:!0,commitKey:Ne,selStart:Ee.target.selectionStart,selEnd:Ee.target.selectionEnd}}))});const we=me;me=null,F.addEventListener("blur",Ee=>{var Ve;const{value:Ne}=Ee.target;ke.userValue=Ne,this._mouseState.isDown&&ke.valueOnFocus!==Ne&&(null==(Ve=this.linkService.eventBus)||Ve.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ne,willCommit:!0,commitKey:1,selStart:Ee.target.selectionStart,selEnd:Ee.target.selectionEnd}})),we(Ee)}),(null==(L=this.data.actions)?void 0:L.Keystroke)&&F.addEventListener("beforeinput",Ee=>{var yt;const{data:Ne,target:Ve}=Ee,{value:X,selectionStart:je,selectionEnd:Ze}=Ve;let Ke=je,lt=Ze;switch(Ee.inputType){case"deleteWordBackward":{const $t=X.substring(0,je).match(/\w*[^\w]*$/);$t&&(Ke-=$t[0].length);break}case"deleteWordForward":{const $t=X.substring(je).match(/^[^\w]*\w*/);$t&&(lt+=$t[0].length);break}case"deleteContentBackward":je===Ze&&(Ke-=1);break;case"deleteContentForward":je===Ze&&(lt+=1)}Ee.preventDefault(),null==(yt=this.linkService.eventBus)||yt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:X,change:Ne||"",willCommit:!1,selStart:Ke,selEnd:lt}})}),this._setEventListeners(F,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Ee=>Ee.target.value)}if(me&&F.addEventListener("blur",me),this.data.comb){const Ee=(this.data.rect[2]-this.data.rect[0])/he;F.classList.add("comb"),F.style.letterSpacing=`calc(${Ee}px * var(--scale-factor) - 1ch)`}}else F=document.createElement("div"),F.textContent=this.data.fieldValue,F.style.verticalAlign="middle",F.style.display="table-cell";return this._setTextStyle(F),this._setBackgroundColor(F),this._setDefaultPropertiesFromJS(F),this.container.append(F),this.container}}class w extends h{constructor(m){super(m,{isRenderable:m.renderForms})}render(){const m=this.annotationStorage,S=this.data,F=S.id;let L=m.getValue(F,{value:S.exportValue===S.fieldValue}).value;"string"==typeof L&&(L="Off"!==L,m.setValue(F,{value:L})),this.container.className="buttonWidgetAnnotation checkBox";const K=document.createElement("input");return V.add(K),K.setAttribute("data-element-id",F),K.disabled=S.readOnly,this._setRequired(K,this.data.required),K.type="checkbox",K.name=S.fieldName,L&&K.setAttribute("checked",!0),K.setAttribute("exportValue",S.exportValue),K.tabIndex=1e3,K.addEventListener("change",ie=>{const{name:he,checked:ke}=ie.target;for(const me of this._getElementsByName(he,F)){const we=ke&&me.exportValue===S.exportValue;me.domElement&&(me.domElement.checked=we),m.setValue(me.id,{value:we})}m.setValue(F,{value:ke})}),K.addEventListener("resetform",ie=>{ie.target.checked=(S.defaultFieldValue||"Off")===S.exportValue}),this.enableScripting&&this.hasJSActions&&(K.addEventListener("updatefromsandbox",ie=>{this._dispatchEventFromSandbox({value(ke){ke.target.checked="Off"!==ke.detail.value,m.setValue(F,{value:ke.target.checked})}},ie)}),this._setEventListeners(K,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],ie=>ie.target.checked)),this._setBackgroundColor(K),this._setDefaultPropertiesFromJS(K),this.container.append(K),this.container}}class x extends h{constructor(m){super(m,{isRenderable:m.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const m=this.annotationStorage,S=this.data,F=S.id;let L=m.getValue(F,{value:S.fieldValue===S.buttonValue}).value;"string"==typeof L&&(L=L!==S.buttonValue,m.setValue(F,{value:L}));const K=document.createElement("input");if(V.add(K),K.setAttribute("data-element-id",F),K.disabled=S.readOnly,this._setRequired(K,this.data.required),K.type="radio",K.name=S.fieldName,L&&K.setAttribute("checked",!0),K.tabIndex=1e3,K.addEventListener("change",ie=>{const{name:he,checked:ke}=ie.target;for(const me of this._getElementsByName(he,F))m.setValue(me.id,{value:!1});m.setValue(F,{value:ke})}),K.addEventListener("resetform",ie=>{const he=S.defaultFieldValue;ie.target.checked=null!=he&&he===S.buttonValue}),this.enableScripting&&this.hasJSActions){const ie=S.buttonValue;K.addEventListener("updatefromsandbox",he=>{this._dispatchEventFromSandbox({value:me=>{const we=ie===me.detail.value;for(const Ee of this._getElementsByName(me.target.name)){const Ne=we&&Ee.id===F;Ee.domElement&&(Ee.domElement.checked=Ne),m.setValue(Ee.id,{value:Ne})}}},he)}),this._setEventListeners(K,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],he=>he.target.checked)}return this._setBackgroundColor(K),this._setDefaultPropertiesFromJS(K),this.container.append(K),this.container}}class v extends E{constructor(m){super(m,{ignoreBorder:m.data.hasAppearance})}render(){const m=super.render();m.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(m.title=this.data.alternativeText);const S=m.lastChild;return this.enableScripting&&this.hasJSActions&&S&&(this._setDefaultPropertiesFromJS(S),S.addEventListener("updatefromsandbox",F=>{this._dispatchEventFromSandbox({},F)})),m}}class f extends h{constructor(m){super(m,{isRenderable:m.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const m=this.annotationStorage,S=this.data.id,F=m.getValue(S,{value:this.data.fieldValue}),L=document.createElement("select");V.add(L),L.setAttribute("data-element-id",S),L.disabled=this.data.readOnly,this._setRequired(L,this.data.required),L.name=this.data.fieldName,L.tabIndex=1e3;let K=this.data.combo&&this.data.options.length>0;this.data.combo||(L.size=this.data.options.length,this.data.multiSelect&&(L.multiple=!0)),L.addEventListener("resetform",me=>{const we=this.data.defaultFieldValue;for(const Ee of L.options)Ee.selected=Ee.value===we});for(const me of this.data.options){const we=document.createElement("option");we.textContent=me.displayValue,we.value=me.exportValue,F.value.includes(me.exportValue)&&(we.setAttribute("selected",!0),K=!1),L.append(we)}let ie=null;if(K){const me=document.createElement("option");me.value=" ",me.setAttribute("hidden",!0),me.setAttribute("selected",!0),L.prepend(me),ie=()=>{me.remove(),L.removeEventListener("input",ie),ie=null},L.addEventListener("input",ie)}const he=(me,we)=>{const Ee=we?"value":"textContent",Ne=me.target.options;return me.target.multiple?Array.prototype.filter.call(Ne,Ve=>Ve.selected).map(Ve=>Ve[Ee]):-1===Ne.selectedIndex?null:Ne[Ne.selectedIndex][Ee]},ke=me=>Array.prototype.map.call(me.target.options,Ee=>({displayValue:Ee.textContent,exportValue:Ee.value}));return this.enableScripting&&this.hasJSActions?(L.addEventListener("updatefromsandbox",me=>{this._dispatchEventFromSandbox({value(Ee){null==ie||ie();const Ne=Ee.detail.value,Ve=new Set(Array.isArray(Ne)?Ne:[Ne]);for(const X of L.options)X.selected=Ve.has(X.value);m.setValue(S,{value:he(Ee,!0)})},multipleSelection(Ee){L.multiple=!0},remove(Ee){const Ne=L.options,Ve=Ee.detail.remove;Ne[Ve].selected=!1,L.remove(Ve),Ne.length>0&&-1===Array.prototype.findIndex.call(Ne,je=>je.selected)&&(Ne[0].selected=!0),m.setValue(S,{value:he(Ee,!0),items:ke(Ee)})},clear(Ee){for(;0!==L.length;)L.remove(0);m.setValue(S,{value:null,items:[]})},insert(Ee){const{index:Ne,displayValue:Ve,exportValue:X}=Ee.detail.insert,je=L.children[Ne],Ze=document.createElement("option");Ze.textContent=Ve,Ze.value=X,je?je.before(Ze):L.append(Ze),m.setValue(S,{value:he(Ee,!0),items:ke(Ee)})},items(Ee){const{items:Ne}=Ee.detail;for(;0!==L.length;)L.remove(0);for(const Ve of Ne){const{displayValue:X,exportValue:je}=Ve,Ze=document.createElement("option");Ze.textContent=X,Ze.value=je,L.append(Ze)}L.options.length>0&&(L.options[0].selected=!0),m.setValue(S,{value:he(Ee,!0),items:ke(Ee)})},indices(Ee){const Ne=new Set(Ee.detail.indices);for(const Ve of Ee.target.options)Ve.selected=Ne.has(Ve.index);m.setValue(S,{value:he(Ee,!0)})},editable(Ee){Ee.target.disabled=!Ee.detail.editable}},me)}),L.addEventListener("input",me=>{var Ne;const we=he(me,!0),Ee=he(me,!1);m.setValue(S,{value:we}),null==(Ne=this.linkService.eventBus)||Ne.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ee,changeEx:we,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(L,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],me=>me.target.checked)):L.addEventListener("input",function(me){m.setValue(S,{value:he(me,!0)})}),this.data.combo&&this._setTextStyle(L),this._setBackgroundColor(L),this._setDefaultPropertiesFromJS(L),this.container.append(L),this.container}}class g extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!((null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str))})}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const F=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(0===F.length)return this.container;const L=new T({container:this.container,trigger:Array.from(F),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),K=this.page,ie=k.Util.normalizeRect([this.data.parentRect[0],K.view[3]-this.data.parentRect[1]+K.view[1],this.data.parentRect[2],K.view[3]-this.data.parentRect[3]+K.view[1]]),he=ie[0]+this.data.parentRect[2]-this.data.parentRect[0],ke=ie[1],[me,we,Ee,Ne]=this.viewport.viewBox,X=Ne-we;return this.container.style.left=100*(he-me)/(Ee-me)+"%",this.container.style.top=100*(ke-we)/X+"%",this.container.append(L.render()),this.container}}class T{constructor(m){this.container=m.container,this.trigger=m.trigger,this.color=m.color,this.titleObj=m.titleObj,this.modificationDate=m.modificationDate,this.contentsObj=m.contentsObj,this.richText=m.richText,this.hideWrapper=m.hideWrapper||!1,this.pinned=!1}render(){var he,ke;const S=document.createElement("div");S.className="popupWrapper",this.hideElement=this.hideWrapper?S:this.container,this.hideElement.hidden=!0;const F=document.createElement("div");F.className="popup";const L=this.color;L&&(F.style.backgroundColor=k.Util.makeHexColor(0|.7*(255-L[0])+L[0],0|.7*(255-L[1])+L[1],0|.7*(255-L[2])+L[2]));const K=document.createElement("h1");K.dir=this.titleObj.dir,K.textContent=this.titleObj.str,F.append(K);const ie=j.PDFDateString.toDateObject(this.modificationDate);if(ie){const me=document.createElement("span");me.className="popupDate",me.textContent="{{date}}, {{time}}",me.dataset.l10nId="annotation_date_string",me.dataset.l10nArgs=JSON.stringify({date:ie.toLocaleDateString(),time:ie.toLocaleTimeString()}),F.append(me)}if(!(null==(he=this.richText)?void 0:he.str)||(null==(ke=this.contentsObj)?void 0:ke.str)&&this.contentsObj.str!==this.richText.str){const me=this._formatContents(this.contentsObj);F.append(me)}else pe.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:F}),F.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const me of this.trigger)me.addEventListener("click",this._toggle.bind(this)),me.addEventListener("mouseover",this._show.bind(this,!1)),me.addEventListener("mouseout",this._hide.bind(this,!1));return F.addEventListener("click",this._hide.bind(this,!0)),S.append(F),S}_formatContents({str:m,dir:S}){const F=document.createElement("p");F.className="popupContent",F.dir=S;const L=m.split(/(?:\r\n?|\n)/);for(let K=0,ie=L.length;K<ie;++K)F.append(document.createTextNode(L[K])),K<ie-1&&F.append(document.createElement("br"));return F}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(m=!1){m&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(m=!0){m&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class N extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0}),this.textContent=m.data.textContent}render(){if(this.container.className="freeTextAnnotation",this.textContent){const m=document.createElement("div");m.className="annotationTextContent",m.setAttribute("role","comment");for(const S of this.textContent){const F=document.createElement("span");F.textContent=S,m.append(F)}this.container.append(m)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class H extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){this.container.className="lineAnnotation";const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0),K=this.svgFactory.createElement("svg:line");return K.setAttribute("x1",m.rect[2]-m.lineCoordinates[0]),K.setAttribute("y1",m.rect[3]-m.lineCoordinates[1]),K.setAttribute("x2",m.rect[2]-m.lineCoordinates[2]),K.setAttribute("y2",m.rect[3]-m.lineCoordinates[3]),K.setAttribute("stroke-width",m.borderStyle.width||1),K.setAttribute("stroke","transparent"),K.setAttribute("fill","transparent"),L.append(K),this.container.append(L),this._createPopup(K,m),this.container}}class M extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){this.container.className="squareAnnotation";const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0),K=m.borderStyle.width,ie=this.svgFactory.createElement("svg:rect");return ie.setAttribute("x",K/2),ie.setAttribute("y",K/2),ie.setAttribute("width",S-K),ie.setAttribute("height",F-K),ie.setAttribute("stroke-width",K||1),ie.setAttribute("stroke","transparent"),ie.setAttribute("fill","transparent"),L.append(ie),this.container.append(L),this._createPopup(ie,m),this.container}}class W extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){this.container.className="circleAnnotation";const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0),K=m.borderStyle.width,ie=this.svgFactory.createElement("svg:ellipse");return ie.setAttribute("cx",S/2),ie.setAttribute("cy",F/2),ie.setAttribute("rx",S/2-K/2),ie.setAttribute("ry",F/2-K/2),ie.setAttribute("stroke-width",K||1),ie.setAttribute("stroke","transparent"),ie.setAttribute("fill","transparent"),L.append(ie),this.container.append(L),this._createPopup(ie,m),this.container}}class ye extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0);let K=[];for(const he of m.vertices)K.push(he.x-m.rect[0]+","+(m.rect[3]-he.y));K=K.join(" ");const ie=this.svgFactory.createElement(this.svgElementName);return ie.setAttribute("points",K),ie.setAttribute("stroke-width",m.borderStyle.width||1),ie.setAttribute("stroke","transparent"),ie.setAttribute("fill","transparent"),L.append(ie),this.container.append(L),this._createPopup(ie,m),this.container}}class Se extends ye{constructor(m){super(m),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class ve extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class Ie extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0);for(const K of m.inkLists){let ie=[];for(const ke of K)ie.push(`${ke.x-m.rect[0]},${m.rect[3]-ke.y}`);ie=ie.join(" ");const he=this.svgFactory.createElement(this.svgElementName);he.setAttribute("points",ie),he.setAttribute("stroke-width",m.borderStyle.width||1),he.setAttribute("stroke","transparent"),he.setAttribute("fill","transparent"),this._createPopup(he,m),L.append(he)}return this.container.append(L),this.container}}class ge extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}class se extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}class ee extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}class De extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}class Ae extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class xe extends B{constructor(m){var L;super(m,{isRenderable:!0});const{filename:S,content:F}=this.data.file;this.filename=(0,j.getFilenameFromUrl)(S),this.content=F,null==(L=this.linkService.eventBus)||L.dispatch("fileattachmentannotation",{source:this,filename:S,content:F})}render(){var S,F;this.container.className="fileAttachmentAnnotation";const m=document.createElement("div");return m.className="popupTriggerArea",m.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&((null==(S=this.data.titleObj)?void 0:S.str)||(null==(F=this.data.contentsObj)?void 0:F.str)||this.data.richText)&&this._createPopup(m,this.data),this.container.append(m),this.container}_download(){var m;null==(m=this.downloadManager)||m.openOrDownloadData(this.container,this.content,this.filename)}}const de=class{static render(m){var he,ke;const{annotations:S,div:F,viewport:L,accessibilityManager:K}=m;Le(this,R,LD).call(this,F,L);let ie=0;for(const me of S){if(me.annotationType!==k.AnnotationType.POPUP){const{width:Ee,height:Ne}=O(me.rect);if(Ee<=0||Ne<=0)continue}const we=G.create({data:me,layer:F,page:m.page,viewport:L,linkService:m.linkService,downloadManager:m.downloadManager,imageResourcesPath:m.imageResourcesPath||"",renderForms:!1!==m.renderForms,svgFactory:new j.DOMSVGFactory,annotationStorage:m.annotationStorage||new fe.AnnotationStorage,enableScripting:m.enableScripting,hasJSActions:m.hasJSActions,fieldObjects:m.fieldObjects,mouseState:m.mouseState||{isDown:!1}});if(we.isRenderable){const Ee=we.render();if(me.hidden&&(Ee.style.visibility="hidden"),Array.isArray(Ee))for(const Ne of Ee)Ne.style.zIndex=ie++,Le(he=de,D,kD).call(he,Ne,me.id,F,K);else Ee.style.zIndex=ie++,we instanceof g?F.prepend(Ee):Le(ke=de,D,kD).call(ke,Ee,me.id,F,K)}}Le(this,Y,VD).call(this,F,m.annotationCanvasMap)}static update(m){const{annotationCanvasMap:S,div:F,viewport:L}=m;Le(this,R,LD).call(this,F,L),Le(this,Y,VD).call(this,F,S),F.hidden=!1}};let te=de;D=new WeakSet,kD=function(m,S,F,L){const K=m.firstChild||m;K.id=`${j.AnnotationPrefix}${S}`,F.append(m),null==L||L.moveElementInDOM(F,m,K,!1)},R=new WeakSet,LD=function(m,{width:S,height:F,rotation:L}){const{style:K}=m,ie=L%180!=0,he=Math.floor(S)+"px",ke=Math.floor(F)+"px";K.width=ie?ke:he,K.height=ie?he:ke,m.setAttribute("data-main-rotation",L)},Y=new WeakSet,VD=function(m,S){if(S){for(const[F,L]of S){const K=m.querySelector(`[data-annotation-id="${F}"]`);if(!K)continue;const{firstChild:ie}=K;ie?"CANVAS"===ie.nodeName?ie.replaceWith(L):ie.before(L):K.append(L)}S.clear()}},Pe(te,D),Pe(te,R),Pe(te,Y),I.AnnotationLayer=te},(Re,I)=>{function _e(j){return Math.floor(255*Math.max(0,Math.min(1,j))).toString(16).padStart(2,"0")}Object.defineProperty(I,"__esModule",{value:!0}),I.ColorConverters=void 0,I.ColorConverters=class k{static CMYK_G([fe,ce,pe,ne]){return["G",1-Math.min(1,.3*fe+.59*pe+.11*ce+ne)]}static G_CMYK([fe]){return["CMYK",0,0,0,1-fe]}static G_RGB([fe]){return["RGB",fe,fe,fe]}static G_HTML([fe]){const ce=_e(fe);return`#${ce}${ce}${ce}`}static RGB_G([fe,ce,pe]){return["G",.3*fe+.59*ce+.11*pe]}static RGB_HTML([fe,ce,pe]){return`#${_e(fe)}${_e(ce)}${_e(pe)}`}static T_HTML(){return"#00000000"}static CMYK_RGB([fe,ce,pe,ne]){return["RGB",1-Math.min(1,fe+ne),1-Math.min(1,pe+ne),1-Math.min(1,ce+ne)]}static CMYK_HTML(fe){const ce=this.CMYK_RGB(fe).slice(1);return this.RGB_HTML(ce)}static RGB_CMYK([fe,ce,pe]){const ne=1-fe,P=1-ce,V=1-pe;return["CMYK",ne,P,V,Math.min(ne,P,V)]}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.XfaLayer=void 0;var k=_e(20);I.XfaLayer=class j{static setupStorage(ce,pe,ne,P,V){const O=P.getValue(pe,{value:null});switch(ne.name){case"textarea":if(null!==O.value&&(ce.textContent=O.value),"print"===V)break;ce.addEventListener("input",G=>{P.setValue(pe,{value:G.target.value})});break;case"input":if("radio"===ne.attributes.type||"checkbox"===ne.attributes.type){if(O.value===ne.attributes.xfaOn?ce.setAttribute("checked",!0):O.value===ne.attributes.xfaOff&&ce.removeAttribute("checked"),"print"===V)break;ce.addEventListener("change",G=>{P.setValue(pe,{value:G.target.getAttribute(G.target.checked?"xfaOn":"xfaOff")})})}else{if(null!==O.value&&ce.setAttribute("value",O.value),"print"===V)break;ce.addEventListener("input",G=>{P.setValue(pe,{value:G.target.value})})}break;case"select":if(null!==O.value)for(const G of ne.children)G.attributes.value===O.value&&(G.attributes.selected=!0);ce.addEventListener("input",G=>{const B=G.target.options;P.setValue(pe,{value:-1===B.selectedIndex?"":B[B.selectedIndex].value})})}}static setAttributes({html:ce,element:pe,storage:ne=null,intent:P,linkService:V}){const{attributes:O}=pe,G=ce instanceof HTMLAnchorElement;"radio"===O.type&&(O.name=`${O.name}-${P}`);for(const[B,E]of Object.entries(O))if(null!=E)switch(B){case"class":E.length&&ce.setAttribute(B,E.join(" "));break;case"dataId":break;case"id":ce.setAttribute("data-element-id",E);break;case"style":Object.assign(ce.style,E);break;case"textContent":ce.textContent=E;break;default:(!G||"href"!==B&&"newWindow"!==B)&&ce.setAttribute(B,E)}G&&V.addLinkAttributes(ce,O.href,O.newWindow),ne&&O.dataId&&this.setupStorage(ce,O.dataId,pe,ne)}static render(ce){var d;const pe=ce.annotationStorage,ne=ce.linkService,P=ce.xfaHtml,V=ce.intent||"display",O=document.createElement(P.name);P.attributes&&this.setAttributes({html:O,element:P,intent:V,linkService:ne});const G=[[P,-1,O]],B=ce.div;if(B.append(O),ce.viewport){const h=`matrix(${ce.viewport.transform.join(",")})`;B.style.transform=h}"richText"!==V&&B.setAttribute("class","xfaLayer xfaFont");const E=[];for(;G.length>0;){const[h,y,w]=G.at(-1);if(y+1===h.children.length){G.pop();continue}const x=h.children[++G.at(-1)[1]];if(null===x)continue;const{name:v}=x;if("#text"===v){const g=document.createTextNode(x.value);E.push(g),w.append(g);continue}let f;if(f=(null==(d=null==x?void 0:x.attributes)?void 0:d.xmlns)?document.createElementNS(x.attributes.xmlns,v):document.createElement(v),w.append(f),x.attributes&&this.setAttributes({html:f,element:x,storage:pe,intent:V,linkService:ne}),x.children&&x.children.length>0)G.push([x,-1,f]);else if(x.value){const g=document.createTextNode(x.value);k.XfaText.shouldBuildText(v)&&E.push(g),f.append(g)}}for(const h of B.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))h.setAttribute("readOnly",!0);return{textDivs:E}}static update(ce){const pe=`matrix(${ce.viewport.transform.join(",")})`;ce.div.style.transform=pe,ce.div.hidden=!1}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.TextLayerRenderTask=void 0,I.renderTextLayer=function w(x){const v=new y({textContent:x.textContent,textContentStream:x.textContentStream,container:x.container,viewport:x.viewport,textDivs:x.textDivs,textContentItemsStr:x.textContentItemsStr,enhanceTextSelection:x.enhanceTextSelection});return v._render(x.timeout),v};var k=_e(1),j=_e(8);const ne=new Map,P=/^\s+$/g;function O(x,v,f,g){const T=document.createElement("span"),N=x._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==v.str,hasEOL:v.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1,fontSize:0}:{angle:0,canvasWidth:0,hasText:""!==v.str,hasEOL:v.hasEOL,fontSize:0};x._textDivs.push(T);const H=k.Util.transform(x._viewport.transform,v.transform);let M=Math.atan2(H[1],H[0]);const W=f[v.fontName];W.vertical&&(M+=Math.PI/2);const ye=Math.hypot(H[2],H[3]),Se=ye*function V(x,v){const f=ne.get(x);if(f)return f;v.save(),v.font=`30px ${x}`;const g=v.measureText("");let T=g.fontBoundingBoxAscent,N=Math.abs(g.fontBoundingBoxDescent);if(T){v.restore();const M=T/(T+N);return ne.set(x,M),M}v.strokeStyle="red",v.clearRect(0,0,30,30),v.strokeText("g",0,0);let H=v.getImageData(0,0,30,30).data;N=0;for(let M=H.length-1-3;M>=0;M-=4)if(H[M]>0){N=Math.ceil(M/4/30);break}v.clearRect(0,0,30,30),v.strokeText("A",0,30),H=v.getImageData(0,0,30,30).data,T=0;for(let M=0,W=H.length;M<W;M+=4)if(H[M]>0){T=30-Math.floor(M/4/30);break}if(v.restore(),T){const M=T/(T+N);return ne.set(x,M),M}return ne.set(x,.8),.8}(W.fontFamily,g);let ve,Ie;0===M?(ve=H[4],Ie=H[5]-Se):(ve=H[4]+Se*Math.sin(M),Ie=H[5]-Se*Math.cos(M)),T.style.left=`${ve}px`,T.style.top=`${Ie}px`,T.style.fontSize=`${ye}px`,T.style.fontFamily=W.fontFamily,N.fontSize=ye,T.setAttribute("role","presentation"),T.textContent=v.str,T.dir=v.dir,x._fontInspectorEnabled&&(T.dataset.fontName=v.fontName),0!==M&&(N.angle=M*(180/Math.PI));let ge=!1;if(v.str.length>1||x._enhanceTextSelection&&P.test(v.str))ge=!0;else if(" "!==v.str&&v.transform[0]!==v.transform[3]){const se=Math.abs(v.transform[0]),ee=Math.abs(v.transform[3]);se!==ee&&Math.max(se,ee)/Math.min(se,ee)>1.5&&(ge=!0)}if(ge&&(N.canvasWidth=W.vertical?v.height*x._viewport.scale:v.width*x._viewport.scale),x._textDivProperties.set(T,N),x._textContentStream&&x._layoutText(T),x._enhanceTextSelection&&N.hasText){let se=1,ee=0;0!==M&&(se=Math.cos(M),ee=Math.sin(M));const De=(W.vertical?v.height:v.width)*x._viewport.scale,Ae=ye;let xe,te;0!==M?(xe=[se,ee,-ee,se,ve,Ie],te=k.Util.getAxialAlignedBoundingBox([0,0,De,Ae],xe)):te=[ve,Ie,ve+De,Ie+Ae],x._bounds.push({left:te[0],top:te[1],right:te[2],bottom:te[3],div:T,size:[De,Ae],m:xe})}}function G(x){if(x._canceled)return;const v=x._textDivs,f=x._capability,g=v.length;if(g>1e5)return x._renderingDone=!0,void f.resolve();if(!x._textContentStream)for(let T=0;T<g;T++)x._layoutText(v[T]);x._renderingDone=!0,f.resolve()}function B(x,v,f){let g=0;for(let T=0;T<f;T++){const N=x[v++];N>0&&(g=g?Math.min(N,g):N)}return g}function h(x,v){v.sort(function(T,N){return T.x1-N.x1||T.index-N.index});const g=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];for(const T of v){let N=0;for(;N<g.length&&g[N].end<=T.y1;)N++;let H=g.length-1;for(;H>=0&&g[H].start>=T.y2;)H--;let M,W,ye,Se,ve=-1/0;for(ye=N;ye<=H;ye++){let se;M=g[ye],W=M.boundary,se=W.x2>T.x1?W.index>T.index?W.x1New:T.x1:void 0===W.x2New?(W.x2+T.x1)/2:W.x2New,se>ve&&(ve=se)}for(T.x1New=ve,ye=N;ye<=H;ye++)M=g[ye],W=M.boundary,void 0===W.x2New?W.x2>T.x1?W.index>T.index&&(W.x2New=W.x2):W.x2New=ve:W.x2New>ve&&(W.x2New=Math.max(ve,W.x2));const Ie=[];let ge=null;for(ye=N;ye<=H;ye++){M=g[ye],W=M.boundary;const se=W.x2>T.x2?W:T;ge===se?Ie.at(-1).end=M.end:(Ie.push({start:M.start,end:M.end,boundary:se}),ge=se)}for(g[N].start<T.y1&&(Ie[0].start=T.y1,Ie.unshift({start:g[N].start,end:T.y1,boundary:g[N].boundary})),T.y2<g[H].end&&(Ie.at(-1).end=T.y2,Ie.push({start:T.y2,end:g[H].end,boundary:g[H].boundary})),ye=N;ye<=H;ye++){if(M=g[ye],W=M.boundary,void 0!==W.x2New)continue;let se=!1;for(Se=N-1;!se&&Se>=0&&g[Se].start>=W.y1;Se--)se=g[Se].boundary===W;for(Se=H+1;!se&&Se<g.length&&g[Se].end<=W.y2;Se++)se=g[Se].boundary===W;for(Se=0;!se&&Se<Ie.length;Se++)se=Ie[Se].boundary===W;se||(W.x2New=ve)}Array.prototype.splice.apply(g,[N,H-N+1,...Ie])}for(const T of g){const N=T.boundary;void 0===N.x2New&&(N.x2New=Math.max(x,N.x2))}}class y{constructor({textContent:v,textContentStream:f,container:g,viewport:T,textDivs:N,textContentItemsStr:H,enhanceTextSelection:M}){var W;M&&(0,j.deprecated)("The `enhanceTextSelection` functionality will be removed in the future."),this._textContent=v,this._textContentStream=f,this._container=g,this._document=g.ownerDocument,this._viewport=T,this._textDivs=N||[],this._textContentItemsStr=H||[],this._enhanceTextSelection=!!M,this._fontInspectorEnabled=!!(null==(W=globalThis.FontInspector)?void 0:W.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,k.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._devicePixelRatio=globalThis.devicePixelRatio||1,this._capability.promise.finally(()=>{this._enhanceTextSelection||(this._textDivProperties=null),this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new k.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}_processItems(v,f){for(let g=0,T=v.length;g<T;g++)if(void 0!==v[g].str)this._textContentItemsStr.push(v[g].str),O(this,v[g],f,this._layoutTextCtx);else if("beginMarkedContentProps"===v[g].type||"beginMarkedContent"===v[g].type){const N=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==v[g].id&&this._container.setAttribute("id",`${v[g].id}`),N.append(this._container)}else"endMarkedContent"===v[g].type&&(this._container=this._container.parentNode)}_layoutText(v){const f=this._textDivProperties.get(v);let g="";if(0!==f.canvasWidth&&f.hasText){const{fontFamily:T}=v.style,{fontSize:N}=f;(N!==this._layoutTextLastFontSize||T!==this._layoutTextLastFontFamily)&&(this._layoutTextCtx.font=`${N*this._devicePixelRatio}px ${T}`,this._layoutTextLastFontSize=N,this._layoutTextLastFontFamily=T);const{width:H}=this._layoutTextCtx.measureText(v.textContent);if(H>0){const M=this._devicePixelRatio*f.canvasWidth/H;this._enhanceTextSelection&&(f.scale=M),g=`scaleX(${M})`}}if(0!==f.angle&&(g=`rotate(${f.angle}deg) ${g}`),g.length>0&&(this._enhanceTextSelection&&(f.originalTransform=g),v.style.transform=g),f.hasText&&this._container.append(v),f.hasEOL){const T=document.createElement("br");T.setAttribute("role","presentation"),this._container.append(T)}}_render(v=0){const f=(0,k.createPromiseCapability)();let g=Object.create(null);const T=this._document.createElement("canvas");if(T.height=T.width=30,this._layoutTextCtx=T.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),f.resolve();else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const N=()=>{this._reader.read().then(({value:H,done:M})=>{M?f.resolve():(Object.assign(g,H.styles),this._processItems(H.items,g),N())},f.reject)};this._reader=this._textContentStream.getReader(),N()}}f.promise.then(()=>{g=null,v?this._renderTimer=setTimeout(()=>{G(this),this._renderTimer=null},v):G(this)},this._capability.reject)}expandTextDivs(v=!1){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(function E(x){const v=x._bounds,f=x._viewport,g=function d(x,v,f){const g=f.map(function(N,H){return{x1:N.left,y1:N.top,x2:N.right,y2:N.bottom,index:H,x1New:void 0,x2New:void 0}});h(x,g);const T=new Array(f.length);for(const N of g)T[N.index]={left:N.x1New,top:0,right:N.x2New,bottom:0};f.map(function(N,H){const M=T[H],W=g[H];W.x1=N.top,W.y1=x-M.right,W.x2=N.bottom,W.y2=x-M.left,W.index=H,W.x1New=void 0,W.x2New=void 0}),h(v,g);for(const N of g){const H=N.index;T[H].top=N.x1New,T[H].bottom=N.x2New}return T}(f.width,f.height,v);for(let T=0;T<g.length;T++){const N=v[T].div,H=x._textDivProperties.get(N);if(0===H.angle){H.paddingLeft=v[T].left-g[T].left,H.paddingTop=v[T].top-g[T].top,H.paddingRight=g[T].right-v[T].right,H.paddingBottom=g[T].bottom-v[T].bottom,x._textDivProperties.set(N,H);continue}const M=g[T],W=v[T],ye=W.m,Se=ye[0],ve=ye[1],Ie=[[0,0],[0,W.size[1]],[W.size[0],0],W.size],ge=new Float64Array(64);for(let ee=0,De=Ie.length;ee<De;ee++){const Ae=k.Util.applyTransform(Ie[ee],ye);ge[ee+0]=Se&&(M.left-Ae[0])/Se,ge[ee+4]=ve&&(M.top-Ae[1])/ve,ge[ee+8]=Se&&(M.right-Ae[0])/Se,ge[ee+12]=ve&&(M.bottom-Ae[1])/ve,ge[ee+16]=ve&&(M.left-Ae[0])/-ve,ge[ee+20]=Se&&(M.top-Ae[1])/Se,ge[ee+24]=ve&&(M.right-Ae[0])/-ve,ge[ee+28]=Se&&(M.bottom-Ae[1])/Se,ge[ee+32]=Se&&(M.left-Ae[0])/-Se,ge[ee+36]=ve&&(M.top-Ae[1])/-ve,ge[ee+40]=Se&&(M.right-Ae[0])/-Se,ge[ee+44]=ve&&(M.bottom-Ae[1])/-ve,ge[ee+48]=ve&&(M.left-Ae[0])/ve,ge[ee+52]=Se&&(M.top-Ae[1])/-Se,ge[ee+56]=ve&&(M.right-Ae[0])/ve,ge[ee+60]=Se&&(M.bottom-Ae[1])/-Se}const se=1+Math.min(Math.abs(Se),Math.abs(ve));H.paddingLeft=B(ge,32,16)/se,H.paddingTop=B(ge,48,16)/se,H.paddingRight=B(ge,0,16)/se,H.paddingBottom=B(ge,16,16)/se,x._textDivProperties.set(N,H)}}(this),this._bounds=null);const f=[],g=[];for(let T=0,N=this._textDivs.length;T<N;T++){const H=this._textDivs[T],M=this._textDivProperties.get(H);!M.hasText||(v?(f.length=0,g.length=0,M.originalTransform&&f.push(M.originalTransform),M.paddingTop>0?(g.push(`${M.paddingTop}px`),f.push(`translateY(${-M.paddingTop}px)`)):g.push(0),g.push(M.paddingRight>0?M.paddingRight/M.scale+"px":0),g.push(M.paddingBottom>0?`${M.paddingBottom}px`:0),M.paddingLeft>0?(g.push(M.paddingLeft/M.scale+"px"),f.push(`translateX(${-M.paddingLeft/M.scale}px)`)):g.push(0),H.style.padding=g.join(" "),f.length&&(H.style.transform=f.join(" "))):(H.style.padding=null,H.style.transform=M.originalTransform))}}}I.TextLayerRenderTask=y},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.SVGGraphics=void 0;var k=_e(8),j=_e(1),fe=_e(3);let ce=class{constructor(){(0,j.unreachable)("Not implemented: SVGGraphics")}};I.SVGGraphics=ce;{let d=function(f){let g=[];const T=[];for(const N of f)"save"!==N.fn?"restore"===N.fn?g=T.pop():g.push(N):(g.push({fnId:92,fn:"group",items:[]}),T.push(g),g=g.at(-1).items);return g},h=function(f){if(Number.isInteger(f))return f.toString();const g=f.toFixed(10);let T=g.length-1;if("0"!==g[T])return g;do{T--}while("0"===g[T]);return g.substring(0,"."===g[T]?T:T+1)},y=function(f){if(0===f[4]&&0===f[5]){if(0===f[1]&&0===f[2])return 1===f[0]&&1===f[3]?"":`scale(${h(f[0])} ${h(f[3])})`;if(f[0]===f[3]&&f[1]===-f[2]){const g=180*Math.acos(f[0])/Math.PI;return`rotate(${h(g)})`}}else if(1===f[0]&&0===f[1]&&0===f[2]&&1===f[3])return`translate(${h(f[4])} ${h(f[5])})`;return`matrix(${h(f[0])} ${h(f[1])} ${h(f[2])} ${h(f[3])} ${h(f[4])} ${h(f[5])})`};const pe={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ne="http://www.w3.org/XML/1998/namespace",P="http://www.w3.org/1999/xlink",V=["butt","round","square"],O=["miter","round","bevel"],G=function(f,g="",T=!1){if(URL.createObjectURL&&"undefined"!=typeof Blob&&!T)return URL.createObjectURL(new Blob([f],{type:g}));const N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let H=`data:${g};base64,`;for(let M=0,W=f.length;M<W;M+=3){const ye=255&f[M],Se=255&f[M+1],ve=255&f[M+2];H+=N[ye>>2]+N[(3&ye)<<4|Se>>4]+N[M+1<W?(15&Se)<<2|ve>>6:64]+N[M+2<W?63&ve:64]}return H},B=function(){const f=new Uint8Array([137,80,78,71,13,10,26,10]),T=new Int32Array(256);for(let ve=0;ve<256;ve++){let Ie=ve;for(let ge=0;ge<8;ge++)Ie=1&Ie?3988292384^Ie>>1&2147483647:Ie>>1&2147483647;T[ve]=Ie}function H(ve,Ie,ge,se){let ee=se;const De=Ie.length;ge[ee]=De>>24&255,ge[ee+1]=De>>16&255,ge[ee+2]=De>>8&255,ge[ee+3]=255&De,ee+=4,ge[ee]=255&ve.charCodeAt(0),ge[ee+1]=255&ve.charCodeAt(1),ge[ee+2]=255&ve.charCodeAt(2),ge[ee+3]=255&ve.charCodeAt(3),ee+=4,ge.set(Ie,ee),ee+=Ie.length;const Ae=function N(ve,Ie,ge){let se=-1;for(let ee=Ie;ee<ge;ee++)se=se>>>8^T[255&(se^ve[ee])];return-1^se}(ge,se+4,ee);ge[ee]=Ae>>24&255,ge[ee+1]=Ae>>16&255,ge[ee+2]=Ae>>8&255,ge[ee+3]=255&Ae}function ye(ve){let Ie=ve.length;const ge=65535,se=Math.ceil(Ie/ge),ee=new Uint8Array(2+Ie+5*se+4);let De=0;ee[De++]=120,ee[De++]=156;let Ae=0;for(;Ie>ge;)ee[De++]=0,ee[De++]=255,ee[De++]=255,ee[De++]=0,ee[De++]=0,ee.set(ve.subarray(Ae,Ae+ge),De),De+=ge,Ae+=ge,Ie-=ge;ee[De++]=1,ee[De++]=255&Ie,ee[De++]=Ie>>8&255,ee[De++]=255&~Ie,ee[De++]=(65535&~Ie)>>8&255,ee.set(ve.subarray(Ae),De),De+=ve.length-Ae;const xe=function M(ve,Ie,ge){let se=1,ee=0;for(let De=Ie;De<ge;++De)se=(se+(255&ve[De]))%65521,ee=(ee+se)%65521;return ee<<16|se}(ve,0,ve.length);return ee[De++]=xe>>24&255,ee[De++]=xe>>16&255,ee[De++]=xe>>8&255,ee[De++]=255&xe,ee}return function(Ie,ge,se){return function Se(ve,Ie,ge,se){const ee=ve.width,De=ve.height;let Ae,xe,te;const D=ve.data;switch(Ie){case j.ImageKind.GRAYSCALE_1BPP:xe=0,Ae=1,te=ee+7>>3;break;case j.ImageKind.RGB_24BPP:xe=2,Ae=8,te=3*ee;break;case j.ImageKind.RGBA_32BPP:xe=6,Ae=8,te=4*ee;break;default:throw new Error("invalid format")}const C=new Uint8Array((1+te)*De);let R=0,Q=0;for(let S=0;S<De;++S)C[R++]=0,C.set(D.subarray(Q,Q+te),R),Q+=te,R+=te;if(Ie===j.ImageKind.GRAYSCALE_1BPP&&se){R=0;for(let S=0;S<De;S++){R++;for(let F=0;F<te;F++)C[R++]^=255}}const Y=new Uint8Array([ee>>24&255,ee>>16&255,ee>>8&255,255&ee,De>>24&255,De>>16&255,De>>8&255,255&De,Ae,xe,0,0,0]),J=function W(ve){if(!fe.isNodeJS)return ye(ve);try{let Ie;Ie=parseInt(process.versions.node)>=8?ve:Buffer.from(ve);const ge=__webpack_require__(258).deflateSync(Ie,{level:9});return ge instanceof Uint8Array?ge:new Uint8Array(ge)}catch(Ie){(0,j.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+Ie)}return ye(ve)}(C),ue=new Uint8Array(f.length+36+Y.length+J.length);let m=0;return ue.set(f,m),m+=f.length,H("IHDR",Y,ue,m),m+=12+Y.length,H("IDATA",J,ue,m),m+=12+J.length,H("IEND",new Uint8Array(0),ue,m),G(ue,"image/png",ge)}(Ie,void 0===Ie.kind?j.ImageKind.GRAYSCALE_1BPP:Ie.kind,ge,se)}}();class E{constructor(){this.fontSizeScale=1,this.fontWeight=pe.fontWeight,this.fontSize=0,this.textMatrix=j.IDENTITY_MATRIX,this.fontMatrix=j.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=j.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=pe.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(g,T){this.x=g,this.y=T}}let w=0,x=0,v=0;I.SVGGraphics=ce=class{constructor(f,g,T=!1){(0,k.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new k.DOMSVGFactory,this.current=new E,this.transformMatrix=j.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=f,this.objs=g,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!T,this._operatorIdMapping=[];for(const N in j.OPS)this._operatorIdMapping[j.OPS[N]]=N}save(){this.transformStack.push(this.transformMatrix);const f=this.current;this.extraStack.push(f),this.current=f.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(f){this.save(),this.executeOpTree(f),this.restore()}loadDependencies(f){const g=f.fnArray,T=f.argsArray;for(let N=0,H=g.length;N<H;N++)if(g[N]===j.OPS.dependency)for(const M of T[N]){const W=M.startsWith("g_")?this.commonObjs:this.objs,ye=new Promise(Se=>{W.get(M,Se)});this.current.dependencies.push(ye)}return Promise.all(this.current.dependencies)}transform(f,g,T,N,H,M){this.transformMatrix=j.Util.transform(this.transformMatrix,[f,g,T,N,H,M]),this.tgrp=null}getSVG(f,g){this.viewport=g;const T=this._initialize(g);return this.loadDependencies(f).then(()=>(this.transformMatrix=j.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(f)),T))}convertOpList(f){const g=this._operatorIdMapping,T=f.argsArray,N=f.fnArray,H=[];for(let M=0,W=N.length;M<W;M++){const ye=N[M];H.push({fnId:ye,fn:g[ye],args:T[M]})}return d(H)}executeOpTree(f){for(const g of f){const T=g.fn,H=g.args;switch(0|g.fnId){case j.OPS.beginText:this.beginText();break;case j.OPS.dependency:break;case j.OPS.setLeading:this.setLeading(H);break;case j.OPS.setLeadingMoveText:this.setLeadingMoveText(H[0],H[1]);break;case j.OPS.setFont:this.setFont(H);break;case j.OPS.showText:case j.OPS.showSpacedText:this.showText(H[0]);break;case j.OPS.endText:this.endText();break;case j.OPS.moveText:this.moveText(H[0],H[1]);break;case j.OPS.setCharSpacing:this.setCharSpacing(H[0]);break;case j.OPS.setWordSpacing:this.setWordSpacing(H[0]);break;case j.OPS.setHScale:this.setHScale(H[0]);break;case j.OPS.setTextMatrix:this.setTextMatrix(H[0],H[1],H[2],H[3],H[4],H[5]);break;case j.OPS.setTextRise:this.setTextRise(H[0]);break;case j.OPS.setTextRenderingMode:this.setTextRenderingMode(H[0]);break;case j.OPS.setLineWidth:this.setLineWidth(H[0]);break;case j.OPS.setLineJoin:this.setLineJoin(H[0]);break;case j.OPS.setLineCap:this.setLineCap(H[0]);break;case j.OPS.setMiterLimit:this.setMiterLimit(H[0]);break;case j.OPS.setFillRGBColor:this.setFillRGBColor(H[0],H[1],H[2]);break;case j.OPS.setStrokeRGBColor:this.setStrokeRGBColor(H[0],H[1],H[2]);break;case j.OPS.setStrokeColorN:this.setStrokeColorN(H);break;case j.OPS.setFillColorN:this.setFillColorN(H);break;case j.OPS.shadingFill:this.shadingFill(H[0]);break;case j.OPS.setDash:this.setDash(H[0],H[1]);break;case j.OPS.setRenderingIntent:this.setRenderingIntent(H[0]);break;case j.OPS.setFlatness:this.setFlatness(H[0]);break;case j.OPS.setGState:this.setGState(H[0]);break;case j.OPS.fill:this.fill();break;case j.OPS.eoFill:this.eoFill();break;case j.OPS.stroke:this.stroke();break;case j.OPS.fillStroke:this.fillStroke();break;case j.OPS.eoFillStroke:this.eoFillStroke();break;case j.OPS.clip:this.clip("nonzero");break;case j.OPS.eoClip:this.clip("evenodd");break;case j.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case j.OPS.paintImageXObject:this.paintImageXObject(H[0]);break;case j.OPS.paintInlineImageXObject:this.paintInlineImageXObject(H[0]);break;case j.OPS.paintImageMaskXObject:this.paintImageMaskXObject(H[0]);break;case j.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(H[0],H[1]);break;case j.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case j.OPS.closePath:this.closePath();break;case j.OPS.closeStroke:this.closeStroke();break;case j.OPS.closeFillStroke:this.closeFillStroke();break;case j.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case j.OPS.nextLine:this.nextLine();break;case j.OPS.transform:this.transform(H[0],H[1],H[2],H[3],H[4],H[5]);break;case j.OPS.constructPath:this.constructPath(H[0],H[1]);break;case j.OPS.endPath:this.endPath();break;case 92:this.group(g.items);break;default:(0,j.warn)(`Unimplemented operator ${T}`)}}}setWordSpacing(f){this.current.wordSpacing=f}setCharSpacing(f){this.current.charSpacing=f}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(f,g,T,N,H,M){const W=this.current;W.textMatrix=W.lineMatrix=[f,g,T,N,H,M],W.textMatrixScale=Math.hypot(f,g),W.x=W.lineX=0,W.y=W.lineY=0,W.xcoords=[],W.ycoords=[],W.tspan=this.svgFactory.createElement("svg:tspan"),W.tspan.setAttributeNS(null,"font-family",W.fontFamily),W.tspan.setAttributeNS(null,"font-size",`${h(W.fontSize)}px`),W.tspan.setAttributeNS(null,"y",h(-W.y)),W.txtElement=this.svgFactory.createElement("svg:text"),W.txtElement.append(W.tspan)}beginText(){const f=this.current;f.x=f.lineX=0,f.y=f.lineY=0,f.textMatrix=j.IDENTITY_MATRIX,f.lineMatrix=j.IDENTITY_MATRIX,f.textMatrixScale=1,f.tspan=this.svgFactory.createElement("svg:tspan"),f.txtElement=this.svgFactory.createElement("svg:text"),f.txtgrp=this.svgFactory.createElement("svg:g"),f.xcoords=[],f.ycoords=[]}moveText(f,g){const T=this.current;T.x=T.lineX+=f,T.y=T.lineY+=g,T.xcoords=[],T.ycoords=[],T.tspan=this.svgFactory.createElement("svg:tspan"),T.tspan.setAttributeNS(null,"font-family",T.fontFamily),T.tspan.setAttributeNS(null,"font-size",`${h(T.fontSize)}px`),T.tspan.setAttributeNS(null,"y",h(-T.y))}showText(f){const g=this.current,T=g.font,N=g.fontSize;if(0===N)return;const H=g.fontSizeScale,M=g.charSpacing,W=g.wordSpacing,ye=g.fontDirection,Se=g.textHScale*ye,ve=T.vertical,Ie=ve?1:-1,ge=T.defaultVMetrics,se=N*g.fontMatrix[0];let ee=0;for(const xe of f){if(null===xe){ee+=ye*W;continue}if("number"==typeof xe){ee+=Ie*xe*N/1e3;continue}const te=(xe.isSpace?W:0)+M,D=xe.fontChar;let C,R,Y,Q=xe.width;if(ve){let J;const de=xe.vmetric||ge;J=xe.vmetric?de[1]:.5*Q,J=-J*se,Q=de?-de[0]:Q,C=J/H,R=(ee+de[2]*se)/H}else C=ee/H,R=0;(xe.isInFont||T.missingFile)&&(g.xcoords.push(g.x+C),ve&&g.ycoords.push(-g.y+R),g.tspan.textContent+=D),Y=ve?Q*se-te*ye:Q*se+te*ye,ee+=Y}g.tspan.setAttributeNS(null,"x",g.xcoords.map(h).join(" ")),g.tspan.setAttributeNS(null,"y",ve?g.ycoords.map(h).join(" "):h(-g.y)),ve?g.y-=ee:g.x+=ee*Se,g.tspan.setAttributeNS(null,"font-family",g.fontFamily),g.tspan.setAttributeNS(null,"font-size",`${h(g.fontSize)}px`),g.fontStyle!==pe.fontStyle&&g.tspan.setAttributeNS(null,"font-style",g.fontStyle),g.fontWeight!==pe.fontWeight&&g.tspan.setAttributeNS(null,"font-weight",g.fontWeight);const De=g.textRenderingMode&j.TextRenderingMode.FILL_STROKE_MASK;De===j.TextRenderingMode.FILL||De===j.TextRenderingMode.FILL_STROKE?(g.fillColor!==pe.fillColor&&g.tspan.setAttributeNS(null,"fill",g.fillColor),g.fillAlpha<1&&g.tspan.setAttributeNS(null,"fill-opacity",g.fillAlpha)):g.tspan.setAttributeNS(null,"fill",g.textRenderingMode===j.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(De===j.TextRenderingMode.STROKE||De===j.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(g.tspan,1/(g.textMatrixScale||1));let Ae=g.textMatrix;0!==g.textRise&&(Ae=Ae.slice(),Ae[5]+=g.textRise),g.txtElement.setAttributeNS(null,"transform",`${y(Ae)} scale(${h(Se)}, -1)`),g.txtElement.setAttributeNS(ne,"xml:space","preserve"),g.txtElement.append(g.tspan),g.txtgrp.append(g.txtElement),this._ensureTransformGroup().append(g.txtElement)}setLeadingMoveText(f,g){this.setLeading(-g),this.moveText(f,g)}addFontStyle(f){if(!f.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const g=G(f.data,f.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${f.loadedName}"; src: url(${g}); }\n`}setFont(f){const g=this.current,T=this.commonObjs.get(f[0]);let N=f[1];g.font=T,this.embedFonts&&!T.missingFile&&!this.embeddedFonts[T.loadedName]&&(this.addFontStyle(T),this.embeddedFonts[T.loadedName]=T),g.fontMatrix=T.fontMatrix||j.FONT_IDENTITY_MATRIX;let H="normal";T.black?H="900":T.bold&&(H="bold");const M=T.italic?"italic":"normal";N<0?(N=-N,g.fontDirection=-1):g.fontDirection=1,g.fontSize=N,g.fontFamily=T.loadedName,g.fontWeight=H,g.fontStyle=M,g.tspan=this.svgFactory.createElement("svg:tspan"),g.tspan.setAttributeNS(null,"y",h(-g.y)),g.xcoords=[],g.ycoords=[]}endText(){var g;const f=this.current;f.textRenderingMode&j.TextRenderingMode.ADD_TO_PATH_FLAG&&(null==(g=f.txtElement)?void 0:g.hasChildNodes())&&(f.element=f.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(f){f>0&&(this.current.lineWidth=f)}setLineCap(f){this.current.lineCap=V[f]}setLineJoin(f){this.current.lineJoin=O[f]}setMiterLimit(f){this.current.miterLimit=f}setStrokeAlpha(f){this.current.strokeAlpha=f}setStrokeRGBColor(f,g,T){this.current.strokeColor=j.Util.makeHexColor(f,g,T)}setFillAlpha(f){this.current.fillAlpha=f}setFillRGBColor(f,g,T){this.current.fillColor=j.Util.makeHexColor(f,g,T),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(f){this.current.strokeColor=this._makeColorN_Pattern(f)}setFillColorN(f){this.current.fillColor=this._makeColorN_Pattern(f)}shadingFill(f){const g=this.viewport.width,T=this.viewport.height,N=j.Util.inverseTransform(this.transformMatrix),H=j.Util.applyTransform([0,0],N),M=j.Util.applyTransform([0,T],N),W=j.Util.applyTransform([g,0],N),ye=j.Util.applyTransform([g,T],N),Se=Math.min(H[0],M[0],W[0],ye[0]),ve=Math.min(H[1],M[1],W[1],ye[1]),Ie=Math.max(H[0],M[0],W[0],ye[0]),ge=Math.max(H[1],M[1],W[1],ye[1]),se=this.svgFactory.createElement("svg:rect");se.setAttributeNS(null,"x",Se),se.setAttributeNS(null,"y",ve),se.setAttributeNS(null,"width",Ie-Se),se.setAttributeNS(null,"height",ge-ve),se.setAttributeNS(null,"fill",this._makeShadingPattern(f)),this.current.fillAlpha<1&&se.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(se)}_makeColorN_Pattern(f){return"TilingPattern"===f[0]?this._makeTilingPattern(f):this._makeShadingPattern(f)}_makeTilingPattern(f){const g=f[1],T=f[2],N=f[3]||j.IDENTITY_MATRIX,[H,M,W,ye]=f[4],Se=f[5],ve=f[6],Ie=f[7],ge="shading"+v++,[se,ee,De,Ae]=j.Util.normalizeRect([...j.Util.applyTransform([H,M],N),...j.Util.applyTransform([W,ye],N)]),[xe,te]=j.Util.singularValueDecompose2dScale(N),D=Se*xe,C=ve*te,R=this.svgFactory.createElement("svg:pattern");R.setAttributeNS(null,"id",ge),R.setAttributeNS(null,"patternUnits","userSpaceOnUse"),R.setAttributeNS(null,"width",D),R.setAttributeNS(null,"height",C),R.setAttributeNS(null,"x",`${se}`),R.setAttributeNS(null,"y",`${ee}`);const Q=this.svg,Y=this.transformMatrix,J=this.current.fillColor,de=this.current.strokeColor,ue=this.svgFactory.create(De-se,Ae-ee);if(this.svg=ue,this.transformMatrix=N,2===Ie){const m=j.Util.makeHexColor(...g);this.current.fillColor=m,this.current.strokeColor=m}return this.executeOpTree(this.convertOpList(T)),this.svg=Q,this.transformMatrix=Y,this.current.fillColor=J,this.current.strokeColor=de,R.append(ue.childNodes[0]),this.defs.append(R),`url(#${ge})`}_makeShadingPattern(f){switch("string"==typeof f&&(f=this.objs.get(f)),f[0]){case"RadialAxial":const g="shading"+v++,T=f[3];let N;switch(f[1]){case"axial":const H=f[4],M=f[5];N=this.svgFactory.createElement("svg:linearGradient"),N.setAttributeNS(null,"id",g),N.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),N.setAttributeNS(null,"x1",H[0]),N.setAttributeNS(null,"y1",H[1]),N.setAttributeNS(null,"x2",M[0]),N.setAttributeNS(null,"y2",M[1]);break;case"radial":const W=f[4],ye=f[5],Se=f[6],ve=f[7];N=this.svgFactory.createElement("svg:radialGradient"),N.setAttributeNS(null,"id",g),N.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),N.setAttributeNS(null,"cx",ye[0]),N.setAttributeNS(null,"cy",ye[1]),N.setAttributeNS(null,"r",ve),N.setAttributeNS(null,"fx",W[0]),N.setAttributeNS(null,"fy",W[1]),N.setAttributeNS(null,"fr",Se);break;default:throw new Error(`Unknown RadialAxial type: ${f[1]}`)}for(const H of T){const M=this.svgFactory.createElement("svg:stop");M.setAttributeNS(null,"offset",H[0]),M.setAttributeNS(null,"stop-color",H[1]),N.append(M)}return this.defs.append(N),`url(#${g})`;case"Mesh":return(0,j.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${f[0]}`)}}setDash(f,g){this.current.dashArray=f,this.current.dashPhase=g}constructPath(f,g){const T=this.current;let N=T.x,H=T.y,M=[],W=0;for(const ye of f)switch(0|ye){case j.OPS.rectangle:N=g[W++],H=g[W++];const Ie=N+g[W++],ge=H+g[W++];M.push("M",h(N),h(H),"L",h(Ie),h(H),"L",h(Ie),h(ge),"L",h(N),h(ge),"Z");break;case j.OPS.moveTo:N=g[W++],H=g[W++],M.push("M",h(N),h(H));break;case j.OPS.lineTo:N=g[W++],H=g[W++],M.push("L",h(N),h(H));break;case j.OPS.curveTo:N=g[W+4],H=g[W+5],M.push("C",h(g[W]),h(g[W+1]),h(g[W+2]),h(g[W+3]),h(N),h(H)),W+=6;break;case j.OPS.curveTo2:M.push("C",h(N),h(H),h(g[W]),h(g[W+1]),h(g[W+2]),h(g[W+3])),N=g[W+2],H=g[W+3],W+=4;break;case j.OPS.curveTo3:N=g[W+2],H=g[W+3],M.push("C",h(g[W]),h(g[W+1]),h(N),h(H),h(N),h(H)),W+=4;break;case j.OPS.closePath:M.push("Z")}M=M.join(" "),T.path&&f.length>0&&f[0]!==j.OPS.rectangle&&f[0]!==j.OPS.moveTo?M=T.path.getAttributeNS(null,"d")+M:(T.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(T.path)),T.path.setAttributeNS(null,"d",M),T.path.setAttributeNS(null,"fill","none"),T.element=T.path,T.setCurrentPoint(N,H)}endPath(){const f=this.current;if(f.path=null,!this.pendingClip)return;if(!f.element)return void(this.pendingClip=null);const g="clippath"+w++,T=this.svgFactory.createElement("svg:clipPath");T.setAttributeNS(null,"id",g),T.setAttributeNS(null,"transform",y(this.transformMatrix));const N=f.element.cloneNode(!0);if(N.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,T.append(N),this.defs.append(T),f.activeClipUrl){f.clipGroup=null;for(const H of this.extraStack)H.clipGroup=null;T.setAttributeNS(null,"clip-path",f.activeClipUrl)}f.activeClipUrl=`url(#${g})`,this.tgrp=null}clip(f){this.pendingClip=f}closePath(){const f=this.current;if(f.path){const g=`${f.path.getAttributeNS(null,"d")}Z`;f.path.setAttributeNS(null,"d",g)}}setLeading(f){this.current.leading=-f}setTextRise(f){this.current.textRise=f}setTextRenderingMode(f){this.current.textRenderingMode=f}setHScale(f){this.current.textHScale=f/100}setRenderingIntent(f){}setFlatness(f){}setGState(f){for(const[g,T]of f)switch(g){case"LW":this.setLineWidth(T);break;case"LC":this.setLineCap(T);break;case"LJ":this.setLineJoin(T);break;case"ML":this.setMiterLimit(T);break;case"D":this.setDash(T[0],T[1]);break;case"RI":this.setRenderingIntent(T);break;case"FL":this.setFlatness(T);break;case"Font":this.setFont(T);break;case"CA":this.setStrokeAlpha(T);break;case"ca":this.setFillAlpha(T);break;default:(0,j.warn)(`Unimplemented graphic state operator ${g}`)}}fill(){const f=this.current;f.element&&(f.element.setAttributeNS(null,"fill",f.fillColor),f.element.setAttributeNS(null,"fill-opacity",f.fillAlpha),this.endPath())}stroke(){const f=this.current;f.element&&(this._setStrokeAttributes(f.element),f.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(f,g=1){const T=this.current;let N=T.dashArray;1!==g&&N.length>0&&(N=N.map(function(H){return g*H})),f.setAttributeNS(null,"stroke",T.strokeColor),f.setAttributeNS(null,"stroke-opacity",T.strokeAlpha),f.setAttributeNS(null,"stroke-miterlimit",h(T.miterLimit)),f.setAttributeNS(null,"stroke-linecap",T.lineCap),f.setAttributeNS(null,"stroke-linejoin",T.lineJoin),f.setAttributeNS(null,"stroke-width",h(g*T.lineWidth)+"px"),f.setAttributeNS(null,"stroke-dasharray",N.map(h).join(" ")),f.setAttributeNS(null,"stroke-dashoffset",h(g*T.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x","0"),f.setAttributeNS(null,"y","0"),f.setAttributeNS(null,"width","1px"),f.setAttributeNS(null,"height","1px"),f.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(f)}paintImageXObject(f){const g=f.startsWith("g_")?this.commonObjs.get(f):this.objs.get(f);g?this.paintInlineImageXObject(g):(0,j.warn)(`Dependent image with object ID ${f} is not ready yet`)}paintInlineImageXObject(f,g){const T=f.width,N=f.height,H=B(f,this.forceDataSchema,!!g),M=this.svgFactory.createElement("svg:rect");M.setAttributeNS(null,"x","0"),M.setAttributeNS(null,"y","0"),M.setAttributeNS(null,"width",h(T)),M.setAttributeNS(null,"height",h(N)),this.current.element=M,this.clip("nonzero");const W=this.svgFactory.createElement("svg:image");W.setAttributeNS(P,"xlink:href",H),W.setAttributeNS(null,"x","0"),W.setAttributeNS(null,"y",h(-N)),W.setAttributeNS(null,"width",h(T)+"px"),W.setAttributeNS(null,"height",h(N)+"px"),W.setAttributeNS(null,"transform",`scale(${h(1/T)} ${h(-1/N)})`),g?g.append(W):this._ensureTransformGroup().append(W)}paintImageMaskXObject(f){const g=this.current,T=f.width,N=f.height,H=g.fillColor;g.maskId="mask"+x++;const M=this.svgFactory.createElement("svg:mask");M.setAttributeNS(null,"id",g.maskId);const W=this.svgFactory.createElement("svg:rect");W.setAttributeNS(null,"x","0"),W.setAttributeNS(null,"y","0"),W.setAttributeNS(null,"width",h(T)),W.setAttributeNS(null,"height",h(N)),W.setAttributeNS(null,"fill",H),W.setAttributeNS(null,"mask",`url(#${g.maskId})`),this.defs.append(M),this._ensureTransformGroup().append(W),this.paintInlineImageXObject(f,M)}paintFormXObjectBegin(f,g){if(Array.isArray(f)&&6===f.length&&this.transform(f[0],f[1],f[2],f[3],f[4],f[5]),g){const T=g[2]-g[0],N=g[3]-g[1],H=this.svgFactory.createElement("svg:rect");H.setAttributeNS(null,"x",g[0]),H.setAttributeNS(null,"y",g[1]),H.setAttributeNS(null,"width",h(T)),H.setAttributeNS(null,"height",h(N)),this.current.element=H,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(f){const g=this.svgFactory.create(f.width,f.height),T=this.svgFactory.createElement("svg:defs");g.append(T),this.defs=T;const N=this.svgFactory.createElement("svg:g");return N.setAttributeNS(null,"transform",y(f.transform)),g.append(N),this.svg=N,g}_ensureClipGroup(){if(!this.current.clipGroup){const f=this.svgFactory.createElement("svg:g");f.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(f),this.current.clipGroup=f}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFNodeStream=void 0;var k=_e(1),j=_e(33);const fe=__webpack_require__(172),ce=__webpack_require__(1),pe=__webpack_require__(779),ne=__webpack_require__(558),P=/^file:\/\/\/[a-zA-Z]:\//;I.PDFNodeStream=class O{constructor(v){this.source=v,this.url=function V(x){const v=ne.parse(x);return"file:"===v.protocol||v.host?v:/^[a-z]:[/\\]/i.test(x)?ne.parse(`file:///${x}`):(v.host||(v.protocol="file:"),v)}(v.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&v.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var v,f;return null!=(f=null==(v=this._fullRequestReader)?void 0:v._loaded)?f:0}getFullReader(){return(0,k.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new y(this):new d(this),this._fullRequestReader}getRangeReader(v,f){if(f<=this._progressiveDataLength)return null;const g=this.isFsUrl?new w(this,v,f):new h(this,v,f);return this._rangeRequestReaders.push(g),g}cancelAllRequests(v){this._fullRequestReader&&this._fullRequestReader.cancel(v);for(const f of this._rangeRequestReaders.slice(0))f.cancel(v)}};class G{constructor(v){this._url=v.url,this._done=!1,this._storedError=null,this.onProgress=null;const f=v.source;this._contentLength=f.length,this._loaded=0,this._filename=null,this._disableRange=f.disableRange||!1,this._rangeChunkSize=f.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!f.disableStream,this._isRangeSupported=!f.disableRange,this._readableStream=null,this._readCapability=(0,k.createPromiseCapability)(),this._headersCapability=(0,k.createPromiseCapability)()}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}read(){var v=this;return _asyncToGenerator(function*(){if(yield v._readCapability.promise,v._done)return{value:void 0,done:!0};if(v._storedError)throw v._storedError;const f=v._readableStream.read();return null===f?(v._readCapability=(0,k.createPromiseCapability)(),v.read()):(v._loaded+=f.length,v.onProgress&&v.onProgress({loaded:v._loaded,total:v._contentLength}),{value:new Uint8Array(f).buffer,done:!1})})()}cancel(v){this._readableStream?this._readableStream.destroy(v):this._error(v)}_error(v){this._storedError=v,this._readCapability.resolve()}_setReadableStream(v){this._readableStream=v,v.on("readable",()=>{this._readCapability.resolve()}),v.on("end",()=>{v.destroy(),this._done=!0,this._readCapability.resolve()}),v.on("error",f=>{this._error(f)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new k.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class B{constructor(v){this._url=v.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,k.createPromiseCapability)(),this._isStreamingSupported=!v.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}read(){var v=this;return _asyncToGenerator(function*(){if(yield v._readCapability.promise,v._done)return{value:void 0,done:!0};if(v._storedError)throw v._storedError;const f=v._readableStream.read();return null===f?(v._readCapability=(0,k.createPromiseCapability)(),v.read()):(v._loaded+=f.length,v.onProgress&&v.onProgress({loaded:v._loaded}),{value:new Uint8Array(f).buffer,done:!1})})()}cancel(v){this._readableStream?this._readableStream.destroy(v):this._error(v)}_error(v){this._storedError=v,this._readCapability.resolve()}_setReadableStream(v){this._readableStream=v,v.on("readable",()=>{this._readCapability.resolve()}),v.on("end",()=>{v.destroy(),this._done=!0,this._readCapability.resolve()}),v.on("error",f=>{this._error(f)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function E(x,v){return{protocol:x.protocol,auth:x.auth,host:x.hostname,port:x.port,path:x.path,method:"GET",headers:v}}class d extends G{constructor(v){super(v);const f=g=>{if(404===g.statusCode){const M=new k.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=M,void this._headersCapability.reject(M)}this._headersCapability.resolve(),this._setReadableStream(g);const T=M=>this._readableStream.headers[M.toLowerCase()],{allowRangeRequests:N,suggestedLength:H}=(0,j.validateRangeRequestCapabilities)({getResponseHeader:T,isHttp:v.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=N,this._contentLength=H||this._contentLength,this._filename=(0,j.extractFilenameFromHeader)(T)};this._request=null,this._request="http:"===this._url.protocol?ce.request(E(this._url,v.httpHeaders),f):pe.request(E(this._url,v.httpHeaders),f),this._request.on("error",g=>{this._storedError=g,this._headersCapability.reject(g)}),this._request.end()}}class h extends B{constructor(v,f,g){super(v),this._httpHeaders={};for(const N in v.httpHeaders){const H=v.httpHeaders[N];void 0!==H&&(this._httpHeaders[N]=H)}this._httpHeaders.Range=`bytes=${f}-${g-1}`;const T=N=>{if(404!==N.statusCode)this._setReadableStream(N);else{const H=new k.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=H}};this._request=null,this._request="http:"===this._url.protocol?ce.request(E(this._url,this._httpHeaders),T):pe.request(E(this._url,this._httpHeaders),T),this._request.on("error",N=>{this._storedError=N}),this._request.end()}}class y extends G{constructor(v){super(v);let f=decodeURIComponent(this._url.path);P.test(this._url.href)&&(f=f.replace(/^\//,"")),fe.lstat(f,(g,T)=>{if(g)return"ENOENT"===g.code&&(g=new k.MissingPDFException(`Missing PDF "${f}".`)),this._storedError=g,void this._headersCapability.reject(g);this._contentLength=T.size,this._setReadableStream(fe.createReadStream(f)),this._headersCapability.resolve()})}}class w extends B{constructor(v,f,g){super(v);let T=decodeURIComponent(this._url.path);P.test(this._url.href)&&(T=T.replace(/^\//,"")),this._setReadableStream(fe.createReadStream(T,{start:f,end:g-1}))}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.createResponseStatusError=function ne(V,O){return 404===V||0===V&&O.startsWith("file:")?new k.MissingPDFException('Missing PDF "'+O+'".'):new k.UnexpectedResponseException(`Unexpected server response (${V}) while retrieving PDF "${O}".`,V)},I.extractFilenameFromHeader=function pe(V){const O=V("Content-Disposition");if(O){let G=(0,j.getFilenameFromContentDispositionHeader)(O);if(G.includes("%"))try{G=decodeURIComponent(G)}catch(B){}if((0,fe.isPdfFile)(G))return G}return null},I.validateRangeRequestCapabilities=function ce({getResponseHeader:V,isHttp:O,rangeChunkSize:G,disableRange:B}){const E={allowRangeRequests:!1,suggestedLength:void 0},d=parseInt(V("Content-Length"),10);return!Number.isInteger(d)||(E.suggestedLength=d,d<=2*G)||B||!O||"bytes"!==V("Accept-Ranges")||"identity"!==(V("Content-Encoding")||"identity")||(E.allowRangeRequests=!0),E},I.validateResponseStatus=function P(V){return 200===V||206===V};var k=_e(1),j=_e(34),fe=_e(8)},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.getFilenameFromContentDispositionHeader=function j(fe){let ce=!0,pe=ne("filename\\*","i").exec(fe);if(pe){pe=pe[1];let d=G(pe);return d=unescape(d),d=B(d),d=E(d),V(d)}if(pe=function O(d){const h=[];let y;const w=ne("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(y=w.exec(d));){let[,v,f,g]=y;if(v=parseInt(v,10),v in h){if(0===v)break}else h[v]=[f,g]}const x=[];for(let v=0;v<h.length&&v in h;++v){let[f,g]=h[v];g=G(g),f&&(g=unescape(g),0===v&&(g=B(g))),x.push(g)}return x.join("")}(fe),pe)return V(E(pe));if(pe=ne("filename","i").exec(fe),pe){pe=pe[1];let d=G(pe);return d=E(d),V(d)}function ne(d,h){return new RegExp("(?:^|;)\\s*"+d+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',h)}function P(d,h){if(d){if(!/^[\x00-\xFF]+$/.test(h))return h;try{const y=new TextDecoder(d,{fatal:!0}),w=(0,k.stringToBytes)(h);h=y.decode(w),ce=!1}catch(y){}}return h}function V(d){return ce&&/[\x80-\xff]/.test(d)&&(d=P("utf-8",d),ce&&(d=P("iso-8859-1",d))),d}function G(d){if(d.startsWith('"')){const h=d.slice(1).split('\\"');for(let y=0;y<h.length;++y){const w=h[y].indexOf('"');-1!==w&&(h[y]=h[y].slice(0,w),h.length=y+1),h[y]=h[y].replace(/\\(.)/g,"$1")}d=h.join('"')}return d}function B(d){const h=d.indexOf("'");return-1===h?d:P(d.slice(0,h),d.slice(h+1).replace(/^[^']*'/,""))}function E(d){return!d.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(d)?d:d.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(h,y,w,x){if("q"===w||"Q"===w)return P(y,x=(x=x.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(v,f){return String.fromCharCode(parseInt(f,16))}));try{x=atob(x)}catch(v){}return P(y,x)})}return""};var k=_e(1)},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFNetworkStream=void 0;var k=_e(1),j=_e(33);class ne{constructor(B,E={}){this.url=B,this.isHttp=/^https?:/i.test(B),this.httpHeaders=this.isHttp&&E.httpHeaders||Object.create(null),this.withCredentials=E.withCredentials||!1,this.getXhr=E.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(B,E,d){const h={begin:B,end:E};for(const y in d)h[y]=d[y];return this.request(h)}requestFull(B){return this.request(B)}request(B){const E=this.getXhr(),d=this.currXhrId++,h=this.pendingRequests[d]={xhr:E};E.open("GET",this.url),E.withCredentials=this.withCredentials;for(const y in this.httpHeaders){const w=this.httpHeaders[y];void 0!==w&&E.setRequestHeader(y,w)}return this.isHttp&&"begin"in B&&"end"in B?(E.setRequestHeader("Range",`bytes=${B.begin}-${B.end-1}`),h.expectedStatus=206):h.expectedStatus=200,E.responseType="arraybuffer",B.onError&&(E.onerror=function(y){B.onError(E.status)}),E.onreadystatechange=this.onStateChange.bind(this,d),E.onprogress=this.onProgress.bind(this,d),h.onHeadersReceived=B.onHeadersReceived,h.onDone=B.onDone,h.onError=B.onError,h.onProgress=B.onProgress,E.send(null),d}onProgress(B,E){var h;const d=this.pendingRequests[B];!d||null==(h=d.onProgress)||h.call(d,E)}onStateChange(B,E){var v,f,g;const d=this.pendingRequests[B];if(!d)return;const h=d.xhr;if(h.readyState>=2&&d.onHeadersReceived&&(d.onHeadersReceived(),delete d.onHeadersReceived),4!==h.readyState||!(B in this.pendingRequests))return;if(delete this.pendingRequests[B],0===h.status&&this.isHttp)return void(null==(v=d.onError)||v.call(d,h.status));const y=h.status||200;if((200!==y||206!==d.expectedStatus)&&y!==d.expectedStatus)return void(null==(f=d.onError)||f.call(d,h.status));const x=function pe(G){const B=G.response;return"string"!=typeof B?B:(0,k.stringToBytes)(B).buffer}(h);if(206===y){const T=h.getResponseHeader("Content-Range"),N=/bytes (\d+)-(\d+)\/(\d+)/.exec(T);d.onDone({begin:parseInt(N[1],10),chunk:x})}else x?d.onDone({begin:0,chunk:x}):null==(g=d.onError)||g.call(d,h.status)}getRequestXhr(B){return this.pendingRequests[B].xhr}isPendingRequest(B){return B in this.pendingRequests}abortRequest(B){const E=this.pendingRequests[B].xhr;delete this.pendingRequests[B],E.abort()}}I.PDFNetworkStream=class P{constructor(B){this._source=B,this._manager=new ne(B.url,{httpHeaders:B.httpHeaders,withCredentials:B.withCredentials}),this._rangeChunkSize=B.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(B){const E=this._rangeRequestReaders.indexOf(B);E>=0&&this._rangeRequestReaders.splice(E,1)}getFullReader(){return(0,k.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new V(this._manager,this._source),this._fullRequestReader}getRangeReader(B,E){const d=new O(this._manager,B,E);return d.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(d),d}cancelAllRequests(B){var E;null==(E=this._fullRequestReader)||E.cancel(B);for(const d of this._rangeRequestReaders.slice(0))d.cancel(B)}};class V{constructor(B,E){this._manager=B;const d={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=E.url,this._fullRequestId=B.requestFull(d),this._headersReceivedCapability=(0,k.createPromiseCapability)(),this._disableRange=E.disableRange||!1,this._contentLength=E.length,this._rangeChunkSize=E.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 B=this._fullRequestId,E=this._manager.getRequestXhr(B),d=w=>E.getResponseHeader(w),{allowRangeRequests:h,suggestedLength:y}=(0,j.validateRangeRequestCapabilities)({getResponseHeader:d,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});h&&(this._isRangeSupported=!0),this._contentLength=y||this._contentLength,this._filename=(0,j.extractFilenameFromHeader)(d),this._isRangeSupported&&this._manager.abortRequest(B),this._headersReceivedCapability.resolve()}_onDone(B){if(B&&(this._requests.length>0?this._requests.shift().resolve({value:B.chunk,done:!1}):this._cachedChunks.push(B.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const E of this._requests)E.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(B){this._storedError=(0,j.createResponseStatusError)(B,this._url),this._headersReceivedCapability.reject(this._storedError);for(const E of this._requests)E.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(B){var E;null==(E=this.onProgress)||E.call(this,{loaded:B.loaded,total:B.lengthComputable?B.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}read(){var B=this;return _asyncToGenerator(function*(){if(B._storedError)throw B._storedError;if(B._cachedChunks.length>0)return{value:B._cachedChunks.shift(),done:!1};if(B._done)return{value:void 0,done:!0};const E=(0,k.createPromiseCapability)();return B._requests.push(E),E.promise})()}cancel(B){this._done=!0,this._headersReceivedCapability.reject(B);for(const E of this._requests)E.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class O{constructor(B,E,d){this._manager=B;const h={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=B.url,this._requestId=B.requestRange(E,d,h),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var B;null==(B=this.onClosed)||B.call(this,this)}_onDone(B){const E=B.chunk;this._requests.length>0?this._requests.shift().resolve({value:E,done:!1}):this._queuedChunk=E,this._done=!0;for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(B){this._storedError=(0,j.createResponseStatusError)(B,this._url);for(const E of this._requests)E.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(B){var E;this.isStreamingSupported||null==(E=this.onProgress)||E.call(this,{loaded:B.loaded})}get isStreamingSupported(){return!1}read(){var B=this;return _asyncToGenerator(function*(){if(B._storedError)throw B._storedError;if(null!==B._queuedChunk){const d=B._queuedChunk;return B._queuedChunk=null,{value:d,done:!1}}if(B._done)return{value:void 0,done:!0};const E=(0,k.createPromiseCapability)();return B._requests.push(E),E.promise})()}cancel(B){this._done=!0;for(const E of this._requests)E.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFFetchStream=void 0;var k=_e(1),j=_e(33);function fe(V,O,G){return{method:"GET",headers:V,signal:G.signal,mode:"cors",credentials:O?"include":"same-origin",redirect:"follow"}}function ce(V){const O=new Headers;for(const G in V){const B=V[G];void 0!==B&&O.append(G,B)}return O}I.PDFFetchStream=class pe{constructor(O){this.source=O,this.isHttp=/^https?:/i.test(O.url),this.httpHeaders=this.isHttp&&O.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var O,G;return null!=(G=null==(O=this._fullRequestReader)?void 0:O._loaded)?G:0}getFullReader(){return(0,k.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new ne(this),this._fullRequestReader}getRangeReader(O,G){if(G<=this._progressiveDataLength)return null;const B=new P(this,O,G);return this._rangeRequestReaders.push(B),B}cancelAllRequests(O){this._fullRequestReader&&this._fullRequestReader.cancel(O);for(const G of this._rangeRequestReaders.slice(0))G.cancel(O)}};class ne{constructor(O){this._stream=O,this._reader=null,this._loaded=0,this._filename=null;const G=O.source;this._withCredentials=G.withCredentials||!1,this._contentLength=G.length,this._headersCapability=(0,k.createPromiseCapability)(),this._disableRange=G.disableRange||!1,this._rangeChunkSize=G.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!G.disableStream,this._isRangeSupported=!G.disableRange,this._headers=ce(this._stream.httpHeaders);const B=G.url;fetch(B,fe(this._headers,this._withCredentials,this._abortController)).then(E=>{if(!(0,j.validateResponseStatus)(E.status))throw(0,j.createResponseStatusError)(E.status,B);this._reader=E.body.getReader(),this._headersCapability.resolve();const d=w=>E.headers.get(w),{allowRangeRequests:h,suggestedLength:y}=(0,j.validateRangeRequestCapabilities)({getResponseHeader:d,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=h,this._contentLength=y||this._contentLength,this._filename=(0,j.extractFilenameFromHeader)(d),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new k.AbortException("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}read(){var O=this;return _asyncToGenerator(function*(){yield O._headersCapability.promise;const{value:G,done:B}=yield O._reader.read();return B?{value:G,done:B}:(O._loaded+=G.byteLength,O.onProgress&&O.onProgress({loaded:O._loaded,total:O._contentLength}),{value:new Uint8Array(G).buffer,done:!1})})()}cancel(O){this._reader&&this._reader.cancel(O),this._abortController.abort()}}class P{constructor(O,G,B){this._stream=O,this._reader=null,this._loaded=0;const E=O.source;this._withCredentials=E.withCredentials||!1,this._readCapability=(0,k.createPromiseCapability)(),this._isStreamingSupported=!E.disableStream,this._abortController=new AbortController,this._headers=ce(this._stream.httpHeaders),this._headers.append("Range",`bytes=${G}-${B-1}`);const d=E.url;fetch(d,fe(this._headers,this._withCredentials,this._abortController)).then(h=>{if(!(0,j.validateResponseStatus)(h.status))throw(0,j.createResponseStatusError)(h.status,d);this._readCapability.resolve(),this._reader=h.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){var O=this;return _asyncToGenerator(function*(){yield O._readCapability.promise;const{value:G,done:B}=yield O._reader.read();return B?{value:G,done:B}:(O._loaded+=G.byteLength,O.onProgress&&O.onProgress({loaded:O._loaded}),{value:new Uint8Array(G).buffer,done:!1})})()}cancel(O){this._reader&&this._reader.cancel(O),this._abortController.abort()}}}],__webpack_module_cache__={};function __w_pdfjs_require__(Re){var I=__webpack_module_cache__[Re];if(void 0!==I)return I.exports;var _e=__webpack_module_cache__[Re]={exports:{}};return __webpack_modules__[Re](_e,_e.exports,__w_pdfjs_require__),_e.exports}var __nested_webpack_exports__={};return(()=>{var Re=__nested_webpack_exports__;Object.defineProperty(Re,"__esModule",{value:!0}),Object.defineProperty(Re,"AnnotationEditorLayer",{enumerable:!0,get:function(){return j.AnnotationEditorLayer}}),Object.defineProperty(Re,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return I.AnnotationEditorParamsType}}),Object.defineProperty(Re,"AnnotationEditorType",{enumerable:!0,get:function(){return I.AnnotationEditorType}}),Object.defineProperty(Re,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return fe.AnnotationEditorUIManager}}),Object.defineProperty(Re,"AnnotationLayer",{enumerable:!0,get:function(){return ce.AnnotationLayer}}),Object.defineProperty(Re,"AnnotationMode",{enumerable:!0,get:function(){return I.AnnotationMode}}),Object.defineProperty(Re,"CMapCompressionType",{enumerable:!0,get:function(){return I.CMapCompressionType}}),Object.defineProperty(Re,"GlobalWorkerOptions",{enumerable:!0,get:function(){return pe.GlobalWorkerOptions}}),Object.defineProperty(Re,"InvalidPDFException",{enumerable:!0,get:function(){return I.InvalidPDFException}}),Object.defineProperty(Re,"LoopbackPort",{enumerable:!0,get:function(){return _e.LoopbackPort}}),Object.defineProperty(Re,"MissingPDFException",{enumerable:!0,get:function(){return I.MissingPDFException}}),Object.defineProperty(Re,"OPS",{enumerable:!0,get:function(){return I.OPS}}),Object.defineProperty(Re,"PDFDataRangeTransport",{enumerable:!0,get:function(){return _e.PDFDataRangeTransport}}),Object.defineProperty(Re,"PDFDateString",{enumerable:!0,get:function(){return k.PDFDateString}}),Object.defineProperty(Re,"PDFWorker",{enumerable:!0,get:function(){return _e.PDFWorker}}),Object.defineProperty(Re,"PasswordResponses",{enumerable:!0,get:function(){return I.PasswordResponses}}),Object.defineProperty(Re,"PermissionFlag",{enumerable:!0,get:function(){return I.PermissionFlag}}),Object.defineProperty(Re,"PixelsPerInch",{enumerable:!0,get:function(){return k.PixelsPerInch}}),Object.defineProperty(Re,"RenderingCancelledException",{enumerable:!0,get:function(){return k.RenderingCancelledException}}),Object.defineProperty(Re,"SVGGraphics",{enumerable:!0,get:function(){return V.SVGGraphics}}),Object.defineProperty(Re,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return I.UNSUPPORTED_FEATURES}}),Object.defineProperty(Re,"UnexpectedResponseException",{enumerable:!0,get:function(){return I.UnexpectedResponseException}}),Object.defineProperty(Re,"Util",{enumerable:!0,get:function(){return I.Util}}),Object.defineProperty(Re,"VerbosityLevel",{enumerable:!0,get:function(){return I.VerbosityLevel}}),Object.defineProperty(Re,"XfaLayer",{enumerable:!0,get:function(){return O.XfaLayer}}),Object.defineProperty(Re,"build",{enumerable:!0,get:function(){return _e.build}}),Object.defineProperty(Re,"createPromiseCapability",{enumerable:!0,get:function(){return I.createPromiseCapability}}),Object.defineProperty(Re,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return I.createValidAbsoluteUrl}}),Object.defineProperty(Re,"getDocument",{enumerable:!0,get:function(){return _e.getDocument}}),Object.defineProperty(Re,"getFilenameFromUrl",{enumerable:!0,get:function(){return k.getFilenameFromUrl}}),Object.defineProperty(Re,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return k.getPdfFilenameFromUrl}}),Object.defineProperty(Re,"getXfaPageViewport",{enumerable:!0,get:function(){return k.getXfaPageViewport}}),Object.defineProperty(Re,"isPdfFile",{enumerable:!0,get:function(){return k.isPdfFile}}),Object.defineProperty(Re,"loadScript",{enumerable:!0,get:function(){return k.loadScript}}),Object.defineProperty(Re,"renderTextLayer",{enumerable:!0,get:function(){return P.renderTextLayer}}),Object.defineProperty(Re,"shadow",{enumerable:!0,get:function(){return I.shadow}}),Object.defineProperty(Re,"version",{enumerable:!0,get:function(){return _e.version}});var I=__w_pdfjs_require__(1),_e=__w_pdfjs_require__(4),k=__w_pdfjs_require__(8),j=__w_pdfjs_require__(22),fe=__w_pdfjs_require__(7),ce=__w_pdfjs_require__(27),pe=__w_pdfjs_require__(15),ne=__w_pdfjs_require__(3),P=__w_pdfjs_require__(30),V=__w_pdfjs_require__(31),O=__w_pdfjs_require__(29);if(ne.isNodeJS){const{PDFNodeStream:E}=__w_pdfjs_require__(32);(0,_e.setPDFNetworkStreamFactory)(d=>new E(d))}else{const{PDFNetworkStream:E}=__w_pdfjs_require__(35),{PDFFetchStream:d}=__w_pdfjs_require__(36);(0,_e.setPDFNetworkStreamFactory)(h=>(0,k.isValidFetchUrl)(h.url)?new d(h):new E(h))}})(),__nested_webpack_exports__})(),module.exports=_e()},786:Re=>{function I(k,j,fe,ce,pe,ne,P){try{var V=k[ne](P),O=V.value}catch(G){return void fe(G)}V.done?j(O):Promise.resolve(O).then(ce,pe)}Re.exports=function _e(k){return function(){var j=this,fe=arguments;return new Promise(function(ce,pe){var ne=k.apply(j,fe);function P(O){I(ne,ce,pe,P,V,"next",O)}function V(O){I(ne,ce,pe,P,V,"throw",O)}P(void 0)})}},Re.exports.__esModule=!0,Re.exports.default=Re.exports},414:()=>{},172:()=>{},1:()=>{},779:()=>{},558:()=>{},258:()=>{}},Re=>{Re(Re.s=850)}]);
1
+ var Aj=Object.defineProperty,Sj=Object.defineProperties,Tj=Object.getOwnPropertyDescriptors,bD=Object.getOwnPropertySymbols,wj=Object.prototype.hasOwnProperty,Mj=Object.prototype.propertyIsEnumerable,ls=Math.pow,Lp=(Re,I,_e)=>I in Re?Aj(Re,I,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Re[I]=_e,Vp=(Re,I)=>{for(var _e in I||(I={}))wj.call(I,_e)&&Lp(Re,_e,I[_e]);if(bD)for(var _e of bD(I))Mj.call(I,_e)&&Lp(Re,_e,I[_e]);return Re},jp=(Re,I)=>Sj(Re,Tj(I)),cn=(Re,I,_e)=>(Lp(Re,"symbol"!=typeof I?I+"":I,_e),_e),Bp=(Re,I,_e)=>{if(!I.has(Re))throw TypeError("Cannot "+_e)},q=(Re,I,_e)=>(Bp(Re,I,"read from private field"),_e?_e.call(Re):I.get(Re)),Pe=(Re,I,_e)=>{if(I.has(Re))throw TypeError("Cannot add the same private member more than once");I instanceof WeakSet?I.add(Re):I.set(Re,_e)},$e=(Re,I,_e,k)=>(Bp(Re,I,"write to private field"),k?k.call(Re,_e):I.set(Re,_e),_e),Up=(Re,I,_e,k)=>({set _(j){$e(Re,I,j,_e)},get _(){return q(Re,I,k)}}),Le=(Re,I,_e)=>(Bp(Re,I,"access private method"),_e);(self.webpackChunkwpScThumbnailJsonp=self.webpackChunkwpScThumbnailJsonp||[]).push([[179],{850:(Re,I,_e)=>{"use strict";const k=rxjs,j=rxjs.operators;function fe(n){for(let e in n)if(n[e]===fe)return e;throw Error("Could not find renamed property on target object.")}function ce(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function pe(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(pe).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function ne(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const P=fe({__forward_ref__:fe});function V(n){return n.__forward_ref__=V,n.toString=function(){return pe(this())},n}function O(n){return function G(n){return"function"==typeof n&&n.hasOwnProperty(P)&&n.__forward_ref__===V}(n)?n():n}class E extends Error{constructor(e,t){super(function h(n,e){return`${n?`NG0${n}: `:""}${e}`}(e,t)),this.code=e}}function y(n){return"string"==typeof n?n:null==n?"":String(n)}function w(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():y(n)}function g(n,e){const t=e?` in ${e}`:"";throw new E("201",`No provider for ${w(n)} found${t}`)}function Ae(n,e){null==n&&function xe(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function R(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Y(n){return{providers:n.providers||[],imports:n.imports||[]}}function J(n){return de(n,F)||de(n,K)}function de(n,e){return n.hasOwnProperty(e)?n[e]:null}function S(n){return n&&(n.hasOwnProperty(L)||n.hasOwnProperty(ie))?n[L]:null}const F=fe({\u0275prov:fe}),L=fe({\u0275inj:fe}),K=fe({ngInjectableDef:fe}),ie=fe({ngInjectorDef:fe});var he=(()=>((he=he||{})[he.Default=0]="Default",he[he.Host=1]="Host",he[he.Self=2]="Self",he[he.SkipSelf=4]="SkipSelf",he[he.Optional=8]="Optional",he))();let ke;function we(n){const e=ke;return ke=n,e}function Ee(n,e,t){const i=J(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&he.Optional?null:void 0!==e?e:void g(pe(n),"Injector")}function Ve(n){return{toString:n}.toString()}var X=(()=>((X=X||{})[X.OnPush=0]="OnPush",X[X.Default=1]="Default",X))(),Ke=(()=>{return(n=Ke||(Ke={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Ke;var n})();const lt="undefined"!=typeof globalThis&&globalThis,yt="undefined"!=typeof window&&window,$t="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,vt=lt||"undefined"!=typeof global&&global||yt||$t,Te={},Fe=[],Je=fe({\u0275cmp:fe}),be=fe({\u0275dir:fe}),oe=fe({\u0275pipe:fe}),le=fe({\u0275mod:fe}),Oe=fe({\u0275fac:fe}),Ge=fe({__NG_ELEMENT_ID__:fe});let it=0;function tt(n){return Ve(()=>{const t={},i={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===X.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||Fe,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ke.Emulated,id:"c",styles:n.styles||Fe,_:null,setInput:null,schemas:n.schemas||null,tView:null},r=n.directives,s=n.features,o=n.pipes;return i.id+=it++,i.inputs=vn(n.inputs,t),i.outputs=vn(n.outputs),s&&s.forEach(a=>a(i)),i.directiveDefs=r?()=>("function"==typeof r?r():r).map(Rt):null,i.pipeDefs=o?()=>("function"==typeof o?o():o).map(Et):null,i})}function Rt(n){return Bt(n)||function Tn(n){return n[be]||null}(n)}function Et(n){return function wn(n){return n[oe]||null}(n)}const Ft={};function At(n){return Ve(()=>{const e={type:n.type,bootstrap:n.bootstrap||Fe,declarations:n.declarations||Fe,imports:n.imports||Fe,exports:n.exports||Fe,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Ft[n.id]=n.type),e})}function vn(n,e){if(null==n)return Te;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),t[r]=i,e&&(e[r]=s)}return t}const We=tt;function Bt(n){return n[Je]||null}function Kt(n,e){const t=n[le]||null;if(!t&&!0===e)throw new Error(`Type ${pe(n)} does not have '\u0275mod' property.`);return t}function ki(n){return Array.isArray(n)&&"object"==typeof n[1]}function vi(n){return Array.isArray(n)&&!0===n[1]}function lu(n){return 0!=(8&n.flags)}function Wa(n){return 2==(2&n.flags)}function qa(n){return 1==(1&n.flags)}function Ei(n){return null!==n.template}function HD(n){return 0!=(512&n[2])}function kr(n,e){return n.hasOwnProperty(Oe)?n[Oe]:null}class uu{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function Kp(n){return n.type.prototype.ngOnChanges&&(n.setInput=qD),WD}function WD(){const n=Xp(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===Te)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function qD(n,e,t,i){const r=Xp(n)||function zD(n,e){return n[Yp]=e}(n,{previous:Te,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[t],l=o[a];s[a]=new uu(l&&l.currentValue,e,o===Te),n[i]=e}const Yp="__ngSimpleChanges__";function Xp(n){return n[Yp]||null}let hu;function fu(){return void 0!==hu?hu:"undefined"!=typeof document?document:void 0}function Jt(n){return!!n.listen}const Jp={createRenderer:(n,e)=>fu()};function un(n){for(;Array.isArray(n);)n=n[0];return n}function za(n,e){return un(e[n])}function ai(n,e){return un(e[n.index])}function pu(n,e){return n.data[e]}function Yn(n,e){const t=e[n];return ki(t)?t:t[0]}function eg(n){return 4==(4&n[2])}function gu(n){return 128==(128&n[2])}function gr(n,e){return null==e?null:n[e]}function tg(n){n[18]=0}function mu(n,e){n[5]+=e;let t=n,i=n[3];for(;null!==i&&(1===e&&1===t[5]||-1===e&&0===t[5]);)i[5]+=e,t=i,i=i[3]}const dt={lFrame:cg(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function ng(){return dt.bindingsEnabled}function Be(){return dt.lFrame.lView}function wt(){return dt.lFrame.tView}function bo(n){return dt.lFrame.contextLView=n,n[8]}function pn(){let n=ig();for(;null!==n&&64===n.type;)n=n.parent;return n}function ig(){return dt.lFrame.currentTNode}function Li(n,e){const t=dt.lFrame;t.currentTNode=n,t.isParent=e}function _u(){return dt.lFrame.isParent}function Ka(){return dt.isInCheckNoChangesMode}function Ya(n){dt.isInCheckNoChangesMode=n}function ps(){return dt.lFrame.bindingIndex++}function nr(n){const e=dt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function aA(n,e){const t=dt.lFrame;t.bindingIndex=t.bindingRootIndex=n,vu(e)}function vu(n){dt.lFrame.currentDirectiveIndex=n}function og(){return dt.lFrame.currentQueryIndex}function bu(n){dt.lFrame.currentQueryIndex=n}function cA(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function ag(n,e,t){if(t&he.SkipSelf){let r=e,s=n;for(;!(r=r.parent,null!==r||t&he.Host||(r=cA(s),null===r||(s=s[15],10&r.type))););if(null===r)return!1;e=r,n=s}const i=dt.lFrame=lg();return i.currentTNode=e,i.lView=n,!0}function Xa(n){const e=lg(),t=n[1];dt.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function lg(){const n=dt.lFrame,e=null===n?null:n.child;return null===e?cg(n):e}function cg(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function ug(){const n=dt.lFrame;return dt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const dg=ug;function Qa(){const n=ug();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Vn(){return dt.lFrame.selectedIndex}function mr(n){dt.lFrame.selectedIndex=n}function en(){const n=dt.lFrame;return pu(n.tView,n.selectedIndex)}function Za(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){const s=n.data[t].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=s;o&&(n.contentHooks||(n.contentHooks=[])).push(-t,o),a&&((n.contentHooks||(n.contentHooks=[])).push(t,a),(n.contentCheckHooks||(n.contentCheckHooks=[])).push(t,a)),l&&(n.viewHooks||(n.viewHooks=[])).push(-t,l),c&&((n.viewHooks||(n.viewHooks=[])).push(t,c),(n.viewCheckHooks||(n.viewCheckHooks=[])).push(t,c)),null!=u&&(n.destroyHooks||(n.destroyHooks=[])).push(t,u)}}function Ja(n,e,t){hg(n,e,3,t)}function el(n,e,t,i){(3&n[2])===t&&hg(n,e,t,i)}function Cu(n,e){let t=n[2];(3&t)===e&&(t&=2047,t+=1,n[2]=t)}function hg(n,e,t,i){const s=null!=i?i:-1,o=e.length-1;let a=0;for(let l=void 0!==i?65535&n[18]:0;l<o;l++)if("number"==typeof e[l+1]){if(a=e[l],null!=i&&a>=i)break}else e[l]<0&&(n[18]+=65536),(a<s||-1==s)&&(yA(n,t,e,l),n[18]=(4294901760&n[18])+l+2),l++}function yA(n,e,t,i){const r=t[i]<0,s=t[i+1],a=n[r?-t[i]:t[i]];if(r){if(n[2]>>11<n[18]>>16&&(3&n[2])===e){n[2]+=2048;try{s.call(a)}finally{}}}else try{s.call(a)}finally{}}class Do{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function tl(n,e,t){const i=Jt(n);let r=0;for(;r<t.length;){const s=t[r];if("number"==typeof s){if(0!==s)break;r++;const o=t[r++],a=t[r++],l=t[r++];i?n.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=t[++r];Au(o)?i&&n.setProperty(e,o,a):i?n.setAttribute(e,o,a):e.setAttribute(o,a),r++}}return r}function fg(n){return 3===n||4===n||6===n}function Au(n){return 64===n.charCodeAt(0)}function nl(n,e){if(null!==e&&0!==e.length)if(null===n||0===n.length)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){const r=e[i];"number"==typeof r?t=r:0===t||pg(n,t,r,null,-1===t||2===t?e[++i]:null)}}return n}function pg(n,e,t,i,r){let s=0,o=n.length;if(-1===e)o=-1;else for(;s<n.length;){const a=n[s++];if("number"==typeof a){if(a===e){o=-1;break}if(a>e){o=s-1;break}}}for(;s<n.length;){const a=n[s];if("number"==typeof a)break;if(a===t){if(null===i)return void(null!==r&&(n[s+1]=r));if(i===n[s+1])return void(n[s+2]=r)}s++,null!==i&&s++,null!==r&&s++}-1!==o&&(n.splice(o,0,e),s=o+1),n.splice(s++,0,t),null!==i&&n.splice(s++,0,i),null!==r&&n.splice(s++,0,r)}function gg(n){return-1!==n}function gs(n){return 32767&n}function ms(n,e){let t=function DA(n){return n>>16}(n),i=e;for(;t>0;)i=i[15],t--;return i}let Su=!0;function il(n){const e=Su;return Su=n,e}let AA=0;function So(n,e){const t=wu(n,e);if(-1!==t)return t;const i=e[1];i.firstCreatePass&&(n.injectorIndex=e.length,Tu(i.data,n),Tu(e,null),Tu(i.blueprint,null));const r=rl(n,e),s=n.injectorIndex;if(gg(r)){const o=gs(r),a=ms(r,e),l=a[1].data;for(let c=0;c<8;c++)e[s+c]=a[o+c]|l[o+c]}return e[s+8]=r,s}function Tu(n,e){n.push(0,0,0,0,0,0,0,0,e)}function wu(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function rl(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){const s=r[1],o=s.type;if(i=2===o?s.declTNode:1===o?r[6]:null,null===i)return-1;if(t++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return-1}function sl(n,e,t){!function SA(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(Ge)&&(i=t[Ge]),null==i&&(i=t[Ge]=AA++);const r=255&i;e.data[n+(r>>5)]|=1<<r}(n,e,t)}function yg(n,e,t){if(t&he.Optional)return n;g(e,"NodeInjector")}function vg(n,e,t,i){if(t&he.Optional&&void 0===i&&(i=null),0==(t&(he.Self|he.Host))){const r=n[9],s=we(void 0);try{return r?r.get(e,i,t&he.Optional):Ee(e,i,t&he.Optional)}finally{we(s)}}return yg(i,e,t)}function Eg(n,e,t,i=he.Default,r){if(null!==n){const s=function IA(n){if("string"==typeof n)return n.charCodeAt(0)||0;const e=n.hasOwnProperty(Ge)?n[Ge]:void 0;return"number"==typeof e?e>=0?255&e:wA:e}(t);if("function"==typeof s){if(!ag(e,n,i))return i&he.Host?yg(r,t,i):vg(e,t,i,r);try{const o=s(i);if(null!=o||i&he.Optional)return o;g(t)}finally{dg()}}else if("number"==typeof s){let o=null,a=wu(n,e),l=-1,c=i&he.Host?e[16][6]:null;for((-1===a||i&he.SkipSelf)&&(l=-1===a?rl(n,e):e[a+8],-1!==l&&Dg(i,!1)?(o=e[1],a=gs(l),e=ms(l,e)):a=-1);-1!==a;){const u=e[1];if(Cg(s,a,u.data)){const p=MA(a,e,t,o,i,c);if(p!==bg)return p}l=e[a+8],-1!==l&&Dg(i,e[1].data[a+8]===c)&&Cg(s,a,e)?(o=u,a=gs(l),e=ms(l,e)):a=-1}}}return vg(e,t,i,r)}const bg={};function wA(){return new _s(pn(),Be())}function MA(n,e,t,i,r,s){const o=e[1],a=o.data[n+8],u=ol(a,o,t,null==i?Wa(a)&&Su:i!=o&&0!=(3&a.type),r&he.Host&&s===a);return null!==u?To(e,o,u,a):bg}function ol(n,e,t,i,r){const s=n.providerIndexes,o=e.data,a=1048575&s,l=n.directiveStart,u=s>>20,b=r?a+u:n.directiveEnd;for(let U=i?a:a+u;U<b;U++){const z=o[U];if(U<l&&t===z||U>=l&&z.type===t)return U}if(r){const U=o[l];if(U&&Ei(U)&&U.type===t)return l}return null}function To(n,e,t,i){let r=n[t];const s=e.data;if(function vA(n){return n instanceof Do}(r)){const o=r;o.resolving&&function x(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new E("200",`Circular dependency in DI detected for ${n}${t}`)}(w(s[t]));const a=il(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?we(o.injectImpl):null;ag(n,i,he.Default);try{r=n[t]=o.factory(void 0,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&function _A(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const o=Kp(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o)}r&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,r),s&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s))}(t,s[t],e)}finally{null!==l&&we(l),il(a),o.resolving=!1,dg()}}return r}function Cg(n,e,t){return!!(t[e+(n>>5)]&1<<n)}function Dg(n,e){return!(n&he.Self||n&he.Host&&e)}class _s{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return Eg(this._tNode,this._lView,e,i,t)}}const vs="__parameters__";function Lr(n,e,t){return Ve(()=>{const i=function Iu(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,u){const p=l.hasOwnProperty(vs)?l[vs]:Object.defineProperty(l,vs,{value:[]})[vs];for(;p.length<=u;)p.push(null);return(p[u]=p[u]||[]).push(o),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class ct{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=R({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}function li(n,e){void 0===e&&(e=n);for(let t=0;t<n.length;t++){let i=n[t];Array.isArray(i)?(e===n&&(e=n.slice(0,t)),li(i,e)):e!==n&&e.push(i)}return e}function Vi(n,e){n.forEach(t=>Array.isArray(t)?Vi(t,e):e(t))}function ll(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Vr(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Qn(n,e,t){let i=bs(n,e);return i>=0?n[1|i]=t:(i=~i,function NA(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Fu(n,e){const t=bs(n,e);if(t>=0)return n[1|t]}function bs(n,e){return function wg(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const s=i+(r-i>>1),o=n[s<<t];if(e===o)return s<<t;o>e?r=s:i=s+1}return~(r<<t)}(n,e,1)}const Ro={},xu="__NG_DI_FLAG__",Cs="ngTempTokenPath",UA=/\n/gm,Nu="__source",Ou=fe({provide:String,useValue:fe});let Fo;function Ds(n){const e=Fo;return Fo=n,e}function $A(n,e=he.Default){if(void 0===Fo)throw new Error("inject() must be called from an injection context");return null===Fo?Ee(n,void 0,e):Fo.get(n,e&he.Optional?null:void 0,e)}function ze(n,e=he.Default){return(function me(){return ke}()||$A)(O(n),e)}const Ig=ze;function jr(n){const e=[];for(let t=0;t<n.length;t++){const i=O(n[t]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let r,s=he.Default;for(let o=0;o<i.length;o++){const a=i[o],l=GA(a);"number"==typeof l?-1===l?r=a.token:s|=l:r=a}e.push(ze(r,s))}else e.push(ze(i))}return e}function Po(n,e){return n[xu]=e,n.prototype[xu]=e,n}function GA(n){return n[xu]}function Rg(n,e,t,i){const r=n[Cs];throw e[Nu]&&r.unshift(e[Nu]),n.message=function Fg(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let r=pe(e);if(Array.isArray(e))r=e.map(pe).join(" -> ");else if("object"==typeof e){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):pe(a)))}r=`{${s.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(UA,"\n ")}`}("\n"+n.message,r,t,i),n.ngTokenPath=r,n[Cs]=null,n}const xo=Po(Lr("Inject",n=>({token:n})),-1),ji=Po(Lr("Optional"),8),Br=Po(Lr("SkipSelf"),4);let hl,fl;function Ss(n){var e;return(null===(e=function Lu(){if(void 0===hl&&(hl=null,vt.trustedTypes))try{hl=vt.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return hl}())||void 0===e?void 0:e.createHTML(n))||n}function Og(n){var e;return(null===(e=function Vu(){if(void 0===fl&&(fl=null,vt.trustedTypes))try{fl=vt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return fl}())||void 0===e?void 0:e.createHTML(n))||n}class Ur{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class tS extends Ur{getTypeName(){return"HTML"}}class nS extends Ur{getTypeName(){return"Style"}}class iS extends Ur{getTypeName(){return"Script"}}class rS extends Ur{getTypeName(){return"URL"}}class sS extends Ur{getTypeName(){return"ResourceURL"}}function Zn(n){return n instanceof Ur?n.changingThisBreaksApplicationSecurity:n}function Bi(n,e){const t=Vg(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function Vg(n){return n instanceof Ur&&n.getTypeName()||null}class dS{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{const t=(new window.DOMParser).parseFromString(Ss(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class hS{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const i=this.inertDocument.createElement("body");t.appendChild(i)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=Ss(e),t;const i=this.inertDocument.createElement("body");return i.innerHTML=Ss(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(e){const t=e.attributes;for(let r=t.length-1;0<r;r--){const o=t.item(r).name;("xmlns:ns1"===o||0===o.indexOf("ns1:"))&&e.removeAttribute(o)}let i=e.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const pS=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,gS=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Oo(n){return(n=String(n)).match(pS)||n.match(gS)?n:"unsafe:"+n}function Ui(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function ko(...n){const e={};for(const t of n)for(const i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}const Ug=Ui("area,br,col,hr,img,wbr"),Hg=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$g=Ui("rp,rt"),ju=ko(Ug,ko(Hg,Ui("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),ko($g,Ui("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ko($g,Hg)),Bu=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Uu=Ui("srcset"),Gg=ko(Bu,Uu,Ui("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ui("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),mS=Ui("script,style,template");class _S{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let r=this.checkClobberedElement(t,t.nextSibling);if(r){t=r;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!ju.hasOwnProperty(t))return this.sanitizedSomething=!0,!mS.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const i=e.attributes;for(let r=0;r<i.length;r++){const s=i.item(r),o=s.name,a=o.toLowerCase();if(!Gg.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=s.value;Bu[a]&&(l=Oo(l)),Uu[a]&&(n=l,l=(n=String(n)).split(",").map(e=>Oo(e.trim())).join(", ")),this.buf.push(" ",o,'="',Wg(l),'"')}var n;return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();ju.hasOwnProperty(t)&&!Ug.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Wg(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const yS=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vS=/([^\#-~ |!])/g;function Wg(n){return n.replace(/&/g,"&amp;").replace(yS,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vS,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let pl;function qg(n,e){let t=null;try{pl=pl||function jg(n){const e=new hS(n);return function fS(){try{return!!(new window.DOMParser).parseFromString(Ss(""),"text/html")}catch(n){return!1}}()?new dS(e):e}(n);let i=e?String(e):"";t=pl.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=t.innerHTML,t=pl.getInertBodyElement(i)}while(i!==s);return Ss((new _S).sanitizeChildren(Hu(t)||t))}finally{if(t){const i=Hu(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Hu(n){return"content"in n&&function ES(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Vt=(()=>((Vt=Vt||{})[Vt.NONE=0]="NONE",Vt[Vt.HTML=1]="HTML",Vt[Vt.STYLE=2]="STYLE",Vt[Vt.SCRIPT=3]="SCRIPT",Vt[Vt.URL=4]="URL",Vt[Vt.RESOURCE_URL=5]="RESOURCE_URL",Vt))();function zg(n){const e=Lo();return e?Og(e.sanitize(Vt.HTML,n)||""):Bi(n,"HTML")?Og(Zn(n)):qg(fu(),y(n))}function $u(n){const e=Lo();return e?e.sanitize(Vt.URL,n)||"":Bi(n,"URL")?Zn(n):Oo(y(n))}function Lo(){const n=Be();return n&&n[12]}const Xg="__ngContext__";function In(n,e){n[Xg]=e}function Wu(n){const e=function Vo(n){return n[Xg]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function gl(n){return n.ngOriginalError}function kS(n,...e){n.error(...e)}class Hr{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),i=this._findContext(e),r=function OS(n){return n&&n.ngErrorLogger||kS}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),i&&r(this._console,"ERROR CONTEXT",i)}_findContext(e){return e?function nm(n){return n.ngDebugContext}(e)||this._findContext(gl(e)):null}_findOriginalError(e){let t=e&&gl(e);for(;t&&gl(t);)t=gl(t);return t||null}}const sm=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(vt))();function Hi(n){return n instanceof Function?n():n}var Jn=(()=>((Jn=Jn||{})[Jn.Important=1]="Important",Jn[Jn.DashCase=2]="DashCase",Jn))();function Ku(n,e){return undefined(n,e)}function jo(n){const e=n[3];return vi(e)?e[3]:e}function Yu(n){return um(n[13])}function Xu(n){return um(n[4])}function um(n){for(;null!==n&&!vi(n);)n=n[4];return n}function ws(n,e,t,i,r){if(null!=i){let s,o=!1;vi(i)?s=i:ki(i)&&(o=!0,i=i[0]);const a=un(i);0===n&&null!==t?null==r?mm(e,t,a):$r(e,t,a,r||null,!0):1===n&&null!==t?$r(e,t,a,r||null,!0):2===n?function Dm(n,e,t){const i=_l(n,e);i&&function iT(n,e,t,i){Jt(n)?n.removeChild(e,t,i):e.removeChild(t)}(n,i,e,t)}(e,a,o):3===n&&e.destroyNode(a),null!=s&&function oT(n,e,t,i,r){const s=t[7];s!==un(t)&&ws(e,n,i,s,r);for(let a=10;a<t.length;a++){const l=t[a];Bo(l[1],l,n,e,i,s)}}(e,n,s,t,r)}}function Zu(n,e,t){return Jt(n)?n.createElement(e,t):null===t?n.createElement(e):n.createElementNS(t,e)}function hm(n,e){const t=n[9],i=t.indexOf(e),r=e[3];1024&e[2]&&(e[2]&=-1025,mu(r,-1)),t.splice(i,1)}function Ju(n,e){if(n.length<=10)return;const t=10+e,i=n[t];if(i){const r=i[17];null!==r&&r!==n&&hm(r,i),e>0&&(n[t-1][4]=i[4]);const s=Vr(n,10+e);!function YS(n,e){Bo(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(i[1],i);const o=s[19];null!==o&&o.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function fm(n,e){if(!(256&e[2])){const t=e[11];Jt(t)&&t.destroyNode&&Bo(n,e,t,3,null,null),function ZS(n){let e=n[13];if(!e)return ed(n[1],n);for(;e;){let t=null;if(ki(e))t=e[13];else{const i=e[10];i&&(t=i)}if(!t){for(;e&&!e[4]&&e!==n;)ki(e)&&ed(e[1],e),e=e[3];null===e&&(e=n),ki(e)&&ed(e[1],e),t=e&&e[4]}e=t}}(e)}}function ed(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function nT(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i<t.length;i+=2){const r=e[t[i]];if(!(r instanceof Do)){const s=t[i+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){const a=r[s[o]],l=s[o+1];try{l.call(a)}finally{}}else try{s.call(r)}finally{}}}}(n,e),function tT(n,e){const t=n.cleanup,i=e[7];let r=-1;if(null!==t)for(let s=0;s<t.length-1;s+=2)if("string"==typeof t[s]){const o=t[s+1],a="function"==typeof o?o(e):un(e[o]),l=i[r=t[s+2]],c=t[s+3];"boolean"==typeof c?a.removeEventListener(t[s],l,c):c>=0?i[r=c]():i[r=-c].unsubscribe(),s+=2}else{const o=i[r=t[s+1]];t[s].call(o)}if(null!==i){for(let s=r+1;s<i.length;s++)i[s]();e[7]=null}}(n,e),1===e[1].type&&Jt(e[11])&&e[11].destroy();const t=e[17];if(null!==t&&vi(e[3])){t!==e[3]&&hm(t,e);const i=e[19];null!==i&&i.detachView(n)}}}function pm(n,e,t){return function gm(n,e,t){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return t[0];if(2&i.flags){const r=n.data[i.directiveStart].encapsulation;if(r===Ke.None||r===Ke.Emulated)return null}return ai(i,t)}(n,e.parent,t)}function $r(n,e,t,i,r){Jt(n)?n.insertBefore(e,t,i,r):e.insertBefore(t,i,r)}function mm(n,e,t){Jt(n)?n.appendChild(e,t):e.appendChild(t)}function _m(n,e,t,i,r){null!==i?$r(n,e,t,i,r):mm(n,e,t)}function _l(n,e){return Jt(n)?n.parentNode(e):e.parentNode}let Em=function vm(n,e,t){return 40&n.type?ai(n,t):null};function yl(n,e,t,i){const r=pm(n,i,e),s=e[11],a=function ym(n,e,t){return Em(n,e,t)}(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;l<t.length;l++)_m(s,r,t[l],a,!1);else _m(s,r,t,a,!1)}function vl(n,e){if(null!==e){const t=e.type;if(3&t)return ai(e,n);if(4&t)return nd(-1,n[e.index]);if(8&t){const i=e.child;if(null!==i)return vl(n,i);{const r=n[e.index];return vi(r)?nd(-1,r):un(r)}}if(32&t)return Ku(e,n)()||un(n[e.index]);{const i=Cm(n,e);return null!==i?Array.isArray(i)?i[0]:vl(jo(n[16]),i):vl(n,e.next)}}return null}function Cm(n,e){return null!==e?n[16][6].projection[e.projection]:null}function nd(n,e){const t=10+n+1;if(t<e.length){const i=e[t],r=i[1].firstChild;if(null!==r)return vl(i,r)}return e[7]}function id(n,e,t,i,r,s,o){for(;null!=t;){const a=i[t.index],l=t.type;if(o&&0===e&&(a&&In(un(a),i),t.flags|=4),64!=(64&t.flags))if(8&l)id(n,e,t.child,i,r,s,!1),ws(e,n,r,a,s);else if(32&l){const c=Ku(t,i);let u;for(;u=c();)ws(e,n,r,u,s);ws(e,n,r,a,s)}else 16&l?Am(n,e,i,t,r,s):ws(e,n,r,a,s);t=o?t.projectionNext:t.next}}function Bo(n,e,t,i,r,s){id(t,i,n.firstChild,e,r,s,!1)}function Am(n,e,t,i,r,s){const o=t[16],l=o[6].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)ws(e,n,r,l[c],s);else id(n,e,l,o[3],r,s,!0)}function Sm(n,e,t){Jt(n)?n.setAttribute(e,"style",t):e.style.cssText=t}function rd(n,e,t){Jt(n)?""===t?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t):e.className=t}function Tm(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const s=e.length;if(r+s===i||n.charCodeAt(r+s)<=32)return r}t=r+1}}const wm="ng-template";function lT(n,e,t){let i=0;for(;i<n.length;){let r=n[i++];if(t&&"class"===r){if(r=n[i],-1!==Tm(r.toLowerCase(),e,0))return!0}else if(1===r){for(;i<n.length&&"string"==typeof(r=n[i++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function Mm(n){return 4===n.type&&n.value!==wm}function cT(n,e,t){return e===(4!==n.type||t?n.value:wm)}function uT(n,e,t){let i=4;const r=n.attrs||[],s=function fT(n){for(let e=0;e<n.length;e++)if(fg(n[e]))return e;return n.length}(r);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!cT(n,l,t)||""===l&&1===e.length){if(bi(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==n.attrs){if(!lT(n.attrs,c,t)){if(bi(i))return!1;o=!0}continue}const p=dT(8&i?"class":l,r,Mm(n),t);if(-1===p){if(bi(i))return!1;o=!0;continue}if(""!==c){let b;b=p>s?"":r[p+1].toLowerCase();const U=8&i?b:null;if(U&&-1!==Tm(U,c,0)||2&i&&c!==b){if(bi(i))return!1;o=!0}}}}else{if(!o&&!bi(i)&&!bi(l))return!1;if(o&&bi(l))continue;o=!1,i=l|1&i}}return bi(i)||o}function bi(n){return 0==(1&n)}function dT(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let s=!1;for(;r<e.length;){const o=e[r];if(o===n)return r;if(3===o||6===o)s=!0;else{if(1===o||2===o){let a=e[++r];for(;"string"==typeof a;)a=e[++r];continue}if(4===o)break;if(0===o){r+=4;continue}}r+=s?1:2}return-1}return function pT(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){const i=n[t];if("number"==typeof i)return-1;if(i===e)return t;t++}return-1}(e,n)}function Im(n,e,t=!1){for(let i=0;i<e.length;i++)if(uT(n,e[i],t))return!0;return!1}function Rm(n,e){return n?":not("+e.trim()+")":e}function mT(n){let e=n[0],t=1,i=2,r="",s=!1;for(;t<n.length;){let o=n[t];if("string"==typeof o)if(2&i){const a=n[++t];r+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!bi(o)&&(e+=Rm(s,r),r=""),i=o,s=s||!bi(i);t++}return""!==r&&(e+=Rm(s,r)),e}const gt={};function an(n){Fm(wt(),Be(),Vn()+n,Ka())}function Fm(n,e,t,i){if(!i)if(3==(3&e[2])){const s=n.preOrderCheckHooks;null!==s&&Ja(e,s,t)}else{const s=n.preOrderHooks;null!==s&&el(e,s,0,t)}mr(t)}function El(n,e){return n<<17|e<<2}function Ci(n){return n>>17&32767}function sd(n){return 2|n}function ir(n){return(131068&n)>>2}function od(n,e){return-131069&n|e<<2}function ad(n){return 1|n}function Hm(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;i<t.length;i+=2){const r=t[i],s=t[i+1];if(-1!==s){const o=n.data[s];bu(r),o.contentQueries(2,e[s],s)}}}function Uo(n,e,t,i,r,s,o,a,l,c){const u=e.blueprint.slice();return u[0]=r,u[2]=140|i,tg(u),u[3]=u[15]=n,u[8]=t,u[10]=o||n&&n[10],u[11]=a||n&&n[11],u[12]=l||n&&n[12]||null,u[9]=c||n&&n[9]||null,u[6]=s,u[16]=2==e.type?n[16]:u,u}function Ms(n,e,t,i,r){let s=n.data[e];if(null===s)s=function md(n,e,t,i,r){const s=ig(),o=_u(),l=n.data[e]=function NT(n,e,t,i,r,s){return{type:t,index:i,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,t,e,i,r);return null===n.firstChild&&(n.firstChild=l),null!==s&&(o?null==s.child&&null!==l.parent&&(s.child=l):null===s.next&&(s.next=l)),l}(n,e,t,i,r),function oA(){return dt.lFrame.inI18n}()&&(s.flags|=64);else if(64&s.type){s.type=t,s.value=i,s.attrs=r;const o=function Co(){const n=dt.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}();s.injectorIndex=null===o?-1:o.injectorIndex}return Li(s,!0),s}function Is(n,e,t,i){if(0===t)return-1;const r=e.length;for(let s=0;s<t;s++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function Ho(n,e,t){Xa(e);try{const i=n.viewQuery;null!==i&&Sd(1,i,t);const r=n.template;null!==r&&$m(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&Hm(n,e),n.staticViewQueries&&Sd(2,n.viewQuery,t);const s=n.components;null!==s&&function FT(n,e){for(let t=0;t<e.length;t++)ZT(n,e[t])}(e,s)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[2]&=-5,Qa()}}function Rs(n,e,t,i){const r=e[2];if(256==(256&r))return;Xa(e);const s=Ka();try{tg(e),function rg(n){return dt.lFrame.bindingIndex=n}(n.bindingStartIndex),null!==t&&$m(n,e,t,2,i);const o=3==(3&r);if(!s)if(o){const c=n.preOrderCheckHooks;null!==c&&Ja(e,c,null)}else{const c=n.preOrderHooks;null!==c&&el(e,c,0,null),Cu(e,0)}if(function XT(n){for(let e=Yu(n);null!==e;e=Xu(e)){if(!e[2])continue;const t=e[9];for(let i=0;i<t.length;i++){const r=t[i],s=r[3];0==(1024&r[2])&&mu(s,1),r[2]|=1024}}}(e),function YT(n){for(let e=Yu(n);null!==e;e=Xu(e))for(let t=10;t<e.length;t++){const i=e[t],r=i[1];gu(i)&&Rs(r,i,r.template,i[8])}}(e),null!==n.contentQueries&&Hm(n,e),!s)if(o){const c=n.contentCheckHooks;null!==c&&Ja(e,c)}else{const c=n.contentHooks;null!==c&&el(e,c,1),Cu(e,1)}!function IT(n,e){const t=n.hostBindingOpCodes;if(null!==t)try{for(let i=0;i<t.length;i++){const r=t[i];if(r<0)mr(~r);else{const s=r,o=t[++i],a=t[++i];aA(o,s),a(2,e[s])}}}finally{mr(-1)}}(n,e);const a=n.components;null!==a&&function RT(n,e){for(let t=0;t<e.length;t++)QT(n,e[t])}(e,a);const l=n.viewQuery;if(null!==l&&Sd(2,l,i),!s)if(o){const c=n.viewCheckHooks;null!==c&&Ja(e,c)}else{const c=n.viewHooks;null!==c&&el(e,c,2),Cu(e,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,mu(e[3],-1))}finally{Qa()}}function PT(n,e,t,i){const r=e[10],s=!Ka(),o=eg(e);try{s&&!o&&r.begin&&r.begin(),o&&Ho(n,e,i),Rs(n,e,t,i)}finally{s&&!o&&r.end&&r.end()}}function $m(n,e,t,i,r){const s=Vn(),o=2&i;try{mr(-1),o&&e.length>20&&Fm(n,e,20,Ka()),t(i,r)}finally{mr(s)}}function _d(n,e,t){!ng()||(function UT(n,e,t,i){const r=t.directiveStart,s=t.directiveEnd;n.firstCreatePass||So(t,e),In(i,e);const o=t.initialInputs;for(let a=r;a<s;a++){const l=n.data[a],c=Ei(l);c&&qT(e,t,l);const u=To(e,n,a,t);In(u,e),null!==o&&zT(0,a-r,u,l,0,o),c&&(Yn(t.index,e)[8]=u)}}(n,e,t,ai(t,e)),128==(128&t.flags)&&function HT(n,e,t){const i=t.directiveStart,r=t.directiveEnd,o=t.index,a=function lA(){return dt.lFrame.currentDirectiveIndex}();try{mr(o);for(let l=i;l<r;l++){const c=n.data[l],u=e[l];vu(l),(null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs)&&Zm(c,u)}}finally{mr(-1),vu(a)}}(n,e,t))}function yd(n,e,t=ai){const i=e.localNames;if(null!==i){let r=e.index+1;for(let s=0;s<i.length;s+=2){const o=i[s+1],a=-1===o?t(e,n):n[o];n[r++]=a}}}function Wm(n){const e=n.tView;return null===e||e.incompleteFirstPass?n.tView=Dl(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):e}function Dl(n,e,t,i,r,s,o,a,l,c){const u=20+i,p=u+r,b=function xT(n,e){const t=[];for(let i=0;i<e;i++)t.push(i<n?null:gt);return t}(u,p),U="function"==typeof c?c():c;return b[1]={type:n,blueprint:b,template:t,queries:null,viewQuery:a,declTNode:e,data:b.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:p,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:U,incompleteFirstPass:!1}}function Km(n,e,t,i){const r=r_(e);null===t?r.push(i):(r.push(t),n.firstCreatePass&&s_(n).push(i,r.length-1))}function Ym(n,e,t){for(let i in n)if(n.hasOwnProperty(i)){const r=n[i];(t=null===t?{}:t).hasOwnProperty(i)?t[i].push(e,r):t[i]=[e,r]}return t}function ei(n,e,t,i,r,s,o,a){const l=ai(e,t);let u,c=e.inputs;!a&&null!=c&&(u=c[i])?(l_(n,t,u,i,r),Wa(e)&&function LT(n,e){const t=Yn(e,n);16&t[2]||(t[2]|=64)}(t,e.index)):3&e.type&&(i=function kT(n){return"class"===n?"className":"for"===n?"htmlFor":"formaction"===n?"formAction":"innerHtml"===n?"innerHTML":"readonly"===n?"readOnly":"tabindex"===n?"tabIndex":n}(i),r=null!=o?o(r,e.value||"",i):r,Jt(s)?s.setProperty(l,i,r):Au(i)||(l.setProperty?l.setProperty(i,r):l[i]=r))}function vd(n,e,t,i){let r=!1;if(ng()){const s=function $T(n,e,t){const i=n.directiveRegistry;let r=null;if(i)for(let s=0;s<i.length;s++){const o=i[s];Im(t,o.selectors,!1)&&(r||(r=[]),sl(So(t,e),n,o.type),Ei(o)?(Jm(n,t),r.unshift(o)):r.push(o))}return r}(n,e,t),o=null===i?null:{"":-1};if(null!==s){r=!0,e_(t,n.data.length,s.length);for(let u=0;u<s.length;u++){const p=s[u];p.providersResolver&&p.providersResolver(p)}let a=!1,l=!1,c=Is(n,e,s.length,null);for(let u=0;u<s.length;u++){const p=s[u];t.mergedAttrs=nl(t.mergedAttrs,p.hostAttrs),t_(n,t,e,c,p),WT(c,p,o),null!==p.contentQueries&&(t.flags|=8),(null!==p.hostBindings||null!==p.hostAttrs||0!==p.hostVars)&&(t.flags|=128);const b=p.type.prototype;!a&&(b.ngOnChanges||b.ngOnInit||b.ngDoCheck)&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t.index),a=!0),!l&&(b.ngOnChanges||b.ngDoCheck)&&((n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t.index),l=!0),c++}!function OT(n,e){const i=e.directiveEnd,r=n.data,s=e.attrs,o=[];let a=null,l=null;for(let c=e.directiveStart;c<i;c++){const u=r[c],p=u.inputs,b=null===s||Mm(e)?null:KT(p,s);o.push(b),a=Ym(p,c,a),l=Ym(u.outputs,c,l)}null!==a&&(a.hasOwnProperty("class")&&(e.flags|=16),a.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=o,e.inputs=a,e.outputs=l}(n,t)}o&&function GT(n,e,t){if(e){const i=n.localNames=[];for(let r=0;r<e.length;r+=2){const s=t[e[r+1]];if(null==s)throw new E("301",`Export of name '${e[r+1]}' not found!`);i.push(e[r],s)}}}(t,i,o)}return t.mergedAttrs=nl(t.mergedAttrs,t.attrs),r}function Qm(n,e,t,i,r,s){const o=s.hostBindings;if(o){let a=n.hostBindingOpCodes;null===a&&(a=n.hostBindingOpCodes=[]);const l=~e.index;(function BT(n){let e=n.length;for(;e>0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(i,r,o)}}function Zm(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function Jm(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function WT(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;Ei(e)&&(t[""]=n)}}function e_(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function t_(n,e,t,i,r){n.data[i]=r;const s=r.factory||(r.factory=kr(r.type)),o=new Do(s,Ei(r),null);n.blueprint[i]=o,t[i]=o,Qm(n,e,0,i,Is(n,t,r.hostVars,gt),r)}function qT(n,e,t){const i=ai(e,n),r=Wm(t),s=n[10],o=Al(n,Uo(n,r,null,t.onPush?64:16,i,e,s,s.createRenderer(i,t),null,null));n[e.index]=o}function $i(n,e,t,i,r,s){const o=ai(n,e);!function Ed(n,e,t,i,r,s,o){if(null==s)Jt(n)?n.removeAttribute(e,r,t):e.removeAttribute(r);else{const a=null==o?y(s):o(s,i||"",r);Jt(n)?n.setAttribute(e,r,a,t):t?e.setAttributeNS(t,r,a):e.setAttribute(r,a)}}(e[11],o,s,n.value,t,i,r)}function zT(n,e,t,i,r,s){const o=s[e];if(null!==o){const a=i.setInput;for(let l=0;l<o.length;){const c=o[l++],u=o[l++],p=o[l++];null!==a?i.setInput(t,p,c,u):t[u]=p}}}function KT(n,e){let t=null,i=0;for(;i<e.length;){const r=e[i];if(0!==r)if(5!==r){if("number"==typeof r)break;n.hasOwnProperty(r)&&(null===t&&(t=[]),t.push(r,n[r],e[i+1])),i+=2}else i+=2;else i+=4}return t}function n_(n,e,t,i){return new Array(n,!0,!1,e,null,0,i,t,null,null)}function QT(n,e){const t=Yn(e,n);if(gu(t)){const i=t[1];80&t[2]?Rs(i,t,i.template,t[8]):t[5]>0&&bd(t)}}function bd(n){for(let i=Yu(n);null!==i;i=Xu(i))for(let r=10;r<i.length;r++){const s=i[r];if(1024&s[2]){const o=s[1];Rs(o,s,o.template,s[8])}else s[5]>0&&bd(s)}const t=n[1].components;if(null!==t)for(let i=0;i<t.length;i++){const r=Yn(t[i],n);gu(r)&&r[5]>0&&bd(r)}}function ZT(n,e){const t=Yn(e,n),i=t[1];(function JT(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])})(i,t),Ho(i,t,t[8])}function Al(n,e){return n[13]?n[14][4]=e:n[13]=e,n[14]=e,e}function Cd(n){for(;n;){n[2]|=64;const e=jo(n);if(HD(n)&&!e)return n;n=e}return null}function Ad(n,e,t){const i=e[10];i.begin&&i.begin();try{Rs(n,e,n.template,t)}catch(r){throw a_(e,r),r}finally{i.end&&i.end()}}function i_(n){!function Dd(n){for(let e=0;e<n.components.length;e++){const t=n.components[e],i=Wu(t),r=i[1];PT(r,i,r.template,t)}}(n[8])}function Sd(n,e,t){bu(0),e(n,t)}const iw=(()=>Promise.resolve(null))();function r_(n){return n[7]||(n[7]=[])}function s_(n){return n.cleanup||(n.cleanup=[])}function a_(n,e){const t=n[9],i=t?t.get(Hr,null):null;i&&i.handleError(e)}function l_(n,e,t,i,r){for(let s=0;s<t.length;){const o=t[s++],a=t[s++],l=e[o],c=n.data[o];null!==c.setInput?c.setInput(l,r,i,a):l[a]=r}}function rr(n,e,t){const i=za(e,n);!function dm(n,e,t){Jt(n)?n.setValue(e,t):e.textContent=t}(n[11],i,t)}function Sl(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const a=e[o];"number"==typeof a?s=a:1==s?r=ne(r,a):2==s&&(i=ne(i,a+": "+e[++o]+";"))}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}const $o=new ct("INJECTOR",-1);class c_{get(e,t=Ro){if(t===Ro){const i=new Error(`NullInjectorError: No provider for ${pe(e)}!`);throw i.name="NullInjectorError",i}return t}}const Go=new ct("Set Injector scope."),Wo={},ow={};let Td;function u_(){return void 0===Td&&(Td=new c_),Td}function d_(n,e=null,t=null,i){return new lw(n,t,e||u_(),i)}class lw{constructor(e,t,i,r=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const s=[];t&&Vi(t,a=>this.processProvider(a,e,t)),Vi([e],a=>this.processInjectorType(a,[],s)),this.records.set($o,Fs(void 0,this));const o=this.records.get(Go);this.scope=null!=o?o.value:null,this.source=r||("object"==typeof e?null:pe(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=Ro,i=he.Default){this.assertNotDestroyed();const r=Ds(this),s=we(void 0);try{if(!(i&he.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function mw(n){return"function"==typeof n||"object"==typeof n&&n instanceof ct}(e)&&J(e);a=l&&this.injectableDefInScope(l)?Fs(wd(e),Wo):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&he.Self?u_():this.parent).get(e,t=i&he.Optional&&t===Ro?null:t)}catch(o){if("NullInjectorError"===o.name){if((o[Cs]=o[Cs]||[]).unshift(pe(e)),r)throw o;return Rg(o,e,"R3InjectorError",this.source)}throw o}finally{we(s),Ds(r)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((i,r)=>e.push(pe(r))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(e,t,i){if(!(e=O(e)))return!1;let r=S(e);const s=null==r&&e.ngModule||void 0,o=void 0===s?e:s,a=-1!==i.indexOf(o);if(void 0!==s&&(r=S(s)),null==r)return!1;if(null!=r.imports&&!a){let u;i.push(o);try{Vi(r.imports,p=>{this.processInjectorType(p,t,i)&&(void 0===u&&(u=[]),u.push(p))})}finally{}if(void 0!==u)for(let p=0;p<u.length;p++){const{ngModule:b,providers:U}=u[p];Vi(U,z=>this.processProvider(z,b,U||Fe))}}this.injectorDefTypes.add(o);const l=kr(o)||(()=>new o);this.records.set(o,Fs(l,Wo));const c=r.providers;if(null!=c&&!a){const u=e;Vi(c,p=>this.processProvider(p,u,c))}return void 0!==s&&void 0!==e.providers}processProvider(e,t,i){let r=Ps(e=O(e))?e:O(e&&e.provide);const s=function uw(n,e,t){return f_(n)?Fs(void 0,n.useValue):Fs(h_(n),Wo)}(e);if(Ps(e)||!0!==e.multi)this.records.get(r);else{let o=this.records.get(r);o||(o=Fs(void 0,Wo,!0),o.factory=()=>jr(o.multi),this.records.set(r,o)),r=e,o.multi.push(e)}this.records.set(r,s)}hydrate(e,t){return t.value===Wo&&(t.value=ow,t.value=t.factory()),"object"==typeof t.value&&t.value&&function gw(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=O(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function wd(n){const e=J(n),t=null!==e?e.factory:kr(n);if(null!==t)return t;if(n instanceof ct)throw new Error(`Token ${pe(n)} is missing a \u0275prov definition.`);if(n instanceof Function)return function cw(n){const e=n.length;if(e>0){const i=function yr(n,e){const t=[];for(let i=0;i<n;i++)t.push(e);return t}(e,"?");throw new Error(`Can't resolve all parameters for ${pe(n)}: (${i.join(", ")}).`)}const t=function ue(n){const e=n&&(n[F]||n[K]);if(e){const t=function m(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new Error("unreachable")}function h_(n,e,t){let i;if(Ps(n)){const r=O(n);return kr(r)||wd(r)}if(f_(n))i=()=>O(n.useValue);else if(function hw(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...jr(n.deps||[]));else if(function dw(n){return!(!n||!n.useExisting)}(n))i=()=>ze(O(n.useExisting));else{const r=O(n&&(n.useClass||n.provide));if(!function pw(n){return!!n.deps}(n))return kr(r)||wd(r);i=()=>new r(...jr(n.deps))}return i}function Fs(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function f_(n){return null!==n&&"object"==typeof n&&Ou in n}function Ps(n){return"function"==typeof n}const p_=function _w(n,e,t){return function aw(n,e=null,t=null,i){const r=d_(n,e,t,i);return r._resolveInjectorDefTypes(),r}({name:t},e,n,t)};let Nt=(()=>{class n{static create(t,i){return Array.isArray(t)?p_(t,i,""):p_(t.providers,t.parent,t.name||"")}}return n.THROW_IF_NOT_FOUND=Ro,n.NULL=new c_,n.\u0275prov=R({token:n,providedIn:"any",factory:()=>ze($o)}),n.__NG_ELEMENT_ID__=-1,n})();function Iw(n,e){Za(Wu(n)[1],pn())}function Ot(n){let e=function R_(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const i=[n];for(;e;){let r;if(Ei(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(t){i.push(r);const o=n;o.inputs=xd(n.inputs),o.declaredInputs=xd(n.declaredInputs),o.outputs=xd(n.outputs);const a=r.hostBindings;a&&xw(n,a);const l=r.viewQuery,c=r.contentQueries;if(l&&Fw(n,l),c&&Pw(n,c),ce(n.inputs,r.inputs),ce(n.declaredInputs,r.declaredInputs),ce(n.outputs,r.outputs),Ei(r)&&r.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const s=r.features;if(s)for(let o=0;o<s.length;o++){const a=s[o];a&&a.ngInherit&&a(n),a===Ot&&(t=!1)}}e=Object.getPrototypeOf(e)}!function Rw(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=nl(r.hostAttrs,t=nl(t,r.hostAttrs))}}(i)}function xd(n){return n===Te?{}:n===Fe?[]:n}function Fw(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function Pw(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,s)=>{e(i,r,s),t(i,r,s)}:e}function xw(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}let Tl=null;function xs(){if(!Tl){const n=vt.Symbol;if(n&&n.iterator)Tl=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t<e.length;++t){const i=e[t];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Tl=i)}}}return Tl}function zo(n){return!!Nd(n)&&(Array.isArray(n)||!(n instanceof Map)&&xs()in n)}function Nd(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Rn(n,e,t){return!Object.is(n[e],t)&&(n[e]=t,!0)}function Wi(n,e,t,i){const r=Be();return Rn(r,ps(),e)&&(wt(),$i(en(),r,n,e,t,i)),Wi}function Os(n,e,t,i){return Rn(n,ps(),t)?e+y(t)+i:gt}function ks(n,e,t,i,r,s){const a=function Gr(n,e,t,i){const r=Rn(n,e,t);return Rn(n,e+1,i)||r}(n,function tr(){return dt.lFrame.bindingIndex}(),t,r);return nr(2),a?e+y(t)+i+y(r)+s:gt}function $s(n,e,t,i,r,s,o,a){const l=Be(),c=wt(),u=n+20,p=c.firstCreatePass?function jw(n,e,t,i,r,s,o,a,l){const c=e.consts,u=Ms(e,n,4,o||null,gr(c,a));vd(e,t,u,gr(c,l)),Za(e,u);const p=u.tViews=Dl(2,u,i,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,u),p.queries=e.queries.embeddedTView(u)),u}(u,c,l,e,t,i,r,s,o):c.data[u];Li(p,!1);const b=l[11].createComment("");yl(c,l,b,p),In(b,l),Al(l,l[u]=n_(b,l,b,p)),qa(p)&&_d(c,l,p),null!=o&&yd(l,p,a)}function He(n,e=he.Default){const t=Be();return null===t?ze(n,e):Eg(pn(),t,O(n),e)}function bn(n,e,t){const i=Be();return Rn(i,ps(),e)&&ei(wt(),en(),i,n,e,i[11],t,!1),bn}function jd(n,e,t,i,r){const o=r?"class":"style";l_(n,t,e.inputs[o],o,i)}function St(n,e,t,i){const r=Be(),s=wt(),o=20+n,a=r[11],l=r[o]=Zu(a,e,function mA(){return dt.lFrame.currentNamespace}()),c=s.firstCreatePass?function dM(n,e,t,i,r,s,o){const a=e.consts,c=Ms(e,n,2,r,gr(a,s));return vd(e,t,c,gr(a,o)),null!==c.attrs&&Sl(c,c.attrs,!1),null!==c.mergedAttrs&&Sl(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(o,s,r,0,e,t,i):s.data[o];Li(c,!0);const u=c.mergedAttrs;null!==u&&tl(a,l,u);const p=c.classes;null!==p&&rd(a,l,p);const b=c.styles;null!==b&&Sm(a,l,b),64!=(64&c.flags)&&yl(s,r,l,c),0===function eA(){return dt.lFrame.elementDepthCount}()&&In(l,r),function tA(){dt.lFrame.elementDepthCount++}(),qa(c)&&(_d(s,r,c),function Gm(n,e,t){if(lu(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s<r;s++){const o=n.data[s];o.contentQueries&&o.contentQueries(1,t[s],s)}}}(s,c,r)),null!==i&&yd(r,c)}function Tt(){let n=pn();_u()?function yu(){dt.lFrame.isParent=!1}():(n=n.parent,Li(n,!1));const e=n;!function nA(){dt.lFrame.elementDepthCount--}();const t=wt();t.firstCreatePass&&(Za(t,n),lu(n)&&t.queries.elementEnd(n)),null!=e.classesWithoutHost&&function bA(n){return 0!=(16&n.flags)}(e)&&jd(t,e,Be(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function CA(n){return 0!=(32&n.flags)}(e)&&jd(t,e,Be(),e.stylesWithoutHost,!1)}function Ai(n,e,t,i){St(n,e,t,i),Tt()}function Il(){return Be()}function Rl(n){return!!n&&"function"==typeof n.then}const Bd=function ey(n){return!!n&&"function"==typeof n.subscribe};function mn(n,e,t,i){const r=Be(),s=wt(),o=pn();return function ny(n,e,t,i,r,s,o,a){const l=qa(i),u=n.firstCreatePass&&s_(n),p=e[8],b=r_(e);let U=!0;if(3&i.type||a){const re=ai(i,e),Me=a?a(re):re,Ce=b.length,qe=a?Qe=>a(un(Qe[i.index])):i.index;if(Jt(t)){let Qe=null;if(!a&&l&&(Qe=function pM(n,e,t,i){const r=n.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const o=r[s];if(o===t&&r[s+1]===i){const a=e[7],l=r[s+2];return a.length>l?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,e,r,i.index)),null!==Qe)(Qe.__ngLastListenerFn__||Qe).__ngNextListenerFn__=s,Qe.__ngLastListenerFn__=s,U=!1;else{s=Ud(i,e,p,s,!1);const ut=t.listen(Me,r,s);b.push(s,ut),u&&u.push(r,qe,Ce,Ce+1)}}else s=Ud(i,e,p,s,!0),Me.addEventListener(r,s,o),b.push(s),u&&u.push(r,qe,Ce,o)}else s=Ud(i,e,p,s,!1);const z=i.outputs;let ae;if(U&&null!==z&&(ae=z[r])){const re=ae.length;if(re)for(let Me=0;Me<re;Me+=2){const xt=e[ae[Me]][ae[Me+1]].subscribe(s),kt=b.length;b.push(s,xt),u&&u.push(r,i.index,kt,-(kt+1))}}}(s,r,r[11],o,n,e,!!t,i),mn}function iy(n,e,t,i){try{return!1!==t(i)}catch(r){return a_(n,r),!1}}function Ud(n,e,t,i,r){return function s(o){if(o===Function)return i;const a=2&n.flags?Yn(n.index,e):e;0==(32&e[2])&&Cd(a);let l=iy(e,0,i,o),c=s.__ngNextListenerFn__;for(;c;)l=iy(e,0,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function qi(n=1){return function uA(n){return(dt.lFrame.contextLView=function dA(n,e){for(;n>0;)e=e[15],n--;return e}(n,dt.lFrame.contextLView))[8]}(n)}function Ws(n,e,t,i,r){const s=Be(),o=Os(s,e,t,i);return o!==gt&&ei(wt(),en(),s,n,o,s[11],r,!1),Ws}function fy(n,e,t,i,r){const s=n[t+1],o=null===e;let a=i?Ci(s):ir(s),l=!1;for(;0!==a&&(!1===l||o);){const u=n[a+1];EM(n[a],e)&&(l=!0,n[a+1]=i?ad(u):sd(u)),a=i?Ci(u):ir(u)}l&&(n[t+1]=i?sd(s):ad(s))}function EM(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&bs(n,e)>=0}const _n={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function py(n){return n.substring(_n.key,_n.keyEnd)}function bM(n){return n.substring(_n.value,_n.valueEnd)}function gy(n,e){const t=_n.textEnd;return t===e?-1:(e=_n.keyEnd=function AM(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}(n,_n.key=e,t),qs(n,e,t))}function my(n,e){const t=_n.textEnd;let i=_n.key=qs(n,e,t);return t===i?-1:(i=_n.keyEnd=function SM(n,e,t){let i;for(;e<t&&(45===(i=n.charCodeAt(e))||95===i||(-33&i)>=65&&(-33&i)<=90||i>=48&&i<=57);)e++;return e}(n,i,t),i=yy(n,i,t),i=_n.value=qs(n,i,t),i=_n.valueEnd=function TM(n,e,t){let i=-1,r=-1,s=-1,o=e,a=o;for(;o<t;){const l=n.charCodeAt(o++);if(59===l)return a;34===l||39===l?a=o=vy(n,l,o,t):e===o-4&&85===s&&82===r&&76===i&&40===l?a=o=vy(n,41,o,t):l>32&&(a=o),s=r,r=i,i=-33&l}return a}(n,i,t),yy(n,i,t))}function _y(n){_n.key=0,_n.keyEnd=0,_n.value=0,_n.valueEnd=0,_n.textEnd=n.length}function qs(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function yy(n,e,t,i){return(e=qs(n,e,t))<t&&e++,e}function vy(n,e,t,i){let r=-1,s=t;for(;s<i;){const o=n.charCodeAt(s++);if(o==e&&92!==r)return s;r=92==o&&92===r?0:o}throw new Error}function Yo(n,e){return function Si(n,e,t,i){const r=Be(),s=wt(),o=nr(2);s.firstUpdatePass&&Cy(s,n,o,i),e!==gt&&Rn(r,o,e)&&Ay(s,s.data[Vn()],r,r[11],n,r[o+1]=function OM(n,e){return null==n||("string"==typeof e?n+=e:"object"==typeof n&&(n=pe(Zn(n)))),n}(e,t),i,o)}(n,e,null,!0),Yo}function wM(n,e){for(let t=function DM(n){return _y(n),my(n,qs(n,0,_n.textEnd))}(e);t>=0;t=my(e,t))Dy(n,py(e),bM(e))}function Ki(n,e){for(let t=function CM(n){return _y(n),gy(n,qs(n,0,_n.textEnd))}(e);t>=0;t=gy(e,t))Qn(n,py(e),!0)}function Ti(n,e,t,i){const r=wt(),s=nr(2);r.firstUpdatePass&&Cy(r,null,s,i);const o=Be();if(t!==gt&&Rn(o,s,t)){const a=r.data[Vn()];if(Ty(a,i)&&!by(r,s)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=ne(l,t||"")),jd(r,a,o,t,i)}else!function NM(n,e,t,i,r,s,o,a){r===gt&&(r=Fe);let l=0,c=0,u=0<r.length?r[0]:null,p=0<s.length?s[0]:null;for(;null!==u||null!==p;){const b=l<r.length?r[l+1]:void 0,U=c<s.length?s[c+1]:void 0;let ae,z=null;u===p?(l+=2,c+=2,b!==U&&(z=p,ae=U)):null===p||null!==u&&u<p?(l+=2,z=u):(c+=2,z=p,ae=U),null!==z&&Ay(n,e,t,i,z,ae,o,a),u=l<r.length?r[l]:null,p=c<s.length?s[c]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function xM(n,e,t){if(null==t||""===t)return Fe;const i=[],r=Zn(t);if(Array.isArray(r))for(let s=0;s<r.length;s++)n(i,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&n(i,s,r[s]);else"string"==typeof r&&e(i,r);return i}(n,e,t),i,s)}}function by(n,e){return e>=n.expandoStartIndex}function Cy(n,e,t,i){const r=n.data;if(null===r[t+1]){const s=r[Vn()],o=by(n,t);Ty(s,i)&&null===e&&!o&&(e=!1),e=function IM(n,e,t,i){const r=function Eu(n){const e=dt.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=Xo(t=Hd(null,n,e,t,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||n[o]!==r)if(t=Hd(r,n,e,t,i),null===s){let l=function RM(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==ir(i))return n[Ci(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=Hd(null,n,e,l[1],i),l=Xo(l,e.attrs,i),function FM(n,e,t,i){n[Ci(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else s=function PM(n,e,t){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<r;s++)i=Xo(i,n[s].hostAttrs,t);return Xo(i,e.attrs,t)}(n,e,i)}return void 0!==s&&(i?e.residualClasses=s:e.residualStyles=s),t}(r,s,e,i),function yM(n,e,t,i,r,s){let o=s?e.classBindings:e.styleBindings,a=Ci(o),l=ir(o);n[i]=t;let u,c=!1;if(Array.isArray(t)){const p=t;u=p[1],(null===u||bs(p,u)>0)&&(c=!0)}else u=t;if(r)if(0!==l){const b=Ci(n[a+1]);n[i+1]=El(b,a),0!==b&&(n[b+1]=od(n[b+1],i)),n[a+1]=function vT(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=El(a,0),0!==a&&(n[a+1]=od(n[a+1],i)),a=i;else n[i+1]=El(l,0),0===a?a=i:n[l+1]=od(n[l+1],i),l=i;c&&(n[i+1]=sd(n[i+1])),fy(n,u,i,!0),fy(n,u,i,!1),function vM(n,e,t,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof e&&bs(s,e)>=0&&(t[i+1]=ad(t[i+1]))}(e,u,n,i,s),o=El(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,t,o,i)}}function Hd(n,e,t,i,r){let s=null;const o=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a<o&&(s=e[a],i=Xo(i,s.hostAttrs,r),s!==n);)a++;return null!==n&&(t.directiveStylingLast=a),i}function Xo(n,e,t){const i=t?1:2;let r=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?r=o:r===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),Qn(n,o,!!t||e[++s]))}return void 0===n?null:n}function Dy(n,e,t){Qn(n,e,Zn(t))}function Ay(n,e,t,i,r,s,o,a){if(!(3&e.type))return;const l=n.data,c=l[a+1];Fl(function Nm(n){return 1==(1&n)}(c)?Sy(l,e,t,r,ir(c),o):void 0)||(Fl(s)||function xm(n){return 2==(2&n)}(c)&&(s=Sy(l,null,t,r,a,o)),function aT(n,e,t,i,r){const s=Jt(n);if(e)r?s?n.addClass(t,i):t.classList.add(i):s?n.removeClass(t,i):t.classList.remove(i);else{let o=-1===i.indexOf("-")?void 0:Jn.DashCase;if(null==r)s?n.removeStyle(t,i,o):t.style.removeProperty(i);else{const a="string"==typeof r&&r.endsWith("!important");a&&(r=r.slice(0,-10),o|=Jn.Important),s?n.setStyle(t,i,r,o):t.style.setProperty(i,r,a?"important":"")}}}(i,o,za(Vn(),t),r,s))}function Sy(n,e,t,i,r,s){const o=null===e;let a;for(;r>0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,p=null===u;let b=t[r+1];b===gt&&(b=p?Fe:void 0);let U=p?Fu(b,i):u===i?b:void 0;if(c&&!Fl(U)&&(U=Fu(l,i)),Fl(U)&&(a=U,o))return a;const z=n[r+1];r=o?Ci(z):ir(z)}if(null!==e){let l=s?e.residualClasses:e.residualStyles;null!=l&&(a=Fu(l,i))}return a}function Fl(n){return void 0!==n}function Ty(n,e){return 0!=(n.flags&(e?16:32))}function or(n,e=""){const t=Be(),i=wt(),r=n+20,s=i.firstCreatePass?Ms(i,r,1,e,null):i.data[r],o=t[r]=function Qu(n,e){return Jt(n)?n.createText(e):n.createTextNode(e)}(t[11],e);yl(i,t,o,s),Li(s,!1)}function Pl(n){return $d("",n,""),Pl}function $d(n,e,t){const i=Be(),r=Os(i,n,e,t);return r!==gt&&rr(i,Vn(),r),$d}function Gd(n,e,t,i,r){const s=Be(),o=ks(s,n,e,t,i,r);return o!==gt&&rr(s,Vn(),o),Gd}function xl(n,e,t){Ti(Qn,Ki,Os(Be(),n,e,t),!0)}function Oy(n,e,t){!function zi(n){Ti(Dy,wM,n,!1)}(Os(Be(),n,e,t))}function Wd(n,e,t){const i=Be();return Rn(i,ps(),e)&&ei(wt(),en(),i,n,e,i[11],t,!0),Wd}const Wr=void 0;var ZM=["en",[["a","p"],["AM","PM"],Wr],[["AM","PM"],Wr,Wr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Wr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Wr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Wr,"{1} 'at' {0}",Wr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function QM(n){const t=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===i?1:5}];let zs={};function zy(n){return n in zs||(zs[n]=vt.ng&&vt.ng.common&&vt.ng.common.locales&&vt.ng.common.locales[n]),zs[n]}var Xe=(()=>((Xe=Xe||{})[Xe.LocaleId=0]="LocaleId",Xe[Xe.DayPeriodsFormat=1]="DayPeriodsFormat",Xe[Xe.DayPeriodsStandalone=2]="DayPeriodsStandalone",Xe[Xe.DaysFormat=3]="DaysFormat",Xe[Xe.DaysStandalone=4]="DaysStandalone",Xe[Xe.MonthsFormat=5]="MonthsFormat",Xe[Xe.MonthsStandalone=6]="MonthsStandalone",Xe[Xe.Eras=7]="Eras",Xe[Xe.FirstDayOfWeek=8]="FirstDayOfWeek",Xe[Xe.WeekendRange=9]="WeekendRange",Xe[Xe.DateFormat=10]="DateFormat",Xe[Xe.TimeFormat=11]="TimeFormat",Xe[Xe.DateTimeFormat=12]="DateTimeFormat",Xe[Xe.NumberSymbols=13]="NumberSymbols",Xe[Xe.NumberFormats=14]="NumberFormats",Xe[Xe.CurrencyCode=15]="CurrencyCode",Xe[Xe.CurrencySymbol=16]="CurrencySymbol",Xe[Xe.CurrencyName=17]="CurrencyName",Xe[Xe.Currencies=18]="Currencies",Xe[Xe.Directionality=19]="Directionality",Xe[Xe.PluralCase=20]="PluralCase",Xe[Xe.ExtraData=21]="ExtraData",Xe))();const Nl="en-US";let Ky=Nl;function Kd(n,e,t,i,r){if(n=O(n),Array.isArray(n))for(let s=0;s<n.length;s++)Kd(n[s],e,t,i,r);else{const s=wt(),o=Be();let a=Ps(n)?n:O(n.provide),l=h_(n);const c=pn(),u=1048575&c.providerIndexes,p=c.directiveStart,b=c.providerIndexes>>20;if(Ps(n)||!n.multi){const U=new Do(l,r,He),z=Xd(a,e,r?u:u+b,p);-1===z?(sl(So(c,o),s,a),Yd(s,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(U),o.push(U)):(t[z]=U,o[z]=U)}else{const U=Xd(a,e,u+b,p),z=Xd(a,e,u,u+b),ae=U>=0&&t[U],re=z>=0&&t[z];if(r&&!re||!r&&!ae){sl(So(c,o),s,a);const Me=function QI(n,e,t,i,r){const s=new Do(n,t,He);return s.multi=[],s.index=e,s.componentProviders=0,yv(s,r,i&&!t),s}(r?XI:YI,t.length,r,i,l);!r&&re&&(t[z].providerFactory=Me),Yd(s,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(Me),o.push(Me)}else Yd(s,n,U>-1?U:z,yv(t[r?z:U],l,!r&&i));!r&&i&&re&&t[z].componentProviders++}}}function Yd(n,e,t,i){const r=Ps(e);if(r||function fw(n){return!!n.useClass}(e)){const o=(e.useClass||e).prototype.ngOnDestroy;if(o){const a=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const l=a.indexOf(t);-1===l?a.push(t,[i,o]):a[l+1].push(i,o)}else a.push(t,o)}}}function yv(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function Xd(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function YI(n,e,t,i){return Qd(this.multi,[])}function XI(n,e,t,i){const r=this.multi;let s;if(this.providerFactory){const o=this.providerFactory.componentProviders,a=To(t,t[1],this.providerFactory.index,i);s=a.slice(0,o),Qd(r,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Qd(r,s);return s}function Qd(n,e){for(let t=0;t<n.length;t++)e.push((0,n[t])());return e}function Gt(n,e=[]){return t=>{t.providersResolver=(i,r)=>function KI(n,e,t){const i=wt();if(i.firstCreatePass){const r=Ei(n);Kd(t,i.data,i.blueprint,r,!0),Kd(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class vv{}const bv="ngComponent";class JI{resolveComponentFactory(e){throw function Ev(n){const e=Error(`No component factory found for ${pe(n)}. Did you add it to @NgModule.entryComponents?`);return e[bv]=n,e}(e)}}let br=(()=>{class n{}return n.NULL=new JI,n})();function jl(...n){}function Ys(n,e){return new Cn(ai(n,e))}const nR=function eR(){return Ys(pn(),Be())};let Cn=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=nR,n})();function Cv(n){return n instanceof Cn?n.nativeElement:n}class qr{}let zr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>rR(),n})();const rR=function oR(){const n=Be(),t=Yn(pn().index,n);return function sR(n){return n[11]}(ki(t)?t:n)};let Jd=(()=>{class n{}return n.\u0275prov=R({token:n,providedIn:"root",factory:()=>null}),n})();class Cr{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Dv=new Cr("13.0.1"),Xs={};function Bl(n,e,t,i,r=!1){for(;null!==t;){const s=e[t.index];if(null!==s&&i.push(un(s)),vi(s))for(let a=10;a<s.length;a++){const l=s[a],c=l[1].firstChild;null!==c&&Bl(l[1],l,c,i)}const o=t.type;if(8&o)Bl(n,e,t.child,i);else if(32&o){const a=Ku(t,e);let l;for(;l=a();)i.push(l)}else if(16&o){const a=Cm(e,t);if(Array.isArray(a))i.push(...a);else{const l=jo(e[16]);Bl(l[1],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}class ta{constructor(e,t){this._lView=e,this._cdRefInjectingView=t,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const e=this._lView,t=e[1];return Bl(t,e,t.firstChild,[])}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[3];if(vi(e)){const t=e[8],i=t?t.indexOf(this):-1;i>-1&&(Ju(e,i),Vr(t,i))}this._attachedToViewContainer=!1}fm(this._lView[1],this._lView)}onDestroy(e){Km(this._lView[1],this._lView,null,e)}markForCheck(){Cd(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Ad(this._lView[1],this._lView,this.context)}checkNoChanges(){!function tw(n,e,t){Ya(!0);try{Ad(n,e,t)}finally{Ya(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function QS(n,e){Bo(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}class aR extends ta{constructor(e){super(e),this._view=e}detectChanges(){i_(this._view)}checkNoChanges(){!function nw(n){Ya(!0);try{i_(n)}finally{Ya(!1)}}(this._view)}get context(){return null}}class Av extends br{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=Bt(e);return new eh(t,this.ngModule)}}function Sv(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}const cR=new ct("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>sm});class eh extends vv{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function _T(n){return n.map(mT).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return Sv(this.componentDef.inputs)}get outputs(){return Sv(this.componentDef.outputs)}create(e,t,i,r){const s=(r=r||this.ngModule)?function uR(n,e){return{get:(t,i,r)=>{const s=n.get(t,Xs,r);return s!==Xs||i===Xs?s:e.get(t,i,r)}}}(e,r.injector):e,o=s.get(qr,Jp),a=s.get(Jd,null),l=o.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=i?function zm(n,e,t){if(Jt(n))return n.selectRootElement(e,t===Ke.ShadowDom);let i="string"==typeof e?n.querySelector(e):e;return i.textContent="",i}(l,i,this.componentDef.encapsulation):Zu(o.createRenderer(null,this.componentDef),c,function lR(n){const e=n.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),p=this.componentDef.onPush?576:528,b=function I_(n,e){return{components:[],scheduler:n||sm,clean:iw,playerHandler:e||null,flags:0}}(),U=Dl(0,null,null,1,0,null,null,null,null,null),z=Uo(null,U,b,p,null,null,o,l,a,s);let ae,re;Xa(z);try{const Me=function w_(n,e,t,i,r,s){const o=t[1];t[20]=n;const l=Ms(o,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(Sl(l,c,!0),null!==n&&(tl(r,n,c),null!==l.classes&&rd(r,n,l.classes),null!==l.styles&&Sm(r,n,l.styles)));const u=i.createRenderer(n,e),p=Uo(t,Wm(e),null,e.onPush?64:16,t[20],l,i,u,s||null,null);return o.firstCreatePass&&(sl(So(l,t),o,e.type),Jm(o,l),e_(l,t.length,1)),Al(t,p),t[20]=p}(u,this.componentDef,z,o,l);if(u)if(i)tl(l,u,["ng-version",Dv.full]);else{const{attrs:Ce,classes:qe}=function yT(n){const e=[],t=[];let i=1,r=2;for(;i<n.length;){let s=n[i];if("string"==typeof s)2===r?""!==s&&e.push(s,n[++i]):8===r&&t.push(s);else{if(!bi(r))break;r=s}i++}return{attrs:e,classes:t}}(this.componentDef.selectors[0]);Ce&&tl(l,u,Ce),qe&&qe.length>0&&rd(l,u,qe.join(" "))}if(re=pu(U,20),void 0!==t){const Ce=re.projection=[];for(let qe=0;qe<this.ngContentSelectors.length;qe++){const Qe=t[qe];Ce.push(null!=Qe?Array.from(Qe):null)}}ae=function M_(n,e,t,i,r){const s=t[1],o=function jT(n,e,t){const i=pn();n.firstCreatePass&&(t.providersResolver&&t.providersResolver(t),t_(n,i,e,Is(n,e,1,null),t));const r=To(e,n,i.directiveStart,i);In(r,e);const s=ai(i,e);return s&&In(s,e),r}(s,t,e);if(i.components.push(o),n[8]=o,r&&r.forEach(l=>l(o,e)),e.contentQueries){const l=pn();e.contentQueries(1,o,l.directiveStart)}const a=pn();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(mr(a.index),Qm(t[1],a,0,a.directiveStart,a.directiveEnd,e),Zm(e,o)),o}(Me,this.componentDef,z,b,[Iw]),Ho(U,z,null)}finally{Qa()}return new hR(this.componentType,ae,Ys(re,z),z,re)}}class hR extends class ZI{}{constructor(e,t,i,r,s){super(),this.location=i,this._rootLView=r,this._tNode=s,this.instance=t,this.hostView=this.changeDetectorRef=new aR(r),this.componentType=e}get injector(){return new _s(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Kr{}const Qs=new Map;class wv extends Kr{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Av(this);const i=Kt(e);this._bootstrapComponents=Hi(i.bootstrap),this._r3Injector=d_(e,t,[{provide:Kr,useValue:this},{provide:br,useValue:this.componentFactoryResolver}],pe(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=Nt.THROW_IF_NOT_FOUND,i=he.Default){return e===Nt||e===Kr||e===$o?this:this._r3Injector.get(e,t,i)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class nh extends class pR{}{constructor(e){super(),this.moduleType=e,null!==Kt(e)&&function gR(n){const e=new Set;!function t(i){const r=Kt(i,!0),s=r.id;null!==s&&(function Tv(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${pe(e)} vs ${pe(e.name)}`)}(s,Qs.get(s),i),Qs.set(s,i));const o=Hi(r.imports);for(const a of o)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new wv(this.moduleType,e)}}function ih(n){return e=>{setTimeout(n,void 0,e)}}const dn=class xR extends k.Subject{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){var r,s,o;let a=e,l=t||(()=>null),c=i;if(e&&"object"==typeof e){const p=e;a=null===(r=p.next)||void 0===r?void 0:r.bind(p),l=null===(s=p.error)||void 0===s?void 0:s.bind(p),c=null===(o=p.complete)||void 0===o?void 0:o.bind(p)}this.__isAsync&&(l=ih(l),a&&(a=ih(a)),c&&(c=ih(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof k.Subscription&&e.add(u),u}};function NR(){return this._results[xs()]()}class Ul{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=xs(),i=Ul.prototype;i[t]||(i[t]=NR)}get changes(){return this._changes||(this._changes=new dn)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const i=this;i.dirty=!1;const r=li(e);(this._changesDetected=!function PA(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],s=e[i];if(t&&(r=t(r),s=t(s)),s!==r)return!1}return!0}(i._results,r,t))&&(i._results=r,i.length=r.length,i.last=r[this.length-1],i.first=r[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}Symbol;const kR=function jR(){return Hl(pn(),Be())};let ar=(()=>{class n{}return n.__NG_ELEMENT_ID__=kR,n})();const LR=ar,VR=class extends LR{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e){const t=this._declarationTContainer.tViews,i=Uo(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(i[19]=s.createEmbeddedView(t)),Ho(t,i,e),new ta(i)}};function Hl(n,e){return 4&n.type?new VR(e,n,Ys(n,e)):null}const UR=function HR(){return Ov(pn(),Be())};let Yi=(()=>{class n{}return n.__NG_ELEMENT_ID__=UR,n})();const $R=Yi,xv=class extends $R{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Ys(this._hostTNode,this._hostLView)}get injector(){return new _s(this._hostTNode,this._hostLView)}get parentInjector(){const e=rl(this._hostTNode,this._hostLView);if(gg(e)){const t=ms(e,this._hostLView),i=gs(e);return new _s(t[1].data[i+8],t)}return new _s(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=Nv(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,i){const r=e.createEmbeddedView(t||{});return this.insert(r,i),r}createComponent(e,t,i,r,s){const o=e&&!function Mo(n){return"function"==typeof n}(e);let a;if(o)a=t;else{const p=t||{};a=p.index,i=p.injector,r=p.projectableNodes,s=p.ngModuleRef}const l=o?e:new eh(Bt(e)),c=i||this.parentInjector;if(!s&&null==l.ngModule&&c){const p=c.get(Kr,null);p&&(s=p)}const u=l.create(c,r,void 0,s);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[1];if(function JD(n){return vi(n[3])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const p=i[3],b=new xv(p,p[6],p[3]);b.detach(b.indexOf(e))}}const s=this._adjustIndex(t),o=this._lContainer;!function JS(n,e,t,i){const r=10+i,s=t.length;i>0&&(t[r-1][4]=e),i<s-10?(e[4]=t[r],ll(t,10+i,e)):(t.push(e),e[4]=null),e[3]=t;const o=e[17];null!==o&&t!==o&&function eT(n,e){const t=n[9];e[16]!==e[3][3][16]&&(n[2]=!0),null===t?n[9]=[e]:t.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(n),e[2]|=128}(r,i,o,s);const a=nd(s,o),l=i[11],c=_l(l,o[7]);return null!==c&&function XS(n,e,t,i,r,s){i[0]=r,i[6]=e,Bo(n,i,t,1,r,s)}(r,o[6],l,i,c,a),e.attachToViewContainerRef(),ll(rh(o),s,e),e}move(e,t){return this.insert(e,t)}indexOf(e){const t=Nv(this._lContainer);return null!==t?t.indexOf(e):-1}remove(e){const t=this._adjustIndex(e,-1),i=Ju(this._lContainer,t);i&&(Vr(rh(this._lContainer),t),fm(i[1],i))}detach(e){const t=this._adjustIndex(e,-1),i=Ju(this._lContainer,t);return i&&null!=Vr(rh(this._lContainer),t)?new ta(i):null}_adjustIndex(e,t=0){return null==e?this.length+t:e}};function Nv(n){return n[8]}function rh(n){return n[8]||(n[8]=[])}function Ov(n,e){let t;const i=e[n.index];if(vi(i))t=i;else{let r;if(8&n.type)r=un(i);else{const s=e[11];r=s.createComment("");const o=ai(n,e);$r(s,_l(s,o),r,function rT(n,e){return Jt(n)?n.nextSibling(e):e.nextSibling}(s,o),!1)}e[n.index]=t=n_(i,e,r,n),Al(e,t)}return new xv(t,n,e)}class sh{constructor(e){this.queryList=e,this.matches=null}clone(){return new sh(this.queryList)}setDirty(){this.queryList.setDirty()}}class oh{constructor(e=[]){this.queries=e}createEmbeddedView(e){const t=e.queries;if(null!==t){const i=null!==e.contentQueries?e.contentQueries[0]:t.length,r=[];for(let s=0;s<i;s++){const o=t.getByIndex(s);r.push(this.queries[o.indexInDeclarationView].clone())}return new oh(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==$v(e,t).matches&&this.queries[t].setDirty()}}class kv{constructor(e,t,i=null){this.predicate=e,this.flags=t,this.read=i}}class ah{constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){const r=null!==t?t.length:0,s=this.getByIndex(i).embeddedTView(e,r);s&&(s.indexInDeclarationView=i,null!==t?t.push(s):t=[s])}return null!==t?new ah(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}}class lh{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new lh(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const t=this._declarationNodeIndex;let i=e.parent;for(;null!==i&&8&i.type&&i.index!==t;)i=i.parent;return t===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){const i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){const s=i[r];this.matchTNodeWithReadOption(e,t,qR(t,s)),this.matchTNodeWithReadOption(e,t,ol(t,e,s,!1,!1))}else i===ar?4&t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,ol(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(null!==i){const r=this.metadata.read;if(null!==r)if(r===Cn||r===Yi||r===ar&&4&t.type)this.addMatch(t.index,-2);else{const s=ol(t,e,r,!1,!1);null!==s&&this.addMatch(t.index,s)}else this.addMatch(t.index,i)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}function qR(n,e){const t=n.localNames;if(null!==t)for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1];return null}function KR(n,e,t,i){return-1===t?function zR(n,e){return 11&n.type?Ys(n,e):4&n.type?Hl(n,e):null}(e,n):-2===t?function YR(n,e,t){return t===Cn?Ys(e,n):t===ar?Hl(e,n):t===Yi?Ov(e,n):void 0}(n,e,i):To(n,n[1],t,e)}function Lv(n,e,t,i){const r=e[19].queries[i];if(null===r.matches){const s=n.data,o=t.matches,a=[];for(let l=0;l<o.length;l+=2){const c=o[l];a.push(c<0?null:KR(e,s[c],o[l+1],t.metadata.read))}r.matches=a}return r.matches}function ch(n,e,t,i){const r=n.queries.getByIndex(t),s=r.matches;if(null!==s){const o=Lv(n,e,r,t);for(let a=0;a<s.length;a+=2){const l=s[a];if(l>0)i.push(o[a/2]);else{const c=s[a+1],u=e[-l];for(let p=10;p<u.length;p++){const b=u[p];b[17]===b[3]&&ch(b[1],b,c,i)}if(null!==u[9]){const p=u[9];for(let b=0;b<p.length;b++){const U=p[b];ch(U[1],U,c,i)}}}}}return i}function Vv(n){const e=Be(),t=wt(),i=og();bu(i+1);const r=$v(t,i);if(n.dirty&&eg(e)===(2==(2&r.metadata.flags))){if(null===r.matches)n.reset([]);else{const s=r.crossesNgTemplate?ch(t,e,i,[]):Lv(t,e,r,i);n.reset(s,Cv),n.notifyOnChanges()}return!0}return!1}function jv(n,e,t){const i=wt();i.firstCreatePass&&(function Hv(n,e,t){null===n.queries&&(n.queries=new ah),n.queries.track(new lh(e,t))}(i,new kv(n,e,t),-1),2==(2&e)&&(i.staticViewQueries=!0)),function Uv(n,e,t){const i=new Ul(4==(4&t));Km(n,e,i,i.destroy),null===e[19]&&(e[19]=new oh),e[19].queries.push(new sh(i))}(i,Be(),e)}function $v(n,e){return n.queries.getByIndex(e)}const Wl=new ct("Application Initializer");let Js=(()=>{class n{constructor(t){this.appInits=t,this.resolve=jl,this.reject=jl,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r<this.appInits.length;r++){const s=this.appInits[r]();if(Rl(s))t.push(s);else if(Bd(s)){const o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});t.push(o)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(ze(Wl,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const sa=new ct("AppId"),vF={provide:sa,useFactory:function yF(){return`${gh()}${gh()}${gh()}`},deps:[]};function gh(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const oE=new ct("Platform Initializer"),ql=new ct("Platform ID"),EF=new ct("appBootstrapListener");let mh=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const lr=new ct("LocaleId"),aE=new ct("DefaultCurrencyCode");class CF{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}const _h=function(n){return new nh(n)},DF=_h,AF=function(n){return Promise.resolve(_h(n))},cE=function(n){const e=_h(n),i=Hi(Kt(n).declarations).reduce((r,s)=>{const o=Bt(s);return o&&r.push(new eh(o)),r},[]);return new CF(e,i)},SF=cE,TF=function(n){return Promise.resolve(cE(n))};let uE=(()=>{class n{constructor(){this.compileModuleSync=DF,this.compileModuleAsync=AF,this.compileModuleAndAllComponentsSync=SF,this.compileModuleAndAllComponentsAsync=TF}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const IF=(()=>Promise.resolve(0))();function yh(n){"undefined"==typeof Zone?IF.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Yt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new dn(!1),this.onMicrotaskEmpty=new dn(!1),this.onStable=new dn(!1),this.onError=new dn(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function RF(){let n=vt.requestAnimationFrame,e=vt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function xF(n){const e=()=>{!function PF(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(vt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Eh(n),n.isCheckStableRunning=!0,vh(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Eh(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,s,o,a)=>{try{return dE(n),t.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&e(),hE(n)}},onInvoke:(t,i,r,s,o,a,l)=>{try{return dE(n),t.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),hE(n)}},onHasTask:(t,i,r,s)=>{t.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,Eh(n),vh(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,i,r,s)=>(t.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Yt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Yt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,e,FF,jl,jl);try{return s.runTask(o,t,i)}finally{s.cancelTask(o)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const FF={};function vh(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Eh(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function dE(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function hE(n){n._nesting--,vh(n)}class NF{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new dn,this.onMicrotaskEmpty=new dn,this.onStable=new dn,this.onError=new dn}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}let bh=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Yt.assertNotInAngularZone(),yh(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())yh(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(ze(Yt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),fE=(()=>{class n{constructor(){this._applications=new Map,Ch.addToWindow(this)}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return Ch.findTestabilityInTree(this,t,i)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class OF{addToWindow(e){}findTestabilityInTree(e,t,i){return null}}let Ch=new OF,gE=!1;function Dh(){return gE=!0,true}let wi;const mE=new ct("AllowMultipleToken");function _E(n,e,t=[]){const i=`Platform: ${e}`,r=new ct(i);return(s=[])=>{let o=yE();if(!o||o.injector.get(mE,!1))if(n)n(t.concat(s).concat({provide:r,useValue:!0}));else{const a=t.concat(s).concat({provide:r,useValue:!0},{provide:Go,useValue:"platform"});!function GF(n){if(wi&&!wi.destroyed&&!wi.injector.get(mE,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");wi=n.get(vE);const e=n.get(oE,null);e&&e.forEach(t=>t())}(Nt.create({providers:a,name:i}))}return function WF(n){const e=yE();if(!e)throw new Error("No platform exists!");if(!e.injector.get(n,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function yE(){return wi&&!wi.destroyed?wi:null}let vE=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const a=function qF(n,e){let t;return t="noop"===n?new NF:("zone.js"===n?void 0:n)||new Yt({enableLongStackTrace:Dh(),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(i?i.ngZone:void 0,{ngZoneEventCoalescing:i&&i.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:i&&i.ngZoneRunCoalescing||!1}),l=[{provide:Yt,useValue:a}];return a.run(()=>{const c=Nt.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),p=u.injector.get(Hr,null);if(!p)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(()=>{const b=a.onError.subscribe({next:U=>{p.handleError(U)}});u.onDestroy(()=>{Ah(this._modules,u),b.unsubscribe()})}),function zF(n,e,t){try{const i=t();return Rl(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(p,a,()=>{const b=u.injector.get(Js);return b.runInitializers(),b.donePromise.then(()=>(function iI(n){Ae(n,"Expected localeId to be defined"),"string"==typeof n&&(Ky=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(lr,Nl)||Nl),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,i=[]){const r=EE({},i);return function VF(n,e,t){const i=new nh(t);return Promise.resolve(i)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const i=t.injector.get(eo);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${pe(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(ze(Nt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function EE(n,e){return Array.isArray(e)?e.reduce(EE,n):Object.assign(Object.assign({},n),e)}let eo=(()=>{class n{constructor(t,i,r,s,o){this._zone=t,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=s,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new k.Observable(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new k.Observable(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{Yt.assertNotInAngularZone(),yh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const p=this._zone.onUnstable.subscribe(()=>{Yt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),p.unsubscribe()}});this.isStable=(0,k.merge)(a,l.pipe((0,j.share)()))}bootstrap(t,i){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let r;r=t instanceof vv?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(r.componentType);const s=function HF(n){return n.isBoundToModule}(r)?void 0:this._injector.get(Kr),a=r.create(Nt.NULL,[],i||r.selector,s),l=a.location.nativeElement,c=a.injector.get(bh,null),u=c&&a.injector.get(fE);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Ah(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;Ah(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(EF,[]).concat(this._bootstrapListeners).forEach(r=>r(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(ze(Yt),ze(Nt),ze(Hr),ze(br),ze(Js))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function Ah(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const XF=function QF(n){return function ZF(n,e,t){if(Wa(n)&&!t){const i=Yn(n.index,e);return new ta(i,i)}return 47&n.type?new ta(e[16],e):null}(pn(),Be(),16==(16&n))};let oa=(()=>{class n{}return n.__NG_ELEMENT_ID__=XF,n})();class wE{constructor(){}supports(e){return zo(e)}create(e){return new cP(e)}}const lP=(n,e)=>e;class cP{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||lP}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,s=null;for(;t||i;){const o=!i||t&&t.currentIndex<IE(i,r,s)?t:i,a=IE(o,r,s),l=o.currentIndex;if(o===i)r--,i=i._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{s||(s=[]);const c=a-r,u=l-r;if(c!=u){for(let b=0;b<c;b++){const U=b<s.length?s[b]:s[b]=0,z=U+b;u<=z&&z<c&&(s[b]=U+1)}s[o.previousIndex]=u-c}}a!==l&&e(o,a,l)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!zo(e))throw new Error(`Error trying to diff '${pe(e)}'. Only arrays and iterables are allowed`);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let r,s,o,t=this._itHead,i=!1;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)s=e[a],o=this._trackByFn(a,s),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,s,o,a)),Object.is(t.item,s)||this._addIdentityChange(t,s)):(t=this._mismatch(t,s,o,a),i=!0),t=t._next}else r=0,function Vw(n,e){if(Array.isArray(n))for(let t=0;t<n.length;t++)e(n[t]);else{const t=n[xs()]();let i;for(;!(i=t.next()).done;)e(i.value)}}(e,a=>{o=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,a,o,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,o,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let s;return null===e?s=this._itTail:(s=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):e=this._addAfter(new uP(t,i),s,r),e}_verifyReinsertion(e,t,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,s=e._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new ME),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ME),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class uP{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class dP{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class ME{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new dP,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function IE(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i<t.length&&(r=t[i]),i+e+r}class RE{constructor(){}supports(e){return e instanceof Map||Nd(e)}create(){return new hP}}class hP{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||Nd(e)))throw new Error(`Error trying to diff '${pe(e)}'. Only maps and objects are allowed`)}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(i,r)=>{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new fP(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class fP{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function FE(){return new aa([new wE])}let aa=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||FE()),deps:[[n,new Br,new ji]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new Error(`Cannot find a differ supporting object '${t}' of type '${function pP(n){return n.name||typeof n}(t)}'`)}}return n.\u0275prov=R({token:n,providedIn:"root",factory:FE}),n})();function PE(){return new to([new RE])}let to=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||PE()),deps:[[n,new Br,new ji]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return n.\u0275prov=R({token:n,providedIn:"root",factory:PE}),n})();const gP=[new RE],_P=new aa([new wE]),yP=new to(gP),vP=_E(null,"core",[{provide:ql,useValue:"unknown"},{provide:vE,deps:[Nt]},{provide:fE,deps:[]},{provide:mh,deps:[]}]),AP=[{provide:eo,useClass:eo,deps:[Yt,Nt,Hr,br,Js]},{provide:cR,deps:[Yt],useFactory:function SP(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Js,useClass:Js,deps:[[new ji,Wl]]},{provide:uE,useClass:uE,deps:[]},vF,{provide:aa,useFactory:function EP(){return _P},deps:[]},{provide:to,useFactory:function bP(){return yP},deps:[]},{provide:lr,useFactory:function CP(n){return n||function DP(){return"undefined"!=typeof $localize&&$localize.locale||Nl}()},deps:[[new xo(lr),new ji,new Br]]},{provide:aE,useValue:"USD"}];let TP=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(ze(eo))},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:AP}),n})(),oc=null;function Jr(){return oc}const Qt=new ct("DocumentToken");var hn=(()=>((hn=hn||{})[hn.Zero=0]="Zero",hn[hn.One=1]="One",hn[hn.Two=2]="Two",hn[hn.Few=3]="Few",hn[hn.Many=4]="Many",hn[hn.Other=5]="Other",hn))();const MN=function qy(n){return function Bn(n){const e=function JM(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=zy(e);if(t)return t;const i=e.split("-")[0];if(t=zy(i),t)return t;if("en"===i)return ZM;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[Xe.PluralCase]};class mc{}let iO=(()=>{class n extends mc{constructor(t){super(),this.locale=t}getPluralCategory(t,i){switch(MN(i||this.locale)(t)){case hn.Zero:return"zero";case hn.One:return"one";case hn.Two:return"two";case hn.Few:return"few";case hn.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(ze(lr))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class aO{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Tb=(()=>{class n{constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error(`Cannot find a differ supporting object '${t}' of type '${function lO(n){return n.name||typeof n}(t)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=[];t.forEachOperation((r,s,o)=>{if(null==r.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new aO(null,this._ngForOf,-1,-1),null===o?void 0:o),l=new wb(r,a);i.push(l)}else if(null==o)this._viewContainer.remove(null===s?void 0:s);else if(null!==s){const a=this._viewContainer.get(s);this._viewContainer.move(a,o);const l=new wb(r,a);i.push(l)}});for(let r=0;r<i.length;r++)this._perViewChange(i[r].view,i[r].record);for(let r=0,s=this._viewContainer.length;r<s;r++){const o=this._viewContainer.get(r);o.context.index=r,o.context.count=s,o.context.ngForOf=this._ngForOf}t.forEachIdentityChange(r=>{this._viewContainer.get(r.currentIndex).context.$implicit=r.item})}_perViewChange(t,i){t.context.$implicit=i.item}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(He(Yi),He(ar),He(aa))},n.\u0275dir=We({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();class wb{constructor(e,t){this.record=e,this.view=t}}let Mb=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new cO,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Ib("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Ib("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(He(Yi),He(ar))},n.\u0275dir=We({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class cO{constructor(){this.$implicit=null,this.ngIf=null}}function Ib(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${pe(e)}'.`)}let Fb=(()=>{class n{constructor(t,i,r){this._ngEl=t,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,i){const[r,s]=t.split(".");null!=(i=null!=i&&s?`${i}${s}`:i)?this._renderer.setStyle(this._ngEl.nativeElement,r,i):this._renderer.removeStyle(this._ngEl.nativeElement,r)}_applyChanges(t){t.forEachRemovedItem(i=>this._setStyle(i.key,null)),t.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),t.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(He(Cn),He(to),He(zr))},n.\u0275dir=We({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),n})(),ba=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[{provide:mc,useClass:iO}]}),n})();const xb="browser";class df extends class UO extends class yN{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function _N(n){oc||(oc=n)}(new df)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function HO(){return Ca=Ca||document.querySelector("base"),Ca?Ca.getAttribute("href"):null}();return null==t?null:function $O(n){_c=_c||document.createElement("a"),_c.setAttribute("href",n);const e=_c.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){Ca=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function rO(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,s]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}(document.cookie,e)}}let _c,Ca=null;const Ob=new ct("TRANSITION_ID"),WO=[{provide:Wl,useFactory:function GO(n,e,t){return()=>{t.get(Js).donePromise.then(()=>{const i=Jr(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s<r.length;s++)i.remove(r[s])})}},deps:[Ob,Qt,Nt],multi:!0}];class hf{static init(){!function kF(n){Ch=n}(new hf)}addToWindow(e){vt.getAngularTestability=(i,r=!0)=>{const s=e.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},vt.getAllAngularTestabilities=()=>e.getAllTestabilities(),vt.getAllAngularRootElements=()=>e.getAllRootElements(),vt.frameworkStabilizers||(vt.frameworkStabilizers=[]),vt.frameworkStabilizers.push(i=>{const r=vt.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:i?Jr().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let qO=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Da=new ct("EventManagerPlugins");let vc=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>r.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let s=0;s<r.length;s++){const o=r[s];if(o.supports(t))return this._eventNameToPlugin.set(t,o),o}throw new Error(`No event manager plugin found for event ${t}`)}}return n.\u0275fac=function(t){return new(t||n)(ze(Da),ze(Yt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class ff{constructor(e){this._doc=e}addGlobalEventListener(e,t,i){const r=Jr().getGlobalEventTarget(this._doc,e);if(!r)throw new Error(`Unsupported event target ${r} for event ${t}`);return this.addEventListener(r,t,i)}}let Lb=(()=>{class n{constructor(){this._stylesSet=new Set}addStyles(t){const i=new Set;t.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Aa=(()=>{class n extends Lb{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,i,r){t.forEach(s=>{const o=this._doc.createElement("style");o.textContent=s,r.push(i.appendChild(o))})}addHost(t){const i=[];this._addStylesToHost(this._stylesSet,t,i),this._hostNodes.set(t,i)}removeHost(t){const i=this._hostNodes.get(t);i&&i.forEach(Vb),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(t,r,i)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(Vb))}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function Vb(n){Jr().remove(n)}const pf={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},gf=/%COMP%/g;function Ec(n,e,t){for(let i=0;i<e.length;i++){let r=e[i];Array.isArray(r)?Ec(n,r,t):(r=r.replace(gf,n),t.push(r))}return t}function Ub(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let bc=(()=>{class n{constructor(t,i,r){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new mf(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;switch(i.encapsulation){case Ke.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new l1(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(t),r}case 1:case Ke.ShadowDom:return new c1(this.eventManager,this.sharedStylesHost,t,i);default:if(!this.rendererByCompId.has(i.id)){const r=Ec(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(ze(vc),ze(Aa),ze(sa))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class mf{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(pf[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,i){e&&e.insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const s=pf[r];s?e.setAttributeNS(s,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=pf[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(Jn.DashCase|Jn.Important)?e.style.setProperty(t,i,r&Jn.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&Jn.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Ub(i)):this.eventManager.addEventListener(e,t,Ub(i))}}class l1 extends mf{constructor(e,t,i,r){super(e),this.component=i;const s=Ec(r+"-"+i.id,i.styles,[]);t.addStyles(s),this.contentAttr=function s1(n){return"_ngcontent-%COMP%".replace(gf,n)}(r+"-"+i.id),this.hostAttr=function o1(n){return"_nghost-%COMP%".replace(gf,n)}(r+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}class c1 extends mf{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=Ec(r.id,r.styles,[]);for(let o=0;o<s.length;o++){const a=document.createElement("style");a.textContent=s[o],this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let u1=(()=>{class n extends ff{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Gb=["alt","control","meta","shift"],_1={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Wb={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},y1={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let v1=(()=>{class n extends ff{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Jr().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="";if(Gb.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),o+=l+".")}),o+=s,0!=i.length||0===s.length)return null;const a={};return a.domEventName=r,a.fullKey=o,a}static getEventFullKey(t){let i="",r=function E1(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&Wb.hasOwnProperty(e)&&(e=Wb[e]))}return _1[e]||e}(t);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),Gb.forEach(s=>{s!=r&&y1[s](t)&&(i+=s+".")}),i+=r,i}static eventCallback(t,i,r){return s=>{n.getEventFullKey(s)===t&&r.runGuarded(()=>i(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Cc=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:function(t){let i=null;return i=t?new(t||n):ze(yf),i},providedIn:"root"}),n})(),yf=(()=>{class n extends Cc{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case Vt.NONE:return i;case Vt.HTML:return Bi(i,"HTML")?Zn(i):qg(this._doc,String(i)).toString();case Vt.STYLE:return Bi(i,"Style")?Zn(i):i;case Vt.SCRIPT:if(Bi(i,"Script"))return Zn(i);throw new Error("unsafe value used in a script context");case Vt.URL:return Vg(i),Bi(i,"URL")?Zn(i):Oo(String(i));case Vt.RESOURCE_URL:if(Bi(i,"ResourceURL"))return Zn(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function oS(n){return new tS(n)}(t)}bypassSecurityTrustStyle(t){return function aS(n){return new nS(n)}(t)}bypassSecurityTrustScript(t){return function lS(n){return new iS(n)}(t)}bypassSecurityTrustUrl(t){return function cS(n){return new rS(n)}(t)}bypassSecurityTrustResourceUrl(t){return function uS(n){return new sS(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt))},n.\u0275prov=R({token:n,factory:function(t){let i=null;return i=t?new t:function b1(n){return new yf(n.get(Qt))}(ze(Nt)),i},providedIn:"root"}),n})();const w1=_E(vP,"browser",[{provide:ql,useValue:xb},{provide:oE,useValue:function C1(){df.makeCurrent(),hf.init()},multi:!0},{provide:Qt,useFactory:function A1(){return function YD(n){hu=n}(document),document},deps:[]}]),M1=[[],{provide:Go,useValue:"root"},{provide:Hr,useFactory:function D1(){return new Hr},deps:[]},{provide:Da,useClass:u1,multi:!0,deps:[Qt,Yt,ql]},{provide:Da,useClass:v1,multi:!0,deps:[Qt]},[],{provide:bc,useClass:bc,deps:[vc,Aa,sa]},{provide:qr,useExisting:bc},{provide:Lb,useExisting:Aa},{provide:Aa,useClass:Aa,deps:[Qt]},{provide:bh,useClass:bh,deps:[Yt]},{provide:vc,useClass:vc,deps:[Da,Yt]},{provide:class BO{},useClass:qO,deps:[]},[]];let I1=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:sa,useValue:t.appId},{provide:Ob,useExisting:sa},WO]}}}return n.\u0275fac=function(t){return new(t||n)(ze(n,12))},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:M1,imports:[ba,TP]}),n})();"undefined"!=typeof window&&window;const Sa=Handlebars,bf={},ao=[{name:"ifEquals",function:"function(arg1, arg2, options) {return (arg1 === arg2) ? options.fn(this) : options.inverse(this);}"},{name:"ifNotEquals",function:"function(arg1, arg2, options) {return (arg1 !== arg2) ? options.fn(this) : options.inverse(this);}"},{name:"switch",function:"function(value, options) {this.switch_value = value;this.switch_break = false; return options.fn(this);}"},{name:"case",function:"function(value, options) {if (value === this.switch_value) {this.switch_break = true;return options.fn(this);}}"},{name:"default",function:"function(value, options) {if (this.switch_break === false) {return value;}}"},{name:"dateFormat",function:"function(date, format, options) { return moment(date).format(format); }"},{name:"dateAdd",function:"function(date, amount, what, options) { return moment(date).add(amount, what).format(); }"},{name:"dateFromNow",function:"function(date, options) { return moment(date).fromNow(); }"},{name:"dateToNow",function:"function(date, options) { return moment(date).toNow(); }"},{name:"dateCalendar",function:"function(date, options) { return moment(date).calendar(); }"}],Xi={initHandlebars(n){for(let e=0;e<ao.length;e++)if("string"==typeof ao[e].name&&"string"==typeof ao[e].function){let t=new Function("return "+ao[e].function)();Sa.registerHelper(ao[e].name,t)}if(null!=n)for(const e of n)if("string"==typeof e.name&&"string"==typeof e.function){let t=e.function;"string"==typeof t&&(t=new Function("return "+t)()),Sa.registerHelper(e.name,t)}},defaultHelpers:()=>ao,checkRegistedHelpers(n){if(!n)return;let e=!0;for(let t=0;t<n.length;t++)if("string"==typeof n[t].name&&"string"==typeof n[t].function&&!(n[t].name in Sa.helpers)){e=!1;break}e||Xi.initHandlebars(n)},processHandlebarsV2(n,e,t,i,r,s){var o,a;if(null==n||void 0===n)return"";if(("string"==typeof n||n instanceof String)&&n.indexOf("{{")<0)return n;let l;Xi.checkRegistedHelpers(i),l="string"==typeof n?n:JSON.stringify(n),t||(t={});const c=["document","doc","account","tpl","componentDefinition","results","resultsCount","resultsIndex","result","row"];if(e)if(Object(e)===e)for(const p in e)if("queryResultDocument"===p){t.row=e[p],t.result=e[p];for(const b in e[p])if(e[p].hasOwnProperty(b)){if(c.indexOf(b)>-1){console.log("Handlebars Context Error: the field "+b+" is already present in document documentId so could not be set. It's values will NOT be available to handlebars expressions. Please advise your Application Developer to not use this field name if possible");continue}t[b]=e[p][b]}}else{if(t.hasOwnProperty(p)){console.log("error : handlebarsString = "+n+"\n\t data = "+JSON.stringify(e)+"\n\t handlebarsContext = "+JSON.stringify(t)+"\n\t helpers = "+JSON.stringify(i));continue}t[p]=e[p]}else console.log("Handlebars Context Error: object "+e+" wasn't passed in and the parameters is being ignored");let u=null;try{let p;if((null==s?void 0:s.handlebarsTemplateName)&&r){const b=`${null===(o=null==r?void 0:r.tpl)||void 0===o?void 0:o.documentId}_${null===(a=null==r?void 0:r.tplItem)||void 0===a?void 0:a.name}_${s.handlebarsTemplateName}`;bf[b]?p=bf[b]:(p=Sa.compile(l),bf[b]=p)}else p=Sa.compile(l);u=p(t)}catch(p){throw p.hStr=l,p}return u},processHandlebars(n,e,t,i,r,s){let o=null;try{r&&(t||(t={}),t.document=r.doc,t.doc=r.doc,t.account=r.account,t.tpl=r.tpl,t.tplItem=r.tplItem),o=Xi.processHandlebarsV2(n,e,t,i,r,s)}catch(a){console.error(a)}return o},processIntHandlebars(n,e,t,i,r,s){const o=Xi.processHandlebars(n,e,t,i,r,s);return o?parseInt(o,0):0},processFloatHandlebars(n,e,t,i,r,s){const o=Xi.processHandlebars(n,e,t,i,r,s);return o?parseFloat(o):0},processBooleanHandlebars:(n,e,t,i,r,s)=>"true"===Xi.processHandlebars(n,e,t,i,r,s),processArrayHandlebars(n,e,t,i,r,s){let o=Xi.processHandlebars(n,e,t,i,r,s);if(!o)return null;try{let a=[];if("string"==typeof o&&o.indexOf(",")>-1){o.indexOf("[")>-1&&(o=o.replace("[","")),o.indexOf("]")>-1&&(o=o.replace("]",""));const l=o.split(",");2==(null==l?void 0:l.length)&&!isNaN(Number(l[0].trim()))&&!isNaN(parseFloat(l[0].trim()))&&!isNaN(Number(l[1].trim()))&&!isNaN(parseFloat(l[1].trim()))&&(a=[parseFloat(l[0].trim()),parseFloat(l[1].trim())])}else{const l=JSON.parse(o);for(const c in l)l.hasOwnProperty(c)&&a.push(l[c])}return a}catch(a){return null}}};let xn=(()=>{class n{constructor(){if(this.injector=window.FormbirdServiceInjector,!this.injector){const t=document.querySelectorAll("#bodyAngularJS div[ui-view]");this.injector=angular.element(t).injector()}}get(t){return this.injector.get(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),B1=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.searchService=t.get("SearchService")}search(t,i){return this.searchService.search(t,i)}generatePit(){return this.searchService.generatePit()}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),U1=(()=>{class n{constructor(){}clientConfig(){return window.ftClientConfig}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),H1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("ModifiedFieldService")}resetFormDirty(){this.ajsService.resetFormDirty()}isDirty(){return this.ajsService.isDirty()}addModifiedField(t,i,r,s,o){return this.ajsService.addModifiedField(t,i,r,s,o)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),$1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("UnsavedDocumentService")}setDocument(t,i){return this.ajsService.setDocument(t,i)}setTemplate(t,i,r){return this.ajsService.setTemplate(t,i,r)}removeDocumentList(t){return this.ajsService.removeDocumentList(t)}createUnsavedDocumentList(t,i){return this.ajsService.createUnsavedDocumentList(t,i)}updateDocumentListInfo(t,i){this.ajsService.updateDocumentListInfo(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),G1=(()=>{class n{constructor(t){this.injector=t,this.ajsClientRulesService=t.get("ClientRulesService")}getSharedValue(t){return this.ajsClientRulesService.getSharedValue(t)}setSharedValue(t,i){return this.ajsClientRulesService.setSharedValue(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),W1=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.ajsService=t.get("OfflineUtilService")}getNextId(){return this.ajsService.getNextId()}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),q1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("BroadcastService"),this.rebroadcastAngularJSEvents()}rebroadcastAngularJSEvents(){if("undefined"!=typeof angular){const t=document.querySelectorAll("div[ui-view]"),i=angular.element(t).injector();i&&i.get("$rootScope").$on("document:updated",(s,o)=>{this.broadcast("document:updated",o)})}}broadcast(t,i){this.ajsService?this.ajsService.broadcast(t,i):console.log("No BroadcastService provided.")}on(t){if(this.ajsService)return this.ajsService.on(t);console.log("No BroadcastService provided.")}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),z1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("NotificationService")}printMessage(t,i,r,s,o,a,l,c,u){return this.ajsService.printMessage(t,i,r,s,o,a,l,c,u)}success(t,i,r){return this.ajsService.success(t,i,r)}error(t,i,r){return this.ajsService.error(t,i,r)}warning(t,i,r){return this.ajsService.warning(t,i,r)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),K1=(()=>{class n{constructor(){if(window.angular){const t=document.querySelectorAll("div[ui-view]"),i=angular.element(t).injector();this.ajsService=i.get("$location")}}go(t){return this.ajsService.path(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Y1=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.ajsService=t.get("ModalService")}showDialog(t,i,r,s,o){this.ajsService.showDialog(t,i,r,s,o)}openDialog(t){this.ajsService.openDialog(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),X1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("DocumentListService")}setupDocumentListId(){return this.ajsService.setupDocumentListId()}save(){return this.ajsService.save()}clearDocuments(t){this.ajsService.clearDocuments(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Q1=(()=>{class n{constructor(t){this.injector=t,this.validationCtrlValues={},this.ajsService=t.get("ValidationService"),this.validationCtrlValues=this.ajsService.validationCtrlValues}loadValidators(t,i){return this.ajsService.loadValidators(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Z1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("WebSocketService")}emit(t,i){return this.ajsService.emit(t,i)}addEventListener(t,i){return this.ajsService.addEventListener(t,i)}removeEventListener(t){return this.ajsService.removeEventListener(t)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Cf=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("ChangedDocumentService")}watch(t,i,r,s){return this.ajsService.watch(t,i,r,s)}valueChanged(t,i,r,s){this.ajsService.valueChanged(t,i,r,s)}dispatchChanged(t){this.ajsService.dispatchChanged(t)}executeOnFieldChangeWithNoChanges(t){this.ajsService.executeOnFieldChangeWithNoChanges(t)}watchDocument(t){return this.ajsService.watchDocument(t)}watchStoreChanges(){return this.ajsService.watchStoreChanges()}dispatchAction(t){this.ajsService.dispatchAction(t)}watchComponentTemplate(t){return this.ajsService.watchComponentTemplate(t)}watchComponentDef(t,i){return this.ajsService.watchComponentDef(t,i)}notifyIntializedField(t,i){return this.ajsService.notifyIntializedField(t,i)}notifyDocumentChanged(t){return this.ajsService.notifyDocumentChanged(t)}notifyComponentDefinitionUpdated(t,i,r,s){return this.ajsService.notifyComponentDefinitionUpdated(t,i,r,s)}setOrgDocument(t){return this.ajsService.setOrgDocument(t)}setDocumentInfo(t,i){return this.ajsService.setDocumentInfo(t,i)}setDocument(t){return this.ajsService.setDocument(t)}setComponentFlagTemplate(t,i,r,s){return this.ajsService.setComponentFlagTemplate(t,i,r,s)}isLoadedDocument(t,i){return this.ajsService.isLoadedDocument(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),J1=(()=>{class n{constructor(t){this.injector=t,this.ajsService=t.get("FinaliseValueFieldService")}addFinaliseValueFunction(t,i,r){this.ajsService.addFinaliseValueFunction(t,i,r)}getFinaliseValueFunction(t,i){return this.ajsService.getFinaliseValueFunction(t,i)}finaliseFieldValues(t,i){this.ajsService.finaliseFieldValues(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ek=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.offlineStatusService=t.get("OfflineStatusService"),this.offlineStatus$=this.offlineStatusService.offlineStatus$,this.offlineStatus=this.offlineStatusService.offlineStatus,this.pageDownloadProgress=this.offlineStatusService.pageDownloadProgress}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),tk=(()=>{class n{constructor(t){this.injector=t,this.service=t.get("RouterService")}getActivatedRouteSnapshot(){return this.service.getActivatedRouteSnapshot()}navigate(t){return this.service.navigate(t)}navigateByUrl(t,i){return this.service.navigateByUrl(t,i)}}return n.\u0275fac=function(t){return new(t||n)(ze(xn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Xb=(()=>{class n{constructor(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[U1,q1,G1,H1,W1,ek,B1,$1,z1,Y1,K1,X1,Q1,Z1,Cf,J1,tk],imports:[[]]}),n})();const Ni=new ct("NgValueAccessor");function Tr(n){return null==n||0===n.length}function e0(n){return null!=n&&"number"==typeof n.length}const ok=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ak{static min(e){return function t0(n){return e=>{if(Tr(e.value)||Tr(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t<n?{min:{min:n,actual:e.value}}:null}}(e)}static max(e){return function n0(n){return e=>{if(Tr(e.value)||Tr(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}(e)}static required(e){return function r0(n){return Tr(n.value)?{required:!0}:null}(e)}static requiredTrue(e){return function s0(n){return!0===n.value?null:{required:!0}}(e)}static email(e){return function o0(n){return Tr(n.value)||ok.test(n.value)?null:{email:!0}}(e)}static minLength(e){return function a0(n){return e=>Tr(e.value)||!e0(e.value)?null:e.value.length<n?{minlength:{requiredLength:n,actualLength:e.value.length}}:null}(e)}static maxLength(e){return function l0(n){return e=>e0(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}(e)}static pattern(e){return function c0(n){if(!n)return Ta;let e,t;return"string"==typeof n?(t="","^"!==n.charAt(0)&&(t+="^"),t+=n,"$"!==n.charAt(n.length-1)&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(Tr(i.value))return null;const r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(e)}static nullValidator(e){return null}static compose(e){return g0(e)}static composeAsync(e){return m0(e)}}function Ta(n){return null}function u0(n){return null!=n}function d0(n){const e=Rl(n)?(0,k.from)(n):n;return Bd(e),e}function h0(n){let e={};return n.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function f0(n,e){return e.map(t=>t(n))}function p0(n){return n.map(e=>function lk(n){return!n.validate}(e)?e:t=>e.validate(t))}function g0(n){if(!n)return null;const e=n.filter(u0);return 0==e.length?null:function(t){return h0(f0(t,e))}}function m0(n){if(!n)return null;const e=n.filter(u0);return 0==e.length?null:function(t){const i=f0(t,e).map(d0);return(0,k.forkJoin)(i).pipe((0,j.map)(h0))}}function Tf(n){return n?Array.isArray(n)?n:[n]:[]}function Ac(n,e){return Array.isArray(n)?n.includes(e):n===e}function E0(n,e){const t=Tf(e);return Tf(n).forEach(r=>{Ac(t,r)||t.push(r)}),t}function b0(n,e){return Tf(e).filter(t=>!Ac(n,t))}function Rc(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const Ma="VALID",Fc="INVALID",lo="PENDING",Ia="DISABLED";function Pf(n){return(Nf(n)?n.validators:n)||null}function w0(n){return Array.isArray(n)?function Af(n){return null!=n?g0(p0(n)):null}(n):n||null}function xf(n,e){return(Nf(e)?e.asyncValidators:n)||null}function M0(n){return Array.isArray(n)?function Sf(n){return null!=n?m0(p0(n)):null}(n):n||null}function Nf(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}class Of{constructor(e,t){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=w0(this._rawValidators),this._composedAsyncValidatorFn=M0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Ma}get invalid(){return this.status===Fc}get pending(){return this.status==lo}get disabled(){return this.status===Ia}get enabled(){return this.status!==Ia}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=w0(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=M0(e)}addValidators(e){this.setValidators(E0(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(E0(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(b0(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(b0(e,this._rawAsyncValidators))}hasValidator(e){return Ac(this._rawValidators,e)}hasAsyncValidator(e){return Ac(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=lo,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ia,this.errors=null,this._forEachChild(i=>{i.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ma,this._forEachChild(i=>{i.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ma||this.status===lo)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ia:Ma}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=lo,this._hasOwnPendingAsyncValidator=!0;const t=d0(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function bk(n,e,t){if(null==e||(Array.isArray(e)||(e=e.split(t)),Array.isArray(e)&&0===e.length))return null;let i=n;return e.forEach(r=>{i=i instanceof Pc?i.controls.hasOwnProperty(r)?i.controls[r]:null:i instanceof Ck&&i.at(r)||null}),i}(this,e,".")}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new dn,this.statusChanges=new dn}_calculateStatus(){return this._allControlsDisabled()?Ia:this.errors?Fc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(lo)?lo:this._anyControlsHaveStatus(Fc)?Fc:Ma}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Nf(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class co extends Of{constructor(e=null,t,i){super(Pf(t),xf(i,t)),this._onChange=[],this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=null,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Rc(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Rc(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class Pc extends Of{constructor(e,t,i){super(Pf(t),xf(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){this._checkAllValuesPresent(e),Object.keys(e).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t instanceof co?t.value:t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error(`Cannot find form control with name: ${e}.`)}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const i=this.controls[t];if(this.contains(t)&&e(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,i)=>((t.enabled||this.disabled)&&(e[i]=t.value),e))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,s)=>{i=t(i,r,s)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(e){this._forEachChild((t,i)=>{if(void 0===e[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class Ck extends Of{constructor(e,t,i){super(Pf(t),xf(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){this._checkAllValuesPresent(e),e.forEach((i,r)=>{this._throwIfControlMissing(r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e instanceof co?e.value:e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error(`Cannot find form control at index ${e}`)}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_checkAllValuesPresent(e){this._forEachChild((t,i)=>{if(void 0===e[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}let N0=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({}),n})();const Lf=new ct("NgModelWithFormControlWarning");let Q0=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[[N0]]}),n})(),Xk=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[Q0]}),n})(),Qk=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Lf,useValue:t.warnOnNgModelWithFormControl}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[Q0]}),n})();const Mt="api/",Ue={appHome:"/",appLogin:"/",appForgotPass:"forgotpass",appForgotPassAction:"auth/forgotpass",appResetPass:"resetpass",appResetpassAction:"auth/resetpass",appActivateAccount:"activateAccount",appActivateAccountAction:"auth/activateAccount",appDefault:"default",logout:"auth/logout",logoutAllDevices:"auth/logoutAllDevices",login:"auth/login/local",loginSaml:"auth/login/saml",loginGoogle:"auth/login/google",loginGoogleCallback:"auth/login/google/callback",loginFacebook:"auth/login/facebook",loginFacebookCallback:"auth/login/facebook/callback",loggedUser:"api/loggedUser",loggedUserData:"api/loggedUserData"};Ue.loggedUserAccountControlDocument=Ue.loggedUser+"/accountControlDocument",Ue.loggedUserAccountGroupConfigDocument=Ue.loggedUser+"/accountGroupConfigDocument",Ue.testPassword="password/test",Ue.publicLogin="/auth/login/public",Ue.uploadFiles=Mt+"uploadFiles",Ue.deleteFile=Mt+"deleteFile",Ue.loadFile=Mt+"getFile",Ue.getFile=Mt+"getFile/:fileNo",Ue.getFileWithName=Mt+"getFile/:fileNo/:fileName",Ue.packageImport=Mt+"uploadPackage",Ue.packageExport=Mt+"packageExport/:id",Ue.packageCleanUp=Mt+"packageCleanUp/:type/:id",Ue.document=Mt+"document",Ue.documentWithUser=Mt+"document/:userId",Ue.documentWithUserBase=Mt+"documentWithUser",Ue.templateAndDocument=Mt+"templateAndDocument",Ue.templateAndDocumentId=Ue.templateAndDocument+"/:id",Ue.templateAndDocumentWithTemplateId=Ue.templateAndDocument+"/:id/:templateId",Ue.documentDeepDiffUpdate=Ue.document+"/deepDiffUpdate",Ue.documentDeepDiffUpdateSingle=Ue.documentDeepDiffUpdate+"/:id",Ue.documentExists=Ue.document+"/exists",Ue.documentExistsFull=Ue.documentExists+"/:id",Ue.documentExistsIncludeDeleted=Ue.documentExists+"/:id/:includeDeleted",Ue.documentSingle=Ue.document+"/:id",Ue.documentSingleWithUser=Ue.documentWithUserBase+"/:id/:userId",Ue.documentDestroy=Ue.document+"/:id",Ue.documentDestroyWithTemplateIdAndPreviousVersionId=Ue.document+"/:id/:templateId/:previousVersionId",Ue.documentSingleOverrideTpl=Ue.documentDeepDiffUpdate+"/:id/:template",Ue.documentDeepDiffUpdateWithUser=Ue.document+"/deepDiffUpdateWithUser",Ue.documentDeepDiffUpdateSingleWithUser=Ue.documentDeepDiffUpdateWithUser+"/:id/:userId",Ue.syncDocuments=Mt+"syncDocuments",Ue.syncRecordsByServerUpdatedDateWithPagination=Ue.syncDocuments+"/:startTime/:pageNumber",Ue.syncDocumentsCountURL=Mt+"syncDocumentsCount",Ue.syncDocumentsCountByDateRoute=Ue.syncDocumentsCountURL+"/:startTime",Ue.undeleteDocument=Mt+"undelete/:id",Ue.bulkUploadDocuments=Mt+"bulkUploadDocuments",Ue.documentAudit=Mt+"documentAudit",Ue.indexHtml="/index.html",Ue.documentSearch=Mt+"documentSearch",Ue.documentFind=Mt+"documentFind/:query",Ue.documentsBaseUrl=Mt+"documents",Ue.documentsUrl=Ue.documentsBaseUrl+"/:query",Ue.documentFetch=Mt+"documentFetch",Ue.versionFetch=Mt+"versionFetch",Ue.loadDocsForRulesBaseUrl=Mt+"documents/loadDocsForRules",Ue.loadDocsForRulesUrl=Ue.loadDocsForRulesBaseUrl+"/:userId",Ue.loadIncludeDocs=Mt+"loadIncludeDocs",Ue.template=Mt+"template",Ue.templateSingle=Ue.template+"/:id",Ue.sessionTest=Mt+"sessionTest",Ue.serverTime=Mt+"time/current",Ue.executeFunction=Mt+"execute",Ue.loadComponentDoc=Mt+"loadComponentDoc/:componentName",Ue.loadVendorLibrary=Mt+"loadVendorLibrary/:name",Ue.loadVendorLibraries=Mt+"loadVendorLibraries",Ue.loadClientConfig="clientConfig",Ue.clientResources=Mt+"clientResources",_,rfc6902,console,console,async;const eC=uuid;class tC{static generateId(){const e="undefined"!=typeof window?window.crypto:void 0;if(void 0!==e&&e.randomUUID)return e.randomUUID();{const t=eC.v4(),i=Math.random().toString();return eC.v5(i,t)}}static isValid(e){return e&&36===e.length}}const ot={ACCEPTED:202,BAD_GATEWAY:502,BAD_REQUEST:400,CONFLICT:409,CONTINUE:100,CREATED:201,EXPECTATION_FAILED:417,FORBIDDEN:403,GATEWAY_TIMEOUT:504,GONE:410,HTTP_VERSION_NOT_SUPPORTED:505,INSUFFICIENT_SPACE_ON_RESOURCE:419,INSUFFICIENT_STORAGE:507,INTERNAL_SERVER_ERROR:500,LENGTH_REQUIRED:411,LOCKED:423,METHOD_FAILURE:420,METHOD_NOT_ALLOWED:405,MOVED_PERMANENTLY:301,MOVED_TEMPORARILY:302,MULTI_STATUS:207,MULTIPLE_CHOICES:300,NO_CONTENT:204,NON_AUTHORITATIVE_INFORMATION:203,NOT_ACCEPTABLE:406,NOT_FOUND:404,NOT_IMPLEMENTED:501,NOT_MODIFIED:304,OK:200,PARTIAL_CONTENT:206,PAYMENT_REQUIRED:402,PRECONDITION_FAILED:412,PROCESSING:102,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,REQUEST_TOO_LONG:413,REQUEST_URI_TOO_LONG:414,REQUESTED_RANGE_NOT_SATISFIABLE:416,RESET_CONTENT:205,SEE_OTHER:303,SERVICE_UNAVAILABLE:503,SWITCHING_PROTOCOLS:101,TEMPORARY_REDIRECT:307,UNAUTHORIZED:401,UNPROCESSABLE_ENTITY:422,UNSUPPORTED_MEDIA_TYPE:415,USE_PROXY:305,ELASTICSEARCH:306,SERVER_UNRESPONSIVE:0,EARLY_HINTS:103},rt={};rt[ot.ACCEPTED]="Accepted",rt[ot.BAD_GATEWAY]="Bad Gateway",rt[ot.BAD_REQUEST]="Bad Request",rt[ot.CONFLICT]="Conflict",rt[ot.CONTINUE]="Continue",rt[ot.CREATED]="Created",rt[ot.EXPECTATION_FAILED]="Expectation Failed",rt[ot.FORBIDDEN]="Forbidden",rt[ot.GATEWAY_TIMEOUT]="Gateway Timeout",rt[ot.GONE]="Gone",rt[ot.HTTP_VERSION_NOT_SUPPORTED]="HTTP Version Not Supported",rt[ot.INSUFFICIENT_SPACE_ON_RESOURCE]="Insufficient Space on Resource",rt[ot.INSUFFICIENT_STORAGE]="Insufficient Storage",rt[ot.INTERNAL_SERVER_ERROR]="Server Error",rt[ot.LENGTH_REQUIRED]="Length Required",rt[ot.LOCKED]="Locked",rt[ot.METHOD_FAILURE]="Method Failure",rt[ot.METHOD_NOT_ALLOWED]="Method Not Allowed",rt[ot.MOVED_PERMANENTLY]="Moved Permanently",rt[ot.MOVED_TEMPORARILY]="Moved Temporarily",rt[ot.MULTI_STATUS]="Multi-Status",rt[ot.MULTIPLE_CHOICES]="Multiple Choices",rt[ot.NO_CONTENT]="No Content",rt[ot.NON_AUTHORITATIVE_INFORMATION]="Non Authoritative Information",rt[ot.NOT_ACCEPTABLE]="Not Acceptable",rt[ot.NOT_FOUND]="Not Found",rt[ot.NOT_IMPLEMENTED]="Not Implemented",rt[ot.NOT_MODIFIED]="Not Modified",rt[ot.OK]="OK",rt[ot.PARTIAL_CONTENT]="Partial Content",rt[ot.PAYMENT_REQUIRED]="Payment Required",rt[ot.PRECONDITION_FAILED]="Precondition Failed",rt[ot.PROCESSING]="Processing",rt[ot.PROXY_AUTHENTICATION_REQUIRED]="Proxy Authentication Required",rt[ot.REQUEST_TIMEOUT]="Request Timeout",rt[ot.REQUEST_TOO_LONG]="Request Entity Too Large",rt[ot.REQUEST_URI_TOO_LONG]="Request-URI Too Long",rt[ot.REQUESTED_RANGE_NOT_SATISFIABLE]="Requested Range Not Satisfiable",rt[ot.RESET_CONTENT]="Reset Content",rt[ot.SEE_OTHER]="See Other",rt[ot.SERVICE_UNAVAILABLE]="Service Unavailable",rt[ot.SWITCHING_PROTOCOLS]="Switching Protocols",rt[ot.TEMPORARY_REDIRECT]="Temporary Redirect",rt[ot.UNAUTHORIZED]="Unauthorized",rt[ot.UNPROCESSABLE_ENTITY]="Unprocessable Entity",rt[ot.UNSUPPORTED_MEDIA_TYPE]="Unsupported Media Type",rt[ot.USE_PROXY]="Use Proxy",rt[ot.ELASTICSEARCH]="Error - search is not running. Please contact a system administrator to configure it",rt[ot.SERVER_UNRESPONSIVE]="Aborted/Timed out request: Server is down or client not connected.",rt[ot.EARLY_HINTS]="Early Hints",ot.getStatusText=function uL(n){if(rt.hasOwnProperty(n))return rt[n];throw new Error("Status code does not exist: "+n)};let Yf=(()=>{class n{constructor(){this.formGroups={}}setupStandardProperties(t){const i=t.componentDefinition;i&&(t.disabled=!1===i.enabled),t.elementName=t.fieldName,t.registeredControlName=t.fieldName+t.key+tC.generateId()}setupStandardComponent(t,i){this.setupStandardProperties(t);const s=this.ensureFormGroupExisted(t.document.documentId),o=t.componentDefinition;this.setupDefaultValidator(o,i);const a=new co({value:t.fieldValue,disabled:this.isComponentDisabled(o)},i);return s.registerControl(t.registeredControlName,a)}setupControl(t,i,r,s){const o=this.ensureFormGroupExisted(t.document.documentId),a=new co(r,s),l=i+t.key+tC.generateId();return o.registerControl(l,a)}enableField(t,i){i&&(!1===t.enabled?i.disable({emitEvent:!1}):i.enable({emitEvent:!1}))}enableFieldByFlag(t,i){i&&(!1===t?i.disable({emitEvent:!1}):i.enable({emitEvent:!1}))}setupDefaultValidator(t,i){i=i||[],t.mandatory&&i.push(ak.required)}isComponentDisabled(t){return!1===t.enabled}ensureFormGroupExisted(t){return this.formGroups[t]||(this.formGroups[t]=new Pc({})),this.formGroups[t]}getControl(t,i){return this.formGroups[t]?this.formGroups[t].get(i):null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class yL{isErrorState(e,t){return!!(e&&e.invalid&&(e.dirty||e.touched||t&&t.submitted))}}let vL=(()=>{class n{constructor(t,i,r,s){this.formbirdInjectorService=t,this.changedDocumentService=i,this.componentSetupService=r,this.cdr=s,this.shouldNotifyCompInitializedInSuper=!0,this.shouldDispatchEmptyFieldValue=!0,this.subs=new k.Subscription,this.matcher=new yL,this.broadcastService=t.get("BroadcastService")}ngOnInit(){this.setupComponent(),this.initializeFieldValue(),this.setupChangeDetection(),this.shouldNotifyCompInitializedInSuper&&this.notifyComponentIntialized()}ngOnDestroy(){this.subs.unsubscribe()}setupComponent(){this.formControl=this.componentSetupService.setupStandardComponent(this,this.validators),this.setFieldActivation(!1)}setupChangeDetection(t){if(this.fieldName){const r=this.changedDocumentService.watch(this.fieldName,this.document.documentId,this.registeredControlName).subscribe(s=>{this.onFieldValueChanged(s)});this.subs.add(r)}const i=this.changedDocumentService.watchComponentDef(this.fieldName,this.template.documentId).subscribe(r=>{this.onComponentDefChanged(r)});if(this.subs.add(i),this.formControl){let r;r=t?this.formControl.valueChanges.subscribe(s=>{this.onControlValueChanged(s)}):this.formControl.valueChanges.pipe((0,j.debounceTime)(500)).subscribe(s=>{this.onControlValueChanged(s)}),this.subs.add(r)}this.setupDocumentCreatedDetection()}setFieldActivation(t){this.componentSetupService.enableField(this.componentDefinition,this.formControl),this.detectChanges(t)}valueChanged(t){this.fieldValue=t,this.changedDocumentService.valueChanged(this,t,this.registeredControlName)}dispatchChanged(t){this.changedDocumentService.notifyDocumentChanged({documentId:this.document.documentId,fieldName:this.fieldName,newValue:this.fieldValue,isInitValue:t})}detectChanges(t){!1!==t&&!this.cdr.destroyed&&this.cdr.detectChanges()}updateComponentDefChange(t){this.componentDefinition=t}onControlValueChanged(t){this.valueChanged(t)}onComponentDefChanged(t){console.log("Change detection on template: ",t.name),this.updateComponentDefChange(t);const i=!1===t.enabled;this.disabled!==i?(this.disabled=i,this.setFieldActivation()):this.detectChanges()}isEqualFieldValue(t){return this.fieldValue===t}onFieldValueChanged(t,i=!0){this.isEqualFieldValue(t)||(console.log(`On field value changed for component: ${this.registeredControlName} - has label: ${this.componentDefinition.label}`),this.fieldValue=t,this.formControl&&this.formControl.patchValue(this.fieldValue,{emitEvent:!1,onlySelf:!0}),i&&this.detectChanges())}setupDocumentCreatedDetection(){const t=this.broadcastService.on("document:new").subscribe(i=>{this.onDocumentCreated(i),this.detectChanges()});this.subs.add(t)}onDocumentCreated(t){const i=null==t?void 0:t.document;if(i){const s=i.documentId;(null==t?void 0:t.unsavedDocumentListId)===this.formParameters.unsavedDocumentListId&&this.document.documentId===s&&(this.fieldValue=i[this.fieldName],this.initializeFieldValue(),this.notifyComponentIntialized())}}initializeFieldValue(){}notifyComponentIntialized(){this.changedDocumentService.notifyIntializedField(this,this.shouldDispatchEmptyFieldValue)}notifyComponentDefChanged(){}}return n.\u0275fac=function(t){return new(t||n)(He(xn),He(Cf),He(Yf),He(oa))},n.\u0275cmp=tt({type:n,selectors:[["ng-component"]],inputs:{document:"document",fieldValue:"fieldValue",template:"template",fieldName:"fieldName",formParameters:"formParameters",key:"key",responsiveLayouts:"responsiveLayouts",message:"message",componentDefinition:"componentDefinition"},decls:0,vars:0,template:function(t,i){},encapsulation:2}),n})();var Nc=_e(915);class EL{getFiles(e,t,i,r){switch(i.fieldType){case"fileReference":this.scUploader(e,t,i,r);break;case"url":this.urlField(e,t,i,r,null,null);break;default:return!1}}scUploader(e,t,i,r){const s=i.fieldName.replace("document.",""),o=t[s];o&&(o.forEach((a,l)=>{var c,u;const p={};p.fileNo=a.fileNo,p.external=!1,p.mime="",p.path="api/getFile/"+a.fileNo,p.resultIndex=l,p.title=e.processHandlebars(i.title,t,a),p.title||(p.title=null!==(u=null===(c=a.systemHeader)||void 0===c?void 0:c.summaryName)&&void 0!==u?u:"File "+a.fileNo),p.documentId=o.documentId,e.files.push(p),e.getFile(p.path,e.files.length-1,r)}),e.cdr.detectChanges())}urlField(e,t,i,r,s,o){const l={};l.fileNo=i.fieldName+"___"+t.documentId,l.mime="",l.external=!0,l.path=t.imageUrl,l.title=e.processHandlebars(i.title,{}),l.title||(l.title=t.imageUrl),e.files.push(l),e.getFile(l.path,e.files.length-1,r),e.cdr.detectChanges()}}let iC=(()=>{class n{constructor(){if(this.injector=window.FormbirdServiceInjector,!this.injector){const t=document.querySelectorAll("#bodyAngularJS div[ui-view]");this.injector=angular.element(t).injector()}}get(t){return this.injector.get(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bL=(()=>{class n{constructor(t){this.formbirdInjectorService=t,this.searchService=t.get("SearchService")}search(t,i){return this.searchService.search(t,i)}generatePit(){return this.searchService.generatePit()}}return n.\u0275fac=function(t){return new(t||n)(ze(iC))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const CL=new ct("cdk-dir-doc",{providedIn:"root",factory:function DL(){return Ig(Qt)}});let AL=(()=>{class n{constructor(t){if(this.value="ltr",this.change=new dn,t){const r=t.documentElement?t.documentElement.dir:null,s=(t.body?t.body.dir:null)||r;this.value="ltr"===s||"rtl"===s?s:"ltr"}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(t){return new(t||n)(ze(CL,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),rC=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({}),n})();const sC=new Cr("13.0.1");let Xf;try{Xf="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){Xf=!1}let Na,Zf,Qf=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function VO(n){return n===xb}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Xf)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(ze(ql))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Oc(n){return function SL(){if(null==Na&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Na=!0}))}finally{Na=Na||!1}return Na}()?n:!!n.capture}function Oa(n){return n.composedPath?n.composedPath()[0]:n.target}function Lc(n){return null!=n&&"false"!=`${n}`}function ho(n,e=0){return function $L(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):e}function Jf(n){return n instanceof Cn?n.nativeElement:n}const JL=new ct("cdk-input-modality-detector-options"),eV={ignoreKeys:[18,17,224,91,16]},fo=Oc({passive:!0,capture:!0});let tV=(()=>{class n{constructor(t,i,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new k.BehaviorSubject(null),this._lastTouchMs=0,this._onKeydown=o=>{var a,l;(null===(l=null===(a=this._options)||void 0===a?void 0:a.ignoreKeys)||void 0===l?void 0:l.some(c=>c===o.keyCode))||(this._modality.next("keyboard"),this._mostRecentTarget=Oa(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(function QL(n){return 0===n.offsetX&&0===n.offsetY}(o)?"keyboard":"mouse"),this._mostRecentTarget=Oa(o))},this._onTouchstart=o=>{!function ZL(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(o)?(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Oa(o)):this._modality.next("keyboard")},this._options=Object.assign(Object.assign({},eV),s),this.modalityDetected=this._modality.pipe((0,j.skip)(1)),this.modalityChanged=this.modalityDetected.pipe((0,j.distinctUntilChanged)()),t.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,fo),r.addEventListener("mousedown",this._onMousedown,fo),r.addEventListener("touchstart",this._onTouchstart,fo)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,fo),document.removeEventListener("mousedown",this._onMousedown,fo),document.removeEventListener("touchstart",this._onTouchstart,fo))}}return n.\u0275fac=function(t){return new(t||n)(ze(Qf),ze(Yt),ze(Qt),ze(JL,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const iV=new ct("cdk-focus-monitor-default-options"),Vc=Oc({passive:!0,capture:!0});let rV=(()=>{class n{constructor(t,i,r,s,o){this._ngZone=t,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new k.Subject,this._rootNodeFocusAndBlurListener=a=>{const l=Oa(a),c="focus"===a.type?this._onFocus:this._onBlur;for(let u=l;u;u=u.parentElement)c.call(this,a,u)},this._document=s,this._detectionMode=(null==o?void 0:o.detectionMode)||0}monitor(t,i=!1){const r=Jf(t);if(!this._platform.isBrowser||1!==r.nodeType)return(0,k.of)(null);const s=function wL(n){if(function TL(){if(null==Zf){const n="undefined"!=typeof document?document.head:null;Zf=!(!n||!n.createShadowRoot&&!n.attachShadow)}return Zf}()){const e=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new k.Subject,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){const i=Jf(t),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(t,i,r){const s=Jf(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(t){return 1===this._detectionMode||!!(null==t?void 0:t.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(t,i){t.classList.toggle("cdk-focused",!!i),t.classList.toggle("cdk-touch-focused","touch"===i),t.classList.toggle("cdk-keyboard-focused","keyboard"===i),t.classList.toggle("cdk-mouse-focused","mouse"===i),t.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(t,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,i){const r=this._elementInfo.get(i),s=Oa(t);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(t,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&t.relatedTarget instanceof Node&&i.contains(t.relatedTarget)||(this._setClasses(i),this._emitOrigin(r.subject,null))}_emitOrigin(t,i){this._ngZone.run(()=>t.next(i))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const i=t.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Vc),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Vc)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe((0,j.takeUntil)(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const i=t.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Vc),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Vc),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,i,r){this._setClasses(t,i),this._emitOrigin(r.subject,i),this._lastFocusOrigin=i}_getClosestElementsInfo(t){const i=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&i.push([s,r])}),i}}return n.\u0275fac=function(t){return new(t||n)(ze(Yt),ze(Qf),ze(tV),ze(Qt,8),ze(iV,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const dC="cdk-high-contrast-black-on-white",hC="cdk-high-contrast-white-on-black",ep="cdk-high-contrast-active";let sV=(()=>{class n{constructor(t,i){this._platform=t,this._document=i}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(ep),t.remove(dC),t.remove(hC),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?(t.add(ep),t.add(dC)):2===i&&(t.add(ep),t.add(hC))}}}return n.\u0275fac=function(t){return new(t||n)(ze(Qf),ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const fC=new Cr("13.0.1"),aV=new ct("mat-sanity-checks",{providedIn:"root",factory:function oV(){return!0}});let pC=(()=>{class n{constructor(t,i,r){this._hasDoneGlobalChecks=!1,this._document=r,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=i,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!(!Dh()||function ML(){return"undefined"!=typeof __karma__&&!!__karma__||"undefined"!=typeof jasmine&&!!jasmine||"undefined"!=typeof jest&&!!jest||"undefined"!=typeof Mocha&&!!Mocha}())&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}_checkDoctypeIsDefined(){this._checkIsEnabled("doctype")&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checkIsEnabled("theme")||!this._document.body||"function"!=typeof getComputedStyle)return;const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const i=getComputedStyle(t);i&&"none"!==i.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),t.remove()}_checkCdkVersionMatch(){this._checkIsEnabled("version")&&fC.full!==sC.full&&console.warn("The Angular Material version ("+fC.full+") does not match the Angular CDK version ("+sC.full+").\nPlease ensure the versions of these two packages exactly match.")}}return n.\u0275fac=function(t){return new(t||n)(ze(sV),ze(aV,8),ze(Qt))},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[[rC],rC]}),n})();function lV(n){return class extends n{constructor(...e){super(...e),this._disabled=!1}get disabled(){return this._disabled}set disabled(e){this._disabled=Lc(e)}}}function cV(n,e){return class extends n{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const i=t||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}}}function uV(n,e=0){return class extends n{constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?ho(t):this.defaultTabIndex}}}class yC{}const dr="*";function vC(n,e=null){return{type:2,steps:n,options:e}}function EC(n){return{type:6,styles:n,offset:null}}function bC(n){Promise.resolve(null).then(n)}class po{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){bC(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class CC{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0;const s=this.players.length;0==s?bC(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}function DC(){return"undefined"!=typeof window&&void 0!==window.document}function ip(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Rr(n){switch(n.length){case 0:return new po;case 1:return n[0];default:return new CC(n)}}function AC(n,e,t,i,r={},s={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const p=u.offset,b=p==l,U=b&&c||{};Object.keys(u).forEach(z=>{let ae=z,re=u[z];if("offset"!==z)switch(ae=e.normalizePropertyName(ae,o),re){case"!":re=r[z];break;case dr:re=s[z];break;default:re=e.normalizeStyleValue(z,ae,re,o)}U[ae]=re}),b||a.push(U),c=U,l=p}),o.length){const u="\n - ";throw new Error(`Unable to animate due to the following errors:${u}${o.join(u)}`)}return a}function rp(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&sp(t,"start",n)));break;case"done":n.onDone(()=>i(t&&sp(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&sp(t,"destroy",n)))}}function sp(n,e,t){const i=t.totalTime,s=op(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,null==i?n.totalTime:i,!!t.disabled),o=n._data;return null!=o&&(s._data=o),s}function op(n,e,t,i,r="",s=0,o){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function ti(n,e,t){let i;return n instanceof Map?(i=n.get(e),i||n.set(e,i=t)):(i=n[e],i||(i=n[e]=t)),i}function SC(n){const e=n.indexOf(":");return[n.substring(1,e),n.substr(e+1)]}let ap=(n,e)=>!1,lp=(n,e)=>!1,TC=(n,e,t)=>[];const wC=ip();(wC||"undefined"!=typeof Element)&&(ap=DC()?(n,e)=>{for(;e&&e!==document.documentElement;){if(e===n)return!0;e=e.parentNode||e.host}return!1}:(n,e)=>n.contains(e),lp=(()=>{if(wC||Element.prototype.matches)return(n,e)=>n.matches(e);{const n=Element.prototype,e=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector;return e?(t,i)=>e.apply(t,[i]):lp}})(),TC=(n,e,t)=>{let i=[];if(t){const r=n.querySelectorAll(e);for(let s=0;s<r.length;s++)i.push(r[s])}else{const r=n.querySelector(e);r&&i.push(r)}return i});let is=null,MC=!1;function cp(n){is||(is=function yV(){return"undefined"!=typeof document?document.body:null}()||{},MC=!!is.style&&"WebkitAppearance"in is.style);let e=!0;return is.style&&!function _V(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in is.style,!e&&MC&&(e="Webkit"+n.charAt(0).toUpperCase()+n.substr(1)in is.style)),e}const up=lp,dp=ap,hp=TC;function IC(n){const e={};return Object.keys(n).forEach(t=>{const i=t.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=n[t]}),e}let RC=(()=>{class n{validateStyleProperty(t){return cp(t)}matchesElement(t,i){return up(t,i)}containsElement(t,i){return dp(t,i)}query(t,i,r){return hp(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,s,o,a=[],l){return new po(r,s)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),fp=(()=>{class n{}return n.NOOP=new RC,n})();const pp="ng-enter",jc="ng-leave",Bc="ng-trigger",Uc=".ng-trigger",PC="ng-animating",gp=".ng-animating";function rs(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:mp(parseFloat(e[1]),e[2])}function mp(n,e){return"s"===e?1e3*n:n}function Hc(n,e,t){return n.hasOwnProperty("duration")?n:function bV(n,e,t){let r,s=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(`The provided timing value "${n}" is invalid.`),{duration:0,delay:0,easing:""};r=mp(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=mp(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),a=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),a=!0),a&&e.splice(l,0,`The provided timing value "${n}" is invalid.`)}return{duration:r,delay:s,easing:o}}(n,e,t)}function go(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function Fr(n,e,t={}){if(e)for(let i in n)t[i]=n[i];else go(n,t);return t}function NC(n,e,t){return t?e+":"+t+";":""}function OC(n){let e="";for(let t=0;t<n.style.length;t++){const i=n.style.item(t);e+=NC(0,i,n.style.getPropertyValue(i))}for(const t in n.style)n.style.hasOwnProperty(t)&&!t.startsWith("_")&&(e+=NC(0,AV(t),n.style[t]));n.setAttribute("style",e)}function Qi(n,e,t){n.style&&(Object.keys(e).forEach(i=>{const r=yp(i);t&&!t.hasOwnProperty(i)&&(t[i]=n.style[r]),n.style[r]=e[i]}),ip()&&OC(n))}function ss(n,e){n.style&&(Object.keys(e).forEach(t=>{const i=yp(t);n.style[i]=""}),ip()&&OC(n))}function La(n){return Array.isArray(n)?1==n.length?n[0]:vC(n):n}const _p=new RegExp("{{\\s*(.+?)\\s*}}","g");function kC(n){let e=[];if("string"==typeof n){let t;for(;t=_p.exec(n);)e.push(t[1]);_p.lastIndex=0}return e}function $c(n,e,t){const i=n.toString(),r=i.replace(_p,(s,o)=>{let a=e[o];return e.hasOwnProperty(o)||(t.push(`Please provide a value for the animation param ${o}`),a=""),a.toString()});return r==i?n:r}function Gc(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const DV=/-+([a-z0-9])/g;function yp(n){return n.replace(DV,(...e)=>e[1].toUpperCase())}function AV(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function LC(n,e){return 0===n||0===e}function VC(n,e,t){const i=Object.keys(t);if(i.length&&e.length){let s=e[0],o=[];if(i.forEach(a=>{s.hasOwnProperty(a)||o.push(a),s[a]=t[a]}),o.length)for(var r=1;r<e.length;r++){let a=e[r];o.forEach(function(l){a[l]=vp(n,l)})}}return e}function ni(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function vp(n,e){return window.getComputedStyle(n)[e]}function SV(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function TV(n,e,t){if(":"==n[0]){const l=function wV(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(`The transition alias value "${n}" is not supported`),"* => *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(`The provided transition expression "${n}" is not supported`),e;const r=i[1],s=i[2],o=i[3];e.push(jC(r,o));"<"==s[0]&&!("*"==r&&"*"==o)&&e.push(jC(o,r))}(i,t,e)):t.push(n),t}const qc=new Set(["true","1"]),zc=new Set(["false","0"]);function jC(n,e){const t=qc.has(n)||zc.has(n),i=qc.has(e)||zc.has(e);return(r,s)=>{let o="*"==n||n==r,a="*"==e||e==s;return!o&&t&&"boolean"==typeof r&&(o=r?qc.has(n):zc.has(n)),!a&&i&&"boolean"==typeof s&&(a=s?qc.has(e):zc.has(e)),o&&a}}const MV=new RegExp("s*:selfs*,?","g");function Ep(n,e,t){return new IV(n).build(e,t)}class IV{constructor(e){this._driver=e}build(e,t){const i=new PV(t);return this._resetContextStyleTimingState(i),ni(this,La(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,s.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,o.push(l)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){const s=new Set,o=r||{};if(i.styles.forEach(a=>{if(Kc(a)){const l=a;Object.keys(l).forEach(c=>{kC(l[c]).forEach(u=>{o.hasOwnProperty(u)||s.add(u)})})}}),s.size){const a=Gc(s.values());t.errors.push(`state("${e.name}", ...) must define default values for all the following style substitutions: ${a.join(", ")}`)}}return{type:0,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=ni(this,La(e.animation),t);return{type:1,matchers:SV(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:os(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>ni(this,i,t)),options:os(e.options)}}visitGroup(e,t){const i=t.currentTime;let r=0;const s=e.steps.map(o=>{t.currentTime=i;const a=ni(this,o,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:s,options:os(e.options)}}visitAnimate(e,t){const i=function NV(n,e){let t=null;if(n.hasOwnProperty("duration"))t=n;else if("number"==typeof n)return bp(Hc(n,e).duration,0,"");const i=n;if(i.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=bp(0,0,"");return s.dynamic=!0,s.strValue=i,s}return t=t||Hc(i,e),bp(t.duration,t.delay,t.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let r,s=e.styles?e.styles:EC({});if(5==s.type)r=this.visitKeyframes(s,t);else{let o=e.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=EC(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[];Array.isArray(e.styles)?e.styles.forEach(o=>{"string"==typeof o?o==dr?i.push(o):t.errors.push(`The provided style string value ${o} is not allowed.`):i.push(o)}):i.push(e.styles);let r=!1,s=null;return i.forEach(o=>{if(Kc(o)){const a=o,l=a.easing;if(l&&(s=l,delete a.easing),!r)for(let c in a)if(a[c].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:i,easing:s,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;i&&s>0&&(s-=i.duration+i.delay),e.styles.forEach(o=>{"string"!=typeof o&&Object.keys(o).forEach(a=>{if(!this._driver.validateStyleProperty(a))return void t.errors.push(`The provided animation property "${a}" is not a supported CSS property for animations`);const l=t.collectedStyles[t.currentQuerySelector],c=l[a];let u=!0;c&&(s!=r&&s>=c.startTime&&r<=c.endTime&&(t.errors.push(`The CSS property "${a}" that exists between the times of "${c.startTime}ms" and "${c.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${r}ms"`),u=!1),s=c.startTime),u&&(l[a]={startTime:s,endTime:r}),t.options&&function CV(n,e,t){const i=e.params||{},r=kC(n);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||t.push(`Unable to resolve the local animation param ${s} in the given list of values`)})}(o[a],t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),i;let s=0;const o=[];let a=!1,l=!1,c=0;const u=e.steps.map(Me=>{const Ce=this._makeStyleAst(Me,t);let qe=null!=Ce.offset?Ce.offset:function xV(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(Kc(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(Kc(n)&&n.hasOwnProperty("offset")){const t=n;e=parseFloat(t.offset),delete t.offset}return e}(Ce.styles),Qe=0;return null!=qe&&(s++,Qe=Ce.offset=qe),l=l||Qe<0||Qe>1,a=a||Qe<c,c=Qe,o.push(Qe),Ce});l&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),a&&t.errors.push("Please ensure that all keyframe offsets are in order");const p=e.steps.length;let b=0;s>0&&s<p?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==s&&(b=1/(p-1));const U=p-1,z=t.currentTime,ae=t.currentAnimateTimings,re=ae.duration;return u.forEach((Me,Ce)=>{const qe=b>0?Ce==U?1:b*Ce:o[Ce],Qe=qe*re;t.currentTime=z+ae.delay+Qe,ae.duration=Qe,this._validateStyleAst(Me,t),Me.offset=qe,i.styles.push(Me)}),i}visitReference(e,t){return{type:8,animation:ni(this,La(e.animation),t),options:os(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:os(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:os(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[s,o]=function RV(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(MV,"")),n=n.replace(/@\*/g,Uc).replace(/@\w+/g,t=>Uc+"-"+t.substr(1)).replace(/:animating/g,gp),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+s:s,ti(t.collectedStyles,t.currentQuerySelector,{});const a=ni(this,La(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:os(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:Hc(e.timings,t.errors,!0);return{type:12,animation:ni(this,La(e.animation),t),timings:i,options:null}}}class PV{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Kc(n){return!Array.isArray(n)&&"object"==typeof n}function os(n){return n?(n=go(n)).params&&(n.params=function FV(n){return n?go(n):null}(n.params)):n={},n}function bp(n,e,t){return{duration:n,delay:e,easing:t}}function Cp(n,e,t,i,r,s,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class Yc{constructor(){this._map=new Map}consume(e){let t=this._map.get(e);return t?this._map.delete(e):t=[],t}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const LV=new RegExp(":enter","g"),jV=new RegExp(":leave","g");function Dp(n,e,t,i,r,s={},o={},a,l,c=[]){return(new BV).buildKeyframes(n,e,t,i,r,s,o,a,l,c)}class BV{buildKeyframes(e,t,i,r,s,o,a,l,c,u=[]){c=c||new Yc;const p=new Ap(e,t,c,r,s,u,[]);p.options=l,p.currentTimeline.setStyles([o],null,p.errors,l),ni(this,i,p);const b=p.timelines.filter(U=>U.containsAnimation());if(b.length&&Object.keys(a).length){const U=b[b.length-1];U.allowOnlyTimelineStyles()||U.setStyles([a],null,p.errors,l)}return b.length?b.map(U=>U.buildKeyframes()):[Cp(t,[],[],[],0,0,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.consume(t.element);if(i){const r=t.createSubContext(e.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_visitSubInstructions(e,t,i){let s=t.currentTimeline.currentTime;const o=null!=i.duration?rs(i.duration):null,a=null!=i.delay?rs(i.delay):null;return 0!==o&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(e,t){t.updateOptions(e.options,!0),ni(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let r=t;const s=e.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Xc);const o=rs(s.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>ni(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let r=t.currentTimeline.currentTime;const s=e.options&&e.options.delay?rs(e.options.delay):0;e.steps.forEach(o=>{const a=t.createSubContext(e.options);s&&a.delayNextStep(s),ni(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return Hc(t.params?$c(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const s=e.style;5==s.type?this.visitKeyframes(s,t):(t.incrementTime(i.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.getCurrentStyleProperties().length&&i.forwardFrame();const s=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(s):i.setStyles(e.styles,s,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,s=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+s),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,r=e.options||{},s=r.delay?rs(r.delay):0;s&&(6===t.previousNode.type||0==i&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Xc);let o=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const p=t.createSubContext(e.options,c);s&&p.delayNextStep(s),c===t.element&&(l=p.currentTimeline),ni(this,e.animation,p),p.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,p.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,r=t.currentTimeline,s=e.timings,o=Math.abs(s.duration),a=o*(t.currentQueryTotal-1);let l=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const p=u.currentTime;ni(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-p+(r.startTime-i.currentTimeline.startTime)}}const Xc={};class Ap{constructor(e,t,i,r,s,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Xc,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Qc(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let r=this.options;null!=i.duration&&(r.duration=rs(i.duration)),null!=i.delay&&(r.delay=rs(i.delay));const s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=$c(s[a],o,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){const r=t||this.element,s=new Ap(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=Xc,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+e.delay,easing:""},s=new UV(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,s,o){let a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(LV,"."+this._enterClassName)).replace(jV,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&0==a.length&&o.push(`\`query("${t}")\` returned zero elements. (Use \`query("${t}", { optional: true })\` if you wish to allow this.)`),a}}class Qc{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new Qc(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||dr,this._currentKeyframe[t]=dr}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&(this._previousKeyframe.easing=t);const s=r&&r.params||{},o=function HV(n,e){const t={};let i;return n.forEach(r=>{"*"===r?(i=i||Object.keys(e),i.forEach(s=>{t[s]=dr})):Fr(r,!1,t)}),t}(e,this._globalTimelineStyles);Object.keys(o).forEach(a=>{const l=$c(o[a],s,i);this._pendingStyles[a]=l,this._localTimelineStyles.hasOwnProperty(a)||(this._backFill[a]=this._globalTimelineStyles.hasOwnProperty(a)?this._globalTimelineStyles[a]:dr),this._updateStyle(a,l)})}applyStylesToKeyframe(){const e=this._pendingStyles,t=Object.keys(e);0!=t.length&&(this._pendingStyles={},t.forEach(i=>{this._currentKeyframe[i]=e[i]}),Object.keys(this._localTimelineStyles).forEach(i=>{this._currentKeyframe.hasOwnProperty(i)||(this._currentKeyframe[i]=this._localTimelineStyles[i])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(e=>{const t=this._localTimelineStyles[e];this._pendingStyles[e]=t,this._updateStyle(e,t)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){Object.keys(e._styleSummary).forEach(t=>{const i=this._styleSummary[t],r=e._styleSummary[t];(!i||r.time>i.time)&&this._updateStyle(t,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Fr(a,!0);Object.keys(c).forEach(u=>{const p=c[u];"!"==p?e.add(u):p==dr&&t.add(u)}),i||(c.offset=l/this.duration),r.push(c)});const s=e.size?Gc(e.values()):[],o=t.size?Gc(t.values()):[];if(i){const a=r[0],l=go(a);a.offset=0,l.offset=1,r=[a,l]}return Cp(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class UV extends Qc{constructor(e,t,i,r,s,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=i+t,a=t/o,l=Fr(e[0],!1);l.offset=0,s.push(l);const c=Fr(e[0],!1);c.offset=HC(a),s.push(c);const u=e.length-1;for(let p=1;p<=u;p++){let b=Fr(e[p],!1);b.offset=HC((t+b.offset*i)/o),s.push(b)}i=o,t=0,r="",e=s}return Cp(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function HC(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class Sp{}class $V extends Sp{normalizePropertyName(e,t){return yp(e)}normalizeStyleValue(e,t,i,r){let s="";const o=i.toString().trim();if(GV[t]&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(`Please provide a CSS unit value for ${e}:${i}`)}return o+s}}const GV=(()=>function WV(n){const e={};return n.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function $C(n,e,t,i,r,s,o,a,l,c,u,p,b){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:p,errors:b}}const Tp={};class GC{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return function qV(n,e,t,i,r){return n.some(s=>s(e,t,i,r))}(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){const r=this._stateStyles["*"],s=this._stateStyles[e],o=r?r.buildStyles(t,i):{};return s?s.buildStyles(t,i):o}build(e,t,i,r,s,o,a,l,c,u){const p=[],b=this.ast.options&&this.ast.options.params||Tp,z=this.buildStyles(i,a&&a.params||Tp,p),ae=l&&l.params||Tp,re=this.buildStyles(r,ae,p),Me=new Set,Ce=new Map,qe=new Map,Qe="void"===r,ut={params:Object.assign(Object.assign({},b),ae)},xt=u?[]:Dp(e,t,this.ast.animation,s,o,z,re,ut,c,p);let kt=0;if(xt.forEach(On=>{kt=Math.max(On.duration+On.delay,kt)}),p.length)return $C(t,this._triggerName,i,r,Qe,z,re,[],[],Ce,qe,kt,p);xt.forEach(On=>{const kn=On.element,hr=ti(Ce,kn,{});On.preStyleProps.forEach(Oi=>hr[Oi]=!0);const fr=ti(qe,kn,{});On.postStyleProps.forEach(Oi=>fr[Oi]=!0),kn!==t&&Me.add(kn)});const Gn=Gc(Me.values());return $C(t,this._triggerName,i,r,Qe,z,re,xt,Gn,Ce,qe,kt)}}class zV{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i={},r=go(this.defaultParams);return Object.keys(e).forEach(s=>{const o=e[s];null!=o&&(r[s]=o)}),this.styles.styles.forEach(s=>{if("string"!=typeof s){const o=s;Object.keys(o).forEach(a=>{let l=o[a];l.length>1&&(l=$c(l,r,t));const c=this.normalizer.normalizePropertyName(a,t);l=this.normalizer.normalizeStyleValue(a,c,l,t),i[c]=l})}}),i}}class YV{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states={},t.states.forEach(r=>{this.states[r.name]=new zV(r.style,r.options&&r.options.params||{},i)}),WC(this.states,"true","1"),WC(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new GC(e,r,this.states))}),this.fallbackTransition=function XV(n,e,t){return new GC(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(o=>o.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function WC(n,e,t){n.hasOwnProperty(e)?n.hasOwnProperty(t)||(n[t]=n[e]):n.hasOwnProperty(t)&&(n[e]=n[t])}const QV=new Yc;class ZV{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(e,t){const i=[],r=Ep(this._driver,t,i);if(i.length)throw new Error(`Unable to build the animation due to the following errors: ${i.join("\n")}`);this._animations[e]=r}_buildPlayer(e,t,i){const r=e.element,s=AC(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const r=[],s=this._animations[e];let o;const a=new Map;if(s?(o=Dp(this._driver,t,s,pp,jc,{},{},i,QV,r),o.forEach(u=>{const p=ti(a,u.element,{});u.postStyleProps.forEach(b=>p[b]=null)})):(r.push("The requested animation doesn't exist or has already been destroyed"),o=[]),r.length)throw new Error(`Unable to create the animation due to the following errors: ${r.join("\n")}`);a.forEach((u,p)=>{Object.keys(u).forEach(b=>{u[b]=this._driver.computeStyle(p,b,dr)})});const c=Rr(o.map(u=>{const p=a.get(u.element);return this._buildPlayer(u,{},p)}));return this._playersById[e]=c,c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),delete this._playersById[e];const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById[e];if(!t)throw new Error(`Unable to find the timeline player referenced by ${e}`);return t}listen(e,t,i,r){const s=op(t,"","","");return rp(this._getPlayer(e),i,s,r),()=>{}}command(e,t,i,r){if("register"==i)return void this.register(e,r[0]);if("create"==i)return void this.create(e,t,r[0]||{});const s=this._getPlayer(e);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const qC="ng-animate-queued",zC="ng-animate-disabled",KC=".ng-animate-disabled",n2=[],YC={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},i2={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},pi="__ng_removed";class wp{constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function a2(n){return null!=n?n:null}(i?e.value:e),i){const s=go(e);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const Va="void",Mp=new wp(Va);class r2{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,gi(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.hasOwnProperty(t))throw new Error(`Unable to listen on the animation trigger event "${i}" because the animation trigger "${t}" doesn't exist!`);if(null==i||0==i.length)throw new Error(`Unable to listen on the animation trigger "${t}" because the provided event is undefined!`);if(!function l2(n){return"start"==n||"done"==n}(i))throw new Error(`The provided animation trigger event "${i}" for the animation trigger "${t}" is not supported!`);const s=ti(this._elementListeners,e,[]),o={name:t,phase:i,callback:r};s.push(o);const a=ti(this._engine.statesByElement,e,{});return a.hasOwnProperty(t)||(gi(e,Bc),gi(e,Bc+"-"+t),a[t]=Mp),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers[t]||delete a[t]})}}register(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}_getTrigger(e){const t=this._triggers[e];if(!t)throw new Error(`The provided animation trigger "${e}" has not been registered!`);return t}trigger(e,t,i,r=!0){const s=this._getTrigger(t),o=new Ip(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(gi(e,Bc),gi(e,Bc+"-"+t),this._engine.statesByElement.set(e,a={}));let l=a[t];const c=new wp(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a[t]=c,l||(l=Mp),c.value!==Va&&l.value===c.value){if(!function d2(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r=0;r<t.length;r++){const s=t[r];if(!e.hasOwnProperty(s)||n[s]!==e[s])return!1}return!0}(l.params,c.params)){const ae=[],re=s.matchStyles(l.value,l.params,ae),Me=s.matchStyles(c.value,c.params,ae);ae.length?this._engine.reportError(ae):this._engine.afterFlush(()=>{ss(e,re),Qi(e,Me)})}return}const b=ti(this._engine.playersByElement,e,[]);b.forEach(ae=>{ae.namespaceId==this.id&&ae.triggerName==t&&ae.queued&&ae.destroy()});let U=s.matchTransition(l.value,c.value,e,c.params),z=!1;if(!U){if(!r)return;U=s.fallbackTransition,z=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:U,fromState:l,toState:c,player:o,isFallbackTransition:z}),z||(gi(e,qC),o.onStart(()=>{mo(e,qC)})),o.onDone(()=>{let ae=this.players.indexOf(o);ae>=0&&this.players.splice(ae,1);const re=this._engine.playersByElement.get(e);if(re){let Me=re.indexOf(o);Me>=0&&re.splice(Me,1)}}),this.players.push(o),b.push(o),o}deregister(e){delete this._triggers[e],this._engine.statesByElement.forEach((t,i)=>{delete t[e]}),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,Uc,!0);i.forEach(r=>{if(r[pi])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){const s=this._engine.statesByElement.get(e);if(s){const o=[];if(Object.keys(s).forEach(a=>{if(this._triggers[a]){const l=this.trigger(e,a,Va,r);l&&o.push(l)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),i&&Rr(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers[o].fallbackTransition,c=i[o]||Mp,u=new wp(Va),p=new Ip(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:u,player:p,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(e):[];if(s&&s.length)r=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{const s=e[pi];(!s||s===YC)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){gi(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=op(s,i.triggerName,i.fromState.value,i.toState.value);l._data=e,rp(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const s=i.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class s2{constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new r2(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList.length-1;if(i>=0){let r=!1;for(let s=i;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,t)){this._namespaceList.splice(s+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i){const r=Object.keys(i);for(let s=0;s<r.length;s++){const o=i[r[s]].namespaceId;if(o){const a=this._fetchNamespace(o);a&&t.add(a)}}}return t}trigger(e,t,i,r){if(Zc(t)){const s=this._fetchNamespace(e);if(s)return s.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!Zc(t))return;const s=t[pi];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){const o=this._fetchNamespace(e);o&&o.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),gi(e,zC)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),mo(e,zC))}removeNode(e,t,i,r){if(Zc(t)){const s=e?this._fetchNamespace(e):null;if(s?s.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),i){const o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,i,r){this.collectedLeaveElements.push(t),t[pi]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1}}listen(e,t,i,r,s){return Zc(t)?this._fetchNamespace(e).listen(t,i,r,s):()=>{}}_buildInstruction(e,t,i,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,s)}destroyInnerAnimations(e){let t=this.driver.query(e,Uc,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,gp,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Rr(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[pi];if(t&&t.setForRemoval){if(e[pi]=YC,t.namespaceId){this.destroyInnerAnimations(e);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}this.driver.matchesElement(e,KC)&&this.markElementAsDisabled(e,!1),this.driver.query(e,KC,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)gi(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{t=this._flushAnimations(i,e)}finally{for(let r=0;r<i.length;r++)i[r]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?Rr(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${e.join("\n")}`)}_flushAnimations(e,t){const i=new Yc,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(et=>{u.add(et);const nt=this.driver.query(et,".ng-animate-queued",!0);for(let pt=0;pt<nt.length;pt++)u.add(nt[pt])});const p=this.bodyNode,b=Array.from(this.statesByElement.keys()),U=ZC(b,this.collectedEnterElements),z=new Map;let ae=0;U.forEach((et,nt)=>{const pt=pp+ae++;z.set(nt,pt),et.forEach(It=>gi(It,pt))});const re=[],Me=new Set,Ce=new Set;for(let et=0;et<this.collectedLeaveElements.length;et++){const nt=this.collectedLeaveElements[et],pt=nt[pi];pt&&pt.setForRemoval&&(re.push(nt),Me.add(nt),pt.hasAnimation?this.driver.query(nt,".ng-star-inserted",!0).forEach(It=>Me.add(It)):Ce.add(nt))}const qe=new Map,Qe=ZC(b,Array.from(Me));Qe.forEach((et,nt)=>{const pt=jc+ae++;qe.set(nt,pt),et.forEach(It=>gi(It,pt))}),e.push(()=>{U.forEach((et,nt)=>{const pt=z.get(nt);et.forEach(It=>mo(It,pt))}),Qe.forEach((et,nt)=>{const pt=qe.get(nt);et.forEach(It=>mo(It,pt))}),re.forEach(et=>{this.processLeaveNode(et)})});const ut=[],xt=[];for(let et=this._namespaceList.length-1;et>=0;et--)this._namespaceList[et].drainQueuedTransitions(t).forEach(pt=>{const It=pt.player,Sn=pt.element;if(ut.push(It),this.collectedEnterElements.length){const Ji=Sn[pi];if(Ji&&Ji.setForMove)return void It.destroy()}const Zi=!p||!this.driver.containsElement(p,Sn),ii=qe.get(Sn),Pr=z.get(Sn),nn=this._buildInstruction(pt,i,Pr,ii,Zi);if(nn.errors&&nn.errors.length)xt.push(nn);else{if(Zi)return It.onStart(()=>ss(Sn,nn.fromStyles)),It.onDestroy(()=>Qi(Sn,nn.toStyles)),void r.push(It);if(pt.isFallbackTransition)return It.onStart(()=>ss(Sn,nn.fromStyles)),It.onDestroy(()=>Qi(Sn,nn.toStyles)),void r.push(It);nn.timelines.forEach(Ji=>Ji.stretchStartingKeyframe=!0),i.append(Sn,nn.timelines),o.push({instruction:nn,player:It,element:Sn}),nn.queriedElements.forEach(Ji=>ti(a,Ji,[]).push(It)),nn.preStyleProps.forEach((Ji,Ba)=>{const ru=Object.keys(Ji);if(ru.length){let as=l.get(Ba);as||l.set(Ba,as=new Set),ru.forEach(kp=>as.add(kp))}}),nn.postStyleProps.forEach((Ji,Ba)=>{const ru=Object.keys(Ji);let as=c.get(Ba);as||c.set(Ba,as=new Set),ru.forEach(kp=>as.add(kp))})}});if(xt.length){const et=[];xt.forEach(nt=>{et.push(`@${nt.triggerName} has failed due to:\n`),nt.errors.forEach(pt=>et.push(`- ${pt}\n`))}),ut.forEach(nt=>nt.destroy()),this.reportError(et)}const kt=new Map,Gn=new Map;o.forEach(et=>{const nt=et.element;i.has(nt)&&(Gn.set(nt,nt),this._beforeAnimationBuild(et.player.namespaceId,et.instruction,kt))}),r.forEach(et=>{const nt=et.element;this._getPreviousPlayers(nt,!1,et.namespaceId,et.triggerName,null).forEach(It=>{ti(kt,nt,[]).push(It),It.destroy()})});const On=re.filter(et=>eD(et,l,c)),kn=new Map;QC(kn,this.driver,Ce,c,dr).forEach(et=>{eD(et,l,c)&&On.push(et)});const fr=new Map;U.forEach((et,nt)=>{QC(fr,this.driver,new Set(et),l,"!")}),On.forEach(et=>{const nt=kn.get(et),pt=fr.get(et);kn.set(et,Object.assign(Object.assign({},nt),pt))});const Oi=[],_o=[],yo={};o.forEach(et=>{const{element:nt,player:pt,instruction:It}=et;if(i.has(nt)){if(u.has(nt))return pt.onDestroy(()=>Qi(nt,It.toStyles)),pt.disabled=!0,pt.overrideTotalTime(It.totalTime),void r.push(pt);let Sn=yo;if(Gn.size>1){let ii=nt;const Pr=[];for(;ii=ii.parentNode;){const nn=Gn.get(ii);if(nn){Sn=nn;break}Pr.push(ii)}Pr.forEach(nn=>Gn.set(nn,Sn))}const Zi=this._buildAnimation(pt.namespaceId,It,kt,s,fr,kn);if(pt.setRealPlayer(Zi),Sn===yo)Oi.push(pt);else{const ii=this.playersByElement.get(Sn);ii&&ii.length&&(pt.parentPlayer=Rr(ii)),r.push(pt)}}else ss(nt,It.fromStyles),pt.onDestroy(()=>Qi(nt,It.toStyles)),_o.push(pt),u.has(nt)&&r.push(pt)}),_o.forEach(et=>{const nt=s.get(et.element);if(nt&&nt.length){const pt=Rr(nt);et.setRealPlayer(pt)}}),r.forEach(et=>{et.parentPlayer?et.syncPlayerEvents(et.parentPlayer):et.destroy()});for(let et=0;et<re.length;et++){const nt=re[et],pt=nt[pi];if(mo(nt,jc),pt&&pt.hasAnimation)continue;let It=[];if(a.size){let Zi=a.get(nt);Zi&&Zi.length&&It.push(...Zi);let ii=this.driver.query(nt,gp,!0);for(let Pr=0;Pr<ii.length;Pr++){let nn=a.get(ii[Pr]);nn&&nn.length&&It.push(...nn)}}const Sn=It.filter(Zi=>!Zi.destroyed);Sn.length?c2(this,nt,Sn):this.processLeaveNode(nt)}return re.length=0,Oi.forEach(et=>{this.players.push(et),et.onDone(()=>{et.destroy();const nt=this.players.indexOf(et);this.players.splice(nt,1)}),et.play()}),Oi}elementContainsData(e,t){let i=!1;const r=t[pi];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,s){let o=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(o=a)}else{const a=this.playersByElement.get(e);if(a){const l=!s||s==Va;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){const s=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==s,p=ti(i,c,[]);this._getPreviousPlayers(c,u,o,a,t.toState).forEach(U=>{const z=U.getRealPlayer();z.beforeDestroy&&z.beforeDestroy(),U.destroy(),p.push(U)})}ss(s,t.fromStyles)}_buildAnimation(e,t,i,r,s,o){const a=t.triggerName,l=t.element,c=[],u=new Set,p=new Set,b=t.timelines.map(z=>{const ae=z.element;u.add(ae);const re=ae[pi];if(re&&re.removedBeforeQueried)return new po(z.duration,z.delay);const Me=ae!==l,Ce=function u2(n){const e=[];return JC(n,e),e}((i.get(ae)||n2).map(kt=>kt.getRealPlayer())).filter(kt=>!!kt.element&&kt.element===ae),qe=s.get(ae),Qe=o.get(ae),ut=AC(0,this._normalizer,0,z.keyframes,qe,Qe),xt=this._buildPlayer(z,ut,Ce);if(z.subTimeline&&r&&p.add(ae),Me){const kt=new Ip(e,a,ae);kt.setRealPlayer(xt),c.push(kt)}return xt});c.forEach(z=>{ti(this.playersByQueriedElement,z.element,[]).push(z),z.onDone(()=>function o2(n,e,t){let i;if(n instanceof Map){if(i=n.get(e),i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&n.delete(e)}}else if(i=n[e],i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&delete n[e]}return i}(this.playersByQueriedElement,z.element,z))}),u.forEach(z=>gi(z,PC));const U=Rr(b);return U.onDestroy(()=>{u.forEach(z=>mo(z,PC)),Qi(l,t.toStyles)}),p.forEach(z=>{ti(r,z,[]).push(U)}),U}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new po(e.duration,e.delay)}}class Ip{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new po,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(t=>{this._queuedCallbacks[t].forEach(i=>rp(e,t,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){ti(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function Zc(n){return n&&1===n.nodeType}function XC(n,e){const t=n.style.display;return n.style.display=null!=e?e:"none",t}function QC(n,e,t,i,r){const s=[];t.forEach(l=>s.push(XC(l)));const o=[];i.forEach((l,c)=>{const u={};l.forEach(p=>{const b=u[p]=e.computeStyle(c,p,r);(!b||0==b.length)&&(c[pi]=i2,o.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>XC(l,s[a++])),o}function ZC(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const r=new Set(e),s=new Map;function o(a){if(!a)return 1;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:r.has(c)?1:o(c),s.set(a,l),l}return e.forEach(a=>{const l=o(a);1!==l&&t.get(l).push(a)}),t}const Jc="$$classes";function gi(n,e){if(n.classList)n.classList.add(e);else{let t=n[Jc];t||(t=n[Jc]={}),t[e]=!0}}function mo(n,e){if(n.classList)n.classList.remove(e);else{let t=n[Jc];t&&delete t[e]}}function c2(n,e,t){Rr(t).onDone(()=>n.processLeaveNode(e))}function JC(n,e){for(let t=0;t<n.length;t++){const i=n[t];i instanceof CC?JC(i.players,e):e.push(i)}}function eD(n,e,t){const i=t.get(n);if(!i)return!1;let r=e.get(n);return r?i.forEach(s=>r.add(s)):e.set(n,i),t.delete(n),!0}class eu{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new s2(e,t,i),this._timelineEngine=new ZV(e,t,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(e,t,i,r,s){const o=e+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],c=Ep(this._driver,s,l);if(l.length)throw new Error(`The animation trigger "${r}" has failed to build due to the following errors:\n - ${l.join("\n - ")}`);a=function KV(n,e,t){return new YV(n,e,t)}(r,c,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i,r){this._transitionEngine.removeNode(e,t,r||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if("@"==i.charAt(0)){const[s,o]=SC(i);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,s){if("@"==i.charAt(0)){const[o,a]=SC(i);return this._timelineEngine.listen(o,t,a,s)}return this._transitionEngine.listen(e,t,i,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function tD(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=Rp(e[0]),e.length>1&&(i=Rp(e[e.length-1]))):e&&(t=Rp(e)),t||i?new h2(n,t,i):null}let h2=(()=>{class n{constructor(t,i,r){this._element=t,this._startStyles=i,this._endStyles=r,this._state=0;let s=n.initialStylesByElement.get(t);s||n.initialStylesByElement.set(t,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Qi(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Qi(this._element,this._initialStyles),this._endStyles&&(Qi(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(ss(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ss(this._element,this._endStyles),this._endStyles=null),Qi(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Rp(n){let e=null;const t=Object.keys(n);for(let i=0;i<t.length;i++){const r=t[i];f2(r)&&(e=e||{},e[r]=n[r])}return e}function f2(n){return"display"===n||"position"===n}const nD="animation",iD="animationend";class m2{constructor(e,t,i,r,s,o,a){this._element=e,this._name=t,this._duration=i,this._delay=r,this._easing=s,this._fillMode=o,this._onDoneFn=a,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=l=>this._handleCallback(l)}apply(){(function _2(n,e){const t=Pp(n,"").trim();let i=0;t.length&&(i=function v2(n,e){let t=0;for(let i=0;i<n.length;i++)n.charAt(i)===e&&t++;return t}(t,",")+1,e=`${t}, ${e}`),tu(n,"",e)})(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),oD(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){rD(this._element,this._name,"paused")}resume(){rD(this._element,this._name,"running")}setPosition(e){const t=sD(this._element,this._name);this._position=e*this._duration,tu(this._element,"Delay",`-${this._position}ms`,t)}getPosition(){return this._position}_handleCallback(e){const t=e._ngTestManualTimestamp||Date.now(),i=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&i>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),oD(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function y2(n,e){const i=Pp(n,"").split(","),r=Fp(i,e);r>=0&&(i.splice(r,1),tu(n,"",i.join(",")))}(this._element,this._name))}}function rD(n,e,t){tu(n,"PlayState",t,sD(n,e))}function sD(n,e){const t=Pp(n,"");return t.indexOf(",")>0?Fp(t.split(","),e):Fp([t],e)}function Fp(n,e){for(let t=0;t<n.length;t++)if(n[t].indexOf(e)>=0)return t;return-1}function oD(n,e,t){t?n.removeEventListener(iD,e):n.addEventListener(iD,e)}function tu(n,e,t,i){const r=nD+e;if(null!=i){const s=n.style[r];if(s.length){const o=s.split(",");o[i]=t,t=o.join(",")}}n.style[r]=t}function Pp(n,e){return n.style[nD+e]||""}class aD{constructor(e,t,i,r,s,o,a,l){this.element=e,this.keyframes=t,this.animationName=i,this._duration=r,this._delay=s,this._finalStyles=a,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=r+s,this._buildStyler()}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}destroy(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}finish(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(e){this._styler.setPosition(e)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new m2(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}beforeDestroy(){this.init();const e={};if(this.hasStarted()){const t=this._state>=3;Object.keys(this._finalStyles).forEach(i=>{"offset"!=i&&(e[i]=t?this._finalStyles[i]:vp(this.element,i))})}this.currentSnapshot=e}}class C2 extends po{constructor(e,t){super(),this.element=e,this._startingStyles={},this.__initialized=!1,this._styles=IC(t)}init(){this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEach(e=>{this._startingStyles[e]=this.element.style[e]}),super.init())}play(){!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(e=>this.element.style.setProperty(e,this._styles[e])),super.play())}destroy(){!this._startingStyles||(Object.keys(this._startingStyles).forEach(e=>{const t=this._startingStyles[e];t?this.element.style.setProperty(e,t):this.element.style.removeProperty(e)}),this._startingStyles=null,super.destroy())}}class cD{constructor(){this._count=0}validateStyleProperty(e){return cp(e)}matchesElement(e,t){return up(e,t)}containsElement(e,t){return dp(e,t)}query(e,t,i){return hp(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}buildKeyframeElement(e,t,i){i=i.map(a=>IC(a));let r=`@keyframes ${t} {\n`,s="";i.forEach(a=>{s=" ";const l=parseFloat(a.offset);r+=`${s}${100*l}% {\n`,s+=" ",Object.keys(a).forEach(c=>{const u=a[c];switch(c){case"offset":return;case"easing":return void(u&&(r+=`${s}animation-timing-function: ${u};\n`));default:return void(r+=`${s}${c}: ${u};\n`)}}),r+=`${s}}\n`}),r+="}\n";const o=document.createElement("style");return o.textContent=r,o}animate(e,t,i,r,s,o=[],a){const l=o.filter(re=>re instanceof aD),c={};LC(i,r)&&l.forEach(re=>{let Me=re.currentSnapshot;Object.keys(Me).forEach(Ce=>c[Ce]=Me[Ce])});const u=function S2(n){let e={};return n&&(Array.isArray(n)?n:[n]).forEach(i=>{Object.keys(i).forEach(r=>{"offset"==r||"easing"==r||(e[r]=i[r])})}),e}(t=VC(e,t,c));if(0==i)return new C2(e,u);const p="gen_css_kf_"+this._count++,b=this.buildKeyframeElement(e,p,t);(function A2(n){var e;const t=null===(e=n.getRootNode)||void 0===e?void 0:e.call(n);return"undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot?t:document.head})(e).appendChild(b);const z=tD(e,t),ae=new aD(e,t,p,i,r,s,u,z);return ae.onDestroy(()=>function T2(n){n.parentNode.removeChild(n)}(b)),ae}}class dD{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(e,t,i){return e.animate(t,i)}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(t=>{"offset"!=t&&(e[t]=this._finished?this._finalKeyframe[t]:vp(this.element,t))}),this.currentSnapshot=e}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class w2{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(hD().toString()),this._cssKeyframesDriver=new cD}validateStyleProperty(e){return cp(e)}matchesElement(e,t){return up(e,t)}containsElement(e,t){return dp(e,t)}query(e,t,i){return hp(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}overrideWebAnimationsSupport(e){this._isNativeImpl=e}animate(e,t,i,r,s,o=[],a){if(!a&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,i,r,s,o);const u={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(u.easing=s);const p={},b=o.filter(z=>z instanceof dD);LC(i,r)&&b.forEach(z=>{let ae=z.currentSnapshot;Object.keys(ae).forEach(re=>p[re]=ae[re])});const U=tD(e,t=VC(e,t=t.map(z=>Fr(z,!1)),p));return new dD(e,t,u,U)}}function hD(){return DC()&&Element.prototype.animate||{}}let I2=(()=>{class n extends yC{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Ke.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(t)?vC(t):t;return fD(this._renderer,null,i,"register",[r]),new R2(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(ze(qr),ze(Qt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class R2 extends class mV{}{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new F2(this._id,e,t||{},this._renderer)}}class F2{constructor(e,t,i,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return fD(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){var e,t;return null!==(t=null===(e=this._renderer.engine.players[+this.id])||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}}function fD(n,e,t,i,r){return n.setProperty(e,`@@${t}:${i}`,r)}const pD="@.disabled";let P2=(()=>{class n{constructor(t,i,r){this.delegate=t,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,o)=>{const a=null==o?void 0:o.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(t,i){const s=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(s);return u||(u=new gD("",s,this.engine),this._rendererCache.set(s,u)),u}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(o,a,t,u.name,u)};return i.data.animation.forEach(l),new x2(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,r){t>=0&&t<this._microtaskId?this._zone.run(()=>i(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(ze(qr),ze(eu),ze(Yt))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class gD{constructor(e,t,i){this.namespaceId=e,this.delegate=t,this.engine=i,this.destroyNode=this.delegate.destroyNode?r=>t.destroyNode(r):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==pD?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class x2 extends gD{constructor(e,t,i,r){super(t,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==pD?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.substr(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const r=function N2(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let s=t.substr(1),o="";return"@"!=s.charAt(0)&&([s,o]=function O2(n){const e=n.indexOf(".");return[n.substring(0,e),n.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}let k2=(()=>{class n extends eu{constructor(t,i,r){super(t.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(ze(Qt),ze(fp),ze(Sp))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const xp=new ct("AnimationModuleType"),mD=[{provide:yC,useClass:I2},{provide:Sp,useFactory:function V2(){return new $V}},{provide:eu,useClass:k2},{provide:qr,useFactory:function j2(n,e,t){return new P2(n,e,t)},deps:[bc,eu,Yt]}],_D=[{provide:fp,useFactory:function L2(){return function M2(){return"function"==typeof hD()}()?new w2:new cD}},{provide:xp,useValue:"BrowserAnimations"},...mD],B2=[{provide:fp,useClass:RC},{provide:xp,useValue:"NoopAnimations"},...mD];let U2=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?B2:_D}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:_D,imports:[I1]}),n})();const H2=["sliderWrapper"],mi=Oc({passive:!1}),z2={provide:Ni,useExisting:V(()=>yD),multi:!0};class K2{}const Y2=uV(cV(lV(class{constructor(n){this._elementRef=n}}),"accent"));let yD=(()=>{class n extends Y2{constructor(t,i,r,s,o,a,l,c){super(t),this._focusMonitor=i,this._changeDetectorRef=r,this._dir=s,this._ngZone=a,this._animationMode=c,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new dn,this.input=new dn,this.valueChange=new dn,this.onTouched=()=>{},this._percent=0,this._isSliding=null,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=k.Subscription.EMPTY,this._pointerDown=u=>{this.disabled||this._isSliding||!ja(u)&&0!==u.button||this._ngZone.run(()=>{this._touchId=ja(u)?function X2(n,e){for(let t=0;t<n.touches.length;t++){const i=n.touches[t].target;if(e===i||e.contains(i))return n.touches[t].identifier}}(u,this._elementRef.nativeElement):void 0;const p=vD(u,this._touchId);if(p){const b=this.value;this._isSliding="pointer",this._lastPointerEvent=u,u.preventDefault(),this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(u),this._focusHostElement(),this._updateValueFromPosition(p),this._valueOnSlideStart=b,b!=this.value&&this._emitInputEvent()}})},this._pointerMove=u=>{if("pointer"===this._isSliding){const p=vD(u,this._touchId);if(p){u.preventDefault();const b=this.value;this._lastPointerEvent=u,this._updateValueFromPosition(p),b!=this.value&&this._emitInputEvent()}}},this._pointerUp=u=>{"pointer"===this._isSliding&&(!ja(u)||"number"!=typeof this._touchId||Np(u.changedTouches,this._touchId))&&(u.preventDefault(),this._removeGlobalEvents(),this._isSliding=null,this._touchId=void 0,this._valueOnSlideStart!=this.value&&!this.disabled&&this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=l,this.tabIndex=parseInt(o)||0,a.runOutsideAngular(()=>{const u=t.nativeElement;u.addEventListener("mousedown",this._pointerDown,mi),u.addEventListener("touchstart",this._pointerDown,mi)})}get invert(){return this._invert}set invert(t){this._invert=Lc(t)}get max(){return this._max}set max(t){this._max=ho(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(t){this._min=ho(t,this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(t){this._step=ho(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(t){this._thumbLabel=Lc(t)}get tickInterval(){return this._tickInterval}set tickInterval(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?ho(t,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(t){if(t!==this._value){let i=ho(t,0);this._roundToDecimal&&i!==this.min&&i!==this.max&&(i=parseFloat(i.toFixed(this._roundToDecimal))),this._value=i,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(t){this._vertical=Lc(t)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(t){this._focusHostElement(t)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){const i=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${i})`}}_getTrackFillStyles(){const t=this.percent,r=this.vertical?`1, ${t}, 1`:`${t}, 1, 1`;return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${r})`,display:0===t?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let t=100*this._tickIntervalPercent,a={backgroundSize:this.vertical?`2px ${t}%`:`${t}% 2px`,transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${t/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){const l=this._shouldInvertAxis();let c;c=this.vertical?l?"Bottom":"Top":l?"Right":"Left",a[`padding${c}`]=`${this._getThumbGap()}px`}return a}_getThumbContainerStyles(){const t=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{this._isActive=!!t&&"keyboard"!==t,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,mi),t.removeEventListener("touchstart",this._pointerDown,mi),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(t){if(this.disabled||function HL(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t)||this._isSliding&&"keyboard"!==this._isSliding)return;const i=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}i!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding="keyboard",t.preventDefault()}_onKeyup(){"keyboard"===this._isSliding&&(this._isSliding=null)}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(t){const i=this._document,r=ja(t),o=r?"touchend":"mouseup";i.addEventListener(r?"touchmove":"mousemove",this._pointerMove,mi),i.addEventListener(o,this._pointerUp,mi),r&&i.addEventListener("touchcancel",this._pointerUp,mi);const a=this._getWindow();void 0!==a&&a&&a.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const t=this._document;t.removeEventListener("mousemove",this._pointerMove,mi),t.removeEventListener("mouseup",this._pointerUp,mi),t.removeEventListener("touchmove",this._pointerMove,mi),t.removeEventListener("touchend",this._pointerUp,mi),t.removeEventListener("touchcancel",this._pointerUp,mi);const i=this._getWindow();void 0!==i&&i&&i.removeEventListener("blur",this._windowBlur)}_increment(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}_updateValueFromPosition(t){if(!this._sliderDimensions)return;let o=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(o=1-o),0===o)this.value=this.min;else if(1===o)this.value=this.max;else{const a=this._calculateValue(o),l=Math.round((a-this.min)/this.step)*this.step+this.min;this.value=this._clamp(l,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){let t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,s=Math.ceil(30/(t*this.step/(this.max-this.min)))*this.step;this._tickIntervalPercent=s/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}_createChangeEvent(t=this.value){let i=new K2;return i.source=this,i.value=t,i}_calculatePercentage(t){return((t||0)-this.min)/(this.max-this.min)}_calculateValue(t){return this.min+t*(this.max-this.min)}_clamp(t,i=0,r=1){return Math.max(i,Math.min(t,r))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(t){this._elementRef.nativeElement.focus(t)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(t){this.value=t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}}return n.\u0275fac=function(t){return new(t||n)(He(Cn),He(rV),He(oa),He(AL,8),function al(n){return function TA(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const i=t.length;let r=0;for(;r<i;){const s=t[r];if(fg(s))break;if(0===s)r+=2;else if("number"==typeof s)for(r++;r<i&&"string"==typeof t[r];)r++;else{if(s===e)return t[r+1];r+=2}}}return null}(pn(),n)}("tabindex"),He(Yt),He(Qt),He(xp,8))},n.\u0275cmp=tt({type:n,selectors:[["mat-slider"]],viewQuery:function(t,i){if(1&t&&jv(H2,5),2&t){let r;Vv(r=function Bv(){return function QR(n,e){return n[19].queries[e].queryList}(Be(),og())}())&&(i._sliderWrapper=r.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(t,i){1&t&&mn("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()})("keydown",function(s){return i._onKeydown(s)})("keyup",function(){return i._onKeyup()})("mouseenter",function(){return i._onMouseenter()})("selectstart",function(s){return s.preventDefault()}),2&t&&(Wd("tabIndex",i.tabIndex),Wi("aria-disabled",i.disabled)("aria-valuemax",i.max)("aria-valuemin",i.min)("aria-valuenow",i.value)("aria-valuetext",null==i.valueText?i.displayValue:i.valueText)("aria-orientation",i.vertical?"vertical":"horizontal"),Yo("mat-slider-disabled",i.disabled)("mat-slider-has-ticks",i.tickInterval)("mat-slider-horizontal",!i.vertical)("mat-slider-axis-inverted",i._shouldInvertAxis())("mat-slider-invert-mouse-coords",i._shouldInvertMouseCoords())("mat-slider-sliding",i._isSliding)("mat-slider-thumb-label-showing",i.thumbLabel)("mat-slider-vertical",i.vertical)("mat-slider-min-value",i._isMinValue())("mat-slider-hide-last-tick",i.disabled||i._isMinValue()&&i._getThumbGap()&&i._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",value:"value",displayWith:"displayWith",valueText:"valueText",vertical:"vertical"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[Gt([z2]),Ot],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,i){1&t&&(St(0,"div",0,1),St(2,"div",2),Ai(3,"div",3),Ai(4,"div",4),Tt(),St(5,"div",5),Ai(6,"div",6),Tt(),St(7,"div",7),Ai(8,"div",8),Ai(9,"div",9),St(10,"div",10),St(11,"span",11),or(12),Tt(),Tt(),Tt(),Tt()),2&t&&(an(3),bn("ngStyle",i._getTrackBackgroundStyles()),an(1),bn("ngStyle",i._getTrackFillStyles()),an(1),bn("ngStyle",i._getTicksContainerStyles()),an(1),bn("ngStyle",i._getTicksStyles()),an(1),bn("ngStyle",i._getThumbContainerStyles()),an(5),Pl(i.displayValue))},directives:[Fb],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{-webkit-print-color-adjust:exact;color-adjust:exact;position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{-webkit-background-clip:content-box;background-clip:content-box;background-repeat:repeat;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),n})();function ja(n){return"t"===n.type[0]}function vD(n,e){let t;return t=ja(n)?"number"==typeof e?Np(n.touches,e)||Np(n.changedTouches,e):n.touches[0]||n.changedTouches[0]:n,t?{x:t.clientX,y:t.clientY}:void 0}function Np(n,e){for(let t=0;t<n.length;t++)if(n[t].identifier===e)return n[t]}let Q2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({imports:[[ba,pC],pC]}),n})();function Z2(n,e){1&n&&Ai(0,"div",25)}function J2(n,e){if(1&n){const t=Il();St(0,"img",26),mn("click",function(r){bo(t);const s=qi().$implicit;return qi().openThumb(r,s.fileNo,"img",s.documentId,s.path,s.external)}),Tt()}if(2&n){const t=qi().$implicit;xl("card-image-top ",t.class,""),bn("src",t.path,$u)("id",t.fileNo)}}function ej(n,e){if(1&n){const t=Il();St(0,"canvas",27),mn("click",function(r){bo(t);const s=qi().$implicit;return qi().openThumb(r,s.fileNo,"pdf",s.documentId,s.path,s.external)}),Tt()}2&n&&bn("id",qi().$implicit.fileNo+"_canvas")}function tj(n,e){if(1&n&&(St(0,"div",18),St(1,"div",19),Ai(2,"div",20),Tt(),St(3,"div",13),St(4,"div",21),$s(5,Z2,1,0,"div",22),$s(6,J2,1,5,"img",23),$s(7,ej,1,1,"canvas",24),Tt(),Tt(),Tt()),2&n){const t=e.$implicit;bn("hidden",""==t.mime),an(2),bn("innerHtml",t.title,zg),an(3),bn("ngIf",t.loading),an(1),bn("ngIf","application/pdf"!=t.mime),an(1),bn("ngIf","application/pdf"==t.mime)}}function nj(n,e){if(1&n){const t=Il();St(0,"div",28),St(1,"button",29),mn("click",function(){return bo(t),qi().prevPdfPage()}),or(2,"<"),Tt(),St(3,"span"),or(4),Tt(),St(5,"button",29),mn("click",function(){return bo(t),qi().nextPdfPage()}),or(6,">"),Tt(),Tt()}if(2&n){const t=qi();an(4),Gd("",t.pdfViewer.current_page," / ",t.pdfViewer.total_page,"")}}let ED=(()=>{class n extends vL{constructor(t,i,r,s,o,a){super(r,t,i,s),this.changedDocumentService=t,this.componentSetupService=i,this.formbirdInjectorService=r,this.cdr=s,this.searchService=o,this.domSanitizer=a,this.subs=new k.Subscription,this.updateWatchFields=[],this.mimeTypes={image:["image/gif","image/png","image/jpeg","image/jpg","image","jpg","gif","png"],pdf:["application/pdf","pdf"]},this.showModal=!1,this.currentView="img",this.pdfViewer={pdf:null,canvas:null,current_page:1,total_page:0},this.allowedItemTypes=[],this.fileReferences=[]}ngOnDestroy(){this.subs.unsubscribe()}ngOnInit(){if(this.contextParams={document:this.document,doc:this.document,tpl:this.template,template:this.template,tplItem:this.componentDefinition,componentDefinition:this.componentDefinition},this.componentDefinition.documentLocations)for(let i=0;i<this.componentDefinition.documentLocations.length;i++)"fileReference"===this.componentDefinition.documentLocations[i].fieldType&&this.fileReferences.push(this.componentDefinition.documentLocations[i]);this.thumbnailFieldType=new EL,Xi.initHandlebars(this.componentDefinition.handlebarsHelpers),null==this.componentDefinition.openIn||(this.openIn=this.componentDefinition.openIn),this.openIn="newWindow"===this.openIn?"_blank":"_self",this.readOnly=!1===this.componentDefinition.enabled;const t=this.changedDocumentService.watchComponentTemplate(this.template.documentId).subscribe(i=>{i.filter(r=>r.name&&r.name===this.fieldName).forEach(r=>{this.readOnly=!1===r.enabled,this.cdr.detectChanges()})});this.subs.add(t)}ngAfterViewInit(){let t;this.initialImageSize=8,null==this.componentDefinition.initialImageSize||(this.initialImageSize=this.componentDefinition.initialImageSize),this.initialImageSize<3&&(this.initialImageSize=3),this.initialImageSize>12&&(this.initialImageSize=12),this.watchDocument(),this.componentDefinition.filter?this.doSearch():this.doGetFiles(),t=window.hasOwnProperty("pdfWorkerSrc")&&"string"==typeof window.pdfWorkerSrc&&window.pdfWorkerSrc?window.pdfWorkerSrc:`https://cdn.jsdelivr.net/npm/pdfjs-dist@${Nc.version}/legacy/build/pdf.worker.min.js`,Nc.GlobalWorkerOptions.workerSrc=t,this.pdfViewer.canvas=document.getElementById("modalCanvas_"+this.key)}getSearchTerm(){const i=Xi.processHandlebars(this.componentDefinition.filter,null,{document:this.document,doc:this.document,tpl:this.template,template:this.template,componentDefinition:this.componentDefinition,fileReference:this.fileReferences});let r;"string"==typeof i?(r=i.replace(/'/g,'"'),r=JSON.parse(r)):r=i;const s={page:0,pageSize:1e4};return s.filter=r,s}processHandlebars(t,i,r={}){if(i)return Xi.processHandlebars(t,{result:i,fileReference:r},{document:this.document,doc:this.document,tpl:this.template,template:this.template,componentDefinition:this.componentDefinition})}doGetFiles(){this.files=[],this.componentDefinition.documentLocations.forEach(t=>{let i=[];t.itemType.forEach(o=>{i=i.concat(this.mimeTypes[o])}),t.fieldName.replace("document.",""),this.thumbnailFieldType.getFiles(this,this.contextParams.document,t,i)})}doSearch(){const t=this.getSearchTerm();this.files=[],this.searchService.search(t).then(i=>{i&&i.data&&i.data.hits&&i.data.hits.hits&&i.data.hits.hits.length&&(i=i.data.hits.hits).forEach(r=>{const s=r._source;this.componentDefinition.documentLocations.forEach(o=>{let a=[];o.itemType.forEach(l=>{a=a.concat(this.mimeTypes[l])}),this.thumbnailFieldType.getFiles(this,s,o,a)})})},i=>{console.log("error on Fetching Data:"+i)})}getFile(t,i,r){return function L1(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(p){o(p)}}function l(u){try{c(i.throw(u))}catch(p){o(p)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){this.files[i].loading=!0,fetch(t).then(s=>s.blob().then(o=>({contentType:s.headers.get("Content-Type")}))).then(s=>{r.includes(s.contentType)?(this.files[i].loading=!1,this.files[i].mime=s.contentType,"application/pdf"===s.contentType&&this.makeThumb("/api/getFile/"+this.files[i].fileNo,this.files[i].fileNo)):console.log("FileNo:"+this.files[i].fileNo+" Type: "+s.contentType+" is not a supported file type for display"),this.cdr.detectChanges()}).catch(s=>{console.log("Failed Fetch, using the text validation...");const o=this.getFileType(t);r.includes("pdf")?"pdf"===o&&(this.files[i].loading=!1,this.files[i].mime="pdf",this.makeThumb(t,this.files[i].fileNo)):r.includes("image")&&(this.files[i].loading=!1,this.files[i].mime="image"),this.cdr.detectChanges()})})}getFileType(t){return"string"!=typeof t?"":null!==t.match(/^http[^\?]*.(jpg|jpeg|gif|png|tiff|bmp)(\?(.*))?$/gim)?"image":null!==t.match(/^http[^\?]*.(pdf)(\?(.*))?$/gim)?"pdf":void 0}isValidURL(t){return null!==t.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}openThumb(t,i,r,s,o,a=!1){this.selectedItem={documentId:s,path:o,external:a};const l=this.pdfViewer.canvas.getContext("2d"),c=new Image;if("img"===r){this.currentView="img";const u=this;c.addEventListener("load",function(){u.pdfViewer.canvas.width=this.naturalWidth,u.pdfViewer.canvas.height=this.naturalHeight,l.drawImage(c,0,0)}),$("#scThumbnail_modal_"+u.key).css("display","flex"),c.src=t.target.src}else"pdf"===r&&(this.pdfViewer.canvas.width=c.width,this.pdfViewer.canvas.height=c.height,this.pdfviewer(i,this.pdfViewer.current_page));this.showModal=!this.showModal}closeThumb(t){this.showModal=!this.showModal,this.selectedItem=null}openDocument(){window.open(this.selectedItem.path,"_blank")}pdfviewer(t,i=1){const s=Nc.getDocument("/api/getFile/"+t);this.pdfViewer.canvas.getContext("2d").clearRect(0,0,this.pdfViewer.canvas.width,this.pdfViewer.canvas.height),s.promise.then(a=>{this.pdfViewer.pdf=a,this.pdfViewer.total_page=a.numPages,this.pdfViewer.current_page=1,this.getPdfPage()}),$("#scThumbnail_modal_"+this.key).css("display","flex")}prevPdfPage(){1!==this.pdfViewer.current_page&&(this.pdfViewer.current_page--,this.getPdfPage())}nextPdfPage(){this.pdfViewer.current_page!==this.pdfViewer.total_page&&(this.pdfViewer.current_page++,this.getPdfPage())}getPdfPage(){this.pdfViewer.pdf.getPage(this.pdfViewer.current_page).then(t=>{const r=t.getViewport({scale:1.5}),s=window.devicePixelRatio||1,o=this.pdfViewer.canvas.getContext("2d");this.pdfViewer.canvas.width=Math.floor(r.width*s),this.pdfViewer.canvas.height=Math.floor(r.height*s),t.render({canvasContext:o,transform:1!==s?[s,0,0,s,0,0]:null,viewport:r}),this.currentView="pdf",this.cdr.detectChanges()})}makeThumb(t,i){t&&Nc.getDocument(t).promise.then(s=>{s.getPage(1).then(o=>{const l=o.getViewport({scale:1.5}),c=window.devicePixelRatio||1,u=document.getElementById(i+"_canvas"),p=u.getContext("2d");u.width=Math.floor(l.width*c),u.height=Math.floor(l.height*c),o.render({canvasContext:p,transform:1!==c?[c,0,0,c,0,0]:null,viewport:l})})})}onSliderChange(t){const i=t.value;if(i>0){const r=3*i;$(`.${this.fieldName}_${this.key} .listContainer`).css({"grid-template-columns":"repeat(auto-fill, minmax("+r+"%, 1fr))"})}}watchDocument(){(()=>{let i=[];if(this.componentDefinition.filter)i=this.componentDefinition.updateWatchFields||[];else for(const r of this.componentDefinition.documentLocations)i.push(r.fieldName);for(const r of i){const s=r.replace("document.",""),o=this.changedDocumentService.watch(s,this.document.documentId).subscribe(a=>{this.contextParams.document[s]=a,this.componentDefinition.filter?this.doSearch():this.doGetFiles()});this.subs.add(o)}})()}}return n.\u0275fac=function(t){return new(t||n)(He(Cf),He(Yf),He(iC),He(oa),He(bL),He(Cc))},n.\u0275cmp=tt({type:n,selectors:[["ng-component"]],features:[Ot],decls:26,vars:22,consts:[[2,"position","sticky","top","0","background-color","#fff","width","100%","height","60px","z-index","100"],["id","displayWidthSlider",2,"margin-left","6px"],["id","fieldName+'Slider'","min","3","max","12","step","1",3,"value","disabled","valueChange","input"],["id","reportCount",2,"margin-bottom","10px","font-weight","bold","margin-bottom","10px"],["id","centerGrid"],[1,"imageListingComponent"],["id","htmlThumb"],[1,"bigDiv"],["id","hiddenDetails"],[1,"listContainer"],["class","card",3,"hidden",4,"ngFor","ngForOf"],[1,"scThumbnail_backdrop",3,"id","hidden"],[3,"id"],[1,"card-body"],[1,"card-footer"],["class","pdfControls",4,"ngIf"],[1,"mat-focus-indicator","mat-button","mat-raised-button","mat-button-base",2,"background","#a1c539",3,"click"],[1,"mat-focus-indicator","mat-button","mat-raised-button","mat-button-base",2,"background","#c60000",3,"click"],[1,"card",3,"hidden"],[1,"card-link"],[1,"card-header",3,"innerHtml"],[2,"padding","10px"],["class","shimmer placeholder",4,"ngIf"],[3,"src","id","class","click",4,"ngIf"],["class","thumb_canvas",3,"id","click",4,"ngIf"],[1,"shimmer","placeholder"],[3,"src","id","click"],[1,"thumb_canvas",3,"id","click"],[1,"pdfControls"],[1,"mat-focus-indicator","mat-button","mat-raised-button","mat-button-base",3,"click"]],template:function(t,i){1&t&&(St(0,"div"),St(1,"label"),or(2),Tt(),St(3,"div",0),St(4,"div",1),St(5,"div"),or(6,"Display Width"),Tt(),St(7,"mat-slider",2),mn("valueChange",function(s){return i.initialImageSize=s})("input",function(s){return i.onSliderChange(s)}),Tt(),Tt(),Tt(),Ai(8,"div",3),St(9,"div",4),St(10,"div",5),Ai(11,"div",6),St(12,"div",7),St(13,"div",8),St(14,"div",9),$s(15,tj,8,5,"div",10),Tt(),Tt(),Tt(),Tt(),Tt(),Tt(),St(16,"div",11),St(17,"div",12),St(18,"div",13),Ai(19,"canvas",12),Tt(),St(20,"div",14),$s(21,nj,7,2,"div",15),St(22,"button",16),mn("click",function(){return i.openDocument()}),or(23,"Open"),Tt(),St(24,"button",17),mn("click",function(s){return i.closeThumb(s)}),or(25,"Close"),Tt(),Tt(),Tt(),Tt()),2&t&&(function Ny(n,e,t,i,r){Ti(Qn,Ki,ks(Be(),n,e,t,i,r),!0)}("",i.fieldName,"_",i.key,""),an(1),xl("sc-thumbnail-label ",i.componentDefinition.mandatory?"mandatory":""," "),an(1),Pl(i.componentDefinition.label),an(5),bn("value",i.initialImageSize)("disabled",i.readOnly),an(7),Oy("grid-template-columns: repeat(auto-fill, minmax(",3*i.initialImageSize,"%, 1fr));"),an(1),bn("ngForOf",i.files),an(1),Ws("id","scThumbnail_backdrop_",i.key,""),bn("hidden",!i.showModal),an(1),xl("card scThumbnail_modal ",i.currentView,""),Ws("id","scThumbnail_modal_",i.key,""),an(2),Ws("id","modalCanvas_",i.key,""),an(2),bn("ngIf","pdf"===i.currentView))},directives:[yD,Tb,Mb],styles:['.sc-thumbnail-label{display:block;padding:10px 5px}.listContainer{width:100%;display:grid;grid-template-columns:repeat(auto-fill,minmax(30%,1fr));grid-auto-rows:auto;grid-column-gap:20px;column-gap:20px;grid-row-gap:20px;row-gap:20px;grid-auto-flow:row;margin-top:10px}.listRow{display:flex;flex-direction:column;justify-content:flex-start}.thumb_canvas{width:100%;min-height:50px;cursor:pointer}.card{min-height:200px;background:#e2e2e2;display:table}.card-header{background:#01769e;color:#fff;height:30px;padding-left:10px;font-size:14px;line-height:30px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;display:inline-block;overflow-wrap:break-word;position:absolute;width:calc(100% - 10px);overflow:hidden}.card-header:hover{background:#005f80}.card-link{text-decoration:none;display:table-row;height:30px;width:100%;position:relative}.card-image-top{cursor:pointer;width:100%;height:auto}.type-pdf{width:30%}.card-body{width:100%;display:table-cell;text-align:center;vertical-align:middle}.card-footer{position:relative;margin:10px;display:flex;gap:1rem;width:100%;justify-content:end}a{color:inherit}.listContainer:before{content:none!important}.listContainer:after{content:none!important}.slider{background-color:transparent;width:100px!important}.slider.slider-horizontal{position:relative;overflow:visible!important}.slider.slider-horizontal .slider-handle{margin-top:0}.slider-selection{background-image:linear-gradient(to bottom,#1a8fff 0,#1a8fff 100%)!important}.bigDiv{margin-top:20px}.swal-wide{width:90%!important}.modalTable th{font-weight:700;font-size:14px;padding:8px;text-align:left}.modalTable td{border:1px solid #ddd;font-size:14px;text-align:left;height:35px;padding:8px}.thumb-nails-modal-class .modal-header{display:none}.thumb-nails-modal-class .mat-dialog-actions{flex-direction:row-reverse}.thumb-nails-modal-class .mat-dialog-actions button{color:#fff;margin-right:20px}.placeholder{display:block;width:100%;height:50px}.placeholder:before{content:" ";background:#d1d1d1;width:100%;height:50px;position:absolute;top:0;left:0}.placeholder:after{content:" ";background:#d1d1d1;width:100%;height:8px;position:absolute;bottom:9px;left:0}.shimmer{color:gray;display:inline-block;-webkit-mask:linear-gradient(-60deg,#000 30%,#0005,#000 70%) right/300% 100%;background-repeat:no-repeat;animation:shimmer 1s infinite;font-size:50px;max-width:200px;padding-bottom:20px;position:relative}@keyframes shimmer{to{-webkit-mask-position:left}}.scThumbnail_backdrop{width:100vw;height:100vh;position:fixed;top:0;left:0;background:#0000000d;z-index:1000;display:flex;justify-content:center;align-items:center;animation:zoom-in-zoom-out 2s ease-out}.scThumbnail_modal{padding:20px;pointer-events:auto;box-sizing:border-box;z-index:1000;display:none;max-height:100%;background:#fff;border-radius:6px;box-shadow:1px 1px 20px #00000047;max-width:80vw;max-height:80vh;align-items:center;justify-content:center;flex-direction:column}.scThumbnail_modal canvas{max-width:100%;max-height:100%}.scThumbnail_modal .card-body{width:auto;position:relative;overflow:auto}.scThumbnail_modal.img .card-body{padding:0}.pdfControls{position:absolute;left:0;width:100%;display:block;gap:1rem;justify-content:start;align-items:start}\n'],encapsulation:2,changeDetection:0}),n})(),ij=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[Yf],imports:[[ba,Xb]]}),n})();const iu={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if("undefined"==typeof window)return iu.schedule(n,0);if(void 0===window.requestAnimationFrame)return iu.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let Op;function pj(n,e,t){let i=t;return function aj(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((r,s)=>!("*"===r||!function cj(n,e){if(!Op){const t=Element.prototype;Op=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&Op.call(n,e)}(n,r)||(i=s,0))),i}class mj{constructor(e,t){this.componentFactory=t.get(br).resolveComponentFactory(e)}create(e){return new _j(this.componentFactory,e)}}class _j{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new k.ReplaySubject(1),this.events=this.eventEmitters.pipe((0,j.switchMap)(i=>(0,k.merge)(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(Yt),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=iu.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function uj(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=Nt.create({providers:[],parent:this.injector}),i=function fj(n,e){const t=n.childNodes,i=e.map(()=>[]);let r=-1;e.some((s,o)=>"*"===s&&(r=o,!0));for(let s=0,o=t.length;s<o;++s){const a=t[s],l=pj(a,e,r);-1!==l&&i[l].push(a)}return i}(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,i,e),this.viewChangeDetectorRef=this.componentRef.injector.get(oa),this.implementsOnChanges=function lj(n){return"function"==typeof n}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(eo).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:e})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:i,templateName:r})=>e.instance[i].pipe((0,j.map)(o=>({name:r,value:o}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=iu.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[e];if(i)return void(i.currentValue=t);const r=this.unchangedInputs.has(e),s=r?void 0:this.getInputValue(e);this.inputChanges[e]=new uu(s,t,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class yj extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}let Ej=(()=>{class n{constructor(){this.convertToCustomElement=(t,i,r,s,o)=>{if(s||(s="NOT-SET"),!customElements.get(i)){const a=function vj(n,e){const t=function hj(n,e){return e.get(br).resolveComponentFactory(n).inputs}(n,e.injector),i=e.strategyFactory||new mj(n,e.injector),r=function dj(n){const e={};return n.forEach(({propName:t,templateName:i})=>{e[function sj(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(i)]=t}),e}(t);class s extends yj{constructor(a){super(),this.injector=a}get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(r[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=function oj(n,e,t){if("function"!=typeof CustomEvent){const s=n.createEvent("CustomEvent");return s.initCustomEvent(e,!1,!1,t),s}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}(this.ownerDocument,a.name,a.value);this.dispatchEvent(l)})}}return s.observedAttributes=Object.keys(r),t.forEach(({propName:o})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(a){this.ngElementStrategy.setInputValue(o,a)},configurable:!0,enumerable:!0})}),s}(t,{injector:r}),l=a.prototype.connectedCallback||function(){};a.prototype.connectedCallback=function(){this.setAttribute("fb-component-version",s),o&&this.setAttribute("is-static-panel",o.isStaticPanel),l.call(this)},customElements.define(i,a)}}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bj=(()=>{class n{constructor(t,i){this.injector=t,this.customElementService=i,i.convertToCustomElement(ED,"sc-thumbnail",this.injector,"7.5.9")}}return n.\u0275fac=function(t){return new(t||n)(ze(Nt),ze(Ej))},n.\u0275mod=At({type:n,bootstrap:[ED]}),n.\u0275inj=Y({imports:[[ba,Xb,Xk,Q2,U2,Qk,ij]]}),n})(),Cj=(()=>{class n{constructor(){}ngDoBootstrap(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Y({providers:[],imports:[[ba,bj]]}),n})();w1().bootstrapModule(Cj).catch(n=>console.error(n))},915:(module,__unused_webpack_exports,__webpack_require__)=>{var _asyncToGenerator=__webpack_require__(786).default,_e;globalThis,_e=()=>(()=>{"use strict";var __webpack_modules__=[,(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.VerbosityLevel=I.Util=I.UnknownErrorException=I.UnexpectedResponseException=I.UNSUPPORTED_FEATURES=I.TextRenderingMode=I.StreamType=I.RenderingIntentFlag=I.PermissionFlag=I.PasswordResponses=I.PasswordException=I.PageActionEventType=I.OPS=I.MissingPDFException=I.LINE_FACTOR=I.LINE_DESCENT_FACTOR=I.InvalidPDFException=I.ImageKind=I.IDENTITY_MATRIX=I.FormatError=I.FontType=I.FeatureTest=I.FONT_IDENTITY_MATRIX=I.DocumentActionEventType=I.CMapCompressionType=I.BaseException=I.AnnotationType=I.AnnotationStateModelType=I.AnnotationReviewState=I.AnnotationReplyType=I.AnnotationMode=I.AnnotationMarkedState=I.AnnotationFlag=I.AnnotationFieldFlag=I.AnnotationEditorType=I.AnnotationEditorPrefix=I.AnnotationEditorParamsType=I.AnnotationBorderStyleType=I.AnnotationActionEventType=I.AbortException=void 0,I.arrayByteLength=he,I.arraysToBytes=function ke(be){const oe=be.length;if(1===oe&&be[0]instanceof Uint8Array)return be[0];let le=0;for(let it=0;it<oe;it++)le+=he(be[it]);let Oe=0;const Ge=new Uint8Array(le);for(let it=0;it<oe;it++){let tt=be[it];tt instanceof Uint8Array||(tt="string"==typeof tt?ie(tt):new Uint8Array(tt));const Wt=tt.byteLength;Ge.set(tt,Oe),Oe+=Wt}return Ge},I.assert=function D(be,oe){be||te(oe)},I.bytesToString=function K(be){("object"!=typeof be||null===be||void 0===be.length)&&te("Invalid argument for bytesToString");const oe=be.length;if(oe<8192)return String.fromCharCode.apply(null,be);const Oe=[];for(let Ge=0;Ge<oe;Ge+=8192){const it=Math.min(Ge+8192,oe),tt=be.subarray(Ge,it);Oe.push(String.fromCharCode.apply(null,tt))}return Oe.join("")},I.createPromiseCapability=function Je(){const be=Object.create(null);let oe=!1;return Object.defineProperty(be,"settled",{get:()=>oe}),be.promise=new Promise(function(le,Oe){be.resolve=function(Ge){oe=!0,le(Ge)},be.reject=function(Ge){oe=!0,Oe(Ge)}}),be},I.createValidAbsoluteUrl=function R(be,oe=null,le=null){if(!be)return null;try{if(le&&"string"==typeof be){if(le.addDefaultProtocol&&be.startsWith("www.")){const Ge=be.match(/\./g);Ge&&Ge.length>=2&&(be=`http://${be}`)}if(le.tryConvertEncoding)try{be=vt(be)}catch(Ge){}}const Oe=oe?new URL(be,oe):new URL(be);if(function C(be){if(!be)return!1;switch(be.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(Oe))return Oe}catch(Oe){}return null},I.escapeString=function yt(be){return be.replace(/([()\\\n\r])/g,oe=>"\n"===oe?"\\n":"\r"===oe?"\\r":`\\${oe}`)},I.getModificationDate=function Fe(be=new Date){return[be.getUTCFullYear().toString(),(be.getUTCMonth()+1).toString().padStart(2,"0"),be.getUTCDate().toString().padStart(2,"0"),be.getUTCHours().toString().padStart(2,"0"),be.getUTCMinutes().toString().padStart(2,"0"),be.getUTCSeconds().toString().padStart(2,"0")].join("")},I.getVerbosityLevel=function De(){return se},I.info=function Ae(be){se>=ye.INFOS&&console.log(`Info: ${be}`)},I.isArrayBuffer=function rn(be){return"object"==typeof be&&null!==be&&void 0!==be.byteLength},I.isArrayEqual=function Te(be,oe){if(be.length!==oe.length)return!1;for(let le=0,Oe=be.length;le<Oe;le++)if(be[le]!==oe[le])return!1;return!0},I.isAscii=function $t(be){return/^[\x00-\x7F]*$/.test(be)},I.objectFromMap=function Ee(be){const oe=Object.create(null);for(const[le,Oe]of be)oe[le]=Oe;return oe},I.objectSize=function we(be){return Object.keys(be).length},I.setVerbosityLevel=function ee(be){Number.isInteger(be)&&(se=be)},I.shadow=Q,I.string32=function me(be){return String.fromCharCode(be>>24&255,be>>16&255,be>>8&255,255&be)},I.stringToBytes=ie,I.stringToPDFString=function lt(be){if(be[0]>="\xef"){let le;if("\xfe"===be[0]&&"\xff"===be[1]?le="utf-16be":"\xff"===be[0]&&"\xfe"===be[1]?le="utf-16le":"\xef"===be[0]&&"\xbb"===be[1]&&"\xbf"===be[2]&&(le="utf-8"),le)try{const Oe=new TextDecoder(le,{fatal:!0}),Ge=ie(be);return Oe.decode(Ge)}catch(Oe){xe(`stringToPDFString: "${Oe}".`)}}const oe=[];for(let le=0,Oe=be.length;le<Oe;le++){const Ge=Ke[be.charCodeAt(le)];oe.push(Ge?String.fromCharCode(Ge):be.charAt(le))}return oe.join("")},I.stringToUTF16BEString=function Lt(be){const oe=["\xfe\xff"];for(let le=0,Oe=be.length;le<Oe;le++){const Ge=be.charCodeAt(le);oe.push(String.fromCharCode(Ge>>8&255),String.fromCharCode(255&Ge))}return oe.join("")},I.stringToUTF8String=vt,I.unreachable=te,I.utf8StringToString=function Ct(be){return unescape(encodeURIComponent(be))},I.warn=xe,_e(2),I.IDENTITY_MATRIX=[1,0,0,1,0,0],I.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],I.LINE_FACTOR=1.35,I.LINE_DESCENT_FACTOR=.35,I.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},I.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},I.AnnotationEditorPrefix="pdfjs_internal_editor_",I.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},I.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},I.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},I.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},I.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},I.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},I.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},I.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},I.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},I.AnnotationReplyType={GROUP:"Group",REPLY:"R"},I.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},I.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},I.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},I.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},I.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},I.PageActionEventType={O:"PageOpen",C:"PageClose"},I.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},I.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const ye={ERRORS:0,WARNINGS:1,INFOS:5};I.VerbosityLevel=ye,I.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},I.OPS={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,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},I.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"},I.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let se=ye.WARNINGS;function xe(be){se>=ye.WARNINGS&&console.log(`Warning: ${be}`)}function te(be){throw new Error(be)}function Q(be,oe,le){return Object.defineProperty(be,oe,{value:le,enumerable:!0,configurable:!0,writable:!1}),le}const Y=function(){function oe(le,Oe){this.constructor===oe&&te("Cannot initialize BaseException."),this.message=le,this.name=Oe}return oe.prototype=new Error,oe.constructor=oe,oe}();function ie(be){"string"!=typeof be&&te("Invalid argument for stringToBytes");const oe=be.length,le=new Uint8Array(oe);for(let Oe=0;Oe<oe;++Oe)le[Oe]=255&be.charCodeAt(Oe);return le}function he(be){return void 0!==be.length?be.length:void 0!==be.byteLength?be.byteLength:void te("Invalid argument for arrayByteLength")}I.BaseException=Y,I.PasswordException=class J extends Y{constructor(oe,le){super(oe,"PasswordException"),this.code=le}},I.UnknownErrorException=class de extends Y{constructor(oe,le){super(oe,"UnknownErrorException"),this.details=le}},I.InvalidPDFException=class ue extends Y{constructor(oe){super(oe,"InvalidPDFException")}},I.MissingPDFException=class m extends Y{constructor(oe){super(oe,"MissingPDFException")}},I.UnexpectedResponseException=class S extends Y{constructor(oe,le){super(oe,"UnexpectedResponseException"),this.status=le}},I.FormatError=class F extends Y{constructor(oe){super(oe,"FormatError")}},I.AbortException=class L extends Y{constructor(oe){super(oe,"AbortException")}},I.FeatureTest=class X{static get isLittleEndian(){return Q(this,"isLittleEndian",function Ne(){const be=new Uint8Array(4);return be[0]=1,1===new Uint32Array(be.buffer,0,1)[0]}())}static get isEvalSupported(){return Q(this,"isEvalSupported",function Ve(){try{return new Function(""),!0}catch(be){return!1}}())}static get isOffscreenCanvasSupported(){return Q(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}};const je=[...Array(256).keys()].map(be=>be.toString(16).padStart(2,"0"));class Ze{static makeHexColor(oe,le,Oe){return`#${je[oe]}${je[le]}${je[Oe]}`}static scaleMinMax(oe,le){let Oe;oe[0]?(oe[0]<0&&(Oe=le[0],le[0]=le[1],le[1]=Oe),le[0]*=oe[0],le[1]*=oe[0],oe[3]<0&&(Oe=le[2],le[2]=le[3],le[3]=Oe),le[2]*=oe[3],le[3]*=oe[3]):(Oe=le[0],le[0]=le[2],le[2]=Oe,Oe=le[1],le[1]=le[3],le[3]=Oe,oe[1]<0&&(Oe=le[2],le[2]=le[3],le[3]=Oe),le[2]*=oe[1],le[3]*=oe[1],oe[2]<0&&(Oe=le[0],le[0]=le[1],le[1]=Oe),le[0]*=oe[2],le[1]*=oe[2]),le[0]+=oe[4],le[1]+=oe[4],le[2]+=oe[5],le[3]+=oe[5]}static transform(oe,le){return[oe[0]*le[0]+oe[2]*le[1],oe[1]*le[0]+oe[3]*le[1],oe[0]*le[2]+oe[2]*le[3],oe[1]*le[2]+oe[3]*le[3],oe[0]*le[4]+oe[2]*le[5]+oe[4],oe[1]*le[4]+oe[3]*le[5]+oe[5]]}static applyTransform(oe,le){return[oe[0]*le[0]+oe[1]*le[2]+le[4],oe[0]*le[1]+oe[1]*le[3]+le[5]]}static applyInverseTransform(oe,le){const Oe=le[0]*le[3]-le[1]*le[2];return[(oe[0]*le[3]-oe[1]*le[2]+le[2]*le[5]-le[4]*le[3])/Oe,(-oe[0]*le[1]+oe[1]*le[0]+le[4]*le[1]-le[5]*le[0])/Oe]}static getAxialAlignedBoundingBox(oe,le){const Oe=Ze.applyTransform(oe,le),Ge=Ze.applyTransform(oe.slice(2,4),le),it=Ze.applyTransform([oe[0],oe[3]],le),tt=Ze.applyTransform([oe[2],oe[1]],le);return[Math.min(Oe[0],Ge[0],it[0],tt[0]),Math.min(Oe[1],Ge[1],it[1],tt[1]),Math.max(Oe[0],Ge[0],it[0],tt[0]),Math.max(Oe[1],Ge[1],it[1],tt[1])]}static inverseTransform(oe){const le=oe[0]*oe[3]-oe[1]*oe[2];return[oe[3]/le,-oe[1]/le,-oe[2]/le,oe[0]/le,(oe[2]*oe[5]-oe[4]*oe[3])/le,(oe[4]*oe[1]-oe[5]*oe[0])/le]}static apply3dTransform(oe,le){return[oe[0]*le[0]+oe[1]*le[1]+oe[2]*le[2],oe[3]*le[0]+oe[4]*le[1]+oe[5]*le[2],oe[6]*le[0]+oe[7]*le[1]+oe[8]*le[2]]}static singularValueDecompose2dScale(oe){const le=[oe[0],oe[2],oe[1],oe[3]],Oe=oe[0]*le[0]+oe[1]*le[2],Ge=oe[0]*le[1]+oe[1]*le[3],it=oe[2]*le[0]+oe[3]*le[2],tt=oe[2]*le[1]+oe[3]*le[3],Wt=(Oe+tt)/2,Rt=Math.sqrt(ls(Oe+tt,2)-4*(Oe*tt-it*Ge))/2,Ft=Wt-Rt||1;return[Math.sqrt(Wt+Rt||1),Math.sqrt(Ft)]}static normalizeRect(oe){const le=oe.slice(0);return oe[0]>oe[2]&&(le[0]=oe[2],le[2]=oe[0]),oe[1]>oe[3]&&(le[1]=oe[3],le[3]=oe[1]),le}static intersect(oe,le){const Oe=Math.max(Math.min(oe[0],oe[2]),Math.min(le[0],le[2])),Ge=Math.min(Math.max(oe[0],oe[2]),Math.max(le[0],le[2]));if(Oe>Ge)return null;const it=Math.max(Math.min(oe[1],oe[3]),Math.min(le[1],le[3])),tt=Math.min(Math.max(oe[1],oe[3]),Math.max(le[1],le[3]));return it>tt?null:[Oe,it,Ge,tt]}static bezierBoundingBox(oe,le,Oe,Ge,it,tt,Wt,Rt){const Et=[],Ft=[[],[]];let At,sn,vn,We,jt,Bt,Tn,wn;for(let er=0;er<2;++er)if(0===er?(sn=6*oe-12*Oe+6*it,At=-3*oe+9*Oe-9*it+3*Wt,vn=3*Oe-3*oe):(sn=6*le-12*Ge+6*tt,At=-3*le+9*Ge-9*tt+3*Rt,vn=3*Ge-3*le),Math.abs(At)<1e-12){if(Math.abs(sn)<1e-12)continue;We=-vn/sn,0<We&&We<1&&Et.push(We)}else Tn=sn*sn-4*vn*At,wn=Math.sqrt(Tn),!(Tn<0)&&(jt=(-sn+wn)/(2*At),0<jt&&jt<1&&Et.push(jt),Bt=(-sn-wn)/(2*At),0<Bt&&Bt<1&&Et.push(Bt));let qt,Kt=Et.length;const ri=Kt;for(;Kt--;)We=Et[Kt],qt=1-We,Ft[0][Kt]=qt*qt*qt*oe+3*qt*qt*We*Oe+3*qt*We*We*it+We*We*We*Wt,Ft[1][Kt]=qt*qt*qt*le+3*qt*qt*We*Ge+3*qt*We*We*tt+We*We*We*Rt;return Ft[0][ri]=oe,Ft[1][ri]=le,Ft[0][ri+1]=Wt,Ft[1][ri+1]=Rt,Ft[0].length=Ft[1].length=ri+2,[Math.min(...Ft[0]),Math.min(...Ft[1]),Math.max(...Ft[0]),Math.max(...Ft[1])]}}I.Util=Ze;const Ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function vt(be){return decodeURIComponent(escape(be))}},(Re,I,_e)=>{_e(3)},(Re,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.isNodeJS=void 0;const _e=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);I.isNodeJS=_e},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var Re,_e,k,j,fe,ce,pe,ne,P,CD,O,G;Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(5),_display_utils=__w_pdfjs_require__(8),_font_loader=__w_pdfjs_require__(11),_canvas=__w_pdfjs_require__(12),_worker_options=__w_pdfjs_require__(15),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(16),_metadata=__w_pdfjs_require__(17),_optional_content_config=__w_pdfjs_require__(18),_transport_stream=__w_pdfjs_require__(19),_xfa_text=__w_pdfjs_require__(20);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:E,NodeCMapReaderFactory:d,NodeStandardFontDataFactory:h}=__w_pdfjs_require__(21);exports.DefaultCanvasFactory=DefaultCanvasFactory=E,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=d,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=h}function setPDFNetworkStreamFactory(E){createPDFNetworkStream=E}function getDocument(E){const d=new PDFDocumentLoadingTask;let h;if("string"==typeof E||E instanceof URL)h={url:E};else if((0,_util.isArrayBuffer)(E))h={data:E};else if(E instanceof PDFDataRangeTransport)h={range:E};else{if("object"!=typeof E)throw new Error("Invalid parameter in getDocument, need either string, URL, TypedArray, or parameter object.");if(!E.url&&!E.data&&!E.range)throw new Error("Invalid parameter object: need either .data, .range or .url");h=E}const y=Object.create(null);let w=null,x=null;for(const f in h){const g=h[f];switch(f){case"url":if("undefined"!=typeof window)try{y[f]=new URL(g,window.location).href;continue}catch(T){(0,_util.warn)(`Cannot create valid URL: "${T}".`)}else if("string"==typeof g||g instanceof URL){y[f]=g.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":w=g;continue;case"worker":x=g;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&g instanceof Buffer)y[f]=new Uint8Array(g);else{if(g instanceof Uint8Array)break;if("string"==typeof g)y[f]=(0,_util.stringToBytes)(g);else if("object"!=typeof g||null===g||isNaN(g.length)){if(!(0,_util.isArrayBuffer)(g))throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");y[f]=new Uint8Array(g)}else y[f]=new Uint8Array(g)}continue}y[f]=g}if(y.CMapReaderFactory=y.CMapReaderFactory||DefaultCMapReaderFactory,y.StandardFontDataFactory=y.StandardFontDataFactory||DefaultStandardFontDataFactory,y.ignoreErrors=!0!==y.stopAtErrors,y.fontExtraProperties=!0===y.fontExtraProperties,y.pdfBug=!0===y.pdfBug,y.enableXfa=!0===y.enableXfa,(!Number.isInteger(y.rangeChunkSize)||y.rangeChunkSize<1)&&(y.rangeChunkSize=DEFAULT_RANGE_CHUNK_SIZE),("string"!=typeof y.docBaseUrl||(0,_display_utils.isDataScheme)(y.docBaseUrl))&&(y.docBaseUrl=null),(!Number.isInteger(y.maxImageSize)||y.maxImageSize<-1)&&(y.maxImageSize=-1),"string"!=typeof y.cMapUrl&&(y.cMapUrl=null),"string"!=typeof y.standardFontDataUrl&&(y.standardFontDataUrl=null),"boolean"!=typeof y.useWorkerFetch&&(y.useWorkerFetch=y.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&y.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!=typeof y.isEvalSupported&&(y.isEvalSupported=!0),"boolean"!=typeof y.disableFontFace&&(y.disableFontFace=_is_node.isNodeJS),"boolean"!=typeof y.useSystemFonts&&(y.useSystemFonts=!_is_node.isNodeJS&&!y.disableFontFace),("object"!=typeof y.ownerDocument||null===y.ownerDocument)&&(y.ownerDocument=globalThis.document),"boolean"!=typeof y.disableRange&&(y.disableRange=!1),"boolean"!=typeof y.disableStream&&(y.disableStream=!1),"boolean"!=typeof y.disableAutoFetch&&(y.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(y.verbosity),!x){const f={verbosity:y.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};x=f.port?PDFWorker.fromPort(f):new PDFWorker(f),d._worker=x}const v=d.docId;return x.promise.then(function(){if(d.destroyed)throw new Error("Loading aborted");const f=_fetchDocument(x,y,w,v),g=new Promise(function(T){let N;w?N=new _transport_stream.PDFDataTransportStream({length:y.length,initialData:y.initialData,progressiveDone:y.progressiveDone,contentDispositionFilename:y.contentDispositionFilename,disableRange:y.disableRange,disableStream:y.disableStream},w):y.data||(N=createPDFNetworkStream({url:y.url,length:y.length,httpHeaders:y.httpHeaders,withCredentials:y.withCredentials,rangeChunkSize:y.rangeChunkSize,disableRange:y.disableRange,disableStream:y.disableStream})),T(N)});return Promise.all([f,g]).then(function([T,N]){if(d.destroyed)throw new Error("Loading aborted");const H=new _message_handler.MessageHandler(v,T,x.port),M=new WorkerTransport(H,d,N,y);d._transport=M,H.send("Ready",null)})}).catch(d._capability.reject),d}function _fetchDocument(E,d,h,y){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(function*(E,d,h,y){if(E.destroyed)throw new Error("Worker was destroyed");h&&(d.length=h.length,d.initialData=h.initialData,d.progressiveDone=h.progressiveDone,d.contentDispositionFilename=h.contentDispositionFilename);const w=yield E.messageHandler.sendWithPromise("GetDocRequest",{docId:y,apiVersion:"2.16.105",source:{data:d.data,url:d.url,password:d.password,disableAutoFetch:d.disableAutoFetch,rangeChunkSize:d.rangeChunkSize,length:d.length},maxImageSize:d.maxImageSize,disableFontFace:d.disableFontFace,docBaseUrl:d.docBaseUrl,ignoreErrors:d.ignoreErrors,isEvalSupported:d.isEvalSupported,fontExtraProperties:d.fontExtraProperties,enableXfa:d.enableXfa,useSystemFonts:d.useSystemFonts,cMapUrl:d.useWorkerFetch?d.cMapUrl:null,standardFontDataUrl:d.useWorkerFetch?d.standardFontDataUrl:null});if(d.data&&(d.data=null),E.destroyed)throw new Error("Worker was destroyed");return w})).apply(this,arguments)}const I=class{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+Up(I,Re)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){var d=this;return _asyncToGenerator(function*(){var h;d.destroyed=!0,yield null==(h=d._transport)?void 0:h.destroy(),d._transport=null,d._worker&&(d._worker.destroy(),d._worker=null)})()}};let PDFDocumentLoadingTask=I;Re=new WeakMap,Pe(PDFDocumentLoadingTask,Re,0),exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(d,h,y=!1,w=null){this.length=d,this.initialData=h,this.progressiveDone=y,this.contentDispositionFilename=w,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(d){this._rangeListeners.push(d)}addProgressListener(d){this._progressListeners.push(d)}addProgressiveReadListener(d){this._progressiveReadListeners.push(d)}addProgressiveDoneListener(d){this._progressiveDoneListeners.push(d)}onDataRange(d,h){for(const y of this._rangeListeners)y(d,h)}onDataProgress(d,h){this._readyCapability.promise.then(()=>{for(const y of this._progressListeners)y(d,h)})}onDataProgressiveRead(d){this._readyCapability.promise.then(()=>{for(const h of this._progressiveReadListeners)h(d)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const d of this._progressiveDoneListeners)d()})}transportReady(){this._readyCapability.resolve()}requestDataRange(d,h){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(d,h){var w,y=this;this._pdfInfo=d,this._transport=h,Object.defineProperty(this,"fingerprint",{get(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:(w=_asyncToGenerator(function*(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),y.stats||{streamTypes:{},fontTypes:{}}}),function(){return w.apply(this,arguments)})})}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get stats(){return this._transport.stats}get isPureXfa(){return!!this._transport._htmlForXfa}get allXfaHtml(){return this._transport._htmlForXfa}getPage(d){return this._transport.getPage(d)}getPageIndex(d){return this._transport.getPageIndex(d)}getDestinations(){return this._transport.getDestinations()}getDestination(d){return this._transport.getDestination(d)}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()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(d=!1){return this._transport.startCleanup(d||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(d,h,y,w,x=!1){this._pageIndex=d,this._pageInfo=h,this._ownerDocument=w,this._transport=y,this._stats=x?new _display_utils.StatTimer:null,this._pdfBug=x,this.commonObjs=y.commonObjs,this.objs=new PDFObjects,this._bitmaps=new Set,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=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:d,rotation:h=this.rotate,offsetX:y=0,offsetY:w=0,dontFlip:x=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:d,rotation:h,offsetX:y,offsetY:w,dontFlip:x})}getAnnotations({intent:d="display"}={}){const h=this._transport.getRenderingIntent(d);let y=this._annotationPromises.get(h.cacheKey);return y||(y=this._transport.getAnnotations(this._pageIndex,h.renderingIntent),this._annotationPromises.set(h.cacheKey,y),y=y.then(w=>{for(const x of w)void 0!==x.titleObj&&Object.defineProperty(x,"title",{get:()=>((0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),x.titleObj.str)}),void 0!==x.contentsObj&&Object.defineProperty(x,"contents",{get:()=>((0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),x.contentsObj.str)});return w})),y}getJSActions(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}getXfa(){var d=this;return _asyncToGenerator(function*(){var h;return(null==(h=d._transport._htmlForXfa)?void 0:h.children[d._pageIndex])||null})()}render({canvasContext:d,viewport:h,intent:y="display",annotationMode:w=_util.AnnotationMode.ENABLE,transform:x=null,imageLayer:v=null,canvasFactory:f=null,background:g=null,optionalContentConfigPromise:T=null,annotationCanvasMap:N=null,pageColors:H=null,printAnnotationStorage:M=null}){var ee,De;void 0!==(null==(ee=arguments[0])?void 0:ee.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&w===_util.AnnotationMode.ENABLE&&(w=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null==(De=arguments[0])?void 0:De.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&w===_util.AnnotationMode.ENABLE&&(w=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");const W=this._transport.getRenderingIntent(y,w,M);this.pendingCleanup=!1,T||(T=this._transport.getOptionalContentConfig());let ye=this._intentStates.get(W.cacheKey);ye||(ye=Object.create(null),this._intentStates.set(W.cacheKey,ye)),ye.streamReaderCancelTimeout&&(clearTimeout(ye.streamReaderCancelTimeout),ye.streamReaderCancelTimeout=null);const Se=f||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),ve=!!(W.renderingIntent&_util.RenderingIntentFlag.PRINT);ye.displayReadyCapability||(ye.displayReadyCapability=(0,_util.createPromiseCapability)(),ye.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(W));const Ie=Ae=>{ye.renderTasks.delete(ge),(this.cleanupAfterRender||ve)&&(this.pendingCleanup=!0),this._tryCleanup(),Ae?(ge.capability.reject(Ae),this._abortOperatorList({intentState:ye,reason:Ae instanceof Error?Ae:new Error(Ae)})):ge.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},ge=new InternalRenderTask({callback:Ie,params:{canvasContext:d,viewport:h,transform:x,imageLayer:v,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:N,operatorList:ye.operatorList,pageIndex:this._pageIndex,canvasFactory:Se,useRequestAnimationFrame:!ve,pdfBug:this._pdfBug,pageColors:H});(ye.renderTasks||(ye.renderTasks=new Set)).add(ge);const se=ge.task;return Promise.all([ye.displayReadyCapability.promise,T]).then(([Ae,xe])=>{this.pendingCleanup?Ie():(this._stats&&this._stats.time("Rendering"),ge.initializeGraphics({transparency:Ae,optionalContentConfig:xe}),ge.operatorListChanged())}).catch(Ie),se}getOperatorList({intent:d="display",annotationMode:h=_util.AnnotationMode.ENABLE,printAnnotationStorage:y=null}={}){const x=this._transport.getRenderingIntent(d,h,y,!0);let f,v=this._intentStates.get(x.cacheKey);return v||(v=Object.create(null),this._intentStates.set(x.cacheKey,v)),v.opListReadCapability||(f=Object.create(null),f.operatorListChanged=function w(){v.operatorList.lastChunk&&(v.opListReadCapability.resolve(v.operatorList),v.renderTasks.delete(f))},v.opListReadCapability=(0,_util.createPromiseCapability)(),(v.renderTasks||(v.renderTasks=new Set)).add(f),v.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(x)),v.opListReadCapability.promise}streamTextContent({disableCombineTextItems:d=!1,includeMarkedContent:h=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==d,includeMarkedContent:!0===h},{highWaterMark:100,size:w=>w.items.length})}getTextContent(d={}){if(this._transport._htmlForXfa)return this.getXfa().then(y=>_xfa_text.XfaText.textContent(y));const h=this.streamTextContent(d);return new Promise(function(y,w){const v=h.getReader(),f={items:[],styles:Object.create(null)};!function x(){v.read().then(function({value:g,done:T}){T?y(f):(Object.assign(f.styles,g.styles),f.items.push(...g.items),x())},w)}()})}getStructTree(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}_destroy(){this.destroyed=!0;const d=[];for(const h of this._intentStates.values())if(this._abortOperatorList({intentState:h,reason:new Error("Page was destroyed."),force:!0}),!h.opListReadCapability)for(const y of h.renderTasks)d.push(y.completed),y.cancel();this.objs.clear();for(const h of this._bitmaps)h.close();return this._bitmaps.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(d)}cleanup(d=!1){return this.pendingCleanup=!0,this._tryCleanup(d)}_tryCleanup(d=!1){if(!this.pendingCleanup)return!1;for(const{renderTasks:h,operatorList:y}of this._intentStates.values())if(h.size>0||!y.lastChunk)return!1;this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,d&&this._stats&&(this._stats=new _display_utils.StatTimer);for(const h of this._bitmaps)h.close();return this._bitmaps.clear(),this.pendingCleanup=!1,!0}_startRenderPage(d,h){const y=this._intentStates.get(h);!y||(this._stats&&this._stats.timeEnd("Page Request"),y.displayReadyCapability&&y.displayReadyCapability.resolve(d))}_renderPageChunk(d,h){for(let y=0,w=d.length;y<w;y++)h.operatorList.fnArray.push(d.fnArray[y]),h.operatorList.argsArray.push(d.argsArray[y]);h.operatorList.lastChunk=d.lastChunk,h.operatorList.separateAnnots=d.separateAnnots;for(const y of h.renderTasks)y.operatorListChanged();d.lastChunk&&this._tryCleanup()}_pumpOperatorList({renderingIntent:d,cacheKey:h,annotationStorageMap:y}){const x=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:d,cacheKey:h,annotationStorage:y}).getReader(),v=this._intentStates.get(h);v.streamReader=x;const f=()=>{x.read().then(({value:g,done:T})=>{T?v.streamReader=null:this._transport.destroyed||(this._renderPageChunk(g,v),f())},g=>{if(v.streamReader=null,!this._transport.destroyed){if(v.operatorList){v.operatorList.lastChunk=!0;for(const T of v.renderTasks)T.operatorListChanged();this._tryCleanup()}if(v.displayReadyCapability)v.displayReadyCapability.reject(g);else{if(!v.opListReadCapability)throw g;v.opListReadCapability.reject(g)}}})};f()}_abortOperatorList({intentState:d,reason:h,force:y=!1}){if(d.streamReader){if(!y){if(d.renderTasks.size>0)return;if(h instanceof _display_utils.RenderingCancelledException)return void(d.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:d,reason:h,force:!0}),d.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}if(d.streamReader.cancel(new _util.AbortException(h.message)).catch(()=>{}),d.streamReader=null,!this._transport.destroyed){for(const[w,x]of this._intentStates)if(x===d){this._intentStates.delete(w);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[],this._deferred=Promise.resolve()}postMessage(d,h){const y={data:structuredClone(d,h)};this._deferred.then(()=>{for(const w of this._listeners)w.call(this,y)})}addEventListener(d,h){this._listeners.push(h)}removeEventListener(d,h){const y=this._listeners.indexOf(h);this._listeners.splice(y,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const E=null==(_e=null==document?void 0:document.currentScript)?void 0:_e.src;E&&(PDFWorkerUtil.fallbackWorkerSrc=E.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(E,d){let h;try{if(h=new URL(E),!h.origin||"null"===h.origin)return!1}catch(w){return!1}const y=new URL(d,h);return h.origin===y.origin},PDFWorkerUtil.createCDNWrapper=function(E){return URL.createObjectURL(new Blob([`importScripts("${E}");`]))};const _PDFWorker=class{constructor({name:E=null,port:d=null,verbosity:h=(0,_util.getVerbosityLevel)()}={}){if(d&&q(_PDFWorker,k).has(d))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=E,this.destroyed=!1,this.verbosity=h,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,d)return q(_PDFWorker,k).set(d,this),void this._initializeFromPort(d);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(E){this._port=E,this._messageHandler=new _message_handler.MessageHandler("main","worker",E),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:E}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,E)||(E=PDFWorkerUtil.createCDNWrapper(new URL(E,window.location).href));const d=new Worker(E),h=new _message_handler.MessageHandler("main","worker",d),y=()=>{d.removeEventListener("error",w),h.destroy(),d.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},w=()=>{this._webWorker||y()};d.addEventListener("error",w),h.on("test",v=>{d.removeEventListener("error",w),this.destroyed?y():v?(this._messageHandler=h,this._port=d,this._webWorker=d,this._readyCapability.resolve(),h.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),h.destroy(),d.terminate())}),h.on("ready",v=>{if(d.removeEventListener("error",w),this.destroyed)y();else try{x()}catch(f){this._setupFakeWorker()}});const x=()=>{const v=new Uint8Array;h.send("test",v,[v.buffer])};return void x()}catch(d){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(E=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const d=new LoopbackPort;this._port=d;const h="fake"+PDFWorkerUtil.fakeWorkerId++,y=new _message_handler.MessageHandler(h+"_worker",h,d);E.setup(y,d);const w=new _message_handler.MessageHandler(h,h+"_worker",d);this._messageHandler=w,this._readyCapability.resolve(),w.send("configure",{verbosity:this.verbosity})}).catch(E=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${E.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),q(_PDFWorker,k).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(E){if(!(null==E?void 0:E.port))throw new Error("PDFWorker.fromPort - invalid method signature.");return q(this,k).has(E.port)?q(this,k).get(E.port):new _PDFWorker(E)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var E;try{return(null==(E=globalThis.pdfjsWorker)?void 0:E.WorkerMessageHandler)||null}catch(d){return null}}static get _setupFakeWorkerGlobal(){var _this4=this;const loader=function(){var _ref2=_asyncToGenerator(function*(){const mainWorkerMessageHandler=_this4._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(_this4.workerSrc);return worker.WorkerMessageHandler}return yield(0,_display_utils.loadScript)(_this4.workerSrc),window.pdfjsWorker.WorkerMessageHandler});return function E(){return _ref2.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};let PDFWorker=_PDFWorker;k=new WeakMap,Pe(PDFWorker,k,new WeakMap),exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};class WorkerTransport{constructor(d,h,y,w){Pe(this,j,null),Pe(this,fe,new Map),Pe(this,ce,new Map),Pe(this,pe,null),this.messageHandler=d,this.loadingTask=h,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:h.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:w.ownerDocument,styleElement:w.styleElement}),this._params=w,w.useWorkerFetch||(this.CMapReaderFactory=new w.CMapReaderFactory({baseUrl:w.cMapUrl,isCompressed:w.cMapPacked}),this.StandardFontDataFactory=new w.StandardFontDataFactory({baseUrl:w.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=y,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}get stats(){return q(this,j)}getRenderingIntent(d,h=_util.AnnotationMode.ENABLE,y=null,w=!1){let x=_util.RenderingIntentFlag.DISPLAY,v=null;switch(d){case"any":x=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":x=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${d}`)}switch(h){case _util.AnnotationMode.DISABLE:x+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:x+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:x+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,v=(x&_util.RenderingIntentFlag.PRINT&&y instanceof _annotation_storage.PrintAnnotationStorage?y:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${h}`)}return w&&(x+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:x,cacheKey:`${x}_${_annotation_storage.AnnotationStorage.getHash(v)}`,annotationStorageMap:v}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const d=[];for(const y of q(this,fe).values())d.push(y._destroy());q(this,fe).clear(),q(this,ce).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const h=this.messageHandler.sendWithPromise("Terminate",null);return d.push(h),Promise.all(d).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),$e(this,pe,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null,this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:d,loadingTask:h}=this;d.on("GetReader",(y,w)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=x=>{this._lastProgress={loaded:x.loaded,total:x.total}},w.onPull=()=>{this._fullReader.read().then(function({value:x,done:v}){v?w.close():((0,_util.assert)((0,_util.isArrayBuffer)(x),"GetReader - expected an ArrayBuffer."),w.enqueue(new Uint8Array(x),1,[x]))}).catch(x=>{w.error(x)})},w.onCancel=x=>{this._fullReader.cancel(x),w.ready.catch(v=>{if(!this.destroyed)throw v})}}),d.on("ReaderHeadersReady",y=>{const w=(0,_util.createPromiseCapability)(),x=this._fullReader;return x.headersReady.then(()=>{var v;(!x.isStreamingSupported||!x.isRangeSupported)&&(this._lastProgress&&(null==(v=h.onProgress)||v.call(h,this._lastProgress)),x.onProgress=f=>{var g;null==(g=h.onProgress)||g.call(h,{loaded:f.loaded,total:f.total})}),w.resolve({isStreamingSupported:x.isStreamingSupported,isRangeSupported:x.isRangeSupported,contentLength:x.contentLength})},w.reject),w.promise}),d.on("GetRangeReader",(y,w)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const x=this._networkStream.getRangeReader(y.begin,y.end);x?(w.onPull=()=>{x.read().then(function({value:v,done:f}){f?w.close():((0,_util.assert)((0,_util.isArrayBuffer)(v),"GetRangeReader - expected an ArrayBuffer."),w.enqueue(new Uint8Array(v),1,[v]))}).catch(v=>{w.error(v)})},w.onCancel=v=>{x.cancel(v),w.ready.catch(f=>{if(!this.destroyed)throw f})}):w.close()}),d.on("GetDoc",({pdfInfo:y})=>{this._numPages=y.numPages,this._htmlForXfa=y.htmlForXfa,delete y.htmlForXfa,h._capability.resolve(new PDFDocumentProxy(y,this))}),d.on("DocException",function(y){let w;switch(y.name){case"PasswordException":w=new _util.PasswordException(y.message,y.code);break;case"InvalidPDFException":w=new _util.InvalidPDFException(y.message);break;case"MissingPDFException":w=new _util.MissingPDFException(y.message);break;case"UnexpectedResponseException":w=new _util.UnexpectedResponseException(y.message,y.status);break;case"UnknownErrorException":w=new _util.UnknownErrorException(y.message,y.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}h._capability.reject(w)}),d.on("PasswordRequest",y=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),h.onPassword){const w=x=>{x instanceof Error?this._passwordCapability.reject(x):this._passwordCapability.resolve({password:x})};try{h.onPassword(w,y.code)}catch(x){this._passwordCapability.reject(x)}}else this._passwordCapability.reject(new _util.PasswordException(y.message,y.code));return this._passwordCapability.promise}),d.on("DataLoaded",y=>{var w;null==(w=h.onProgress)||w.call(h,{loaded:y.length,total:y.length}),this.downloadInfoCapability.resolve(y)}),d.on("StartRenderPage",y=>{this.destroyed||q(this,fe).get(y.pageIndex)._startRenderPage(y.transparency,y.cacheKey)}),d.on("commonobj",([y,w,x])=>{var v;if(!this.destroyed&&!this.commonObjs.has(y))switch(w){case"Font":const f=this._params;if("error"in x){const N=x.error;(0,_util.warn)(`Error during font loading: ${N}`),this.commonObjs.resolve(y,N);break}let g=null;f.pdfBug&&(null==(v=globalThis.FontInspector)?void 0:v.enabled)&&(g={registerFont(N,H){globalThis.FontInspector.fontAdded(N,H)}});const T=new _font_loader.FontFaceObject(x,{isEvalSupported:f.isEvalSupported,disableFontFace:f.disableFontFace,ignoreErrors:f.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:g});this.fontLoader.bind(T).catch(N=>d.sendWithPromise("FontFallback",{id:y})).finally(()=>{!f.fontExtraProperties&&T.data&&(T.data=null),this.commonObjs.resolve(y,T)});break;case"FontPath":case"Image":this.commonObjs.resolve(y,x);break;default:throw new Error(`Got unknown common object type ${w}`)}}),d.on("obj",([y,w,x,v])=>{var g;if(this.destroyed)return;const f=q(this,fe).get(w);if(!f.objs.has(y))switch(x){case"Image":f.objs.resolve(y,v);const T=8e6;if(v){let N;if(v.bitmap){const{bitmap:H,width:M,height:W}=v;N=M*W*4,f._bitmaps.add(H)}else N=(null==(g=v.data)?void 0:g.length)||0;N>T&&(f.cleanupAfterRender=!0)}break;case"Pattern":f.objs.resolve(y,v);break;default:throw new Error(`Got unknown object type ${x}`)}}),d.on("DocProgress",y=>{var w;this.destroyed||null==(w=h.onProgress)||w.call(h,{loaded:y.loaded,total:y.total})}),d.on("DocStats",y=>{this.destroyed||$e(this,j,Object.freeze({streamTypes:Object.freeze(y.streamTypes),fontTypes:Object.freeze(y.fontTypes)}))}),d.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),d.on("FetchBuiltInCMap",y=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.CMapReaderFactory?this.CMapReaderFactory.fetch(y):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),d.on("FetchStandardFontData",y=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.StandardFontDataFactory?this.StandardFontDataFactory.fetch(y):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}_onUnsupportedFeature({featureId:d}){var h,y;this.destroyed||null==(y=(h=this.loadingTask).onUnsupportedFeature)||y.call(h,d)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(d){if(!Number.isInteger(d)||d<=0||d>this._numPages)return Promise.reject(new Error("Invalid page request."));const h=d-1,y=q(this,ce).get(h);if(y)return y;const w=this.messageHandler.sendWithPromise("GetPage",{pageIndex:h}).then(x=>{if(this.destroyed)throw new Error("Transport destroyed");const v=new PDFPageProxy(h,x,this,this._params.ownerDocument,this._params.pdfBug);return q(this,fe).set(h,v),v});return q(this,ce).set(h,w),w}getPageIndex(d){return"object"!=typeof d||null===d||!Number.isInteger(d.num)||d.num<0||!Number.isInteger(d.gen)||d.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:d.num,gen:d.gen})}getAnnotations(d,h){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:d,intent:h})}saveDocument(){var d,h;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!=(h=null==(d=this._fullReader)?void 0:d.filename)?h:null}).finally(()=>{this.annotationStorage.resetModified()})}getFieldObjects(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}hasJSActions(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(d){return"string"!=typeof d?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:d})}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)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(d){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:d})}getStructTree(d){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:d})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(d=>new _optional_content_config.OptionalContentConfig(d))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return q(this,pe)||$e(this,pe,this.messageHandler.sendWithPromise("GetMetadata",null).then(d=>{var h,y,w,x;return{info:d[0],metadata:d[1]?new _metadata.Metadata(d[1]):null,contentDispositionFilename:null!=(y=null==(h=this._fullReader)?void 0:h.filename)?y:null,contentLength:null!=(x=null==(w=this._fullReader)?void 0:w.contentLength)?x:null}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(d=!1){var h=this;return _asyncToGenerator(function*(){if(yield h.messageHandler.sendWithPromise("Cleanup",null),!h.destroyed){for(const y of q(h,fe).values())if(!y.cleanup())throw new Error(`startCleanup: Page ${y.pageNumber} is currently rendering.`);h.commonObjs.clear(),d||h.fontLoader.clear(),$e(h,pe,null),h._getFieldObjectsPromise=null,h._hasJSActionsPromise=null}})()}get loadingParams(){const d=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:d.disableAutoFetch,enableXfa:d.enableXfa})}}j=new WeakMap,fe=new WeakMap,ce=new WeakMap,pe=new WeakMap;class PDFObjects{constructor(){Pe(this,P),Pe(this,ne,Object.create(null))}get(d,h=null){if(h){const w=Le(this,P,CD).call(this,d);return w.capability.promise.then(()=>h(w.data)),null}const y=q(this,ne)[d];if(!(null==y?void 0:y.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${d}.`);return y.data}has(d){const h=q(this,ne)[d];return(null==h?void 0:h.capability.settled)||!1}resolve(d,h=null){const y=Le(this,P,CD).call(this,d);y.data=h,y.capability.resolve()}clear(){$e(this,ne,Object.create(null))}}ne=new WeakMap,P=new WeakSet,CD=function(d){return q(this,ne)[d]||(q(this,ne)[d]={capability:(0,_util.createPromiseCapability)(),data:null})};class RenderTask{constructor(d){Pe(this,O,null),$e(this,O,d),this.onContinue=null}get promise(){return q(this,O).capability.promise}cancel(){q(this,O).cancel()}get separateAnnots(){const{separateAnnots:d}=q(this,O).operatorList;if(!d)return!1;const{annotationCanvasMap:h}=q(this,O);return d.form||d.canvas&&(null==h?void 0:h.size)>0}}O=new WeakMap,exports.RenderTask=RenderTask;const B=class{constructor({callback:d,params:h,objs:y,commonObjs:w,annotationCanvasMap:x,operatorList:v,pageIndex:f,canvasFactory:g,useRequestAnimationFrame:T=!1,pdfBug:N=!1,pageColors:H=null}){this.callback=d,this.params=h,this.objs=y,this.commonObjs=w,this.annotationCanvasMap=x,this.operatorListIdx=null,this.operatorList=v,this._pageIndex=f,this.canvasFactory=g,this._pdfBug=N,this.pageColors=H,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===T&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(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=h.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:d=!1,optionalContentConfig:h}){var g;if(this.cancelled)return;if(this._canvas){if(q(B,G).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.");q(B,G).add(this._canvas)}this._pdfBug&&(null==(g=globalThis.StepperManager)?void 0:g.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:y,viewport:w,transform:x,imageLayer:v,background:f}=this.params;this.gfx=new _canvas.CanvasGraphics(y,this.commonObjs,this.objs,this.canvasFactory,v,h,this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:x,viewport:w,transparency:d,background:f}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(d=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&q(B,G).delete(this._canvas),this.callback(d||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.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?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){var d=this;return _asyncToGenerator(function*(){d.cancelled||(d.operatorListIdx=d.gfx.executeOperatorList(d.operatorList,d.operatorListIdx,d._continueBound,d.stepper),d.operatorListIdx===d.operatorList.argsArray.length&&(d.running=!1,d.operatorList.lastChunk&&(d.gfx.endDrawing(),d._canvas&&q(B,G).delete(d._canvas),d.callback())))})()}};let InternalRenderTask=B;G=new WeakMap,Pe(InternalRenderTask,G,new WeakSet);const version="2.16.105";exports.version=version;const build="172ccdbe5";exports.build=build},(Re,I,_e)=>{var ne,Ij,V;Object.defineProperty(I,"__esModule",{value:!0}),I.PrintAnnotationStorage=I.AnnotationStorage=void 0;var k=_e(1),j=_e(6),fe=_e(10);class ce{constructor(){Pe(this,ne),this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(G,B){const E=this._storage.get(G);return void 0===E?B:Object.assign(B,E)}getRawValue(G){return this._storage.get(G)}remove(G){if(this._storage.delete(G),0===this._storage.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const B of this._storage.values())if(B instanceof j.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(G,B){const E=this._storage.get(G);let d=!1;if(void 0!==E)for(const[h,y]of Object.entries(B))E[h]!==y&&(d=!0,E[h]=y);else d=!0,this._storage.set(G,B);d&&Le(this,ne,Ij).call(this),B instanceof j.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(B.constructor._type)}has(G){return this._storage.has(G)}getAll(){return this._storage.size>0?(0,k.objectFromMap)(this._storage):null}get size(){return this._storage.size}resetModified(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new pe(this)}get serializable(){if(0===this._storage.size)return null;const G=new Map;for(const[B,E]of this._storage){const d=E instanceof j.AnnotationEditor?E.serialize():E;d&&G.set(B,d)}return G}static getHash(G){if(!G)return"";const B=new fe.MurmurHash3_64;for(const[E,d]of G)B.update(`${E}:${JSON.stringify(d)}`);return B.hexdigest()}}ne=new WeakSet,Ij=function(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())},I.AnnotationStorage=ce;class pe extends ce{constructor(G){super(),Pe(this,V,null),$e(this,V,structuredClone(G.serializable))}get print(){(0,k.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return q(this,V)}}V=new WeakMap,I.PrintAnnotationStorage=pe},(Re,I,_e)=>{var ce,pe,ne,P,V,O;Object.defineProperty(I,"__esModule",{value:!0}),I.AnnotationEditor=void 0;var k=_e(7),j=_e(1);const G=class{constructor(E){Pe(this,ce,this.focusin.bind(this)),Pe(this,pe,this.focusout.bind(this)),Pe(this,ne,!1),Pe(this,P,!1),Pe(this,V,!1),Pe(this,O,G._zIndex++),this.constructor===G&&(0,j.unreachable)("Cannot initialize AnnotationEditor."),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;const[d,h]=this.parent.viewportBaseDimensions;this.x=E.x/d,this.y=E.y/h,this.rotation=this.parent.viewport.rotation,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,j.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=q(this,O)}focusin(E){q(this,ne)?$e(this,ne,!1):this.parent.setSelected(this)}focusout(E){if(!this.isAttachedToDOM)return;const d=E.relatedTarget;(null==d?void 0:d.closest(`#${this.id}`))||(E.preventDefault(),this.parent.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.parent.addToAnnotationStorage(this)}dragstart(E){const d=this.parent.div.getBoundingClientRect();this.startX=E.clientX-d.x,this.startY=E.clientY-d.y,E.dataTransfer.setData("text/plain",this.id),E.dataTransfer.effectAllowed="move"}setAt(E,d,h,y){const[w,x]=this.parent.viewportBaseDimensions;[h,y]=this.screenToPageTranslation(h,y),this.x=(E+h)/w,this.y=(d+y)/x,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(E,d){const[h,y]=this.parent.viewportBaseDimensions;[E,d]=this.screenToPageTranslation(E,d),this.x+=E/h,this.y+=d/y,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(E,d){const{rotation:h}=this.parent.viewport;switch(h){case 90:return[d,-E];case 180:return[-E,-d];case 270:return[-d,E];default:return[E,d]}}setDims(E,d){const[h,y]=this.parent.viewportBaseDimensions;this.div.style.width=100*E/h+"%",this.div.style.height=100*d/y+"%"}getInitialTranslation(){return[0,0]}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.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",q(this,ce)),this.div.addEventListener("focusout",q(this,pe));const[E,d]=this.getInitialTranslation();return this.translate(E,d),(0,k.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(E){const d=k.KeyboardManager.platform.isMac;0!==E.button||E.ctrlKey&&d?E.preventDefault():(E.ctrlKey&&!d||E.shiftKey||E.metaKey&&d?this.parent.toggleSelected(this):this.parent.setSelected(this),$e(this,ne,!0))}getRect(E,d){const[h,y]=this.parent.viewportBaseDimensions,[w,x]=this.parent.pageDimensions,v=w*E/h,f=x*d/y,g=this.x*w,T=this.y*x,N=this.width*w,H=this.height*x;switch(this.rotation){case 0:return[g+v,x-T-f-H,g+v+N,x-T-f];case 90:return[g+f,x-T+v,g+f+H,x-T+v+N];case 180:return[g-v-N,x-T+f,g-v,x-T+f+H];case 270:return[g-f-H,x-T-v-N,g-f,x-T-v];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(E,d){const[h,y,w,x]=E,v=w-h,f=x-y;switch(this.rotation){case 0:return[h,d-x,v,f];case 90:return[h,d-y,f,v];case 180:return[w,d-y,v,f];case 270:return[w,d-x,f,v];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){$e(this,V,!0)}disableEditMode(){$e(this,V,!1)}isInEditMode(){return q(this,V)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var E;null==(E=this.div)||E.addEventListener("focusin",q(this,ce))}serialize(){(0,j.unreachable)("An editor must be serializable")}static deserialize(E,d){const h=new this.prototype.constructor({parent:d,id:d.getNextId()});h.rotation=E.rotation;const[y,w]=d.pageDimensions,[x,v,f,g]=h.getRectInCurrentCoords(E.rect,w);return h.x=x/y,h.y=v/w,h.width=f/y,h.height=g/w,h}remove(){this.div.removeEventListener("focusin",q(this,ce)),this.div.removeEventListener("focusout",q(this,pe)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var E;null==(E=this.div)||E.classList.add("selectedEditor")}unselect(){var E;null==(E=this.div)||E.classList.remove("selectedEditor")}updateParams(E,d){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return q(this,P)}set isEditing(E){$e(this,P,E),E?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}};let fe=G;ce=new WeakMap,pe=new WeakMap,ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,cn(fe,"_colorManager",new k.ColorManager),cn(fe,"_zIndex",1),I.AnnotationEditor=fe},(Re,I,_e)=>{var B,E,d,h,y,w,Rj,f,T,N,H,M,W,ye,Se,ve,Ie,ge,se,ee,De,Ae,xe,te,D,C,Fj,Q,DD,J,_i,ue,su,S,Pj,L,xj,ie,AD,ke,ou,we,Hp;Object.defineProperty(I,"__esModule",{value:!0}),I.KeyboardManager=I.CommandManager=I.ColorManager=I.AnnotationEditorUIManager=void 0,I.bindEvents=function fe(Ve,X,je){for(const Ze of je)X.addEventListener(Ze,Ve[Ze].bind(Ve))},I.opacityToHex=function ce(Ve){return Math.round(Math.min(255,Math.max(1,255*Ve))).toString(16).padStart(2,"0")};var k=_e(1),j=_e(8);class pe{constructor(){Pe(this,B,0)}getId(){return`${k.AnnotationEditorPrefix}${Up(this,B)._++}`}}B=new WeakMap;class ne{constructor(X=128){Pe(this,E,[]),Pe(this,d,!1),Pe(this,h,void 0),Pe(this,y,-1),$e(this,h,X)}add({cmd:X,undo:je,mustExec:Ze,type:Ke=NaN,overwriteIfSameType:lt=!1,keepUndo:yt=!1}){if(Ze&&X(),q(this,d))return;const $t={cmd:X,undo:je,type:Ke};if(-1===q(this,y))return q(this,E).length>0&&(q(this,E).length=0),$e(this,y,0),void q(this,E).push($t);if(lt&&q(this,E)[q(this,y)].type===Ke)return yt&&($t.undo=q(this,E)[q(this,y)].undo),void(q(this,E)[q(this,y)]=$t);const Lt=q(this,y)+1;Lt===q(this,h)?q(this,E).splice(0,1):($e(this,y,Lt),Lt<q(this,E).length&&q(this,E).splice(Lt)),q(this,E).push($t)}undo(){-1!==q(this,y)&&($e(this,d,!0),q(this,E)[q(this,y)].undo(),$e(this,d,!1),$e(this,y,q(this,y)-1))}redo(){q(this,y)<q(this,E).length-1&&($e(this,y,q(this,y)+1),$e(this,d,!0),q(this,E)[q(this,y)].cmd(),$e(this,d,!1))}hasSomethingToUndo(){return-1!==q(this,y)}hasSomethingToRedo(){return q(this,y)<q(this,E).length-1}destroy(){$e(this,E,null)}}E=new WeakMap,d=new WeakMap,h=new WeakMap,y=new WeakMap,I.CommandManager=ne;const v=class{constructor(X){Pe(this,w),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const je=v.platform.isMac;for(const[Ze,Ke]of X)for(const lt of Ze){const yt=lt.startsWith("mac+");je&&yt?(this.callbacks.set(lt.slice(4),Ke),this.allKeys.add(lt.split("+").at(-1))):!je&&!yt&&(this.callbacks.set(lt,Ke),this.allKeys.add(lt.split("+").at(-1)))}}static get platform(){const X="undefined"!=typeof navigator?navigator.platform:"";return(0,k.shadow)(this,"platform",{isWin:X.includes("Win"),isMac:X.includes("Mac")})}exec(X,je){if(!this.allKeys.has(je.key))return;const Ze=this.callbacks.get(Le(this,w,Rj).call(this,je));!Ze||(Ze.bind(X)(),je.stopPropagation(),je.preventDefault())}};let P=v;w=new WeakSet,Rj=function(X){X.altKey&&this.buffer.push("alt"),X.ctrlKey&&this.buffer.push("ctrl"),X.metaKey&&this.buffer.push("meta"),X.shiftKey&&this.buffer.push("shift"),this.buffer.push(X.key);const je=this.buffer.join("+");return this.buffer.length=0,je},I.KeyboardManager=P;class V{constructor(){Pe(this,f,null)}copy(X){!X||(Array.isArray(X)?$e(this,f,X.map(je=>je.serialize())):$e(this,f,[X.serialize()]),$e(this,f,q(this,f).filter(je=>!!je)),0===q(this,f).length&&$e(this,f,null))}paste(){return q(this,f)}isEmpty(){return null===q(this,f)}destroy(){$e(this,f,null)}}f=new WeakMap;const g=class{get _colors(){const X=new Map([["CanvasText",null],["Canvas",null]]);return(0,j.getColorValues)(X),(0,k.shadow)(this,"_colors",X)}convert(X){const je=(0,j.getRGB)(X);if(!window.matchMedia("(forced-colors: active)").matches)return je;for(const[Ze,Ke]of this._colors)if(Ke.every((lt,yt)=>lt===je[yt]))return g._colorsMapping.get(Ze);return je}getHexCode(X){const je=this._colors.get(X);return je?k.Util.makeHexColor(...je):X}};let O=g;cn(O,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),I.ColorManager=O;const Ne=class{constructor(X,je){Pe(this,C),Pe(this,Q),Pe(this,J),Pe(this,ue),Pe(this,S),Pe(this,L),Pe(this,ie),Pe(this,ke),Pe(this,we),Pe(this,T,null),Pe(this,N,new Map),Pe(this,H,new Map),Pe(this,M,new V),Pe(this,W,new ne),Pe(this,ye,0),Pe(this,Se,null),Pe(this,ve,null),Pe(this,Ie,new pe),Pe(this,ge,!1),Pe(this,se,k.AnnotationEditorType.NONE),Pe(this,ee,new Set),Pe(this,De,this.keydown.bind(this)),Pe(this,Ae,this.onEditingAction.bind(this)),Pe(this,xe,this.onPageChanging.bind(this)),Pe(this,te,{isEditing:!1,isEmpty:!0,hasEmptyClipboard:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),Pe(this,D,null),$e(this,D,X),$e(this,ve,je),q(this,ve)._on("editingaction",q(this,Ae)),q(this,ve)._on("pagechanging",q(this,xe))}destroy(){Le(this,Q,DD).call(this),q(this,ve)._off("editingaction",q(this,Ae)),q(this,ve)._off("pagechanging",q(this,xe));for(const X of q(this,H).values())X.destroy();q(this,H).clear(),q(this,N).clear(),$e(this,T,null),q(this,ee).clear(),q(this,M).destroy(),q(this,W).destroy()}onPageChanging({pageNumber:X}){$e(this,ye,X-1)}focusMainContainer(){q(this,D).focus()}keydown(X){var je;(null==(je=this.getActive())?void 0:je.shouldGetKeyboardEvents())||Ne._keyboardManager.exec(this,X)}onEditingAction(X){["undo","redo","cut","copy","paste","delete","selectAll"].includes(X.name)&&this[X.name]()}setEditingState(X){X?(Le(this,C,Fj).call(this),Le(this,J,_i).call(this,{isEditing:q(this,se)!==k.AnnotationEditorType.NONE,isEmpty:Le(this,ke,ou).call(this),hasSomethingToUndo:q(this,W).hasSomethingToUndo(),hasSomethingToRedo:q(this,W).hasSomethingToRedo(),hasSelectedEditor:!1,hasEmptyClipboard:q(this,M).isEmpty()})):(Le(this,Q,DD).call(this),Le(this,J,_i).call(this,{isEditing:!1}))}registerEditorTypes(X){$e(this,Se,X);for(const je of q(this,Se))Le(this,ue,su).call(this,je.defaultPropertiesToUpdate)}getId(){return q(this,Ie).getId()}addLayer(X){q(this,H).set(X.pageIndex,X),q(this,ge)?X.enable():X.disable()}removeLayer(X){q(this,H).delete(X.pageIndex)}updateMode(X){if($e(this,se,X),X===k.AnnotationEditorType.NONE)this.setEditingState(!1),Le(this,L,xj).call(this);else{this.setEditingState(!0),Le(this,S,Pj).call(this);for(const je of q(this,H).values())je.updateMode(X)}}updateToolbar(X){X!==q(this,se)&&q(this,ve).dispatch("switchannotationeditormode",{source:this,mode:X})}updateParams(X,je){for(const Ze of q(this,ee))Ze.updateParams(X,je);for(const Ze of q(this,Se))Ze.updateDefaultParams(X,je)}getEditors(X){const je=[];for(const Ze of q(this,N).values())Ze.pageIndex===X&&je.push(Ze);return je}getEditor(X){return q(this,N).get(X)}addEditor(X){q(this,N).set(X.id,X)}removeEditor(X){q(this,N).delete(X.id),this.unselect(X)}setActiveEditor(X){q(this,T)!==X&&($e(this,T,X),X&&Le(this,ue,su).call(this,X.propertiesToUpdate))}toggleSelected(X){if(q(this,ee).has(X))return q(this,ee).delete(X),X.unselect(),void Le(this,J,_i).call(this,{hasSelectedEditor:this.hasSelection});q(this,ee).add(X),X.select(),Le(this,ue,su).call(this,X.propertiesToUpdate),Le(this,J,_i).call(this,{hasSelectedEditor:!0})}setSelected(X){for(const je of q(this,ee))je!==X&&je.unselect();q(this,ee).clear(),q(this,ee).add(X),X.select(),Le(this,ue,su).call(this,X.propertiesToUpdate),Le(this,J,_i).call(this,{hasSelectedEditor:!0})}isSelected(X){return q(this,ee).has(X)}unselect(X){X.unselect(),q(this,ee).delete(X),Le(this,J,_i).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==q(this,ee).size}undo(){q(this,W).undo(),Le(this,J,_i).call(this,{hasSomethingToUndo:q(this,W).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Le(this,ke,ou).call(this)})}redo(){q(this,W).redo(),Le(this,J,_i).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:q(this,W).hasSomethingToRedo(),isEmpty:Le(this,ke,ou).call(this)})}addCommands(X){q(this,W).add(X),Le(this,J,_i).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Le(this,ke,ou).call(this)})}delete(){if(q(this,T)&&q(this,T).commitOrRemove(),!this.hasSelection)return;const X=[...q(this,ee)];this.addCommands({cmd:()=>{for(const Ke of X)Ke.remove()},undo:()=>{for(const Ke of X)Le(this,ie,AD).call(this,Ke)},mustExec:!0})}copy(){if(q(this,T)&&q(this,T).commitOrRemove(),this.hasSelection){const X=[];for(const je of q(this,ee))je.isEmpty()||X.push(je);if(0===X.length)return;q(this,M).copy(X),Le(this,J,_i).call(this,{hasEmptyClipboard:!1})}}cut(){this.copy(),this.delete()}paste(){if(q(this,M).isEmpty())return;this.unselectAll();const X=q(this,H).get(q(this,ye)),je=q(this,M).paste().map(lt=>X.deserialize(lt));this.addCommands({cmd:()=>{for(const lt of je)Le(this,ie,AD).call(this,lt);Le(this,we,Hp).call(this,je)},undo:()=>{for(const lt of je)lt.remove()},mustExec:!0})}selectAll(){for(const X of q(this,ee))X.commit();Le(this,we,Hp).call(this,q(this,N).values())}unselectAll(){if(q(this,T))q(this,T).commitOrRemove();else if(0!==Le(this,we,Hp).size){for(const X of q(this,ee))X.unselect();q(this,ee).clear(),Le(this,J,_i).call(this,{hasSelectedEditor:!1})}}isActive(X){return q(this,T)===X}getActive(){return q(this,T)}getMode(){return q(this,se)}};let G=Ne;T=new WeakMap,N=new WeakMap,H=new WeakMap,M=new WeakMap,W=new WeakMap,ye=new WeakMap,Se=new WeakMap,ve=new WeakMap,Ie=new WeakMap,ge=new WeakMap,se=new WeakMap,ee=new WeakMap,De=new WeakMap,Ae=new WeakMap,xe=new WeakMap,te=new WeakMap,D=new WeakMap,C=new WeakSet,Fj=function(){q(this,D).addEventListener("keydown",q(this,De))},Q=new WeakSet,DD=function(){q(this,D).removeEventListener("keydown",q(this,De))},J=new WeakSet,_i=function(X){Object.entries(X).some(([Ze,Ke])=>q(this,te)[Ze]!==Ke)&&q(this,ve).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(q(this,te),X)})},ue=new WeakSet,su=function(X){q(this,ve).dispatch("annotationeditorparamschanged",{source:this,details:X})},S=new WeakSet,Pj=function(){if(!q(this,ge)){$e(this,ge,!0);for(const X of q(this,H).values())X.enable()}},L=new WeakSet,xj=function(){if(this.unselectAll(),q(this,ge)){$e(this,ge,!1);for(const X of q(this,H).values())X.disable()}},ie=new WeakSet,AD=function(X){const je=q(this,H).get(X.pageIndex);je?je.addOrRebuild(X):this.addEditor(X)},ke=new WeakSet,ou=function(){if(0===q(this,N).size)return!0;if(1===q(this,N).size)for(const X of q(this,N).values())return X.isEmpty();return!1},we=new WeakSet,Hp=function(X){q(this,ee).clear();for(const je of X)je.isEmpty()||(q(this,ee).add(je),je.select());Le(this,J,_i).call(this,{hasSelectedEditor:!0})},cn(G,"_keyboardManager",new P([[["ctrl+a","mac+meta+a"],Ne.prototype.selectAll],[["ctrl+c","mac+meta+c"],Ne.prototype.copy],[["ctrl+v","mac+meta+v"],Ne.prototype.paste],[["ctrl+x","mac+meta+x"],Ne.prototype.cut],[["ctrl+z","mac+meta+z"],Ne.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],Ne.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],Ne.prototype.delete],[["Escape","mac+Escape"],Ne.prototype.unselectAll]])),I.AnnotationEditorUIManager=G},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.StatTimer=I.RenderingCancelledException=I.PixelsPerInch=I.PageViewport=I.PDFDateString=I.DOMStandardFontDataFactory=I.DOMSVGFactory=I.DOMCanvasFactory=I.DOMCMapReaderFactory=I.AnnotationPrefix=void 0,I.deprecated=function T(ge){console.log("Deprecated API usage: "+ge)},I.getColorValues=function ye(ge){const se=document.createElement("span");se.style.visibility="hidden",document.body.append(se);for(const ee of ge.keys()){se.style.color=ee;const De=window.getComputedStyle(se).color;ge.set(ee,W(De))}se.remove()},I.getCurrentTransform=function Se(ge){const{a:se,b:ee,c:De,d:Ae,e:xe,f:te}=ge.getTransform();return[se,ee,De,Ae,xe,te]},I.getCurrentTransformInverse=function ve(ge){const{a:se,b:ee,c:De,d:Ae,e:xe,f:te}=ge.getTransform().invertSelf();return[se,ee,De,Ae,xe,te]},I.getFilenameFromUrl=function w(ge){const se=ge.indexOf("#"),ee=ge.indexOf("?"),De=Math.min(se>0?se:ge.length,ee>0?ee:ge.length);return ge.substring(ge.lastIndexOf("/",De)+1,De)},I.getPdfFilenameFromUrl=function x(ge,se="document.pdf"){if("string"!=typeof ge)return se;if(h(ge))return(0,j.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),se;const De=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,Ae=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(ge);let xe=De.exec(Ae[1])||De.exec(Ae[2])||De.exec(Ae[3]);if(xe&&(xe=xe[0],xe.includes("%")))try{xe=De.exec(decodeURIComponent(xe))[0]}catch(te){}return xe||se},I.getRGB=W,I.getXfaPageViewport=function M(ge,{scale:se=1,rotation:ee=0}){const{width:De,height:Ae}=ge.attributes.style,xe=[0,0,parseInt(De),parseInt(Ae)];return new E({viewBox:xe,scale:se,rotation:ee})},I.isDataScheme=h,I.isPdfFile=function y(ge){return"string"==typeof ge&&/\.pdf$/i.test(ge)},I.isValidFetchUrl=f,I.loadScript=function g(ge,se=!1){return new Promise((ee,De)=>{const Ae=document.createElement("script");Ae.src=ge,Ae.onload=function(xe){se&&Ae.remove(),ee(xe)},Ae.onerror=function(){De(new Error(`Cannot load script at: ${Ae.src}`))},(document.head||document.documentElement).append(Ae)})};var k=_e(9),j=_e(1);I.AnnotationPrefix="pdfjs_internal_id_";const Ie=class{};let N,pe=Ie;function P(ge){return V.apply(this,arguments)}function V(){return(V=_asyncToGenerator(function*(ge,se=!1){if(f(ge,document.baseURI)){const ee=yield fetch(ge);if(!ee.ok)throw new Error(ee.statusText);return se?new Uint8Array(yield ee.arrayBuffer()):(0,j.stringToBytes)(yield ee.text())}return new Promise((ee,De)=>{const Ae=new XMLHttpRequest;Ae.open("GET",ge,!0),se&&(Ae.responseType="arraybuffer"),Ae.onreadystatechange=()=>{if(Ae.readyState===XMLHttpRequest.DONE){if(200===Ae.status||0===Ae.status){let xe;if(se&&Ae.response?xe=new Uint8Array(Ae.response):!se&&Ae.responseText&&(xe=(0,j.stringToBytes)(Ae.responseText)),xe)return void ee(xe)}De(new Error(Ae.statusText))}},Ae.send(null)})})).apply(this,arguments)}cn(pe,"CSS",96),cn(pe,"PDF",72),cn(pe,"PDF_TO_CSS_UNITS",Ie.CSS/Ie.PDF),I.PixelsPerInch=pe,I.DOMCanvasFactory=class ne extends k.BaseCanvasFactory{constructor({ownerDocument:se=globalThis.document}={}){super(),this._document=se}_createCanvas(se,ee){const De=this._document.createElement("canvas");return De.width=se,De.height=ee,De}},I.DOMCMapReaderFactory=class O extends k.BaseCMapReaderFactory{_fetchData(se,ee){return P(se,this.isCompressed).then(De=>({cMapData:De,compressionType:ee}))}},I.DOMStandardFontDataFactory=class G extends k.BaseStandardFontDataFactory{_fetchData(se){return P(se,!0)}},I.DOMSVGFactory=class B extends k.BaseSVGFactory{_createSVG(se){return document.createElementNS("http://www.w3.org/2000/svg",se)}};class E{constructor({viewBox:se,scale:ee,rotation:De,offsetX:Ae=0,offsetY:xe=0,dontFlip:te=!1}){this.viewBox=se,this.scale=ee,this.rotation=De,this.offsetX=Ae,this.offsetY=xe;const D=(se[2]+se[0])/2,C=(se[3]+se[1])/2;let R,Q,Y,J,de,ue,m,S;switch((De%=360)<0&&(De+=360),De){case 180:R=-1,Q=0,Y=0,J=1;break;case 90:R=0,Q=1,Y=1,J=0;break;case 270:R=0,Q=-1,Y=-1,J=0;break;case 0:R=1,Q=0,Y=0,J=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}te&&(Y=-Y,J=-J),0===R?(de=Math.abs(C-se[1])*ee+Ae,ue=Math.abs(D-se[0])*ee+xe,m=Math.abs(se[3]-se[1])*ee,S=Math.abs(se[2]-se[0])*ee):(de=Math.abs(D-se[0])*ee+Ae,ue=Math.abs(C-se[1])*ee+xe,m=Math.abs(se[2]-se[0])*ee,S=Math.abs(se[3]-se[1])*ee),this.transform=[R*ee,Q*ee,Y*ee,J*ee,de-R*ee*D-Y*ee*C,ue-Q*ee*D-J*ee*C],this.width=m,this.height=S}clone({scale:se=this.scale,rotation:ee=this.rotation,offsetX:De=this.offsetX,offsetY:Ae=this.offsetY,dontFlip:xe=!1}={}){return new E({viewBox:this.viewBox.slice(),scale:se,rotation:ee,offsetX:De,offsetY:Ae,dontFlip:xe})}convertToViewportPoint(se,ee){return j.Util.applyTransform([se,ee],this.transform)}convertToViewportRectangle(se){const ee=j.Util.applyTransform([se[0],se[1]],this.transform),De=j.Util.applyTransform([se[2],se[3]],this.transform);return[ee[0],ee[1],De[0],De[1]]}convertToPdfPoint(se,ee){return j.Util.applyInverseTransform([se,ee],this.transform)}}function h(ge){const se=ge.length;let ee=0;for(;ee<se&&""===ge[ee].trim();)ee++;return"data:"===ge.substring(ee,ee+5).toLowerCase()}function f(ge,se){try{const{protocol:ee}=se?new URL(ge,se):new URL(ge);return"http:"===ee||"https:"===ee}catch(ee){return!1}}function W(ge){if(ge.startsWith("#")){const se=parseInt(ge.slice(1),16);return[(16711680&se)>>16,(65280&se)>>8,255&se]}return ge.startsWith("rgb(")?ge.slice(4,-1).split(",").map(se=>parseInt(se)):ge.startsWith("rgba(")?ge.slice(5,-1).split(",").map(se=>parseInt(se)).slice(0,3):((0,j.warn)(`Not a valid color format: "${ge}"`),[0,0,0])}I.PageViewport=E,I.RenderingCancelledException=class d extends j.BaseException{constructor(se,ee){super(se,"RenderingCancelledException"),this.type=ee}},I.StatTimer=class v{constructor(){this.started=Object.create(null),this.times=[]}time(se){se in this.started&&(0,j.warn)(`Timer is already running for ${se}`),this.started[se]=Date.now()}timeEnd(se){se in this.started||(0,j.warn)(`Timer has not been started for ${se}`),this.times.push({name:se,start:this.started[se],end:Date.now()}),delete this.started[se]}toString(){const se=[];let ee=0;for(const De of this.times){const Ae=De.name;Ae.length>ee&&(ee=Ae.length)}for(const De of this.times){const Ae=De.end-De.start;se.push(`${De.name.padEnd(ee)} ${Ae}ms\n`)}return se.join("")}},I.PDFDateString=class H{static toDateObject(se){if(!se||"string"!=typeof se)return null;N||(N=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const ee=N.exec(se);if(!ee)return null;const De=parseInt(ee[1],10);let Ae=parseInt(ee[2],10);Ae=Ae>=1&&Ae<=12?Ae-1:0;let xe=parseInt(ee[3],10);xe=xe>=1&&xe<=31?xe:1;let te=parseInt(ee[4],10);te=te>=0&&te<=23?te:0;let D=parseInt(ee[5],10);D=D>=0&&D<=59?D:0;let C=parseInt(ee[6],10);C=C>=0&&C<=59?C:0;const R=ee[7]||"Z";let Q=parseInt(ee[8],10);Q=Q>=0&&Q<=23?Q:0;let Y=parseInt(ee[9],10)||0;return Y=Y>=0&&Y<=59?Y:0,"-"===R?(te+=Q,D+=Y):"+"===R&&(te-=Q,D-=Y),new Date(Date.UTC(De,Ae,xe,te,D,C))}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.BaseStandardFontDataFactory=I.BaseSVGFactory=I.BaseCanvasFactory=I.BaseCMapReaderFactory=void 0;var k=_e(1);class j{constructor(){this.constructor===j&&(0,k.unreachable)("Cannot initialize BaseCanvasFactory.")}create(P,V){if(P<=0||V<=0)throw new Error("Invalid canvas size");const O=this._createCanvas(P,V);return{canvas:O,context:O.getContext("2d")}}reset(P,V,O){if(!P.canvas)throw new Error("Canvas is not specified");if(V<=0||O<=0)throw new Error("Invalid canvas size");P.canvas.width=V,P.canvas.height=O}destroy(P){if(!P.canvas)throw new Error("Canvas is not specified");P.canvas.width=0,P.canvas.height=0,P.canvas=null,P.context=null}_createCanvas(P,V){(0,k.unreachable)("Abstract method `_createCanvas` called.")}}I.BaseCanvasFactory=j;class fe{constructor({baseUrl:P=null,isCompressed:V=!1}){this.constructor===fe&&(0,k.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=P,this.isCompressed=V}fetch({name:P}){var V=this;return _asyncToGenerator(function*(){if(!V.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!P)throw new Error("CMap name must be specified.");const O=V.baseUrl+P+(V.isCompressed?".bcmap":"");return V._fetchData(O,V.isCompressed?k.CMapCompressionType.BINARY:k.CMapCompressionType.NONE).catch(B=>{throw new Error(`Unable to load ${V.isCompressed?"binary ":""}CMap at: ${O}`)})})()}_fetchData(P,V){(0,k.unreachable)("Abstract method `_fetchData` called.")}}I.BaseCMapReaderFactory=fe;class ce{constructor({baseUrl:P=null}){this.constructor===ce&&(0,k.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=P}fetch({filename:P}){var V=this;return _asyncToGenerator(function*(){if(!V.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!P)throw new Error("Font filename must be specified.");const O=`${V.baseUrl}${P}`;return V._fetchData(O).catch(G=>{throw new Error(`Unable to load font data at: ${O}`)})})()}_fetchData(P){(0,k.unreachable)("Abstract method `_fetchData` called.")}}I.BaseStandardFontDataFactory=ce;class pe{constructor(){this.constructor===pe&&(0,k.unreachable)("Cannot initialize BaseSVGFactory.")}create(P,V,O=!1){if(P<=0||V<=0)throw new Error("Invalid SVG dimensions");const G=this._createSVG("svg:svg");return G.setAttribute("version","1.1"),O||(G.setAttribute("width",`${P}px`),G.setAttribute("height",`${V}px`)),G.setAttribute("preserveAspectRatio","none"),G.setAttribute("viewBox",`0 0 ${P} ${V}`),G}createElement(P){if("string"!=typeof P)throw new Error("Invalid SVG element type");return this._createSVG(P)}_createSVG(P){(0,k.unreachable)("Abstract method `_createSVG` called.")}}I.BaseSVGFactory=pe},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.MurmurHash3_64=void 0;var k=_e(1);const j=3285377520,fe=4294901760,ce=65535;I.MurmurHash3_64=class pe{constructor(P){this.h1=P?4294967295&P:j,this.h2=P?4294967295&P:j}update(P){let V,O;if("string"==typeof P){V=new Uint8Array(2*P.length),O=0;for(let T=0,N=P.length;T<N;T++){const H=P.charCodeAt(T);H<=255?V[O++]=H:(V[O++]=H>>>8,V[O++]=255&H)}}else{if(!(0,k.isArrayBuffer)(P))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");V=P.slice(),O=V.byteLength}const G=O>>2,B=O-4*G,E=new Uint32Array(V.buffer,0,G);let d=0,h=0,y=this.h1,w=this.h2;const x=3432918353,v=461845907,f=x&ce,g=v&ce;for(let T=0;T<G;T++)1&T?(d=E[T],d=d*x&fe|d*f&ce,d=d<<15|d>>>17,d=d*v&fe|d*g&ce,y^=d,y=y<<13|y>>>19,y=5*y+3864292196):(h=E[T],h=h*x&fe|h*f&ce,h=h<<15|h>>>17,h=h*v&fe|h*g&ce,w^=h,w=w<<13|w>>>19,w=5*w+3864292196);switch(d=0,B){case 3:d^=V[4*G+2]<<16;case 2:d^=V[4*G+1]<<8;case 1:d^=V[4*G],d=d*x&fe|d*f&ce,d=d<<15|d>>>17,d=d*v&fe|d*g&ce,1&G?y^=d:w^=d}this.h1=y,this.h2=w}hexdigest(){let P=this.h1,V=this.h2;P^=V>>>1,P=3981806797*P&fe|36045*P&ce,V=4283543511*V&fe|(2950163797*(V<<16|P>>>16)&fe)>>>16,P^=V>>>1,P=444984403*P&fe|60499*P&ce,V=3301882366*V&fe|(3120437893*(V<<16|P>>>16)&fe)>>>16,P^=V>>>1;const O=(P>>>0).toString(16),G=(V>>>0).toString(16);return O.padStart(8,"0")+G.padStart(8,"0")}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.FontLoader=I.FontFaceObject=void 0;var k=_e(1);class j{constructor({docId:ne,onUnsupportedFeature:P,ownerDocument:V=globalThis.document,styleElement:O=null}){this.constructor===j&&(0,k.unreachable)("Cannot initialize BaseFontLoader."),this.docId=ne,this._onUnsupportedFeature=P,this._document=V,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(ne){this.nativeFontFaces.push(ne),this._document.fonts.add(ne)}insertRule(ne){let P=this.styleElement;P||(P=this.styleElement=this._document.createElement("style"),P.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,this._document.documentElement.getElementsByTagName("head")[0].append(P));const V=P.sheet;V.insertRule(ne,V.cssRules.length)}clear(){for(const ne of this.nativeFontFaces)this._document.fonts.delete(ne);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}bind(ne){var P=this;return _asyncToGenerator(function*(){if(ne.attached||ne.missingFile)return;if(ne.attached=!0,P.isFontLoadingAPISupported){const O=ne.createNativeFontFace();if(O){P.addNativeFontFace(O);try{yield O.loaded}catch(G){throw P._onUnsupportedFeature({featureId:k.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,k.warn)(`Failed to load font '${O.family}': '${G}'.`),ne.disableFontFace=!0,G}}return}const V=ne.createFontFaceRule();if(V){if(P.insertRule(V),P.isSyncFontLoadingSupported)return;yield new Promise(O=>{const G=P._queueLoadingCallback(O);P._prepareFontLoadEvent([V],[ne],G)})}})()}_queueLoadingCallback(ne){(0,k.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){var P;const ne=!!(null==(P=this._document)?void 0:P.fonts);return(0,k.shadow)(this,"isFontLoadingAPISupported",ne)}get isSyncFontLoadingSupported(){(0,k.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,k.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(ne,P,V){(0,k.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let fe;I.FontLoader=fe,I.FontLoader=fe=class extends j{constructor(ne){super(ne),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let ne=!1;if("undefined"==typeof navigator)ne=!0;else{const P=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==P?void 0:P[1])>=14&&(ne=!0)}return(0,k.shadow)(this,"isSyncFontLoadingSupported",ne)}_queueLoadingCallback(ne){const V=this.loadingContext,O={id:"pdfjs-font-loading-"+V.nextRequestId++,done:!1,complete:function P(){for((0,k.assert)(!O.done,"completeRequest() cannot be called twice."),O.done=!0;V.requests.length>0&&V.requests[0].done;){const G=V.requests.shift();setTimeout(G.callback,0)}},callback:ne};return V.requests.push(O),O}get _loadTestFont(){return(0,k.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(ne,P,V){function O(Se,ve){return Se.charCodeAt(ve)<<24|Se.charCodeAt(ve+1)<<16|Se.charCodeAt(ve+2)<<8|255&Se.charCodeAt(ve+3)}function G(Se,ve,Ie,ge){return Se.substring(0,ve)+ge+Se.substring(ve+Ie)}let B,E;const d=this._document.createElement("canvas");d.width=1,d.height=1;const h=d.getContext("2d");let y=0;const x=`lt${Date.now()}${this.loadTestFontId++}`;let v=this._loadTestFont;v=G(v,976,x.length,x);const T=1482184792;let N=O(v,16);for(B=0,E=x.length-3;B<E;B+=4)N=N-T+O(x,B)|0;B<x.length&&(N=N-T+O(x+"XXX",B)|0),v=G(v,16,4,(0,k.string32)(N));const H=`url(data:font/opentype;base64,${btoa(v)});`;this.insertRule(`@font-face {font-family:"${x}";src:${H}}`);const W=[];for(const Se of P)W.push(Se.loadedName);W.push(x);const ye=this._document.createElement("div");ye.style.visibility="hidden",ye.style.width=ye.style.height="10px",ye.style.position="absolute",ye.style.top=ye.style.left="0px";for(const Se of W){const ve=this._document.createElement("span");ve.textContent="Hi",ve.style.fontFamily=Se,ye.append(ve)}this._document.body.append(ye),function w(Se,ve){if(y++,y>30)return(0,k.warn)("Load test font never loaded."),void ve();h.font="30px "+Se,h.fillText(".",0,20),h.getImageData(0,0,1,1).data[3]>0?ve():setTimeout(w.bind(null,Se,ve))}(x,()=>{ye.remove(),V.complete()})}},I.FontFaceObject=class ce{constructor(ne,{isEvalSupported:P=!0,disableFontFace:V=!1,ignoreErrors:O=!1,onUnsupportedFeature:G,fontRegistry:B=null}){this.compiledGlyphs=Object.create(null);for(const E in ne)this[E]=ne[E];this.isEvalSupported=!1!==P,this.disableFontFace=!0===V,this.ignoreErrors=!0===O,this._onUnsupportedFeature=G,this.fontRegistry=B}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let ne;if(this.cssFontInfo){const P={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(P.style=`oblique ${this.cssFontInfo.italicAngle}deg`),ne=new FontFace(this.cssFontInfo.fontFamily,this.data,P)}else ne=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),ne}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const ne=(0,k.bytesToString)(this.data),P=`url(data:${this.mimetype};base64,${btoa(ne)});`;let V;if(this.cssFontInfo){let O=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(O+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),V=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${O}src:${P}}`}else V=`@font-face {font-family:"${this.loadedName}";src:${P}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,P),V}getPathGenerator(ne,P){if(void 0!==this.compiledGlyphs[P])return this.compiledGlyphs[P];let V;try{V=ne.get(this.loadedName+"_path_"+P)}catch(O){if(!this.ignoreErrors)throw O;return this._onUnsupportedFeature({featureId:k.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,k.warn)(`getPathGenerator - ignoring character: "${O}".`),this.compiledGlyphs[P]=function(G,B){}}if(this.isEvalSupported&&k.FeatureTest.isEvalSupported){const O=[];for(const G of V){const B=void 0!==G.args?G.args.join(","):"";O.push("c.",G.cmd,"(",B,");\n")}return this.compiledGlyphs[P]=new Function("c","size",O.join(""))}return this.compiledGlyphs[P]=function(O,G){for(const B of V)"scale"===B.cmd&&(B.args=[G,-G]),O[B.cmd].apply(O,B.args)}}}},(Re,I,_e)=>{var De,SD;Object.defineProperty(I,"__esModule",{value:!0}),I.CanvasGraphics=void 0;var k=_e(8),j=_e(1),fe=_e(13),ce=_e(14),pe=_e(3);const V=4096,B=pe.isNodeJS&&"undefined"==typeof Path2D?-1:1e3,E=16;class h{constructor(D){this.canvasFactory=D,this.cache=Object.create(null)}getCanvas(D,C,R){let Q;return void 0!==this.cache[D]?(Q=this.cache[D],this.canvasFactory.reset(Q,C,R)):(Q=this.canvasFactory.create(C,R),this.cache[D]=Q),Q}delete(D){delete this.cache[D]}clear(){for(const D in this.cache)this.canvasFactory.destroy(this.cache[D]),delete this.cache[D]}}function y(te,D,C,R,Q,Y,J,de,ue,m){const[S,F,L,K,ie,he]=(0,k.getCurrentTransform)(te);if(0===F&&0===L){const Ee=Math.round(J*S+ie),Ve=Math.round(de*K+he),je=Math.abs(Math.round((J+ue)*S+ie)-Ee)||1,Ke=Math.abs(Math.round((de+m)*K+he)-Ve)||1;return te.setTransform(Math.sign(S),0,0,Math.sign(K),Ee,Ve),te.drawImage(D,C,R,Q,Y,0,0,je,Ke),te.setTransform(S,F,L,K,ie,he),[je,Ke]}if(0===S&&0===K){const Ee=Math.round(de*L+ie),Ve=Math.round(J*F+he),je=Math.abs(Math.round((de+m)*L+ie)-Ee)||1,Ke=Math.abs(Math.round((J+ue)*F+he)-Ve)||1;return te.setTransform(0,Math.sign(F),Math.sign(L),0,Ee,Ve),te.drawImage(D,C,R,Q,Y,0,0,Ke,je),te.setTransform(S,F,L,K,ie,he),[Ke,je]}return te.drawImage(D,C,R,Q,Y,J,de,ue,m),[Math.hypot(S,F)*ue,Math.hypot(L,K)*m]}class x{constructor(D,C){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=j.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=j.FONT_IDENTITY_MATRIX,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=j.TextRenderingMode.FILL,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=null,this.startNewPathAndClipBox([0,0,D,C])}clone(){const D=Object.create(this);return D.clipBox=this.clipBox.slice(),D}setCurrentPoint(D,C){this.x=D,this.y=C}updatePathMinMax(D,C,R){[C,R]=j.Util.applyTransform([C,R],D),this.minX=Math.min(this.minX,C),this.minY=Math.min(this.minY,R),this.maxX=Math.max(this.maxX,C),this.maxY=Math.max(this.maxY,R)}updateRectMinMax(D,C){const R=j.Util.applyTransform(C,D),Q=j.Util.applyTransform(C.slice(2),D);this.minX=Math.min(this.minX,R[0],Q[0]),this.minY=Math.min(this.minY,R[1],Q[1]),this.maxX=Math.max(this.maxX,R[0],Q[0]),this.maxY=Math.max(this.maxY,R[1],Q[1])}updateScalingPathMinMax(D,C){j.Util.scaleMinMax(D,C),this.minX=Math.min(this.minX,C[0]),this.maxX=Math.max(this.maxX,C[1]),this.minY=Math.min(this.minY,C[2]),this.maxY=Math.max(this.maxY,C[3])}updateCurvePathMinMax(D,C,R,Q,Y,J,de,ue,m,S){const F=j.Util.bezierBoundingBox(C,R,Q,Y,J,de,ue,m);if(S)return S[0]=Math.min(S[0],F[0],F[2]),S[1]=Math.max(S[1],F[0],F[2]),S[2]=Math.min(S[2],F[1],F[3]),void(S[3]=Math.max(S[3],F[1],F[3]));this.updateRectMinMax(D,F)}getPathBoundingBox(D=fe.PathType.FILL,C=null){const R=[this.minX,this.minY,this.maxX,this.maxY];if(D===fe.PathType.STROKE){C||(0,j.unreachable)("Stroke bounding box must include transform.");const Q=j.Util.singularValueDecompose2dScale(C),Y=Q[0]*this.lineWidth/2,J=Q[1]*this.lineWidth/2;R[0]-=Y,R[1]-=J,R[2]+=Y,R[3]+=J}return R}updateClipFromPath(){const D=j.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(D||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(D){this.clipBox=D,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(D=fe.PathType.FILL,C=null){return j.Util.intersect(this.clipBox,this.getPathBoundingBox(D,C))}}function v(te,D,C=null){if("undefined"!=typeof ImageData&&D instanceof ImageData)return void te.putImageData(D,0,0);const R=D.height,Q=D.width,Y=R%E,J=(R-Y)/E,de=0===Y?J:J+1,ue=te.createImageData(Q,E);let S,m=0;const F=D.data,L=ue.data;let K,ie,he,ke,me,we,Ee,Ne;if(C)switch(C.length){case 1:me=C[0],we=C[0],Ee=C[0],Ne=C[0];break;case 4:me=C[0],we=C[1],Ee=C[2],Ne=C[3]}if(D.kind===j.ImageKind.GRAYSCALE_1BPP){const Ve=F.byteLength,X=new Uint32Array(L.buffer,0,L.byteLength>>2),je=X.length,Ze=Q+7>>3;let Ke=4294967295,lt=j.FeatureTest.isLittleEndian?4278190080:255;for(Ne&&255===Ne[0]&&0===Ne[255]&&([Ke,lt]=[lt,Ke]),K=0;K<de;K++){for(he=K<J?E:Y,S=0,ie=0;ie<he;ie++){const yt=Ve-m;let $t=0;const Lt=yt>Ze?Q:8*yt-7,vt=-8&Lt;let Ct=0,rn=0;for(;$t<vt;$t+=8)rn=F[m++],X[S++]=128&rn?Ke:lt,X[S++]=64&rn?Ke:lt,X[S++]=32&rn?Ke:lt,X[S++]=16&rn?Ke:lt,X[S++]=8&rn?Ke:lt,X[S++]=4&rn?Ke:lt,X[S++]=2&rn?Ke:lt,X[S++]=1&rn?Ke:lt;for(;$t<Lt;$t++)0===Ct&&(rn=F[m++],Ct=128),X[S++]=rn&Ct?Ke:lt,Ct>>=1}for(;S<je;)X[S++]=0;te.putImageData(ue,0,K*E)}}else if(D.kind===j.ImageKind.RGBA_32BPP){const Ve=!!(me||we||Ee);for(ie=0,ke=Q*E*4,K=0;K<J;K++){if(L.set(F.subarray(m,m+ke)),m+=ke,Ve)for(let X=0;X<ke;X+=4)me&&(L[X+0]=me[L[X+0]]),we&&(L[X+1]=we[L[X+1]]),Ee&&(L[X+2]=Ee[L[X+2]]);te.putImageData(ue,0,ie),ie+=E}if(K<de){if(ke=Q*Y*4,L.set(F.subarray(m,m+ke)),Ve)for(let X=0;X<ke;X+=4)me&&(L[X+0]=me[L[X+0]]),we&&(L[X+1]=we[L[X+1]]),Ee&&(L[X+2]=Ee[L[X+2]]);te.putImageData(ue,0,ie)}}else{if(D.kind!==j.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${D.kind}`);{const Ve=!!(me||we||Ee);for(he=E,ke=Q*he,K=0;K<de;K++){for(K>=J&&(he=Y,ke=Q*he),S=0,ie=ke;ie--;)L[S++]=F[m++],L[S++]=F[m++],L[S++]=F[m++],L[S++]=255;if(Ve)for(let X=0;X<S;X+=4)me&&(L[X+0]=me[L[X+0]]),we&&(L[X+1]=we[L[X+1]]),Ee&&(L[X+2]=Ee[L[X+2]]);te.putImageData(ue,0,K*E)}}}}function f(te,D){if(D.bitmap)return void te.drawImage(D.bitmap,0,0);const C=D.height,R=D.width,Q=C%E,Y=(C-Q)/E,J=0===Q?Y:Y+1,de=te.createImageData(R,E);let ue=0;const m=D.data,S=de.data;for(let F=0;F<J;F++){const L=F<Y?E:Q;({srcPos:ue}=(0,ce.applyMaskImageData)({src:m,srcPos:ue,dest:S,width:R,height:L})),te.putImageData(de,0,F*E)}}function g(te,D){const C=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"];for(let R=0,Q=C.length;R<Q;R++){const Y=C[R];void 0!==te[Y]&&(D[Y]=te[Y])}void 0!==te.setLineDash&&(D.setLineDash(te.getLineDash()),D.lineDashOffset=te.lineDashOffset)}function T(te,D){te.strokeStyle=te.fillStyle=D||"#000000",te.fillRule="nonzero",te.globalAlpha=1,te.lineWidth=1,te.lineCap="butt",te.lineJoin="miter",te.miterLimit=10,te.globalCompositeOperation="source-over",te.font="10px sans-serif",void 0!==te.setLineDash&&(te.setLineDash([]),te.lineDashOffset=0)}function N(te,D,C,R){const Q=te.length;for(let Y=3;Y<Q;Y+=4){const J=te[Y];if(0===J)te[Y-3]=D,te[Y-2]=C,te[Y-1]=R;else if(J<255){const de=255-J;te[Y-3]=te[Y-3]*J+D*de>>8,te[Y-2]=te[Y-2]*J+C*de>>8,te[Y-1]=te[Y-1]*J+R*de>>8}}}function H(te,D,C){const R=te.length;for(let Y=3;Y<R;Y+=4)D[Y]=D[Y]*(C?C[te[Y]]:te[Y])*.00392156862745098|0}function M(te,D,C){const R=te.length;for(let Q=3;Q<R;Q+=4){const Y=77*te[Q-3]+152*te[Q-2]+28*te[Q-1];D[Q]=C?D[Q]*C[Y>>8]>>8:D[Q]*Y>>16}}function Se(te,D){const C=j.Util.singularValueDecompose2dScale(te);C[0]=Math.fround(C[0]),C[1]=Math.fround(C[1]);const R=Math.fround((globalThis.devicePixelRatio||1)*k.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==D?D:C[0]<=R||C[1]<=R}const ve=["butt","round","square"],Ie=["miter","round","bevel"],ge={},se={},xe=class{constructor(D,C,R,Q,Y,J,de,ue){Pe(this,De),this.ctx=D,this.current=new x(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=C,this.objs=R,this.canvasFactory=Q,this.imageLayer=Y,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=[],this.optionalContentConfig=J,this.cachedCanvases=new h(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=de,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.backgroundColor=(null==ue?void 0:ue.background)||null,this.foregroundColor=(null==ue?void 0:ue.foreground)||null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(D,C=null){return"string"==typeof D?D.startsWith("g_")?this.commonObjs.get(D):this.objs.get(D):C}beginDrawing({transform:D,viewport:C,transparency:R=!1,background:Q=null}){const Y=this.ctx.canvas.width,J=this.ctx.canvas.height,de=Q||"#ffffff";if(this.ctx.save(),this.foregroundColor&&this.backgroundColor){this.ctx.fillStyle=this.foregroundColor;const ue=this.foregroundColor=this.ctx.fillStyle;this.ctx.fillStyle=this.backgroundColor;const m=this.backgroundColor=this.ctx.fillStyle;let S=!0,F=de;if(this.ctx.fillStyle=de,F=this.ctx.fillStyle,S="string"==typeof F&&/^#[0-9A-Fa-f]{6}$/.test(F),"#000000"===ue&&"#ffffff"===m||ue===m||!S)this.foregroundColor=this.backgroundColor=null;else{const[L,K,ie]=(0,k.getRGB)(F),he=me=>(me/=255)<=.03928?me/12.92:ls((me+.055)/1.055,2.4),ke=Math.round(.2126*he(L)+.7152*he(K)+.0722*he(ie));this.selectColor=(me,we,Ee)=>{const Ne=.2126*he(me)+.7152*he(we)+.0722*he(Ee);return Math.round(Ne)===ke?m:ue}}}if(this.ctx.fillStyle=this.backgroundColor||de,this.ctx.fillRect(0,0,Y,J),this.ctx.restore(),R){const ue=this.cachedCanvases.getCanvas("transparent",Y,J);this.compositeCtx=this.ctx,this.transparentCanvas=ue.canvas,this.ctx=ue.context,this.ctx.save(),this.ctx.transform(...(0,k.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),T(this.ctx,this.foregroundColor),D&&(this.ctx.transform(...D),this.outputScaleX=D[0],this.outputScaleY=D[0]),this.ctx.transform(...C.transform),this.viewportScale=C.scale,this.baseTransform=(0,k.getCurrentTransform)(this.ctx),this.imageLayer&&((0,k.deprecated)("The `imageLayer` functionality will be removed in the future."),this.imageLayer.beginLayout())}executeOperatorList(D,C,R,Q){const Y=D.argsArray,J=D.fnArray;let de=C||0;const ue=Y.length;if(ue===de)return de;const m=ue-de>10&&"function"==typeof R,S=m?Date.now()+15:0;let F=0;const L=this.commonObjs,K=this.objs;let ie;for(;;){if(void 0!==Q&&de===Q.nextBreakPoint)return Q.breakIt(de,R),de;if(ie=J[de],ie!==j.OPS.dependency)this[ie].apply(this,Y[de]);else for(const he of Y[de]){const ke=he.startsWith("g_")?L:K;if(!ke.has(he))return ke.get(he,R),de}if(de++,de===ue)return de;if(m&&++F>10){if(Date.now()>S)return R(),de;F=0}}}endDrawing(){Le(this,De,SD).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const D of this._cachedBitmapsMap.values()){for(const C of D.values())"undefined"!=typeof HTMLCanvasElement&&C instanceof HTMLCanvasElement&&(C.width=C.height=0);D.clear()}this._cachedBitmapsMap.clear(),this.imageLayer&&this.imageLayer.endLayout()}_scaleImage(D,C){const R=D.width,Q=D.height;let S,F,Y=Math.max(Math.hypot(C[0],C[1]),1),J=Math.max(Math.hypot(C[2],C[3]),1),de=R,ue=Q,m="prescale1";for(;Y>2&&de>1||J>2&&ue>1;){let L=de,K=ue;Y>2&&de>1&&(L=Math.ceil(de/2),Y/=de/L),J>2&&ue>1&&(K=Math.ceil(ue/2),J/=ue/K),S=this.cachedCanvases.getCanvas(m,L,K),F=S.context,F.clearRect(0,0,L,K),F.drawImage(D,0,0,de,ue,0,0,L,K),D=S.canvas,de=L,ue=K,m="prescale1"===m?"prescale2":"prescale1"}return{img:D,paintWidth:de,paintHeight:ue}}_createMaskCanvas(D){const C=this.ctx,{width:R,height:Q}=D,Y=this.current.fillColor,J=this.current.patternFill,de=(0,k.getCurrentTransform)(C);let ue,m,S,F;if((D.bitmap||D.data)&&D.count>1){const je=D.bitmap||D.data.buffer,Ze=de.slice(0,4);m=JSON.stringify(J?Ze:[Ze,Y]),ue=this._cachedBitmapsMap.get(je),ue||(ue=new Map,this._cachedBitmapsMap.set(je,ue));const Ke=ue.get(m);if(Ke&&!J)return{canvas:Ke,offsetX:Math.round(Math.min(de[0],de[2])+de[4]),offsetY:Math.round(Math.min(de[1],de[3])+de[5])};S=Ke}S||(F=this.cachedCanvases.getCanvas("maskCanvas",R,Q),f(F.context,D));let L=j.Util.transform(de,[1/R,0,0,-1/Q,0,0]);L=j.Util.transform(L,[1,0,0,1,0,-Q]);const K=j.Util.applyTransform([0,0],L),ie=j.Util.applyTransform([R,Q],L),he=j.Util.normalizeRect([K[0],K[1],ie[0],ie[1]]),ke=Math.round(he[2]-he[0])||1,me=Math.round(he[3]-he[1])||1,we=this.cachedCanvases.getCanvas("fillCanvas",ke,me),Ee=we.context,Ne=Math.min(K[0],ie[0]),Ve=Math.min(K[1],ie[1]);Ee.translate(-Ne,-Ve),Ee.transform(...L),S||(S=this._scaleImage(F.canvas,(0,k.getCurrentTransformInverse)(Ee)),S=S.img,ue&&J&&ue.set(m,S)),Ee.imageSmoothingEnabled=Se((0,k.getCurrentTransform)(Ee),D.interpolate),y(Ee,S,0,0,S.width,S.height,0,0,R,Q),Ee.globalCompositeOperation="source-in";const X=j.Util.transform((0,k.getCurrentTransformInverse)(Ee),[1,0,0,1,-Ne,-Ve]);return Ee.fillStyle=J?Y.getPattern(C,this,X,fe.PathType.FILL):Y,Ee.fillRect(0,0,R,Q),ue&&!J&&(this.cachedCanvases.delete("fillCanvas"),ue.set(m,we.canvas)),{canvas:we.canvas,offsetX:Math.round(Ne),offsetY:Math.round(Ve)}}setLineWidth(D){D!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=D,this.ctx.lineWidth=D}setLineCap(D){this.ctx.lineCap=ve[D]}setLineJoin(D){this.ctx.lineJoin=Ie[D]}setMiterLimit(D){this.ctx.miterLimit=D}setDash(D,C){const R=this.ctx;void 0!==R.setLineDash&&(R.setLineDash(D),R.lineDashOffset=C)}setRenderingIntent(D){}setFlatness(D){}setGState(D){for(let C=0,R=D.length;C<R;C++){const Q=D[C],J=Q[1];switch(Q[0]){case"LW":this.setLineWidth(J);break;case"LC":this.setLineCap(J);break;case"LJ":this.setLineJoin(J);break;case"ML":this.setMiterLimit(J);break;case"D":this.setDash(J[0],J[1]);break;case"RI":this.setRenderingIntent(J);break;case"FL":this.setFlatness(J);break;case"Font":this.setFont(J[0],J[1]);break;case"CA":this.current.strokeAlpha=Q[1];break;case"ca":this.current.fillAlpha=Q[1],this.ctx.globalAlpha=Q[1];break;case"BM":this.ctx.globalCompositeOperation=J;break;case"SMask":this.current.activeSMask=J?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=J}}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const D=this.inSMaskMode;this.current.activeSMask&&!D?this.beginSMaskMode():!this.current.activeSMask&&D&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const Q=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,this.ctx.canvas.width,this.ctx.canvas.height);this.suspendedCtx=this.ctx,this.ctx=Q.context;const Y=this.ctx;Y.setTransform(...(0,k.getCurrentTransform)(this.suspendedCtx)),g(this.suspendedCtx,Y),function d(te,D){if(te._removeMirroring)throw new Error("Context is already forwarding operations.");te.__originalSave=te.save,te.__originalRestore=te.restore,te.__originalRotate=te.rotate,te.__originalScale=te.scale,te.__originalTranslate=te.translate,te.__originalTransform=te.transform,te.__originalSetTransform=te.setTransform,te.__originalResetTransform=te.resetTransform,te.__originalClip=te.clip,te.__originalMoveTo=te.moveTo,te.__originalLineTo=te.lineTo,te.__originalBezierCurveTo=te.bezierCurveTo,te.__originalRect=te.rect,te.__originalClosePath=te.closePath,te.__originalBeginPath=te.beginPath,te._removeMirroring=()=>{te.save=te.__originalSave,te.restore=te.__originalRestore,te.rotate=te.__originalRotate,te.scale=te.__originalScale,te.translate=te.__originalTranslate,te.transform=te.__originalTransform,te.setTransform=te.__originalSetTransform,te.resetTransform=te.__originalResetTransform,te.clip=te.__originalClip,te.moveTo=te.__originalMoveTo,te.lineTo=te.__originalLineTo,te.bezierCurveTo=te.__originalBezierCurveTo,te.rect=te.__originalRect,te.closePath=te.__originalClosePath,te.beginPath=te.__originalBeginPath,delete te._removeMirroring},te.save=function(){D.save(),this.__originalSave()},te.restore=function(){D.restore(),this.__originalRestore()},te.translate=function(R,Q){D.translate(R,Q),this.__originalTranslate(R,Q)},te.scale=function(R,Q){D.scale(R,Q),this.__originalScale(R,Q)},te.transform=function(R,Q,Y,J,de,ue){D.transform(R,Q,Y,J,de,ue),this.__originalTransform(R,Q,Y,J,de,ue)},te.setTransform=function(R,Q,Y,J,de,ue){D.setTransform(R,Q,Y,J,de,ue),this.__originalSetTransform(R,Q,Y,J,de,ue)},te.resetTransform=function(){D.resetTransform(),this.__originalResetTransform()},te.rotate=function(R){D.rotate(R),this.__originalRotate(R)},te.clip=function(R){D.clip(R),this.__originalClip(R)},te.moveTo=function(C,R){D.moveTo(C,R),this.__originalMoveTo(C,R)},te.lineTo=function(C,R){D.lineTo(C,R),this.__originalLineTo(C,R)},te.bezierCurveTo=function(C,R,Q,Y,J,de){D.bezierCurveTo(C,R,Q,Y,J,de),this.__originalBezierCurveTo(C,R,Q,Y,J,de)},te.rect=function(C,R,Q,Y){D.rect(C,R,Q,Y),this.__originalRect(C,R,Q,Y)},te.closePath=function(){D.closePath(),this.__originalClosePath()},te.beginPath=function(){D.beginPath(),this.__originalBeginPath()}}(Y,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(),g(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(D){this.current.activeSMask&&(D?(D[0]=Math.floor(D[0]),D[1]=Math.floor(D[1]),D[2]=Math.ceil(D[2]),D[3]=Math.ceil(D[3])):D=[0,0,this.ctx.canvas.width,this.ctx.canvas.height],function ye(te,D,C,R){const Q=R[0],Y=R[1],J=R[2]-Q,de=R[3]-Y;0===J||0===de||(function W(te,D,C,R,Q,Y,J,de,ue,m,S){const F=!!Y,L=F?Y[0]:0,K=F?Y[1]:0,ie=F?Y[2]:0;let he;he="Luminosity"===Q?M:H;const me=Math.min(R,Math.ceil(1048576/C));for(let we=0;we<R;we+=me){const Ee=Math.min(me,R-we),Ne=te.getImageData(de-m,we+(ue-S),C,Ee),Ve=D.getImageData(de,we+ue,C,Ee);F&&N(Ne.data,L,K,ie),he(Ne.data,Ve.data,J),D.putImageData(Ve,de,we+ue)}}(D.context,C,J,de,D.subtype,D.backdrop,D.transferMap,Q,Y,D.offsetX,D.offsetY),te.save(),te.globalAlpha=1,te.globalCompositeOperation="source-over",te.setTransform(1,0,0,1,0,0),te.drawImage(C.canvas,0,0),te.restore())}(this.suspendedCtx,this.current.activeSMask,this.ctx,D),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())}save(){this.inSMaskMode?(g(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const D=this.current;this.stateStack.push(D),this.current=D.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),g(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(D,C,R,Q,Y,J){this.ctx.transform(D,C,R,Q,Y,J),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(D,C,R){const Q=this.ctx,Y=this.current;let ue,m,J=Y.x,de=Y.y;const S=(0,k.getCurrentTransform)(Q),F=0===S[0]&&0===S[3]||0===S[1]&&0===S[2],L=F?R.slice(0):null;for(let K=0,ie=0,he=D.length;K<he;K++)switch(0|D[K]){case j.OPS.rectangle:J=C[ie++],de=C[ie++];const ke=C[ie++],me=C[ie++],we=J+ke,Ee=de+me;Q.moveTo(J,de),0===ke||0===me?Q.lineTo(we,Ee):(Q.lineTo(we,de),Q.lineTo(we,Ee),Q.lineTo(J,Ee)),F||Y.updateRectMinMax(S,[J,de,we,Ee]),Q.closePath();break;case j.OPS.moveTo:J=C[ie++],de=C[ie++],Q.moveTo(J,de),F||Y.updatePathMinMax(S,J,de);break;case j.OPS.lineTo:J=C[ie++],de=C[ie++],Q.lineTo(J,de),F||Y.updatePathMinMax(S,J,de);break;case j.OPS.curveTo:ue=J,m=de,J=C[ie+4],de=C[ie+5],Q.bezierCurveTo(C[ie],C[ie+1],C[ie+2],C[ie+3],J,de),Y.updateCurvePathMinMax(S,ue,m,C[ie],C[ie+1],C[ie+2],C[ie+3],J,de,L),ie+=6;break;case j.OPS.curveTo2:ue=J,m=de,Q.bezierCurveTo(J,de,C[ie],C[ie+1],C[ie+2],C[ie+3]),Y.updateCurvePathMinMax(S,ue,m,J,de,C[ie],C[ie+1],C[ie+2],C[ie+3],L),J=C[ie+2],de=C[ie+3],ie+=4;break;case j.OPS.curveTo3:ue=J,m=de,J=C[ie+2],de=C[ie+3],Q.bezierCurveTo(C[ie],C[ie+1],J,de,J,de),Y.updateCurvePathMinMax(S,ue,m,C[ie],C[ie+1],J,de,J,de,L),ie+=4;break;case j.OPS.closePath:Q.closePath()}F&&Y.updateScalingPathMinMax(S,L),Y.setCurrentPoint(J,de)}closePath(){this.ctx.closePath()}stroke(D){D=void 0===D||D;const C=this.ctx,R=this.current.strokeColor;C.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof R&&(null==R?void 0:R.getPattern)?(C.save(),C.strokeStyle=R.getPattern(C,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.STROKE),this.rescaleAndStroke(!1),C.restore()):this.rescaleAndStroke(!0)),D&&this.consumePath(this.current.getClippedPathBoundingBox()),C.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(D){D=void 0===D||D;const C=this.ctx,R=this.current.fillColor;let Y=!1;this.current.patternFill&&(C.save(),C.fillStyle=R.getPattern(C,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.FILL),Y=!0);const J=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==J&&(this.pendingEOFill?(C.fill("evenodd"),this.pendingEOFill=!1):C.fill()),Y&&C.restore(),D&&this.consumePath(J)}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=ge}eoClip(){this.pendingClip=se}beginText(){this.current.textMatrix=j.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const D=this.pendingTextPaths,C=this.ctx;if(void 0!==D){C.save(),C.beginPath();for(const R of D)C.setTransform(...R.transform),C.translate(R.x,R.y),R.addToPath(C,R.fontSize);C.restore(),C.clip(),C.beginPath(),delete this.pendingTextPaths}else C.beginPath()}setCharSpacing(D){this.current.charSpacing=D}setWordSpacing(D){this.current.wordSpacing=D}setHScale(D){this.current.textHScale=D/100}setLeading(D){this.current.leading=-D}setFont(D,C){const R=this.commonObjs.get(D),Q=this.current;if(!R)throw new Error(`Can't find font for ${D}`);if(Q.fontMatrix=R.fontMatrix||j.FONT_IDENTITY_MATRIX,(0===Q.fontMatrix[0]||0===Q.fontMatrix[3])&&(0,j.warn)("Invalid font matrix for font "+D),C<0?(C=-C,Q.fontDirection=-1):Q.fontDirection=1,this.current.font=R,this.current.fontSize=C,R.isType3Font)return;let J="normal";R.black?J="900":R.bold&&(J="bold");const de=R.italic?"italic":"normal",ue=`"${R.loadedName||"sans-serif"}", ${R.fallbackName}`;let m=C;C<16?m=16:C>100&&(m=100),this.current.fontSizeScale=C/m,this.ctx.font=`${de} ${J} ${m}px ${ue}`}setTextRenderingMode(D){this.current.textRenderingMode=D}setTextRise(D){this.current.textRise=D}moveText(D,C){this.current.x=this.current.lineX+=D,this.current.y=this.current.lineY+=C}setLeadingMoveText(D,C){this.setLeading(-C),this.moveText(D,C)}setTextMatrix(D,C,R,Q,Y,J){this.current.textMatrix=[D,C,R,Q,Y,J],this.current.textMatrixScale=Math.hypot(D,C),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(D,C,R,Q){const Y=this.ctx,J=this.current,de=J.font,ue=J.textRenderingMode,m=J.fontSize/J.fontSizeScale,S=ue&j.TextRenderingMode.FILL_STROKE_MASK,F=!!(ue&j.TextRenderingMode.ADD_TO_PATH_FLAG),L=J.patternFill&&!de.missingFile;let K;(de.disableFontFace||F||L)&&(K=de.getPathGenerator(this.commonObjs,D)),de.disableFontFace||L?(Y.save(),Y.translate(C,R),Y.beginPath(),K(Y,m),Q&&Y.setTransform(...Q),(S===j.TextRenderingMode.FILL||S===j.TextRenderingMode.FILL_STROKE)&&Y.fill(),(S===j.TextRenderingMode.STROKE||S===j.TextRenderingMode.FILL_STROKE)&&Y.stroke(),Y.restore()):((S===j.TextRenderingMode.FILL||S===j.TextRenderingMode.FILL_STROKE)&&Y.fillText(D,C,R),(S===j.TextRenderingMode.STROKE||S===j.TextRenderingMode.FILL_STROKE)&&Y.strokeText(D,C,R)),F&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,k.getCurrentTransform)(Y),x:C,y:R,fontSize:m,addToPath:K})}get isFontSubpixelAAEnabled(){const{context:D}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);D.scale(1.5,1),D.fillText("I",0,10);const C=D.getImageData(0,0,10,10).data;let R=!1;for(let Q=3;Q<C.length;Q+=4)if(C[Q]>0&&C[Q]<255){R=!0;break}return(0,j.shadow)(this,"isFontSubpixelAAEnabled",R)}showText(D){const C=this.current,R=C.font;if(R.isType3Font)return this.showType3Text(D);const Q=C.fontSize;if(0===Q)return;const Y=this.ctx,J=C.fontSizeScale,de=C.charSpacing,ue=C.wordSpacing,m=C.fontDirection,S=C.textHScale*m,F=D.length,L=R.vertical,K=L?1:-1,ie=R.defaultVMetrics,he=Q*C.fontMatrix[0],ke=C.textRenderingMode===j.TextRenderingMode.FILL&&!R.disableFontFace&&!C.patternFill;let me;if(Y.save(),Y.transform(...C.textMatrix),Y.translate(C.x,C.y+C.textRise),Y.scale(S,m>0?-1:1),C.patternFill){Y.save();const X=C.fillColor.getPattern(Y,this,(0,k.getCurrentTransformInverse)(Y),fe.PathType.FILL);me=(0,k.getCurrentTransform)(Y),Y.restore(),Y.fillStyle=X}let we=C.lineWidth;const Ee=C.textMatrixScale;if(0===Ee||0===we){const X=C.textRenderingMode&j.TextRenderingMode.FILL_STROKE_MASK;(X===j.TextRenderingMode.STROKE||X===j.TextRenderingMode.FILL_STROKE)&&(we=this.getSinglePixelWidth())}else we/=Ee;1!==J&&(Y.scale(J,J),we/=J),Y.lineWidth=we;let Ve,Ne=0;for(Ve=0;Ve<F;++Ve){const X=D[Ve];if("number"==typeof X){Ne+=K*X*Q/1e3;continue}let je=!1;const Ze=(X.isSpace?ue:0)+de,Ke=X.fontChar,lt=X.accent;let yt,$t,vt,Lt=X.width;if(L){const Ct=X.vmetric||ie,rn=-(X.vmetric?Ct[1]:.5*Lt)*he;Lt=Ct?-Ct[0]:Lt,yt=rn/J,$t=(Ne+Ct[2]*he)/J}else yt=Ne/J,$t=0;if(R.remeasure&&Lt>0){const Ct=1e3*Y.measureText(Ke).width/Q*J;if(Lt<Ct&&this.isFontSubpixelAAEnabled){const rn=Lt/Ct;je=!0,Y.save(),Y.scale(rn,1),yt/=rn}else Lt!==Ct&&(yt+=(Lt-Ct)/2e3*Q/J)}this.contentVisible&&(X.isInFont||R.missingFile)&&(ke&&!lt?Y.fillText(Ke,yt,$t):(this.paintChar(Ke,yt,$t,me),lt&&this.paintChar(lt.fontChar,yt+Q*lt.offset.x/J,$t-Q*lt.offset.y/J,me))),vt=L?Lt*he-Ze*m:Lt*he+Ze*m,Ne+=vt,je&&Y.restore()}L?C.y-=Ne:C.x+=Ne*S,Y.restore(),this.compose()}showType3Text(D){const C=this.ctx,R=this.current,Q=R.font,Y=R.fontSize,J=R.fontDirection,de=Q.vertical?1:-1,ue=R.charSpacing,m=R.wordSpacing,S=R.textHScale*J,F=R.fontMatrix||j.FONT_IDENTITY_MATRIX,L=D.length;let ie,he,ke,me;if(R.textRenderingMode!==j.TextRenderingMode.INVISIBLE&&0!==Y){for(this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,C.save(),C.transform(...R.textMatrix),C.translate(R.x,R.y),C.scale(S,J),ie=0;ie<L;++ie){if(he=D[ie],"number"==typeof he){me=de*he*Y/1e3,this.ctx.translate(me,0),R.x+=me*S;continue}const we=(he.isSpace?m:0)+ue,Ee=Q.charProcOperatorList[he.operatorListId];Ee?(this.contentVisible&&(this.processingType3=he,this.save(),C.scale(Y,Y),C.transform(...F),this.executeOperatorList(Ee),this.restore()),ke=j.Util.applyTransform([he.width,0],F)[0]*Y+we,C.translate(ke,0),R.x+=ke*S):(0,j.warn)(`Type3 character "${he.operatorListId}" is not available.`)}C.restore(),this.processingType3=null}}setCharWidth(D,C){}setCharWidthAndBounds(D,C,R,Q,Y,J){this.ctx.rect(R,Q,Y-R,J-Q),this.ctx.clip(),this.endPath()}getColorN_Pattern(D){let C;if("TilingPattern"===D[0]){const R=D[1],Q=this.baseTransform||(0,k.getCurrentTransform)(this.ctx);C=new fe.TilingPattern(D,R,this.ctx,{createCanvasGraphics:J=>new xe(J,this.commonObjs,this.objs,this.canvasFactory)},Q)}else C=this._getPattern(D[1],D[2]);return C}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(D,C,R){var Y;const Q=(null==(Y=this.selectColor)?void 0:Y.call(this,D,C,R))||j.Util.makeHexColor(D,C,R);this.ctx.strokeStyle=Q,this.current.strokeColor=Q}setFillRGBColor(D,C,R){var Y;const Q=(null==(Y=this.selectColor)?void 0:Y.call(this,D,C,R))||j.Util.makeHexColor(D,C,R);this.ctx.fillStyle=Q,this.current.fillColor=Q,this.current.patternFill=!1}_getPattern(D,C=null){let R;return this.cachedPatterns.has(D)?R=this.cachedPatterns.get(D):(R=(0,fe.getShadingPattern)(this.objs.get(D)),this.cachedPatterns.set(D,R)),C&&(R.matrix=C),R}shadingFill(D){if(!this.contentVisible)return;const C=this.ctx;this.save();const R=this._getPattern(D);C.fillStyle=R.getPattern(C,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.SHADING);const Q=(0,k.getCurrentTransformInverse)(C);if(Q){const Y=C.canvas,J=Y.width,de=Y.height,ue=j.Util.applyTransform([0,0],Q),m=j.Util.applyTransform([0,de],Q),S=j.Util.applyTransform([J,0],Q),F=j.Util.applyTransform([J,de],Q),L=Math.min(ue[0],m[0],S[0],F[0]),K=Math.min(ue[1],m[1],S[1],F[1]),ie=Math.max(ue[0],m[0],S[0],F[0]),he=Math.max(ue[1],m[1],S[1],F[1]);this.ctx.fillRect(L,K,ie-L,he-K)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,j.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,j.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(D,C){this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(D)&&6===D.length&&this.transform(...D),this.baseTransform=(0,k.getCurrentTransform)(this.ctx),C)&&(this.ctx.rect(C[0],C[1],C[2]-C[0],C[3]-C[1]),this.current.updateRectMinMax((0,k.getCurrentTransform)(this.ctx),C),this.clip(),this.endPath())}paintFormXObjectEnd(){!this.contentVisible||(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(D){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const C=this.ctx;D.isolated||(0,j.info)("TODO: Support non-isolated groups."),D.knockout&&(0,j.warn)("Knockout groups not supported.");const R=(0,k.getCurrentTransform)(C);if(D.matrix&&C.transform(...D.matrix),!D.bbox)throw new Error("Bounding box is required.");let Q=j.Util.getAxialAlignedBoundingBox(D.bbox,(0,k.getCurrentTransform)(C));Q=j.Util.intersect(Q,[0,0,C.canvas.width,C.canvas.height])||[0,0,0,0];const J=Math.floor(Q[0]),de=Math.floor(Q[1]);let ue=Math.max(Math.ceil(Q[2])-J,1),m=Math.max(Math.ceil(Q[3])-de,1),S=1,F=1;ue>V&&(S=ue/V,ue=V),m>V&&(F=m/V,m=V),this.current.startNewPathAndClipBox([0,0,ue,m]);let L="groupAt"+this.groupLevel;D.smask&&(L+="_smask_"+this.smaskCounter++%2);const K=this.cachedCanvases.getCanvas(L,ue,m),ie=K.context;ie.scale(1/S,1/F),ie.translate(-J,-de),ie.transform(...R),D.smask?this.smaskStack.push({canvas:K.canvas,context:ie,offsetX:J,offsetY:de,scaleX:S,scaleY:F,subtype:D.smask.subtype,backdrop:D.smask.backdrop,transferMap:D.smask.transferMap||null,startTransformInverse:null}):(C.setTransform(1,0,0,1,0,0),C.translate(J,de),C.scale(S,F),C.save()),g(C,ie),this.ctx=ie,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(C),this.groupLevel++}endGroup(D){if(!this.contentVisible)return;this.groupLevel--;const C=this.ctx,R=this.groupStack.pop();if(this.ctx=R,this.ctx.imageSmoothingEnabled=!1,D.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const Q=(0,k.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...Q);const Y=j.Util.getAxialAlignedBoundingBox([0,0,C.canvas.width,C.canvas.height],Q);this.ctx.drawImage(C.canvas,0,0),this.ctx.restore(),this.compose(Y)}}beginAnnotation(D,C,R,Q,Y){if(Le(this,De,SD).call(this),T(this.ctx,this.foregroundColor),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(C)&&4===C.length){const J=C[2]-C[0],de=C[3]-C[1];if(Y&&this.annotationCanvasMap){(R=R.slice())[4]-=C[0],R[5]-=C[1],(C=C.slice())[0]=C[1]=0,C[2]=J,C[3]=de;const[ue,m]=j.Util.singularValueDecompose2dScale((0,k.getCurrentTransform)(this.ctx)),{viewportScale:S}=this,F=Math.ceil(J*this.outputScaleX*S),L=Math.ceil(de*this.outputScaleY*S);this.annotationCanvas=this.canvasFactory.create(F,L);const{canvas:K,context:ie}=this.annotationCanvas;this.annotationCanvasMap.set(D,K),this.annotationCanvas.savedCtx=this.ctx,this.ctx=ie,this.ctx.setTransform(ue,0,0,-m,0,de*m),T(this.ctx,this.foregroundColor)}else T(this.ctx,this.foregroundColor),this.ctx.rect(C[0],C[1],J,de),this.ctx.clip(),this.endPath()}this.current=new x(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...R),this.transform(...Q)}endAnnotation(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(D){if(!this.contentVisible)return;const C=D.count;(D=this.getObject(D.data,D)).count=C;const R=this.ctx,Q=this.processingType3;if(Q&&(void 0===Q.compiled&&(Q.compiled=function w(te){const{width:D,height:C}=te;if(D>B||C>B)return null;const Q=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),Y=D+1;let de,ue,m,J=new Uint8Array(Y*(C+1));const S=D+7&-8;let F=new Uint8Array(S*C),L=0;for(const me of te.data){let we=128;for(;we>0;)F[L++]=me&we?0:255,we>>=1}let K=0;for(L=0,0!==F[L]&&(J[0]=1,++K),ue=1;ue<D;ue++)F[L]!==F[L+1]&&(J[ue]=F[L]?2:1,++K),L++;for(0!==F[L]&&(J[ue]=2,++K),de=1;de<C;de++){L=de*S,m=de*Y,F[L-S]!==F[L]&&(J[m]=F[L]?1:8,++K);let me=(F[L]?4:0)+(F[L-S]?8:0);for(ue=1;ue<D;ue++)me=(me>>2)+(F[L+1]?4:0)+(F[L-S+1]?8:0),Q[me]&&(J[m+ue]=Q[me],++K),L++;if(F[L-S]!==F[L]&&(J[m+ue]=F[L]?2:4,++K),K>1e3)return null}for(L=S*(C-1),m=de*Y,0!==F[L]&&(J[m]=8,++K),ue=1;ue<D;ue++)F[L]!==F[L+1]&&(J[m+ue]=F[L]?4:8,++K),L++;if(0!==F[L]&&(J[m+ue]=4,++K),K>1e3)return null;const ie=new Int32Array([0,Y,-1,0,-Y,0,0,0,1]),he=new Path2D;for(de=0;K&&de<=C;de++){let me=de*Y;const we=me+D;for(;me<we&&!J[me];)me++;if(me===we)continue;he.moveTo(me%Y,de);const Ee=me;let Ne=J[me];do{const Ve=ie[Ne];do{me+=Ve}while(!J[me]);const X=J[me];5!==X&&10!==X?(Ne=X,J[me]=0):(Ne=X&51*Ne>>4,J[me]&=Ne>>2|Ne<<2),he.lineTo(me%Y,me/Y|0),J[me]||--K}while(Ee!==me);--de}return F=null,J=null,function(me){me.save(),me.scale(1/D,-1/C),me.translate(0,-C),me.fill(he),me.beginPath(),me.restore()}}(D)),Q.compiled))return void Q.compiled(R);const Y=this._createMaskCanvas(D),J=Y.canvas;R.save(),R.setTransform(1,0,0,1,0,0),R.drawImage(J,Y.offsetX,Y.offsetY),R.restore(),this.compose()}paintImageMaskXObjectRepeat(D,C,R=0,Q=0,Y,J){if(!this.contentVisible)return;D=this.getObject(D.data,D);const de=this.ctx;de.save();const ue=(0,k.getCurrentTransform)(de);de.transform(C,R,Q,Y,0,0);const m=this._createMaskCanvas(D);de.setTransform(1,0,0,1,0,0);for(let S=0,F=J.length;S<F;S+=2){const L=j.Util.transform(ue,[C,R,Q,Y,J[S],J[S+1]]),[K,ie]=j.Util.applyTransform([0,0],L);de.drawImage(m.canvas,K,ie)}de.restore(),this.compose()}paintImageMaskXObjectGroup(D){if(!this.contentVisible)return;const C=this.ctx,R=this.current.fillColor,Q=this.current.patternFill;for(const Y of D){const{data:J,width:de,height:ue,transform:m}=Y,S=this.cachedCanvases.getCanvas("maskCanvas",de,ue),F=S.context;F.save(),f(F,this.getObject(J,Y)),F.globalCompositeOperation="source-in",F.fillStyle=Q?R.getPattern(F,this,(0,k.getCurrentTransformInverse)(C),fe.PathType.FILL):R,F.fillRect(0,0,de,ue),F.restore(),C.save(),C.transform(...m),C.scale(1,-1),y(C,S.canvas,0,0,de,ue,0,-1,1,1),C.restore()}this.compose()}paintImageXObject(D){if(!this.contentVisible)return;const C=this.getObject(D);C?this.paintInlineImageXObject(C):(0,j.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(D,C,R,Q){if(!this.contentVisible)return;const Y=this.getObject(D);if(!Y)return void(0,j.warn)("Dependent image isn't ready yet");const J=Y.width,de=Y.height,ue=[];for(let m=0,S=Q.length;m<S;m+=2)ue.push({transform:[C,0,0,R,Q[m],Q[m+1]],x:0,y:0,w:J,h:de});this.paintInlineImageXObjectGroup(Y,ue)}paintInlineImageXObject(D){if(!this.contentVisible)return;const C=D.width,R=D.height,Q=this.ctx;let Y;if(this.save(),Q.scale(1/C,-1/R),"function"==typeof HTMLElement&&D instanceof HTMLElement||!D.data)Y=D;else{const m=this.cachedCanvases.getCanvas("inlineImage",C,R);v(m.context,D,this.current.transferMaps),Y=m.canvas}const J=this._scaleImage(Y,(0,k.getCurrentTransformInverse)(Q));Q.imageSmoothingEnabled=Se((0,k.getCurrentTransform)(Q),D.interpolate);const[de,ue]=y(Q,J.img,0,0,J.paintWidth,J.paintHeight,0,-R,C,R);if(this.imageLayer){const[m,S]=j.Util.applyTransform([0,-R],(0,k.getCurrentTransform)(this.ctx));this.imageLayer.appendImage({imgData:D,left:m,top:S,width:de,height:ue})}this.compose(),this.restore()}paintInlineImageXObjectGroup(D,C){if(!this.contentVisible)return;const R=this.ctx,Q=D.width,Y=D.height,J=this.cachedCanvases.getCanvas("inlineImage",Q,Y);v(J.context,D,this.current.transferMaps);for(const ue of C){if(R.save(),R.transform(...ue.transform),R.scale(1,-1),y(R,J.canvas,ue.x,ue.y,ue.w,ue.h,0,-1,1,1),this.imageLayer){const[m,S]=j.Util.applyTransform([ue.x,ue.y],(0,k.getCurrentTransform)(this.ctx));this.imageLayer.appendImage({imgData:D,left:m,top:S,width:Q,height:Y})}R.restore()}this.compose()}paintSolidColorImageMask(){!this.contentVisible||(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(D){}markPointProps(D,C){}beginMarkedContent(D){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(D,C){this.markedContentStack.push("OC"===D?{visible:this.optionalContentConfig.isVisible(C)}:{visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(D){const C=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(D);const R=this.ctx;this.pendingClip&&(C||(this.pendingClip===se?R.clip("evenodd"):R.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),R.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const D=(0,k.getCurrentTransform)(this.ctx);if(0===D[1]&&0===D[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(D[0]),Math.abs(D[3]));else{const C=Math.abs(D[0]*D[3]-D[2]*D[1]),R=Math.hypot(D[0],D[2]),Q=Math.hypot(D[1],D[3]);this._cachedGetSinglePixelWidth=Math.max(R,Q)/C}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(!this._cachedScaleForStroking){const{lineWidth:D}=this.current,C=(0,k.getCurrentTransform)(this.ctx);let R,Q;if(0===C[1]&&0===C[2]){const Y=Math.abs(C[0]),J=Math.abs(C[3]);if(0===D)R=1/Y,Q=1/J;else{const de=Y*D,ue=J*D;R=de<1?1/de:1,Q=ue<1?1/ue:1}}else{const Y=Math.abs(C[0]*C[3]-C[2]*C[1]),J=Math.hypot(C[0],C[1]),de=Math.hypot(C[2],C[3]);if(0===D)R=de/Y,Q=J/Y;else{const ue=D*Y;R=de>ue?de/ue:1,Q=J>ue?J/ue:1}}this._cachedScaleForStroking=[R,Q]}return this._cachedScaleForStroking}rescaleAndStroke(D){const{ctx:C}=this,{lineWidth:R}=this.current,[Q,Y]=this.getScaleForStroking();if(C.lineWidth=R||1,1===Q&&1===Y)return void C.stroke();let J,de,ue;D&&(J=(0,k.getCurrentTransform)(C),de=C.getLineDash().slice(),ue=C.lineDashOffset),C.scale(Q,Y);const m=Math.max(Q,Y);C.setLineDash(C.getLineDash().map(S=>S/m)),C.lineDashOffset/=m,C.stroke(),D&&(C.setTransform(...J),C.setLineDash(de),C.lineDashOffset=ue)}isContentVisible(){for(let D=this.markedContentStack.length-1;D>=0;D--)if(!this.markedContentStack[D].visible)return!1;return!0}};let ee=xe;De=new WeakSet,SD=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();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)},I.CanvasGraphics=ee;for(const te in j.OPS)void 0!==ee.prototype[te]&&(ee.prototype[j.OPS[te]]=ee.prototype[te])},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.TilingPattern=I.PathType=void 0,I.getShadingPattern=function E(y){switch(y[0]){case"RadialAxial":return new P(y);case"Mesh":return new G(y);case"Dummy":return new B}throw new Error(`Unknown IR type: ${y[0]}`)};var k=_e(1),j=_e(8),fe=_e(3);const ce={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function pe(y,w){if(!w||fe.isNodeJS)return;const x=w[2]-w[0],v=w[3]-w[1],f=new Path2D;f.rect(w[0],w[1],x,v),y.clip(f)}I.PathType=ce;class ne{constructor(){this.constructor===ne&&(0,k.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,k.unreachable)("Abstract method `getPattern` called.")}}class P extends ne{constructor(w){super(),this._type=w[1],this._bbox=w[2],this._colorStops=w[3],this._p0=w[4],this._p1=w[5],this._r0=w[6],this._r1=w[7],this.matrix=null}_createGradient(w){let x;"axial"===this._type?x=w.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(x=w.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const v of this._colorStops)x.addColorStop(v[0],v[1]);return x}getPattern(w,x,v,f){let g;if(f===ce.STROKE||f===ce.FILL){const T=x.current.getClippedPathBoundingBox(f,(0,j.getCurrentTransform)(w))||[0,0,0,0],N=Math.ceil(T[2]-T[0])||1,H=Math.ceil(T[3]-T[1])||1,M=x.cachedCanvases.getCanvas("pattern",N,H,!0),W=M.context;W.clearRect(0,0,W.canvas.width,W.canvas.height),W.beginPath(),W.rect(0,0,W.canvas.width,W.canvas.height),W.translate(-T[0],-T[1]),v=k.Util.transform(v,[1,0,0,1,T[0],T[1]]),W.transform(...x.baseTransform),this.matrix&&W.transform(...this.matrix),pe(W,this._bbox),W.fillStyle=this._createGradient(W),W.fill(),g=w.createPattern(M.canvas,"no-repeat");const ye=new DOMMatrix(v);try{g.setTransform(ye)}catch(Se){(0,k.warn)(`RadialAxialShadingPattern.getPattern: "${null==Se?void 0:Se.message}".`)}}else pe(w,this._bbox),g=this._createGradient(w);return g}}function V(y,w,x,v,f,g,T,N){const H=w.coords,M=w.colors,W=y.data,ye=4*y.width;let Se;H[x+1]>H[v+1]&&(Se=x,x=v,v=Se,Se=g,g=T,T=Se),H[v+1]>H[f+1]&&(Se=v,v=f,f=Se,Se=T,T=N,N=Se),H[x+1]>H[v+1]&&(Se=x,x=v,v=Se,Se=g,g=T,T=Se);const ve=(H[x]+w.offsetX)*w.scaleX,Ie=(H[x+1]+w.offsetY)*w.scaleY,ge=(H[v]+w.offsetX)*w.scaleX,se=(H[v+1]+w.offsetY)*w.scaleY,ee=(H[f]+w.offsetX)*w.scaleX,De=(H[f+1]+w.offsetY)*w.scaleY;if(Ie>=De)return;const Ae=M[g],xe=M[g+1],te=M[g+2],D=M[T],C=M[T+1],R=M[T+2],Q=M[N],Y=M[N+1],J=M[N+2],de=Math.round(Ie),ue=Math.round(De);let m,S,F,L,K,ie,he,ke;for(let me=de;me<=ue;me++){if(me<se){let X;X=me<Ie?0:(Ie-me)/(Ie-se),m=ve-(ve-ge)*X,S=Ae-(Ae-D)*X,F=xe-(xe-C)*X,L=te-(te-R)*X}else{let X;X=me>De?1:se===De?0:(se-me)/(se-De),m=ge-(ge-ee)*X,S=D-(D-Q)*X,F=C-(C-Y)*X,L=R-(R-J)*X}let we;we=me<Ie?0:me>De?1:(Ie-me)/(Ie-De),K=ve-(ve-ee)*we,ie=Ae-(Ae-Q)*we,he=xe-(xe-Y)*we,ke=te-(te-J)*we;const Ee=Math.round(Math.min(m,K)),Ne=Math.round(Math.max(m,K));let Ve=ye*me+4*Ee;for(let X=Ee;X<=Ne;X++)we=(m-X)/(m-K),we<0?we=0:we>1&&(we=1),W[Ve++]=S-(S-ie)*we|0,W[Ve++]=F-(F-he)*we|0,W[Ve++]=L-(L-ke)*we|0,W[Ve++]=255}}function O(y,w,x){const v=w.coords,f=w.colors;let g,T;switch(w.type){case"lattice":const N=w.verticesPerRow,H=Math.floor(v.length/N)-1,M=N-1;for(g=0;g<H;g++){let W=g*N;for(let ye=0;ye<M;ye++,W++)V(y,x,v[W],v[W+1],v[W+N],f[W],f[W+1],f[W+N]),V(y,x,v[W+N+1],v[W+1],v[W+N],f[W+N+1],f[W+1],f[W+N])}break;case"triangles":for(g=0,T=v.length;g<T;g+=3)V(y,x,v[g],v[g+1],v[g+2],f[g],f[g+1],f[g+2]);break;default:throw new Error("illegal figure")}}class G extends ne{constructor(w){super(),this._coords=w[2],this._colors=w[3],this._figures=w[4],this._bounds=w[5],this._bbox=w[7],this._background=w[8],this.matrix=null}_createMeshCanvas(w,x,v){const N=Math.floor(this._bounds[0]),H=Math.floor(this._bounds[1]),M=Math.ceil(this._bounds[2])-N,W=Math.ceil(this._bounds[3])-H,ye=Math.min(Math.ceil(Math.abs(M*w[0]*1.1)),3e3),Se=Math.min(Math.ceil(Math.abs(W*w[1]*1.1)),3e3),ve=M/ye,Ie=W/Se,ge={coords:this._coords,colors:this._colors,offsetX:-N,offsetY:-H,scaleX:1/ve,scaleY:1/Ie},De=v.getCanvas("mesh",ye+4,Se+4,!1),Ae=De.context,xe=Ae.createImageData(ye,Se);if(x){const D=xe.data;for(let C=0,R=D.length;C<R;C+=4)D[C]=x[0],D[C+1]=x[1],D[C+2]=x[2],D[C+3]=255}for(const D of this._figures)O(xe,D,ge);return Ae.putImageData(xe,2,2),{canvas:De.canvas,offsetX:N-2*ve,offsetY:H-2*Ie,scaleX:ve,scaleY:Ie}}getPattern(w,x,v,f){let g;if(pe(w,this._bbox),f===ce.SHADING)g=k.Util.singularValueDecompose2dScale((0,j.getCurrentTransform)(w));else if(g=k.Util.singularValueDecompose2dScale(x.baseTransform),this.matrix){const N=k.Util.singularValueDecompose2dScale(this.matrix);g=[g[0]*N[0],g[1]*N[1]]}const T=this._createMeshCanvas(g,f===ce.SHADING?null:this._background,x.cachedCanvases);return f!==ce.SHADING&&(w.setTransform(...x.baseTransform),this.matrix&&w.transform(...this.matrix)),w.translate(T.offsetX,T.offsetY),w.scale(T.scaleX,T.scaleY),w.createPattern(T.canvas,"no-repeat")}}class B extends ne{getPattern(){return"hotpink"}}class h{static get MAX_PATTERN_SIZE(){return(0,k.shadow)(this,"MAX_PATTERN_SIZE",3e3)}constructor(w,x,v,f,g){this.operatorList=w[2],this.matrix=w[3]||[1,0,0,1,0,0],this.bbox=w[4],this.xstep=w[5],this.ystep=w[6],this.paintType=w[7],this.tilingType=w[8],this.color=x,this.ctx=v,this.canvasGraphicsFactory=f,this.baseTransform=g}createPatternCanvas(w){const x=this.operatorList,v=this.bbox,f=this.xstep,g=this.ystep,T=this.paintType,H=this.color,M=this.canvasGraphicsFactory;(0,k.info)("TilingType: "+this.tilingType);const W=v[0],ye=v[1],Se=v[2],ve=v[3],Ie=k.Util.singularValueDecompose2dScale(this.matrix),ge=k.Util.singularValueDecompose2dScale(this.baseTransform),se=[Ie[0]*ge[0],Ie[1]*ge[1]],ee=this.getSizeAndScale(f,this.ctx.canvas.width,se[0]),De=this.getSizeAndScale(g,this.ctx.canvas.height,se[1]),Ae=w.cachedCanvases.getCanvas("pattern",ee.size,De.size,!0),xe=Ae.context,te=M.createCanvasGraphics(xe);te.groupLevel=w.groupLevel,this.setFillAndStrokeStyleToContext(te,T,H);let D=W,C=ye,R=Se,Q=ve;return W<0&&(D=0,R+=Math.abs(W)),ye<0&&(C=0,Q+=Math.abs(ye)),xe.translate(-ee.scale*D,-De.scale*C),te.transform(ee.scale,0,0,De.scale,0,0),xe.save(),this.clipBbox(te,D,C,R,Q),te.baseTransform=(0,j.getCurrentTransform)(te.ctx),te.executeOperatorList(x),te.endDrawing(),{canvas:Ae.canvas,scaleX:ee.scale,scaleY:De.scale,offsetX:D,offsetY:C}}getSizeAndScale(w,x,v){w=Math.abs(w);const f=Math.max(h.MAX_PATTERN_SIZE,x);let g=Math.ceil(w*v);return g>=f?g=f:v=g/w,{scale:v,size:g}}clipBbox(w,x,v,f,g){w.ctx.rect(x,v,f-x,g-v),w.current.updateRectMinMax((0,j.getCurrentTransform)(w.ctx),[x,v,f,g]),w.clip(),w.endPath()}setFillAndStrokeStyleToContext(w,x,v){const f=w.ctx,g=w.current;switch(x){case 1:const T=this.ctx;f.fillStyle=T.fillStyle,f.strokeStyle=T.strokeStyle,g.fillColor=T.fillStyle,g.strokeColor=T.strokeStyle;break;case 2:const N=k.Util.makeHexColor(v[0],v[1],v[2]);f.fillStyle=N,f.strokeStyle=N,g.fillColor=N,g.strokeColor=N;break;default:throw new k.FormatError(`Unsupported paint type: ${x}`)}}getPattern(w,x,v,f){let g=v;f!==ce.SHADING&&(g=k.Util.transform(g,x.baseTransform),this.matrix&&(g=k.Util.transform(g,this.matrix)));const T=this.createPatternCanvas(x);let N=new DOMMatrix(g);N=N.translate(T.offsetX,T.offsetY),N=N.scale(1/T.scaleX,1/T.scaleY);const H=w.createPattern(T.canvas,"repeat");try{H.setTransform(N)}catch(M){(0,k.warn)(`TilingPattern.getPattern: "${null==M?void 0:M.message}".`)}return H}}I.TilingPattern=h},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.applyMaskImageData=function j({src:fe,srcPos:ce=0,dest:pe,destPos:ne=0,width:P,height:V,inverseDecode:O=!1}){const G=k.FeatureTest.isLittleEndian?4278190080:255,[B,E]=O?[0,G]:[G,0],d=P>>3,h=7&P,y=fe.length;pe=new Uint32Array(pe.buffer);for(let w=0;w<V;w++){for(const v=ce+d;ce<v;ce++){const f=ce<y?fe[ce]:255;pe[ne++]=128&f?E:B,pe[ne++]=64&f?E:B,pe[ne++]=32&f?E:B,pe[ne++]=16&f?E:B,pe[ne++]=8&f?E:B,pe[ne++]=4&f?E:B,pe[ne++]=2&f?E:B,pe[ne++]=1&f?E:B}if(0===h)continue;const x=ce<y?fe[ce++]:255;for(let v=0;v<h;v++)pe[ne++]=x&1<<7-v?E:B}return{srcPos:ce,destPos:ne}};var k=_e(1)},(Re,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.GlobalWorkerOptions=void 0;const _e=Object.create(null);I.GlobalWorkerOptions=_e,_e.workerPort=void 0===_e.workerPort?null:_e.workerPort,_e.workerSrc=void 0===_e.workerSrc?"":_e.workerSrc},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.MessageHandler=void 0;var k=_e(1);function ce(ne){switch(ne instanceof Error||"object"==typeof ne&&null!==ne||(0,k.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),ne.name){case"AbortException":return new k.AbortException(ne.message);case"MissingPDFException":return new k.MissingPDFException(ne.message);case"PasswordException":return new k.PasswordException(ne.message,ne.code);case"UnexpectedResponseException":return new k.UnexpectedResponseException(ne.message,ne.status);case"UnknownErrorException":return new k.UnknownErrorException(ne.message,ne.details);default:return new k.UnknownErrorException(ne.message,ne.toString())}}I.MessageHandler=class pe{constructor(P,V,O){this.sourceName=P,this.targetName=V,this.comObj=O,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=G=>{const B=G.data;if(B.targetName!==this.sourceName)return;if(B.stream)return void this._processStreamMessage(B);if(B.callback){const d=B.callbackId,h=this.callbackCapabilities[d];if(!h)throw new Error(`Cannot resolve callback ${d}`);if(delete this.callbackCapabilities[d],1===B.callback)h.resolve(B.data);else{if(2!==B.callback)throw new Error("Unexpected callback case");h.reject(ce(B.reason))}return}const E=this.actionHandler[B.action];if(!E)throw new Error(`Unknown action from worker: ${B.action}`);if(B.callbackId){const d=this.sourceName,h=B.sourceName;new Promise(function(y){y(E(B.data))}).then(function(y){O.postMessage({sourceName:d,targetName:h,callback:1,callbackId:B.callbackId,data:y})},function(y){O.postMessage({sourceName:d,targetName:h,callback:2,callbackId:B.callbackId,reason:ce(y)})})}else B.streamId?this._createStreamSink(B):E(B.data)},O.addEventListener("message",this._onComObjOnMessage)}on(P,V){const O=this.actionHandler;if(O[P])throw new Error(`There is already an actionName called "${P}"`);O[P]=V}send(P,V,O){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,data:V},O)}sendWithPromise(P,V,O){const G=this.callbackId++,B=(0,k.createPromiseCapability)();this.callbackCapabilities[G]=B;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,callbackId:G,data:V},O)}catch(E){B.reject(E)}return B.promise}sendWithStream(P,V,O,G){const B=this.streamId++,E=this.sourceName,d=this.targetName,h=this.comObj;return new ReadableStream({start:y=>{const w=(0,k.createPromiseCapability)();return this.streamControllers[B]={controller:y,startCall:w,pullCall:null,cancelCall:null,isClosed:!1},h.postMessage({sourceName:E,targetName:d,action:P,streamId:B,data:V,desiredSize:y.desiredSize},G),w.promise},pull:y=>{const w=(0,k.createPromiseCapability)();return this.streamControllers[B].pullCall=w,h.postMessage({sourceName:E,targetName:d,stream:6,streamId:B,desiredSize:y.desiredSize}),w.promise},cancel:y=>{(0,k.assert)(y instanceof Error,"cancel must have a valid reason");const w=(0,k.createPromiseCapability)();return this.streamControllers[B].cancelCall=w,this.streamControllers[B].isClosed=!0,h.postMessage({sourceName:E,targetName:d,stream:1,streamId:B,reason:ce(y)}),w.promise}},O)}_createStreamSink(P){const V=P.streamId,O=this.sourceName,G=P.sourceName,B=this.comObj,E=this,d=this.actionHandler[P.action],h={enqueue(y,w=1,x){if(this.isCancelled)return;const v=this.desiredSize;this.desiredSize-=w,v>0&&this.desiredSize<=0&&(this.sinkCapability=(0,k.createPromiseCapability)(),this.ready=this.sinkCapability.promise),B.postMessage({sourceName:O,targetName:G,stream:4,streamId:V,chunk:y},x)},close(){this.isCancelled||(this.isCancelled=!0,B.postMessage({sourceName:O,targetName:G,stream:3,streamId:V}),delete E.streamSinks[V])},error(y){(0,k.assert)(y instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,B.postMessage({sourceName:O,targetName:G,stream:5,streamId:V,reason:ce(y)}))},sinkCapability:(0,k.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:P.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[V]=h,new Promise(function(y){y(d(P.data,h))}).then(function(){B.postMessage({sourceName:O,targetName:G,stream:8,streamId:V,success:!0})},function(y){B.postMessage({sourceName:O,targetName:G,stream:8,streamId:V,reason:ce(y)})})}_processStreamMessage(P){const V=P.streamId,O=this.sourceName,G=P.sourceName,B=this.comObj,E=this.streamControllers[V],d=this.streamSinks[V];switch(P.stream){case 8:P.success?E.startCall.resolve():E.startCall.reject(ce(P.reason));break;case 7:P.success?E.pullCall.resolve():E.pullCall.reject(ce(P.reason));break;case 6:if(!d){B.postMessage({sourceName:O,targetName:G,stream:7,streamId:V,success:!0});break}d.desiredSize<=0&&P.desiredSize>0&&d.sinkCapability.resolve(),d.desiredSize=P.desiredSize,new Promise(function(h){h(d.onPull&&d.onPull())}).then(function(){B.postMessage({sourceName:O,targetName:G,stream:7,streamId:V,success:!0})},function(h){B.postMessage({sourceName:O,targetName:G,stream:7,streamId:V,reason:ce(h)})});break;case 4:if((0,k.assert)(E,"enqueue should have stream controller"),E.isClosed)break;E.controller.enqueue(P.chunk);break;case 3:if((0,k.assert)(E,"close should have stream controller"),E.isClosed)break;E.isClosed=!0,E.controller.close(),this._deleteStreamController(E,V);break;case 5:(0,k.assert)(E,"error should have stream controller"),E.controller.error(ce(P.reason)),this._deleteStreamController(E,V);break;case 2:P.success?E.cancelCall.resolve():E.cancelCall.reject(ce(P.reason)),this._deleteStreamController(E,V);break;case 1:if(!d)break;new Promise(function(h){h(d.onCancel&&d.onCancel(ce(P.reason)))}).then(function(){B.postMessage({sourceName:O,targetName:G,stream:2,streamId:V,success:!0})},function(h){B.postMessage({sourceName:O,targetName:G,stream:2,streamId:V,reason:ce(h)})}),d.sinkCapability.reject(ce(P.reason)),d.isCancelled=!0,delete this.streamSinks[V];break;default:throw new Error("Unexpected stream case")}}_deleteStreamController(P,V){var O=this;return _asyncToGenerator(function*(){yield Promise.allSettled([P.startCall&&P.startCall.promise,P.pullCall&&P.pullCall.promise,P.cancelCall&&P.cancelCall.promise]),delete O.streamControllers[V]})()}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(Re,I,_e)=>{var fe,ce;Object.defineProperty(I,"__esModule",{value:!0}),I.Metadata=void 0;var k=_e(1);fe=new WeakMap,ce=new WeakMap,I.Metadata=class j{constructor({parsedData:ne,rawData:P}){Pe(this,fe,void 0),Pe(this,ce,void 0),$e(this,fe,ne),$e(this,ce,P)}getRaw(){return q(this,ce)}get(ne){var P;return null!=(P=q(this,fe).get(ne))?P:null}getAll(){return(0,k.objectFromMap)(q(this,fe))}has(ne){return q(this,fe).has(ne)}}},(Re,I,_e)=>{var pe,ne,P,V,O,G,TD;Object.defineProperty(I,"__esModule",{value:!0}),I.OptionalContentConfig=void 0;var k=_e(1);const j=Symbol("INTERNAL");class fe{constructor(d,h){Pe(this,pe,!0),this.name=d,this.intent=h}get visible(){return q(this,pe)}_setVisible(d,h){d!==j&&(0,k.unreachable)("Internal method `_setVisible` called."),$e(this,pe,h)}}pe=new WeakMap,ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakSet,TD=function(d){const h=d.length;if(h<2)return!0;const y=d[0];for(let w=1;w<h;w++){const x=d[w];let v;if(Array.isArray(x))v=Le(this,G,TD).call(this,x);else{if(!q(this,P).has(x))return(0,k.warn)(`Optional content group not found: ${x}`),!0;v=q(this,P).get(x).visible}switch(y){case"And":if(!v)return!1;break;case"Or":if(v)return!0;break;case"Not":return!v;default:return!0}}return"And"===y},I.OptionalContentConfig=class ce{constructor(d){if(Pe(this,G),Pe(this,ne,!0),Pe(this,P,new Map),Pe(this,V,null),Pe(this,O,null),this.name=null,this.creator=null,null!==d){this.name=d.name,this.creator=d.creator,$e(this,O,d.order);for(const h of d.groups)q(this,P).set(h.id,new fe(h.name,h.intent));if("OFF"===d.baseState)for(const h of q(this,P).values())h._setVisible(j,!1);for(const h of d.on)q(this,P).get(h)._setVisible(j,!0);for(const h of d.off)q(this,P).get(h)._setVisible(j,!1);$e(this,V,new Map);for(const[h,y]of q(this,P))q(this,V).set(h,y.visible)}}isVisible(d){if(0===q(this,P).size)return!0;if(!d)return(0,k.warn)("Optional content group not defined."),!0;if("OCG"===d.type)return q(this,P).has(d.id)?q(this,P).get(d.id).visible:((0,k.warn)(`Optional content group not found: ${d.id}`),!0);if("OCMD"===d.type){if(d.expression)return Le(this,G,TD).call(this,d.expression);if(!d.policy||"AnyOn"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(q(this,P).get(h).visible)return!0}return!1}if("AllOn"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(!q(this,P).get(h).visible)return!1}return!0}if("AnyOff"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(!q(this,P).get(h).visible)return!0}return!1}if("AllOff"===d.policy){for(const h of d.ids){if(!q(this,P).has(h))return(0,k.warn)(`Optional content group not found: ${h}`),!0;if(q(this,P).get(h).visible)return!1}return!0}return(0,k.warn)(`Unknown optional content policy ${d.policy}.`),!0}return(0,k.warn)(`Unknown group type ${d.type}.`),!0}setVisibility(d,h=!0){q(this,P).has(d)?(q(this,P).get(d)._setVisible(j,!!h),$e(this,ne,null)):(0,k.warn)(`Optional content group not found: ${d}`)}get hasInitialVisibility(){if(null!==q(this,ne))return q(this,ne);for(const[d,h]of q(this,P)){const y=q(this,V).get(d);if(h.visible!==y)return $e(this,ne,!1)}return $e(this,ne,!0)}getOrder(){return q(this,P).size?q(this,O)?q(this,O).slice():[...q(this,P).keys()]:null}getGroups(){return q(this,P).size>0?(0,k.objectFromMap)(q(this,P)):null}getGroup(d){return q(this,P).get(d)||null}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFDataTransportStream=void 0;var k=_e(1),j=_e(8);I.PDFDataTransportStream=class fe{constructor(P,V){(0,k.assert)(V,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=P.progressiveDone||!1,this._contentDispositionFilename=P.contentDispositionFilename||null;const O=P.initialData;if((null==O?void 0:O.length)>0){const G=new Uint8Array(O).buffer;this._queuedChunks.push(G)}this._pdfDataRangeTransport=V,this._isStreamingSupported=!P.disableStream,this._isRangeSupported=!P.disableRange,this._contentLength=P.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((G,B)=>{this._onReceiveData({begin:G,chunk:B})}),this._pdfDataRangeTransport.addProgressListener((G,B)=>{this._onProgress({loaded:G,total:B})}),this._pdfDataRangeTransport.addProgressiveReadListener(G=>{this._onReceiveData({chunk:G})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(P){const V=new Uint8Array(P.chunk).buffer;if(void 0===P.begin)this._fullRequestReader?this._fullRequestReader._enqueue(V):this._queuedChunks.push(V);else{const O=this._rangeReaders.some(function(G){return G._begin===P.begin&&(G._enqueue(V),!0)});(0,k.assert)(O,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var P,V;return null!=(V=null==(P=this._fullRequestReader)?void 0:P._loaded)?V:0}_onProgress(P){if(void 0===P.total){const V=this._rangeReaders[0];(null==V?void 0:V.onProgress)&&V.onProgress({loaded:P.loaded})}else{const V=this._fullRequestReader;(null==V?void 0:V.onProgress)&&V.onProgress({loaded:P.loaded,total:P.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(P){const V=this._rangeReaders.indexOf(P);V>=0&&this._rangeReaders.splice(V,1)}getFullReader(){(0,k.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const P=this._queuedChunks;return this._queuedChunks=null,new ce(this,P,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(P,V){if(V<=this._progressiveDataLength)return null;const O=new pe(this,P,V);return this._pdfDataRangeTransport.requestDataRange(P,V),this._rangeReaders.push(O),O}cancelAllRequests(P){this._fullRequestReader&&this._fullRequestReader.cancel(P);for(const V of this._rangeReaders.slice(0))V.cancel(P);this._pdfDataRangeTransport.abort()}};class ce{constructor(P,V,O=!1,G=null){this._stream=P,this._done=O||!1,this._filename=(0,j.isPdfFile)(G)?G:null,this._queuedChunks=V||[],this._loaded=0;for(const B of this._queuedChunks)this._loaded+=B.byteLength;this._requests=[],this._headersReady=Promise.resolve(),P._fullRequestReader=this,this.onProgress=null}_enqueue(P){this._done||(this._requests.length>0?this._requests.shift().resolve({value:P,done:!1}):this._queuedChunks.push(P),this._loaded+=P.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}read(){var P=this;return _asyncToGenerator(function*(){if(P._queuedChunks.length>0)return{value:P._queuedChunks.shift(),done:!1};if(P._done)return{value:void 0,done:!0};const V=(0,k.createPromiseCapability)();return P._requests.push(V),V.promise})()}cancel(P){this._done=!0;for(const V of this._requests)V.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class pe{constructor(P,V,O){this._stream=P,this._begin=V,this._end=O,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(P){if(!this._done){if(0===this._requests.length)this._queuedChunk=P;else{this._requests.shift().resolve({value:P,done:!1});for(const O of this._requests)O.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){var P=this;return _asyncToGenerator(function*(){if(P._queuedChunk){const O=P._queuedChunk;return P._queuedChunk=null,{value:O,done:!1}}if(P._done)return{value:void 0,done:!0};const V=(0,k.createPromiseCapability)();return P._requests.push(V),V.promise})()}cancel(P){this._done=!0;for(const V of this._requests)V.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(Re,I)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.XfaText=void 0;class _e{static textContent(j){const fe=[],ce={items:fe,styles:Object.create(null)};return function pe(ne){var O;if(!ne)return;let P=null;const V=ne.name;if("#text"===V)P=ne.value;else{if(!_e.shouldBuildText(V))return;(null==(O=null==ne?void 0:ne.attributes)?void 0:O.textContent)?P=ne.attributes.textContent:ne.value&&(P=ne.value)}if(null!==P&&fe.push({str:P}),ne.children)for(const G of ne.children)pe(G)}(j),ce}static shouldBuildText(j){return!("textarea"===j||"input"===j||"option"===j||"select"===j)}}I.XfaText=_e},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.NodeStandardFontDataFactory=I.NodeCanvasFactory=I.NodeCMapReaderFactory=void 0;var k=_e(9);const j=function(ne){return new Promise((P,V)=>{__webpack_require__(172).readFile(ne,(G,B)=>{!G&&B?P(new Uint8Array(B)):V(new Error(G))})})};I.NodeCanvasFactory=class fe extends k.BaseCanvasFactory{_createCanvas(P,V){return __webpack_require__(414).createCanvas(P,V)}},I.NodeCMapReaderFactory=class ce extends k.BaseCMapReaderFactory{_fetchData(P,V){return j(P).then(O=>({cMapData:O,compressionType:V}))}},I.NodeStandardFontDataFactory=class pe extends k.BaseStandardFontDataFactory{_fetchData(P){return j(P)}}},(Re,I,_e)=>{var ne,P,V,O,G,B,E,d,h,wD,w,Nj,v,MD,g,Oj;Object.defineProperty(I,"__esModule",{value:!0}),I.AnnotationEditorLayer=void 0;var k=_e(7),j=_e(1),fe=_e(23),ce=_e(24);const N=class{constructor(M){Pe(this,h),Pe(this,w),Pe(this,v),Pe(this,g),Pe(this,ne,void 0),Pe(this,P,!1),Pe(this,V,this.pointerup.bind(this)),Pe(this,O,this.pointerdown.bind(this)),Pe(this,G,new Map),Pe(this,B,!1),Pe(this,E,!1),Pe(this,d,void 0),N._initialized||(N._initialized=!0,fe.FreeTextEditor.initialize(M.l10n),ce.InkEditor.initialize(M.l10n),M.uiManager.registerEditorTypes([fe.FreeTextEditor,ce.InkEditor])),$e(this,d,M.uiManager),this.annotationStorage=M.annotationStorage,this.pageIndex=M.pageIndex,this.div=M.div,$e(this,ne,M.accessibilityManager),q(this,d).addLayer(this)}updateToolbar(M){q(this,d).updateToolbar(M)}updateMode(M=q(this,d).getMode()){Le(this,g,Oj).call(this),M===j.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),q(this,d).unselectAll()}addInkEditorIfNeeded(M){if(M||q(this,d).getMode()===j.AnnotationEditorType.INK){if(!M)for(const ye of q(this,G).values())if(ye.isEmpty())return void ye.setInBackground();Le(this,v,MD).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(M){q(this,d).setEditingState(M)}addCommands(M){q(this,d).addCommands(M)}enable(){this.div.style.pointerEvents="auto";for(const M of q(this,G).values())M.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const M of q(this,G).values())M.disableEditing()}setActiveEditor(M){q(this,d).getActive()!==M&&q(this,d).setActiveEditor(M)}enableClick(){this.div.addEventListener("pointerdown",q(this,O)),this.div.addEventListener("pointerup",q(this,V))}disableClick(){this.div.removeEventListener("pointerdown",q(this,O)),this.div.removeEventListener("pointerup",q(this,V))}attach(M){q(this,G).set(M.id,M)}detach(M){var W;q(this,G).delete(M.id),null==(W=q(this,ne))||W.removePointerInTextLayer(M.contentDiv)}remove(M){q(this,d).removeEditor(M),this.detach(M),this.annotationStorage.remove(M.id),M.div.style.display="none",setTimeout(()=>{M.div.style.display="",M.div.remove(),M.isAttachedToDOM=!1,document.activeElement===document.body&&q(this,d).focusMainContainer()},0),q(this,E)||this.addInkEditorIfNeeded(!1)}add(M){if(Le(this,h,wD).call(this,M),q(this,d).addEditor(M),this.attach(M),!M.isAttachedToDOM){const W=M.render();this.div.append(W),M.isAttachedToDOM=!0}this.moveEditorInDOM(M),M.onceAdded(),this.addToAnnotationStorage(M)}moveEditorInDOM(M){var W;null==(W=q(this,ne))||W.moveElementInDOM(this.div,M.div,M.contentDiv,!0)}addToAnnotationStorage(M){!M.isEmpty()&&!this.annotationStorage.has(M.id)&&this.annotationStorage.setValue(M.id,M)}addOrRebuild(M){M.needsToBeRebuilt()?M.rebuild():this.add(M)}addANewEditor(M){this.addCommands({cmd:()=>{this.addOrRebuild(M)},undo:()=>{M.remove()},mustExec:!0})}addUndoableEditor(M){this.addCommands({cmd:()=>{this.addOrRebuild(M)},undo:()=>{M.remove()},mustExec:!1})}getNextId(){return q(this,d).getId()}deserialize(M){switch(M.annotationType){case j.AnnotationEditorType.FREETEXT:return fe.FreeTextEditor.deserialize(M,this);case j.AnnotationEditorType.INK:return ce.InkEditor.deserialize(M,this)}return null}setSelected(M){q(this,d).setSelected(M)}toggleSelected(M){q(this,d).toggleSelected(M)}isSelected(M){return q(this,d).isSelected(M)}unselect(M){q(this,d).unselect(M)}pointerup(M){if(!(0!==M.button||M.ctrlKey&&k.KeyboardManager.platform.isMac)&&M.target===this.div&&q(this,B)){if($e(this,B,!1),!q(this,P))return void $e(this,P,!0);Le(this,v,MD).call(this,M)}}pointerdown(M){if(0!==M.button||M.ctrlKey&&k.KeyboardManager.platform.isMac||M.target!==this.div)return;$e(this,B,!0);const ye=q(this,d).getActive();$e(this,P,!ye||ye.isEmpty())}drop(M){const W=M.dataTransfer.getData("text/plain"),ye=q(this,d).getEditor(W);if(!ye)return;M.preventDefault(),M.dataTransfer.dropEffect="move",Le(this,h,wD).call(this,ye);const Se=this.div.getBoundingClientRect();ye.translate(M.clientX-Se.x-ye.startX,M.clientY-Se.y-ye.startY),this.moveEditorInDOM(ye),ye.div.focus()}dragover(M){M.preventDefault()}destroy(){var M,W;(null==(M=q(this,d).getActive())?void 0:M.parent)===this&&q(this,d).setActiveEditor(null);for(const ye of q(this,G).values())null==(W=q(this,ne))||W.removePointerInTextLayer(ye.contentDiv),ye.isAttachedToDOM=!1,ye.div.remove(),ye.parent=null;this.div=null,q(this,G).clear(),q(this,d).removeLayer(this)}render(M){this.viewport=M.viewport,(0,k.bindEvents)(this,this.div,["dragover","drop"]),this.setDimensions();for(const W of q(this,d).getEditors(this.pageIndex))this.add(W);this.updateMode()}update(M){this.viewport=M.viewport,this.setDimensions(),this.updateMode()}get scaleFactor(){return this.viewport.scale}get pageDimensions(){const[M,W,ye,Se]=this.viewport.viewBox;return[ye-M,Se-W]}get viewportBaseDimensions(){const{width:M,height:W,rotation:ye}=this.viewport;return ye%180==0?[M,W]:[W,M]}setDimensions(){const{width:M,height:W,rotation:ye}=this.viewport,Se=ye%180!=0,ve=Math.floor(M)+"px",Ie=Math.floor(W)+"px";this.div.style.width=Se?Ie:ve,this.div.style.height=Se?ve:Ie,this.div.setAttribute("data-main-rotation",ye)}};let pe=N;ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakMap,B=new WeakMap,E=new WeakMap,d=new WeakMap,h=new WeakSet,wD=function(M){var W;M.parent!==this&&(this.attach(M),M.pageIndex=this.pageIndex,null==(W=M.parent)||W.detach(M),M.parent=this,M.div&&M.isAttachedToDOM&&(M.div.remove(),this.div.append(M.div)))},w=new WeakSet,Nj=function(M){switch(q(this,d).getMode()){case j.AnnotationEditorType.FREETEXT:return new fe.FreeTextEditor(M);case j.AnnotationEditorType.INK:return new ce.InkEditor(M)}return null},v=new WeakSet,MD=function(M){const W=this.getNextId(),ye=Le(this,w,Nj).call(this,{parent:this,id:W,x:M.offsetX,y:M.offsetY});return ye&&this.add(ye),ye},g=new WeakSet,Oj=function(){$e(this,E,!0);for(const M of q(this,G).values())M.isEmpty()&&M.remove();$e(this,E,!1)},cn(pe,"_initialized",!1),I.AnnotationEditorLayer=pe},(Re,I,_e)=>{var pe,ne,P,V,O,G,B,E,kj,h,Lj,w,Vj,v,ID;Object.defineProperty(I,"__esModule",{value:!0}),I.FreeTextEditor=void 0;var k=_e(1),j=_e(7),fe=_e(6);const g=class extends fe.AnnotationEditor{constructor(N){super(jp(Vp({},N),{name:"freeTextEditor"})),Pe(this,E),Pe(this,h),Pe(this,w),Pe(this,v),Pe(this,pe,this.editorDivBlur.bind(this)),Pe(this,ne,this.editorDivFocus.bind(this)),Pe(this,P,this.editorDivKeydown.bind(this)),Pe(this,V,void 0),Pe(this,O,""),Pe(this,G,!1),Pe(this,B,void 0),$e(this,V,N.color||g._defaultColor||fe.AnnotationEditor._defaultLineColor),$e(this,B,N.fontSize||g._defaultFontSize)}static initialize(N){this._l10nPromise=new Map(["free_text_default_content","editor_free_text_aria_label"].map(M=>[M,N.get(M)]));const H=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(H.getPropertyValue("--freetext-padding"))}static updateDefaultParams(N,H){switch(N){case k.AnnotationEditorParamsType.FREETEXT_SIZE:g._defaultFontSize=H;break;case k.AnnotationEditorParamsType.FREETEXT_COLOR:g._defaultColor=H}}updateParams(N,H){switch(N){case k.AnnotationEditorParamsType.FREETEXT_SIZE:Le(this,E,kj).call(this,H);break;case k.AnnotationEditorParamsType.FREETEXT_COLOR:Le(this,h,Lj).call(this,H)}}static get defaultPropertiesToUpdate(){return[[k.AnnotationEditorParamsType.FREETEXT_SIZE,g._defaultFontSize],[k.AnnotationEditorParamsType.FREETEXT_COLOR,g._defaultColor||fe.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[k.AnnotationEditorParamsType.FREETEXT_SIZE,q(this,B)],[k.AnnotationEditorParamsType.FREETEXT_COLOR,q(this,V)]]}getInitialTranslation(){return[-g._internalPadding*this.parent.scaleFactor,-(g._internalPadding+q(this,B))*this.parent.scaleFactor]}rebuild(){super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(k.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.enableEditing(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.editorDiv.addEventListener("keydown",q(this,P)),this.editorDiv.addEventListener("focus",q(this,ne)),this.editorDiv.addEventListener("blur",q(this,pe)))}disableEditMode(){!this.isInEditMode()||(this.parent.setEditingState(!0),super.disableEditMode(),this.disableEditing(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",q(this,P)),this.editorDiv.removeEventListener("focus",q(this,ne)),this.editorDiv.removeEventListener("blur",q(this,pe)),this.div.focus(),this.isEditing=!1)}focusin(N){super.focusin(N),N.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),super.remove()}commit(){super.commit(),q(this,G)||($e(this,G,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),$e(this,O,Le(this,w,Vj).call(this).trimEnd()),Le(this,v,ID).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(N){this.enableEditMode(),this.editorDiv.focus()}keydown(N){N.target===this.div&&"Enter"===N.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(N){g._keyboardManager.exec(this,N)}editorDivFocus(N){this.isEditing=!0}editorDivBlur(N){this.isEditing=!1}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 N,H;this.width&&(N=this.x,H=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",`${this.id}-editor`),this.enableEditing(),g._l10nPromise.get("editor_free_text_aria_label").then(W=>{var ye;return null==(ye=this.editorDiv)?void 0:ye.setAttribute("aria-label",W)}),g._l10nPromise.get("free_text_default_content").then(W=>{var ye;return null==(ye=this.editorDiv)?void 0:ye.setAttribute("default-content",W)}),this.editorDiv.contentEditable=!0;const{style:M}=this.editorDiv;if(M.fontSize=`calc(${q(this,B)}px * var(--scale-factor))`,M.color=q(this,V),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,j.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[W,ye]=this.parent.viewportBaseDimensions;this.setAt(N*W,H*ye,this.width*W,this.height*ye);for(const Se of q(this,O).split("\n")){const ve=document.createElement("div");ve.append(Se?document.createTextNode(Se):document.createElement("br")),this.editorDiv.append(ve)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(N,H){const M=super.deserialize(N,H);return $e(M,B,N.fontSize),$e(M,V,k.Util.makeHexColor(...N.color)),$e(M,O,N.value),M}serialize(){if(this.isEmpty())return null;const N=g._internalPadding*this.parent.scaleFactor,H=this.getRect(N,N),M=fe.AnnotationEditor._colorManager.convert(getComputedStyle(this.editorDiv).color);return{annotationType:k.AnnotationEditorType.FREETEXT,color:M,fontSize:q(this,B),value:q(this,O),pageIndex:this.parent.pageIndex,rect:H,rotation:this.rotation}}};let ce=g;pe=new WeakMap,ne=new WeakMap,P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakMap,B=new WeakMap,E=new WeakSet,kj=function(N){const H=W=>{this.editorDiv.style.fontSize=`calc(${W}px * var(--scale-factor))`,this.translate(0,-(W-q(this,B))*this.parent.scaleFactor),$e(this,B,W),Le(this,v,ID).call(this)},M=q(this,B);this.parent.addCommands({cmd:()=>{H(N)},undo:()=>{H(M)},mustExec:!0,type:k.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},h=new WeakSet,Lj=function(N){const H=q(this,V);this.parent.addCommands({cmd:()=>{$e(this,V,N),this.editorDiv.style.color=N},undo:()=>{$e(this,V,H),this.editorDiv.style.color=H},mustExec:!0,type:k.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},w=new WeakSet,Vj=function(){const N=this.editorDiv.getElementsByTagName("div");if(0===N.length)return this.editorDiv.innerText;const H=[];for(let M=0,W=N.length;M<W;M++){const Se=N[M].firstChild;H.push("#text"===(null==Se?void 0:Se.nodeName)?Se.data:"")}return H.join("\n")},v=new WeakSet,ID=function(){const[N,H]=this.parent.viewportBaseDimensions,M=this.div.getBoundingClientRect();this.width=M.width/N,this.height=M.height/H},cn(ce,"_freeTextDefaultContent",""),cn(ce,"_l10nPromise"),cn(ce,"_internalPadding",0),cn(ce,"_defaultColor",null),cn(ce,"_defaultFontSize",10),cn(ce,"_keyboardManager",new j.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],g.prototype.commitOrRemove]])),cn(ce,"_type","freetext"),I.FreeTextEditor=ce},(Re,I,_e)=>{var P,V,O,G,B,E,d,h,y,w,x,v,f,g,T,jj,H,Bj,W,Uj,Se,Hj,Ie,RD,se,$j,De,Gj,xe,Wj,D,pr,R,FD,Y,$p,de,Gp,m,Ua,F,PD,K,Wp,he,xD,me,qj,Ee,zj,Ve,Kj,je,ND,Ke,qp,yt,Ha,Lt,OD;Object.defineProperty(I,"__esModule",{value:!0}),I.InkEditor=void 0,Object.defineProperty(I,"fitCurve",{enumerable:!0,get:function(){return fe.fitCurve}});var k=_e(1),j=_e(6),fe=_e(25),ce=_e(7);const Ct=class extends j.AnnotationEditor{constructor(Te){super(jp(Vp({},Te),{name:"inkEditor"})),Pe(this,T),Pe(this,H),Pe(this,W),Pe(this,Se),Pe(this,Ie),Pe(this,se),Pe(this,De),Pe(this,xe),Pe(this,D),Pe(this,R),Pe(this,Y),Pe(this,de),Pe(this,m),Pe(this,F),Pe(this,K),Pe(this,me),Pe(this,Ee),Pe(this,Ve),Pe(this,je),Pe(this,Ke),Pe(this,yt),Pe(this,Lt),Pe(this,P,0),Pe(this,V,0),Pe(this,O,0),Pe(this,G,this.canvasPointermove.bind(this)),Pe(this,B,this.canvasPointerleave.bind(this)),Pe(this,E,this.canvasPointerup.bind(this)),Pe(this,d,this.canvasPointerdown.bind(this)),Pe(this,h,!1),Pe(this,y,!1),Pe(this,w,null),Pe(this,x,null),Pe(this,v,0),Pe(this,f,0),Pe(this,g,null),this.color=Te.color||null,this.thickness=Te.thickness||null,this.opacity=Te.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(Te){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink_aria_label"].map(Fe=>[Fe,Te.get(Fe)]))}static updateDefaultParams(Te,Fe){switch(Te){case k.AnnotationEditorParamsType.INK_THICKNESS:Ct._defaultThickness=Fe;break;case k.AnnotationEditorParamsType.INK_COLOR:Ct._defaultColor=Fe;break;case k.AnnotationEditorParamsType.INK_OPACITY:Ct._defaultOpacity=Fe/100}}updateParams(Te,Fe){switch(Te){case k.AnnotationEditorParamsType.INK_THICKNESS:Le(this,T,jj).call(this,Fe);break;case k.AnnotationEditorParamsType.INK_COLOR:Le(this,H,Bj).call(this,Fe);break;case k.AnnotationEditorParamsType.INK_OPACITY:Le(this,W,Uj).call(this,Fe)}}static get defaultPropertiesToUpdate(){return[[k.AnnotationEditorParamsType.INK_THICKNESS,Ct._defaultThickness],[k.AnnotationEditorParamsType.INK_COLOR,Ct._defaultColor||j.AnnotationEditor._defaultLineColor],[k.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*Ct._defaultOpacity)]]}get propertiesToUpdate(){var Te;return[[k.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Ct._defaultThickness],[k.AnnotationEditorParamsType.INK_COLOR,this.color||Ct._defaultColor||j.AnnotationEditor._defaultLineColor],[k.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!=(Te=this.opacity)?Te:Ct._defaultOpacity))]]}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(Le(this,Y,$p).call(this),Le(this,de,Gp).call(this)),this.isAttachedToDOM||(this.parent.add(this),Le(this,m,Ua).call(this)),Le(this,yt,Ha).call(this))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,q(this,x).disconnect(),$e(this,x,null),super.remove())}enableEditMode(){q(this,h)||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",q(this,d)),this.canvas.addEventListener("pointerup",q(this,E)))}disableEditMode(){!this.isInEditMode()||null===this.canvas||(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",q(this,d)),this.canvas.removeEventListener("pointerup",q(this,E)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){q(this,h)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),$e(this,h,!0),this.div.classList.add("disabled"),Le(this,yt,Ha).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus())}focusin(Te){super.focusin(Te),this.enableEditMode()}canvasPointerdown(Te){0!==Te.button||!this.isInEditMode()||q(this,h)||(this.setInForeground(),"mouse"!==Te.type&&this.div.focus(),Te.stopPropagation(),this.canvas.addEventListener("pointerleave",q(this,B)),this.canvas.addEventListener("pointermove",q(this,G)),Le(this,se,$j).call(this,Te.offsetX,Te.offsetY))}canvasPointermove(Te){Te.stopPropagation(),Le(this,De,Gj).call(this,Te.offsetX,Te.offsetY)}canvasPointerup(Te){0===Te.button&&this.isInEditMode()&&0!==this.currentPath.length&&(Te.stopPropagation(),Le(this,R,FD).call(this,Te),this.setInBackground())}canvasPointerleave(Te){Le(this,R,FD).call(this,Te),this.setInBackground()}render(){if(this.div)return this.div;let Te,Fe;this.width&&(Te=this.x,Fe=this.y),super.render(),Ct._l10nPromise.get("editor_ink_aria_label").then(Oe=>{var Ge;return null==(Ge=this.div)?void 0:Ge.setAttribute("aria-label",Oe)});const[Je,be,oe,le]=Le(this,Se,Hj).call(this);if(this.setAt(Je,be,0,0),this.setDims(oe,le),Le(this,Y,$p).call(this),this.width){const[Oe,Ge]=this.parent.viewportBaseDimensions;this.setAt(Te*Oe,Fe*Ge,this.width*Oe,this.height*Ge),$e(this,y,!0),Le(this,m,Ua).call(this),this.setDims(this.width*Oe,this.height*Ge),Le(this,D,pr).call(this),Le(this,Lt,OD).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return Le(this,de,Gp).call(this),this.div}setDimensions(Te,Fe){const Je=Math.round(Te),be=Math.round(Fe);if(q(this,v)===Je&&q(this,f)===be)return;$e(this,v,Je),$e(this,f,be),this.canvas.style.visibility="hidden",q(this,P)&&Math.abs(q(this,P)-Te/Fe)>.01&&(Fe=Math.ceil(Te/q(this,P)),this.setDims(Te,Fe));const[oe,le]=this.parent.viewportBaseDimensions;this.width=Te/oe,this.height=Fe/le,q(this,h)&&Le(this,F,PD).call(this,Te,Fe),Le(this,m,Ua).call(this),Le(this,D,pr).call(this),this.canvas.style.visibility="visible"}static deserialize(Te,Fe){var Wt,Rt;const Je=super.deserialize(Te,Fe);Je.thickness=Te.thickness,Je.color=k.Util.makeHexColor(...Te.color),Je.opacity=Te.opacity;const[be,oe]=Fe.pageDimensions,le=Je.width*be,Oe=Je.height*oe,Ge=Fe.scaleFactor,it=Te.thickness/2;$e(Je,P,le/Oe),$e(Je,h,!0),$e(Je,v,Math.round(le)),$e(Je,f,Math.round(Oe));for(const{bezier:Et}of Te.paths){const Ft=[];Je.paths.push(Ft);let At=Ge*(Et[0]-it),sn=Ge*(Oe-Et[1]-it);for(let We=2,jt=Et.length;We<jt;We+=6){const qt=Ge*(Et[We+4]-it),ri=Ge*(Oe-Et[We+5]-it);Ft.push([[At,sn],[Ge*(Et[We]-it),Ge*(Oe-Et[We+1]-it)],[Ge*(Et[We+2]-it),Ge*(Oe-Et[We+3]-it)],[qt,ri]]),At=qt,sn=ri}const vn=Le(this,he,xD).call(this,Ft);Je.bezierPath2D.push(vn)}const tt=Le(Wt=Je,je,ND).call(Wt);return $e(Je,O,Math.max(16,tt[2]-tt[0])),$e(Je,V,Math.max(16,tt[3]-tt[1])),Le(Rt=Je,F,PD).call(Rt,le,Oe),Je}serialize(){if(this.isEmpty())return null;const Te=this.getRect(0,0),Fe=this.rotation%180==0?Te[3]-Te[1]:Te[2]-Te[0],Je=j.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:k.AnnotationEditorType.INK,color:Je,thickness:this.thickness,opacity:this.opacity,paths:Le(this,me,qj).call(this,this.scaleFactor/this.parent.scaleFactor,this.translationX,this.translationY,Fe),pageIndex:this.parent.pageIndex,rect:Te,rotation:this.rotation}}};let ne=Ct;P=new WeakMap,V=new WeakMap,O=new WeakMap,G=new WeakMap,B=new WeakMap,E=new WeakMap,d=new WeakMap,h=new WeakMap,y=new WeakMap,w=new WeakMap,x=new WeakMap,v=new WeakMap,f=new WeakMap,g=new WeakMap,T=new WeakSet,jj=function(Te){const Fe=this.thickness;this.parent.addCommands({cmd:()=>{this.thickness=Te,Le(this,yt,Ha).call(this)},undo:()=>{this.thickness=Fe,Le(this,yt,Ha).call(this)},mustExec:!0,type:k.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},H=new WeakSet,Bj=function(Te){const Fe=this.color;this.parent.addCommands({cmd:()=>{this.color=Te,Le(this,D,pr).call(this)},undo:()=>{this.color=Fe,Le(this,D,pr).call(this)},mustExec:!0,type:k.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},W=new WeakSet,Uj=function(Te){Te/=100;const Fe=this.opacity;this.parent.addCommands({cmd:()=>{this.opacity=Te,Le(this,D,pr).call(this)},undo:()=>{this.opacity=Fe,Le(this,D,pr).call(this)},mustExec:!0,type:k.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},Se=new WeakSet,Hj=function(){const{width:Te,height:Fe,rotation:Je}=this.parent.viewport;switch(Je){case 90:return[0,Te,Te,Fe];case 180:return[Te,Fe,Te,Fe];case 270:return[Fe,0,Te,Fe];default:return[0,0,Te,Fe]}},Ie=new WeakSet,RD=function(){this.ctx.lineWidth=this.thickness*this.parent.scaleFactor/this.scaleFactor,this.ctx.lineCap="round",this.ctx.lineJoin="round",this.ctx.miterLimit=10,this.ctx.strokeStyle=`${this.color}${(0,ce.opacityToHex)(this.opacity)}`},se=new WeakSet,$j=function(Te,Fe){this.isEditing=!0,q(this,y)||($e(this,y,!0),Le(this,m,Ua).call(this),this.thickness||(this.thickness=Ct._defaultThickness),this.color||(this.color=Ct._defaultColor||j.AnnotationEditor._defaultLineColor),null!=this.opacity||(this.opacity=Ct._defaultOpacity)),this.currentPath.push([Te,Fe]),$e(this,w,null),Le(this,Ie,RD).call(this),this.ctx.beginPath(),this.ctx.moveTo(Te,Fe),$e(this,g,()=>{!q(this,g)||(q(this,w)&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):Le(this,D,pr).call(this),this.ctx.lineTo(...q(this,w)),$e(this,w,null),this.ctx.stroke()),window.requestAnimationFrame(q(this,g)))}),window.requestAnimationFrame(q(this,g))},De=new WeakSet,Gj=function(Te,Fe){const[Je,be]=this.currentPath.at(-1);Te===Je&&Fe===be||(this.currentPath.push([Te,Fe]),$e(this,w,[Te,Fe]))},xe=new WeakSet,Wj=function(Te,Fe){var it;this.ctx.closePath(),$e(this,g,null),Te=Math.min(Math.max(Te,0),this.canvas.width),Fe=Math.min(Math.max(Fe,0),this.canvas.height);const[Je,be]=this.currentPath.at(-1);let oe;if((Te!==Je||Fe!==be)&&this.currentPath.push([Te,Fe]),1!==this.currentPath.length)oe=(0,fe.fitCurve)(this.currentPath,30,null);else{const tt=[Te,Fe];oe=[[tt,tt.slice(),tt.slice(),tt]]}const le=Le(it=Ct,he,xD).call(it,oe);this.currentPath.length=0,this.parent.addCommands({cmd:()=>{this.paths.push(oe),this.bezierPath2D.push(le),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(Le(this,Y,$p).call(this),Le(this,de,Gp).call(this)),Le(this,yt,Ha).call(this))},mustExec:!0})},D=new WeakSet,pr=function(){if(this.isEmpty())return void Le(this,K,Wp).call(this);Le(this,Ie,RD).call(this);const{canvas:Te,ctx:Fe}=this;Fe.setTransform(1,0,0,1,0,0),Fe.clearRect(0,0,Te.width,Te.height),Le(this,K,Wp).call(this);for(const Je of this.bezierPath2D)Fe.stroke(Je)},R=new WeakSet,FD=function(Te){Le(this,xe,Wj).call(this,Te.offsetX,Te.offsetY),this.canvas.removeEventListener("pointerleave",q(this,B)),this.canvas.removeEventListener("pointermove",q(this,G)),this.parent.addToAnnotationStorage(this)},Y=new WeakSet,$p=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Ct._l10nPromise.get("editor_ink_canvas_aria_label").then(Te=>{var Fe;return null==(Fe=this.canvas)?void 0:Fe.setAttribute("aria-label",Te)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},de=new WeakSet,Gp=function(){$e(this,x,new ResizeObserver(Te=>{const Fe=Te[0].contentRect;Fe.width&&Fe.height&&this.setDimensions(Fe.width,Fe.height)})),q(this,x).observe(this.div)},m=new WeakSet,Ua=function(){if(!q(this,y))return;const[Te,Fe]=this.parent.viewportBaseDimensions;this.canvas.width=Math.ceil(this.width*Te),this.canvas.height=Math.ceil(this.height*Fe),Le(this,K,Wp).call(this)},F=new WeakSet,PD=function(Te,Fe){const Je=Le(this,Ke,qp).call(this),be=(Te-Je)/q(this,O),oe=(Fe-Je)/q(this,V);this.scaleFactor=Math.min(be,oe)},K=new WeakSet,Wp=function(){const Te=Le(this,Ke,qp).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+Te,this.translationY*this.scaleFactor+Te)},he=new WeakSet,xD=function(Te){const Fe=new Path2D;for(let Je=0,be=Te.length;Je<be;Je++){const[oe,le,Oe,Ge]=Te[Je];0===Je&&Fe.moveTo(...oe),Fe.bezierCurveTo(le[0],le[1],Oe[0],Oe[1],Ge[0],Ge[1])}return Fe},me=new WeakSet,qj=function(Te,Fe,Je,be){const le=[],Oe=this.thickness/2;let Ge,it;for(const tt of this.paths){Ge=[],it=[];for(let Wt=0,Rt=tt.length;Wt<Rt;Wt++){const[Et,Ft,At,sn]=tt[Wt],vn=Te*(Et[0]+Fe)+Oe,We=be-Te*(Et[1]+Je)-Oe,jt=Te*(Ft[0]+Fe)+Oe,Bt=be-Te*(Ft[1]+Je)-Oe,Tn=Te*(At[0]+Fe)+Oe,wn=be-Te*(At[1]+Je)-Oe,Kt=Te*(sn[0]+Fe)+Oe,qt=be-Te*(sn[1]+Je)-Oe;0===Wt&&(Ge.push(vn,We),it.push(vn,We)),Ge.push(jt,Bt,Tn,wn,Kt,qt),Le(this,Ee,zj).call(this,vn,We,jt,Bt,Tn,wn,Kt,qt,4,it)}le.push({bezier:Ge,points:it})}return le},Ee=new WeakSet,zj=function(Te,Fe,Je,be,oe,le,Oe,Ge,it,tt){if(Le(this,Ve,Kj).call(this,Te,Fe,Je,be,oe,le,Oe,Ge))tt.push(Oe,Ge);else{for(let Wt=1;Wt<it-1;Wt++){const Rt=Wt/it,Et=1-Rt;let Ft=Rt*Te+Et*Je,At=Rt*Fe+Et*be,sn=Rt*Je+Et*oe,vn=Rt*be+Et*le;Ft=Rt*Ft+Et*sn,At=Rt*At+Et*vn,sn=Rt*sn+Et*(Rt*oe+Et*Oe),vn=Rt*vn+Et*(Rt*le+Et*Ge),Ft=Rt*Ft+Et*sn,At=Rt*At+Et*vn,tt.push(Ft,At)}tt.push(Oe,Ge)}},Ve=new WeakSet,Kj=function(Te,Fe,Je,be,oe,le,Oe,Ge){const tt=ls(3*Je-2*Te-Oe,2),Wt=ls(3*be-2*Fe-Ge,2),Rt=ls(3*oe-Te-2*Oe,2),Et=ls(3*le-Fe-2*Ge,2);return Math.max(tt,Rt)+Math.max(Wt,Et)<=10},je=new WeakSet,ND=function(){let Te=1/0,Fe=-1/0,Je=1/0,be=-1/0;for(const oe of this.paths)for(const[le,Oe,Ge,it]of oe){const tt=k.Util.bezierBoundingBox(...le,...Oe,...Ge,...it);Te=Math.min(Te,tt[0]),Je=Math.min(Je,tt[1]),Fe=Math.max(Fe,tt[2]),be=Math.max(be,tt[3])}return[Te,Je,Fe,be]},Ke=new WeakSet,qp=function(){return q(this,h)?Math.ceil(this.thickness*this.parent.scaleFactor):0},yt=new WeakSet,Ha=function(Te=!1){if(this.isEmpty())return;if(!q(this,h))return void Le(this,D,pr).call(this);const Fe=Le(this,je,ND).call(this),Je=Le(this,Ke,qp).call(this);$e(this,O,Math.max(16,Fe[2]-Fe[0])),$e(this,V,Math.max(16,Fe[3]-Fe[1]));const be=Math.ceil(Je+q(this,O)*this.scaleFactor),oe=Math.ceil(Je+q(this,V)*this.scaleFactor),[le,Oe]=this.parent.viewportBaseDimensions;this.width=be/le,this.height=oe/Oe,$e(this,P,be/oe),Le(this,Lt,OD).call(this);const Ge=this.translationX,it=this.translationY;this.translationX=-Fe[0],this.translationY=-Fe[1],Le(this,m,Ua).call(this),Le(this,D,pr).call(this),$e(this,v,be),$e(this,f,oe),this.setDims(be,oe);const tt=Te?Je/this.scaleFactor/2:0;this.translate(Ge-this.translationX-tt,it-this.translationY-tt)},Lt=new WeakSet,OD=function(){const{style:Te}=this.div;q(this,P)>=1?(Te.minHeight="16px",Te.minWidth=`${Math.round(16*q(this,P))}px`):(Te.minWidth="16px",Te.minHeight=`${Math.round(16/q(this,P))}px`)},Pe(ne,he),cn(ne,"_defaultColor",null),cn(ne,"_defaultOpacity",1),cn(ne,"_defaultThickness",1),cn(ne,"_l10nPromise"),cn(ne,"_type","ink"),I.InkEditor=ne},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.fitCurve=void 0;const k=_e(26);I.fitCurve=k},Re=>{function _e(E,d,h,y,w){var v,f,g,T,N,H,M,W,ye,Se,ve,Ie,ge;if(2===E.length)return Ie=G.vectorLen(G.subtract(E[0],E[1]))/3,[v=[E[0],G.addArrays(E[0],G.mulItems(d,Ie)),G.addArrays(E[1],G.mulItems(h,Ie)),E[1]]];if(f=function pe(E){var h,y,w,d=[];return E.forEach((x,v)=>{h=v?y+G.vectorLen(G.subtract(x,w)):0,d.push(h),y=h,w=x}),d=d.map(x=>x/y)}(E),[v,T,H]=k(E,f,f,d,h,w),0===T||T<y)return[v];if(T<y*y)for(g=f,N=T,M=H,ge=0;ge<20;ge++){if(g=fe(v,E,g),[v,T,H]=k(E,f,g,d,h,w),T<y)return[v];if(H===M){let se=T/N;if(se>.9999&&se<1.0001)break}N=T,M=H}return ve=[],(W=G.subtract(E[H-1],E[H+1])).every(se=>0===se)&&(W=G.subtract(E[H-1],E[H]),[W[0],W[1]]=[-W[1],W[0]]),ye=G.normalize(W),Se=G.mulItems(ye,-1),(ve=ve.concat(_e(E.slice(0,H+1),d,ye,y,w))).concat(_e(E.slice(H),Se,h,y,w))}function k(E,d,h,y,w,x){var v,f,g;return v=function j(E,d,h,y){var w,x,v,f,g,T,M,W,ye,Se,ve,Ie,ge,se,ee,De=E[0],Ae=E[E.length-1];for(w=[De,null,null,Ae],x=G.zeros_Xx2x2(d.length),ve=0,Ie=d.length;ve<Ie;ve++)(v=x[ve])[0]=G.mulItems(h,3*(se=d[ve])*((ee=1-se)*ee)),v[1]=G.mulItems(y,3*ee*(se*se));for(f=[[0,0],[0,0]],g=[0,0],ve=0,Ie=E.length;ve<Ie;ve++)se=d[ve],f[0][0]+=G.dot((v=x[ve])[0],v[0]),f[0][1]+=G.dot(v[0],v[1]),f[1][0]+=G.dot(v[0],v[1]),f[1][1]+=G.dot(v[1],v[1]),ge=G.subtract(E[ve],B.q([De,De,Ae,Ae],se)),g[0]+=G.dot(v[0],ge),g[1]+=G.dot(v[1],ge);return M=0==(T=f[0][0]*f[1][1]-f[1][0]*f[0][1])?0:(g[0]*f[1][1]-g[1]*f[0][1])/T,W=0===T?0:(f[0][0]*g[1]-f[1][0]*g[0])/T,M<(ye=1e-6*(Se=G.vectorLen(G.subtract(De,Ae))))||W<ye?(w[1]=G.addArrays(De,G.mulItems(h,Se/3)),w[2]=G.addArrays(Ae,G.mulItems(y,Se/3))):(w[1]=G.addArrays(De,G.mulItems(h,M)),w[2]=G.addArrays(Ae,G.mulItems(y,W))),w}(E,h,y,w),[f,g]=function ne(E,d,h){var y,w,x,v,f,g,T,N;w=0,x=Math.floor(E.length/2);const H=P(d,10);for(f=0,g=E.length;f<g;f++)T=E[f],N=V(0,h[f],H,10),(y=(v=G.subtract(B.q(d,N),T))[0]*v[0]+v[1]*v[1])>w&&(w=y,x=f);return[w,x]}(E,v,d),x&&x({bez:v,points:E,params:d,maxErr:f,maxPoint:g}),[v,f,g]}function fe(E,d,h){return h.map((y,w)=>function ce(E,d,h){var y=G.subtract(B.q(E,h),d),w=B.qprime(E,h),x=G.mulMatrix(y,w),v=G.sum(G.squareItems(w))+2*G.mulMatrix(y,B.qprimeprime(E,h));return 0===v?h:h-x/v}(E,d[w],y))}var P=function(E,d){for(var h,y=[0],w=E[0],x=0,v=1;v<=d;v++)h=B.q(E,v/d),x+=G.vectorLen(G.subtract(h,w)),y.push(x),w=h;return y.map(f=>f/x)};function V(E,d,h,y){if(d<0)return 0;if(d>1)return 1;for(var x,f,g,T=1;T<=y;T++)if(d<=h[T]){g=(d-(x=h[T-1]))/(h[T]-x)*(T/y-(f=(T-1)/y))+f;break}return g}function O(E,d){return G.normalize(G.subtract(E,d))}class G{static zeros_Xx2x2(d){for(var h=[];d--;)h.push([0,0]);return h}static mulItems(d,h){return d.map(y=>y*h)}static mulMatrix(d,h){return d.reduce((y,w,x)=>y+w*h[x],0)}static subtract(d,h){return d.map((y,w)=>y-h[w])}static addArrays(d,h){return d.map((y,w)=>y+h[w])}static addItems(d,h){return d.map(y=>y+h)}static sum(d){return d.reduce((h,y)=>h+y)}static dot(d,h){return G.mulMatrix(d,h)}static vectorLen(d){return Math.hypot(...d)}static divItems(d,h){return d.map(y=>y/h)}static squareItems(d){return d.map(h=>h*h)}static normalize(d){return this.divItems(d,this.vectorLen(d))}}class B{static q(d,h){var y=1-h,w=G.mulItems(d[0],y*y*y),x=G.mulItems(d[1],3*y*y*h),v=G.mulItems(d[2],3*y*h*h),f=G.mulItems(d[3],h*h*h);return G.addArrays(G.addArrays(w,x),G.addArrays(v,f))}static qprime(d,h){var y=1-h,w=G.mulItems(G.subtract(d[1],d[0]),3*y*y),x=G.mulItems(G.subtract(d[2],d[1]),6*y*h),v=G.mulItems(G.subtract(d[3],d[2]),3*h*h);return G.addArrays(G.addArrays(w,x),v)}static qprimeprime(d,h){return G.addArrays(G.mulItems(G.addArrays(G.subtract(d[2],G.mulItems(d[1],2)),d[0]),6*(1-h)),G.mulItems(G.addArrays(G.subtract(d[3],G.mulItems(d[2],2)),d[1]),6*h))}}Re.exports=function I(E,d,h){if(!Array.isArray(E))throw new TypeError("First argument should be an array");if(E.forEach(v=>{if(!Array.isArray(v)||v.some(f=>"number"!=typeof f)||v.length!==E[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")}),(E=E.filter((v,f)=>0===f||!v.every((g,T)=>g===E[f-1][T]))).length<2)return[];const y=E.length,w=O(E[1],E[0]),x=O(E[y-2],E[y-1]);return _e(E,w,x,d,h)},Re.exports.fitCubic=_e,Re.exports.createTangent=O},(Re,I,_e)=>{var D,kD,R,LD,Y,VD;Object.defineProperty(I,"__esModule",{value:!0}),I.AnnotationLayer=void 0;var k=_e(1),j=_e(8),fe=_e(5),ce=_e(28),pe=_e(29);const V=new WeakSet;function O(ue){return{width:ue[2]-ue[0],height:ue[3]-ue[1]}}class G{static create(m){switch(m.data.annotationType){case k.AnnotationType.LINK:return new E(m);case k.AnnotationType.TEXT:return new d(m);case k.AnnotationType.WIDGET:switch(m.data.fieldType){case"Tx":return new y(m);case"Btn":return m.data.radioButton?new x(m):m.data.checkBox?new w(m):new v(m);case"Ch":return new f(m)}return new h(m);case k.AnnotationType.POPUP:return new g(m);case k.AnnotationType.FREETEXT:return new N(m);case k.AnnotationType.LINE:return new H(m);case k.AnnotationType.SQUARE:return new M(m);case k.AnnotationType.CIRCLE:return new W(m);case k.AnnotationType.POLYLINE:return new ye(m);case k.AnnotationType.CARET:return new ve(m);case k.AnnotationType.INK:return new Ie(m);case k.AnnotationType.POLYGON:return new Se(m);case k.AnnotationType.HIGHLIGHT:return new ge(m);case k.AnnotationType.UNDERLINE:return new se(m);case k.AnnotationType.SQUIGGLY:return new ee(m);case k.AnnotationType.STRIKEOUT:return new De(m);case k.AnnotationType.STAMP:return new Ae(m);case k.AnnotationType.FILEATTACHMENT:return new xe(m);default:return new B(m)}}}class B{constructor(m,{isRenderable:S=!1,ignoreBorder:F=!1,createQuadrilaterals:L=!1}={}){this.isRenderable=S,this.data=m.data,this.layer=m.layer,this.page=m.page,this.viewport=m.viewport,this.linkService=m.linkService,this.downloadManager=m.downloadManager,this.imageResourcesPath=m.imageResourcesPath,this.renderForms=m.renderForms,this.svgFactory=m.svgFactory,this.annotationStorage=m.annotationStorage,this.enableScripting=m.enableScripting,this.hasJSActions=m.hasJSActions,this._fieldObjects=m.fieldObjects,this._mouseState=m.mouseState,S&&(this.container=this._createContainer(F)),L&&(this.quadrilaterals=this._createQuadrilaterals(F))}_createContainer(m=!1){const S=this.data,F=this.page,L=this.viewport,K=document.createElement("section"),{width:ie,height:he}=O(S.rect),[ke,me,we,Ee]=L.viewBox,Ne=we-ke,Ve=Ee-me;K.setAttribute("data-annotation-id",S.id);const X=k.Util.normalizeRect([S.rect[0],F.view[3]-S.rect[1]+F.view[1],S.rect[2],F.view[3]-S.rect[3]+F.view[1]]);if(!m&&S.borderStyle.width>0){K.style.borderWidth=`${S.borderStyle.width}px`;const Ze=S.borderStyle.horizontalCornerRadius,Ke=S.borderStyle.verticalCornerRadius;switch(Ze>0||Ke>0?K.style.borderRadius=`calc(${Ze}px * var(--scale-factor)) / calc(${Ke}px * var(--scale-factor))`:this instanceof x&&(K.style.borderRadius=`calc(${ie}px * var(--scale-factor)) / calc(${he}px * var(--scale-factor))`),S.borderStyle.style){case k.AnnotationBorderStyleType.SOLID:K.style.borderStyle="solid";break;case k.AnnotationBorderStyleType.DASHED:K.style.borderStyle="dashed";break;case k.AnnotationBorderStyleType.BEVELED:(0,k.warn)("Unimplemented border style: beveled");break;case k.AnnotationBorderStyleType.INSET:(0,k.warn)("Unimplemented border style: inset");break;case k.AnnotationBorderStyleType.UNDERLINE:K.style.borderBottomStyle="solid"}const lt=S.borderColor||null;lt?K.style.borderColor=k.Util.makeHexColor(0|lt[0],0|lt[1],0|lt[2]):K.style.borderWidth=0}K.style.left=100*(X[0]-ke)/Ne+"%",K.style.top=100*(X[1]-me)/Ve+"%";const{rotation:je}=S;return S.hasOwnCanvas||0===je?(K.style.width=100*ie/Ne+"%",K.style.height=100*he/Ve+"%"):this.setRotation(je,K),K}setRotation(m,S=this.container){const[F,L,K,ie]=this.viewport.viewBox,he=K-F,ke=ie-L,{width:me,height:we}=O(this.data.rect);let Ee,Ne;m%180==0?(Ee=100*me/he,Ne=100*we/ke):(Ee=100*we/he,Ne=100*me/ke),S.style.width=`${Ee}%`,S.style.height=`${Ne}%`,S.setAttribute("data-main-rotation",(360-m)%360)}get _commonActions(){const m=(S,F,L)=>{const K=L.detail[S];L.target.style[F]=ce.ColorConverters[`${K[0]}_HTML`](K.slice(1))};return(0,k.shadow)(this,"_commonActions",{display:S=>{const F=S.detail.display%2==1;this.container.style.visibility=F?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:F,print:0===S.detail.display||3===S.detail.display})},print:S=>{this.annotationStorage.setValue(this.data.id,{print:S.detail.print})},hidden:S=>{this.container.style.visibility=S.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:S.detail.hidden})},focus:S=>{setTimeout(()=>S.target.focus({preventScroll:!1}),0)},userName:S=>{S.target.title=S.detail.userName},readonly:S=>{S.detail.readonly?S.target.setAttribute("readonly",""):S.target.removeAttribute("readonly")},required:S=>{this._setRequired(S.target,S.detail.required)},bgColor:S=>{m("bgColor","backgroundColor",S)},fillColor:S=>{m("fillColor","backgroundColor",S)},fgColor:S=>{m("fgColor","color",S)},textColor:S=>{m("textColor","color",S)},borderColor:S=>{m("borderColor","borderColor",S)},strokeColor:S=>{m("strokeColor","borderColor",S)},rotation:S=>{const F=S.detail.rotation;this.setRotation(F),this.annotationStorage.setValue(this.data.id,{rotation:F})}})}_dispatchEventFromSandbox(m,S){const F=this._commonActions;for(const L of Object.keys(S.detail)){const K=m[L]||F[L];K&&K(S)}}_setDefaultPropertiesFromJS(m){if(!this.enableScripting)return;const S=this.annotationStorage.getRawValue(this.data.id);if(!S)return;const F=this._commonActions;for(const[L,K]of Object.entries(S)){const ie=F[L];ie&&(ie({detail:{[L]:K},target:m}),delete S[L])}}_createQuadrilaterals(m=!1){if(!this.data.quadPoints)return null;const S=[],F=this.data.rect;for(const L of this.data.quadPoints)this.data.rect=[L[2].x,L[2].y,L[1].x,L[1].y],S.push(this._createContainer(m));return this.data.rect=F,S}_createPopup(m,S){let F=this.container;this.quadrilaterals&&(m=m||this.quadrilaterals,F=this.quadrilaterals[0]),m||((m=document.createElement("div")).className="popupTriggerArea",F.append(m));const K=new T({container:F,trigger:m,color:S.color,titleObj:S.titleObj,modificationDate:S.modificationDate,contentsObj:S.contentsObj,richText:S.richText,hideWrapper:!0}).render();K.style.left="100%",F.append(K)}_renderQuadrilaterals(m){for(const S of this.quadrilaterals)S.className=m;return this.quadrilaterals}render(){(0,k.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(m,S=null){const F=[];if(this._fieldObjects){const L=this._fieldObjects[m];if(L)for(const{page:K,id:ie,exportValues:he}of L){if(-1===K||ie===S)continue;const ke="string"==typeof he?he:null,me=document.querySelector(`[data-element-id="${ie}"]`);!me||V.has(me)?F.push({id:ie,exportValue:ke,domElement:me}):(0,k.warn)(`_getElementsByName - element not allowed: ${ie}`)}return F}for(const L of document.getElementsByName(m)){const{id:K,exportValue:ie}=L;K!==S&&(!V.has(L)||F.push({id:K,exportValue:ie,domElement:L}))}return F}static get platform(){const m="undefined"!=typeof navigator?navigator.platform:"";return(0,k.shadow)(this,"platform",{isWin:m.includes("Win"),isMac:m.includes("Mac")})}}class E extends B{constructor(m,S=null){super(m,{isRenderable:!0,ignoreBorder:!!(null==S?void 0:S.ignoreBorder),createQuadrilaterals:!0}),this.isTooltipOnly=m.data.isTooltipOnly}render(){const{data:m,linkService:S}=this,F=document.createElement("a");F.setAttribute("data-element-id",m.id);let L=!1;return m.url?(S.addLinkAttributes(F,m.url,m.newWindow),L=!0):m.action?(this._bindNamedAction(F,m.action),L=!0):m.dest?(this._bindLink(F,m.dest),L=!0):(m.actions&&(m.actions.Action||m.actions["Mouse Up"]||m.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(F,m),L=!0),m.resetForm?(this._bindResetFormAction(F,m.resetForm),L=!0):this.isTooltipOnly&&!L&&(this._bindLink(F,""),L=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((K,ie)=>{const he=0===ie?F:F.cloneNode();return K.append(he),K}):(this.container.className="linkAnnotation",L&&this.container.append(F),this.container)}_bindLink(m,S){m.href=this.linkService.getDestinationHash(S),m.onclick=()=>(S&&this.linkService.goToDestination(S),!1),(S||""===S)&&(m.className="internalLink")}_bindNamedAction(m,S){m.href=this.linkService.getAnchorUrl(""),m.onclick=()=>(this.linkService.executeNamedAction(S),!1),m.className="internalLink"}_bindJSAction(m,S){m.href=this.linkService.getAnchorUrl("");const F=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const L of Object.keys(S.actions)){const K=F.get(L);!K||(m[K]=()=>{var ie;return null==(ie=this.linkService.eventBus)||ie.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S.id,name:L}}),!1})}m.onclick||(m.onclick=()=>!1),m.className="internalLink"}_bindResetFormAction(m,S){const F=m.onclick;if(F||(m.href=this.linkService.getAnchorUrl("")),m.className="internalLink",!this._fieldObjects)return(0,k.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(F||(m.onclick=()=>!1));m.onclick=()=>{var we;F&&F();const{fields:L,refs:K,include:ie}=S,he=[];if(0!==L.length||0!==K.length){const Ee=new Set(K);for(const Ne of L){const Ve=this._fieldObjects[Ne]||[];for(const{id:X}of Ve)Ee.add(X)}for(const Ne of Object.values(this._fieldObjects))for(const Ve of Ne)Ee.has(Ve.id)===ie&&he.push(Ve)}else for(const Ee of Object.values(this._fieldObjects))he.push(...Ee);const ke=this.annotationStorage,me=[];for(const Ee of he){const{id:Ne}=Ee;switch(me.push(Ne),Ee.type){case"text":case"combobox":case"listbox":ke.setValue(Ne,{value:Ee.defaultValue||""});break;case"checkbox":case"radiobutton":ke.setValue(Ne,{value:Ee.defaultValue===Ee.exportValues});break;default:continue}const Ve=document.querySelector(`[data-element-id="${Ne}"]`);Ve&&(V.has(Ve)?Ve.dispatchEvent(new Event("resetform")):(0,k.warn)(`_bindResetFormAction - element not allowed: ${Ne}`))}return this.enableScripting&&(null==(we=this.linkService.eventBus)||we.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:me,name:"ResetForm"}})),!1}}}class d extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str))})}render(){this.container.className="textAnnotation";const m=document.createElement("img");return m.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",m.alt="[{{type}} Annotation]",m.dataset.l10nId="text_annotation_type",m.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(m,this.data),this.container.append(m),this.container}}class h extends B{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(m){const{isWin:S,isMac:F}=B.platform;return S&&m.ctrlKey||F&&m.metaKey}_setEventListener(m,S,F,L){S.includes("mouse")?m.addEventListener(S,K=>{var ie;null==(ie=this.linkService.eventBus)||ie.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:F,value:L(K),shift:K.shiftKey,modifier:this._getKeyModifier(K)}})}):m.addEventListener(S,K=>{var ie;null==(ie=this.linkService.eventBus)||ie.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:F,value:L(K)}})})}_setEventListeners(m,S,F){var L;for(const[K,ie]of S)("Action"===ie||(null==(L=this.data.actions)?void 0:L[ie]))&&this._setEventListener(m,K,ie,F)}_setBackgroundColor(m){const S=this.data.backgroundColor||null;m.style.backgroundColor=null===S?"transparent":k.Util.makeHexColor(S[0],S[1],S[2])}_setTextStyle(m){const{fontColor:F}=this.data.defaultAppearanceData,L=this.data.defaultAppearanceData.fontSize||9,K=m.style;let ie;if(this.data.multiLine){const he=Math.abs(this.data.rect[3]-this.data.rect[1]),ke=Math.round(he/(k.LINE_FACTOR*L))||1;ie=Math.min(L,Math.round(he/ke/k.LINE_FACTOR))}else{const he=Math.abs(this.data.rect[3]-this.data.rect[1]);ie=Math.min(L,Math.round(he/k.LINE_FACTOR))}K.fontSize=`calc(${ie}px * var(--scale-factor))`,K.color=k.Util.makeHexColor(F[0],F[1],F[2]),null!==this.data.textAlignment&&(K.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(m,S){S?m.setAttribute("required",!0):m.removeAttribute("required"),m.setAttribute("aria-required",S)}}class y extends h{constructor(m){super(m,{isRenderable:m.renderForms||!m.data.hasAppearance&&!!m.data.fieldValue})}setPropertyOnSiblings(m,S,F,L){const K=this.annotationStorage;for(const ie of this._getElementsByName(m.name,m.id))ie.domElement&&(ie.domElement[S]=F),K.setValue(ie.id,{[L]:F})}render(){var L;const m=this.annotationStorage,S=this.data.id;this.container.className="textWidgetAnnotation";let F=null;if(this.renderForms){const K=m.getValue(S,{value:this.data.fieldValue});let ie=K.formattedValue||K.value||"";const he=m.getValue(S,{charLimit:this.data.maxLen}).charLimit;he&&ie.length>he&&(ie=ie.slice(0,he));const ke={userValue:ie,formattedValue:null,valueOnFocus:""};this.data.multiLine?(F=document.createElement("textarea"),F.textContent=ie,this.data.doNotScroll&&(F.style.overflowY="hidden")):(F=document.createElement("input"),F.type="text",F.setAttribute("value",ie),this.data.doNotScroll&&(F.style.overflowX="hidden")),V.add(F),F.setAttribute("data-element-id",S),F.disabled=this.data.readOnly,F.name=this.data.fieldName,F.tabIndex=1e3,this._setRequired(F,this.data.required),he&&(F.maxLength=he),F.addEventListener("input",we=>{m.setValue(S,{value:we.target.value}),this.setPropertyOnSiblings(F,"value",we.target.value,"value")}),F.addEventListener("resetform",we=>{var Ne;const Ee=null!=(Ne=this.data.defaultFieldValue)?Ne:"";F.value=ke.userValue=Ee,ke.formattedValue=null});let me=we=>{const{formattedValue:Ee}=ke;null!=Ee&&(we.target.value=Ee),we.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){F.addEventListener("focus",Ee=>{ke.userValue&&(Ee.target.value=ke.userValue),ke.valueOnFocus=Ee.target.value}),F.addEventListener("updatefromsandbox",Ee=>{this._dispatchEventFromSandbox({value(Ve){var X;ke.userValue=null!=(X=Ve.detail.value)?X:"",m.setValue(S,{value:ke.userValue.toString()}),Ve.target.value=ke.userValue},formattedValue(Ve){const{formattedValue:X}=Ve.detail;ke.formattedValue=X,null!=X&&Ve.target!==document.activeElement&&(Ve.target.value=X),m.setValue(S,{formattedValue:X})},selRange(Ve){Ve.target.setSelectionRange(...Ve.detail.selRange)},charLimit:Ve=>{var Ke;const{charLimit:X}=Ve.detail,{target:je}=Ve;if(0===X)return void je.removeAttribute("maxLength");je.setAttribute("maxLength",X);let Ze=ke.userValue;!Ze||Ze.length<=X||(Ze=Ze.slice(0,X),je.value=ke.userValue=Ze,m.setValue(S,{value:Ze}),null==(Ke=this.linkService.eventBus)||Ke.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ze,willCommit:!0,commitKey:1,selStart:je.selectionStart,selEnd:je.selectionEnd}}))}},Ee)}),F.addEventListener("keydown",Ee=>{var X;let Ne=-1;if("Escape"===Ee.key?Ne=0:"Enter"===Ee.key?Ne=2:"Tab"===Ee.key&&(Ne=3),-1===Ne)return;const{value:Ve}=Ee.target;ke.valueOnFocus!==Ve&&(ke.userValue=Ve,null==(X=this.linkService.eventBus)||X.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ve,willCommit:!0,commitKey:Ne,selStart:Ee.target.selectionStart,selEnd:Ee.target.selectionEnd}}))});const we=me;me=null,F.addEventListener("blur",Ee=>{var Ve;const{value:Ne}=Ee.target;ke.userValue=Ne,this._mouseState.isDown&&ke.valueOnFocus!==Ne&&(null==(Ve=this.linkService.eventBus)||Ve.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ne,willCommit:!0,commitKey:1,selStart:Ee.target.selectionStart,selEnd:Ee.target.selectionEnd}})),we(Ee)}),(null==(L=this.data.actions)?void 0:L.Keystroke)&&F.addEventListener("beforeinput",Ee=>{var yt;const{data:Ne,target:Ve}=Ee,{value:X,selectionStart:je,selectionEnd:Ze}=Ve;let Ke=je,lt=Ze;switch(Ee.inputType){case"deleteWordBackward":{const $t=X.substring(0,je).match(/\w*[^\w]*$/);$t&&(Ke-=$t[0].length);break}case"deleteWordForward":{const $t=X.substring(je).match(/^[^\w]*\w*/);$t&&(lt+=$t[0].length);break}case"deleteContentBackward":je===Ze&&(Ke-=1);break;case"deleteContentForward":je===Ze&&(lt+=1)}Ee.preventDefault(),null==(yt=this.linkService.eventBus)||yt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:X,change:Ne||"",willCommit:!1,selStart:Ke,selEnd:lt}})}),this._setEventListeners(F,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Ee=>Ee.target.value)}if(me&&F.addEventListener("blur",me),this.data.comb){const Ee=(this.data.rect[2]-this.data.rect[0])/he;F.classList.add("comb"),F.style.letterSpacing=`calc(${Ee}px * var(--scale-factor) - 1ch)`}}else F=document.createElement("div"),F.textContent=this.data.fieldValue,F.style.verticalAlign="middle",F.style.display="table-cell";return this._setTextStyle(F),this._setBackgroundColor(F),this._setDefaultPropertiesFromJS(F),this.container.append(F),this.container}}class w extends h{constructor(m){super(m,{isRenderable:m.renderForms})}render(){const m=this.annotationStorage,S=this.data,F=S.id;let L=m.getValue(F,{value:S.exportValue===S.fieldValue}).value;"string"==typeof L&&(L="Off"!==L,m.setValue(F,{value:L})),this.container.className="buttonWidgetAnnotation checkBox";const K=document.createElement("input");return V.add(K),K.setAttribute("data-element-id",F),K.disabled=S.readOnly,this._setRequired(K,this.data.required),K.type="checkbox",K.name=S.fieldName,L&&K.setAttribute("checked",!0),K.setAttribute("exportValue",S.exportValue),K.tabIndex=1e3,K.addEventListener("change",ie=>{const{name:he,checked:ke}=ie.target;for(const me of this._getElementsByName(he,F)){const we=ke&&me.exportValue===S.exportValue;me.domElement&&(me.domElement.checked=we),m.setValue(me.id,{value:we})}m.setValue(F,{value:ke})}),K.addEventListener("resetform",ie=>{ie.target.checked=(S.defaultFieldValue||"Off")===S.exportValue}),this.enableScripting&&this.hasJSActions&&(K.addEventListener("updatefromsandbox",ie=>{this._dispatchEventFromSandbox({value(ke){ke.target.checked="Off"!==ke.detail.value,m.setValue(F,{value:ke.target.checked})}},ie)}),this._setEventListeners(K,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],ie=>ie.target.checked)),this._setBackgroundColor(K),this._setDefaultPropertiesFromJS(K),this.container.append(K),this.container}}class x extends h{constructor(m){super(m,{isRenderable:m.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const m=this.annotationStorage,S=this.data,F=S.id;let L=m.getValue(F,{value:S.fieldValue===S.buttonValue}).value;"string"==typeof L&&(L=L!==S.buttonValue,m.setValue(F,{value:L}));const K=document.createElement("input");if(V.add(K),K.setAttribute("data-element-id",F),K.disabled=S.readOnly,this._setRequired(K,this.data.required),K.type="radio",K.name=S.fieldName,L&&K.setAttribute("checked",!0),K.tabIndex=1e3,K.addEventListener("change",ie=>{const{name:he,checked:ke}=ie.target;for(const me of this._getElementsByName(he,F))m.setValue(me.id,{value:!1});m.setValue(F,{value:ke})}),K.addEventListener("resetform",ie=>{const he=S.defaultFieldValue;ie.target.checked=null!=he&&he===S.buttonValue}),this.enableScripting&&this.hasJSActions){const ie=S.buttonValue;K.addEventListener("updatefromsandbox",he=>{this._dispatchEventFromSandbox({value:me=>{const we=ie===me.detail.value;for(const Ee of this._getElementsByName(me.target.name)){const Ne=we&&Ee.id===F;Ee.domElement&&(Ee.domElement.checked=Ne),m.setValue(Ee.id,{value:Ne})}}},he)}),this._setEventListeners(K,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],he=>he.target.checked)}return this._setBackgroundColor(K),this._setDefaultPropertiesFromJS(K),this.container.append(K),this.container}}class v extends E{constructor(m){super(m,{ignoreBorder:m.data.hasAppearance})}render(){const m=super.render();m.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(m.title=this.data.alternativeText);const S=m.lastChild;return this.enableScripting&&this.hasJSActions&&S&&(this._setDefaultPropertiesFromJS(S),S.addEventListener("updatefromsandbox",F=>{this._dispatchEventFromSandbox({},F)})),m}}class f extends h{constructor(m){super(m,{isRenderable:m.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const m=this.annotationStorage,S=this.data.id,F=m.getValue(S,{value:this.data.fieldValue}),L=document.createElement("select");V.add(L),L.setAttribute("data-element-id",S),L.disabled=this.data.readOnly,this._setRequired(L,this.data.required),L.name=this.data.fieldName,L.tabIndex=1e3;let K=this.data.combo&&this.data.options.length>0;this.data.combo||(L.size=this.data.options.length,this.data.multiSelect&&(L.multiple=!0)),L.addEventListener("resetform",me=>{const we=this.data.defaultFieldValue;for(const Ee of L.options)Ee.selected=Ee.value===we});for(const me of this.data.options){const we=document.createElement("option");we.textContent=me.displayValue,we.value=me.exportValue,F.value.includes(me.exportValue)&&(we.setAttribute("selected",!0),K=!1),L.append(we)}let ie=null;if(K){const me=document.createElement("option");me.value=" ",me.setAttribute("hidden",!0),me.setAttribute("selected",!0),L.prepend(me),ie=()=>{me.remove(),L.removeEventListener("input",ie),ie=null},L.addEventListener("input",ie)}const he=(me,we)=>{const Ee=we?"value":"textContent",Ne=me.target.options;return me.target.multiple?Array.prototype.filter.call(Ne,Ve=>Ve.selected).map(Ve=>Ve[Ee]):-1===Ne.selectedIndex?null:Ne[Ne.selectedIndex][Ee]},ke=me=>Array.prototype.map.call(me.target.options,Ee=>({displayValue:Ee.textContent,exportValue:Ee.value}));return this.enableScripting&&this.hasJSActions?(L.addEventListener("updatefromsandbox",me=>{this._dispatchEventFromSandbox({value(Ee){null==ie||ie();const Ne=Ee.detail.value,Ve=new Set(Array.isArray(Ne)?Ne:[Ne]);for(const X of L.options)X.selected=Ve.has(X.value);m.setValue(S,{value:he(Ee,!0)})},multipleSelection(Ee){L.multiple=!0},remove(Ee){const Ne=L.options,Ve=Ee.detail.remove;Ne[Ve].selected=!1,L.remove(Ve),Ne.length>0&&-1===Array.prototype.findIndex.call(Ne,je=>je.selected)&&(Ne[0].selected=!0),m.setValue(S,{value:he(Ee,!0),items:ke(Ee)})},clear(Ee){for(;0!==L.length;)L.remove(0);m.setValue(S,{value:null,items:[]})},insert(Ee){const{index:Ne,displayValue:Ve,exportValue:X}=Ee.detail.insert,je=L.children[Ne],Ze=document.createElement("option");Ze.textContent=Ve,Ze.value=X,je?je.before(Ze):L.append(Ze),m.setValue(S,{value:he(Ee,!0),items:ke(Ee)})},items(Ee){const{items:Ne}=Ee.detail;for(;0!==L.length;)L.remove(0);for(const Ve of Ne){const{displayValue:X,exportValue:je}=Ve,Ze=document.createElement("option");Ze.textContent=X,Ze.value=je,L.append(Ze)}L.options.length>0&&(L.options[0].selected=!0),m.setValue(S,{value:he(Ee,!0),items:ke(Ee)})},indices(Ee){const Ne=new Set(Ee.detail.indices);for(const Ve of Ee.target.options)Ve.selected=Ne.has(Ve.index);m.setValue(S,{value:he(Ee,!0)})},editable(Ee){Ee.target.disabled=!Ee.detail.editable}},me)}),L.addEventListener("input",me=>{var Ne;const we=he(me,!0),Ee=he(me,!1);m.setValue(S,{value:we}),null==(Ne=this.linkService.eventBus)||Ne.dispatch("dispatcheventinsandbox",{source:this,detail:{id:S,name:"Keystroke",value:Ee,changeEx:we,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(L,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],me=>me.target.checked)):L.addEventListener("input",function(me){m.setValue(S,{value:he(me,!0)})}),this.data.combo&&this._setTextStyle(L),this._setBackgroundColor(L),this._setDefaultPropertiesFromJS(L),this.container.append(L),this.container}}class g extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!((null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str))})}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const F=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(0===F.length)return this.container;const L=new T({container:this.container,trigger:Array.from(F),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),K=this.page,ie=k.Util.normalizeRect([this.data.parentRect[0],K.view[3]-this.data.parentRect[1]+K.view[1],this.data.parentRect[2],K.view[3]-this.data.parentRect[3]+K.view[1]]),he=ie[0]+this.data.parentRect[2]-this.data.parentRect[0],ke=ie[1],[me,we,Ee,Ne]=this.viewport.viewBox,X=Ne-we;return this.container.style.left=100*(he-me)/(Ee-me)+"%",this.container.style.top=100*(ke-we)/X+"%",this.container.append(L.render()),this.container}}class T{constructor(m){this.container=m.container,this.trigger=m.trigger,this.color=m.color,this.titleObj=m.titleObj,this.modificationDate=m.modificationDate,this.contentsObj=m.contentsObj,this.richText=m.richText,this.hideWrapper=m.hideWrapper||!1,this.pinned=!1}render(){var he,ke;const S=document.createElement("div");S.className="popupWrapper",this.hideElement=this.hideWrapper?S:this.container,this.hideElement.hidden=!0;const F=document.createElement("div");F.className="popup";const L=this.color;L&&(F.style.backgroundColor=k.Util.makeHexColor(0|.7*(255-L[0])+L[0],0|.7*(255-L[1])+L[1],0|.7*(255-L[2])+L[2]));const K=document.createElement("h1");K.dir=this.titleObj.dir,K.textContent=this.titleObj.str,F.append(K);const ie=j.PDFDateString.toDateObject(this.modificationDate);if(ie){const me=document.createElement("span");me.className="popupDate",me.textContent="{{date}}, {{time}}",me.dataset.l10nId="annotation_date_string",me.dataset.l10nArgs=JSON.stringify({date:ie.toLocaleDateString(),time:ie.toLocaleTimeString()}),F.append(me)}if(!(null==(he=this.richText)?void 0:he.str)||(null==(ke=this.contentsObj)?void 0:ke.str)&&this.contentsObj.str!==this.richText.str){const me=this._formatContents(this.contentsObj);F.append(me)}else pe.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:F}),F.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const me of this.trigger)me.addEventListener("click",this._toggle.bind(this)),me.addEventListener("mouseover",this._show.bind(this,!1)),me.addEventListener("mouseout",this._hide.bind(this,!1));return F.addEventListener("click",this._hide.bind(this,!0)),S.append(F),S}_formatContents({str:m,dir:S}){const F=document.createElement("p");F.className="popupContent",F.dir=S;const L=m.split(/(?:\r\n?|\n)/);for(let K=0,ie=L.length;K<ie;++K)F.append(document.createTextNode(L[K])),K<ie-1&&F.append(document.createElement("br"));return F}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(m=!1){m&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(m=!0){m&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class N extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0}),this.textContent=m.data.textContent}render(){if(this.container.className="freeTextAnnotation",this.textContent){const m=document.createElement("div");m.className="annotationTextContent",m.setAttribute("role","comment");for(const S of this.textContent){const F=document.createElement("span");F.textContent=S,m.append(F)}this.container.append(m)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class H extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){this.container.className="lineAnnotation";const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0),K=this.svgFactory.createElement("svg:line");return K.setAttribute("x1",m.rect[2]-m.lineCoordinates[0]),K.setAttribute("y1",m.rect[3]-m.lineCoordinates[1]),K.setAttribute("x2",m.rect[2]-m.lineCoordinates[2]),K.setAttribute("y2",m.rect[3]-m.lineCoordinates[3]),K.setAttribute("stroke-width",m.borderStyle.width||1),K.setAttribute("stroke","transparent"),K.setAttribute("fill","transparent"),L.append(K),this.container.append(L),this._createPopup(K,m),this.container}}class M extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){this.container.className="squareAnnotation";const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0),K=m.borderStyle.width,ie=this.svgFactory.createElement("svg:rect");return ie.setAttribute("x",K/2),ie.setAttribute("y",K/2),ie.setAttribute("width",S-K),ie.setAttribute("height",F-K),ie.setAttribute("stroke-width",K||1),ie.setAttribute("stroke","transparent"),ie.setAttribute("fill","transparent"),L.append(ie),this.container.append(L),this._createPopup(ie,m),this.container}}class W extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){this.container.className="circleAnnotation";const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0),K=m.borderStyle.width,ie=this.svgFactory.createElement("svg:ellipse");return ie.setAttribute("cx",S/2),ie.setAttribute("cy",F/2),ie.setAttribute("rx",S/2-K/2),ie.setAttribute("ry",F/2-K/2),ie.setAttribute("stroke-width",K||1),ie.setAttribute("stroke","transparent"),ie.setAttribute("fill","transparent"),L.append(ie),this.container.append(L),this._createPopup(ie,m),this.container}}class ye extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0);let K=[];for(const he of m.vertices)K.push(he.x-m.rect[0]+","+(m.rect[3]-he.y));K=K.join(" ");const ie=this.svgFactory.createElement(this.svgElementName);return ie.setAttribute("points",K),ie.setAttribute("stroke-width",m.borderStyle.width||1),ie.setAttribute("stroke","transparent"),ie.setAttribute("fill","transparent"),L.append(ie),this.container.append(L),this._createPopup(ie,m),this.container}}class Se extends ye{constructor(m){super(m),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class ve extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class Ie extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const m=this.data,{width:S,height:F}=O(m.rect),L=this.svgFactory.create(S,F,!0);for(const K of m.inkLists){let ie=[];for(const ke of K)ie.push(`${ke.x-m.rect[0]},${m.rect[3]-ke.y}`);ie=ie.join(" ");const he=this.svgFactory.createElement(this.svgElementName);he.setAttribute("points",ie),he.setAttribute("stroke-width",m.borderStyle.width||1),he.setAttribute("stroke","transparent"),he.setAttribute("fill","transparent"),this._createPopup(he,m),L.append(he)}return this.container.append(L),this.container}}class ge extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}class se extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}class ee extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}class De extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}class Ae extends B{constructor(m){var F,L,K;super(m,{isRenderable:!!(m.data.hasPopup||(null==(F=m.data.titleObj)?void 0:F.str)||(null==(L=m.data.contentsObj)?void 0:L.str)||(null==(K=m.data.richText)?void 0:K.str)),ignoreBorder:!0})}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class xe extends B{constructor(m){var L;super(m,{isRenderable:!0});const{filename:S,content:F}=this.data.file;this.filename=(0,j.getFilenameFromUrl)(S),this.content=F,null==(L=this.linkService.eventBus)||L.dispatch("fileattachmentannotation",{source:this,filename:S,content:F})}render(){var S,F;this.container.className="fileAttachmentAnnotation";const m=document.createElement("div");return m.className="popupTriggerArea",m.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&((null==(S=this.data.titleObj)?void 0:S.str)||(null==(F=this.data.contentsObj)?void 0:F.str)||this.data.richText)&&this._createPopup(m,this.data),this.container.append(m),this.container}_download(){var m;null==(m=this.downloadManager)||m.openOrDownloadData(this.container,this.content,this.filename)}}const de=class{static render(m){var he,ke;const{annotations:S,div:F,viewport:L,accessibilityManager:K}=m;Le(this,R,LD).call(this,F,L);let ie=0;for(const me of S){if(me.annotationType!==k.AnnotationType.POPUP){const{width:Ee,height:Ne}=O(me.rect);if(Ee<=0||Ne<=0)continue}const we=G.create({data:me,layer:F,page:m.page,viewport:L,linkService:m.linkService,downloadManager:m.downloadManager,imageResourcesPath:m.imageResourcesPath||"",renderForms:!1!==m.renderForms,svgFactory:new j.DOMSVGFactory,annotationStorage:m.annotationStorage||new fe.AnnotationStorage,enableScripting:m.enableScripting,hasJSActions:m.hasJSActions,fieldObjects:m.fieldObjects,mouseState:m.mouseState||{isDown:!1}});if(we.isRenderable){const Ee=we.render();if(me.hidden&&(Ee.style.visibility="hidden"),Array.isArray(Ee))for(const Ne of Ee)Ne.style.zIndex=ie++,Le(he=de,D,kD).call(he,Ne,me.id,F,K);else Ee.style.zIndex=ie++,we instanceof g?F.prepend(Ee):Le(ke=de,D,kD).call(ke,Ee,me.id,F,K)}}Le(this,Y,VD).call(this,F,m.annotationCanvasMap)}static update(m){const{annotationCanvasMap:S,div:F,viewport:L}=m;Le(this,R,LD).call(this,F,L),Le(this,Y,VD).call(this,F,S),F.hidden=!1}};let te=de;D=new WeakSet,kD=function(m,S,F,L){const K=m.firstChild||m;K.id=`${j.AnnotationPrefix}${S}`,F.append(m),null==L||L.moveElementInDOM(F,m,K,!1)},R=new WeakSet,LD=function(m,{width:S,height:F,rotation:L}){const{style:K}=m,ie=L%180!=0,he=Math.floor(S)+"px",ke=Math.floor(F)+"px";K.width=ie?ke:he,K.height=ie?he:ke,m.setAttribute("data-main-rotation",L)},Y=new WeakSet,VD=function(m,S){if(S){for(const[F,L]of S){const K=m.querySelector(`[data-annotation-id="${F}"]`);if(!K)continue;const{firstChild:ie}=K;ie?"CANVAS"===ie.nodeName?ie.replaceWith(L):ie.before(L):K.append(L)}S.clear()}},Pe(te,D),Pe(te,R),Pe(te,Y),I.AnnotationLayer=te},(Re,I)=>{function _e(j){return Math.floor(255*Math.max(0,Math.min(1,j))).toString(16).padStart(2,"0")}Object.defineProperty(I,"__esModule",{value:!0}),I.ColorConverters=void 0,I.ColorConverters=class k{static CMYK_G([fe,ce,pe,ne]){return["G",1-Math.min(1,.3*fe+.59*pe+.11*ce+ne)]}static G_CMYK([fe]){return["CMYK",0,0,0,1-fe]}static G_RGB([fe]){return["RGB",fe,fe,fe]}static G_HTML([fe]){const ce=_e(fe);return`#${ce}${ce}${ce}`}static RGB_G([fe,ce,pe]){return["G",.3*fe+.59*ce+.11*pe]}static RGB_HTML([fe,ce,pe]){return`#${_e(fe)}${_e(ce)}${_e(pe)}`}static T_HTML(){return"#00000000"}static CMYK_RGB([fe,ce,pe,ne]){return["RGB",1-Math.min(1,fe+ne),1-Math.min(1,pe+ne),1-Math.min(1,ce+ne)]}static CMYK_HTML(fe){const ce=this.CMYK_RGB(fe).slice(1);return this.RGB_HTML(ce)}static RGB_CMYK([fe,ce,pe]){const ne=1-fe,P=1-ce,V=1-pe;return["CMYK",ne,P,V,Math.min(ne,P,V)]}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.XfaLayer=void 0;var k=_e(20);I.XfaLayer=class j{static setupStorage(ce,pe,ne,P,V){const O=P.getValue(pe,{value:null});switch(ne.name){case"textarea":if(null!==O.value&&(ce.textContent=O.value),"print"===V)break;ce.addEventListener("input",G=>{P.setValue(pe,{value:G.target.value})});break;case"input":if("radio"===ne.attributes.type||"checkbox"===ne.attributes.type){if(O.value===ne.attributes.xfaOn?ce.setAttribute("checked",!0):O.value===ne.attributes.xfaOff&&ce.removeAttribute("checked"),"print"===V)break;ce.addEventListener("change",G=>{P.setValue(pe,{value:G.target.getAttribute(G.target.checked?"xfaOn":"xfaOff")})})}else{if(null!==O.value&&ce.setAttribute("value",O.value),"print"===V)break;ce.addEventListener("input",G=>{P.setValue(pe,{value:G.target.value})})}break;case"select":if(null!==O.value)for(const G of ne.children)G.attributes.value===O.value&&(G.attributes.selected=!0);ce.addEventListener("input",G=>{const B=G.target.options;P.setValue(pe,{value:-1===B.selectedIndex?"":B[B.selectedIndex].value})})}}static setAttributes({html:ce,element:pe,storage:ne=null,intent:P,linkService:V}){const{attributes:O}=pe,G=ce instanceof HTMLAnchorElement;"radio"===O.type&&(O.name=`${O.name}-${P}`);for(const[B,E]of Object.entries(O))if(null!=E)switch(B){case"class":E.length&&ce.setAttribute(B,E.join(" "));break;case"dataId":break;case"id":ce.setAttribute("data-element-id",E);break;case"style":Object.assign(ce.style,E);break;case"textContent":ce.textContent=E;break;default:(!G||"href"!==B&&"newWindow"!==B)&&ce.setAttribute(B,E)}G&&V.addLinkAttributes(ce,O.href,O.newWindow),ne&&O.dataId&&this.setupStorage(ce,O.dataId,pe,ne)}static render(ce){var d;const pe=ce.annotationStorage,ne=ce.linkService,P=ce.xfaHtml,V=ce.intent||"display",O=document.createElement(P.name);P.attributes&&this.setAttributes({html:O,element:P,intent:V,linkService:ne});const G=[[P,-1,O]],B=ce.div;if(B.append(O),ce.viewport){const h=`matrix(${ce.viewport.transform.join(",")})`;B.style.transform=h}"richText"!==V&&B.setAttribute("class","xfaLayer xfaFont");const E=[];for(;G.length>0;){const[h,y,w]=G.at(-1);if(y+1===h.children.length){G.pop();continue}const x=h.children[++G.at(-1)[1]];if(null===x)continue;const{name:v}=x;if("#text"===v){const g=document.createTextNode(x.value);E.push(g),w.append(g);continue}let f;if(f=(null==(d=null==x?void 0:x.attributes)?void 0:d.xmlns)?document.createElementNS(x.attributes.xmlns,v):document.createElement(v),w.append(f),x.attributes&&this.setAttributes({html:f,element:x,storage:pe,intent:V,linkService:ne}),x.children&&x.children.length>0)G.push([x,-1,f]);else if(x.value){const g=document.createTextNode(x.value);k.XfaText.shouldBuildText(v)&&E.push(g),f.append(g)}}for(const h of B.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))h.setAttribute("readOnly",!0);return{textDivs:E}}static update(ce){const pe=`matrix(${ce.viewport.transform.join(",")})`;ce.div.style.transform=pe,ce.div.hidden=!1}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.TextLayerRenderTask=void 0,I.renderTextLayer=function w(x){const v=new y({textContent:x.textContent,textContentStream:x.textContentStream,container:x.container,viewport:x.viewport,textDivs:x.textDivs,textContentItemsStr:x.textContentItemsStr,enhanceTextSelection:x.enhanceTextSelection});return v._render(x.timeout),v};var k=_e(1),j=_e(8);const ne=new Map,P=/^\s+$/g;function O(x,v,f,g){const T=document.createElement("span"),N=x._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==v.str,hasEOL:v.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1,fontSize:0}:{angle:0,canvasWidth:0,hasText:""!==v.str,hasEOL:v.hasEOL,fontSize:0};x._textDivs.push(T);const H=k.Util.transform(x._viewport.transform,v.transform);let M=Math.atan2(H[1],H[0]);const W=f[v.fontName];W.vertical&&(M+=Math.PI/2);const ye=Math.hypot(H[2],H[3]),Se=ye*function V(x,v){const f=ne.get(x);if(f)return f;v.save(),v.font=`30px ${x}`;const g=v.measureText("");let T=g.fontBoundingBoxAscent,N=Math.abs(g.fontBoundingBoxDescent);if(T){v.restore();const M=T/(T+N);return ne.set(x,M),M}v.strokeStyle="red",v.clearRect(0,0,30,30),v.strokeText("g",0,0);let H=v.getImageData(0,0,30,30).data;N=0;for(let M=H.length-1-3;M>=0;M-=4)if(H[M]>0){N=Math.ceil(M/4/30);break}v.clearRect(0,0,30,30),v.strokeText("A",0,30),H=v.getImageData(0,0,30,30).data,T=0;for(let M=0,W=H.length;M<W;M+=4)if(H[M]>0){T=30-Math.floor(M/4/30);break}if(v.restore(),T){const M=T/(T+N);return ne.set(x,M),M}return ne.set(x,.8),.8}(W.fontFamily,g);let ve,Ie;0===M?(ve=H[4],Ie=H[5]-Se):(ve=H[4]+Se*Math.sin(M),Ie=H[5]-Se*Math.cos(M)),T.style.left=`${ve}px`,T.style.top=`${Ie}px`,T.style.fontSize=`${ye}px`,T.style.fontFamily=W.fontFamily,N.fontSize=ye,T.setAttribute("role","presentation"),T.textContent=v.str,T.dir=v.dir,x._fontInspectorEnabled&&(T.dataset.fontName=v.fontName),0!==M&&(N.angle=M*(180/Math.PI));let ge=!1;if(v.str.length>1||x._enhanceTextSelection&&P.test(v.str))ge=!0;else if(" "!==v.str&&v.transform[0]!==v.transform[3]){const se=Math.abs(v.transform[0]),ee=Math.abs(v.transform[3]);se!==ee&&Math.max(se,ee)/Math.min(se,ee)>1.5&&(ge=!0)}if(ge&&(N.canvasWidth=W.vertical?v.height*x._viewport.scale:v.width*x._viewport.scale),x._textDivProperties.set(T,N),x._textContentStream&&x._layoutText(T),x._enhanceTextSelection&&N.hasText){let se=1,ee=0;0!==M&&(se=Math.cos(M),ee=Math.sin(M));const De=(W.vertical?v.height:v.width)*x._viewport.scale,Ae=ye;let xe,te;0!==M?(xe=[se,ee,-ee,se,ve,Ie],te=k.Util.getAxialAlignedBoundingBox([0,0,De,Ae],xe)):te=[ve,Ie,ve+De,Ie+Ae],x._bounds.push({left:te[0],top:te[1],right:te[2],bottom:te[3],div:T,size:[De,Ae],m:xe})}}function G(x){if(x._canceled)return;const v=x._textDivs,f=x._capability,g=v.length;if(g>1e5)return x._renderingDone=!0,void f.resolve();if(!x._textContentStream)for(let T=0;T<g;T++)x._layoutText(v[T]);x._renderingDone=!0,f.resolve()}function B(x,v,f){let g=0;for(let T=0;T<f;T++){const N=x[v++];N>0&&(g=g?Math.min(N,g):N)}return g}function h(x,v){v.sort(function(T,N){return T.x1-N.x1||T.index-N.index});const g=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];for(const T of v){let N=0;for(;N<g.length&&g[N].end<=T.y1;)N++;let H=g.length-1;for(;H>=0&&g[H].start>=T.y2;)H--;let M,W,ye,Se,ve=-1/0;for(ye=N;ye<=H;ye++){let se;M=g[ye],W=M.boundary,se=W.x2>T.x1?W.index>T.index?W.x1New:T.x1:void 0===W.x2New?(W.x2+T.x1)/2:W.x2New,se>ve&&(ve=se)}for(T.x1New=ve,ye=N;ye<=H;ye++)M=g[ye],W=M.boundary,void 0===W.x2New?W.x2>T.x1?W.index>T.index&&(W.x2New=W.x2):W.x2New=ve:W.x2New>ve&&(W.x2New=Math.max(ve,W.x2));const Ie=[];let ge=null;for(ye=N;ye<=H;ye++){M=g[ye],W=M.boundary;const se=W.x2>T.x2?W:T;ge===se?Ie.at(-1).end=M.end:(Ie.push({start:M.start,end:M.end,boundary:se}),ge=se)}for(g[N].start<T.y1&&(Ie[0].start=T.y1,Ie.unshift({start:g[N].start,end:T.y1,boundary:g[N].boundary})),T.y2<g[H].end&&(Ie.at(-1).end=T.y2,Ie.push({start:T.y2,end:g[H].end,boundary:g[H].boundary})),ye=N;ye<=H;ye++){if(M=g[ye],W=M.boundary,void 0!==W.x2New)continue;let se=!1;for(Se=N-1;!se&&Se>=0&&g[Se].start>=W.y1;Se--)se=g[Se].boundary===W;for(Se=H+1;!se&&Se<g.length&&g[Se].end<=W.y2;Se++)se=g[Se].boundary===W;for(Se=0;!se&&Se<Ie.length;Se++)se=Ie[Se].boundary===W;se||(W.x2New=ve)}Array.prototype.splice.apply(g,[N,H-N+1,...Ie])}for(const T of g){const N=T.boundary;void 0===N.x2New&&(N.x2New=Math.max(x,N.x2))}}class y{constructor({textContent:v,textContentStream:f,container:g,viewport:T,textDivs:N,textContentItemsStr:H,enhanceTextSelection:M}){var W;M&&(0,j.deprecated)("The `enhanceTextSelection` functionality will be removed in the future."),this._textContent=v,this._textContentStream=f,this._container=g,this._document=g.ownerDocument,this._viewport=T,this._textDivs=N||[],this._textContentItemsStr=H||[],this._enhanceTextSelection=!!M,this._fontInspectorEnabled=!!(null==(W=globalThis.FontInspector)?void 0:W.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,k.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._devicePixelRatio=globalThis.devicePixelRatio||1,this._capability.promise.finally(()=>{this._enhanceTextSelection||(this._textDivProperties=null),this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new k.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}_processItems(v,f){for(let g=0,T=v.length;g<T;g++)if(void 0!==v[g].str)this._textContentItemsStr.push(v[g].str),O(this,v[g],f,this._layoutTextCtx);else if("beginMarkedContentProps"===v[g].type||"beginMarkedContent"===v[g].type){const N=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==v[g].id&&this._container.setAttribute("id",`${v[g].id}`),N.append(this._container)}else"endMarkedContent"===v[g].type&&(this._container=this._container.parentNode)}_layoutText(v){const f=this._textDivProperties.get(v);let g="";if(0!==f.canvasWidth&&f.hasText){const{fontFamily:T}=v.style,{fontSize:N}=f;(N!==this._layoutTextLastFontSize||T!==this._layoutTextLastFontFamily)&&(this._layoutTextCtx.font=`${N*this._devicePixelRatio}px ${T}`,this._layoutTextLastFontSize=N,this._layoutTextLastFontFamily=T);const{width:H}=this._layoutTextCtx.measureText(v.textContent);if(H>0){const M=this._devicePixelRatio*f.canvasWidth/H;this._enhanceTextSelection&&(f.scale=M),g=`scaleX(${M})`}}if(0!==f.angle&&(g=`rotate(${f.angle}deg) ${g}`),g.length>0&&(this._enhanceTextSelection&&(f.originalTransform=g),v.style.transform=g),f.hasText&&this._container.append(v),f.hasEOL){const T=document.createElement("br");T.setAttribute("role","presentation"),this._container.append(T)}}_render(v=0){const f=(0,k.createPromiseCapability)();let g=Object.create(null);const T=this._document.createElement("canvas");if(T.height=T.width=30,this._layoutTextCtx=T.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),f.resolve();else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const N=()=>{this._reader.read().then(({value:H,done:M})=>{M?f.resolve():(Object.assign(g,H.styles),this._processItems(H.items,g),N())},f.reject)};this._reader=this._textContentStream.getReader(),N()}}f.promise.then(()=>{g=null,v?this._renderTimer=setTimeout(()=>{G(this),this._renderTimer=null},v):G(this)},this._capability.reject)}expandTextDivs(v=!1){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(function E(x){const v=x._bounds,f=x._viewport,g=function d(x,v,f){const g=f.map(function(N,H){return{x1:N.left,y1:N.top,x2:N.right,y2:N.bottom,index:H,x1New:void 0,x2New:void 0}});h(x,g);const T=new Array(f.length);for(const N of g)T[N.index]={left:N.x1New,top:0,right:N.x2New,bottom:0};f.map(function(N,H){const M=T[H],W=g[H];W.x1=N.top,W.y1=x-M.right,W.x2=N.bottom,W.y2=x-M.left,W.index=H,W.x1New=void 0,W.x2New=void 0}),h(v,g);for(const N of g){const H=N.index;T[H].top=N.x1New,T[H].bottom=N.x2New}return T}(f.width,f.height,v);for(let T=0;T<g.length;T++){const N=v[T].div,H=x._textDivProperties.get(N);if(0===H.angle){H.paddingLeft=v[T].left-g[T].left,H.paddingTop=v[T].top-g[T].top,H.paddingRight=g[T].right-v[T].right,H.paddingBottom=g[T].bottom-v[T].bottom,x._textDivProperties.set(N,H);continue}const M=g[T],W=v[T],ye=W.m,Se=ye[0],ve=ye[1],Ie=[[0,0],[0,W.size[1]],[W.size[0],0],W.size],ge=new Float64Array(64);for(let ee=0,De=Ie.length;ee<De;ee++){const Ae=k.Util.applyTransform(Ie[ee],ye);ge[ee+0]=Se&&(M.left-Ae[0])/Se,ge[ee+4]=ve&&(M.top-Ae[1])/ve,ge[ee+8]=Se&&(M.right-Ae[0])/Se,ge[ee+12]=ve&&(M.bottom-Ae[1])/ve,ge[ee+16]=ve&&(M.left-Ae[0])/-ve,ge[ee+20]=Se&&(M.top-Ae[1])/Se,ge[ee+24]=ve&&(M.right-Ae[0])/-ve,ge[ee+28]=Se&&(M.bottom-Ae[1])/Se,ge[ee+32]=Se&&(M.left-Ae[0])/-Se,ge[ee+36]=ve&&(M.top-Ae[1])/-ve,ge[ee+40]=Se&&(M.right-Ae[0])/-Se,ge[ee+44]=ve&&(M.bottom-Ae[1])/-ve,ge[ee+48]=ve&&(M.left-Ae[0])/ve,ge[ee+52]=Se&&(M.top-Ae[1])/-Se,ge[ee+56]=ve&&(M.right-Ae[0])/ve,ge[ee+60]=Se&&(M.bottom-Ae[1])/-Se}const se=1+Math.min(Math.abs(Se),Math.abs(ve));H.paddingLeft=B(ge,32,16)/se,H.paddingTop=B(ge,48,16)/se,H.paddingRight=B(ge,0,16)/se,H.paddingBottom=B(ge,16,16)/se,x._textDivProperties.set(N,H)}}(this),this._bounds=null);const f=[],g=[];for(let T=0,N=this._textDivs.length;T<N;T++){const H=this._textDivs[T],M=this._textDivProperties.get(H);!M.hasText||(v?(f.length=0,g.length=0,M.originalTransform&&f.push(M.originalTransform),M.paddingTop>0?(g.push(`${M.paddingTop}px`),f.push(`translateY(${-M.paddingTop}px)`)):g.push(0),g.push(M.paddingRight>0?M.paddingRight/M.scale+"px":0),g.push(M.paddingBottom>0?`${M.paddingBottom}px`:0),M.paddingLeft>0?(g.push(M.paddingLeft/M.scale+"px"),f.push(`translateX(${-M.paddingLeft/M.scale}px)`)):g.push(0),H.style.padding=g.join(" "),f.length&&(H.style.transform=f.join(" "))):(H.style.padding=null,H.style.transform=M.originalTransform))}}}I.TextLayerRenderTask=y},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.SVGGraphics=void 0;var k=_e(8),j=_e(1),fe=_e(3);let ce=class{constructor(){(0,j.unreachable)("Not implemented: SVGGraphics")}};I.SVGGraphics=ce;{let d=function(f){let g=[];const T=[];for(const N of f)"save"!==N.fn?"restore"===N.fn?g=T.pop():g.push(N):(g.push({fnId:92,fn:"group",items:[]}),T.push(g),g=g.at(-1).items);return g},h=function(f){if(Number.isInteger(f))return f.toString();const g=f.toFixed(10);let T=g.length-1;if("0"!==g[T])return g;do{T--}while("0"===g[T]);return g.substring(0,"."===g[T]?T:T+1)},y=function(f){if(0===f[4]&&0===f[5]){if(0===f[1]&&0===f[2])return 1===f[0]&&1===f[3]?"":`scale(${h(f[0])} ${h(f[3])})`;if(f[0]===f[3]&&f[1]===-f[2]){const g=180*Math.acos(f[0])/Math.PI;return`rotate(${h(g)})`}}else if(1===f[0]&&0===f[1]&&0===f[2]&&1===f[3])return`translate(${h(f[4])} ${h(f[5])})`;return`matrix(${h(f[0])} ${h(f[1])} ${h(f[2])} ${h(f[3])} ${h(f[4])} ${h(f[5])})`};const pe={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ne="http://www.w3.org/XML/1998/namespace",P="http://www.w3.org/1999/xlink",V=["butt","round","square"],O=["miter","round","bevel"],G=function(f,g="",T=!1){if(URL.createObjectURL&&"undefined"!=typeof Blob&&!T)return URL.createObjectURL(new Blob([f],{type:g}));const N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let H=`data:${g};base64,`;for(let M=0,W=f.length;M<W;M+=3){const ye=255&f[M],Se=255&f[M+1],ve=255&f[M+2];H+=N[ye>>2]+N[(3&ye)<<4|Se>>4]+N[M+1<W?(15&Se)<<2|ve>>6:64]+N[M+2<W?63&ve:64]}return H},B=function(){const f=new Uint8Array([137,80,78,71,13,10,26,10]),T=new Int32Array(256);for(let ve=0;ve<256;ve++){let Ie=ve;for(let ge=0;ge<8;ge++)Ie=1&Ie?3988292384^Ie>>1&2147483647:Ie>>1&2147483647;T[ve]=Ie}function H(ve,Ie,ge,se){let ee=se;const De=Ie.length;ge[ee]=De>>24&255,ge[ee+1]=De>>16&255,ge[ee+2]=De>>8&255,ge[ee+3]=255&De,ee+=4,ge[ee]=255&ve.charCodeAt(0),ge[ee+1]=255&ve.charCodeAt(1),ge[ee+2]=255&ve.charCodeAt(2),ge[ee+3]=255&ve.charCodeAt(3),ee+=4,ge.set(Ie,ee),ee+=Ie.length;const Ae=function N(ve,Ie,ge){let se=-1;for(let ee=Ie;ee<ge;ee++)se=se>>>8^T[255&(se^ve[ee])];return-1^se}(ge,se+4,ee);ge[ee]=Ae>>24&255,ge[ee+1]=Ae>>16&255,ge[ee+2]=Ae>>8&255,ge[ee+3]=255&Ae}function ye(ve){let Ie=ve.length;const ge=65535,se=Math.ceil(Ie/ge),ee=new Uint8Array(2+Ie+5*se+4);let De=0;ee[De++]=120,ee[De++]=156;let Ae=0;for(;Ie>ge;)ee[De++]=0,ee[De++]=255,ee[De++]=255,ee[De++]=0,ee[De++]=0,ee.set(ve.subarray(Ae,Ae+ge),De),De+=ge,Ae+=ge,Ie-=ge;ee[De++]=1,ee[De++]=255&Ie,ee[De++]=Ie>>8&255,ee[De++]=255&~Ie,ee[De++]=(65535&~Ie)>>8&255,ee.set(ve.subarray(Ae),De),De+=ve.length-Ae;const xe=function M(ve,Ie,ge){let se=1,ee=0;for(let De=Ie;De<ge;++De)se=(se+(255&ve[De]))%65521,ee=(ee+se)%65521;return ee<<16|se}(ve,0,ve.length);return ee[De++]=xe>>24&255,ee[De++]=xe>>16&255,ee[De++]=xe>>8&255,ee[De++]=255&xe,ee}return function(Ie,ge,se){return function Se(ve,Ie,ge,se){const ee=ve.width,De=ve.height;let Ae,xe,te;const D=ve.data;switch(Ie){case j.ImageKind.GRAYSCALE_1BPP:xe=0,Ae=1,te=ee+7>>3;break;case j.ImageKind.RGB_24BPP:xe=2,Ae=8,te=3*ee;break;case j.ImageKind.RGBA_32BPP:xe=6,Ae=8,te=4*ee;break;default:throw new Error("invalid format")}const C=new Uint8Array((1+te)*De);let R=0,Q=0;for(let S=0;S<De;++S)C[R++]=0,C.set(D.subarray(Q,Q+te),R),Q+=te,R+=te;if(Ie===j.ImageKind.GRAYSCALE_1BPP&&se){R=0;for(let S=0;S<De;S++){R++;for(let F=0;F<te;F++)C[R++]^=255}}const Y=new Uint8Array([ee>>24&255,ee>>16&255,ee>>8&255,255&ee,De>>24&255,De>>16&255,De>>8&255,255&De,Ae,xe,0,0,0]),J=function W(ve){if(!fe.isNodeJS)return ye(ve);try{let Ie;Ie=parseInt(process.versions.node)>=8?ve:Buffer.from(ve);const ge=__webpack_require__(258).deflateSync(Ie,{level:9});return ge instanceof Uint8Array?ge:new Uint8Array(ge)}catch(Ie){(0,j.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+Ie)}return ye(ve)}(C),ue=new Uint8Array(f.length+36+Y.length+J.length);let m=0;return ue.set(f,m),m+=f.length,H("IHDR",Y,ue,m),m+=12+Y.length,H("IDATA",J,ue,m),m+=12+J.length,H("IEND",new Uint8Array(0),ue,m),G(ue,"image/png",ge)}(Ie,void 0===Ie.kind?j.ImageKind.GRAYSCALE_1BPP:Ie.kind,ge,se)}}();class E{constructor(){this.fontSizeScale=1,this.fontWeight=pe.fontWeight,this.fontSize=0,this.textMatrix=j.IDENTITY_MATRIX,this.fontMatrix=j.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=j.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=pe.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(g,T){this.x=g,this.y=T}}let w=0,x=0,v=0;I.SVGGraphics=ce=class{constructor(f,g,T=!1){(0,k.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new k.DOMSVGFactory,this.current=new E,this.transformMatrix=j.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=f,this.objs=g,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!T,this._operatorIdMapping=[];for(const N in j.OPS)this._operatorIdMapping[j.OPS[N]]=N}save(){this.transformStack.push(this.transformMatrix);const f=this.current;this.extraStack.push(f),this.current=f.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(f){this.save(),this.executeOpTree(f),this.restore()}loadDependencies(f){const g=f.fnArray,T=f.argsArray;for(let N=0,H=g.length;N<H;N++)if(g[N]===j.OPS.dependency)for(const M of T[N]){const W=M.startsWith("g_")?this.commonObjs:this.objs,ye=new Promise(Se=>{W.get(M,Se)});this.current.dependencies.push(ye)}return Promise.all(this.current.dependencies)}transform(f,g,T,N,H,M){this.transformMatrix=j.Util.transform(this.transformMatrix,[f,g,T,N,H,M]),this.tgrp=null}getSVG(f,g){this.viewport=g;const T=this._initialize(g);return this.loadDependencies(f).then(()=>(this.transformMatrix=j.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(f)),T))}convertOpList(f){const g=this._operatorIdMapping,T=f.argsArray,N=f.fnArray,H=[];for(let M=0,W=N.length;M<W;M++){const ye=N[M];H.push({fnId:ye,fn:g[ye],args:T[M]})}return d(H)}executeOpTree(f){for(const g of f){const T=g.fn,H=g.args;switch(0|g.fnId){case j.OPS.beginText:this.beginText();break;case j.OPS.dependency:break;case j.OPS.setLeading:this.setLeading(H);break;case j.OPS.setLeadingMoveText:this.setLeadingMoveText(H[0],H[1]);break;case j.OPS.setFont:this.setFont(H);break;case j.OPS.showText:case j.OPS.showSpacedText:this.showText(H[0]);break;case j.OPS.endText:this.endText();break;case j.OPS.moveText:this.moveText(H[0],H[1]);break;case j.OPS.setCharSpacing:this.setCharSpacing(H[0]);break;case j.OPS.setWordSpacing:this.setWordSpacing(H[0]);break;case j.OPS.setHScale:this.setHScale(H[0]);break;case j.OPS.setTextMatrix:this.setTextMatrix(H[0],H[1],H[2],H[3],H[4],H[5]);break;case j.OPS.setTextRise:this.setTextRise(H[0]);break;case j.OPS.setTextRenderingMode:this.setTextRenderingMode(H[0]);break;case j.OPS.setLineWidth:this.setLineWidth(H[0]);break;case j.OPS.setLineJoin:this.setLineJoin(H[0]);break;case j.OPS.setLineCap:this.setLineCap(H[0]);break;case j.OPS.setMiterLimit:this.setMiterLimit(H[0]);break;case j.OPS.setFillRGBColor:this.setFillRGBColor(H[0],H[1],H[2]);break;case j.OPS.setStrokeRGBColor:this.setStrokeRGBColor(H[0],H[1],H[2]);break;case j.OPS.setStrokeColorN:this.setStrokeColorN(H);break;case j.OPS.setFillColorN:this.setFillColorN(H);break;case j.OPS.shadingFill:this.shadingFill(H[0]);break;case j.OPS.setDash:this.setDash(H[0],H[1]);break;case j.OPS.setRenderingIntent:this.setRenderingIntent(H[0]);break;case j.OPS.setFlatness:this.setFlatness(H[0]);break;case j.OPS.setGState:this.setGState(H[0]);break;case j.OPS.fill:this.fill();break;case j.OPS.eoFill:this.eoFill();break;case j.OPS.stroke:this.stroke();break;case j.OPS.fillStroke:this.fillStroke();break;case j.OPS.eoFillStroke:this.eoFillStroke();break;case j.OPS.clip:this.clip("nonzero");break;case j.OPS.eoClip:this.clip("evenodd");break;case j.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case j.OPS.paintImageXObject:this.paintImageXObject(H[0]);break;case j.OPS.paintInlineImageXObject:this.paintInlineImageXObject(H[0]);break;case j.OPS.paintImageMaskXObject:this.paintImageMaskXObject(H[0]);break;case j.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(H[0],H[1]);break;case j.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case j.OPS.closePath:this.closePath();break;case j.OPS.closeStroke:this.closeStroke();break;case j.OPS.closeFillStroke:this.closeFillStroke();break;case j.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case j.OPS.nextLine:this.nextLine();break;case j.OPS.transform:this.transform(H[0],H[1],H[2],H[3],H[4],H[5]);break;case j.OPS.constructPath:this.constructPath(H[0],H[1]);break;case j.OPS.endPath:this.endPath();break;case 92:this.group(g.items);break;default:(0,j.warn)(`Unimplemented operator ${T}`)}}}setWordSpacing(f){this.current.wordSpacing=f}setCharSpacing(f){this.current.charSpacing=f}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(f,g,T,N,H,M){const W=this.current;W.textMatrix=W.lineMatrix=[f,g,T,N,H,M],W.textMatrixScale=Math.hypot(f,g),W.x=W.lineX=0,W.y=W.lineY=0,W.xcoords=[],W.ycoords=[],W.tspan=this.svgFactory.createElement("svg:tspan"),W.tspan.setAttributeNS(null,"font-family",W.fontFamily),W.tspan.setAttributeNS(null,"font-size",`${h(W.fontSize)}px`),W.tspan.setAttributeNS(null,"y",h(-W.y)),W.txtElement=this.svgFactory.createElement("svg:text"),W.txtElement.append(W.tspan)}beginText(){const f=this.current;f.x=f.lineX=0,f.y=f.lineY=0,f.textMatrix=j.IDENTITY_MATRIX,f.lineMatrix=j.IDENTITY_MATRIX,f.textMatrixScale=1,f.tspan=this.svgFactory.createElement("svg:tspan"),f.txtElement=this.svgFactory.createElement("svg:text"),f.txtgrp=this.svgFactory.createElement("svg:g"),f.xcoords=[],f.ycoords=[]}moveText(f,g){const T=this.current;T.x=T.lineX+=f,T.y=T.lineY+=g,T.xcoords=[],T.ycoords=[],T.tspan=this.svgFactory.createElement("svg:tspan"),T.tspan.setAttributeNS(null,"font-family",T.fontFamily),T.tspan.setAttributeNS(null,"font-size",`${h(T.fontSize)}px`),T.tspan.setAttributeNS(null,"y",h(-T.y))}showText(f){const g=this.current,T=g.font,N=g.fontSize;if(0===N)return;const H=g.fontSizeScale,M=g.charSpacing,W=g.wordSpacing,ye=g.fontDirection,Se=g.textHScale*ye,ve=T.vertical,Ie=ve?1:-1,ge=T.defaultVMetrics,se=N*g.fontMatrix[0];let ee=0;for(const xe of f){if(null===xe){ee+=ye*W;continue}if("number"==typeof xe){ee+=Ie*xe*N/1e3;continue}const te=(xe.isSpace?W:0)+M,D=xe.fontChar;let C,R,Y,Q=xe.width;if(ve){let J;const de=xe.vmetric||ge;J=xe.vmetric?de[1]:.5*Q,J=-J*se,Q=de?-de[0]:Q,C=J/H,R=(ee+de[2]*se)/H}else C=ee/H,R=0;(xe.isInFont||T.missingFile)&&(g.xcoords.push(g.x+C),ve&&g.ycoords.push(-g.y+R),g.tspan.textContent+=D),Y=ve?Q*se-te*ye:Q*se+te*ye,ee+=Y}g.tspan.setAttributeNS(null,"x",g.xcoords.map(h).join(" ")),g.tspan.setAttributeNS(null,"y",ve?g.ycoords.map(h).join(" "):h(-g.y)),ve?g.y-=ee:g.x+=ee*Se,g.tspan.setAttributeNS(null,"font-family",g.fontFamily),g.tspan.setAttributeNS(null,"font-size",`${h(g.fontSize)}px`),g.fontStyle!==pe.fontStyle&&g.tspan.setAttributeNS(null,"font-style",g.fontStyle),g.fontWeight!==pe.fontWeight&&g.tspan.setAttributeNS(null,"font-weight",g.fontWeight);const De=g.textRenderingMode&j.TextRenderingMode.FILL_STROKE_MASK;De===j.TextRenderingMode.FILL||De===j.TextRenderingMode.FILL_STROKE?(g.fillColor!==pe.fillColor&&g.tspan.setAttributeNS(null,"fill",g.fillColor),g.fillAlpha<1&&g.tspan.setAttributeNS(null,"fill-opacity",g.fillAlpha)):g.tspan.setAttributeNS(null,"fill",g.textRenderingMode===j.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(De===j.TextRenderingMode.STROKE||De===j.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(g.tspan,1/(g.textMatrixScale||1));let Ae=g.textMatrix;0!==g.textRise&&(Ae=Ae.slice(),Ae[5]+=g.textRise),g.txtElement.setAttributeNS(null,"transform",`${y(Ae)} scale(${h(Se)}, -1)`),g.txtElement.setAttributeNS(ne,"xml:space","preserve"),g.txtElement.append(g.tspan),g.txtgrp.append(g.txtElement),this._ensureTransformGroup().append(g.txtElement)}setLeadingMoveText(f,g){this.setLeading(-g),this.moveText(f,g)}addFontStyle(f){if(!f.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const g=G(f.data,f.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${f.loadedName}"; src: url(${g}); }\n`}setFont(f){const g=this.current,T=this.commonObjs.get(f[0]);let N=f[1];g.font=T,this.embedFonts&&!T.missingFile&&!this.embeddedFonts[T.loadedName]&&(this.addFontStyle(T),this.embeddedFonts[T.loadedName]=T),g.fontMatrix=T.fontMatrix||j.FONT_IDENTITY_MATRIX;let H="normal";T.black?H="900":T.bold&&(H="bold");const M=T.italic?"italic":"normal";N<0?(N=-N,g.fontDirection=-1):g.fontDirection=1,g.fontSize=N,g.fontFamily=T.loadedName,g.fontWeight=H,g.fontStyle=M,g.tspan=this.svgFactory.createElement("svg:tspan"),g.tspan.setAttributeNS(null,"y",h(-g.y)),g.xcoords=[],g.ycoords=[]}endText(){var g;const f=this.current;f.textRenderingMode&j.TextRenderingMode.ADD_TO_PATH_FLAG&&(null==(g=f.txtElement)?void 0:g.hasChildNodes())&&(f.element=f.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(f){f>0&&(this.current.lineWidth=f)}setLineCap(f){this.current.lineCap=V[f]}setLineJoin(f){this.current.lineJoin=O[f]}setMiterLimit(f){this.current.miterLimit=f}setStrokeAlpha(f){this.current.strokeAlpha=f}setStrokeRGBColor(f,g,T){this.current.strokeColor=j.Util.makeHexColor(f,g,T)}setFillAlpha(f){this.current.fillAlpha=f}setFillRGBColor(f,g,T){this.current.fillColor=j.Util.makeHexColor(f,g,T),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(f){this.current.strokeColor=this._makeColorN_Pattern(f)}setFillColorN(f){this.current.fillColor=this._makeColorN_Pattern(f)}shadingFill(f){const g=this.viewport.width,T=this.viewport.height,N=j.Util.inverseTransform(this.transformMatrix),H=j.Util.applyTransform([0,0],N),M=j.Util.applyTransform([0,T],N),W=j.Util.applyTransform([g,0],N),ye=j.Util.applyTransform([g,T],N),Se=Math.min(H[0],M[0],W[0],ye[0]),ve=Math.min(H[1],M[1],W[1],ye[1]),Ie=Math.max(H[0],M[0],W[0],ye[0]),ge=Math.max(H[1],M[1],W[1],ye[1]),se=this.svgFactory.createElement("svg:rect");se.setAttributeNS(null,"x",Se),se.setAttributeNS(null,"y",ve),se.setAttributeNS(null,"width",Ie-Se),se.setAttributeNS(null,"height",ge-ve),se.setAttributeNS(null,"fill",this._makeShadingPattern(f)),this.current.fillAlpha<1&&se.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(se)}_makeColorN_Pattern(f){return"TilingPattern"===f[0]?this._makeTilingPattern(f):this._makeShadingPattern(f)}_makeTilingPattern(f){const g=f[1],T=f[2],N=f[3]||j.IDENTITY_MATRIX,[H,M,W,ye]=f[4],Se=f[5],ve=f[6],Ie=f[7],ge="shading"+v++,[se,ee,De,Ae]=j.Util.normalizeRect([...j.Util.applyTransform([H,M],N),...j.Util.applyTransform([W,ye],N)]),[xe,te]=j.Util.singularValueDecompose2dScale(N),D=Se*xe,C=ve*te,R=this.svgFactory.createElement("svg:pattern");R.setAttributeNS(null,"id",ge),R.setAttributeNS(null,"patternUnits","userSpaceOnUse"),R.setAttributeNS(null,"width",D),R.setAttributeNS(null,"height",C),R.setAttributeNS(null,"x",`${se}`),R.setAttributeNS(null,"y",`${ee}`);const Q=this.svg,Y=this.transformMatrix,J=this.current.fillColor,de=this.current.strokeColor,ue=this.svgFactory.create(De-se,Ae-ee);if(this.svg=ue,this.transformMatrix=N,2===Ie){const m=j.Util.makeHexColor(...g);this.current.fillColor=m,this.current.strokeColor=m}return this.executeOpTree(this.convertOpList(T)),this.svg=Q,this.transformMatrix=Y,this.current.fillColor=J,this.current.strokeColor=de,R.append(ue.childNodes[0]),this.defs.append(R),`url(#${ge})`}_makeShadingPattern(f){switch("string"==typeof f&&(f=this.objs.get(f)),f[0]){case"RadialAxial":const g="shading"+v++,T=f[3];let N;switch(f[1]){case"axial":const H=f[4],M=f[5];N=this.svgFactory.createElement("svg:linearGradient"),N.setAttributeNS(null,"id",g),N.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),N.setAttributeNS(null,"x1",H[0]),N.setAttributeNS(null,"y1",H[1]),N.setAttributeNS(null,"x2",M[0]),N.setAttributeNS(null,"y2",M[1]);break;case"radial":const W=f[4],ye=f[5],Se=f[6],ve=f[7];N=this.svgFactory.createElement("svg:radialGradient"),N.setAttributeNS(null,"id",g),N.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),N.setAttributeNS(null,"cx",ye[0]),N.setAttributeNS(null,"cy",ye[1]),N.setAttributeNS(null,"r",ve),N.setAttributeNS(null,"fx",W[0]),N.setAttributeNS(null,"fy",W[1]),N.setAttributeNS(null,"fr",Se);break;default:throw new Error(`Unknown RadialAxial type: ${f[1]}`)}for(const H of T){const M=this.svgFactory.createElement("svg:stop");M.setAttributeNS(null,"offset",H[0]),M.setAttributeNS(null,"stop-color",H[1]),N.append(M)}return this.defs.append(N),`url(#${g})`;case"Mesh":return(0,j.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${f[0]}`)}}setDash(f,g){this.current.dashArray=f,this.current.dashPhase=g}constructPath(f,g){const T=this.current;let N=T.x,H=T.y,M=[],W=0;for(const ye of f)switch(0|ye){case j.OPS.rectangle:N=g[W++],H=g[W++];const Ie=N+g[W++],ge=H+g[W++];M.push("M",h(N),h(H),"L",h(Ie),h(H),"L",h(Ie),h(ge),"L",h(N),h(ge),"Z");break;case j.OPS.moveTo:N=g[W++],H=g[W++],M.push("M",h(N),h(H));break;case j.OPS.lineTo:N=g[W++],H=g[W++],M.push("L",h(N),h(H));break;case j.OPS.curveTo:N=g[W+4],H=g[W+5],M.push("C",h(g[W]),h(g[W+1]),h(g[W+2]),h(g[W+3]),h(N),h(H)),W+=6;break;case j.OPS.curveTo2:M.push("C",h(N),h(H),h(g[W]),h(g[W+1]),h(g[W+2]),h(g[W+3])),N=g[W+2],H=g[W+3],W+=4;break;case j.OPS.curveTo3:N=g[W+2],H=g[W+3],M.push("C",h(g[W]),h(g[W+1]),h(N),h(H),h(N),h(H)),W+=4;break;case j.OPS.closePath:M.push("Z")}M=M.join(" "),T.path&&f.length>0&&f[0]!==j.OPS.rectangle&&f[0]!==j.OPS.moveTo?M=T.path.getAttributeNS(null,"d")+M:(T.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(T.path)),T.path.setAttributeNS(null,"d",M),T.path.setAttributeNS(null,"fill","none"),T.element=T.path,T.setCurrentPoint(N,H)}endPath(){const f=this.current;if(f.path=null,!this.pendingClip)return;if(!f.element)return void(this.pendingClip=null);const g="clippath"+w++,T=this.svgFactory.createElement("svg:clipPath");T.setAttributeNS(null,"id",g),T.setAttributeNS(null,"transform",y(this.transformMatrix));const N=f.element.cloneNode(!0);if(N.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,T.append(N),this.defs.append(T),f.activeClipUrl){f.clipGroup=null;for(const H of this.extraStack)H.clipGroup=null;T.setAttributeNS(null,"clip-path",f.activeClipUrl)}f.activeClipUrl=`url(#${g})`,this.tgrp=null}clip(f){this.pendingClip=f}closePath(){const f=this.current;if(f.path){const g=`${f.path.getAttributeNS(null,"d")}Z`;f.path.setAttributeNS(null,"d",g)}}setLeading(f){this.current.leading=-f}setTextRise(f){this.current.textRise=f}setTextRenderingMode(f){this.current.textRenderingMode=f}setHScale(f){this.current.textHScale=f/100}setRenderingIntent(f){}setFlatness(f){}setGState(f){for(const[g,T]of f)switch(g){case"LW":this.setLineWidth(T);break;case"LC":this.setLineCap(T);break;case"LJ":this.setLineJoin(T);break;case"ML":this.setMiterLimit(T);break;case"D":this.setDash(T[0],T[1]);break;case"RI":this.setRenderingIntent(T);break;case"FL":this.setFlatness(T);break;case"Font":this.setFont(T);break;case"CA":this.setStrokeAlpha(T);break;case"ca":this.setFillAlpha(T);break;default:(0,j.warn)(`Unimplemented graphic state operator ${g}`)}}fill(){const f=this.current;f.element&&(f.element.setAttributeNS(null,"fill",f.fillColor),f.element.setAttributeNS(null,"fill-opacity",f.fillAlpha),this.endPath())}stroke(){const f=this.current;f.element&&(this._setStrokeAttributes(f.element),f.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(f,g=1){const T=this.current;let N=T.dashArray;1!==g&&N.length>0&&(N=N.map(function(H){return g*H})),f.setAttributeNS(null,"stroke",T.strokeColor),f.setAttributeNS(null,"stroke-opacity",T.strokeAlpha),f.setAttributeNS(null,"stroke-miterlimit",h(T.miterLimit)),f.setAttributeNS(null,"stroke-linecap",T.lineCap),f.setAttributeNS(null,"stroke-linejoin",T.lineJoin),f.setAttributeNS(null,"stroke-width",h(g*T.lineWidth)+"px"),f.setAttributeNS(null,"stroke-dasharray",N.map(h).join(" ")),f.setAttributeNS(null,"stroke-dashoffset",h(g*T.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x","0"),f.setAttributeNS(null,"y","0"),f.setAttributeNS(null,"width","1px"),f.setAttributeNS(null,"height","1px"),f.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(f)}paintImageXObject(f){const g=f.startsWith("g_")?this.commonObjs.get(f):this.objs.get(f);g?this.paintInlineImageXObject(g):(0,j.warn)(`Dependent image with object ID ${f} is not ready yet`)}paintInlineImageXObject(f,g){const T=f.width,N=f.height,H=B(f,this.forceDataSchema,!!g),M=this.svgFactory.createElement("svg:rect");M.setAttributeNS(null,"x","0"),M.setAttributeNS(null,"y","0"),M.setAttributeNS(null,"width",h(T)),M.setAttributeNS(null,"height",h(N)),this.current.element=M,this.clip("nonzero");const W=this.svgFactory.createElement("svg:image");W.setAttributeNS(P,"xlink:href",H),W.setAttributeNS(null,"x","0"),W.setAttributeNS(null,"y",h(-N)),W.setAttributeNS(null,"width",h(T)+"px"),W.setAttributeNS(null,"height",h(N)+"px"),W.setAttributeNS(null,"transform",`scale(${h(1/T)} ${h(-1/N)})`),g?g.append(W):this._ensureTransformGroup().append(W)}paintImageMaskXObject(f){const g=this.current,T=f.width,N=f.height,H=g.fillColor;g.maskId="mask"+x++;const M=this.svgFactory.createElement("svg:mask");M.setAttributeNS(null,"id",g.maskId);const W=this.svgFactory.createElement("svg:rect");W.setAttributeNS(null,"x","0"),W.setAttributeNS(null,"y","0"),W.setAttributeNS(null,"width",h(T)),W.setAttributeNS(null,"height",h(N)),W.setAttributeNS(null,"fill",H),W.setAttributeNS(null,"mask",`url(#${g.maskId})`),this.defs.append(M),this._ensureTransformGroup().append(W),this.paintInlineImageXObject(f,M)}paintFormXObjectBegin(f,g){if(Array.isArray(f)&&6===f.length&&this.transform(f[0],f[1],f[2],f[3],f[4],f[5]),g){const T=g[2]-g[0],N=g[3]-g[1],H=this.svgFactory.createElement("svg:rect");H.setAttributeNS(null,"x",g[0]),H.setAttributeNS(null,"y",g[1]),H.setAttributeNS(null,"width",h(T)),H.setAttributeNS(null,"height",h(N)),this.current.element=H,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(f){const g=this.svgFactory.create(f.width,f.height),T=this.svgFactory.createElement("svg:defs");g.append(T),this.defs=T;const N=this.svgFactory.createElement("svg:g");return N.setAttributeNS(null,"transform",y(f.transform)),g.append(N),this.svg=N,g}_ensureClipGroup(){if(!this.current.clipGroup){const f=this.svgFactory.createElement("svg:g");f.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(f),this.current.clipGroup=f}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFNodeStream=void 0;var k=_e(1),j=_e(33);const fe=__webpack_require__(172),ce=__webpack_require__(1),pe=__webpack_require__(779),ne=__webpack_require__(558),P=/^file:\/\/\/[a-zA-Z]:\//;I.PDFNodeStream=class O{constructor(v){this.source=v,this.url=function V(x){const v=ne.parse(x);return"file:"===v.protocol||v.host?v:/^[a-z]:[/\\]/i.test(x)?ne.parse(`file:///${x}`):(v.host||(v.protocol="file:"),v)}(v.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&v.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var v,f;return null!=(f=null==(v=this._fullRequestReader)?void 0:v._loaded)?f:0}getFullReader(){return(0,k.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new y(this):new d(this),this._fullRequestReader}getRangeReader(v,f){if(f<=this._progressiveDataLength)return null;const g=this.isFsUrl?new w(this,v,f):new h(this,v,f);return this._rangeRequestReaders.push(g),g}cancelAllRequests(v){this._fullRequestReader&&this._fullRequestReader.cancel(v);for(const f of this._rangeRequestReaders.slice(0))f.cancel(v)}};class G{constructor(v){this._url=v.url,this._done=!1,this._storedError=null,this.onProgress=null;const f=v.source;this._contentLength=f.length,this._loaded=0,this._filename=null,this._disableRange=f.disableRange||!1,this._rangeChunkSize=f.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!f.disableStream,this._isRangeSupported=!f.disableRange,this._readableStream=null,this._readCapability=(0,k.createPromiseCapability)(),this._headersCapability=(0,k.createPromiseCapability)()}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}read(){var v=this;return _asyncToGenerator(function*(){if(yield v._readCapability.promise,v._done)return{value:void 0,done:!0};if(v._storedError)throw v._storedError;const f=v._readableStream.read();return null===f?(v._readCapability=(0,k.createPromiseCapability)(),v.read()):(v._loaded+=f.length,v.onProgress&&v.onProgress({loaded:v._loaded,total:v._contentLength}),{value:new Uint8Array(f).buffer,done:!1})})()}cancel(v){this._readableStream?this._readableStream.destroy(v):this._error(v)}_error(v){this._storedError=v,this._readCapability.resolve()}_setReadableStream(v){this._readableStream=v,v.on("readable",()=>{this._readCapability.resolve()}),v.on("end",()=>{v.destroy(),this._done=!0,this._readCapability.resolve()}),v.on("error",f=>{this._error(f)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new k.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class B{constructor(v){this._url=v.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,k.createPromiseCapability)(),this._isStreamingSupported=!v.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}read(){var v=this;return _asyncToGenerator(function*(){if(yield v._readCapability.promise,v._done)return{value:void 0,done:!0};if(v._storedError)throw v._storedError;const f=v._readableStream.read();return null===f?(v._readCapability=(0,k.createPromiseCapability)(),v.read()):(v._loaded+=f.length,v.onProgress&&v.onProgress({loaded:v._loaded}),{value:new Uint8Array(f).buffer,done:!1})})()}cancel(v){this._readableStream?this._readableStream.destroy(v):this._error(v)}_error(v){this._storedError=v,this._readCapability.resolve()}_setReadableStream(v){this._readableStream=v,v.on("readable",()=>{this._readCapability.resolve()}),v.on("end",()=>{v.destroy(),this._done=!0,this._readCapability.resolve()}),v.on("error",f=>{this._error(f)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function E(x,v){return{protocol:x.protocol,auth:x.auth,host:x.hostname,port:x.port,path:x.path,method:"GET",headers:v}}class d extends G{constructor(v){super(v);const f=g=>{if(404===g.statusCode){const M=new k.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=M,void this._headersCapability.reject(M)}this._headersCapability.resolve(),this._setReadableStream(g);const T=M=>this._readableStream.headers[M.toLowerCase()],{allowRangeRequests:N,suggestedLength:H}=(0,j.validateRangeRequestCapabilities)({getResponseHeader:T,isHttp:v.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=N,this._contentLength=H||this._contentLength,this._filename=(0,j.extractFilenameFromHeader)(T)};this._request=null,this._request="http:"===this._url.protocol?ce.request(E(this._url,v.httpHeaders),f):pe.request(E(this._url,v.httpHeaders),f),this._request.on("error",g=>{this._storedError=g,this._headersCapability.reject(g)}),this._request.end()}}class h extends B{constructor(v,f,g){super(v),this._httpHeaders={};for(const N in v.httpHeaders){const H=v.httpHeaders[N];void 0!==H&&(this._httpHeaders[N]=H)}this._httpHeaders.Range=`bytes=${f}-${g-1}`;const T=N=>{if(404!==N.statusCode)this._setReadableStream(N);else{const H=new k.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=H}};this._request=null,this._request="http:"===this._url.protocol?ce.request(E(this._url,this._httpHeaders),T):pe.request(E(this._url,this._httpHeaders),T),this._request.on("error",N=>{this._storedError=N}),this._request.end()}}class y extends G{constructor(v){super(v);let f=decodeURIComponent(this._url.path);P.test(this._url.href)&&(f=f.replace(/^\//,"")),fe.lstat(f,(g,T)=>{if(g)return"ENOENT"===g.code&&(g=new k.MissingPDFException(`Missing PDF "${f}".`)),this._storedError=g,void this._headersCapability.reject(g);this._contentLength=T.size,this._setReadableStream(fe.createReadStream(f)),this._headersCapability.resolve()})}}class w extends B{constructor(v,f,g){super(v);let T=decodeURIComponent(this._url.path);P.test(this._url.href)&&(T=T.replace(/^\//,"")),this._setReadableStream(fe.createReadStream(T,{start:f,end:g-1}))}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.createResponseStatusError=function ne(V,O){return 404===V||0===V&&O.startsWith("file:")?new k.MissingPDFException('Missing PDF "'+O+'".'):new k.UnexpectedResponseException(`Unexpected server response (${V}) while retrieving PDF "${O}".`,V)},I.extractFilenameFromHeader=function pe(V){const O=V("Content-Disposition");if(O){let G=(0,j.getFilenameFromContentDispositionHeader)(O);if(G.includes("%"))try{G=decodeURIComponent(G)}catch(B){}if((0,fe.isPdfFile)(G))return G}return null},I.validateRangeRequestCapabilities=function ce({getResponseHeader:V,isHttp:O,rangeChunkSize:G,disableRange:B}){const E={allowRangeRequests:!1,suggestedLength:void 0},d=parseInt(V("Content-Length"),10);return!Number.isInteger(d)||(E.suggestedLength=d,d<=2*G)||B||!O||"bytes"!==V("Accept-Ranges")||"identity"!==(V("Content-Encoding")||"identity")||(E.allowRangeRequests=!0),E},I.validateResponseStatus=function P(V){return 200===V||206===V};var k=_e(1),j=_e(34),fe=_e(8)},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.getFilenameFromContentDispositionHeader=function j(fe){let ce=!0,pe=ne("filename\\*","i").exec(fe);if(pe){pe=pe[1];let d=G(pe);return d=unescape(d),d=B(d),d=E(d),V(d)}if(pe=function O(d){const h=[];let y;const w=ne("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(y=w.exec(d));){let[,v,f,g]=y;if(v=parseInt(v,10),v in h){if(0===v)break}else h[v]=[f,g]}const x=[];for(let v=0;v<h.length&&v in h;++v){let[f,g]=h[v];g=G(g),f&&(g=unescape(g),0===v&&(g=B(g))),x.push(g)}return x.join("")}(fe),pe)return V(E(pe));if(pe=ne("filename","i").exec(fe),pe){pe=pe[1];let d=G(pe);return d=E(d),V(d)}function ne(d,h){return new RegExp("(?:^|;)\\s*"+d+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',h)}function P(d,h){if(d){if(!/^[\x00-\xFF]+$/.test(h))return h;try{const y=new TextDecoder(d,{fatal:!0}),w=(0,k.stringToBytes)(h);h=y.decode(w),ce=!1}catch(y){}}return h}function V(d){return ce&&/[\x80-\xff]/.test(d)&&(d=P("utf-8",d),ce&&(d=P("iso-8859-1",d))),d}function G(d){if(d.startsWith('"')){const h=d.slice(1).split('\\"');for(let y=0;y<h.length;++y){const w=h[y].indexOf('"');-1!==w&&(h[y]=h[y].slice(0,w),h.length=y+1),h[y]=h[y].replace(/\\(.)/g,"$1")}d=h.join('"')}return d}function B(d){const h=d.indexOf("'");return-1===h?d:P(d.slice(0,h),d.slice(h+1).replace(/^[^']*'/,""))}function E(d){return!d.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(d)?d:d.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(h,y,w,x){if("q"===w||"Q"===w)return P(y,x=(x=x.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(v,f){return String.fromCharCode(parseInt(f,16))}));try{x=atob(x)}catch(v){}return P(y,x)})}return""};var k=_e(1)},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFNetworkStream=void 0;var k=_e(1),j=_e(33);class ne{constructor(B,E={}){this.url=B,this.isHttp=/^https?:/i.test(B),this.httpHeaders=this.isHttp&&E.httpHeaders||Object.create(null),this.withCredentials=E.withCredentials||!1,this.getXhr=E.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(B,E,d){const h={begin:B,end:E};for(const y in d)h[y]=d[y];return this.request(h)}requestFull(B){return this.request(B)}request(B){const E=this.getXhr(),d=this.currXhrId++,h=this.pendingRequests[d]={xhr:E};E.open("GET",this.url),E.withCredentials=this.withCredentials;for(const y in this.httpHeaders){const w=this.httpHeaders[y];void 0!==w&&E.setRequestHeader(y,w)}return this.isHttp&&"begin"in B&&"end"in B?(E.setRequestHeader("Range",`bytes=${B.begin}-${B.end-1}`),h.expectedStatus=206):h.expectedStatus=200,E.responseType="arraybuffer",B.onError&&(E.onerror=function(y){B.onError(E.status)}),E.onreadystatechange=this.onStateChange.bind(this,d),E.onprogress=this.onProgress.bind(this,d),h.onHeadersReceived=B.onHeadersReceived,h.onDone=B.onDone,h.onError=B.onError,h.onProgress=B.onProgress,E.send(null),d}onProgress(B,E){var h;const d=this.pendingRequests[B];!d||null==(h=d.onProgress)||h.call(d,E)}onStateChange(B,E){var v,f,g;const d=this.pendingRequests[B];if(!d)return;const h=d.xhr;if(h.readyState>=2&&d.onHeadersReceived&&(d.onHeadersReceived(),delete d.onHeadersReceived),4!==h.readyState||!(B in this.pendingRequests))return;if(delete this.pendingRequests[B],0===h.status&&this.isHttp)return void(null==(v=d.onError)||v.call(d,h.status));const y=h.status||200;if((200!==y||206!==d.expectedStatus)&&y!==d.expectedStatus)return void(null==(f=d.onError)||f.call(d,h.status));const x=function pe(G){const B=G.response;return"string"!=typeof B?B:(0,k.stringToBytes)(B).buffer}(h);if(206===y){const T=h.getResponseHeader("Content-Range"),N=/bytes (\d+)-(\d+)\/(\d+)/.exec(T);d.onDone({begin:parseInt(N[1],10),chunk:x})}else x?d.onDone({begin:0,chunk:x}):null==(g=d.onError)||g.call(d,h.status)}getRequestXhr(B){return this.pendingRequests[B].xhr}isPendingRequest(B){return B in this.pendingRequests}abortRequest(B){const E=this.pendingRequests[B].xhr;delete this.pendingRequests[B],E.abort()}}I.PDFNetworkStream=class P{constructor(B){this._source=B,this._manager=new ne(B.url,{httpHeaders:B.httpHeaders,withCredentials:B.withCredentials}),this._rangeChunkSize=B.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(B){const E=this._rangeRequestReaders.indexOf(B);E>=0&&this._rangeRequestReaders.splice(E,1)}getFullReader(){return(0,k.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new V(this._manager,this._source),this._fullRequestReader}getRangeReader(B,E){const d=new O(this._manager,B,E);return d.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(d),d}cancelAllRequests(B){var E;null==(E=this._fullRequestReader)||E.cancel(B);for(const d of this._rangeRequestReaders.slice(0))d.cancel(B)}};class V{constructor(B,E){this._manager=B;const d={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=E.url,this._fullRequestId=B.requestFull(d),this._headersReceivedCapability=(0,k.createPromiseCapability)(),this._disableRange=E.disableRange||!1,this._contentLength=E.length,this._rangeChunkSize=E.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 B=this._fullRequestId,E=this._manager.getRequestXhr(B),d=w=>E.getResponseHeader(w),{allowRangeRequests:h,suggestedLength:y}=(0,j.validateRangeRequestCapabilities)({getResponseHeader:d,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});h&&(this._isRangeSupported=!0),this._contentLength=y||this._contentLength,this._filename=(0,j.extractFilenameFromHeader)(d),this._isRangeSupported&&this._manager.abortRequest(B),this._headersReceivedCapability.resolve()}_onDone(B){if(B&&(this._requests.length>0?this._requests.shift().resolve({value:B.chunk,done:!1}):this._cachedChunks.push(B.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const E of this._requests)E.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(B){this._storedError=(0,j.createResponseStatusError)(B,this._url),this._headersReceivedCapability.reject(this._storedError);for(const E of this._requests)E.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(B){var E;null==(E=this.onProgress)||E.call(this,{loaded:B.loaded,total:B.lengthComputable?B.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}read(){var B=this;return _asyncToGenerator(function*(){if(B._storedError)throw B._storedError;if(B._cachedChunks.length>0)return{value:B._cachedChunks.shift(),done:!1};if(B._done)return{value:void 0,done:!0};const E=(0,k.createPromiseCapability)();return B._requests.push(E),E.promise})()}cancel(B){this._done=!0,this._headersReceivedCapability.reject(B);for(const E of this._requests)E.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class O{constructor(B,E,d){this._manager=B;const h={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=B.url,this._requestId=B.requestRange(E,d,h),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var B;null==(B=this.onClosed)||B.call(this,this)}_onDone(B){const E=B.chunk;this._requests.length>0?this._requests.shift().resolve({value:E,done:!1}):this._queuedChunk=E,this._done=!0;for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(B){this._storedError=(0,j.createResponseStatusError)(B,this._url);for(const E of this._requests)E.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(B){var E;this.isStreamingSupported||null==(E=this.onProgress)||E.call(this,{loaded:B.loaded})}get isStreamingSupported(){return!1}read(){var B=this;return _asyncToGenerator(function*(){if(B._storedError)throw B._storedError;if(null!==B._queuedChunk){const d=B._queuedChunk;return B._queuedChunk=null,{value:d,done:!1}}if(B._done)return{value:void 0,done:!0};const E=(0,k.createPromiseCapability)();return B._requests.push(E),E.promise})()}cancel(B){this._done=!0;for(const E of this._requests)E.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(Re,I,_e)=>{Object.defineProperty(I,"__esModule",{value:!0}),I.PDFFetchStream=void 0;var k=_e(1),j=_e(33);function fe(V,O,G){return{method:"GET",headers:V,signal:G.signal,mode:"cors",credentials:O?"include":"same-origin",redirect:"follow"}}function ce(V){const O=new Headers;for(const G in V){const B=V[G];void 0!==B&&O.append(G,B)}return O}I.PDFFetchStream=class pe{constructor(O){this.source=O,this.isHttp=/^https?:/i.test(O.url),this.httpHeaders=this.isHttp&&O.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var O,G;return null!=(G=null==(O=this._fullRequestReader)?void 0:O._loaded)?G:0}getFullReader(){return(0,k.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new ne(this),this._fullRequestReader}getRangeReader(O,G){if(G<=this._progressiveDataLength)return null;const B=new P(this,O,G);return this._rangeRequestReaders.push(B),B}cancelAllRequests(O){this._fullRequestReader&&this._fullRequestReader.cancel(O);for(const G of this._rangeRequestReaders.slice(0))G.cancel(O)}};class ne{constructor(O){this._stream=O,this._reader=null,this._loaded=0,this._filename=null;const G=O.source;this._withCredentials=G.withCredentials||!1,this._contentLength=G.length,this._headersCapability=(0,k.createPromiseCapability)(),this._disableRange=G.disableRange||!1,this._rangeChunkSize=G.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!G.disableStream,this._isRangeSupported=!G.disableRange,this._headers=ce(this._stream.httpHeaders);const B=G.url;fetch(B,fe(this._headers,this._withCredentials,this._abortController)).then(E=>{if(!(0,j.validateResponseStatus)(E.status))throw(0,j.createResponseStatusError)(E.status,B);this._reader=E.body.getReader(),this._headersCapability.resolve();const d=w=>E.headers.get(w),{allowRangeRequests:h,suggestedLength:y}=(0,j.validateRangeRequestCapabilities)({getResponseHeader:d,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=h,this._contentLength=y||this._contentLength,this._filename=(0,j.extractFilenameFromHeader)(d),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new k.AbortException("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}read(){var O=this;return _asyncToGenerator(function*(){yield O._headersCapability.promise;const{value:G,done:B}=yield O._reader.read();return B?{value:G,done:B}:(O._loaded+=G.byteLength,O.onProgress&&O.onProgress({loaded:O._loaded,total:O._contentLength}),{value:new Uint8Array(G).buffer,done:!1})})()}cancel(O){this._reader&&this._reader.cancel(O),this._abortController.abort()}}class P{constructor(O,G,B){this._stream=O,this._reader=null,this._loaded=0;const E=O.source;this._withCredentials=E.withCredentials||!1,this._readCapability=(0,k.createPromiseCapability)(),this._isStreamingSupported=!E.disableStream,this._abortController=new AbortController,this._headers=ce(this._stream.httpHeaders),this._headers.append("Range",`bytes=${G}-${B-1}`);const d=E.url;fetch(d,fe(this._headers,this._withCredentials,this._abortController)).then(h=>{if(!(0,j.validateResponseStatus)(h.status))throw(0,j.createResponseStatusError)(h.status,d);this._readCapability.resolve(),this._reader=h.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){var O=this;return _asyncToGenerator(function*(){yield O._readCapability.promise;const{value:G,done:B}=yield O._reader.read();return B?{value:G,done:B}:(O._loaded+=G.byteLength,O.onProgress&&O.onProgress({loaded:O._loaded}),{value:new Uint8Array(G).buffer,done:!1})})()}cancel(O){this._reader&&this._reader.cancel(O),this._abortController.abort()}}}],__webpack_module_cache__={};function __w_pdfjs_require__(Re){var I=__webpack_module_cache__[Re];if(void 0!==I)return I.exports;var _e=__webpack_module_cache__[Re]={exports:{}};return __webpack_modules__[Re](_e,_e.exports,__w_pdfjs_require__),_e.exports}var __nested_webpack_exports__={};return(()=>{var Re=__nested_webpack_exports__;Object.defineProperty(Re,"__esModule",{value:!0}),Object.defineProperty(Re,"AnnotationEditorLayer",{enumerable:!0,get:function(){return j.AnnotationEditorLayer}}),Object.defineProperty(Re,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return I.AnnotationEditorParamsType}}),Object.defineProperty(Re,"AnnotationEditorType",{enumerable:!0,get:function(){return I.AnnotationEditorType}}),Object.defineProperty(Re,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return fe.AnnotationEditorUIManager}}),Object.defineProperty(Re,"AnnotationLayer",{enumerable:!0,get:function(){return ce.AnnotationLayer}}),Object.defineProperty(Re,"AnnotationMode",{enumerable:!0,get:function(){return I.AnnotationMode}}),Object.defineProperty(Re,"CMapCompressionType",{enumerable:!0,get:function(){return I.CMapCompressionType}}),Object.defineProperty(Re,"GlobalWorkerOptions",{enumerable:!0,get:function(){return pe.GlobalWorkerOptions}}),Object.defineProperty(Re,"InvalidPDFException",{enumerable:!0,get:function(){return I.InvalidPDFException}}),Object.defineProperty(Re,"LoopbackPort",{enumerable:!0,get:function(){return _e.LoopbackPort}}),Object.defineProperty(Re,"MissingPDFException",{enumerable:!0,get:function(){return I.MissingPDFException}}),Object.defineProperty(Re,"OPS",{enumerable:!0,get:function(){return I.OPS}}),Object.defineProperty(Re,"PDFDataRangeTransport",{enumerable:!0,get:function(){return _e.PDFDataRangeTransport}}),Object.defineProperty(Re,"PDFDateString",{enumerable:!0,get:function(){return k.PDFDateString}}),Object.defineProperty(Re,"PDFWorker",{enumerable:!0,get:function(){return _e.PDFWorker}}),Object.defineProperty(Re,"PasswordResponses",{enumerable:!0,get:function(){return I.PasswordResponses}}),Object.defineProperty(Re,"PermissionFlag",{enumerable:!0,get:function(){return I.PermissionFlag}}),Object.defineProperty(Re,"PixelsPerInch",{enumerable:!0,get:function(){return k.PixelsPerInch}}),Object.defineProperty(Re,"RenderingCancelledException",{enumerable:!0,get:function(){return k.RenderingCancelledException}}),Object.defineProperty(Re,"SVGGraphics",{enumerable:!0,get:function(){return V.SVGGraphics}}),Object.defineProperty(Re,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return I.UNSUPPORTED_FEATURES}}),Object.defineProperty(Re,"UnexpectedResponseException",{enumerable:!0,get:function(){return I.UnexpectedResponseException}}),Object.defineProperty(Re,"Util",{enumerable:!0,get:function(){return I.Util}}),Object.defineProperty(Re,"VerbosityLevel",{enumerable:!0,get:function(){return I.VerbosityLevel}}),Object.defineProperty(Re,"XfaLayer",{enumerable:!0,get:function(){return O.XfaLayer}}),Object.defineProperty(Re,"build",{enumerable:!0,get:function(){return _e.build}}),Object.defineProperty(Re,"createPromiseCapability",{enumerable:!0,get:function(){return I.createPromiseCapability}}),Object.defineProperty(Re,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return I.createValidAbsoluteUrl}}),Object.defineProperty(Re,"getDocument",{enumerable:!0,get:function(){return _e.getDocument}}),Object.defineProperty(Re,"getFilenameFromUrl",{enumerable:!0,get:function(){return k.getFilenameFromUrl}}),Object.defineProperty(Re,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return k.getPdfFilenameFromUrl}}),Object.defineProperty(Re,"getXfaPageViewport",{enumerable:!0,get:function(){return k.getXfaPageViewport}}),Object.defineProperty(Re,"isPdfFile",{enumerable:!0,get:function(){return k.isPdfFile}}),Object.defineProperty(Re,"loadScript",{enumerable:!0,get:function(){return k.loadScript}}),Object.defineProperty(Re,"renderTextLayer",{enumerable:!0,get:function(){return P.renderTextLayer}}),Object.defineProperty(Re,"shadow",{enumerable:!0,get:function(){return I.shadow}}),Object.defineProperty(Re,"version",{enumerable:!0,get:function(){return _e.version}});var I=__w_pdfjs_require__(1),_e=__w_pdfjs_require__(4),k=__w_pdfjs_require__(8),j=__w_pdfjs_require__(22),fe=__w_pdfjs_require__(7),ce=__w_pdfjs_require__(27),pe=__w_pdfjs_require__(15),ne=__w_pdfjs_require__(3),P=__w_pdfjs_require__(30),V=__w_pdfjs_require__(31),O=__w_pdfjs_require__(29);if(ne.isNodeJS){const{PDFNodeStream:E}=__w_pdfjs_require__(32);(0,_e.setPDFNetworkStreamFactory)(d=>new E(d))}else{const{PDFNetworkStream:E}=__w_pdfjs_require__(35),{PDFFetchStream:d}=__w_pdfjs_require__(36);(0,_e.setPDFNetworkStreamFactory)(h=>(0,k.isValidFetchUrl)(h.url)?new d(h):new E(h))}})(),__nested_webpack_exports__})(),module.exports=_e()},786:Re=>{function I(k,j,fe,ce,pe,ne,P){try{var V=k[ne](P),O=V.value}catch(G){return void fe(G)}V.done?j(O):Promise.resolve(O).then(ce,pe)}Re.exports=function _e(k){return function(){var j=this,fe=arguments;return new Promise(function(ce,pe){var ne=k.apply(j,fe);function P(O){I(ne,ce,pe,P,V,"next",O)}function V(O){I(ne,ce,pe,P,V,"throw",O)}P(void 0)})}},Re.exports.__esModule=!0,Re.exports.default=Re.exports},414:()=>{},172:()=>{},1:()=>{},779:()=>{},558:()=>{},258:()=>{}},Re=>{Re(Re.s=850)}]);
2
2
  //# sourceMappingURL=main.js.map