var b_=Object.create;var jo=Object.defineProperty,y_=Object.defineProperties,C_=Object.getOwnPropertyDescriptor,x_=Object.getOwnPropertyDescriptors,M_=Object.getOwnPropertyNames,Zo=Object.getOwnPropertySymbols,Pp=Object.getPrototypeOf,ed=Object.prototype.hasOwnProperty,kp=Object.prototype.propertyIsEnumerable,A_=Reflect.get;var Jh=(i,e)=>(e=Symbol[i])?e:Symbol.for("Symbol."+i);var zp=(i,e,t)=>e in i?jo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Z=(i,e)=>{for(var t in e||={})ed.call(e,t)&&zp(i,t,e[t]);if(Zo)for(var t of Zo(e))kp.call(e,t)&&zp(i,t,e[t]);return i},se=(i,e)=>y_(i,x_(e));var Ds=(i,e)=>{var t={};for(var n in i)ed.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(i!=null&&Zo)for(var n of Zo(i))e.indexOf(n)<0&&kp.call(i,n)&&(t[n]=i[n]);return t};var oe=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Hp=(i,e)=>{for(var t in e)jo(i,t,{get:e[t],enumerable:!0})},__=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M_(e))!ed.call(i,r)&&r!==t&&jo(i,r,{get:()=>e[r],enumerable:!(n=C_(e,r))||n.enumerable});return i};var S_=(i,e,t)=>(t=i!=null?b_(Pp(i)):{},__(e||!i||!i.__esModule?jo(t,"default",{value:i,enumerable:!0}):t,i));var ir=(i,e,t)=>A_(Pp(i),t,e);var $=(i,e,t)=>new Promise((n,r)=>{var s=l=>{try{o(t.next(l))}catch(c){r(c)}},a=l=>{try{o(t.throw(l))}catch(c){r(c)}},o=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,a);o((t=t.apply(i,e)).next())}),Uo=function(i,e){this[0]=i,this[1]=e},td=(i,e,t)=>{var n=(a,o,l,c)=>{try{var h=t[a](o),d=(o=h.value)instanceof Uo,u=h.done;Promise.resolve(d?o[0]:o).then(p=>d?n(a==="return"?a:"next",o[1]?{done:p.done,value:p.value}:p,l,c):l({value:p,done:u})).catch(p=>n("throw",p,l,c))}catch(p){c(p)}},r=a=>s[a]=o=>new Promise((l,c)=>n(a,o,l,c)),s={};return t=t.apply(i,e),s[Jh("asyncIterator")]=()=>s,r("next"),r("throw"),r("return"),s};var Fp=(i,e,t)=>(e=i[Jh("asyncIterator")])?e.call(i):(i=i[Jh("iterator")](),e={},t=(n,r)=>(r=i[n])&&(e[n]=s=>new Promise((a,o,l)=>(s=r.call(i,s),l=s.done,Promise.resolve(s.value).then(c=>a({value:c,done:l}),o)))),t("next"),t("return"),e);var mc=oe(Hf=>{(function(){Hf.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Hf)});var z1=oe((GC,Xi)=>{(function(){var i,e,t,n,r,s,a,o=[].slice,l={}.hasOwnProperty;i=function(){var c,h,d,u,p,f;if(f=arguments[0],p=2<=arguments.length?o.call(arguments,1):[],r(Object.assign))Object.assign.apply(null,arguments);else for(c=0,d=p.length;c{(function(){var i;XC.exports=i=function(){function e(){}return e.prototype.hasFeature=function(t,n){return!0},e.prototype.createDocumentType=function(t,n,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(t,n,r){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(t,n){throw new Error("This DOM method is not implemented.")},e}()}).call(WC)});var QC=oe((YC,KC)=>{(function(){var i;KC.exports=i=function(){function e(){}return e.prototype.handleError=function(t){throw new Error(t)},e}()}).call(YC)});var tx=oe((JC,ex)=>{(function(){var i;ex.exports=i=function(){function e(t){this.arr=t||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(t){return this.arr[t]||null},e.prototype.contains=function(t){return this.arr.indexOf(t)!==-1},e}()}).call(JC)});var rx=oe((ix,nx)=>{(function(){var i,e,t;e=QC(),t=tx(),nx.exports=i=function(){function n(){var r;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=r=Object.create(this.defaultParams)}return Object.defineProperty(n.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),n.prototype.getParameter=function(r){return this.params.hasOwnProperty(r)?this.params[r]:null},n.prototype.canSetParameter=function(r,s){return!0},n.prototype.setParameter=function(r,s){return s!=null?this.params[r]=s:delete this.params[r]},n}()}).call(ix)});var gt=oe((sx,ax)=>{(function(){ax.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(sx)});var Rf=oe((ox,lx)=>{(function(){var i,e,t;i=gt(),t=S0(),lx.exports=e=function(){function n(r,s,a){if(this.parent=r,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(a),this.type=i.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(n.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(n.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"specified",{get:function(){return!0}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))},n.prototype.debugInfo=function(r){return r=r||this.name,r==null?"parent: <"+this.parent.name+">":"attribute: {"+r+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(r){return!(r.namespaceURI!==this.namespaceURI||r.prefix!==this.prefix||r.localName!==this.localName||r.value!==this.value)},n}()}).call(ox)});var wc=oe((cx,hx)=>{(function(){var i;hx.exports=i=function(){function e(t){this.nodes=t}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(t){return this.nodes[t]},e.prototype.setNamedItem=function(t){var n;return n=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,n||null},e.prototype.removeNamedItem=function(t){var n;return n=this.nodes[t],delete this.nodes[t],n||null},e.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},e.prototype.getNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e}()}).call(cx)});var bc=oe((dx,ux)=>{(function(){var i,e,t,n,r,s,a,o,l,c=function(d,u){for(var p in u)h.call(u,p)&&(d[p]=u[p]);function f(){this.constructor=d}return f.prototype=u.prototype,d.prototype=new f,d.__super__=u.prototype,d},h={}.hasOwnProperty;l=z1(),o=l.isObject,a=l.isFunction,s=l.getValue,r=S0(),i=gt(),e=Rf(),n=wc(),ux.exports=t=function(d){c(u,d);function u(p,f,g){var y,x,_,b;if(u.__super__.constructor.call(this,p),f==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(f),this.type=i.Element,this.attribs={},this.schemaTypeInfo=null,g!=null&&this.attribute(g),p.type===i.Document&&(this.isRoot=!0,this.documentObject=p,p.rootObject=this,p.children)){for(b=p.children,x=0,_=b.length;x<_;x++)if(y=b[x],y.type===i.DocType){y.name=this.name;break}}}return Object.defineProperty(u.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(u.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(u.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap}}),u.prototype.clone=function(){var p,f,g,y;g=Object.create(this),g.isRoot&&(g.documentObject=null),g.attribs={},y=this.attribs;for(f in y)h.call(y,f)&&(p=y[f],g.attribs[f]=p.clone());return g.children=[],this.children.forEach(function(x){var _;return _=x.clone(),_.parent=g,g.children.push(_)}),g},u.prototype.attribute=function(p,f){var g,y;if(p!=null&&(p=s(p)),o(p))for(g in p)h.call(p,g)&&(y=p[g],this.attribute(g,y));else a(f)&&(f=f.apply()),this.options.keepNullAttributes&&f==null?this.attribs[p]=new e(this,p,""):f!=null&&(this.attribs[p]=new e(this,p,f));return this},u.prototype.removeAttribute=function(p){var f,g,y;if(p==null)throw new Error("Missing attribute name. "+this.debugInfo());if(p=s(p),Array.isArray(p))for(g=0,y=p.length;g=y;f=0<=y?++g:--g)if(!this.attribs[f].isEqualNode(p.attribs[f]))return!1;return!0},u}(r)}).call(dx)});var co=oe((fx,px)=>{(function(){var i,e,t=function(r,s){for(var a in s)n.call(s,a)&&(r[a]=s[a]);function o(){this.constructor=r}return o.prototype=s.prototype,r.prototype=new o,r.__super__=s.prototype,r},n={}.hasOwnProperty;e=S0(),px.exports=i=function(r){t(s,r);function s(a){s.__super__.constructor.call(this,a),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),s.prototype.clone=function(){return Object.create(this)},s.prototype.substringData=function(a,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.insertData=function(a,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(a,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(a,o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(a){return!(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)||a.data!==this.data)},s}(e)}).call(fx)});var yc=oe((gx,vx)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;i=gt(),t=co(),vx.exports=e=function(s){n(a,s);function a(o,l){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=i.CData,this.value=this.stringify.cdata(l)}return a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(o){return this.options.writer.cdata(this,this.options.writer.filterOptions(o))},a}(t)}).call(gx)});var Cc=oe((mx,wx)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;i=gt(),e=co(),wx.exports=t=function(s){n(a,s);function a(o,l){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=i.Comment,this.value=this.stringify.comment(l)}return a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(o){return this.options.writer.comment(this,this.options.writer.filterOptions(o))},a}(e)}).call(mx)});var xc=oe((bx,yx)=>{(function(){var i,e,t,n,r=function(a,o){for(var l in o)s.call(o,l)&&(a[l]=o[l]);function c(){this.constructor=a}return c.prototype=o.prototype,a.prototype=new c,a.__super__=o.prototype,a},s={}.hasOwnProperty;n=z1().isObject,t=S0(),i=gt(),yx.exports=e=function(a){r(o,a);function o(l,c,h,d){var u;o.__super__.constructor.call(this,l),n(c)&&(u=c,c=u.version,h=u.encoding,d=u.standalone),c||(c="1.0"),this.type=i.Declaration,this.version=this.stringify.xmlVersion(c),h!=null&&(this.encoding=this.stringify.xmlEncoding(h)),d!=null&&(this.standalone=this.stringify.xmlStandalone(d))}return o.prototype.toString=function(l){return this.options.writer.declaration(this,this.options.writer.filterOptions(l))},o}(t)}).call(bx)});var Mc=oe((Cx,xx)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;t=S0(),i=gt(),xx.exports=e=function(s){n(a,s);function a(o,l,c,h,d,u){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(c==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(l));if(!h)throw new Error("Missing DTD attribute type. "+this.debugInfo(l));if(!d)throw new Error("Missing DTD attribute default. "+this.debugInfo(l));if(d.indexOf("#")!==0&&(d="#"+d),!d.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(l));if(u&&!d.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(l));this.elementName=this.stringify.name(l),this.type=i.AttributeDeclaration,this.attributeName=this.stringify.name(c),this.attributeType=this.stringify.dtdAttType(h),u&&(this.defaultValue=this.stringify.dtdAttDefault(u)),this.defaultValueType=d}return a.prototype.toString=function(o){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(o))},a}(t)}).call(Cx)});var Ac=oe((Mx,Ax)=>{(function(){var i,e,t,n,r=function(a,o){for(var l in o)s.call(o,l)&&(a[l]=o[l]);function c(){this.constructor=a}return c.prototype=o.prototype,a.prototype=new c,a.__super__=o.prototype,a},s={}.hasOwnProperty;n=z1().isObject,t=S0(),i=gt(),Ax.exports=e=function(a){r(o,a);function o(l,c,h,d){if(o.__super__.constructor.call(this,l),h==null)throw new Error("Missing DTD entity name. "+this.debugInfo(h));if(d==null)throw new Error("Missing DTD entity value. "+this.debugInfo(h));if(this.pe=!!c,this.name=this.stringify.name(h),this.type=i.EntityDeclaration,!n(d))this.value=this.stringify.dtdEntityValue(d),this.internal=!0;else{if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(h));if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(h));if(this.internal=!1,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID)),d.nData!=null&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(h))}}return Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(o.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(o.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"xmlVersion",{get:function(){return null}}),o.prototype.toString=function(l){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(l))},o}(t)}).call(Mx)});var _c=oe((_x,Sx)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;t=S0(),i=gt(),Sx.exports=e=function(s){n(a,s);function a(o,l,c){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());c||(c="(#PCDATA)"),Array.isArray(c)&&(c="("+c.join(",")+")"),this.name=this.stringify.name(l),this.type=i.ElementDeclaration,this.value=this.stringify.dtdElementValue(c)}return a.prototype.toString=function(o){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(o))},a}(t)}).call(_x)});var Sc=oe((Dx,Ex)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;t=S0(),i=gt(),Ex.exports=e=function(s){n(a,s);function a(o,l,c){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing DTD notation name. "+this.debugInfo(l));if(!c.pubID&&!c.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(l));this.name=this.stringify.name(l),this.type=i.NotationDeclaration,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID))}return Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),a.prototype.toString=function(o){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(o))},a}(t)}).call(Dx)});var Dc=oe((Vx,Tx)=>{(function(){var i,e,t,n,r,s,a,o,l,c=function(d,u){for(var p in u)h.call(u,p)&&(d[p]=u[p]);function f(){this.constructor=d}return f.prototype=u.prototype,d.prototype=new f,d.__super__=u.prototype,d},h={}.hasOwnProperty;l=z1().isObject,o=S0(),i=gt(),e=Mc(),n=Ac(),t=_c(),r=Sc(),a=wc(),Tx.exports=s=function(d){c(u,d);function u(p,f,g){var y,x,_,b,v,m;if(u.__super__.constructor.call(this,p),this.type=i.DocType,p.children){for(b=p.children,x=0,_=b.length;x<_;x++)if(y=b[x],y.type===i.Element){this.name=y.name;break}}this.documentObject=p,l(f)&&(v=f,f=v.pubID,g=v.sysID),g==null&&(m=[f,g],g=m[0],f=m[1]),f!=null&&(this.pubID=this.stringify.dtdPubID(f)),g!=null&&(this.sysID=this.stringify.dtdSysID(g))}return Object.defineProperty(u.prototype,"entities",{get:function(){var p,f,g,y,x;for(y={},x=this.children,f=0,g=x.length;f{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;i=gt(),e=S0(),zx.exports=t=function(s){n(a,s);function a(o,l){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=i.Raw,this.value=this.stringify.raw(l)}return a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(o){return this.options.writer.raw(this,this.options.writer.filterOptions(o))},a}(e)}).call(Lx)});var Vc=oe((Px,kx)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;i=gt(),e=co(),kx.exports=t=function(s){n(a,s);function a(o,l){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=i.Text,this.value=this.stringify.text(l)}return Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"wholeText",{get:function(){var o,l,c;for(c="",l=this.previousSibling;l;)c=l.data+c,l=l.previousSibling;for(c+=this.data,o=this.nextSibling;o;)c=c+o.data,o=o.nextSibling;return c}}),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(o){return this.options.writer.text(this,this.options.writer.filterOptions(o))},a.prototype.splitText=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},a}(e)}).call(Px)});var Tc=oe((Hx,Fx)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;i=gt(),e=co(),Fx.exports=t=function(s){n(a,s);function a(o,l,c){if(a.__super__.constructor.call(this,o),l==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=i.ProcessingInstruction,this.target=this.stringify.insTarget(l),this.name=this.target,c&&(this.value=this.stringify.insValue(c))}return a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(o){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(o))},a.prototype.isEqualNode=function(o){return!(!a.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)||o.target!==this.target)},a}(e)}).call(Hx)});var Of=oe((Rx,Ox)=>{(function(){var i,e,t,n=function(s,a){for(var o in a)r.call(a,o)&&(s[o]=a[o]);function l(){this.constructor=s}return l.prototype=a.prototype,s.prototype=new l,s.__super__=a.prototype,s},r={}.hasOwnProperty;t=S0(),i=gt(),Ox.exports=e=function(s){n(a,s);function a(o){a.__super__.constructor.call(this,o),this.type=i.Dummy}return a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(o){return""},a}(t)}).call(Rx)});var Nx=oe((Ix,Bx)=>{(function(){var i;Bx.exports=i=function(){function e(t){this.nodes=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(t){return this.nodes[t]||null},e}()}).call(Ix)});var Ux=oe((Zx,jx)=>{(function(){jx.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Zx)});var S0=oe(($x,qx)=>{(function(){var i,e,t,n,r,s,a,o,l,c,h,d,u,p,f,g,y,x,_,b={}.hasOwnProperty;_=z1(),x=_.isObject,y=_.isFunction,g=_.isEmpty,f=_.getValue,o=null,t=null,n=null,r=null,s=null,u=null,p=null,d=null,a=null,e=null,h=null,l=null,i=null,qx.exports=c=function(){function v(m){this.parent=m,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,o||(o=bc(),t=yc(),n=Cc(),r=xc(),s=Dc(),u=Ec(),p=Vc(),d=Tc(),a=Of(),e=gt(),h=Nx(),l=wc(),i=Ux())}return Object.defineProperty(v.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(v.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(v.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(v.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(v.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new h(this.children)),this.childNodeList}}),Object.defineProperty(v.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(v.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(v.prototype,"previousSibling",{get:function(){var m;return m=this.parent.children.indexOf(this),this.parent.children[m-1]||null}}),Object.defineProperty(v.prototype,"nextSibling",{get:function(){var m;return m=this.parent.children.indexOf(this),this.parent.children[m+1]||null}}),Object.defineProperty(v.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(v.prototype,"textContent",{get:function(){var m,M,L,w,E;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(E="",w=this.children,M=0,L=w.length;M":(L=this.parent)!=null&&L.name?"node: <"+m+">, parent: <"+this.parent.name+">":"node: <"+m+">"},v.prototype.ele=function(m,M,L){return this.element(m,M,L)},v.prototype.nod=function(m,M,L){return this.node(m,M,L)},v.prototype.txt=function(m){return this.text(m)},v.prototype.dat=function(m){return this.cdata(m)},v.prototype.com=function(m){return this.comment(m)},v.prototype.ins=function(m,M){return this.instruction(m,M)},v.prototype.doc=function(){return this.document()},v.prototype.dec=function(m,M,L){return this.declaration(m,M,L)},v.prototype.e=function(m,M,L){return this.element(m,M,L)},v.prototype.n=function(m,M,L){return this.node(m,M,L)},v.prototype.t=function(m){return this.text(m)},v.prototype.d=function(m){return this.cdata(m)},v.prototype.c=function(m){return this.comment(m)},v.prototype.r=function(m){return this.raw(m)},v.prototype.i=function(m,M){return this.instruction(m,M)},v.prototype.u=function(){return this.up()},v.prototype.importXMLBuilder=function(m){return this.importDocument(m)},v.prototype.replaceChild=function(m,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.removeChild=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.appendChild=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.hasChildNodes=function(){return this.children.length!==0},v.prototype.cloneNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.isSupported=function(m,M){return!0},v.prototype.hasAttributes=function(){return this.attribs.length!==0},v.prototype.compareDocumentPosition=function(m){var M,L;return M=this,M===m?0:this.document()!==m.document()?(L=i.Disconnected|i.ImplementationSpecific,Math.random()<.5?L|=i.Preceding:L|=i.Following,L):M.isAncestor(m)?i.Contains|i.Preceding:M.isDescendant(m)?i.Contains|i.Following:M.isPreceding(m)?i.Preceding:i.Following},v.prototype.isSameNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.lookupPrefix=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.isDefaultNamespace=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.lookupNamespaceURI=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.isEqualNode=function(m){var M,L,w;if(m.nodeType!==this.nodeType||m.children.length!==this.children.length)return!1;for(M=L=0,w=this.children.length-1;0<=w?L<=w:L>=w;M=0<=w?++L:--L)if(!this.children[M].isEqualNode(m.children[M]))return!1;return!0},v.prototype.getFeature=function(m,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.setUserData=function(m,M,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.getUserData=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.contains=function(m){return m?m===this||this.isDescendant(m):!1},v.prototype.isDescendant=function(m){var M,L,w,E,A;for(A=this.children,w=0,E=A.length;wL},v.prototype.treePosition=function(m){var M,L;return L=0,M=!1,this.foreachTreeNode(this.document(),function(w){if(L++,!M&&w===m)return M=!0}),M?L:-1},v.prototype.foreachTreeNode=function(m,M){var L,w,E,A,P;for(m||(m=this.document()),A=m.children,w=0,E=A.length;w{(function(){var i,e=function(n,r){return function(){return n.apply(r,arguments)}},t={}.hasOwnProperty;Wx.exports=i=function(){function n(r){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var s,a,o;r||(r={}),this.options=r,this.options.version||(this.options.version="1.0"),a=r.stringify||{};for(s in a)t.call(a,s)&&(o=a[s],this[s]=o)}return n.prototype.name=function(r){return this.options.noValidation?r:this.assertLegalName(""+r||"")},n.prototype.text=function(r){return this.options.noValidation?r:this.assertLegalChar(this.textEscape(""+r||""))},n.prototype.cdata=function(r){return this.options.noValidation?r:(r=""+r||"",r=r.replace("]]>","]]]]>"),this.assertLegalChar(r))},n.prototype.comment=function(r){if(this.options.noValidation)return r;if(r=""+r||"",r.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+r);return this.assertLegalChar(r)},n.prototype.raw=function(r){return this.options.noValidation?r:""+r||""},n.prototype.attValue=function(r){return this.options.noValidation?r:this.assertLegalChar(this.attEscape(r=""+r||""))},n.prototype.insTarget=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.insValue=function(r){if(this.options.noValidation)return r;if(r=""+r||"",r.match(/\?>/))throw new Error("Invalid processing instruction value: "+r);return this.assertLegalChar(r)},n.prototype.xmlVersion=function(r){if(this.options.noValidation)return r;if(r=""+r||"",!r.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+r);return r},n.prototype.xmlEncoding=function(r){if(this.options.noValidation)return r;if(r=""+r||"",!r.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+r);return this.assertLegalChar(r)},n.prototype.xmlStandalone=function(r){return this.options.noValidation?r:r?"yes":"no"},n.prototype.dtdPubID=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.dtdSysID=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.dtdElementValue=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.dtdAttType=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.dtdAttDefault=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.dtdEntityValue=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.dtdNData=function(r){return this.options.noValidation?r:this.assertLegalChar(""+r||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(r){var s,a;if(this.options.noValidation)return r;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=r.match(s))throw new Error("Invalid character in string: "+r+" at index "+a.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=r.match(s)))throw new Error("Invalid character in string: "+r+" at index "+a.index);return r},n.prototype.assertLegalName=function(r){var s;if(this.options.noValidation)return r;if(this.assertLegalChar(r),s=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!r.match(s))throw new Error("Invalid character in name");return r},n.prototype.textEscape=function(r){var s;return this.options.noValidation?r:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,r.replace(s,"&").replace(//g,">").replace(/\r/g," "))},n.prototype.attEscape=function(r){var s;return this.options.noValidation?r:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,r.replace(s,"&").replace(/{(function(){Yx.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Xx)});var Bf=oe((Kx,Qx)=>{(function(){var i,e,t,n,r,s,a,o,l,c,h,d,u,p,f,g,y,x={}.hasOwnProperty;y=z1().assign,i=gt(),l=xc(),c=Dc(),t=yc(),n=Cc(),d=bc(),p=Ec(),f=Vc(),u=Tc(),h=Of(),r=Mc(),s=_c(),a=Ac(),o=Sc(),e=ho(),Qx.exports=g=function(){function _(b){var v,m,M;b||(b={}),this.options=b,m=b.writer||{};for(v in m)x.call(m,v)&&(M=m[v],this["_"+v]=this[v],this[v]=M)}return _.prototype.filterOptions=function(b){var v,m,M,L,w,E,A,P;return b||(b={}),b=y({},this.options,b),v={writer:this},v.pretty=b.pretty||!1,v.allowEmpty=b.allowEmpty||!1,v.indent=(m=b.indent)!=null?m:" ",v.newline=(M=b.newline)!=null?M:` `,v.offset=(L=b.offset)!=null?L:0,v.dontPrettyTextNodes=(w=(E=b.dontPrettyTextNodes)!=null?E:b.dontprettytextnodes)!=null?w:0,v.spaceBeforeSlash=(A=(P=b.spaceBeforeSlash)!=null?P:b.spacebeforeslash)!=null?A:"",v.spaceBeforeSlash===!0&&(v.spaceBeforeSlash=" "),v.suppressPrettyCount=0,v.user={},v.state=e.None,v},_.prototype.indent=function(b,v,m){var M;return!v.pretty||v.suppressPrettyCount?"":v.pretty&&(M=(m||0)+v.offset+1,M>0)?new Array(M).join(v.indent):""},_.prototype.endline=function(b,v,m){return!v.pretty||v.suppressPrettyCount?"":v.newline},_.prototype.attribute=function(b,v,m){var M;return this.openAttribute(b,v,m),M=" "+b.name+'="'+b.value+'"',this.closeAttribute(b,v,m),M},_.prototype.cdata=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+""+this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.comment=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+""+this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.declaration=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+"",M+=this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.docType=function(b,v,m){var M,L,w,E,A;if(m||(m=0),this.openNode(b,v,m),v.state=e.OpenTag,E=this.indent(b,v,m),E+="0){for(E+=" [",E+=this.endline(b,v,m),v.state=e.InsideTag,A=b.children,L=0,w=A.length;L",E+=this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),E},_.prototype.element=function(b,v,m){var M,L,w,E,A,P,O,G,K,te,F,R,I,re;m||(m=0),te=!1,F="",this.openNode(b,v,m),v.state=e.OpenTag,F+=this.indent(b,v,m)+"<"+b.name,R=b.attribs;for(K in R)x.call(R,K)&&(M=R[K],F+=this.attribute(M,v,m));if(w=b.children.length,E=w===0?null:b.children[0],w===0||b.children.every(function(ve){return(ve.type===i.Text||ve.type===i.Raw)&&ve.value===""}))v.allowEmpty?(F+=">",v.state=e.CloseTag,F+=""+this.endline(b,v,m)):(v.state=e.CloseTag,F+=v.spaceBeforeSlash+"/>"+this.endline(b,v,m));else if(v.pretty&&w===1&&(E.type===i.Text||E.type===i.Raw)&&E.value!=null)F+=">",v.state=e.InsideTag,v.suppressPrettyCount++,te=!0,F+=this.writeChildNode(E,v,m+1),v.suppressPrettyCount--,te=!1,v.state=e.CloseTag,F+=""+this.endline(b,v,m);else{if(v.dontPrettyTextNodes){for(I=b.children,A=0,O=I.length;A"+this.endline(b,v,m),v.state=e.InsideTag,re=b.children,P=0,G=re.length;P",te&&v.suppressPrettyCount--,F+=this.endline(b,v,m),v.state=e.None}return this.closeNode(b,v,m),F},_.prototype.writeChildNode=function(b,v,m){switch(b.type){case i.CData:return this.cdata(b,v,m);case i.Comment:return this.comment(b,v,m);case i.Element:return this.element(b,v,m);case i.Raw:return this.raw(b,v,m);case i.Text:return this.text(b,v,m);case i.ProcessingInstruction:return this.processingInstruction(b,v,m);case i.Dummy:return"";case i.Declaration:return this.declaration(b,v,m);case i.DocType:return this.docType(b,v,m);case i.AttributeDeclaration:return this.dtdAttList(b,v,m);case i.ElementDeclaration:return this.dtdElement(b,v,m);case i.EntityDeclaration:return this.dtdEntity(b,v,m);case i.NotationDeclaration:return this.dtdNotation(b,v,m);default:throw new Error("Unknown XML node type: "+b.constructor.name)}},_.prototype.processingInstruction=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+"",M+=this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.raw=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m),v.state=e.InsideTag,M+=b.value,v.state=e.CloseTag,M+=this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.text=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m),v.state=e.InsideTag,M+=b.value,v.state=e.CloseTag,M+=this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.dtdAttList=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+""+this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.dtdElement=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+""+this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.dtdEntity=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+""+this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.dtdNotation=function(b,v,m){var M;return this.openNode(b,v,m),v.state=e.OpenTag,M=this.indent(b,v,m)+""+this.endline(b,v,m),v.state=e.None,this.closeNode(b,v,m),M},_.prototype.openNode=function(b,v,m){},_.prototype.closeNode=function(b,v,m){},_.prototype.openAttribute=function(b,v,m){},_.prototype.closeAttribute=function(b,v,m){},_}()}).call(Kx)});var Lc=oe((Jx,eM)=>{(function(){var i,e,t=function(r,s){for(var a in s)n.call(s,a)&&(r[a]=s[a]);function o(){this.constructor=r}return o.prototype=s.prototype,r.prototype=new o,r.__super__=s.prototype,r},n={}.hasOwnProperty;e=Bf(),eM.exports=i=function(r){t(s,r);function s(a){s.__super__.constructor.call(this,a)}return s.prototype.document=function(a,o){var l,c,h,d,u;for(o=this.filterOptions(o),d="",u=a.children,c=0,h=u.length;c{(function(){var i,e,t,n,r,s,a,o,l=function(h,d){for(var u in d)c.call(d,u)&&(h[u]=d[u]);function p(){this.constructor=h}return p.prototype=d.prototype,h.prototype=new p,h.__super__=d.prototype,h},c={}.hasOwnProperty;o=z1().isPlainObject,t=Ff(),e=rx(),r=S0(),i=gt(),a=If(),s=Lc(),iM.exports=n=function(h){l(d,h);function d(u){d.__super__.constructor.call(this,null),this.name="#document",this.type=i.Document,this.documentURI=null,this.domConfig=new e,u||(u={}),u.writer||(u.writer=new s),this.options=u,this.stringify=new a(u)}return Object.defineProperty(d.prototype,"implementation",{value:new t}),Object.defineProperty(d.prototype,"doctype",{get:function(){var u,p,f,g;for(g=this.children,p=0,f=g.length;p{(function(){var i,e,t,n,r,s,a,o,l,c,h,d,u,p,f,g,y,x,_,b,v,m,M,L,w={}.hasOwnProperty;L=z1(),m=L.isObject,v=L.isFunction,M=L.isPlainObject,b=L.getValue,i=gt(),d=Nf(),p=bc(),n=yc(),r=Cc(),g=Ec(),_=Vc(),f=Tc(),c=xc(),h=Dc(),s=Mc(),o=Ac(),a=_c(),l=Sc(),t=Rf(),x=If(),y=Lc(),e=ho(),rM.exports=u=function(){function E(A,P,O){var G;this.name="?xml",this.type=i.Document,A||(A={}),G={},A.writer?M(A.writer)&&(G=A.writer,A.writer=new y):A.writer=new y,this.options=A,this.writer=A.writer,this.writerOptions=this.writer.filterOptions(G),this.stringify=new x(A),this.onDataCallback=P||function(){},this.onEndCallback=O||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return E.prototype.createChildNode=function(A){var P,O,G,K,te,F,R,I;switch(A.type){case i.CData:this.cdata(A.value);break;case i.Comment:this.comment(A.value);break;case i.Element:G={},R=A.attribs;for(O in R)w.call(R,O)&&(P=R[O],G[O]=P.value);this.node(A.name,G);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(A.value);break;case i.Text:this.text(A.value);break;case i.ProcessingInstruction:this.instruction(A.target,A.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+A.constructor.name)}for(I=A.children,te=0,F=I.length;te=0;)this.up();return this.onEnd()},E.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},E.prototype.openNode=function(A){var P,O,G,K;if(!A.isOpen){if(!this.root&&this.currentLevel===0&&A.type===i.Element&&(this.root=A),O="",A.type===i.Element){this.writerOptions.state=e.OpenTag,O=this.writer.indent(A,this.writerOptions,this.currentLevel)+"<"+A.name,K=A.attribs;for(G in K)w.call(K,G)&&(P=K[G],O+=this.writer.attribute(P,this.writerOptions,this.currentLevel));O+=(A.children?">":"/>")+this.writer.endline(A,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,O=this.writer.indent(A,this.writerOptions,this.currentLevel)+""),O+=this.writer.endline(A,this.writerOptions,this.currentLevel);return this.onData(O,this.currentLevel),A.isOpen=!0}},E.prototype.closeNode=function(A){var P;if(!A.isClosed)return P="",this.writerOptions.state=e.CloseTag,A.type===i.Element?P=this.writer.indent(A,this.writerOptions,this.currentLevel)+""+this.writer.endline(A,this.writerOptions,this.currentLevel):P=this.writer.indent(A,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(A,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(P,this.currentLevel),A.isClosed=!0},E.prototype.onData=function(A,P){return this.documentStarted=!0,this.onDataCallback(A,P+1)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.debugInfo=function(A){return A==null?"":"node: <"+A+">"},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(A,P,O){return this.node(A,P,O)},E.prototype.txt=function(A){return this.text(A)},E.prototype.dat=function(A){return this.cdata(A)},E.prototype.com=function(A){return this.comment(A)},E.prototype.ins=function(A,P){return this.instruction(A,P)},E.prototype.dec=function(A,P,O){return this.declaration(A,P,O)},E.prototype.dtd=function(A,P,O){return this.doctype(A,P,O)},E.prototype.e=function(A,P,O){return this.element(A,P,O)},E.prototype.n=function(A,P,O){return this.node(A,P,O)},E.prototype.t=function(A){return this.text(A)},E.prototype.d=function(A){return this.cdata(A)},E.prototype.c=function(A){return this.comment(A)},E.prototype.r=function(A){return this.raw(A)},E.prototype.i=function(A,P){return this.instruction(A,P)},E.prototype.att=function(){return this.currentNode&&this.currentNode.type===i.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.a=function(){return this.currentNode&&this.currentNode.type===i.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.ent=function(A,P){return this.entity(A,P)},E.prototype.pent=function(A,P){return this.pEntity(A,P)},E.prototype.not=function(A,P){return this.notation(A,P)},E}()}).call(nM)});var lM=oe((aM,oM)=>{(function(){var i,e,t,n,r=function(a,o){for(var l in o)s.call(o,l)&&(a[l]=o[l]);function c(){this.constructor=a}return c.prototype=o.prototype,a.prototype=new c,a.__super__=o.prototype,a},s={}.hasOwnProperty;i=gt(),n=Bf(),e=ho(),oM.exports=t=function(a){r(o,a);function o(l,c){this.stream=l,o.__super__.constructor.call(this,c)}return o.prototype.endline=function(l,c,h){return l.isLastRootNode&&c.state===e.CloseTag?"":o.__super__.endline.call(this,l,c,h)},o.prototype.document=function(l,c){var h,d,u,p,f,g,y,x,_;for(y=l.children,d=u=0,f=y.length;u0){for(this.stream.write(" ["),this.stream.write(this.endline(l,c,h)),c.state=e.InsideTag,f=l.children,u=0,p=f.length;u"),this.stream.write(this.endline(l,c,h)),c.state=e.None,this.closeNode(l,c,h)},o.prototype.element=function(l,c,h){var d,u,p,f,g,y,x,_,b,v;h||(h=0),this.openNode(l,c,h),c.state=e.OpenTag,this.stream.write(this.indent(l,c,h)+"<"+l.name),b=l.attribs;for(x in b)s.call(b,x)&&(d=b[x],this.attribute(d,c,h));if(p=l.children.length,f=p===0?null:l.children[0],p===0||l.children.every(function(m){return(m.type===i.Text||m.type===i.Raw)&&m.value===""}))c.allowEmpty?(this.stream.write(">"),c.state=e.CloseTag,this.stream.write("")):(c.state=e.CloseTag,this.stream.write(c.spaceBeforeSlash+"/>"));else if(c.pretty&&p===1&&(f.type===i.Text||f.type===i.Raw)&&f.value!=null)this.stream.write(">"),c.state=e.InsideTag,c.suppressPrettyCount++,_=!0,this.writeChildNode(f,c,h+1),c.suppressPrettyCount--,_=!1,c.state=e.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(l,c,h)),c.state=e.InsideTag,v=l.children,g=0,y=v.length;g")}return this.stream.write(this.endline(l,c,h)),c.state=e.None,this.closeNode(l,c,h)},o.prototype.processingInstruction=function(l,c,h){return this.stream.write(o.__super__.processingInstruction.call(this,l,c,h))},o.prototype.raw=function(l,c,h){return this.stream.write(o.__super__.raw.call(this,l,c,h))},o.prototype.text=function(l,c,h){return this.stream.write(o.__super__.text.call(this,l,c,h))},o.prototype.dtdAttList=function(l,c,h){return this.stream.write(o.__super__.dtdAttList.call(this,l,c,h))},o.prototype.dtdElement=function(l,c,h){return this.stream.write(o.__super__.dtdElement.call(this,l,c,h))},o.prototype.dtdEntity=function(l,c,h){return this.stream.write(o.__super__.dtdEntity.call(this,l,c,h))},o.prototype.dtdNotation=function(l,c,h){return this.stream.write(o.__super__.dtdNotation.call(this,l,c,h))},o}(n)}).call(aM)});var hM=oe((cM,Yi)=>{(function(){var i,e,t,n,r,s,a,o,l,c;c=z1(),o=c.assign,l=c.isFunction,t=Ff(),n=Nf(),r=sM(),a=Lc(),s=lM(),i=gt(),e=ho(),Yi.exports.create=function(h,d,u,p){var f,g;if(h==null)throw new Error("Root element needs a name.");return p=o({},d,u,p),f=new n(p),g=f.element(h),p.headless||(f.declaration(p),(p.pubID!=null||p.sysID!=null)&&f.dtd(p)),g},Yi.exports.begin=function(h,d,u){var p;return l(h)&&(p=[h,d],d=p[0],u=p[1],h={}),d?new r(h,d,u):new n(h)},Yi.exports.stringWriter=function(h){return new a(h)},Yi.exports.streamWriter=function(h,d){return new s(h,d)},Yi.exports.implementation=new t,Yi.exports.nodeType=i,Yi.exports.writerState=e}).call(cM)});var dM=oe(Zf=>{(function(){"use strict";var i,e,t,n,r,s={}.hasOwnProperty;i=hM(),e=mc().defaults,n=function(a){return typeof a=="string"&&(a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0)},r=function(a){return""},t=function(a){return a.replace("]]>","]]]]>")},Zf.Builder=function(){function a(o){var l,c,h;this.options={},c=e["0.2"];for(l in c)s.call(c,l)&&(h=c[l],this.options[l]=h);for(l in o)s.call(o,l)&&(h=o[l],this.options[l]=h)}return a.prototype.buildObject=function(o){var l,c,h,d,u;return l=this.options.attrkey,c=this.options.charkey,Object.keys(o).length===1&&this.options.rootName===e["0.2"].rootName?(u=Object.keys(o)[0],o=o[u]):u=this.options.rootName,h=function(p){return function(f,g){var y,x,_,b,v,m;if(typeof g!="object")p.options.cdata&&n(g)?f.raw(r(g)):f.txt(g);else if(Array.isArray(g)){for(b in g)if(s.call(g,b)){x=g[b];for(v in x)_=x[v],f=h(f.ele(v),_).up()}}else for(v in g)if(s.call(g,v))if(x=g[v],v===l){if(typeof x=="object")for(y in x)m=x[y],f=f.att(y,m)}else if(v===c)p.options.cdata&&n(x)?f=f.raw(r(x)):f=f.txt(x);else if(Array.isArray(x))for(b in x)s.call(x,b)&&(_=x[b],typeof _=="string"?p.options.cdata&&n(_)?f=f.ele(v).raw(r(_)).up():f=f.ele(v,_).up():f=h(f.ele(v),_).up());else typeof x=="object"?f=h(f.ele(v),x).up():typeof x=="string"&&p.options.cdata&&n(x)?f=f.ele(v).raw(r(x)).up():(x==null&&(x=""),f=f.ele(v,x.toString()).up());return f}}(this),d=i.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(d,o).end(this.options.renderOpts)},a}()}).call(Zf)});var uM=oe((ote,jf)=>{function Ot(i){if(i)return qR(i);this._callbacks=new Map}function qR(i){return Object.assign(i,Ot.prototype),i._callbacks=new Map,i}Ot.prototype.on=function(i,e){let t=this._callbacks.get(i)??[];return t.push(e),this._callbacks.set(i,t),this};Ot.prototype.once=function(i,e){let t=(...n)=>{this.off(i,t),e.apply(this,n)};return t.fn=e,this.on(i,t),this};Ot.prototype.off=function(i,e){if(i===void 0&&e===void 0)return this._callbacks.clear(),this;if(e===void 0)return this._callbacks.delete(i),this;let t=this._callbacks.get(i);if(t){for(let[n,r]of t.entries())if(r===e||r.fn===e){t.splice(n,1);break}t.length===0?this._callbacks.delete(i):this._callbacks.set(i,t)}return this};Ot.prototype.emit=function(i,...e){let t=this._callbacks.get(i);if(t){let n=[...t];for(let r of n)r.apply(this,e)}return this};Ot.prototype.listeners=function(i){return this._callbacks.get(i)??[]};Ot.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let e=0;for(let t of this._callbacks.values())e+=t.length;return e};Ot.prototype.hasListeners=function(i){return this.listenerCount(i)>0};Ot.prototype.addEventListener=Ot.prototype.on;Ot.prototype.removeListener=Ot.prototype.off;Ot.prototype.removeEventListener=Ot.prototype.off;Ot.prototype.removeAllListeners=Ot.prototype.off;typeof jf<"u"&&(jf.exports=Ot)});var gM=oe((lte,pM)=>{var fM=uM();function uo(){fM.call(this)}uo.prototype=new fM;pM.exports=uo;uo.Stream=uo;uo.prototype.pipe=function(i,e){var t=this;function n(h){i.writable&&i.write(h)===!1&&t.pause&&t.pause()}t.on("data",n);function r(){t.readable&&t.resume&&t.resume()}i.on("drain",r),!i._isStdio&&(!e||e.end!==!1)&&(t.on("end",a),t.on("close",o));var s=!1;function a(){s||(s=!0,i.end())}function o(){s||(s=!0,typeof i.destroy=="function"&&i.destroy())}function l(h){if(c(),!this.hasListeners("error"))throw h}t.on("error",l),i.on("error",l);function c(){t.off("data",n),i.off("drain",r),t.off("end",a),t.off("close",o),t.off("error",l),i.off("error",l),t.off("end",c),t.off("close",c),i.off("end",c),i.off("close",c)}return t.on("end",c),t.on("close",c),i.on("end",c),i.on("close",c),i.emit("pipe",t),i}});var wM=oe(zc=>{"use strict";zc.byteLength=WR;zc.toByteArray=YR;zc.fromByteArray=JR;var P1=[],Z0=[],GR=typeof Uint8Array<"u"?Uint8Array:Array,Uf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Nn=0,vM=Uf.length;Nn0)throw new Error("Invalid string. Length must be a multiple of 4");var t=i.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function WR(i){var e=mM(i),t=e[0],n=e[1];return(t+n)*3/4-n}function XR(i,e,t){return(e+t)*3/4-t}function YR(i){var e,t=mM(i),n=t[0],r=t[1],s=new GR(XR(i,n,r)),a=0,o=r>0?n-4:n,l;for(l=0;l>16&255,s[a++]=e>>8&255,s[a++]=e&255;return r===2&&(e=Z0[i.charCodeAt(l)]<<2|Z0[i.charCodeAt(l+1)]>>4,s[a++]=e&255),r===1&&(e=Z0[i.charCodeAt(l)]<<10|Z0[i.charCodeAt(l+1)]<<4|Z0[i.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function KR(i){return P1[i>>18&63]+P1[i>>12&63]+P1[i>>6&63]+P1[i&63]}function QR(i,e,t){for(var n,r=[],s=e;so?o:a+s));return n===1?(e=i[t-1],r.push(P1[e>>2]+P1[e<<4&63]+"==")):n===2&&(e=(i[t-2]<<8)+i[t-1],r.push(P1[e>>10]+P1[e>>4&63]+P1[e<<2&63]+"=")),r.join("")}});var bM=oe($f=>{$f.read=function(i,e,t,n,r){var s,a,o=r*8-n-1,l=(1<>1,h=-7,d=t?r-1:0,u=t?-1:1,p=i[e+d];for(d+=u,s=p&(1<<-h)-1,p>>=-h,h+=o;h>0;s=s*256+i[e+d],d+=u,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=n;h>0;a=a*256+i[e+d],d+=u,h-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-c}return(p?-1:1)*a*Math.pow(2,s-n)};$f.write=function(i,e,t,n,r,s){var a,o,l,c=s*8-r-1,h=(1<>1,u=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,f=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?e+=u/l:e+=u*Math.pow(2,1-d),e*l>=2&&(a++,l/=2),a+d>=h?(o=0,a=h):a+d>=1?(o=(e*l-1)*Math.pow(2,r),a=a+d):(o=e*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;i[t+p]=o&255,p+=f,o/=256,r-=8);for(a=a<0;i[t+p]=a&255,p+=f,a/=256,c-=8);i[t+p-f]|=g*128}});var zM=oe(vs=>{"use strict";var qf=wM(),gs=bM(),yM=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;vs.Buffer=U;vs.SlowBuffer=sO;vs.INSPECT_MAX_BYTES=50;var Pc=2147483647;vs.kMaxLength=Pc;U.TYPED_ARRAY_SUPPORT=eO();!U.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function eO(){try{var i=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(i,e),i.foo()===42}catch{return!1}}Object.defineProperty(U.prototype,"parent",{enumerable:!0,get:function(){if(U.isBuffer(this))return this.buffer}});Object.defineProperty(U.prototype,"offset",{enumerable:!0,get:function(){if(U.isBuffer(this))return this.byteOffset}});function gi(i){if(i>Pc)throw new RangeError('The value "'+i+'" is invalid for option "size"');var e=new Uint8Array(i);return Object.setPrototypeOf(e,U.prototype),e}function U(i,e,t){if(typeof i=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Yf(i)}return MM(i,e,t)}U.poolSize=8192;function MM(i,e,t){if(typeof i=="string")return iO(i,e);if(ArrayBuffer.isView(i))return nO(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(k1(i,ArrayBuffer)||i&&k1(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(k1(i,SharedArrayBuffer)||i&&k1(i.buffer,SharedArrayBuffer)))return Wf(i,e,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return U.from(n,e,t);var r=rO(i);if(r)return r;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return U.from(i[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}U.from=function(i,e,t){return MM(i,e,t)};Object.setPrototypeOf(U.prototype,Uint8Array.prototype);Object.setPrototypeOf(U,Uint8Array);function AM(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function tO(i,e,t){return AM(i),i<=0?gi(i):e!==void 0?typeof t=="string"?gi(i).fill(e,t):gi(i).fill(e):gi(i)}U.alloc=function(i,e,t){return tO(i,e,t)};function Yf(i){return AM(i),gi(i<0?0:Kf(i)|0)}U.allocUnsafe=function(i){return Yf(i)};U.allocUnsafeSlow=function(i){return Yf(i)};function iO(i,e){if((typeof e!="string"||e==="")&&(e="utf8"),!U.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=_M(i,e)|0,n=gi(t),r=n.write(i,e);return r!==t&&(n=n.slice(0,r)),n}function Gf(i){for(var e=i.length<0?0:Kf(i.length)|0,t=gi(e),n=0;n=Pc)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Pc.toString(16)+" bytes");return i|0}function sO(i){return+i!=i&&(i=0),U.alloc(+i)}U.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==U.prototype};U.compare=function(e,t){if(k1(e,Uint8Array)&&(e=U.from(e,e.offset,e.byteLength)),k1(t,Uint8Array)&&(t=U.from(t,t.offset,t.byteLength)),!U.isBuffer(e)||!U.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,s=0,a=Math.min(n,r);sr.length?U.from(a).copy(r,s):Uint8Array.prototype.set.call(r,a,s);else if(U.isBuffer(a))a.copy(r,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=a.length}return r};function _M(i,e){if(U.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||k1(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);var t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Xf(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return LM(i).length;default:if(r)return n?-1:Xf(i).length;e=(""+e).toLowerCase(),r=!0}}U.byteLength=_M;function aO(i,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(i||(i="utf8");;)switch(i){case"hex":return vO(this,e,t);case"utf8":case"utf-8":return DM(this,e,t);case"ascii":return pO(this,e,t);case"latin1":case"binary":return gO(this,e,t);case"base64":return uO(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mO(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}U.prototype._isBuffer=!0;function Zn(i,e,t){var n=i[e];i[e]=i[t],i[t]=n}U.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""};yM&&(U.prototype[yM]=U.prototype.inspect);U.prototype.compare=function(e,t,n,r,s){if(k1(e,Uint8Array)&&(e=U.from(e,e.offset,e.byteLength)),!U.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),s===void 0&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var a=s-r,o=n-t,l=Math.min(a,o),c=this.slice(r,s),h=e.slice(t,n),d=0;d2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Qf(t)&&(t=r?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(r)return-1;t=i.length-1}else if(t<0)if(r)t=0;else return-1;if(typeof e=="string"&&(e=U.from(e,n)),U.isBuffer(e))return e.length===0?-1:CM(i,e,t,n,r);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?r?Uint8Array.prototype.indexOf.call(i,e,t):Uint8Array.prototype.lastIndexOf.call(i,e,t):CM(i,[e],t,n,r);throw new TypeError("val must be string, number or Buffer")}function CM(i,e,t,n,r){var s=1,a=i.length,o=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||e.length<2)return-1;s=2,a/=2,o/=2,t/=2}function l(p,f){return s===1?p[f]:p.readUInt16BE(f*s)}var c;if(r){var h=-1;for(c=t;ca&&(t=a-o),c=t;c>=0;c--){for(var d=!0,u=0;ur&&(n=r)):n=r;var s=e.length;n>s/2&&(n=s/2);for(var a=0;a>>0,isFinite(n)?(n=n>>>0,r===void 0&&(r="utf8")):(r=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return oO(this,e,t,n);case"utf8":case"utf-8":return lO(this,e,t,n);case"ascii":case"latin1":case"binary":return cO(this,e,t,n);case"base64":return hO(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dO(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}};U.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function uO(i,e,t){return e===0&&t===i.length?qf.fromByteArray(i):qf.fromByteArray(i.slice(e,t))}function DM(i,e,t){t=Math.min(i.length,t);for(var n=[],r=e;r239?4:s>223?3:s>191?2:1;if(r+o<=t){var l,c,h,d;switch(o){case 1:s<128&&(a=s);break;case 2:l=i[r+1],(l&192)===128&&(d=(s&31)<<6|l&63,d>127&&(a=d));break;case 3:l=i[r+1],c=i[r+2],(l&192)===128&&(c&192)===128&&(d=(s&15)<<12|(l&63)<<6|c&63,d>2047&&(d<55296||d>57343)&&(a=d));break;case 4:l=i[r+1],c=i[r+2],h=i[r+3],(l&192)===128&&(c&192)===128&&(h&192)===128&&(d=(s&15)<<18|(l&63)<<12|(c&63)<<6|h&63,d>65535&&d<1114112&&(a=d))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),r+=o}return fO(n)}var xM=4096;function fO(i){var e=i.length;if(e<=xM)return String.fromCharCode.apply(String,i);for(var t="",n=0;nn)&&(t=n);for(var r="",s=e;sn&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tt)throw new RangeError("Trying to access beyond buffer length")}U.prototype.readUintLE=U.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||zt(e,t,this.length);for(var r=this[e],s=1,a=0;++a>>0,t=t>>>0,n||zt(e,t,this.length);for(var r=this[e+--t],s=1;t>0&&(s*=256);)r+=this[e+--t]*s;return r};U.prototype.readUint8=U.prototype.readUInt8=function(e,t){return e=e>>>0,t||zt(e,1,this.length),this[e]};U.prototype.readUint16LE=U.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||zt(e,2,this.length),this[e]|this[e+1]<<8};U.prototype.readUint16BE=U.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||zt(e,2,this.length),this[e]<<8|this[e+1]};U.prototype.readUint32LE=U.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||zt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};U.prototype.readUint32BE=U.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||zt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};U.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||zt(e,t,this.length);for(var r=this[e],s=1,a=0;++a=s&&(r-=Math.pow(2,8*t)),r};U.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||zt(e,t,this.length);for(var r=t,s=1,a=this[e+--r];r>0&&(s*=256);)a+=this[e+--r]*s;return s*=128,a>=s&&(a-=Math.pow(2,8*t)),a};U.prototype.readInt8=function(e,t){return e=e>>>0,t||zt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};U.prototype.readInt16LE=function(e,t){e=e>>>0,t||zt(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};U.prototype.readInt16BE=function(e,t){e=e>>>0,t||zt(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};U.prototype.readInt32LE=function(e,t){return e=e>>>0,t||zt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};U.prototype.readInt32BE=function(e,t){return e=e>>>0,t||zt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};U.prototype.readFloatLE=function(e,t){return e=e>>>0,t||zt(e,4,this.length),gs.read(this,e,!0,23,4)};U.prototype.readFloatBE=function(e,t){return e=e>>>0,t||zt(e,4,this.length),gs.read(this,e,!1,23,4)};U.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||zt(e,8,this.length),gs.read(this,e,!0,52,8)};U.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||zt(e,8,this.length),gs.read(this,e,!1,52,8)};function g0(i,e,t,n,r,s){if(!U.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||ei.length)throw new RangeError("Index out of range")}U.prototype.writeUintLE=U.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=t>>>0,n=n>>>0,!r){var s=Math.pow(2,8*n)-1;g0(this,e,t,n,s,0)}var a=1,o=0;for(this[t]=e&255;++o>>0,n=n>>>0,!r){var s=Math.pow(2,8*n)-1;g0(this,e,t,n,s,0)}var a=n-1,o=1;for(this[t+a]=e&255;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n};U.prototype.writeUint8=U.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,1,255,0),this[t]=e&255,t+1};U.prototype.writeUint16LE=U.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};U.prototype.writeUint16BE=U.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};U.prototype.writeUint32LE=U.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};U.prototype.writeUint32BE=U.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};U.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=t>>>0,!r){var s=Math.pow(2,8*n-1);g0(this,e,t,n,s-1,-s)}var a=0,o=1,l=0;for(this[t]=e&255;++a>0)-l&255;return t+n};U.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=t>>>0,!r){var s=Math.pow(2,8*n-1);g0(this,e,t,n,s-1,-s)}var a=n-1,o=1,l=0;for(this[t+a]=e&255;--a>=0&&(o*=256);)e<0&&l===0&&this[t+a+1]!==0&&(l=1),this[t+a]=(e/o>>0)-l&255;return t+n};U.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};U.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};U.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};U.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};U.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||g0(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function EM(i,e,t,n,r,s){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function VM(i,e,t,n,r){return e=+e,t=t>>>0,r||EM(i,e,t,4,34028234663852886e22,-34028234663852886e22),gs.write(i,e,t,n,23,4),t+4}U.prototype.writeFloatLE=function(e,t,n){return VM(this,e,t,!0,n)};U.prototype.writeFloatBE=function(e,t,n){return VM(this,e,t,!1,n)};function TM(i,e,t,n,r){return e=+e,t=t>>>0,r||EM(i,e,t,8,17976931348623157e292,-17976931348623157e292),gs.write(i,e,t,n,52,8),t+8}U.prototype.writeDoubleLE=function(e,t,n){return TM(this,e,t,!0,n)};U.prototype.writeDoubleBE=function(e,t,n){return TM(this,e,t,!1,n)};U.prototype.copy=function(e,t,n,r){if(!U.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=t;a55295&&t<57344){if(!r){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}r=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),r=t;continue}t=(r-55296<<10|t-56320)+65536}else r&&(e-=3)>-1&&s.push(239,191,189);if(r=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function yO(i){for(var e=[],t=0;t>8,r=t%256,s.push(r),s.push(n);return s}function LM(i){return qf.toByteArray(bO(i))}function kc(i,e,t,n){for(var r=0;r=e.length||r>=i.length);++r)e[r+t]=i[r];return r}function k1(i,e){return i instanceof e||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===e.name}function Qf(i){return i!==i}var xO=function(){for(var i="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var n=t*16,r=0;r<16;++r)e[n+r]=i[t]+i[r];return e}()});var HM=oe((Jf,kM)=>{var Hc=zM(),H1=Hc.Buffer;function PM(i,e){for(var t in i)e[t]=i[t]}H1.from&&H1.alloc&&H1.allocUnsafe&&H1.allocUnsafeSlow?kM.exports=Hc:(PM(Hc,Jf),Jf.Buffer=jn);function jn(i,e,t){return H1(i,e,t)}jn.prototype=Object.create(H1.prototype);PM(H1,jn);jn.from=function(i,e,t){if(typeof i=="number")throw new TypeError("Argument must not be a number");return H1(i,e,t)};jn.alloc=function(i,e,t){if(typeof i!="number")throw new TypeError("Argument must be a number");var n=H1(i);return e!==void 0?typeof t=="string"?n.fill(e,t):n.fill(e):n.fill(0),n};jn.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return H1(i)};jn.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return Hc.SlowBuffer(i)}});var OM=oe(RM=>{"use strict";var t8=HM().Buffer,FM=t8.isEncoding||function(i){switch(i=""+i,i&&i.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function MO(i){if(!i)return"utf8";for(var e;;)switch(i){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return i;default:if(e)return;i=(""+i).toLowerCase(),e=!0}}function AO(i){var e=MO(i);if(typeof e!="string"&&(t8.isEncoding===FM||!FM(i)))throw new Error("Unknown encoding: "+i);return e||i}RM.StringDecoder=fo;function fo(i){this.encoding=AO(i);var e;switch(this.encoding){case"utf16le":this.text=TO,this.end=LO,e=4;break;case"utf8":this.fillLast=DO,e=4;break;case"base64":this.text=zO,this.end=PO,e=3;break;default:this.write=kO,this.end=HO;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t8.allocUnsafe(e)}fo.prototype.write=function(i){if(i.length===0)return"";var e,t;if(this.lastNeed){if(e=this.fillLast(i),e===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5===6?2:i>>4===14?3:i>>3===30?4:i>>6===2?-1:-2}function _O(i,e,t){var n=e.length-1;if(n=0?(r>0&&(i.lastNeed=r-1),r):--n=0?(r>0&&(i.lastNeed=r-2),r):--n=0?(r>0&&(r===2?r=0:i.lastNeed=r-3),r):0))}function SO(i,e,t){if((e[0]&192)!==128)return i.lastNeed=0,"\uFFFD";if(i.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return i.lastNeed=1,"\uFFFD";if(i.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return i.lastNeed=2,"\uFFFD"}}function DO(i){var e=this.lastTotal-this.lastNeed,t=SO(this,i,e);if(t!==void 0)return t;if(this.lastNeed<=i.length)return i.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,e,0,i.length),this.lastNeed-=i.length}function EO(i,e){var t=_O(this,i,e);if(!this.lastNeed)return i.toString("utf8",e);this.lastTotal=t;var n=i.length-(t-this.lastNeed);return i.copy(this.lastChar,0,n),i.toString("utf8",e,n)}function VO(i){var e=i&&i.length?this.write(i):"";return this.lastNeed?e+"\uFFFD":e}function TO(i,e){if((i.length-e)%2===0){var t=i.toString("utf16le",e);if(t){var n=t.charCodeAt(t.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",e,i.length-1)}function LO(i){var e=i&&i.length?this.write(i):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,t)}return e}function zO(i,e){var t=(i.length-e)%3;return t===0?i.toString("base64",e):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",e,i.length-t))}function PO(i){var e=i&&i.length?this.write(i):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function kO(i){return i.toString(this.encoding)}function HO(i){return i&&i.length?this.write(i):""}});var IM=oe(Fc=>{(function(i){i.parser=function(V,C){return new t(V,C)},i.SAXParser=t,i.SAXStream=c,i.createStream=l,i.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];i.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function t(V,C){if(!(this instanceof t))return new t(V,C);var N=this;r(N),N.q=N.c="",N.bufferCheckPosition=i.MAX_BUFFER_LENGTH,N.opt=C||{},N.opt.lowercase=N.opt.lowercase||N.opt.lowercasetags,N.looseCase=N.opt.lowercase?"toLowerCase":"toUpperCase",N.tags=[],N.closed=N.closedRoot=N.sawRoot=!1,N.tag=N.error=null,N.strict=!!V,N.noscript=!!(V||N.opt.noscript),N.state=w.BEGIN,N.strictEntities=N.opt.strictEntities,N.ENTITIES=N.strictEntities?Object.create(i.XML_ENTITIES):Object.create(i.ENTITIES),N.attribList=[],N.opt.xmlns&&(N.ns=Object.create(f)),N.trackPosition=N.opt.position!==!1,N.trackPosition&&(N.position=N.line=N.column=0),A(N,"onready")}Object.create||(Object.create=function(V){function C(){}C.prototype=V;var N=new C;return N}),Object.keys||(Object.keys=function(V){var C=[];for(var N in V)V.hasOwnProperty(N)&&C.push(N);return C});function n(V){for(var C=Math.max(i.MAX_BUFFER_LENGTH,10),N=0,H=0,Le=e.length;HC)switch(e[H]){case"textNode":O(V);break;case"cdata":P(V,"oncdata",V.cdata),V.cdata="";break;case"script":P(V,"onscript",V.script),V.script="";break;default:K(V,"Max buffer length exceeded: "+e[H])}N=Math.max(N,rt)}var Vt=i.MAX_BUFFER_LENGTH-N;V.bufferCheckPosition=Vt+V.position}function r(V){for(var C=0,N=e.length;C"||b(V)}function M(V,C){return V.test(C)}function L(V,C){return!M(V,C)}var w=0;i.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},i.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},i.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(i.ENTITIES).forEach(function(V){var C=i.ENTITIES[V],N=typeof C=="number"?String.fromCharCode(C):C;i.ENTITIES[V]=N});for(var E in i.STATE)i.STATE[i.STATE[E]]=E;w=i.STATE;function A(V,C,N){V[C]&&V[C](N)}function P(V,C,N){V.textNode&&O(V),A(V,C,N)}function O(V){V.textNode=G(V.opt,V.textNode),V.textNode&&A(V,"ontext",V.textNode),V.textNode=""}function G(V,C){return V.trim&&(C=C.trim()),V.normalize&&(C=C.replace(/\s+/g," ")),C}function K(V,C){return O(V),V.trackPosition&&(C+=` Line: `+V.line+` Column: `+V.column+` Char: `+V.c),C=new Error(C),V.error=C,A(V,"onerror",C),V}function te(V){return V.sawRoot&&!V.closedRoot&&F(V,"Unclosed root tag"),V.state!==w.BEGIN&&V.state!==w.BEGIN_WHITESPACE&&V.state!==w.TEXT&&K(V,"Unexpected end"),O(V),V.c="",V.closed=!0,A(V,"onend"),t.call(V,V.strict,V.opt),V}function F(V,C){if(typeof V!="object"||!(V instanceof t))throw new Error("bad call to strictFail");V.strict&&K(V,C)}function R(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var C=V.tags[V.tags.length-1]||V,N=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(N.ns=C.ns),V.attribList.length=0,P(V,"onopentagstart",N)}function I(V,C){var N=V.indexOf(":"),H=N<0?["",V]:V.split(":"),Le=H[0],rt=H[1];return C&&V==="xmlns"&&(Le="xmlns",rt=""),{prefix:Le,local:rt}}function re(V){if(V.strict||(V.attribName=V.attribName[V.looseCase]()),V.attribList.indexOf(V.attribName)!==-1||V.tag.attributes.hasOwnProperty(V.attribName)){V.attribName=V.attribValue="";return}if(V.opt.xmlns){var C=I(V.attribName,!0),N=C.prefix,H=C.local;if(N==="xmlns")if(H==="xml"&&V.attribValue!==u)F(V,"xml: prefix must be bound to "+u+` Actual: `+V.attribValue);else if(H==="xmlns"&&V.attribValue!==p)F(V,"xmlns: prefix must be bound to "+p+` Actual: `+V.attribValue);else{var Le=V.tag,rt=V.tags[V.tags.length-1]||V;Le.ns===rt.ns&&(Le.ns=Object.create(rt.ns)),Le.ns[H]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,P(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function ve(V,C){if(V.opt.xmlns){var N=V.tag,H=I(V.tagName);N.prefix=H.prefix,N.local=H.local,N.uri=N.ns[H.prefix]||"",N.prefix&&!N.uri&&(F(V,"Unbound namespace prefix: "+JSON.stringify(V.tagName)),N.uri=H.prefix);var Le=V.tags[V.tags.length-1]||V;N.ns&&Le.ns!==N.ns&&Object.keys(N.ns).forEach(function(Lp){P(V,"onopennamespace",{prefix:Lp,uri:N.ns[Lp]})});for(var rt=0,Vt=V.attribList.length;rt",V.tagName="",V.state=w.SCRIPT;return}P(V,"onscript",V.script),V.script=""}var C=V.tags.length,N=V.tagName;V.strict||(N=N[V.looseCase]());for(var H=N;C--;){var Le=V.tags[C];if(Le.name!==H)F(V,"Unexpected close tag");else break}if(C<0){F(V,"Unmatched closing tag: "+V.tagName),V.textNode+="",V.state=w.TEXT;return}V.tagName=N;for(var rt=V.tags.length;rt-- >C;){var Vt=V.tag=V.tags.pop();V.tagName=V.tag.name,P(V,"onclosetag",V.tagName);var e0={};for(var c1 in Vt.ns)e0[c1]=Vt.ns[c1];var tr=V.tags[V.tags.length-1]||V;V.opt.xmlns&&Vt.ns!==tr.ns&&Object.keys(Vt.ns).forEach(function(Pt){var B1=Vt.ns[Pt];P(V,"onclosenamespace",{prefix:Pt,uri:B1})})}C===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=w.TEXT}function Te(V){var C=V.entity,N=C.toLowerCase(),H,Le="";return V.ENTITIES[C]?V.ENTITIES[C]:V.ENTITIES[N]?V.ENTITIES[N]:(C=N,C.charAt(0)==="#"&&(C.charAt(1)==="x"?(C=C.slice(2),H=parseInt(C,16),Le=H.toString(16)):(C=C.slice(1),H=parseInt(C,10),Le=H.toString(10))),C=C.replace(/^0+/,""),isNaN(H)||Le.toLowerCase()!==C?(F(V,"Invalid character entity"),"&"+V.entity+";"):String.fromCodePoint(H))}function ke(V,C){C==="<"?(V.state=w.OPEN_WAKA,V.startTagPosition=V.position):b(C)||(F(V,"Non-whitespace before first tag."),V.textNode=C,V.state=w.TEXT)}function ze(V,C){var N="";return C"?(P(C,"onsgmldeclaration",C.sgmlDecl),C.sgmlDecl="",C.state=w.TEXT):(v(H)&&(C.state=w.SGML_DECL_QUOTED),C.sgmlDecl+=H);continue;case w.SGML_DECL_QUOTED:H===C.q&&(C.state=w.SGML_DECL,C.q=""),C.sgmlDecl+=H;continue;case w.DOCTYPE:H===">"?(C.state=w.TEXT,P(C,"ondoctype",C.doctype),C.doctype=!0):(C.doctype+=H,H==="["?C.state=w.DOCTYPE_DTD:v(H)&&(C.state=w.DOCTYPE_QUOTED,C.q=H));continue;case w.DOCTYPE_QUOTED:C.doctype+=H,H===C.q&&(C.q="",C.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:C.doctype+=H,H==="]"?C.state=w.DOCTYPE:v(H)&&(C.state=w.DOCTYPE_DTD_QUOTED,C.q=H);continue;case w.DOCTYPE_DTD_QUOTED:C.doctype+=H,H===C.q&&(C.state=w.DOCTYPE_DTD,C.q="");continue;case w.COMMENT:H==="-"?C.state=w.COMMENT_ENDING:C.comment+=H;continue;case w.COMMENT_ENDING:H==="-"?(C.state=w.COMMENT_ENDED,C.comment=G(C.opt,C.comment),C.comment&&P(C,"oncomment",C.comment),C.comment=""):(C.comment+="-"+H,C.state=w.COMMENT);continue;case w.COMMENT_ENDED:H!==">"?(F(C,"Malformed comment"),C.comment+="--"+H,C.state=w.COMMENT):C.state=w.TEXT;continue;case w.CDATA:H==="]"?C.state=w.CDATA_ENDING:C.cdata+=H;continue;case w.CDATA_ENDING:H==="]"?C.state=w.CDATA_ENDING_2:(C.cdata+="]"+H,C.state=w.CDATA);continue;case w.CDATA_ENDING_2:H===">"?(C.cdata&&P(C,"oncdata",C.cdata),P(C,"onclosecdata"),C.cdata="",C.state=w.TEXT):H==="]"?C.cdata+="]":(C.cdata+="]]"+H,C.state=w.CDATA);continue;case w.PROC_INST:H==="?"?C.state=w.PROC_INST_ENDING:b(H)?C.state=w.PROC_INST_BODY:C.procInstName+=H;continue;case w.PROC_INST_BODY:if(!C.procInstBody&&b(H))continue;H==="?"?C.state=w.PROC_INST_ENDING:C.procInstBody+=H;continue;case w.PROC_INST_ENDING:H===">"?(P(C,"onprocessinginstruction",{name:C.procInstName,body:C.procInstBody}),C.procInstName=C.procInstBody="",C.state=w.TEXT):(C.procInstBody+="?"+H,C.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:M(y,H)?C.tagName+=H:(R(C),H===">"?ve(C):H==="/"?C.state=w.OPEN_TAG_SLASH:(b(H)||F(C,"Invalid character in tag name"),C.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:H===">"?(ve(C,!0),Re(C)):(F(C,"Forward-slash in opening tag not followed by >"),C.state=w.ATTRIB);continue;case w.ATTRIB:if(b(H))continue;H===">"?ve(C):H==="/"?C.state=w.OPEN_TAG_SLASH:M(g,H)?(C.attribName=H,C.attribValue="",C.state=w.ATTRIB_NAME):F(C,"Invalid attribute name");continue;case w.ATTRIB_NAME:H==="="?C.state=w.ATTRIB_VALUE:H===">"?(F(C,"Attribute without value"),C.attribValue=C.attribName,re(C),ve(C)):b(H)?C.state=w.ATTRIB_NAME_SAW_WHITE:M(y,H)?C.attribName+=H:F(C,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(H==="=")C.state=w.ATTRIB_VALUE;else{if(b(H))continue;F(C,"Attribute without value"),C.tag.attributes[C.attribName]="",C.attribValue="",P(C,"onattribute",{name:C.attribName,value:""}),C.attribName="",H===">"?ve(C):M(g,H)?(C.attribName=H,C.state=w.ATTRIB_NAME):(F(C,"Invalid attribute name"),C.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(b(H))continue;v(H)?(C.q=H,C.state=w.ATTRIB_VALUE_QUOTED):(F(C,"Unquoted attribute value"),C.state=w.ATTRIB_VALUE_UNQUOTED,C.attribValue=H);continue;case w.ATTRIB_VALUE_QUOTED:if(H!==C.q){H==="&"?C.state=w.ATTRIB_VALUE_ENTITY_Q:C.attribValue+=H;continue}re(C),C.q="",C.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:b(H)?C.state=w.ATTRIB:H===">"?ve(C):H==="/"?C.state=w.OPEN_TAG_SLASH:M(g,H)?(F(C,"No whitespace between attributes"),C.attribName=H,C.attribValue="",C.state=w.ATTRIB_NAME):F(C,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!m(H)){H==="&"?C.state=w.ATTRIB_VALUE_ENTITY_U:C.attribValue+=H;continue}re(C),H===">"?ve(C):C.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(C.tagName)H===">"?Re(C):M(y,H)?C.tagName+=H:C.script?(C.script+=""?Re(C):F(C,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var Vt,e0;switch(C.state){case w.TEXT_ENTITY:Vt=w.TEXT,e0="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:Vt=w.ATTRIB_VALUE_QUOTED,e0="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:Vt=w.ATTRIB_VALUE_UNQUOTED,e0="attribValue";break}H===";"?(C[e0]+=Te(C),C.entity="",C.state=Vt):M(C.entity.length?_:x,H)?C.entity+=H:(F(C,"Invalid character in entity name"),C[e0]+="&"+C.entity+H,C.entity="",C.state=Vt);continue;default:throw new Error(C,"Unknown state: "+C.state)}return C.position>=C.bufferCheckPosition&&n(C),C}String.fromCodePoint||function(){var V=String.fromCharCode,C=Math.floor,N=function(){var H=16384,Le=[],rt,Vt,e0=-1,c1=arguments.length;if(!c1)return"";for(var tr="";++e01114111||C(Pt)!==Pt)throw RangeError("Invalid code point: "+Pt);Pt<=65535?Le.push(Pt):(Pt-=65536,rt=(Pt>>10)+55296,Vt=Pt%1024+56320,Le.push(rt,Vt)),(e0+1===c1||Le.length>H)&&(tr+=V.apply(null,Le),Le.length=0)}return tr};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:N,configurable:!0,writable:!0}):String.fromCodePoint=N}()})(typeof Fc>"u"?Fc.sax={}:Fc)});var YM=oe((pte,i8)=>{"use strict";var ms=typeof Reflect=="object"?Reflect:null,BM=ms&&typeof ms.apply=="function"?ms.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Rc;ms&&typeof ms.ownKeys=="function"?Rc=ms.ownKeys:Object.getOwnPropertySymbols?Rc=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Rc=function(e){return Object.getOwnPropertyNames(e)};function FO(i){console&&console.warn&&console.warn(i)}var ZM=Number.isNaN||function(e){return e!==e};function Xe(){Xe.init.call(this)}i8.exports=Xe;i8.exports.once=BO;Xe.EventEmitter=Xe;Xe.prototype._events=void 0;Xe.prototype._eventsCount=0;Xe.prototype._maxListeners=void 0;var NM=10;function Oc(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(Xe,"defaultMaxListeners",{enumerable:!0,get:function(){return NM},set:function(i){if(typeof i!="number"||i<0||ZM(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");NM=i}});Xe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Xe.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||ZM(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function jM(i){return i._maxListeners===void 0?Xe.defaultMaxListeners:i._maxListeners}Xe.prototype.getMaxListeners=function(){return jM(this)};Xe.prototype.emit=function(e){for(var t=[],n=1;n0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(l===void 0)return!1;if(typeof l=="function")BM(l,this,t);else for(var c=l.length,h=WM(l,c),n=0;n0&&a.length>r&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=i,o.type=e,o.count=a.length,FO(o)}return i}Xe.prototype.addListener=function(e,t){return UM(this,e,t,!1)};Xe.prototype.on=Xe.prototype.addListener;Xe.prototype.prependListener=function(e,t){return UM(this,e,t,!0)};function RO(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function $M(i,e,t){var n={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},r=RO.bind(n);return r.listener=t,n.wrapFn=r,r}Xe.prototype.once=function(e,t){return Oc(t),this.on(e,$M(this,e,t)),this};Xe.prototype.prependOnceListener=function(e,t){return Oc(t),this.prependListener(e,$M(this,e,t)),this};Xe.prototype.removeListener=function(e,t){var n,r,s,a,o;if(Oc(t),r=this._events,r===void 0)return this;if(n=r[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():OO(n,s),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",e,o||t)}return this};Xe.prototype.off=Xe.prototype.removeListener;Xe.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(r=0;r=0;r--)this.removeListener(e,t[r]);return this};function qM(i,e,t){var n=i._events;if(n===void 0)return[];var r=n[e];return r===void 0?[]:typeof r=="function"?t?[r.listener||r]:[r]:t?IO(r):WM(r,r.length)}Xe.prototype.listeners=function(e){return qM(this,e,!0)};Xe.prototype.rawListeners=function(e){return qM(this,e,!1)};Xe.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):GM.call(i,e)};Xe.prototype.listenerCount=GM;function GM(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Xe.prototype.eventNames=function(){return this._eventsCount>0?Rc(this._events):[]};function WM(i,e){for(var t=new Array(e),n=0;n{(function(){"use strict";n8.stripBOM=function(i){return i[0]==="\uFEFF"?i.substring(1):i}}).call(n8)});var r8=oe(Un=>{(function(){"use strict";var i;i=new RegExp(/(?!xmlns)^.*:/),Un.normalize=function(e){return e.toLowerCase()},Un.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},Un.stripPrefix=function(e){return e.replace(i,"")},Un.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},Un.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(Un)});var JM=oe(QM=>{QM.every=function(i){return new s8(i)};var vi={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};for($n in vi)$n==="millisecond"?vi.ms=vi[$n]:vi[$n.charAt(0)]=vi[$n],vi[$n+"s"]=vi[$n];var $n;function s8(i){this.count=0;var e=jO(i);e&&(this.time=Number(e[0])*vi[e[1]],this.type=e[1])}s8.prototype.do=function(i){this.time&&(this.interval=setInterval(t,this.time));var e=this;function t(){e.count++,i.call(e)}return this};s8.prototype.stop=function(){return this.interval&&(clearInterval(this.interval),delete this.interval),this};var ZO=/^\s*(\d+(?:\.\d+)?)\s*([a-z]+)\s*$/;function jO(i){var e=i.match(ZO);return e&&vi[e[2]]?e.slice(1):null}});var eA=oe(mi=>{(function(){"use strict";var i,e,t,n,r,s,a,o,l,c=function(u,p){return function(){return u.apply(p,arguments)}},h=function(u,p){for(var f in p)d.call(p,f)&&(u[f]=p[f]);function g(){this.constructor=u}return g.prototype=p.prototype,u.prototype=new g,u.__super__=p.prototype,u},d={}.hasOwnProperty;o=IM(),n=YM(),i=KM(),a=r8(),l=JM().setImmediate,e=mc().defaults,r=function(u){return typeof u=="object"&&u!=null&&Object.keys(u).length===0},s=function(u,p,f){var g,y,x;for(g=0,y=u.length;g0&&(M[_.options.childkey]=w),w=M;else if(P){P[_.options.childkey]=P[_.options.childkey]||[],E={};for(m in w)d.call(w,m)&&t(E,m,w[m]);P[_.options.childkey].push(E),delete w["#name"],Object.keys(w).length===1&&g in w&&!_.EXPLICIT_CHARKEY&&(w=w[g])}}return x.length>0?_.assignOrPush(P,L,w):(_.options.explicitRoot&&(A=w,w={},t(w,L,A)),_.resultObject=w,_.saxParser.ended=!0,_.emit("end",_.resultObject))}}(this),y=function(_){return function(b){var v,m;if(m=x[x.length-1],m)return m[g]+=b,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(m[_.options.childkey]=m[_.options.childkey]||[],v={"#name":"__text__"},v[g]=b,_.options.normalize&&(v[g]=v[g].replace(/\s{2,}/g," ").trim()),m[_.options.childkey].push(v)),m}}(this),this.saxParser.ontext=y,this.saxParser.oncdata=function(_){return function(b){var v;if(v=y(b),v)return v.cdata=!0}}(this)},p.prototype.parseString=function(f,g){var y;g!=null&&typeof g=="function"&&(this.on("end",function(x){return this.reset(),g(null,x)}),this.on("error",function(x){return this.reset(),g(x)}));try{return f=f.toString(),f.trim()===""?(this.emit("end",null),!0):(f=i.stripBOM(f),this.options.async?(this.remaining=f,l(this.processAsync),this.saxParser):this.saxParser.write(f).close())}catch(x){if(y=x,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw y}else return this.emit("error",y),this.saxParser.errThrown=!0}},p.prototype.parseStringPromise=function(f){return new Promise(function(g){return function(y,x){return g.parseString(f,function(_,b){return _?x(_):y(b)})}}(this))},p}(n),mi.parseString=function(u,p,f){var g,y,x;return f!=null?(typeof f=="function"&&(g=f),typeof p=="object"&&(y=p)):(typeof p=="function"&&(g=p),y={}),x=new mi.Parser(y),x.parseString(u,g)},mi.parseStringPromise=function(u,p){var f,g;return typeof p=="object"&&(f=p),g=new mi.Parser(f),g.parseStringPromise(u)}}).call(mi)});var tA=oe(wi=>{(function(){"use strict";var i,e,t,n,r=function(a,o){for(var l in o)s.call(o,l)&&(a[l]=o[l]);function c(){this.constructor=a}return c.prototype=o.prototype,a.prototype=new c,a.__super__=o.prototype,a},s={}.hasOwnProperty;e=mc(),i=dM(),t=eA(),n=r8(),wi.defaults=e.defaults,wi.processors=n,wi.ValidationError=function(a){r(o,a);function o(l){this.message=l}return o}(Error),wi.Builder=i.Builder,wi.Parser=t.Parser,wi.parseString=t.parseString,wi.parseStringPromise=t.parseStringPromise}).call(wi)});function sd(i,e){return Object.is(i,e)}var yt=null,$o=!1,ad=1,$0=Symbol("SIGNAL");function Ee(i){let e=yt;return yt=i,e}function od(){return yt}var Vs={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ts(i){if($o)throw new Error("");if(yt===null)return;yt.consumerOnSignalRead(i);let e=yt.nextProducerIndex++;if(Xo(yt),ei.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function ud(i){Xo(i);for(let e=0;e0}function Xo(i){i.producerNode??=[],i.producerIndexOfThis??=[],i.producerLastReadVersion??=[]}function Ip(i){i.liveConsumerNode??=[],i.liveConsumerIndexOfThis??=[]}function Bp(i){return i.producerNode!==void 0}function pd(i,e){let t=Object.create(E_);t.computation=i,e!==void 0&&(t.equal=e);let n=()=>{if(ld(t),Ts(t),t.value===qo)throw t.error;return t.value};return n[$0]=t,n}var id=Symbol("UNSET"),nd=Symbol("COMPUTING"),qo=Symbol("ERRORED"),E_=se(Z({},Vs),{value:id,dirty:!0,error:null,equal:sd,kind:"computed",producerMustRecompute(i){return i.value===id||i.value===nd},producerRecomputeValue(i){if(i.value===nd)throw new Error("Detected cycle in computations.");let e=i.value;i.value=nd;let t=Go(i),n,r=!1;try{n=i.computation(),Ee(null),r=e!==id&&e!==qo&&n!==qo&&i.equal(e,n)}catch(s){n=qo,i.error=s}finally{dd(i,t)}if(r){i.value=e;return}i.value=n,i.version++}});function V_(){throw new Error}var Np=V_;function Zp(i){Np(i)}function gd(i){Np=i}var T_=null;function vd(i,e){let t=Object.create(Yo);t.value=i,e!==void 0&&(t.equal=e);let n=()=>(Ts(t),t.value);return n[$0]=t,n}function Ls(i,e){hd()||Zp(i),i.equal(i.value,e)||(i.value=e,L_(i))}function md(i,e){hd()||Zp(i),Ls(i,e(i.value))}var Yo=se(Z({},Vs),{equal:sd,value:void 0,kind:"signal"});function L_(i){i.version++,Rp(),cd(i),T_?.()}function wd(i){let e=Ee(null);try{return i()}finally{Ee(e)}}var bd;function zs(){return bd}function N1(i){let e=bd;return bd=i,e}var Ko=Symbol("NotFound");function Z1(i){return typeof i=="function"}var yd=!1,t0={Promise:void 0,set useDeprecatedSynchronousErrorHandling(i){if(i){let e=new Error;console.warn(`DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: `+e.stack)}else yd&&console.log("RxJS: Back to a better error behavior. Thank you. <3");yd=i},get useDeprecatedSynchronousErrorHandling(){return yd}};function j1(i){setTimeout(()=>{throw i},0)}var nr={closed:!0,next(i){},error(i){if(t0.useDeprecatedSynchronousErrorHandling)throw i;j1(i)},complete(){}};var U1=Array.isArray||(i=>i&&typeof i.length=="number");function rr(i){return i!==null&&typeof i=="object"}var H_=(()=>{function i(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription: ${e.map((t,n)=>`${n+1}) ${t.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e,this}return i.prototype=Object.create(Error.prototype),i})(),Ps=H_;var He=class i{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:n,_unsubscribe:r,_subscriptions:s}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof i)t.remove(this);else if(t!==null)for(let a=0;ae.concat(t instanceof Ps?t.errors:t),[])}var tn=typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();var xe=class i extends He{constructor(e,t,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=nr;break;case 1:if(!e){this.destination=nr;break}if(typeof e=="object"){e instanceof i?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Qo(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Qo(this,e,t,n);break}}[tn](){return this}static create(e,t,n){let r=new i(e,t,n);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){let{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}},Qo=class extends xe{constructor(e,t,n,r){super(),this._parentSubscriber=e;let s,a=this;Z1(t)?s=t:t&&(s=t.next,n=t.error,r=t.complete,t!==nr&&(a=Object.create(t),Z1(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=s,this._error=n,this._complete=r}next(e){if(!this.isStopped&&this._next){let{_parentSubscriber:t}=this;!t0.useDeprecatedSynchronousErrorHandling||!t.syncErrorThrowable?this.__tryOrUnsub(this._next,e):this.__tryOrSetError(t,this._next,e)&&this.unsubscribe()}}error(e){if(!this.isStopped){let{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:n}=t0;if(this._error)!n||!t.syncErrorThrowable?(this.__tryOrUnsub(this._error,e),this.unsubscribe()):(this.__tryOrSetError(t,this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):j1(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;j1(e)}}}complete(){if(!this.isStopped){let{_parentSubscriber:e}=this;if(this._complete){let t=()=>this._complete.call(this._context);!t0.useDeprecatedSynchronousErrorHandling||!e.syncErrorThrowable?(this.__tryOrUnsub(t),this.unsubscribe()):(this.__tryOrSetError(e,t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),t0.useDeprecatedSynchronousErrorHandling)throw n;j1(n)}}__tryOrSetError(e,t,n){if(!t0.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return t0.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(j1(r),!0)}return!1}_unsubscribe(){let{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}};function Up(i){for(;i;){let{closed:e,destination:t,isStopped:n}=i;if(e||n)return!1;t&&t instanceof xe?i=t:i=null}return!0}function $p(i,e,t){if(i){if(i instanceof xe)return i;if(i[tn])return i[tn]()}return!i&&!e&&!t?new xe(nr):new xe(i,e,t)}var h1=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ei(i){return i}function Cd(...i){return xd(i)}function xd(i){return i.length===0?Ei:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var Ae=(()=>{class i{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let{operator:s}=this,a=$p(t,n,r);if(s?a.add(s.call(a,this.source)):a.add(this.source||t0.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),t0.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t0.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=n),Up(t)?t.error(n):console.warn(n)}}forEach(t,n){return n=qp(n),new n((r,s)=>{let a;a=this.subscribe(o=>{try{t(o)}catch(l){s(l),a&&a.unsubscribe()}},s,r)})}_subscribe(t){let{source:n}=this;return n&&n.subscribe(t)}[h1](){return this}pipe(...t){return t.length===0?this:xd(t)(this)}toPromise(t){return t=qp(t),new t((n,r)=>{let s;this.subscribe(a=>s=a,a=>r(a),()=>n(s))})}}return i.create=e=>new i(e),i})();function qp(i){if(i||(i=t0.Promise||Promise),!i)throw new Error("no Promise impl found");return i}var F_=(()=>{function i(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return i.prototype=Object.create(Error.prototype),i})(),Vi=F_;var Jo=class extends He{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;let e=this.subject,t=e.observers;if(this.subject=null,!t||t.length===0||e.isStopped||e.closed)return;let n=t.indexOf(this.subscriber);n!==-1&&t.splice(n,1)}};var ks=class extends xe{constructor(e){super(e),this.destination=e}},it=(()=>{class i extends Ae{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[tn](){return new ks(this)}lift(t){let n=new e5(this,this);return n.operator=t,n}next(t){if(this.closed)throw new Vi;if(!this.isStopped){let{observers:n}=this,r=n.length,s=n.slice();for(let a=0;anew e5(e,t),i})(),e5=class extends it{constructor(e,t){super(),this.destination=e,this.source=t}next(e){let{destination:t}=this;t&&t.next&&t.next(e)}error(e){let{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){let{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){let{source:t}=this;return t?this.source.subscribe(e):He.EMPTY}};function sr(){return function(e){return e.lift(new Md(e))}}var Md=class{constructor(e){this.connectable=e}call(e,t){let{connectable:n}=this;n._refCount++;let r=new Ad(e,n),s=t.subscribe(r);return r.closed||(r.connection=n.connect()),s}},Ad=class extends xe{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){let{connectable:e}=this;if(!e){this.connection=null;return}this.connectable=null;let t=e._refCount;if(t<=0){this.connection=null;return}if(e._refCount=t-1,t>1){this.connection=null;return}let{connection:n}=this,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()}};var nn=class extends Ae{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new He,e.add(this.source.subscribe(new _d(this.getSubject(),this))),e.closed&&(this._connection=null,e=He.EMPTY)),e}refCount(){return sr()(this)}},VU=(()=>{let i=nn.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:i._subscribe},_isComplete:{value:i._isComplete,writable:!0},getSubject:{value:i.getSubject},connect:{value:i.connect},refCount:{value:i.refCount}}})(),_d=class extends ks{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){let e=this.connectable;if(e){this.connectable=null;let t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}};var Ct=class extends it{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Vi;return this._value}next(e){super.next(this._value=e)}};var t5=class extends He{constructor(e,t){super()}schedule(e,t=0){return this}};var i5=class extends t5{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;let n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,n=0){return setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!==null&&this.delay===n&&this.pending===!1)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(s){n=!0,r=!!s&&s||new Error(s)}if(n)return this.unsubscribe(),r}_unsubscribe(){let e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,r!==-1&&n.splice(r,1),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}};var Sd=(()=>{class i{constructor(t,n=i.now){this.SchedulerAction=t,this.now=n}schedule(t,n=0,r){return new this.SchedulerAction(this,t).schedule(r,n)}}return i.now=()=>Date.now(),i})();var n5=class i extends Sd{constructor(e,t=Sd.now){super(e,()=>i.delegate&&i.delegate!==this?i.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,n){return i.delegate&&i.delegate!==this?i.delegate.schedule(e,t,n):super.schedule(e,t,n)}flush(e){let{actions:t}=this;if(this.active){t.push(e);return}let n;this.active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}};var q0=new Ae(i=>i.complete());function ar(i){return i?R_(i):q0}function R_(i){return new Ae(e=>i.schedule(()=>e.complete()))}function or(i){return i&&typeof i.schedule=="function"}var r5=i=>e=>{for(let t=0,n=i.length;t{let n=new He,r=0;return n.add(e.schedule(function(){if(r===i.length){t.complete();return}t.next(i[r++]),t.closed||n.add(this.schedule())})),n})}function s5(i,e){return e?lr(i,e):new Ae(r5(i))}function ae(...i){let e=i[i.length-1];return or(e)?(i.pop(),lr(i,e)):s5(i)}function cr(i,e){return e?new Ae(t=>e.schedule(O_,0,{error:i,subscriber:t})):new Ae(t=>t.error(i))}function O_({error:i,subscriber:e}){e.error(i)}var I_=new n5(i5),Gp=I_;function $1(){}function Dd(i){return!!i&&(i instanceof Ae||typeof i.lift=="function"&&typeof i.subscribe=="function")}var B_=(()=>{function i(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return i.prototype=Object.create(Error.prototype),i})(),a5=B_;var N_=(()=>{function i(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return i.prototype=Object.create(Error.prototype),i})(),q1=N_;function ue(i,e){return function(n){if(typeof i!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Ed(i,e))}}var Ed=class{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new Vd(e,this.project,this.thisArg))}},Vd=class extends xe{constructor(e,t,n){super(e),this.project=t,this.count=0,this.thisArg=n||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){this.destination.error(n);return}this.destination.next(t)}};var o5=class extends xe{notifyNext(e,t,n,r,s){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}};var l5=class extends xe{constructor(e,t,n){super(),this.parent=e,this.outerValue=t,this.outerIndex=n,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}};var Wp=i=>e=>(i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,j1),e);function Z_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ti=Z_();var Xp=i=>e=>{let t=i[Ti]();do{let n;try{n=t.next()}catch(r){return e.error(r),e}if(n.done){e.complete();break}if(e.next(n.value),e.closed)break}while(!0);return typeof t.return=="function"&&e.add(()=>{t.return&&t.return()}),e};var Yp=i=>e=>{let t=i[h1]();if(typeof t.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};var c5=i=>i&&typeof i.length=="number"&&typeof i!="function";function h5(i){return!!i&&typeof i.subscribe!="function"&&typeof i.then=="function"}var hr=i=>{if(i&&typeof i[h1]=="function")return Yp(i);if(c5(i))return r5(i);if(h5(i))return Wp(i);if(i&&typeof i[Ti]=="function")return Xp(i);{let t=`You provided ${rr(i)?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function Kp(i,e,t,n,r=new l5(i,t,n)){if(!r.closed)return e instanceof Ae?e.subscribe(r):hr(e)(r)}var Qp={};function Hs(...i){let e,t;return or(i[i.length-1])&&(t=i.pop()),typeof i[i.length-1]=="function"&&(e=i.pop()),i.length===1&&U1(i[0])&&(i=i[0]),s5(i,t).lift(new Td(e))}var Td=class{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new Ld(e,this.resultSelector))}},Ld=class extends o5{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(Qp),this.observables.push(e)}_complete(){let e=this.observables,t=e.length;if(t===0)this.destination.complete();else{this.active=t,this.toRespond=t;for(let n=0;n{let n=new He;return n.add(e.schedule(()=>{let r=i[h1]();n.add(r.subscribe({next(s){n.add(e.schedule(()=>t.next(s)))},error(s){n.add(e.schedule(()=>t.error(s)))},complete(){n.add(e.schedule(()=>t.complete()))}}))})),n})}function eg(i,e){return new Ae(t=>{let n=new He;return n.add(e.schedule(()=>i.then(r=>{n.add(e.schedule(()=>{t.next(r),n.add(e.schedule(()=>t.complete()))}))},r=>{n.add(e.schedule(()=>t.error(r)))}))),n})}function tg(i,e){if(!i)throw new Error("Iterable cannot be null");return new Ae(t=>{let n=new He,r;return n.add(()=>{r&&typeof r.return=="function"&&r.return()}),n.add(e.schedule(()=>{r=i[Ti](),n.add(e.schedule(function(){if(t.closed)return;let s,a;try{let o=r.next();s=o.value,a=o.done}catch(o){t.error(o);return}a?t.complete():(t.next(s),this.schedule())}))})),n})}function ig(i){return i&&typeof i[h1]=="function"}function ng(i){return i&&typeof i[Ti]=="function"}function rg(i,e){if(i!=null){if(ig(i))return Jp(i,e);if(h5(i))return eg(i,e);if(c5(i))return lr(i,e);if(ng(i)||typeof i=="string")return tg(i,e)}throw new TypeError((i!==null&&typeof i||i)+" is not observable")}function je(i,e){return e?rg(i,e):i instanceof Ae?i:new Ae(hr(i))}var d1=class extends xe{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}};var u1=class extends xe{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}};function Li(i,e){if(e.closed)return;if(i instanceof Ae)return i.subscribe(e);let t;try{t=hr(i)(e)}catch(n){e.error(n)}return t}function mt(i,e,t=Number.POSITIVE_INFINITY){return typeof e=="function"?n=>n.pipe(mt((r,s)=>je(i(r,s)).pipe(ue((a,o)=>e(r,a,s,o))),t)):(typeof e=="number"&&(t=e),n=>n.lift(new zd(i,t)))}var zd=class{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new Pd(e,this.project,this.concurrent))}},Pd=class extends u1{constructor(e,t,n=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()}};function dr(i=Number.POSITIVE_INFINITY){return mt(Ei,i)}function sg(){return dr(1)}function ur(...i){return sg()(ae(...i))}function d5(i){return new Ae(e=>{let t;try{t=i()}catch(r){e.error(r);return}return(t?je(t):ar()).subscribe(e)})}function kd(...i){if(i.length===1){let e=i[0];if(U1(e))return u5(e,null);if(rr(e)&&Object.getPrototypeOf(e)===Object.prototype){let t=Object.keys(e);return u5(t.map(n=>e[n]),t)}}if(typeof i[i.length-1]=="function"){let e=i.pop();return i=i.length===1&&U1(i[0])?i[0]:i,u5(i,null).pipe(ue(t=>e(...t)))}return u5(i,null)}function u5(i,e){return new Ae(t=>{let n=i.length;if(n===0){t.complete();return}let r=new Array(n),s=0,a=0;for(let o=0;o{c||(c=!0,a++),r[o]=h},error:h=>t.error(h),complete:()=>{s++,(s===n||!c)&&(a===n&&t.next(e?e.reduce((h,d,u)=>(h[d]=r[u],h),{}):r),t.complete())}}))}})}function st(i,e,t,n){return Z1(t)&&(n=t,t=void 0),n?st(i,e,t).pipe(ue(r=>U1(r)?n(...r):n(r))):new Ae(r=>{function s(a){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(a)}ag(i,e,s,r,t)})}function ag(i,e,t,n,r){let s;if($_(i)){let a=i;i.addEventListener(e,t,r),s=()=>a.removeEventListener(e,t,r)}else if(U_(i)){let a=i;i.on(e,t),s=()=>a.off(e,t)}else if(j_(i)){let a=i;i.addListener(e,t),s=()=>a.removeListener(e,t)}else if(i&&i.length)for(let a=0,o=i.length;at.lift(new Id(i,e))}var Id=class{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new Bd(e,this.dueTime,this.scheduler))}},Bd=class extends xe{constructor(e,t,n){super(e),this.dueTime=t,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(q_,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){let{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){let e=this.debouncedSubscription;e!==null&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}};function q_(i){i.debouncedNext()}function Pi(i=null){return e=>e.lift(new Zd(i))}var Zd=class{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new jd(e,this.defaultValue))}},jd=class extends xe{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}};function f5(i=G_){return e=>e.lift(new Ud(i))}var Ud=class{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new $d(e,this.errorFactory))}},$d=class extends xe{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}};function G_(){return new q1}function G1(i){return e=>i===0?ar():e.lift(new qd(i))}var qd=class{constructor(e){if(this.total=e,this.total<0)throw new a5}call(e,t){return t.subscribe(new Gd(e,this.total))}},Gd=class extends xe{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){let t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}};function ki(i){return e=>e.lift(new Wd(i))}var Wd=class{constructor(e){this.callback=e}call(e,t){return t.subscribe(new Xd(e,this.callback))}},Xd=class extends xe{constructor(e,t){super(e),this.add(new He(t))}};function W1(i,e){let t=arguments.length>=2;return n=>n.pipe(i?xt((r,s)=>i(r,s,n)):Ei,G1(1),t?Pi(e):f5(()=>new q1))}function fr(i){return function(t){return i===0?ar():t.lift(new Yd(i))}}var Yd=class{constructor(e){if(this.total=e,this.total<0)throw new a5}call(e,t){return t.subscribe(new Kd(e,this.total))}},Kd=class extends xe{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){let t=this.ring,n=this.total,r=this.count++;if(t.length0){let n=this.count>=this.total?this.total:this.count,r=this.ring;for(let s=0;s=2;return n=>n.pipe(i?xt((r,s)=>i(r,s,n)):Ei,fr(1),t?Pi(e):f5(()=>new q1))}function tu(i,e){let t=!1;return arguments.length>=2&&(t=!0),function(r){return r.lift(new Jd(i,e,t))}}var Jd=class{constructor(e,t,n=!1){this.accumulator=e,this.seed=t,this.hasSeed=n}call(e,t){return t.subscribe(new eu(e,this.accumulator,this.seed,this.hasSeed))}},eu=class extends xe{constructor(e,t,n,r){super(e),this.accumulator=t,this._seed=n,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(!this.hasSeed)this.seed=e,this.destination.next(e);else return this._tryNext(e)}_tryNext(e){let t=this.index++,n;try{n=this.accumulator(this.seed,e,t)}catch(r){this.destination.error(r)}this.seed=n,this.destination.next(n)}};function iu(...i){let e=i[i.length-1];return or(e)?(i.pop(),t=>ur(i,t,e)):t=>ur(i,t)}function Wt(i,e){return typeof e=="function"?t=>t.pipe(Wt((n,r)=>je(i(n,r)).pipe(ue((s,a)=>e(n,s,r,a))))):t=>t.lift(new nu(i))}var nu=class{constructor(e){this.project=e}call(e,t){return t.subscribe(new ru(e,this.project))}},ru=class extends u1{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t,n=this.index++;try{t=this.project(e,n)}catch(r){this.destination.error(r);return}this._innerSub(t)}_innerSub(e){let t=this.innerSubscription;t&&t.unsubscribe();let n=new d1(this),r=this.destination;r.add(n),this.innerSubscription=Li(e,n),this.innerSubscription!==n&&r.add(this.innerSubscription)}_complete(){let{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}};function Ge(i){return e=>e.lift(new su(i))}var su=class{constructor(e){this.notifier=e}call(e,t){let n=new au(e),r=Li(this.notifier,new d1(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n}},au=class extends u1{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}};function kt(i,e,t){return function(r){return r.lift(new ou(i,e,t))}}var ou=class{constructor(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}call(e,t){return t.subscribe(new lu(e,this.nextOrObserver,this.error,this.complete))}},lu=class extends xe{constructor(e,t,n,r){super(e),this._tapNext=$1,this._tapError=$1,this._tapComplete=$1,this._tapError=n||$1,this._tapComplete=r||$1,Z1(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||$1,this._tapError=t.error||$1,this._tapComplete=t.complete||$1)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){this.destination.error(t);return}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){this.destination.error(t);return}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()}};var Kg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",X=class extends Error{code;constructor(e,t){super(K5(e,t)),this.code=e}};function W_(i){return`NG0${Math.abs(i)}`}function K5(i,e){return`${W_(i)}${e?": "+e:""}`}var Qg=Symbol("InputSignalNode#UNSET"),X_=se(Z({},Yo),{transformFn:void 0,applyValueToInputSignal(i,e){Ls(i,e)}});function Jg(i,e){let t=Object.create(X_);t.value=i,t.transformFn=e?.transform;function n(){if(Ts(t),t.value===Qg){let r=null;throw new X(-950,r)}return t.value}return n[$0]=t,n}function Ws(i){return{toString:i}.toString()}var p5="__parameters__";function Y_(i){return function(...t){if(i){let n=i(...t);for(let r in n)this[r]=n[r]}}}function ev(i,e,t){return Ws(()=>{let n=Y_(e);function r(...s){if(this instanceof r)return n.apply(this,s),this;let a=new r(...s);return o.annotation=a,o;function o(l,c,h){let d=l.hasOwnProperty(p5)?l[p5]:Object.defineProperty(l,p5,{value:[]})[p5];for(;d.length<=h;)d.push(null);return(d[h]=d[h]||[]).push(a),l}}return r.prototype.ngMetadataName=i,r.annotationCls=r,r})}var Tt=globalThis;function Ye(i){for(let e in i)if(i[e]===Ye)return e;throw Error("Could not find renamed property on target object.")}function K_(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function r0(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(r0).join(", ")}]`;if(i==null)return""+i;let e=i.overriddenName||i.name;if(e)return`${e}`;let t=i.toString();if(t==null)return""+t;let n=t.indexOf(` `);return n>=0?t.slice(0,n):t}function xu(i,e){return i?e?`${i} ${e}`:i:e||""}var Q_=Ye({__forward_ref__:Ye});function k0(i){return i.__forward_ref__=k0,i.toString=function(){return r0(this())},i}function Xt(i){return tv(i)?i():i}function tv(i){return typeof i=="function"&&i.hasOwnProperty(Q_)&&i.__forward_ref__===k0}function Q(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Oe(i){return{providers:i.providers||[],imports:i.imports||[]}}function Q5(i){return og(i,nv)||og(i,rv)}function iv(i){return Q5(i)!==null}function og(i,e){return i.hasOwnProperty(e)?i[e]:null}function J_(i){let e=i&&(i[nv]||i[rv]);return e||null}function lg(i){return i&&(i.hasOwnProperty(cg)||i.hasOwnProperty(eS))?i[cg]:null}var nv=Ye({\u0275prov:Ye}),cg=Ye({\u0275inj:Ye}),rv=Ye({ngInjectableDef:Ye}),eS=Ye({ngInjectorDef:Ye}),J=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=Q({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function sv(i){return i&&!!i.\u0275providers}var tS=Ye({\u0275cmp:Ye}),iS=Ye({\u0275dir:Ye}),nS=Ye({\u0275pipe:Ye}),rS=Ye({\u0275mod:Ye}),_5=Ye({\u0275fac:Ye}),Is=Ye({__NG_ELEMENT_ID__:Ye}),hg=Ye({__NG_ENV_ID__:Ye});function Xs(i){return typeof i=="string"?i:i==null?"":String(i)}function sS(i){return typeof i=="function"?i.name||i.toString():typeof i=="object"&&i!=null&&typeof i.type=="function"?i.type.name||i.type.toString():Xs(i)}function av(i,e){throw new X(-200,i)}function D3(i,e){throw new X(-201,!1)}var we=function(i){return i[i.Default=0]="Default",i[i.Host=1]="Host",i[i.Self=2]="Self",i[i.SkipSelf=4]="SkipSelf",i[i.Optional=8]="Optional",i}(we||{}),Mu;function ov(){return Mu}function i0(i){let e=Mu;return Mu=i,e}function lv(i,e,t){let n=Q5(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&we.Optional)return null;if(e!==void 0)return e;D3(i,"Injector")}var aS={},sn=aS,Au="__NG_DI_FLAG__",S5=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=t;return this.injector.get(e,n.optional?Ko:sn,n)}},D5="ngTempTokenPath",oS="ngTokenPath",lS=/\n/gm,cS="\u0275",dg="__source";function hS(i,e=we.Default){if(zs()===void 0)throw new X(-203,!1);if(zs()===null)return lv(i,void 0,e);{let t=zs(),n;return t instanceof S5?n=t.injector:n=t,n.get(i,e&we.Optional?null:void 0,e)}}function ee(i,e=we.Default){return(ov()||hS)(Xt(i),e)}function j(i,e=we.Default){return ee(i,J5(e))}function J5(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function _u(i){let e=[];for(let t=0;t ");else if(typeof e=="object"){let s=[];for(let a in e)if(e.hasOwnProperty(a)){let o=e[a];s.push(a+":"+(typeof o=="string"?JSON.stringify(o):r0(o)))}r=`{${s.join(", ")}}`}return`${t}${n?"("+n+")":""}[${r}]: ${i.replace(lS,` `)}`}var hv=cv(ev("Optional"),8);var pS=cv(ev("SkipSelf"),4);function on(i,e){let t=i.hasOwnProperty(_5);return t?i[_5]:null}function gS(i,e,t){if(i.length!==e.length)return!1;for(let n=0;nArray.isArray(t)?E3(t,e):e(t))}function dv(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function E5(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function mS(i,e){let t=[];for(let n=0;ne;){let s=r-2;i[r]=i[s],r--}i[e]=t,i[e+1]=n}}function V3(i,e,t){let n=Ys(i,e);return n>=0?i[n|1]=t:(n=~n,wS(i,n,e,t)),n}function cu(i,e){let t=Ys(i,e);if(t>=0)return i[t|1]}function Ys(i,e){return bS(i,e,1)}function bS(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let s=n+(r-n>>1),a=i[s<e?r=s:n=s+1}return~(r<{t.push(a)};return E3(e,a=>{let o=a;Su(o,s,[],n)&&(r||=[],r.push(o))}),r!==void 0&&vv(r,s),t}function vv(i,e){for(let t=0;t{e(s,n)})}}function Su(i,e,t,n){if(i=Xt(i),!i)return!1;let r=null,s=lg(i),a=!s&&cn(i);if(!s&&!a){let l=i.ngModule;if(s=lg(l),s)r=l;else return!1}else{if(a&&!a.standalone)return!1;r=i}let o=n.has(r);if(a){if(o)return!1;if(n.add(r),a.dependencies){let l=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let c of l)Su(c,e,t,n)}}else if(s){if(s.imports!=null&&!o){n.add(r);let c;try{E3(s.imports,h=>{Su(h,e,t,n)&&(c||=[],c.push(h))})}finally{}c!==void 0&&vv(c,e)}if(!o){let c=on(r)||(()=>new r);e({provide:r,useFactory:c,deps:n0},r),e({provide:fv,useValue:r,multi:!0},r),e({provide:yr,useValue:()=>ee(r),multi:!0},r)}let l=s.providers;if(l!=null&&!o){let c=i;T3(l,h=>{e(h,c)})}}else return!1;return r!==i&&i.providers!==void 0}function T3(i,e){for(let t of i)sv(t)&&(t=t.\u0275providers),Array.isArray(t)?T3(t,e):e(t)}var MS=Ye({provide:String,useValue:Ye});function mv(i){return i!==null&&typeof i=="object"&&MS in i}function AS(i){return!!(i&&i.useExisting)}function _S(i){return!!(i&&i.useFactory)}function Cr(i){return typeof i=="function"}function SS(i){return!!i.useClass}var el=new J(""),y5={},ug={},hu;function L3(){return hu===void 0&&(hu=new V5),hu}var Bt=class{},Zs=class extends Bt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Eu(e,a=>this.processProvider(a)),this.records.set(uv,pr(void 0,this)),r.has("environment")&&this.records.set(Bt,pr(void 0,this));let s=this.records.get(el);s!=null&&typeof s.value=="string"&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(fv,n0,we.Self))}retrieve(e,t){let n=t;return this.get(e,n.optional?Ko:sn,n)}destroy(){Rs(this),this._destroyed=!0;let e=Ee(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ee(e)}}onDestroy(e){return Rs(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Rs(this);let t=N1(this),n=i0(void 0),r;try{return e()}finally{N1(t),i0(n)}}get(e,t=sn,n=we.Default){if(Rs(this),e.hasOwnProperty(hg))return e[hg](this);n=J5(n);let r,s=N1(this),a=i0(void 0);try{if(!(n&we.SkipSelf)){let l=this.records.get(e);if(l===void 0){let c=LS(e)&&Q5(e);c&&this.injectableDefInScope(c)?l=pr(Du(e),y5):l=null,this.records.set(e,l)}if(l!=null)return this.hydrate(e,l,n)}let o=n&we.Self?L3():this.parent;return t=n&we.Optional&&t===sn?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[D5]=o[D5]||[]).unshift(r0(e)),s)throw o;return uS(o,e,"R3InjectorError",this.source)}else throw o}finally{i0(a),N1(s)}}resolveInjectorInitializers(){let e=Ee(null),t=N1(this),n=i0(void 0),r;try{let s=this.get(yr,n0,we.Self);for(let a of s)a()}finally{N1(t),i0(n),Ee(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(r0(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Xt(e);let t=Cr(e)?e:Xt(e&&e.provide),n=ES(e);if(!Cr(e)&&e.multi===!0){let r=this.records.get(t);r||(r=pr(void 0,y5,!0),r.factory=()=>_u(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=Ee(null);try{return t.value===ug?av(r0(e)):t.value===y5&&(t.value=ug,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&TS(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{Ee(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Xt(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Du(i){let e=Q5(i),t=e!==null?e.factory:on(i);if(t!==null)return t;if(i instanceof J)throw new X(204,!1);if(i instanceof Function)return DS(i);throw new X(204,!1)}function DS(i){if(i.length>0)throw new X(204,!1);let t=J_(i);return t!==null?()=>t.factory(i):()=>new i}function ES(i){if(mv(i))return pr(void 0,i.useValue);{let e=wv(i);return pr(e,y5)}}function wv(i,e,t){let n;if(Cr(i)){let r=Xt(i);return on(r)||Du(r)}else if(mv(i))n=()=>Xt(i.useValue);else if(_S(i))n=()=>i.useFactory(..._u(i.deps||[]));else if(AS(i))n=(r,s)=>ee(Xt(i.useExisting),s!==void 0&&s&we.Optional?we.Optional:void 0);else{let r=Xt(i&&(i.useClass||i.provide));if(VS(i))n=()=>new r(..._u(i.deps));else return on(r)||Du(r)}return n}function Rs(i){if(i.destroyed)throw new X(205,!1)}function pr(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function VS(i){return!!i.deps}function TS(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function LS(i){return typeof i=="function"||typeof i=="object"&&i instanceof J}function Eu(i,e){for(let t of i)Array.isArray(t)?Eu(t,e):t&&sv(t)?Eu(t.\u0275providers,e):e(t)}function a0(i,e){let t;i instanceof Zs?(Rs(i),t=i):t=new S5(i);let n,r=N1(t),s=i0(void 0);try{return e()}finally{N1(r),i0(s)}}function z3(){return ov()!==void 0||zs()!=null}function zS(i){if(!z3())throw new X(-203,!1)}function PS(i){let e=Tt.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function kS(i){return typeof i=="function"}var ti=0,_e=1,fe=2,Nt=3,X0=4,o0=5,js=6,T5=7,s0=8,xr=9,X1=10,pt=11,Us=12,fg=13,Tr=14,z0=15,hn=16,gr=17,Y1=18,tl=19,bv=20,Hi=21,du=22,L5=23,L0=24,wr=25,Zt=26,yv=1;var dn=7,z5=8,Mr=9,w0=10;function Fi(i){return Array.isArray(i)&&typeof i[yv]=="object"}function ii(i){return Array.isArray(i)&&i[yv]===!0}function P3(i){return(i.flags&4)!==0}function Lr(i){return i.componentOffset>-1}function il(i){return(i.flags&1)===1}function g1(i){return!!i.template}function P5(i){return(i[fe]&512)!==0}function zr(i){return(i[fe]&256)===256}var Vu=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Cv(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var Ht=(()=>{let i=()=>xv;return i.ngInherit=!0,i})();function xv(i){return i.type.prototype.ngOnChanges&&(i.setInput=FS),HS}function HS(){let i=Av(this),e=i?.current;if(e){let t=i.previous;if(t===ln)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function FS(i,e,t,n,r){let s=this.declaredInputs[n],a=Av(i)||RS(i,{previous:ln,current:null}),o=a.current||(a.current={}),l=a.previous,c=l[s];o[s]=new Vu(c&&c.currentValue,t,l===ln),Cv(i,e,r,t)}var Mv="__ngSimpleChanges__";function Av(i){return i[Mv]||null}function RS(i,e){return i[Mv]=e}var pg=null;var et=function(i,e=null,t){pg?.(i,e,t)},OS="svg",IS="math";function v1(i){for(;Array.isArray(i);)i=i[ti];return i}function _v(i,e){return v1(e[i])}function b1(i,e){return v1(e[i.index])}function Sv(i,e){return i.data[e]}function k3(i,e){return i[e]}function BS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function m1(i,e){let t=e[i];return Fi(t)?t:t[ti]}function NS(i){return(i[fe]&4)===4}function H3(i){return(i[fe]&128)===128}function ZS(i){return ii(i[Nt])}function Ar(i,e){return e==null?null:i[e]}function Dv(i){i[gr]=0}function Ev(i){i[fe]&1024||(i[fe]|=1024,H3(i)&&Ks(i))}function jS(i,e){for(;i>0;)e=e[Tr],i--;return e}function nl(i){return!!(i[fe]&9216||i[L0]?.dirty)}function Tu(i){i[X1].changeDetectionScheduler?.notify(8),i[fe]&64&&(i[fe]|=1024),nl(i)&&Ks(i)}function Ks(i){i[X1].changeDetectionScheduler?.notify(0);let e=un(i);for(;e!==null&&!(e[fe]&8192||(e[fe]|=8192,!H3(e)));)e=un(e)}function Vv(i,e){if(zr(i))throw new X(911,!1);i[Hi]===null&&(i[Hi]=[]),i[Hi].push(e)}function US(i,e){if(i[Hi]===null)return;let t=i[Hi].indexOf(e);t!==-1&&i[Hi].splice(t,1)}function un(i){let e=i[Nt];return ii(e)?e[Nt]:e}function F3(i){return i[T5]??=[]}function R3(i){return i.cleanup??=[]}function $S(i,e,t,n){let r=F3(e);r.push(t),i.firstCreatePass&&R3(i).push(n,r.length-1)}var Se={lFrame:Rv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Lu=!1;function qS(){return Se.lFrame.elementDepthCount}function GS(){Se.lFrame.elementDepthCount++}function WS(){Se.lFrame.elementDepthCount--}function O3(){return Se.bindingsEnabled}function Tv(){return Se.skipHydrationRootTNode!==null}function XS(i){return Se.skipHydrationRootTNode===i}function YS(){Se.skipHydrationRootTNode=null}function Ve(){return Se.lFrame.lView}function Mt(){return Se.lFrame.tView}function ct(i){return Se.lFrame.contextLView=i,i[s0]}function ht(i){return Se.lFrame.contextLView=null,i}function l0(){let i=Lv();for(;i!==null&&i.type===64;)i=i.parent;return i}function Lv(){return Se.lFrame.currentTNode}function KS(){let i=Se.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function wn(i,e){let t=Se.lFrame;t.currentTNode=i,t.isParent=e}function I3(){return Se.lFrame.isParent}function B3(){Se.lFrame.isParent=!1}function QS(){return Se.lFrame.contextLView}function zv(){return Lu}function gg(i){let e=Lu;return Lu=i,e}function Qs(){let i=Se.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function JS(i){return Se.lFrame.bindingIndex=i}function N3(){return Se.lFrame.bindingIndex++}function Pv(i){let e=Se.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function eD(){return Se.lFrame.inI18n}function tD(i,e){let t=Se.lFrame;t.bindingIndex=t.bindingRootIndex=i,zu(e)}function iD(){return Se.lFrame.currentDirectiveIndex}function zu(i){Se.lFrame.currentDirectiveIndex=i}function nD(i){let e=Se.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function kv(){return Se.lFrame.currentQueryIndex}function Z3(i){Se.lFrame.currentQueryIndex=i}function rD(i){let e=i[_e];return e.type===2?e.declTNode:e.type===1?i[o0]:null}function Hv(i,e,t){if(t&we.SkipSelf){let r=e,s=i;for(;r=r.parent,r===null&&!(t&we.Host);)if(r=rD(s),r===null||(s=s[Tr],r.type&10))break;if(r===null)return!1;e=r,i=s}let n=Se.lFrame=Fv();return n.currentTNode=e,n.lView=i,!0}function j3(i){let e=Fv(),t=i[_e];Se.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function Fv(){let i=Se.lFrame,e=i===null?null:i.child;return e===null?Rv(i):e}function Rv(i){let 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:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function Ov(){let i=Se.lFrame;return Se.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var Iv=Ov;function U3(){let i=Ov();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function sD(i){return(Se.lFrame.contextLView=jS(i,Se.lFrame.contextLView))[s0]}function bn(){return Se.lFrame.selectedIndex}function fn(i){Se.lFrame.selectedIndex=i}function $3(){let i=Se.lFrame;return Sv(i.tView,i.selectedIndex)}function aD(){return Se.lFrame.currentNamespace}var Bv=!0;function rl(){return Bv}function sl(i){Bv=i}function oD(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(n){let a=xv(e);(t.preOrderHooks??=[]).push(i,a),(t.preOrderCheckHooks??=[]).push(i,a)}r&&(t.preOrderHooks??=[]).push(0-i,r),s&&((t.preOrderHooks??=[]).push(i,s),(t.preOrderCheckHooks??=[]).push(i,s))}function q3(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t=n)break}else e[l]<0&&(i[gr]+=65536),(o>14>16&&(i[fe]&3)===e&&(i[fe]+=16384,vg(o,s)):vg(o,s)}var br=-1,pn=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function cD(i){return(i.flags&8)!==0}function hD(i){return(i.flags&16)!==0}function dD(i,e,t){let n=0;for(;ne){a=s-1;break}}}for(;s>16}function H5(i,e){let t=fD(i),n=e;for(;t>0;)n=n[Tr],t--;return n}var Pu=!0;function F5(i){let e=Pu;return Pu=i,e}var pD=256,Uv=pD-1,$v=5,gD=0,p1={};function vD(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(Is)&&(n=t[Is]),n==null&&(n=t[Is]=gD++);let r=n&Uv,s=1<>$v)]|=s}function R5(i,e){let t=qv(i,e);if(t!==-1)return t;let n=e[_e];n.firstCreatePass&&(i.injectorIndex=e.length,fu(n.data,i),fu(e,null),fu(n.blueprint,null));let r=G3(i,e),s=i.injectorIndex;if(jv(r)){let a=k5(r),o=H5(r,e),l=o[_e].data;for(let c=0;c<8;c++)e[s+c]=o[a+c]|l[a+c]}return e[s+8]=r,s}function fu(i,e){i.push(0,0,0,0,0,0,0,0,e)}function qv(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function G3(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=Kv(r),n===null)return br;if(t++,r=r[Tr],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return br}function ku(i,e,t){vD(i,e,t)}function mD(i,e){if(e==="class")return i.classes;if(e==="style")return i.styles;let t=i.attrs;if(t){let n=t.length,r=0;for(;r>20,d=n?o:o+h,u=r?o+h:c;for(let p=d;p=l&&f.type===t)return p}if(r){let p=a[l];if(p&&g1(p)&&p.type===t)return l}return null}function $s(i,e,t,n,r){let s=i[t],a=e.data;if(s instanceof pn){let o=s;o.resolving&&av(sS(a[t]));let l=F5(o.canSeeViewProviders);o.resolving=!0;let c,h=o.injectImpl?i0(o.injectImpl):null,d=Hv(i,n,we.Default);try{s=i[t]=o.factory(void 0,r,a,i,n),e.firstCreatePass&&t>=n.directiveStart&&oD(t,a[t],e)}finally{h!==null&&i0(h),F5(l),o.resolving=!1,Iv()}}return s}function bD(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(Is)?i[Is]:void 0;return typeof e=="number"?e>=0?e&Uv:yD:e}function wg(i,e,t){let n=1<>$v)]&n)}function bg(i,e){return!(i&we.Self)&&!(i&we.Host&&e)}var an=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Xv(this._tNode,this._lView,e,J5(n),t)}};function yD(){return new an(l0(),Ve())}function y1(i){return Ws(()=>{let e=i.prototype.constructor,t=e[_5]||Hu(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let s=r[_5]||Hu(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function Hu(i){return tv(i)?()=>{let e=Hu(Xt(i));return e&&e()}:on(i)}function CD(i,e,t,n,r){let s=i,a=e;for(;s!==null&&a!==null&&a[fe]&2048&&!P5(a);){let o=Yv(s,a,t,n|we.Self,p1);if(o!==p1)return o;let l=s.parent;if(!l){let c=a[bv];if(c){let h=c.get(t,p1,n);if(h!==p1)return h}l=Kv(a),a=a[Tr]}s=l}return r}function Kv(i){let e=i[_e],t=e.type;return t===2?e.declTNode:t===1?i[o0]:null}function W3(i){return mD(l0(),i)}function yg(i,e=null,t=null,n){let r=Qv(i,e,t,n);return r.resolveInjectorInitializers(),r}function Qv(i,e=null,t=null,n,r=new Set){let s=[t||n0,xS(i)];return n=n||(typeof i=="object"?void 0:r0(i)),new Zs(s,e||L3(),n||null,r)}var Yt=class i{static THROW_IF_NOT_FOUND=sn;static NULL=new V5;static create(e,t){if(Array.isArray(e))return yg({name:""},t,e,"");{let n=e.name??"";return yg({name:n},e.parent,e.providers,n)}}static \u0275prov=Q({token:i,providedIn:"any",factory:()=>ee(uv)});static __NG_ELEMENT_ID__=-1};var xD=new J("");xD.__NG_ELEMENT_ID__=i=>{let e=l0();if(e===null)throw new X(204,!1);if(e.type&2)return e.value;if(i&we.Optional)return null;throw new X(204,!1)};var Jv=!1,Ri=(()=>{class i{static __NG_ELEMENT_ID__=MD;static __NG_ENV_ID__=t=>t}return i})(),Fu=class extends Ri{_lView;constructor(e){super(),this._lView=e}onDestroy(e){let t=this._lView;return zr(t)?(e(),()=>{}):(Vv(t,e),()=>US(t,e))}};function MD(){return new Fu(Ve())}var Sr=class{},X3=new J("",{providedIn:"root",factory:()=>!1});var e9=new J(""),t9=new J(""),ni=(()=>{class i{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Ct(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=Q({token:i,providedIn:"root",factory:()=>new i})}return i})();var Ru=class extends it{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,z3()&&(this.destroyRef=j(Ri,{optional:!0})??void 0,this.pendingTasks=j(ni,{optional:!0})??void 0)}emit(e){let t=Ee(null);try{super.next(e)}finally{Ee(t)}}subscribe(e,t,n){let r=e,s=t||(()=>null),a=n;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),s=l.error?.bind(l),a=l.complete?.bind(l)}this.__isAsync&&(s=this.wrapInTimeout(s),r&&(r=this.wrapInTimeout(r)),a&&(a=this.wrapInTimeout(a)));let o=super.subscribe({next:r,error:s,complete:a});return e instanceof He&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},he=Ru;function O5(...i){}function i9(i){let e,t;function n(){i=O5;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{i(),n()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{i(),n()})),()=>n()}function Cg(i){return queueMicrotask(()=>i()),()=>{i=O5}}var Y3="isAngularZone",I5=Y3+"_ID",AD=0,Ne=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new he(!1);onMicrotaskEmpty=new he(!1);onStable=new he(!1);onError=new he(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:s=Jv}=e;if(typeof Zone>"u")throw new X(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=s,DD(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Y3)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new X(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new X(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let s=this._inner,a=s.scheduleEventTask("NgZoneEvent: "+r,e,_D,O5,O5);try{return s.runTask(a,t,n)}finally{s.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},_D={};function K3(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function SD(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){i9(()=>{i.callbackScheduled=!1,Ou(i),i.isCheckStableRunning=!0,K3(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),Ou(i)}function DD(i){let e=()=>{SD(i)},t=AD++;i._inner=i._inner.fork({name:"angular",properties:{[Y3]:!0,[I5]:t,[I5+t]:!0},onInvokeTask:(n,r,s,a,o,l)=>{if(ED(l))return n.invokeTask(s,a,o,l);try{return xg(i),n.invokeTask(s,a,o,l)}finally{(i.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),Mg(i)}},onInvoke:(n,r,s,a,o,l,c)=>{try{return xg(i),n.invoke(s,a,o,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!VD(l)&&e(),Mg(i)}},onHasTask:(n,r,s,a)=>{n.hasTask(s,a),r===s&&(a.change=="microTask"?(i._hasPendingMicrotasks=a.microTask,Ou(i),K3(i)):a.change=="macroTask"&&(i.hasPendingMacrotasks=a.macroTask))},onHandleError:(n,r,s,a)=>(n.handleError(s,a),i.runOutsideAngular(()=>i.onError.emit(a)),!1)})}function Ou(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function xg(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function Mg(i){i._nesting--,K3(i)}var B5=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new he;onMicrotaskEmpty=new he;onStable=new he;onError=new he;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function ED(i){return n9(i,"__ignore_ng_zone__")}function VD(i){return n9(i,"__scheduler_tick__")}function n9(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}function TD(i="zone.js",e){return i==="noop"?new B5:i==="zone.js"?new Ne(e):i}var Y0=class{_console=console;handleError(e){this._console.error("ERROR",e)}},LD=new J("",{providedIn:"root",factory:()=>{let i=j(Ne),e=j(Y0);return t=>i.runOutsideAngular(()=>e.handleError(t))}}),Iu=class{destroyed=!1;listeners=null;errorHandler=j(Y0,{optional:!0});destroyRef=j(Ri);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new X(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(K5(953,!1));return}if(this.listeners===null)return;let t=Ee(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{Ee(t)}}};function r9(i){return new Iu}function Ag(i,e){return Jg(i,e)}function zD(i){return Jg(Qg,i)}var Ke=(Ag.required=zD,Ag);function PD(){return Pr(l0(),Ve())}function Pr(i,e){return new Qe(b1(i,e))}var Qe=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=PD}return i})();function kD(i){return i instanceof Qe?i.nativeElement:i}function Kt(i,e){let t=vd(i,e?.equal),n=t[$0];return t.set=r=>Ls(n,r),t.update=r=>md(n,r),t.asReadonly=HD.bind(t),t}function HD(){let i=this[$0];if(i.readonlyFn===void 0){let e=()=>this();e[$0]=i,i.readonlyFn=e}return i.readonlyFn}function FD(){return this._results[Symbol.iterator]()}var Bu=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new it}constructor(e=!1){this._emitDistinctChangesOnly=e}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){this.dirty=!1;let n=vS(e);(this._changesDetected=!gS(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=FD};function s9(i){return(i.flags&128)===128}var a9=function(i){return i[i.OnPush=0]="OnPush",i[i.Default=1]="Default",i}(a9||{}),o9=new Map,RD=0;function OD(){return RD++}function ID(i){o9.set(i[tl],i)}function Nu(i){o9.delete(i[tl])}var _g="__ngContext__";function kr(i,e){Fi(e)?(i[_g]=e[tl],ID(e)):i[_g]=e}function l9(i){return h9(i[Us])}function c9(i){return h9(i[X0])}function h9(i){for(;i!==null&&!ii(i);)i=i[X0];return i}var Zu;function d9(i){Zu=i}function u9(){if(Zu!==void 0)return Zu;if(typeof document<"u")return document;throw new X(210,!1)}var Q3=new J("",{providedIn:"root",factory:()=>BD}),BD="ng",J3=new J(""),Hr=new J("",{providedIn:"platform",factory:()=>"unknown"});var Js=new J(""),e6=new J("",{providedIn:"root",factory:()=>u9().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var ND="h",ZD="b";var f9=!1,jD=new J("",{providedIn:"root",factory:()=>f9});var t6=function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i}(t6||{}),Fr=new J(""),Sg=new Set;function Rr(i){Sg.has(i)||(Sg.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var p9=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=UD}return i})();function UD(){return new p9(Ve(),l0())}var vr=function(i){return i[i.EarlyRead=0]="EarlyRead",i[i.Write=1]="Write",i[i.MixedReadWrite=2]="MixedReadWrite",i[i.Read=3]="Read",i}(vr||{}),g9=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=Q({token:i,providedIn:"root",factory:()=>new i})}return i})(),$D=[vr.EarlyRead,vr.Write,vr.MixedReadWrite,vr.Read],qD=(()=>{class i{ngZone=j(Ne);scheduler=j(Sr);errorHandler=j(Y0,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){j(Fr,{optional:!0})}execute(){let t=this.sequences.size>0;t&&et(16),this.executing=!0;for(let n of $D)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=r.hooks[n];return s(r.pipelinedValue)},r.snapshot))}catch(s){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&et(17)}register(t){let{view:n}=t;n!==void 0?((n[wr]??=[]).push(t),Ks(n),n[fe]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,n){return n?n.run(t6.AFTER_NEXT_RENDER,t):t()}static \u0275prov=Q({token:i,providedIn:"root",factory:()=>new i})}return i})(),ju=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,s,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=s?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[wr];e&&(this.view[wr]=e.filter(t=>t!==this))}};function i6(i,e){!e?.injector&&zS(i6);let t=e?.injector??j(Yt);return Rr("NgAfterNextRender"),WD(i,t,e,!0)}function GD(i,e){if(i instanceof Function){let t=[void 0,void 0,void 0,void 0];return t[e]=i,t}else return[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function WD(i,e,t,n){let r=e.get(g9);r.impl??=e.get(qD);let s=e.get(Fr,null,{optional:!0}),a=t?.phase??vr.MixedReadWrite,o=t?.manualCleanup!==!0?e.get(Ri):null,l=e.get(p9,null,{optional:!0}),c=new ju(r.impl,GD(i,a),l?.view,n,o,s?.snapshot(null));return r.impl.register(c),c}var XD=(i,e,t,n)=>{};function YD(i,e,t,n){XD(i,e,t,n)}var KD=()=>null;function v9(i,e,t=!1){return KD(i,e,t)}function m9(i,e){let t=i.contentQueries;if(t!==null){let n=Ee(null);try{for(let r=0;ri,createScript:i=>i,createScriptURL:i=>i})}catch{}return g5}function al(i){return QD()?.createHTML(i)||i}var v5;function w9(){if(v5===void 0&&(v5=null,Tt.trustedTypes))try{v5=Tt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return v5}function Dg(i){return w9()?.createHTML(i)||i}function Eg(i){return w9()?.createScriptURL(i)||i}var K1=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Kg})`}},$u=class extends K1{getTypeName(){return"HTML"}},qu=class extends K1{getTypeName(){return"Style"}},Gu=class extends K1{getTypeName(){return"Script"}},Wu=class extends K1{getTypeName(){return"URL"}},Xu=class extends K1{getTypeName(){return"ResourceURL"}};function H0(i){return i instanceof K1?i.changingThisBreaksApplicationSecurity:i}function ri(i,e){let t=JD(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Kg})`)}return t===e}function JD(i){return i instanceof K1&&i.getTypeName()||null}function b9(i){return new $u(i)}function y9(i){return new qu(i)}function C9(i){return new Gu(i)}function x9(i){return new Wu(i)}function M9(i){return new Xu(i)}function eE(i){let e=new Ku(i);return tE()?new Yu(e):e}var Yu=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let t=new window.DOMParser().parseFromString(al(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Ku=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=al(e),t}};function tE(){try{return!!new window.DOMParser().parseFromString(al(""),"text/html")}catch{return!1}}var iE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ol(i){return i=String(i),i.match(iE)?i:"unsafe:"+i}function si(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function ea(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var A9=si("area,br,col,hr,img,wbr"),_9=si("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),S9=si("rp,rt"),nE=ea(S9,_9),rE=ea(_9,si("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")),sE=ea(S9,si("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")),Vg=ea(A9,rE,sE,nE),D9=si("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),aE=si("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,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),oE=si("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"),lE=ea(D9,aE,oE),cE=si("script,style,template"),Qu=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=uE(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=dE(t);if(s){t=s;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=Tg(e).toLowerCase();if(!Vg.hasOwnProperty(t))return this.sanitizedSomething=!0,!cE.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r"),!0}endElement(e){let t=Tg(e).toLowerCase();Vg.hasOwnProperty(t)&&!A9.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(Lg(e))}};function hE(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function dE(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw E9(e);return e}function uE(i){let e=i.firstChild;if(e&&hE(i,e))throw E9(e);return e}function Tg(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function E9(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var fE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,pE=/([^\#-~ |!])/g;function Lg(i){return i.replace(/&/g,"&").replace(fE,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(pE,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var m5;function r6(i,e){let t=null;try{m5=m5||eE(i);let n=e?String(e):"";t=m5.getInertBodyElement(n);let r=5,s=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=t.innerHTML,t=m5.getInertBodyElement(n)}while(n!==s);let o=new Qu().sanitizeChildren(zg(t)||t);return al(o)}finally{if(t){let n=zg(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function zg(i){return"content"in i&&gE(i)?i.content:null}function gE(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var K0=function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i}(K0||{});function V9(i){let e=s6();return e?Dg(e.sanitize(K0.HTML,i)||""):ri(i,"HTML")?Dg(H0(i)):r6(u9(),Xs(i))}function Or(i){let e=s6();return e?e.sanitize(K0.URL,i)||"":ri(i,"URL")?H0(i):ol(Xs(i))}function vE(i){let e=s6();if(e)return Eg(e.sanitize(K0.RESOURCE_URL,i)||"");if(ri(i,"ResourceURL"))return Eg(H0(i));throw new X(904,!1)}function mE(i,e){return e==="src"&&(i==="embed"||i==="frame"||i==="iframe"||i==="media"||i==="script")||e==="href"&&(i==="base"||i==="link")?vE:Or}function T9(i,e,t){return mE(e,t)(i)}function s6(){let i=Ve();return i&&i[X1].sanitizer}var wE=/^>|^->||--!>|)/g,yE="\u200B$1\u200B";function CE(i){return i.replace(wE,e=>e.replace(bE,yE))}function L9(i){return i instanceof Function?i():i}function xE(i,e,t){let n=i.length;for(;;){let r=i.indexOf(e,t);if(r===-1)return r;if(r===0||i.charCodeAt(r-1)<=32){let s=e.length;if(r+s===n||i.charCodeAt(r+s)<=32)return r}t=r+1}}var z9="ng-template";function ME(i,e,t,n){let r=0;if(n){for(;r-1){let s;for(;++rs?d="":d=r[h+1].toLowerCase(),n&2&&c!==d){if(G0(n))return!1;a=!0}}}}return G0(n)||a}function G0(i){return(i&1)===0}function SE(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let s=!1;for(;r-1)for(t++;t0?'="'+o+'"':"")+"]"}else n&8?r+="."+a:n&4&&(r+=" "+a);else r!==""&&!G0(a)&&(e+=Pg(s,r),r=""),n=a,s=s||!G0(n);t++}return r!==""&&(e+=Pg(s,r)),e}function zE(i){return i.map(LE).join(",")}function PE(i){let e=[],t=[],n=1,r=2;for(;nZt&&I9(i,e,Zt,!1),et(a?2:0,r),t(n,r)}finally{fn(s),et(a?3:1,r)}}function cl(i,e,t){WE(i,e,t),(t.flags&64)===64&&XE(i,e,t)}function h6(i,e,t=b1){let n=e.localNames;if(n!==null){let r=e.index+1;for(let s=0;snull;function qE(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function N9(i,e,t,n,r,s,a,o){if(!o&&u6(e,i,t,n,r)){Lr(e)&&GE(t,e.index);return}if(e.type&3){let l=b1(e,t);n=qE(n),r=a!=null?a(r,e.value||"",n):r,s.setProperty(l,n,r)}else e.type&12}function GE(i,e){let t=m1(e,i);t[fe]&16||(t[fe]|=64)}function WE(i,e,t){let n=t.directiveStart,r=t.directiveEnd;Lr(t)&&ZE(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||R5(t,e);let s=t.initialInputs;for(let a=n;a=0?n[o]():n[-o].unsubscribe(),a+=2}else{let o=n[t[a+1]];t[a].call(o)}n!==null&&(e[T5]=null);let r=e[Hi];if(r!==null){e[Hi]=null;for(let a=0;a{Ks(i.lView)},consumerOnSignalRead(){this.lView[L0]=this}});function CV(i){let e=i[L0]??Object.create(xV);return e.lView=i,e}var xV=se(Z({},Vs),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=un(i.lView);for(;e&&!K9(e[_e]);)e=un(e);e&&Ev(e)},consumerOnSignalRead(){this.lView[L0]=this}});function K9(i){return i.type!==2}function Q9(i){if(i[L5]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[L5])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[fe]&8192)}}var MV=100;function J9(i,e=!0,t=0){let r=i[X1].rendererFactory,s=!1;s||r.begin?.();try{AV(i,t)}catch(a){throw e&&eV(i,a),a}finally{s||r.end?.()}}function AV(i,e){let t=zv();try{gg(!0),i3(i,e);let n=0;for(;nl(i);){if(n===MV)throw new X(103,!1);n++,i3(i,1)}}finally{gg(t)}}function _V(i,e,t,n){if(zr(e))return;let r=e[fe],s=!1,a=!1;j3(e);let o=!0,l=null,c=null;s||(K9(i)?(c=mV(e),l=Go(c)):od()===null?(o=!1,c=CV(e),l=Go(c)):e[L0]&&(fd(e[L0]),e[L0]=null));try{Dv(e),JS(i.bindingStartIndex),t!==null&&B9(i,e,t,2,n);let h=(r&3)===3;if(!s)if(h){let p=i.preOrderCheckHooks;p!==null&&C5(e,p,null)}else{let p=i.preOrderHooks;p!==null&&x5(e,p,0,null),uu(e,0)}if(a||SV(e),Q9(e),em(e,0),i.contentQueries!==null&&m9(i,e),!s)if(h){let p=i.contentCheckHooks;p!==null&&C5(e,p)}else{let p=i.contentHooks;p!==null&&x5(e,p,1),uu(e,1)}EV(i,e);let d=i.components;d!==null&&im(e,d,0);let u=i.viewQuery;if(u!==null&&Uu(2,u,n),!s)if(h){let p=i.viewCheckHooks;p!==null&&C5(e,p)}else{let p=i.viewHooks;p!==null&&x5(e,p,2),uu(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[du]){for(let p of e[du])p();e[du]=null}s||(X9(e),e[fe]&=-73)}catch(h){throw s||Ks(e),h}finally{c!==null&&(dd(c,l),o&&bV(c)),U3()}}function em(i,e){for(let t=l9(i);t!==null;t=c9(t))for(let n=w0;n0&&(i[t-1][X0]=n[X0]);let s=E5(i,w0+e);sV(n[_e],n);let a=s[Y1];a!==null&&a.detachView(s[_e]),n[Nt]=null,n[X0]=null,n[fe]&=-129}return n}function VV(i,e,t,n){let r=w0+n,s=t.length;n>0&&(t[r-1][X0]=e),n-1&&(n3(e,n),E5(t,n))}this._attachedToViewContainer=!1}U9(this._lView[_e],this._lView)}onDestroy(e){Vv(this._lView,e)}markForCheck(){w6(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[fe]&=-129}reattach(){Tu(this._lView),this._lView[fe]|=128}detectChanges(){this._lView[fe]|=1024,J9(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new X(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=P5(this._lView),t=this._lView[hn];t!==null&&!e&&v6(t,this._lView),j9(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new X(902,!1);this._appRef=e;let t=P5(this._lView),n=this._lView[hn];n!==null&&!t&&sm(n,this._lView),Tu(this._lView)}};var gn=(()=>{class i{static __NG_ELEMENT_ID__=zV}return i})(),TV=gn,LV=class extends TV{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Z9(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new qs(r)}};function zV(){return ul(l0(),Ve())}function ul(i,e){return i.type&4?new LV(e,i,Pr(i,e)):null}function ta(i,e,t,n,r){let s=i.data[e];if(s===null)s=PV(i,e,t,n,r),eD()&&(s.flags|=32);else if(s.type&64){s.type=t,s.value=n,s.attrs=r;let a=KS();s.injectorIndex=a===null?-1:a.injectorIndex}return wn(s,!0),s}function PV(i,e,t,n,r){let s=Lv(),a=I3(),o=a?s:s&&s.parent,l=i.data[e]=HV(i,o,t,e,n,r);return kV(i,l,s,a),l}function kV(i,e,t,n){i.firstChild===null&&(i.firstChild=e),t!==null&&(n?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function HV(i,e,t,n,r,s){let a=e?e.injectorIndex:-1,o=0;return Tv()&&(o|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:a,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:o,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev: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}}var GW=new RegExp(`^(\\d+)*(${ZD}|${ND})*(.*)`);var FV=()=>null;function r3(i,e){return FV(i,e)}var RV=class{},am=class{},s3=class{resolveComponentFactory(e){throw Error(`No component factory found for ${r0(e)}.`)}},fl=class{static NULL=new s3},w1=class{},c0=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>OV()}return i})();function OV(){let i=Ve(),e=l0(),t=m1(e.index,i);return(Fi(t)?t:i)[pt]}var IV=(()=>{class i{static \u0275prov=Q({token:i,providedIn:"root",factory:()=>null})}return i})();var gu={},a3=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=J5(n);let r=this.injector.get(e,gu,n);return r!==gu||t===gu?r:this.parentInjector.get(e,t,n)}};function o3(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,s=0;if(e!==null)for(let a=0;a0&&(t.directiveToIndex=new Map);for(let u=0;u0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function XV(i,e,t){if(t){if(e.exportAs)for(let n=0;n{let[t,n,r]=i[e],s={propName:t,templateName:e,isSignal:(n&ll.SignalBased)!==0};return r&&(s.transform=r),s})}function QV(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function JV(i,e,t){let n=e instanceof Bt?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new a3(t,n):t}function eT(i){let e=i.get(w1,null);if(e===null)throw new X(407,!1);let t=i.get(IV,null),n=i.get(Sr,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:n}}function tT(i,e){let t=(i.selectors[0][0]||"div").toLowerCase();return k9(e,t,t==="svg"?OS:t==="math"?IS:null)}var Dr=class extends am{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=KV(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=QV(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=zE(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){et(22);let s=Ee(null);try{let a=this.componentDef,o=n?["ng-version","19.2.14"]:PE(this.componentDef.selectors[0]),l=o6(0,null,null,1,0,null,null,null,null,[o],null),c=JV(a,r||this.ngModule,e),h=eT(c),d=h.rendererFactory.createRenderer(null,a),u=n?jE(d,n,a.encapsulation,c):tT(a,d),p=l6(null,l,null,512|R9(a),null,null,h,d,c,null,v9(u,c,!0));p[Zt]=u,j3(p);let f=null;try{let g=cm(Zt,l,p,"#host",()=>[this.componentDef],!0,0);u&&(F9(d,u,g),kr(u,p)),cl(l,p,g),n6(l,g,p),hm(l,g),t!==void 0&&iT(g,this.ngContentSelectors,t),f=m1(g.index,p),p[s0]=f[s0],f6(l,p,null)}catch(g){throw f!==null&&Nu(f),Nu(p),g}finally{et(23),U3()}return new l3(this.componentType,p)}finally{Ee(s)}}},l3=class extends RV{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Sv(t[_e],Zt),this.location=Pr(this._tNode,t),this.instance=m1(this._tNode.index,t)[s0],this.hostView=this.changeDetectorRef=new qs(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,s=u6(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let a=m1(n.index,r);w6(a,1)}get injector(){return new an(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function iT(i,e,t){let n=i.projection=[];for(let r=0;r{class i{static __NG_ELEMENT_ID__=nT}return i})();function nT(){let i=l0();return um(i,Ve())}var rT=ai,dm=class extends rT{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Pr(this._hostTNode,this._hostLView)}get injector(){return new an(this._hostTNode,this._hostLView)}get parentInjector(){let e=G3(this._hostTNode,this._hostLView);if(jv(e)){let t=H5(e,this._hostLView),n=k5(e),r=t[_e].data[n+8];return new an(r,t)}else return new an(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Ig(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-w0}createEmbeddedView(e,t,n){let r,s;typeof n=="number"?r=n:n!=null&&(r=n.index,s=n.injector);let a=r3(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},s,a);return this.insertImpl(o,r,e3(this._hostTNode,a)),o}createComponent(e,t,n,r,s){let a=e&&!kS(e),o;if(a)o=t;else{let f=t||{};o=f.index,n=f.injector,r=f.projectableNodes,s=f.environmentInjector||f.ngModuleRef}let l=a?e:new Dr(cn(e)),c=n||this.parentInjector;if(!s&&l.ngModule==null){let g=(a?c:this.parentInjector).get(Bt,null);g&&(s=g)}let h=cn(l.componentType??{}),d=r3(this._lContainer,h?.id??null),u=d?.firstChild??null,p=l.create(c,r,u,s);return this.insertImpl(p.hostView,o,e3(this._hostTNode,d)),p}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(ZS(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let l=r[Nt],c=new dm(l,l[o0],l[Nt]);c.detach(c.indexOf(e))}}let s=this._adjustIndex(t),a=this._lContainer;return rm(a,r,s,n),e.attachToViewContainerRef(),dv(vu(a),s,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=Ig(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=n3(this._lContainer,t);n&&(E5(vu(this._lContainer),t),U9(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=n3(this._lContainer,t);return n&&E5(vu(this._lContainer),t)!=null?new qs(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Ig(i){return i[z5]}function vu(i){return i[z5]||(i[z5]=[])}function um(i,e){let t,n=e[i.index];return ii(n)?t=n:(t=nm(n,e,null,i),e[i.index]=t,c6(e,t)),aT(t,e,i,n),new dm(t,i,e)}function sT(i,e){let t=i[pt],n=t.createComment(""),r=b1(e,i),s=t.parentNode(r);return N5(t,s,n,t.nextSibling(r),!1),n}var aT=cT,oT=()=>!1;function lT(i,e,t){return oT(i,e,t)}function cT(i,e,t,n){if(i[dn])return;let r;t.type&8?r=v1(n):r=sT(e,t),i[dn]=r}var c3=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},h3=class i{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let s=0;s0)n.push(a[o/2]);else{let c=s[o+1],h=e[-l];for(let d=w0;de.trim())}function wT(i,e,t){i.queries===null&&(i.queries=new u3),i.queries.track(new f3(e,t))}function y6(i,e){return i.queries.getByIndex(e)}function bT(i,e){let t=i[_e],n=y6(t,e);return n.crossesNgTemplate?p3(t,i,e,[]):fm(t,i,n,e)}function yT(i){let e=[],t=new Map;function n(r){let s=t.get(r);if(!s){let a=i(r);t.set(r,s=a.then(AT))}return s}return U5.forEach((r,s)=>{let a=[];r.templateUrl&&a.push(n(r.templateUrl).then(c=>{r.template=c}));let o=typeof r.styles=="string"?[r.styles]:r.styles||[];if(r.styles=o,r.styleUrl&&r.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(r.styleUrls?.length){let c=r.styles.length,h=r.styleUrls;r.styleUrls.forEach((d,u)=>{o.push(""),a.push(n(d).then(p=>{o[c+u]=p,h.splice(h.indexOf(d),1),h.length==0&&(r.styleUrls=void 0)}))})}else r.styleUrl&&a.push(n(r.styleUrl).then(c=>{o.push(c),r.styleUrl=void 0}));let l=Promise.all(a).then(()=>_T(s));e.push(l)}),xT(),Promise.all(e).then(()=>{})}var U5=new Map,CT=new Set;function xT(){let i=U5;return U5=new Map,i}function MT(){return U5.size===0}function AT(i){return typeof i=="string"?i:i.text()}function _T(i){CT.delete(i)}var Er=class{},C6=class{};var $5=class extends Er{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new j5(this);constructor(e,t,n,r=!0){super(),this.ngModuleType=e,this._parent=t;let s=pv(e);this._bootstrapComponents=L9(s.bootstrap),this._r3Injector=Qv(e,t,[{provide:Er,useValue:this},{provide:fl,useValue:this.componentFactoryResolver},...n],r0(e),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},q5=class extends C6{moduleType;constructor(e){super(),this.moduleType=e}create(e){return new $5(this.moduleType,e,[])}};function ST(i,e,t){return new $5(i,e,t,!1)}var g3=class extends Er{injector;componentFactoryResolver=new j5(this);instance=null;constructor(e){super();let t=new Zs([...e.providers,{provide:Er,useValue:this},{provide:fl,useValue:this.componentFactoryResolver}],e.parent||L3(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ia(i,e,t=null){return new g3({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var DT=(()=>{class i{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let n=gv(!1,t.type),r=n.length>0?ia([n],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=Q({token:i,providedIn:"environment",factory:()=>new i(ee(Bt))})}return i})();function Ue(i){return Ws(()=>{let e=pm(i),t=se(Z({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===a9.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(DT).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||P0.Emulated,styles:i.styles||n0,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Rr("NgStandalone"),gm(t);let n=i.dependencies;return t.directiveDefs=Bg(n,!1),t.pipeDefs=Bg(n,!0),t.id=zT(t),t})}function ET(i){return cn(i)||yS(i)}function VT(i){return i!==null}function Ie(i){return Ws(()=>({type:i.type,bootstrap:i.bootstrap||n0,declarations:i.declarations||n0,imports:i.imports||n0,exports:i.exports||n0,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function TT(i,e){if(i==null)return ln;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],s,a,o,l;Array.isArray(r)?(o=r[0],s=r[1],a=r[2]??s,l=r[3]||null):(s=r,a=r,o=ll.None,l=null),t[s]=[n,o,l],e[s]=a}return t}function LT(i){if(i==null)return ln;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Je(i){return Ws(()=>{let e=pm(i);return gm(e),e})}function Oi(i){return{type:i.type,name:i.name,factory:null,pure:i.pure!==!1,standalone:i.standalone??!0,onDestroy:i.type.prototype.ngOnDestroy||null}}function pm(i){let e={};return{type:i.type,providersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputConfig:i.inputs||ln,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||n0,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:TT(i.inputs,e),outputs:LT(i.outputs),debugInfo:null}}function gm(i){i.features?.forEach(e=>e(i))}function Bg(i,e){if(!i)return null;let t=e?CS:ET;return()=>(typeof i=="function"?i():i).map(n=>t(n)).filter(VT)}function zT(i){let e=0,t=typeof i.consts=="function"?"":i.consts,n=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,t,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery];for(let s of n.join("|"))e=Math.imul(31,e)+s.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function PT(i){return Object.getPrototypeOf(i.prototype).constructor}function Q0(i){let e=PT(i.type),t=!0,n=[i];for(;e;){let r;if(g1(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new X(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let a=i;a.inputs=mu(i.inputs),a.declaredInputs=mu(i.declaredInputs),a.outputs=mu(i.outputs);let o=r.hostBindings;o&&OT(i,o);let l=r.viewQuery,c=r.contentQueries;if(l&&FT(i,l),c&&RT(i,c),kT(i,r),K_(i.outputs,r.outputs),g1(r)&&r.data.animation){let h=i.data;h.animation=(h.animation||[]).concat(r.data.animation)}}let s=r.features;if(s)for(let a=0;a=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=_r(r.hostAttrs,t=_r(t,r.hostAttrs))}}function mu(i){return i===ln?{}:i===n0?[]:i}function FT(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function RT(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,s)=>{e(n,r,s),t(n,r,s)}:i.contentQueries=e}function OT(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function vm(i){return BT(i)?Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i:!1}function IT(i,e){if(Array.isArray(i))for(let t=0;t{class i{log(t){console.log(t)}warn(t){console.warn(t)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"platform"})}return i})();var A6=new J(""),na=new J(""),pl=(()=>{class i{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(t,n,r){this._ngZone=t,this.registry=n,z3()&&(this._destroyRef=j(Ri,{optional:!0})??void 0),_6||($T(r),r.addToWindow(n)),this._watchAngularEvents(),t.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let t=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),n=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{Ne.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{t.unsubscribe(),n.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>n.updateCb&&n.updateCb(t)?(clearTimeout(n.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,n,r){let s=-1;n&&n>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==s),t()},n)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,n,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,n,r),this._runCallbacksIfReady()}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,n,r){return[]}static \u0275fac=function(n){return new(n||i)(ee(Ne),ee(gl),ee(na))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),gl=(()=>{class i{_applications=new Map;registerApplication(t,n){this._applications.set(t,n)}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,n=!0){return _6?.findTestabilityInTree(this,t,n)??null}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"platform"})}return i})();function $T(i){_6=i}var _6,qT=(()=>{class i{static \u0275prov=Q({token:i,providedIn:"root",factory:()=>new v3})}return i})(),v3=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function yn(i){return!!i&&typeof i.then=="function"}function bm(i){return!!i&&typeof i.subscribe=="function"}var ym=new J("");function S6(i){return mn([{provide:ym,multi:!0,useValue:i}])}var Cm=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=j(ym,{optional:!0})??[];injector=j(Yt);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let s=a0(this.injector,r);if(yn(s))t.push(s);else if(bm(s)){let a=new Promise((o,l)=>{s.subscribe({complete:o,error:l})});t.push(a)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),t.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),D6=new J("");function GT(){gd(()=>{throw new X(600,!1)})}function WT(i){return i.isBoundToModule}var XT=10;function xm(i,e){return Array.isArray(e)?e.reduce(xm,i):Z(Z({},i),e)}var ei=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=j(LD);afterRenderManager=j(g9);zonelessEnabled=j(X3);rootEffectScheduler=j(qT);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new it;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=j(ni).hasPendingTasks.pipe(ue(t=>!t));constructor(){j(Fr,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=j(Bt);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Yt.NULL){et(10);let s=t instanceof am;if(!this._injector.get(Cm).done){let p="";throw new X(405,p)}let o;s?o=t:o=this._injector.get(fl).resolveComponentFactory(t),this.componentTypes.push(o.componentType);let l=WT(o)?void 0:this._injector.get(Er),c=n||o.selector,h=o.create(r,[],c,l),d=h.location.nativeElement,u=h.injector.get(A6,null);return u?.registerApplication(d),h.onDestroy(()=>{this.detachView(h.hostView),A5(this.components,h),u?.unregisterApplication(d)}),this._loadComponent(h),et(11,h),h}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){et(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(t6.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new X(101,!1);let t=Ee(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Ee(t),this.afterTick.next(),et(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(w1,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++nl(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){let n=t;A5(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(D6,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>A5(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new X(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function A5(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function YT(i,e,t,n){if(!t&&!nl(i))return;J9(i,e,t&&!n?0:1)}function Ft(i,e,t,n){let r=Ve(),s=N3();if(J1(r,s,e)){let a=Mt(),o=$3();KE(o,r,i,e,t,n)}return Ft}function Mm(i,e,t,n){return J1(i,N3(),t)?e+Xs(t)+n:C1}function w5(i,e){return i<<17|e<<2}function vn(i){return i>>17&32767}function KT(i){return(i&2)==2}function QT(i,e){return i&131071|e<<17}function m3(i){return i|2}function Vr(i){return(i&131068)>>2}function wu(i,e){return i&-131069|e<<2}function JT(i){return(i&1)===1}function w3(i){return i|1}function eL(i,e,t,n,r,s){let a=s?e.classBindings:e.styleBindings,o=vn(a),l=Vr(a);i[n]=t;let c=!1,h;if(Array.isArray(t)){let d=t;h=d[1],(h===null||Ys(d,h)>0)&&(c=!0)}else h=t;if(r)if(l!==0){let u=vn(i[o+1]);i[n+1]=w5(u,o),u!==0&&(i[u+1]=wu(i[u+1],n)),i[o+1]=QT(i[o+1],n)}else i[n+1]=w5(o,0),o!==0&&(i[o+1]=wu(i[o+1],n)),o=n;else i[n+1]=w5(l,0),o===0?o=n:i[l+1]=wu(i[l+1],n),l=n;c&&(i[n+1]=m3(i[n+1])),Ng(i,h,n,!0),Ng(i,h,n,!1),tL(e,h,i,n,s),a=w5(o,l),s?e.classBindings=a:e.styleBindings=a}function tL(i,e,t,n,r){let s=r?i.residualClasses:i.residualStyles;s!=null&&typeof e=="string"&&Ys(s,e)>=0&&(t[n+1]=w3(t[n+1]))}function Ng(i,e,t,n){let r=i[t+1],s=e===null,a=n?vn(r):Vr(r),o=!1;for(;a!==0&&(o===!1||s);){let l=i[a],c=i[a+1];iL(l,e)&&(o=!0,i[a+1]=n?w3(c):m3(c)),a=n?vn(c):Vr(c)}o&&(i[t+1]=n?m3(r):w3(r))}function iL(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Ys(i,e)>=0:!1}var W0={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function nL(i){return i.substring(W0.key,W0.keyEnd)}function rL(i){return sL(i),Am(i,_m(i,0,W0.textEnd))}function Am(i,e){let t=W0.textEnd;return t===e?-1:(e=W0.keyEnd=aL(i,W0.key=e,t),_m(i,e,t))}function sL(i){W0.key=0,W0.keyEnd=0,W0.value=0,W0.valueEnd=0,W0.textEnd=i.length}function _m(i,e,t){for(;e32;)e++;return e}function q(i,e,t){let n=Ve(),r=N3();if(J1(n,r,e)){let s=Mt(),a=$3();N9(s,a,n,i,e,n[pt],t,!1)}return q}function b3(i,e,t,n,r){u6(e,i,t,r?"class":"style",n)}function ra(i,e,t){return Sm(i,e,t,!1),ra}function jt(i,e){return Sm(i,e,null,!0),jt}function Cn(i){lL(pL,oL,i,!0)}function oL(i,e){for(let t=rL(e);t>=0;t=Am(e,t))V3(i,nL(e),!0)}function Sm(i,e,t,n){let r=Ve(),s=Mt(),a=Pv(2);if(s.firstUpdatePass&&Em(s,i,a,n),e!==C1&&J1(r,a,e)){let o=s.data[bn()];Vm(s,o,r,r[pt],i,r[a+1]=vL(e,t),n,a)}}function lL(i,e,t,n){let r=Mt(),s=Pv(2);r.firstUpdatePass&&Em(r,null,s,n);let a=Ve();if(t!==C1&&J1(a,s,t)){let o=r.data[bn()];if(Tm(o,n)&&!Dm(r,s)){let l=n?o.classesWithoutHost:o.stylesWithoutHost;l!==null&&(t=xu(l,t||"")),b3(r,o,a,t,n)}else gL(r,o,a,a[pt],a[s+1],a[s+1]=fL(i,e,t),n,s)}}function Dm(i,e){return e>=i.expandoStartIndex}function Em(i,e,t,n){let r=i.data;if(r[t+1]===null){let s=r[bn()],a=Dm(i,t);Tm(s,n)&&e===null&&!a&&(e=!1),e=cL(r,s,e,n),eL(r,s,e,t,a,n)}}function cL(i,e,t,n){let r=nD(i),s=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=bu(null,i,e,t,n),t=Gs(t,e.attrs,n),s=null);else{let a=e.directiveStylingLast;if(a===-1||i[a]!==r)if(t=bu(r,i,e,t,n),s===null){let l=hL(i,e,n);l!==void 0&&Array.isArray(l)&&(l=bu(null,i,e,l[1],n),l=Gs(l,e.attrs,n),dL(i,e,n,l))}else s=uL(i,e,n)}return s!==void 0&&(n?e.residualClasses=s:e.residualStyles=s),t}function hL(i,e,t){let n=t?e.classBindings:e.styleBindings;if(Vr(n)!==0)return i[vn(n)]}function dL(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[vn(r)]=n}function uL(i,e,t){let n,r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s0;){let l=i[r],c=Array.isArray(l),h=c?l[1]:l,d=h===null,u=t[r+1];u===C1&&(u=d?n0:void 0);let p=d?cu(u,n):h===n?u:void 0;if(c&&!G5(p)&&(p=cu(l,n)),G5(p)&&(o=p,a))return o;let f=i[r+1];r=a?vn(f):Vr(f)}if(e!==null){let l=s?e.residualClasses:e.residualStyles;l!=null&&(o=cu(l,n))}return o}function G5(i){return i!==void 0}function vL(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=r0(H0(i)))),i}function Tm(i,e){return(i.flags&(e?8:16))!==0}function D(i,e,t,n){let r=Ve(),s=Mt(),a=Zt+i,o=r[pt],l=s.firstCreatePass?cm(a,s,r,e,d6,O3(),t,n):s.data[a],c=mL(s,r,l,o,e,i);r[a]=c;let h=il(l);return wn(l,!0),F9(o,c,l),!g6(l)&&rl()&&hl(s,r,c,l),(qS()===0||h)&&kr(c,r),GS(),h&&(cl(s,r,l),n6(s,l,r)),n!==null&&h6(r,l),D}function S(){let i=l0();I3()?B3():(i=i.parent,wn(i,!1));let e=i;XS(e)&&YS(),WS();let t=Mt();return t.firstCreatePass&&hm(t,e),e.classesWithoutHost!=null&&cD(e)&&b3(t,e,Ve(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&hD(e)&&b3(t,e,Ve(),e.stylesWithoutHost,!1),S}function le(i,e,t,n){return D(i,e,t,n),S(),le}var mL=(i,e,t,n,r,s)=>(sl(!0),k9(n,r,aD()));function wL(i,e,t,n,r){let s=e.consts,a=Ar(s,n),o=ta(e,i,8,"ng-container",a);a!==null&&o3(o,a,!0);let l=Ar(s,r);return O3()&&b6(e,t,o,l,d6),o.mergedAttrs=_r(o.mergedAttrs,o.attrs),e.queries!==null&&e.queries.elementStart(e,o),o}function be(i,e,t){let n=Ve(),r=Mt(),s=i+Zt,a=r.firstCreatePass?wL(s,r,n,e,t):r.data[s];wn(a,!0);let o=bL(r,n,a,i);return n[s]=o,rl()&&hl(r,n,o,a),kr(o,n),il(a)&&(cl(r,n,a),n6(r,a,n)),t!=null&&h6(n,a),be}function ye(){let i=l0(),e=Mt();return I3()?B3():(i=i.parent,wn(i,!1)),e.firstCreatePass&&(q3(e,i),P3(i)&&e.queries.elementEnd(i)),ye}function xn(i,e,t){return be(i,e,t),ye(),xn}var bL=(i,e,t,n)=>(sl(!0),FE(e[pt],""));function At(){return Ve()}var rn=void 0;function yL(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var CL=["en",[["a","p"],["AM","PM"],rn],[["AM","PM"],rn,rn],[["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"]],rn,[["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"]],rn,[["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}",rn,"{1} 'at' {0}",rn],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",yL],Bs={};function Lm(i,e,t){typeof e!="string"&&(t=e,e=i[at.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),Bs[e]=i,t&&(Bs[e][at.ExtraData]=t)}function F0(i){let e=xL(i),t=jg(e);if(t)return t;let n=e.split("-")[0];if(t=jg(n),t)return t;if(n==="en")return CL;throw new X(701,!1)}function jg(i){return i in Bs||(Bs[i]=Tt.ng&&Tt.ng.common&&Tt.ng.common.locales&&Tt.ng.common.locales[i]),Bs[i]}var at=function(i){return i[i.LocaleId=0]="LocaleId",i[i.DayPeriodsFormat=1]="DayPeriodsFormat",i[i.DayPeriodsStandalone=2]="DayPeriodsStandalone",i[i.DaysFormat=3]="DaysFormat",i[i.DaysStandalone=4]="DaysStandalone",i[i.MonthsFormat=5]="MonthsFormat",i[i.MonthsStandalone=6]="MonthsStandalone",i[i.Eras=7]="Eras",i[i.FirstDayOfWeek=8]="FirstDayOfWeek",i[i.WeekendRange=9]="WeekendRange",i[i.DateFormat=10]="DateFormat",i[i.TimeFormat=11]="TimeFormat",i[i.DateTimeFormat=12]="DateTimeFormat",i[i.NumberSymbols=13]="NumberSymbols",i[i.NumberFormats=14]="NumberFormats",i[i.CurrencyCode=15]="CurrencyCode",i[i.CurrencySymbol=16]="CurrencySymbol",i[i.CurrencyName=17]="CurrencyName",i[i.Currencies=18]="Currencies",i[i.Directionality=19]="Directionality",i[i.PluralCase=20]="PluralCase",i[i.ExtraData=21]="ExtraData",i}(at||{});function xL(i){return i.toLowerCase().replace(/_/g,"-")}var W5="en-US";var ML=W5;function AL(i){typeof i=="string"&&(ML=i.toLowerCase().replace(/_/g,"-"))}function Ug(i,e,t){return function n(r){if(r===Function)return t;let s=Lr(i)?m1(i.index,e):e;w6(s,5);let a=e[s0],o=$g(e,a,t,r),l=n.__ngNextListenerFn__;for(;l;)o=$g(e,a,l,r)&&o,l=l.__ngNextListenerFn__;return o}}function $g(i,e,t,n){let r=Ee(null);try{return et(6,e,t),t(n)!==!1}catch(s){return _L(i,s),!1}finally{et(7,e,t),Ee(r)}}function _L(i,e){let t=i[xr],n=t?t.get(Y0,null):null;n&&n.handleError(e)}function qg(i,e,t,n,r,s){let a=e[t],o=e[_e],c=o.data[t].outputs[n],h=a[c],d=o.firstCreatePass?R3(o):null,u=F3(e),p=h.subscribe(s),f=u.length;u.push(s,p),d&&d.push(r,i.index,f,-(f+1))}function Me(i,e,t,n){let r=Ve(),s=Mt(),a=l0();return DL(s,r,r[pt],a,i,e,n),Me}function SL(i,e,t,n){let r=i.cleanup;if(r!=null)for(let s=0;sl?o[l]:null}typeof a=="string"&&(s+=2)}return null}function DL(i,e,t,n,r,s,a){let o=il(n),c=i.firstCreatePass?R3(i):null,h=F3(e),d=!0;if(n.type&3||a){let u=b1(n,e),p=a?a(u):u,f=h.length,g=a?x=>a(v1(x[n.index])):n.index,y=null;if(!a&&o&&(y=SL(i,e,r,n.index)),y!==null){let x=y.__ngLastListenerFn__||y;x.__ngNextListenerFn__=s,y.__ngLastListenerFn__=s,d=!1}else{s=Ug(n,e,s),YD(e,p,r,s);let x=t.listen(p,r,s);h.push(s,x),c&&c.push(r,g,f,f+1)}}else s=Ug(n,e,s);if(d){let u=n.outputs?.[r],p=n.hostDirectiveOutputs?.[r];if(p&&p.length)for(let f=0;f(sl(!0),kE(e[pt],n));function B(i){return Rt("",i,""),B}function Rt(i,e,t){let n=Ve(),r=Mm(n,i,e,t);return r!==C1&&LL(n,bn(),r),Rt}function LL(i,e,t){let n=_v(e,i);HE(i[pt],n,t)}function zL(i,e,t){let n=Mt();if(n.firstCreatePass){let r=g1(i);y3(t,n.data,n.blueprint,r,!0),y3(e,n.data,n.blueprint,r,!1)}}function y3(i,e,t,n,r){if(i=Xt(i),Array.isArray(i))for(let s=0;s>20;if(Cr(i)||!i.multi){let p=new pn(c,r,Y),f=Cu(l,e,r?h:h+u,d);f===-1?(ku(R5(o,a),s,l),yu(s,i,e.length),e.push(l),o.directiveStart++,o.directiveEnd++,r&&(o.providerIndexes+=1048576),t.push(p),a.push(p)):(t[f]=p,a[f]=p)}else{let p=Cu(l,e,h+u,d),f=Cu(l,e,h,h+u),g=p>=0&&t[p],y=f>=0&&t[f];if(r&&!y||!r&&!g){ku(R5(o,a),s,l);let x=HL(r?kL:PL,t.length,r,n,c);!r&&y&&(t[f].providerFactory=x),yu(s,i,e.length,0),e.push(l),o.directiveStart++,o.directiveEnd++,r&&(o.providerIndexes+=1048576),t.push(x),a.push(x)}else{let x=zm(t[r?f:p],c,!r&&n);yu(s,i,p>-1?p:f,x)}!r&&n&&y&&t[f].componentProviders++}}}function yu(i,e,t,n){let r=Cr(e),s=SS(e);if(r||s){let l=(s?Xt(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let h=c.indexOf(t);h===-1?c.push(t,[n,l]):c[h+1].push(n,l)}else c.push(t,l)}}}function zm(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function Cu(i,e,t,n){for(let r=t;r{t.providersResolver=(n,r)=>zL(n,r?r(i):i,e)}}function ml(i,e,t,n){return km(Ve(),Qs(),i,e,t,n)}function Mn(i,e,t,n,r){return Hm(Ve(),Qs(),i,e,t,n,r)}function Pm(i,e,t,n,r,s){return FL(Ve(),Qs(),i,e,t,n,r,s)}function V6(i,e){let t=i[e];return t===C1?void 0:t}function km(i,e,t,n,r,s){let a=e+t;return J1(i,a,r)?x6(i,a+1,s?n.call(s,r):n(r)):V6(i,a+1)}function Hm(i,e,t,n,r,s,a){let o=e+t;return mm(i,o,r,s)?x6(i,o+2,a?n.call(a,r,s):n(r,s)):V6(i,o+2)}function FL(i,e,t,n,r,s,a,o){let l=e+t;return NT(i,l,r,s,a)?x6(i,l+3,o?n.call(o,r,s,a):n(r,s,a)):V6(i,l+3)}function dt(i,e){let t=Mt(),n,r=i+Zt;t.firstCreatePass?(n=RL(e,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];let s=n.factory||(n.factory=on(n.type,!0)),a,o=i0(Y);try{let l=F5(!1),c=s();return F5(l),BS(t,Ve(),r,c),c}finally{i0(o)}}function RL(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function oa(i,e,t){let n=i+Zt,r=Ve(),s=k3(r,n);return Fm(r,n)?km(r,Qs(),e,s.transform,t,s):s.transform(t)}function Lt(i,e,t,n){let r=i+Zt,s=Ve(),a=k3(s,r);return Fm(s,r)?Hm(s,Qs(),e,a.transform,t,n,a):a.transform(t,n)}function Fm(i,e){return i[_e].data[e].pure}function Ir(i,e){return ul(i,e)}var b5=null;function OL(i){b5!==null&&(i.defaultEncapsulation!==b5.defaultEncapsulation||i.preserveWhitespaces!==b5.preserveWhitespaces)||(b5=i)}var x3=class{ngModuleFactory;componentFactories;constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}},Rm=(()=>{class i{compileModuleSync(t){return new q5(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){let n=this.compileModuleSync(t),r=pv(t),s=L9(r.declarations).reduce((a,o)=>{let l=cn(o);return l&&a.push(new Dr(l)),a},[]);return new x3(n,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),IL=new J("");function BL(i,e,t){let n=new q5(t);return Promise.resolve(n)}function Gg(i){for(let e=i.length-1;e>=0;e--)if(i[e]!==void 0)return i[e]}var NL=(()=>{class i{zone=j(Ne);changeDetectionScheduler=j(Sr);applicationRef=j(ei);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ZL({ngZoneFactory:i,ignoreChangesOutsideZone:e,scheduleInRootZone:t}){return i??=()=>new Ne(se(Z({},Om()),{scheduleInRootZone:t})),[{provide:Ne,useFactory:i},{provide:yr,multi:!0,useFactory:()=>{let n=j(NL,{optional:!0});return()=>n.initialize()}},{provide:yr,multi:!0,useFactory:()=>{let n=j(jL);return()=>{n.initialize()}}},e===!0?{provide:e9,useValue:!0}:[],{provide:t9,useValue:t??Jv}]}function Om(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:i?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:i?.runCoalescing??!1}}var jL=(()=>{class i{subscription=new He;initialized=!1;zone=j(Ne);pendingTasks=j(ni);initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ne.assertNotInAngularZone(),queueMicrotask(()=>{t!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ne.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var UL=(()=>{class i{appRef=j(ei);taskService=j(ni);ngZone=j(Ne);zonelessEnabled=j(X3);tracing=j(Fr,{optional:!0});disableScheduling=j(e9,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new He;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(I5):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(j(t9,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof B5||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&t===5)return;let n=!1;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(n))return;let r=this.useMicrotaskScheduler?Cg:i9;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(t){return!(this.disableScheduling&&!t||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(I5+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(t),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Cg(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function $L(){return typeof $localize<"u"&&$localize.locale||W5}var Br=new J("",{providedIn:"root",factory:()=>j(Br,we.Optional|we.SkipSelf)||$L()});var X5=new J(""),qL=new J("");function Fs(i){return!i.moduleRef}function GL(i){let e=Fs(i)?i.r3Injector:i.moduleRef.injector,t=e.get(Ne);return t.run(()=>{Fs(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(Y0,null),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:s=>{n.handleError(s)}})}),Fs(i)){let s=()=>e.destroy(),a=i.platformInjector.get(X5);a.add(s),e.onDestroy(()=>{r.unsubscribe(),a.delete(s)})}else{let s=()=>i.moduleRef.destroy(),a=i.platformInjector.get(X5);a.add(s),i.moduleRef.onDestroy(()=>{A5(i.allPlatformModules,i.moduleRef),r.unsubscribe(),a.delete(s)})}return XL(n,t,()=>{let s=e.get(Cm);return s.runInitializers(),s.donePromise.then(()=>{let a=e.get(Br,W5);if(AL(a||W5),!e.get(qL,!0))return Fs(i)?e.get(ei):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(Fs(i)){let l=e.get(ei);return i.rootComponent!==void 0&&l.bootstrap(i.rootComponent),l}else return WL(i.moduleRef,i.allPlatformModules),i.moduleRef})})})}function WL(i,e){let t=i.injector.get(ei);if(i._bootstrapComponents.length>0)i._bootstrapComponents.forEach(n=>t.bootstrap(n));else if(i.instance.ngDoBootstrap)i.instance.ngDoBootstrap(t);else throw new X(-403,!1);e.push(i)}function XL(i,e,t){try{let n=t();return yn(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i.handleError(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i.handleError(n)),n}}var Im=(()=>{class i{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(t){this._injector=t}bootstrapModuleFactory(t,n){let r=n?.scheduleInRootZone,s=()=>TD(n?.ngZone,se(Z({},Om({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing})),{scheduleInRootZone:r})),a=n?.ignoreChangesOutsideZone,o=[ZL({ngZoneFactory:s,ignoreChangesOutsideZone:a}),{provide:Sr,useExisting:UL}],l=ST(t.moduleType,this.injector,o);return GL({moduleRef:l,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(t,n=[]){let r=xm({},n);return BL(this.injector,r,t).then(s=>this.bootstrapModuleFactory(s,r))}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new X(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());let t=this._injector.get(X5,null);t&&(t.forEach(n=>n()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(n){return new(n||i)(ee(Yt))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"platform"})}return i})(),Ns=null,Bm=new J("");function YL(i){if(Ns&&!Ns.get(Bm,!1))throw new X(400,!1);GT(),Ns=i;let e=i.get(Im);return JL(i),e}function T6(i,e,t=[]){let n=`Platform: ${e}`,r=new J(n);return(s=[])=>{let a=Nm();if(!a||a.injector.get(Bm,!1)){let o=[...t,...s,{provide:r,useValue:!0}];i?i(o):YL(KL(o,n))}return QL(r)}}function KL(i=[],e){return Yt.create({name:e,providers:[{provide:el,useValue:"platform"},{provide:X5,useValue:new Set([()=>Ns=null])},...i]})}function QL(i){let e=Nm();if(!e)throw new X(401,!1);return e}function Nm(){return Ns?.get(Im)??null}function JL(i){let e=i.get(J3,null);a0(i,()=>{e?.forEach(t=>t())})}var Qt=(()=>{class i{static __NG_ELEMENT_ID__=ez}return i})();function ez(i){return tz(l0(),Ve(),(i&16)===16)}function tz(i,e,t){if(Lr(i)&&!t){let n=m1(i.index,e);return new qs(n,n)}else if(i.type&175){let n=e[z0];return new qs(n,e)}return null}var M3=class{constructor(){}supports(e){return vm(e)}create(e){return new A3(e)}},iz=(i,e)=>e,A3=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(e){this._trackByFn=e||iz}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,r=0,s=null;for(;t||n;){let a=!n||t&&t.currentIndex{a=this._trackByFn(r,o),t===null||!Object.is(t.trackById,a)?(t=this._mismatch(t,o,a,r),n=!0):(n&&(t=this._verifyReinsertion(t,o,a,r)),Object.is(t.item,o)||this._addIdentityChange(t,o)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;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,n,r){let s;return e===null?s=this._itTail:(s=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):e=this._addAfter(new _3(t,n),s,r)),e}_verifyReinsertion(e,t,n,r){let s=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return s!==null?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,s=e._nextRemoved;return r===null?this._removalsHead=s:r._nextRemoved=s,s===null?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new Y5),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,n=e._next;return t===null?this._itHead=n:t._next=n,n===null?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Y5),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(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=this._identityChangesTail._nextIdentityChange=e,e}},_3=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(e,t){this.item=e,this.trackById=t}},S3=class{_head=null;_tail=null;add(e){this._head===null?(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 n;for(n=this._head;n!==null;n=n._nextDup)if((t===null||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let t=e._prevDup,n=e._nextDup;return t===null?this._head=n:t._nextDup=n,n===null?this._tail=t:n._prevDup=t,this._head===null}},Y5=class{map=new Map;put(e){let t=e.trackById,n=this.map.get(t);n||(n=new S3,this.map.set(t,n)),n.add(e)}get(e,t){let n=e,r=this.map.get(n);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Wg(i,e,t){let n=i.previousIndex;if(n===null)return n;let r=0;return t&&n{class i{factories;static \u0275prov=Q({token:i,providedIn:"root",factory:Xg});constructor(t){this.factories=t}static create(t,n){if(n!=null){let r=n.factories.slice();t=t.concat(r)}return new i(t)}static extend(t){return{provide:i,useFactory:n=>i.create(t,n||Xg()),deps:[[i,new pS,new hv]]}}find(t){let n=this.factories.find(r=>r.supports(t));if(n!=null)return n;throw new X(901,!1)}}return i})();var Zm=T6(null,"core",[]),jm=(()=>{class i{constructor(t){}static \u0275fac=function(n){return new(n||i)(ee(ei))};static \u0275mod=Ie({type:i});static \u0275inj=Oe({})}return i})();function Nr(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function M1(i){return wd(i)}function Zr(i,e){return pd(i,e?.equal)}var Yg=class{[$0];constructor(e){this[$0]=e}destroy(){this[$0].destroy()}};function Um(i){let e=cn(i);if(!e)return null;let t=new Dr(e);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return e.standalone},get isSignal(){return e.signals}}}var $e=new J("");var Gm=null;function b0(){return Gm}function z6(i){Gm??=i}var la=class{},ca=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(Wm),providedIn:"platform"})}return i})(),P6=new J(""),Wm=(()=>{class i extends ca{_location;_history;_doc=j($e);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return b0().getBaseHref(this._doc)}onPopState(t){let n=b0().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=b0().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>new i,providedIn:"platform"})}return i})();function wl(i,e){return i?e?i.endsWith("/")?e.startsWith("/")?i+e.slice(1):i+e:e.startsWith("/")?i+e:`${i}/${e}`:i:e}function $m(i){let e=i.search(/#|\?|$/);return i[e-1]==="/"?i.slice(0,e-1)+i.slice(e):i}function J0(i){return i&&i[0]!=="?"?`?${i}`:i}var e1=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(yl),providedIn:"root"})}return i})(),bl=new J(""),yl=(()=>{class i extends e1{_platformLocation;_baseHref;_removeListenerFns=[];constructor(t,n){super(),this._platformLocation=t,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??j($e).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return wl(this._baseHref,t)}path(t=!1){let n=this._platformLocation.pathname+J0(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){let a=this.prepareExternalUrl(r+J0(s));this._platformLocation.pushState(t,n,a)}replaceState(t,n,r,s){let a=this.prepareExternalUrl(r+J0(s));this._platformLocation.replaceState(t,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static \u0275fac=function(n){return new(n||i)(ee(ca),ee(bl,8))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ii=(()=>{class i{_subject=new it;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(t){this._locationStrategy=t;let n=this._locationStrategy.getBaseHref();this._basePath=sz($m(qm(n))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=""){return this.path()==this.normalize(t+J0(n))}normalize(t){return i.stripTrailingSlash(rz(this._basePath,qm(t)))}prepareExternalUrl(t){return t&&t[0]!=="/"&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n="",r=null){this._locationStrategy.pushState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+J0(n)),r)}replaceState(t,n="",r=null){this._locationStrategy.replaceState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+J0(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n??void 0,complete:r??void 0})}static normalizeQueryParams=J0;static joinWithSlash=wl;static stripTrailingSlash=$m;static \u0275fac=function(n){return new(n||i)(ee(e1))};static \u0275prov=Q({token:i,factory:()=>nz(),providedIn:"root"})}return i})();function nz(){return new Ii(ee(e1))}function rz(i,e){if(!i||!e.startsWith(i))return e;let t=e.substring(i.length);return t===""||["/",";","?","#"].includes(t[0])?t:e}function qm(i){return i.replace(/\/index.html$/,"")}function sz(i){if(new RegExp("^(https?:)?//").test(i)){let[,t]=i.split(/\/\/[^\/]+/);return t}return i}var O6=(()=>{class i extends e1{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(t,n){super(),this._platformLocation=t,n!=null&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(t){let n=wl(this._baseHref,t);return n.length>0?"#"+n:n}pushState(t,n,r,s){let a=this.prepareExternalUrl(r+J0(s))||this._platformLocation.pathname;this._platformLocation.pushState(t,n,a)}replaceState(t,n,r,s){let a=this.prepareExternalUrl(r+J0(s))||this._platformLocation.pathname;this._platformLocation.replaceState(t,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static \u0275fac=function(n){return new(n||i)(ee(ca),ee(bl,8))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();var Ut=function(i){return i[i.Format=0]="Format",i[i.Standalone=1]="Standalone",i}(Ut||{}),We=function(i){return i[i.Narrow=0]="Narrow",i[i.Abbreviated=1]="Abbreviated",i[i.Wide=2]="Wide",i[i.Short=3]="Short",i}(We||{}),h0=function(i){return i[i.Short=0]="Short",i[i.Medium=1]="Medium",i[i.Long=2]="Long",i[i.Full=3]="Full",i}(h0||{}),hi={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Jm(i){return F0(i)[at.LocaleId]}function ew(i,e,t){let n=F0(i),r=[n[at.DayPeriodsFormat],n[at.DayPeriodsStandalone]],s=O0(r,e);return O0(s,t)}function tw(i,e,t){let n=F0(i),r=[n[at.DaysFormat],n[at.DaysStandalone]],s=O0(r,e);return O0(s,t)}function iw(i,e,t){let n=F0(i),r=[n[at.MonthsFormat],n[at.MonthsStandalone]],s=O0(r,e);return O0(s,t)}function nw(i,e){let n=F0(i)[at.Eras];return O0(n,e)}function ha(i,e){let t=F0(i);return O0(t[at.DateFormat],e)}function da(i,e){let t=F0(i);return O0(t[at.TimeFormat],e)}function ua(i,e){let n=F0(i)[at.DateTimeFormat];return O0(n,e)}function fa(i,e){let t=F0(i),n=t[at.NumberSymbols][e];if(typeof n>"u"){if(e===hi.CurrencyDecimal)return t[at.NumberSymbols][hi.Decimal];if(e===hi.CurrencyGroup)return t[at.NumberSymbols][hi.Group]}return n}function rw(i){if(!i[at.ExtraData])throw new Error(`Missing extra locale data for the locale "${i[at.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function sw(i){let e=F0(i);return rw(e),(e[at.ExtraData][2]||[]).map(n=>typeof n=="string"?k6(n):[k6(n[0]),k6(n[1])])}function aw(i,e,t){let n=F0(i);rw(n);let r=[n[at.ExtraData][0],n[at.ExtraData][1]],s=O0(r,e)||[];return O0(s,t)||[]}function O0(i,e){for(let t=e;t>-1;t--)if(typeof i[t]<"u")return i[t];throw new Error("Locale data API: locale data undefined")}function k6(i){let[e,t]=i.split(":");return{hours:+e,minutes:+t}}var az=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Cl={},oz=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function ow(i,e,t,n){let r=vz(i);e=ci(t,e)||e;let a=[],o;for(;e;)if(o=oz.exec(e),o){a=a.concat(o.slice(1));let h=a.pop();if(!h)break;e=h}else{a.push(e);break}let l=r.getTimezoneOffset();n&&(l=cw(n,l),r=gz(r,n));let c="";return a.forEach(h=>{let d=fz(h);c+=d?d(r,t,l):h==="''"?"'":h.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function Sl(i,e,t){let n=new Date(0);return n.setFullYear(i,e,t),n.setHours(0,0,0),n}function ci(i,e){let t=Jm(i);if(Cl[t]??={},Cl[t][e])return Cl[t][e];let n="";switch(e){case"shortDate":n=ha(i,h0.Short);break;case"mediumDate":n=ha(i,h0.Medium);break;case"longDate":n=ha(i,h0.Long);break;case"fullDate":n=ha(i,h0.Full);break;case"shortTime":n=da(i,h0.Short);break;case"mediumTime":n=da(i,h0.Medium);break;case"longTime":n=da(i,h0.Long);break;case"fullTime":n=da(i,h0.Full);break;case"short":let r=ci(i,"shortTime"),s=ci(i,"shortDate");n=xl(ua(i,h0.Short),[r,s]);break;case"medium":let a=ci(i,"mediumTime"),o=ci(i,"mediumDate");n=xl(ua(i,h0.Medium),[a,o]);break;case"long":let l=ci(i,"longTime"),c=ci(i,"longDate");n=xl(ua(i,h0.Long),[l,c]);break;case"full":let h=ci(i,"fullTime"),d=ci(i,"fullDate");n=xl(ua(i,h0.Full),[h,d]);break}return n&&(Cl[t][e]=n),n}function xl(i,e){return e&&(i=i.replace(/\{([^}]+)}/g,function(t,n){return e!=null&&n in e?e[n]:t})),i}function t1(i,e,t="-",n,r){let s="";(i<0||r&&i<=0)&&(r?i=-i+1:(i=-i,s=t));let a=String(i);for(;a.length0||o>-t)&&(o+=t),i===3)o===0&&t===-12&&(o=12);else if(i===6)return lz(o,e);let l=fa(a,hi.MinusSign);return t1(o,e,l,n,r)}}function cz(i,e){switch(i){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();case 3:return e.getHours();case 4:return e.getMinutes();case 5:return e.getSeconds();case 6:return e.getMilliseconds();case 7:return e.getDay();default:throw new Error(`Unknown DateType value "${i}".`)}}function tt(i,e,t=Ut.Format,n=!1){return function(r,s){return hz(r,s,i,e,t,n)}}function hz(i,e,t,n,r,s){switch(t){case 2:return iw(e,r,n)[i.getMonth()];case 1:return tw(e,r,n)[i.getDay()];case 0:let a=i.getHours(),o=i.getMinutes();if(s){let c=sw(e),h=aw(e,r,n),d=c.findIndex(u=>{if(Array.isArray(u)){let[p,f]=u,g=a>=p.hours&&o>=p.minutes,y=a0?Math.floor(r/60):Math.ceil(r/60);switch(i){case 0:return(r>=0?"+":"")+t1(a,2,s)+t1(Math.abs(r%60),2,s);case 1:return"GMT"+(r>=0?"+":"")+t1(a,1,s);case 2:return"GMT"+(r>=0?"+":"")+t1(a,2,s)+":"+t1(Math.abs(r%60),2,s);case 3:return n===0?"Z":(r>=0?"+":"")+t1(a,2,s)+":"+t1(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${i}"`)}}}var dz=0,_l=4;function uz(i){let e=Sl(i,dz,1).getDay();return Sl(i,0,1+(e<=_l?_l:_l+7)-e)}function lw(i){let e=i.getDay(),t=e===0?-3:_l-e;return Sl(i.getFullYear(),i.getMonth(),i.getDate()+t)}function H6(i,e=!1){return function(t,n){let r;if(e){let s=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,a=t.getDate();r=1+Math.floor((a+s)/7)}else{let s=lw(t),a=uz(s.getFullYear()),o=s.getTime()-a.getTime();r=1+Math.round(o/6048e5)}return t1(r,i,fa(n,hi.MinusSign))}}function Al(i,e=!1){return function(t,n){let s=lw(t).getFullYear();return t1(s,i,fa(n,hi.MinusSign),e)}}var F6={};function fz(i){if(F6[i])return F6[i];let e;switch(i){case"G":case"GG":case"GGG":e=tt(3,We.Abbreviated);break;case"GGGG":e=tt(3,We.Wide);break;case"GGGGG":e=tt(3,We.Narrow);break;case"y":e=wt(0,1,0,!1,!0);break;case"yy":e=wt(0,2,0,!0,!0);break;case"yyy":e=wt(0,3,0,!1,!0);break;case"yyyy":e=wt(0,4,0,!1,!0);break;case"Y":e=Al(1);break;case"YY":e=Al(2,!0);break;case"YYY":e=Al(3);break;case"YYYY":e=Al(4);break;case"M":case"L":e=wt(1,1,1);break;case"MM":case"LL":e=wt(1,2,1);break;case"MMM":e=tt(2,We.Abbreviated);break;case"MMMM":e=tt(2,We.Wide);break;case"MMMMM":e=tt(2,We.Narrow);break;case"LLL":e=tt(2,We.Abbreviated,Ut.Standalone);break;case"LLLL":e=tt(2,We.Wide,Ut.Standalone);break;case"LLLLL":e=tt(2,We.Narrow,Ut.Standalone);break;case"w":e=H6(1);break;case"ww":e=H6(2);break;case"W":e=H6(1,!0);break;case"d":e=wt(2,1);break;case"dd":e=wt(2,2);break;case"c":case"cc":e=wt(7,1);break;case"ccc":e=tt(1,We.Abbreviated,Ut.Standalone);break;case"cccc":e=tt(1,We.Wide,Ut.Standalone);break;case"ccccc":e=tt(1,We.Narrow,Ut.Standalone);break;case"cccccc":e=tt(1,We.Short,Ut.Standalone);break;case"E":case"EE":case"EEE":e=tt(1,We.Abbreviated);break;case"EEEE":e=tt(1,We.Wide);break;case"EEEEE":e=tt(1,We.Narrow);break;case"EEEEEE":e=tt(1,We.Short);break;case"a":case"aa":case"aaa":e=tt(0,We.Abbreviated);break;case"aaaa":e=tt(0,We.Wide);break;case"aaaaa":e=tt(0,We.Narrow);break;case"b":case"bb":case"bbb":e=tt(0,We.Abbreviated,Ut.Standalone,!0);break;case"bbbb":e=tt(0,We.Wide,Ut.Standalone,!0);break;case"bbbbb":e=tt(0,We.Narrow,Ut.Standalone,!0);break;case"B":case"BB":case"BBB":e=tt(0,We.Abbreviated,Ut.Format,!0);break;case"BBBB":e=tt(0,We.Wide,Ut.Format,!0);break;case"BBBBB":e=tt(0,We.Narrow,Ut.Format,!0);break;case"h":e=wt(3,1,-12);break;case"hh":e=wt(3,2,-12);break;case"H":e=wt(3,1);break;case"HH":e=wt(3,2);break;case"m":e=wt(4,1);break;case"mm":e=wt(4,2);break;case"s":e=wt(5,1);break;case"ss":e=wt(5,2);break;case"S":e=wt(6,1);break;case"SS":e=wt(6,2);break;case"SSS":e=wt(6,3);break;case"Z":case"ZZ":case"ZZZ":e=Ml(0);break;case"ZZZZZ":e=Ml(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Ml(1);break;case"OOOO":case"ZZZZ":case"zzzz":e=Ml(2);break;default:return null}return F6[i]=e,e}function cw(i,e){i=i.replace(/:/g,"");let t=Date.parse("Jan 01, 1970 00:00:00 "+i)/6e4;return isNaN(t)?e:t}function pz(i,e){return i=new Date(i.getTime()),i.setMinutes(i.getMinutes()+e),i}function gz(i,e,t){let r=i.getTimezoneOffset(),s=cw(e,r);return pz(i,-1*(s-r))}function vz(i){if(Xm(i))return i;if(typeof i=="number"&&!isNaN(i))return new Date(i);if(typeof i=="string"){if(i=i.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(i)){let[r,s=1,a=1]=i.split("-").map(o=>+o);return Sl(r,s-1,a)}let t=parseFloat(i);if(!isNaN(i-t))return new Date(t);let n;if(n=i.match(az))return mz(n)}let e=new Date(i);if(!Xm(e))throw new Error(`Unable to convert "${i}" into a date`);return e}function mz(i){let e=new Date(0),t=0,n=0,r=i[8]?e.setUTCFullYear:e.setFullYear,s=i[8]?e.setUTCHours:e.setHours;i[9]&&(t=Number(i[9]+i[10]),n=Number(i[9]+i[11])),r.call(e,Number(i[1]),Number(i[2])-1,Number(i[3]));let a=Number(i[4]||0)-t,o=Number(i[5]||0)-n,l=Number(i[6]||0),c=Math.floor(parseFloat("0."+(i[7]||0))*1e3);return s.call(e,a,o,l,c),e}function Xm(i){return i instanceof Date&&!isNaN(i.valueOf())}var R6=/\s+/,Ym=[],d0=(()=>{class i{_ngEl;_renderer;initialClasses=Ym;rawClass;stateMap=new Map;constructor(t,n){this._ngEl=t,this._renderer=n}set klass(t){this.initialClasses=t!=null?t.trim().split(R6):Ym}set ngClass(t){this.rawClass=typeof t=="string"?t.trim().split(R6):t}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(let n of t)this._updateState(n,!0);else if(t!=null)for(let n of Object.keys(t))this._updateState(n,!!t[n]);this._applyStateDiff()}_updateState(t,n){let r=this.stateMap.get(t);r!==void 0?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(t,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let t of this.stateMap){let n=t[0],r=t[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(t,n){t=t.trim(),t.length>0&&t.split(R6).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(n){return new(n||i)(Y(Qe),Y(c0))};static \u0275dir=Je({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var Dl=class{$implicit;ngForOf;index;count;constructor(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},A1=(()=>{class i{_viewContainer;_template;_differs;set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(t,n,r){this._viewContainer=t,this._template=n,this._differs=r}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){let t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){let n=this._viewContainer;t.forEachOperation((r,s,a)=>{if(r.previousIndex==null)n.createEmbeddedView(this._template,new Dl(r.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)n.remove(s===null?void 0:s);else if(s!==null){let o=n.get(s);n.move(o,a),Km(o,r)}});for(let r=0,s=n.length;r{let s=n.get(r.currentIndex);Km(s,r)})}static ngTemplateContextGuard(t,n){return!0}static \u0275fac=function(n){return new(n||i)(Y(ai),Y(gn),Y(L6))};static \u0275dir=Je({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return i})();function Km(i,e){i.context.$implicit=e.item}var _t=(()=>{class i{_viewContainer;_context=new El;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(t,n){this._viewContainer=t,this._thenTemplateRef=n}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Qm(t,!1),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Qm(t,!1),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 ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(t,n){return!0}static \u0275fac=function(n){return new(n||i)(Y(ai),Y(gn))};static \u0275dir=Je({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return i})(),El=class{$implicit=null;ngIf=null};function Qm(i,e){if(i&&!i.createEmbeddedView)throw new X(2020,!1)}var I6=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||i)(Y(ai))};static \u0275dir=Je({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ht]})}return i})();function wz(i,e){return new X(2100,!1)}var bz="mediumDate",hw=new J(""),dw=new J(""),pa=(()=>{class i{locale;defaultTimezone;defaultOptions;constructor(t,n,r){this.locale=t,this.defaultTimezone=n,this.defaultOptions=r}transform(t,n,r,s){if(t==null||t===""||t!==t)return null;try{let a=n??this.defaultOptions?.dateFormat??bz,o=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return ow(t,a,s||this.locale,o)}catch(a){throw wz(i,a.message)}}static \u0275fac=function(n){return new(n||i)(Y(Br,16),Y(hw,24),Y(dw,24))};static \u0275pipe=Oi({name:"date",type:i,pure:!0})}return i})();var An=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({})}return i})();function ga(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,s]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}var B6="browser",uw="server";function Vl(i){return i===uw}var _n=class{};function pw(i,e,t){return Lm(i,e,t)}var gw=(()=>{class i{static \u0275prov=Q({token:i,providedIn:"root",factory:()=>new N6(j($e),window)})}return i})(),N6=class{document;window;offset=()=>[0,0];constructor(e,t){this.document=e,this.window=t}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let t=yz(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}};function yz(i,e){let t=i.getElementById(e)||i.getElementsByName(e)[0];if(t)return t;if(typeof i.createTreeWalker=="function"&&i.body&&typeof i.body.attachShadow=="function"){let n=i.createTreeWalker(i.body,NodeFilter.SHOW_ELEMENT),r=n.currentNode;for(;r;){let s=r.shadowRoot;if(s){let a=s.getElementById(e)||s.querySelector(`[name="${e}"]`);if(a)return a}r=n.nextNode()}}return null}var zl=new J(""),$6=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,n){this._zone=n,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,n,r,s){return this._findPluginFor(n).addEventListener(t,n,r,s)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(s=>s.supports(t)),!n)throw new X(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(ee(zl),ee(Ne))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),va=class{_doc;constructor(e){this._doc=e}manager},Tl="ng-app-id";function vw(i){for(let e of i)e.remove()}function mw(i,e){let t=e.createElement("style");return t.textContent=i,t}function Cz(i,e,t,n){let r=i.head?.querySelectorAll(`style[${Tl}="${e}"],link[${Tl}="${e}"]`);if(r)for(let s of r)s.removeAttribute(Tl),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&t.set(s.textContent,{usage:0,elements:[s]})}function j6(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var q6=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(t,n,r,s={}){this.doc=t,this.appId=n,this.nonce=r,this.isServer=Vl(s),Cz(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,mw);n?.forEach(r=>this.addUsage(r,this.external,j6))}removeStyles(t,n){for(let r of t)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,n,r){let s=n.get(t);s?s.usage++:n.set(t,{usage:1,elements:[...this.hosts].map(a=>this.addElement(a,r(t,this.doc)))})}removeUsage(t,n){let r=n.get(t);r&&(r.usage--,r.usage<=0&&(vw(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])vw(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,mw(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,j6(n,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(Tl,this.appId),t.appendChild(n)}static \u0275fac=function(n){return new(n||i)(ee($e),ee(Q3),ee(e6,8),ee(Hr))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),Z6={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/",math:"http://www.w3.org/1998/Math/MathML"},G6=/%COMP%/g;var bw="%COMP%",xz=`_nghost-${bw}`,Mz=`_ngcontent-${bw}`,Az=!0,_z=new J("",{providedIn:"root",factory:()=>Az});function Sz(i){return Mz.replace(G6,i)}function Dz(i){return xz.replace(G6,i)}function yw(i,e){return e.map(t=>t.replace(G6,i))}var ba=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(t,n,r,s,a,o,l,c=null,h=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=o,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Vl(o),this.defaultRenderer=new ma(t,a,l,this.platformIsServer,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===P0.ShadowDom&&(n=se(Z({},n),{encapsulation:P0.Emulated}));let r=this.getOrCreateRenderer(t,n);return r instanceof Ll?r.applyToHost(t):r instanceof wa&&r.applyStyles(),r}getOrCreateRenderer(t,n){let r=this.rendererByCompId,s=r.get(n.id);if(!s){let a=this.doc,o=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,u=this.tracingService;switch(n.encapsulation){case P0.Emulated:s=new Ll(l,c,n,this.appId,h,a,o,d,u);break;case P0.ShadowDom:return new U6(l,c,t,n,a,o,this.nonce,d,u);default:s=new wa(l,c,n,h,a,o,d,u);break}r.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(n){return new(n||i)(ee($6),ee(q6),ee(Q3),ee(_z),ee($e),ee(Hr),ee(Ne),ee(e6),ee(Fr,8))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),ma=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,s){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=s}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Z6[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(ww(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(ww(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new X(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let s=Z6[r];s?e.setAttributeNS(s,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Z6[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Q1.DashCase|Q1.Important)?e.style.setProperty(t,n,r&Q1.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Q1.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=b0().getGlobalEventTarget(this.doc,e),!e))throw new X(5102,!1);let s=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(e,t,s)),this.eventManager.addEventListener(e,t,s,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function ww(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var U6=class extends ma{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,s,a,o,l,c){super(e,s,a,l,c),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let h=r.styles;h=yw(r.id,h);for(let u of h){let p=document.createElement("style");o&&p.setAttribute("nonce",o),p.textContent=u,this.shadowRoot.appendChild(p)}let d=r.getExternalStyles?.();if(d)for(let u of d){let p=j6(u,s);o&&p.setAttribute("nonce",o),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},wa=class extends ma{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,s,a,o,l,c){super(e,s,a,o,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let h=n.styles;this.styles=c?yw(c,h):h,this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ll=class extends wa{contentAttr;hostAttr;constructor(e,t,n,r,s,a,o,l,c){let h=r+"-"+n.id;super(e,t,n,s,a,o,l,c,h),this.contentAttr=Sz(h),this.hostAttr=Dz(h)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}};var Pl=class i extends la{supportsDOMEvents=!0;static makeCurrent(){z6(new i)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.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 t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=Ez();return t==null?null:Vz(t)}resetBaseElement(){ya=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ga(document.cookie,e)}},ya=null;function Ez(){return ya=ya||document.head.querySelector("base"),ya?ya.getAttribute("href"):null}function Vz(i){return new URL(i,document.baseURI).pathname}var kl=class{addToWindow(e){Tt.getAngularTestability=(n,r=!0)=>{let s=e.findTestabilityInTree(n,r);if(s==null)throw new X(5103,!1);return s},Tt.getAllAngularTestabilities=()=>e.getAllTestabilities(),Tt.getAllAngularRootElements=()=>e.getAllRootElements();let t=n=>{let r=Tt.getAllAngularTestabilities(),s=r.length,a=function(){s--,s==0&&n()};r.forEach(o=>{o.whenStable(a)})};Tt.frameworkStabilizers||(Tt.frameworkStabilizers=[]),Tt.frameworkStabilizers.push(t)}findTestabilityInTree(e,t,n){if(t==null)return null;let r=e.getTestability(t);return r??(n?b0().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},Tz=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),xw=(()=>{class i extends va{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r,s){return t.addEventListener(n,r,s),()=>this.removeEventListener(t,n,r,s)}removeEventListener(t,n,r,s){return t.removeEventListener(n,r,s)}static \u0275fac=function(n){return new(n||i)(ee($e))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),Cw=["alt","control","meta","shift"],Lz={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},zz={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},Mw=(()=>{class i extends va{constructor(t){super(t)}supports(t){return i.parseEventName(t)!=null}addEventListener(t,n,r,s){let a=i.parseEventName(n),o=i.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>b0().onAndCancel(t,a.domEventName,o,s))}static parseEventName(t){let n=t.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let s=i._normalizeKey(n.pop()),a="",o=n.indexOf("code");if(o>-1&&(n.splice(o,1),a="code."),Cw.forEach(c=>{let h=n.indexOf(c);h>-1&&(n.splice(h,1),a+=c+".")}),a+=s,n.length!=0||s.length===0)return null;let l={};return l.domEventName=r,l.fullKey=a,l}static matchEventFullKeyCode(t,n){let r=Lz[t.key]||t.key,s="";return n.indexOf("code.")>-1&&(r=t.code,s="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),Cw.forEach(a=>{if(a!==r){let o=zz[a];o(t)&&(s+=a+".")}}),s+=r,s===n)}static eventCallback(t,n,r){return s=>{i.matchEventFullKeyCode(s,t)&&r.runGuarded(()=>n(s))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(n){return new(n||i)(ee($e))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();function Pz(){Pl.makeCurrent()}function kz(){return new Y0}function Hz(){return d9(document),document}var Fz=[{provide:Hr,useValue:B6},{provide:J3,useValue:Pz,multi:!0},{provide:$e,useFactory:Hz}],W6=T6(Zm,"browser",Fz);var Rz=[{provide:na,useClass:kl},{provide:A6,useClass:pl,deps:[Ne,gl,na]},{provide:pl,useClass:pl,deps:[Ne,gl,na]}],Oz=[{provide:el,useValue:"root"},{provide:Y0,useFactory:kz},{provide:zl,useClass:xw,multi:!0,deps:[$e]},{provide:zl,useClass:Mw,multi:!0,deps:[$e]},ba,q6,$6,{provide:w1,useExisting:ba},{provide:_n,useClass:Tz},[]],Ca=(()=>{class i{constructor(){}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({providers:[...Oz,...Rz],imports:[An,jm]})}return i})();var Ur=class{},xa=class{},_1=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` `).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),s=t.slice(n+1).trim();this.addHeaderEntry(r,s)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let s=e.value;if(!s)this.headers.delete(t),this.normalizedNames.delete(t);else{let a=this.headers.get(t);if(!a)return;a=a.filter(o=>s.indexOf(o)===-1),a.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(s=>s.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Fl=class{encodeKey(e){return Aw(e)}encodeValue(e){return Aw(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Iz(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let s=r.indexOf("="),[a,o]=s==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],l=t.get(a)||[];l.push(o),t.set(a,l)}),t}var Bz=/%(\d[a-f0-9])/gi,Nz={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Aw(i){return encodeURIComponent(i).replace(Bz,(e,t)=>Nz[t]??e)}function Hl(i){return`${i}`}var di=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Fl,e.fromString){if(e.fromObject)throw new X(2805,!1);this.map=Iz(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(Hl):[Hl(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(s=>{t.push({param:n,value:s,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(Hl(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(Hl(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Rl=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function Zz(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function _w(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function Sw(i){return typeof Blob<"u"&&i instanceof Blob}function Dw(i){return typeof FormData<"u"&&i instanceof FormData}function jz(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var Ew="Content-Type",Vw="Accept",Lw="X-Request-URL",zw="text/plain",Pw="application/json",Uz=`${Pw}, ${zw}, */*`,jr=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let s;if(Zz(this.method)||r?(this.body=n!==void 0?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new _1,this.context??=new Rl,!this.params)this.params=new di,this.urlWithParams=t;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=t;else{let o=t.indexOf("?"),l=o===-1?"?":ou.set(p,e.setHeaders[p]),c)),e.setParams&&(h=Object.keys(e.setParams).reduce((u,p)=>u.set(p,e.setParams[p]),h)),new i(t,n,a,{params:h,headers:c,context:d,reportProgress:l,responseType:r,withCredentials:o,transferCache:s})}},Dn=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(Dn||{}),$r=class{headers;status;statusText;url;ok;type;constructor(e,t=200,n="OK"){this.headers=e.headers||new _1,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},Ol=class i extends $r{constructor(e={}){super(e)}type=Dn.ResponseHeader;clone(e={}){return new i({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Ma=class i extends $r{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Dn.Response;clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Aa=class extends $r{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},$z=200,qz=204;function X6(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var Bl=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let s;if(t instanceof jr)s=t;else{let l;r.headers instanceof _1?l=r.headers:l=new _1(r.headers);let c;r.params&&(r.params instanceof di?c=r.params:c=new di({fromObject:r.params})),s=new jr(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}let a=ae(s).pipe(f1(l=>this.handler.handle(l)));if(t instanceof jr||r.observe==="events")return a;let o=a.pipe(xt(l=>l instanceof Ma));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return o.pipe(ue(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new X(2806,!1);return l.body}));case"blob":return o.pipe(ue(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new X(2807,!1);return l.body}));case"text":return o.pipe(ue(l=>{if(l.body!==null&&typeof l.body!="string")throw new X(2808,!1);return l.body}));case"json":default:return o.pipe(ue(l=>l.body))}case"response":return o;default:throw new X(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new di().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,X6(r,n))}post(t,n,r={}){return this.request("POST",t,X6(r,n))}put(t,n,r={}){return this.request("PUT",t,X6(r,n))}static \u0275fac=function(n){return new(n||i)(ee(Ur))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();var Gz=new J("");function kw(i,e){return e(i)}function Wz(i,e){return(t,n)=>e.intercept(t,{handle:r=>i(r,n)})}function Xz(i,e,t){return(n,r)=>a0(t,()=>e(n,s=>i(s,r)))}var Hw=new J(""),K6=new J(""),Fw=new J(""),Q6=new J("",{providedIn:"root",factory:()=>!0});function Yz(){let i=null;return(e,t)=>{i===null&&(i=(j(Hw,{optional:!0})??[]).reduceRight(Wz,kw));let n=j(ni);if(j(Q6)){let s=n.add();return i(e,t).pipe(ki(()=>n.remove(s)))}else return i(e,t)}}var Il=(()=>{class i extends Ur{backend;injector;chain=null;pendingTasks=j(ni);contributeToStability=j(Q6);constructor(t,n){super(),this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(K6),...this.injector.get(Fw,[])]));this.chain=n.reduceRight((r,s)=>Xz(r,s,this.injector),kw)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ki(()=>this.pendingTasks.remove(n)))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(ee(xa),ee(Bt))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();var Kz=/^\)\]\}',?\n/,Qz=RegExp(`^${Lw}:`,"m");function Jz(i){return"responseURL"in i&&i.responseURL?i.responseURL:Qz.test(i.getAllResponseHeaders())?i.getResponseHeader(Lw):null}var Y6=(()=>{class i{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new X(-2800,!1);let n=this.xhrFactory;return(n.\u0275loadImpl?je(n.\u0275loadImpl()):ae(null)).pipe(Wt(()=>new Ae(s=>{let a=n.build();if(a.open(t.method,t.urlWithParams),t.withCredentials&&(a.withCredentials=!0),t.headers.forEach((g,y)=>a.setRequestHeader(g,y.join(","))),t.headers.has(Vw)||a.setRequestHeader(Vw,Uz),!t.headers.has(Ew)){let g=t.detectContentTypeHeader();g!==null&&a.setRequestHeader(Ew,g)}if(t.responseType){let g=t.responseType.toLowerCase();a.responseType=g!=="json"?g:"text"}let o=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=a.statusText||"OK",y=new _1(a.getAllResponseHeaders()),x=Jz(a)||t.url;return l=new Ol({headers:y,status:a.status,statusText:g,url:x}),l},h=()=>{let{headers:g,status:y,statusText:x,url:_}=c(),b=null;y!==qz&&(b=typeof a.response>"u"?a.responseText:a.response),y===0&&(y=b?$z:0);let v=y>=200&&y<300;if(t.responseType==="json"&&typeof b=="string"){let m=b;b=b.replace(Kz,"");try{b=b!==""?JSON.parse(b):null}catch(M){b=m,v&&(v=!1,b={error:M,text:b})}}v?(s.next(new Ma({body:b,headers:g,status:y,statusText:x,url:_||void 0})),s.complete()):s.error(new Aa({error:b,headers:g,status:y,statusText:x,url:_||void 0}))},d=g=>{let{url:y}=c(),x=new Aa({error:g,status:a.status||0,statusText:a.statusText||"Unknown Error",url:y||void 0});s.error(x)},u=!1,p=g=>{u||(s.next(c()),u=!0);let y={type:Dn.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(y.total=g.total),t.responseType==="text"&&a.responseText&&(y.partialText=a.responseText),s.next(y)},f=g=>{let y={type:Dn.UploadProgress,loaded:g.loaded};g.lengthComputable&&(y.total=g.total),s.next(y)};return a.addEventListener("load",h),a.addEventListener("error",d),a.addEventListener("timeout",d),a.addEventListener("abort",d),t.reportProgress&&(a.addEventListener("progress",p),o!==null&&a.upload&&a.upload.addEventListener("progress",f)),a.send(o),s.next({type:Dn.Sent}),()=>{a.removeEventListener("error",d),a.removeEventListener("abort",d),a.removeEventListener("load",h),a.removeEventListener("timeout",d),t.reportProgress&&(a.removeEventListener("progress",p),o!==null&&a.upload&&a.upload.removeEventListener("progress",f)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||i)(ee(_n))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),Rw=new J(""),eP="XSRF-TOKEN",tP=new J("",{providedIn:"root",factory:()=>eP}),iP="X-XSRF-TOKEN",nP=new J("",{providedIn:"root",factory:()=>iP}),_a=class{},rP=(()=>{class i{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,n){this.doc=t,this.cookieName=n}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ga(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)(ee($e),ee(tP))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();function sP(i,e){let t=i.url.toLowerCase();if(!j(Rw)||i.method==="GET"||i.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(i);let n=j(_a).getToken(),r=j(nP);return n!=null&&!i.headers.has(r)&&(i=i.clone({headers:i.headers.set(r,n)})),e(i)}var J6=function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i}(J6||{});function aP(i,e){return{\u0275kind:i,\u0275providers:e}}function e4(...i){let e=[Bl,Y6,Il,{provide:Ur,useExisting:Il},{provide:xa,useFactory:()=>j(Gz,{optional:!0})??j(Y6)},{provide:K6,useValue:sP,multi:!0},{provide:Rw,useValue:!0},{provide:_a,useClass:rP}];for(let t of i)e.push(...t.\u0275providers);return mn(e)}var Tw=new J("");function t4(){return aP(J6.LegacyInterceptors,[{provide:Tw,useFactory:Yz},{provide:K6,useExisting:Tw,multi:!0}])}var Ow=(()=>{class i{_doc;constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static \u0275fac=function(n){return new(n||i)(ee($e))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Sa=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=ee(lP),r},providedIn:"root"})}return i})(),lP=(()=>{class i extends Sa{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case K0.NONE:return n;case K0.HTML:return ri(n,"HTML")?H0(n):r6(this._doc,String(n)).toString();case K0.STYLE:return ri(n,"Style")?H0(n):n;case K0.SCRIPT:if(ri(n,"Script"))return H0(n);throw new X(5200,!1);case K0.URL:return ri(n,"URL")?H0(n):ol(String(n));case K0.RESOURCE_URL:if(ri(n,"ResourceURL"))return H0(n);throw new X(5201,!1);default:throw new X(5202,!1)}}bypassSecurityTrustHtml(t){return b9(t)}bypassSecurityTrustStyle(t){return y9(t)}bypassSecurityTrustScript(t){return C9(t)}bypassSecurityTrustUrl(t){return x9(t)}bypassSecurityTrustResourceUrl(t){return M9(t)}static \u0275fac=function(n){return new(n||i)(ee($e))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function cP(i){let e=i,t=Math.floor(Math.abs(i)),n=i.toString().replace(/^[^.]*\.?/,"").length,r=parseInt(i.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===Math.floor(t)&&t>=0&&t<=1?1:r===0&&t!==0&&t%1e6===0&&n===0||!(r>=0&&r<=5)?4:5}var Iw=["pt",[["AM","PM"],void 0,void 0],void 0,[["D","S","T","Q","Q","S","S"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xE1b."],["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xE1b."]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],["janeiro","fevereiro","mar\xE7o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]],void 0,[["a.C.","d.C."],void 0,["antes de Cristo","depois de Cristo"]],0,[6,0],["dd/MM/y","d 'de' MMM 'de' y","d 'de' MMMM 'de' y","EEEE, d 'de' MMMM 'de' y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00","#E0"],"BRL","R$","Real brasileiro",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],PTE:["Esc."],RON:[void 0,"L"],SYP:[void 0,"S\xA3"],THB:["\u0E3F"],TWD:["NT$"],USD:["US$","$"]},"ltr",cP];var pe=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(pe||{}),I0="*";function i4(i,e){return{type:pe.Trigger,name:i,definitions:e,options:{}}}function Vn(i,e=null){return{type:pe.Animate,styles:e,timings:i}}function Zl(i,e=null){return{type:pe.Sequence,steps:i,options:e}}function y0(i){return{type:pe.Style,styles:i,offset:null}}function n4(i,e,t){return{type:pe.State,name:i,styles:e,options:t}}function jl(i,e,t=null){return{type:pe.Transition,expr:i,animation:e,options:t}}var S1=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(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(){queueMicrotask(()=>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,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},En=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,n=0,r=0,s=this.players.length;s==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==s&&this._onFinish()}),a.onDestroy(()=>{++n==s&&this._onDestroy()}),a.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((a,o)=>Math.max(a,o.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){let t=e*this.totalTime;this.players.forEach(n=>{let r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},qr="!";function Bw(i){return new X(3e3,!1)}function hP(){return new X(3100,!1)}function dP(){return new X(3101,!1)}function uP(i){return new X(3001,!1)}function fP(i){return new X(3003,!1)}function pP(i){return new X(3004,!1)}function Zw(i,e){return new X(3005,!1)}function jw(){return new X(3006,!1)}function Uw(){return new X(3007,!1)}function $w(i,e){return new X(3008,!1)}function qw(i){return new X(3002,!1)}function Gw(i,e,t,n,r){return new X(3010,!1)}function Ww(){return new X(3011,!1)}function Xw(){return new X(3012,!1)}function Yw(){return new X(3200,!1)}function Kw(){return new X(3202,!1)}function Qw(){return new X(3013,!1)}function Jw(i){return new X(3014,!1)}function eb(i){return new X(3015,!1)}function tb(i){return new X(3016,!1)}function ib(i,e){return new X(3404,!1)}function gP(i){return new X(3502,!1)}function nb(i){return new X(3503,!1)}function rb(){return new X(3300,!1)}function sb(i){return new X(3504,!1)}function ab(i){return new X(3301,!1)}function ob(i,e){return new X(3302,!1)}function lb(i){return new X(3303,!1)}function cb(i,e){return new X(3400,!1)}function hb(i){return new X(3401,!1)}function db(i){return new X(3402,!1)}function ub(i,e){return new X(3505,!1)}function ui(i){switch(i.length){case 0:return new S1;case 1:return i[0];default:return new En(i)}}function o4(i,e,t=new Map,n=new Map){let r=[],s=[],a=-1,o=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==a,d=h&&o||new Map;l.forEach((u,p)=>{let f=p,g=u;if(p!=="offset")switch(f=i.normalizePropertyName(f,r),g){case qr:g=t.get(p);break;case I0:g=n.get(p);break;default:g=i.normalizeStyleValue(p,f,g,r);break}d.set(f,g)}),h||s.push(d),o=d,a=c}),r.length)throw gP(r);return s}function Ul(i,e,t,n){switch(e){case"start":i.onStart(()=>n(t&&r4(t,"start",i)));break;case"done":i.onDone(()=>n(t&&r4(t,"done",i)));break;case"destroy":i.onDestroy(()=>n(t&&r4(t,"destroy",i)));break}}function r4(i,e,t){let n=t.totalTime,r=!!t.disabled,s=$l(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,n??i.totalTime,r),a=i._data;return a!=null&&(s._data=a),s}function $l(i,e,t,n,r="",s=0,a){return{element:i,triggerName:e,fromState:t,toState:n,phaseName:r,totalTime:s,disabled:!!a}}function u0(i,e,t){let n=i.get(e);return n||i.set(e,n=t),n}function l4(i){let e=i.indexOf(":"),t=i.substring(1,e),n=i.slice(e+1);return[t,n]}var vP=typeof document>"u"?null:document.documentElement;function ql(i){let e=i.parentNode||i.host||null;return e===vP?null:e}function mP(i){return i.substring(1,6)=="ebkit"}var Tn=null,Nw=!1;function fb(i){Tn||(Tn=wP()||{},Nw=Tn.style?"WebkitAppearance"in Tn.style:!1);let e=!0;return Tn.style&&!mP(i)&&(e=i in Tn.style,!e&&Nw&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tn.style)),e}function wP(){return typeof document<"u"?document.body:null}function c4(i,e){for(;e;){if(e===i)return!0;e=ql(e)}return!1}function h4(i,e,t){if(t)return Array.from(i.querySelectorAll(e));let n=i.querySelector(e);return n?[n]:[]}var bP=1e3,d4="{{",yP="}}",u4="ng-enter",Gl="ng-leave",Da="ng-trigger",Ea=".ng-trigger",f4="ng-animating",Wl=".ng-animating";function D1(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:s4(parseFloat(e[1]),e[2])}function s4(i,e){switch(e){case"s":return i*bP;default:return i}}function Va(i,e,t){return i.hasOwnProperty("duration")?i:CP(i,e,t)}function CP(i,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,s=0,a="";if(typeof i=="string"){let o=i.match(n);if(o===null)return e.push(Bw(i)),{duration:0,delay:0,easing:""};r=s4(parseFloat(o[1]),o[2]);let l=o[3];l!=null&&(s=s4(parseFloat(l),o[4]));let c=o[5];c&&(a=c)}else r=i;if(!t){let o=!1,l=e.length;r<0&&(e.push(hP()),o=!0),s<0&&(e.push(dP()),o=!0),o&&e.splice(l,0,Bw(i))}return{duration:r,delay:s,easing:a}}function pb(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function i1(i,e,t){e.forEach((n,r)=>{let s=Xl(r);t&&!t.has(r)&&t.set(r,i.style[s]),i.style[s]=n})}function Bi(i,e){e.forEach((t,n)=>{let r=Xl(n);i.style[r]=""})}function Gr(i){return Array.isArray(i)?i.length==1?i[0]:Zl(i):i}function gb(i,e,t){let n=e.params||{},r=p4(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||t.push(uP(s))})}var a4=new RegExp(`${d4}\\s*(.+?)\\s*${yP}`,"g");function p4(i){let e=[];if(typeof i=="string"){let t;for(;t=a4.exec(i);)e.push(t[1]);a4.lastIndex=0}return e}function Wr(i,e,t){let n=`${i}`,r=n.replace(a4,(s,a)=>{let o=e[a];return o==null&&(t.push(fP(a)),o=""),o.toString()});return r==n?i:r}var xP=/-+([a-z0-9])/g;function Xl(i){return i.replace(xP,(...e)=>e[1].toUpperCase())}function vb(i,e){return i===0||e===0}function mb(i,e,t){if(t.size&&e.length){let n=e[0],r=[];if(t.forEach((s,a)=>{n.has(a)||r.push(a),n.set(a,s)}),r.length)for(let s=1;sa.set(o,Yl(i,o)))}}return e}function f0(i,e,t){switch(e.type){case pe.Trigger:return i.visitTrigger(e,t);case pe.State:return i.visitState(e,t);case pe.Transition:return i.visitTransition(e,t);case pe.Sequence:return i.visitSequence(e,t);case pe.Group:return i.visitGroup(e,t);case pe.Animate:return i.visitAnimate(e,t);case pe.Keyframes:return i.visitKeyframes(e,t);case pe.Style:return i.visitStyle(e,t);case pe.Reference:return i.visitReference(e,t);case pe.AnimateChild:return i.visitAnimateChild(e,t);case pe.AnimateRef:return i.visitAnimateRef(e,t);case pe.Query:return i.visitQuery(e,t);case pe.Stagger:return i.visitStagger(e,t);default:throw pP(e.type)}}function Yl(i,e){return window.getComputedStyle(i)[e]}var L4=(()=>{class i{validateStyleProperty(t){return fb(t)}containsElement(t,n){return c4(t,n)}getParentElement(t){return ql(t)}query(t,n,r){return h4(t,n,r)}computeStyle(t,n,r){return r||""}animate(t,n,r,s,a,o=[],l){return new S1(r,s)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),zn=class{static NOOP=new L4},Pn=class{};var MP=new Set(["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"]),t2=class extends Pn{normalizePropertyName(e,t){return Xl(e)}normalizeStyleValue(e,t,n,r){let s="",a=n.toString().trim();if(MP.has(t)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&r.push(Zw(e,n))}return a+s}};var i2="*";function AP(i,e){let t=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>_P(n,t,e)):t.push(i),t}function _P(i,e,t){if(i[0]==":"){let l=SP(i,t);if(typeof l=="function"){e.push(l);return}i=l}let n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(eb(i)),e;let r=n[1],s=n[2],a=n[3];e.push(wb(r,a));let o=r==i2&&a==i2;s[0]=="<"&&!o&&e.push(wb(a,r))}function SP(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var Kl=new Set(["true","1"]),Ql=new Set(["false","0"]);function wb(i,e){let t=Kl.has(i)||Ql.has(i),n=Kl.has(e)||Ql.has(e);return(r,s)=>{let a=i==i2||i==r,o=e==i2||e==s;return!a&&t&&typeof r=="boolean"&&(a=r?Kl.has(i):Ql.has(i)),!o&&n&&typeof s=="boolean"&&(o=s?Kl.has(e):Ql.has(e)),a&&o}}var Eb=":self",DP=new RegExp(`s*${Eb}s*,?`,"g");function Vb(i,e,t,n){return new y4(i).build(e,t,n)}var bb="",y4=class{_driver;constructor(e){this._driver=e}build(e,t,n){let r=new C4(t);return this._resetContextStyleTimingState(r),f0(this,Gr(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector=bb,e.collectedStyles=new Map,e.collectedStyles.set(bb,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,r=t.depCount=0,s=[],a=[];return e.name.charAt(0)=="@"&&t.errors.push(jw()),e.definitions.forEach(o=>{if(this._resetContextStyleTimingState(t),o.type==pe.State){let l=o,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,s.push(this.visitState(l,t))}),l.name=c}else if(o.type==pe.Transition){let l=this.visitTransition(o,t);n+=l.queryCount,r+=l.depCount,a.push(l)}else t.errors.push(Uw())}),{type:pe.Trigger,name:e.name,states:s,transitions:a,queryCount:n,depCount:r,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){let s=new Set,a=r||{};n.styles.forEach(o=>{o instanceof Map&&o.forEach(l=>{p4(l).forEach(c=>{a.hasOwnProperty(c)||s.add(c)})})}),s.size&&t.errors.push($w(e.name,[...s.values()]))}return{type:pe.State,name:e.name,style:n,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=f0(this,Gr(e.animation),t),r=AP(e.expr,t.errors);return{type:pe.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:Ln(e.options)}}visitSequence(e,t){return{type:pe.Sequence,steps:e.steps.map(n=>f0(this,n,t)),options:Ln(e.options)}}visitGroup(e,t){let n=t.currentTime,r=0,s=e.steps.map(a=>{t.currentTime=n;let o=f0(this,a,t);return r=Math.max(r,t.currentTime),o});return t.currentTime=r,{type:pe.Group,steps:s,options:Ln(e.options)}}visitAnimate(e,t){let n=LP(e.timings,t.errors);t.currentAnimateTimings=n;let r,s=e.styles?e.styles:y0({});if(s.type==pe.Keyframes)r=this.visitKeyframes(s,t);else{let a=e.styles,o=!1;if(!a){o=!0;let c={};n.easing&&(c.easing=n.easing),a=y0(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(a,t);l.isEmptyStep=o,r=l}return t.currentAnimateTimings=null,{type:pe.Animate,timings:n,style:r,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let o of r)typeof o=="string"?o===I0?n.push(o):t.errors.push(qw(o)):n.push(new Map(Object.entries(o)));let s=!1,a=null;return n.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(a=o.get("easing"),o.delete("easing")),!s)){for(let l of o.values())if(l.toString().indexOf(d4)>=0){s=!0;break}}}),{type:pe.Style,styles:n,easing:a,offset:e.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,r=t.currentTime,s=t.currentTime;n&&s>0&&(s-=n.duration+n.delay),e.styles.forEach(a=>{typeof a!="string"&&a.forEach((o,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),d=!0;h&&(s!=r&&s>=h.startTime&&r<=h.endTime&&(t.errors.push(Gw(l,h.startTime,h.endTime,s,r)),d=!1),s=h.startTime),d&&c.set(l,{startTime:s,endTime:r}),t.options&&gb(o,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:pe.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Ww()),n;let r=1,s=0,a=[],o=!1,l=!1,c=0,h=e.steps.map(x=>{let _=this._makeStyleAst(x,t),b=_.offset!=null?_.offset:TP(_.styles),v=0;return b!=null&&(s++,v=_.offset=b),l=l||v<0||v>1,o=o||v0&&s{let b=u>0?_==p?1:u*_:a[_],v=b*y;t.currentTime=f+g.delay+v,g.duration=v,this._validateStyleAst(x,t),x.offset=b,n.styles.push(x)}),n}visitReference(e,t){return{type:pe.Reference,animation:f0(this,Gr(e.animation),t),options:Ln(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:pe.AnimateChild,options:Ln(e.options)}}visitAnimateRef(e,t){return{type:pe.AnimateRef,animation:this.visitReference(e.animation,t),options:Ln(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;let[s,a]=EP(e.selector);t.currentQuerySelector=n.length?n+" "+s:s,u0(t.collectedStyles,t.currentQuerySelector,new Map);let o=f0(this,Gr(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:pe.Query,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:o,originalSelector:e.selector,options:Ln(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Qw());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Va(e.timings,t.errors,!0);return{type:pe.Stagger,animation:f0(this,Gr(e.animation),t),timings:n,options:null}}};function EP(i){let e=!!i.split(/\s*,\s*/).find(t=>t==Eb);return e&&(i=i.replace(DP,"")),i=i.replace(/@\*/g,Ea).replace(/@\w+/g,t=>Ea+"-"+t.slice(1)).replace(/:animating/g,Wl),[i,e]}function VP(i){return i?Z({},i):null}var C4=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function TP(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function LP(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let s=Va(i,e).duration;return g4(s,0,"")}let t=i;if(t.split(/\s+/).some(s=>s.charAt(0)=="{"&&s.charAt(1)=="{")){let s=g4(0,0,"");return s.dynamic=!0,s.strValue=t,s}let r=Va(t,e);return g4(r.duration,r.delay,r.easing)}function Ln(i){return i?(i=Z({},i),i.params&&(i.params=VP(i.params))):i={},i}function g4(i,e,t){return{duration:i,delay:e,easing:t}}function z4(i,e,t,n,r,s,a=null,o=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:a,subTimeline:o}}var La=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},zP=1,PP=":enter",kP=new RegExp(PP,"g"),HP=":leave",FP=new RegExp(HP,"g");function Tb(i,e,t,n,r,s=new Map,a=new Map,o,l,c=[]){return new x4().buildKeyframes(i,e,t,n,r,s,a,o,l,c)}var x4=class{buildKeyframes(e,t,n,r,s,a,o,l,c,h=[]){c=c||new La;let d=new M4(e,t,c,r,s,h,[]);d.options=l;let u=l.delay?D1(l.delay):0;d.currentTimeline.delayNextStep(u),d.currentTimeline.setStyles([a],null,d.errors,l),f0(this,n,d);let p=d.timelines.filter(f=>f.containsAnimation());if(p.length&&o.size){let f;for(let g=p.length-1;g>=0;g--){let y=p[g];if(y.element===t){f=y;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([o],null,d.errors,l)}return p.length?p.map(f=>f.buildKeyframes()):[z4(t,[],[],[],0,u,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let r=t.createSubContext(e.options),s=t.currentTimeline.currentTime,a=this._visitSubInstructions(n,r,r.options);s!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let r of e){let s=r?.delay;if(s){let a=typeof s=="number"?s:D1(Wr(s,r?.params??{},t.errors));n.delayNextStep(a)}}}_visitSubInstructions(e,t,n){let s=t.currentTimeline.currentTime,a=n.duration!=null?D1(n.duration):null,o=n.delay!=null?D1(n.delay):null;return a!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,a,o);s=Math.max(s,c.duration+c.delay)}),s}visitReference(e,t){t.updateOptions(e.options,!0),f0(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,r=t,s=e.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),s.delay!=null)){r.previousNode.type==pe.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=n2);let a=D1(s.delay);r.delayNextStep(a)}e.steps.length&&(e.steps.forEach(a=>f0(this,a,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],r=t.currentTimeline.currentTime,s=e.options&&e.options.delay?D1(e.options.delay):0;e.steps.forEach(a=>{let o=t.createSubContext(e.options);s&&o.delayNextStep(s),f0(this,a,o),r=Math.max(r,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,r=t.params?Wr(n,t.params,t.errors):n;return Va(r,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());let s=e.style;s.type==pe.Keyframes?this.visitKeyframes(s,t):(t.incrementTime(n.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();let s=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(s):n.setStyles(e.styles,s,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,r=t.currentTimeline.duration,s=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(l=>{let c=l.offset||0;o.forwardTime(c*s),o.setStyles(l.styles,l.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+s),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,r=e.options||{},s=r.delay?D1(r.delay):0;s&&(t.previousNode.type===pe.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=n2);let a=n,o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=o.length;let l=null;o.forEach((c,h)=>{t.currentQueryIndex=h;let d=t.createSubContext(e.options,c);s&&d.delayNextStep(s),c===t.element&&(l=d.currentTimeline),f0(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe();let u=d.currentTimeline.currentTime;a=Math.max(a,u)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,r=t.currentTimeline,s=e.timings,a=Math.abs(s.duration),o=a*(t.currentQueryTotal-1),l=a*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=o-l;break;case"full":l=n.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let d=h.currentTime;f0(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-d+(r.startTime-n.currentTimeline.startTime)}},n2={},M4=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=n2;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,n,r,s,a,o,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=a,this.timelines=o,this.currentTimeline=l||new r2(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,r=this.options;n.duration!=null&&(r.duration=D1(n.duration)),n.delay!=null&&(r.delay=D1(n.delay));let s=n.params;if(s){let a=r.params;a||(a=this.options.params={}),Object.keys(s).forEach(o=>{(!t||!a.hasOwnProperty(o))&&(a[o]=Wr(s[o],a,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return e}createSubContext(e=null,t,n){let r=t||this.element,s=new i(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||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=n2,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},s=new A4(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,n,r,s,a){let o=[];if(r&&o.push(this.element),e.length>0){e=e.replace(kP,"."+this._enterClassName),e=e.replace(FP,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),o.push(...c)}return!s&&o.length==0&&a.push(Jw(t)),o}},r2=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),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.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new i(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=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=zP,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||I0),this._currentKeyframe.set(t,I0);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,r){t&&this._previousKeyframe.set("easing",t);let s=r&&r.params||{},a=RP(e,this._globalTimelineStyles);for(let[o,l]of a){let c=Wr(l,s,n);this._pendingStyles.set(o,c),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??I0),this._updateStyle(o,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((o,l)=>{let c=new Map([...this._backFill,...o]);c.forEach((h,d)=>{h===qr?e.add(d):h===I0&&t.add(d)}),n||c.set("offset",l/this.duration),r.push(c)});let s=[...e.values()],a=[...t.values()];if(n){let o=r[0],l=new Map(o);o.set("offset",0),l.set("offset",1),r=[o,l]}return z4(this.element,r,s,a,this.duration,this.startTime,this.easing,!1)}},A4=class extends r2{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,n,r,s,a,o=!1){super(e,t,a.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=o,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){let s=[],a=n+t,o=t/a,l=new Map(e[0]);l.set("offset",0),s.push(l);let c=new Map(e[0]);c.set("offset",yb(o)),s.push(c);let h=e.length-1;for(let d=1;d<=h;d++){let u=new Map(e[d]),p=u.get("offset"),f=t+p*n;u.set("offset",yb(f/a)),s.push(u)}n=a,t=0,r="",e=s}return z4(this.element,e,this.preStyleProps,this.postStyleProps,n,t,r,!0)}};function yb(i,e=3){let t=Math.pow(10,e-1);return Math.round(i*t)/t}function RP(i,e){let t=new Map,n;return i.forEach(r=>{if(r==="*"){n??=e.keys();for(let s of n)t.set(s,I0)}else for(let[s,a]of r)t.set(s,a)}),t}function Cb(i,e,t,n,r,s,a,o,l,c,h,d,u){return{type:0,element:i,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:s,toState:n,toStyles:a,timelines:o,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:d,errors:u}}var v4={},s2=class{_triggerName;ast;_stateStyles;constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,r){return OP(this.ast.matchers,e,t,n,r)}buildStyles(e,t,n){let r=this._stateStyles.get("*");return e!==void 0&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,n):new Map}build(e,t,n,r,s,a,o,l,c,h){let d=[],u=this.ast.options&&this.ast.options.params||v4,p=o&&o.params||v4,f=this.buildStyles(n,p,d),g=l&&l.params||v4,y=this.buildStyles(r,g,d),x=new Set,_=new Map,b=new Map,v=r==="void",m={params:Lb(g,u),delay:this.ast.options?.delay},M=h?[]:Tb(e,t,this.ast.animation,s,a,f,y,m,c,d),L=0;return M.forEach(w=>{L=Math.max(w.duration+w.delay,L)}),d.length?Cb(t,this._triggerName,n,r,v,f,y,[],[],_,b,L,d):(M.forEach(w=>{let E=w.element,A=u0(_,E,new Set);w.preStyleProps.forEach(O=>A.add(O));let P=u0(b,E,new Set);w.postStyleProps.forEach(O=>P.add(O)),E!==t&&x.add(E)}),Cb(t,this._triggerName,n,r,v,f,y,M,[...x.values()],_,b,L))}};function OP(i,e,t,n,r){return i.some(s=>s(e,t,n,r))}function Lb(i,e){let t=Z({},e);return Object.entries(i).forEach(([n,r])=>{r!=null&&(t[n]=r)}),t}var _4=class{styles;defaultParams;normalizer;constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,r=Lb(e,this.defaultParams);return this.styles.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,o)=>{a&&(a=Wr(a,r,t));let l=this.normalizer.normalizePropertyName(o,t);a=this.normalizer.normalizeStyleValue(o,l,a,t),n.set(o,a)})}),n}};function IP(i,e,t){return new S4(i,e,t)}var S4=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,t.states.forEach(r=>{let s=r.options&&r.options.params||{};this.states.set(r.name,new _4(r.style,s,n))}),xb(this.states,"true","1"),xb(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new s2(e,r,this.states))}),this.fallbackTransition=BP(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,r){return this.transitionFactories.find(a=>a.match(e,t,n,r))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function BP(i,e,t){let n=[(a,o)=>!0],r={type:pe.Sequence,steps:[],options:null},s={type:pe.Transition,animation:r,matchers:n,options:null,queryCount:0,depCount:0};return new s2(i,s,e)}function xb(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}var NP=new La,D4=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n}register(e,t){let n=[],r=[],s=Vb(this._driver,t,n,r);if(n.length)throw nb(n);this._animations.set(e,s)}_buildPlayer(e,t,n){let r=e.element,s=o4(this._normalizer,e.keyframes,t,n);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let r=[],s=this._animations.get(e),a,o=new Map;if(s?(a=Tb(this._driver,t,s,u4,Gl,new Map,new Map,n,NP,r),a.forEach(h=>{let d=u0(o,h.element,new Map);h.postStyleProps.forEach(u=>d.set(u,null))})):(r.push(rb()),a=[]),r.length)throw sb(r);o.forEach((h,d)=>{h.forEach((u,p)=>{h.set(p,this._driver.computeStyle(d,p,I0))})});let l=a.map(h=>{let d=o.get(h.element);return this._buildPlayer(h,new Map,d)}),c=ui(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw ab(e);return t}listen(e,t,n,r){let s=$l(t,"","","");return Ul(this._getPlayer(e),n,s,r),()=>{}}command(e,t,n,r){if(n=="register"){this.register(e,r[0]);return}if(n=="create"){let a=r[0]||{};this.create(e,t,a);return}let s=this._getPlayer(e);switch(n){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);break}}},Mb="ng-animate-queued",ZP=".ng-animate-queued",m4="ng-animate-disabled",jP=".ng-animate-disabled",UP="ng-star-inserted",$P=".ng-star-inserted",qP=[],zb={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},GP={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},n1="__ng_removed",za=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),r=n?e.value:e;if(this.value=XP(r),n){let s=e,{value:a}=s,o=Ds(s,["value"]);this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(r=>{n[r]==null&&(n[r]=t[r])})}}},Ta="void",w4=new za(Ta),E4=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+e,B0(t,this._hostClassName)}listen(e,t,n,r){if(!this._triggers.has(t))throw ob(n,t);if(n==null||n.length==0)throw lb(t);if(!YP(n))throw cb(n,t);let s=u0(this._elementListeners,e,[]),a={name:t,phase:n,callback:r};s.push(a);let o=u0(this._engine.statesByElement,e,new Map);return o.has(t)||(B0(e,Da),B0(e,Da+"-"+t),o.set(t,w4)),()=>{this._engine.afterFlush(()=>{let l=s.indexOf(a);l>=0&&s.splice(l,1),this._triggers.has(t)||o.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw hb(e);return t}trigger(e,t,n,r=!0){let s=this._getTrigger(t),a=new Pa(this.id,t,e),o=this._engine.statesByElement.get(e);o||(B0(e,Da),B0(e,Da+"-"+t),this._engine.statesByElement.set(e,o=new Map));let l=o.get(t),c=new za(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),o.set(t,c),l||(l=w4),!(c.value===Ta)&&l.value===c.value){if(!JP(l.params,c.params)){let g=[],y=s.matchStyles(l.value,l.params,g),x=s.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{Bi(e,y),i1(e,x)})}return}let u=u0(this._engine.playersByElement,e,[]);u.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let p=s.matchTransition(l.value,c.value,e,c.params),f=!1;if(!p){if(!r)return;p=s.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:p,fromState:l,toState:c,player:a,isFallbackTransition:f}),f||(B0(e,Mb),a.onStart(()=>{Xr(e,Mb)})),a.onDone(()=>{let g=this.players.indexOf(a);g>=0&&this.players.splice(g,1);let y=this._engine.playersByElement.get(e);if(y){let x=y.indexOf(a);x>=0&&y.splice(x,1)}}),this.players.push(a),u.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,Ea,!0);n.forEach(r=>{if(r[n1])return;let s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(a=>a.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,n,r){let s=this._engine.statesByElement.get(e),a=new Map;if(s){let o=[];if(s.forEach((l,c)=>{if(a.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,Ta,r);h&&o.push(h)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,a),n&&ui(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let r=new Set;t.forEach(s=>{let a=s.name;if(r.has(a))return;r.add(a);let l=this._triggers.get(a).fallbackTransition,c=n.get(a)||w4,h=new za(Ta),d=new Pa(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:c,toState:h,player:d,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(n.totalAnimations){let s=n.players.length?n.playersByQueriedElement.get(e):[];if(s&&s.length)r=!0;else{let a=e;for(;a=a.parentNode;)if(n.statesByElement.get(a)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)n.markElementAsRemoved(this.id,e,!1,t);else{let s=e[n1];(!s||s===zb)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){B0(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let r=n.player;if(r.destroyed)return;let s=n.element,a=this._elementListeners.get(s);a&&a.forEach(o=>{if(o.name==n.triggerName){let l=$l(s,n.triggerName,n.fromState.value,n.toState.value);l._data=e,Ul(n.player,o.phase,l,o.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{let s=n.transition.ast.depCount,a=r.transition.ast.depCount;return s==0||a==0?s-a:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},V4=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new E4(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let a=!1,o=this.driver.getParentElement(t);for(;o;){let l=r.get(o);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),a=!0;break}o=this.driver.getParentElement(o)}a||n.unshift(e)}else n.push(e);return r.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let r of n.values())if(r.namespaceId){let s=this._fetchNamespace(r.namespaceId);s&&t.add(s)}}return t}trigger(e,t,n,r){if(Jl(t)){let s=this._fetchNamespace(e);if(s)return s.trigger(t,n,r),!0}return!1}insertNode(e,t,n,r){if(!Jl(t))return;let s=t[n1];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;let a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){let a=this._fetchNamespace(e);a&&a.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),B0(e,m4)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Xr(e,m4))}removeNode(e,t,n){if(Jl(t)){let r=e?this._fetchNamespace(e):null;r?r.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let s=this.namespacesByHostElement.get(t);s&&s.id!==e&&s.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,r,s){this.collectedLeaveElements.push(t),t[n1]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(e,t,n,r,s){return Jl(t)?this._fetchNamespace(e).listen(t,n,r,s):()=>{}}_buildInstruction(e,t,n,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,s)}destroyInnerAnimations(e){let t=this.driver.query(e,Ea,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Wl,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return ui(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[n1];if(t&&t.setForRemoval){if(e[n1]=zb,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(m4)&&this.markElementAsDisabled(e,!1),this.driver.query(e,jP,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?ui(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(e){throw db(e)}_flushAnimations(e,t){let n=new La,r=[],s=new Map,a=[],o=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(F=>{h.add(F);let R=this.driver.query(F,ZP,!0);for(let I=0;I{let I=u4+g++;f.set(R,I),F.forEach(re=>B0(re,I))});let y=[],x=new Set,_=new Set;for(let F=0;Fx.add(re)):_.add(R))}let b=new Map,v=Sb(u,Array.from(x));v.forEach((F,R)=>{let I=Gl+g++;b.set(R,I),F.forEach(re=>B0(re,I))}),e.push(()=>{p.forEach((F,R)=>{let I=f.get(R);F.forEach(re=>Xr(re,I))}),v.forEach((F,R)=>{let I=b.get(R);F.forEach(re=>Xr(re,I))}),y.forEach(F=>{this.processLeaveNode(F)})});let m=[],M=[];for(let F=this._namespaceList.length-1;F>=0;F--)this._namespaceList[F].drainQueuedTransitions(t).forEach(I=>{let re=I.player,ve=I.element;if(m.push(re),this.collectedEnterElements.length){let C=ve[n1];if(C&&C.setForMove){if(C.previousTriggersValues&&C.previousTriggersValues.has(I.triggerName)){let N=C.previousTriggersValues.get(I.triggerName),H=this.statesByElement.get(I.element);if(H&&H.has(I.triggerName)){let Le=H.get(I.triggerName);Le.value=N,H.set(I.triggerName,Le)}}re.destroy();return}}let Re=!d||!this.driver.containsElement(d,ve),Te=b.get(ve),ke=f.get(ve),ze=this._buildInstruction(I,n,ke,Te,Re);if(ze.errors&&ze.errors.length){M.push(ze);return}if(Re){re.onStart(()=>Bi(ve,ze.fromStyles)),re.onDestroy(()=>i1(ve,ze.toStyles)),r.push(re);return}if(I.isFallbackTransition){re.onStart(()=>Bi(ve,ze.fromStyles)),re.onDestroy(()=>i1(ve,ze.toStyles)),r.push(re);return}let T0=[];ze.timelines.forEach(C=>{C.stretchStartingKeyframe=!0,this.disabledNodes.has(C.element)||T0.push(C)}),ze.timelines=T0,n.append(ve,ze.timelines);let V={instruction:ze,player:re,element:ve};a.push(V),ze.queriedElements.forEach(C=>u0(o,C,[]).push(re)),ze.preStyleProps.forEach((C,N)=>{if(C.size){let H=l.get(N);H||l.set(N,H=new Set),C.forEach((Le,rt)=>H.add(rt))}}),ze.postStyleProps.forEach((C,N)=>{let H=c.get(N);H||c.set(N,H=new Set),C.forEach((Le,rt)=>H.add(rt))})});if(M.length){let F=[];M.forEach(R=>{F.push(ub(R.triggerName,R.errors))}),m.forEach(R=>R.destroy()),this.reportError(F)}let L=new Map,w=new Map;a.forEach(F=>{let R=F.element;n.has(R)&&(w.set(R,R),this._beforeAnimationBuild(F.player.namespaceId,F.instruction,L))}),r.forEach(F=>{let R=F.element;this._getPreviousPlayers(R,!1,F.namespaceId,F.triggerName,null).forEach(re=>{u0(L,R,[]).push(re),re.destroy()})});let E=y.filter(F=>Db(F,l,c)),A=new Map;_b(A,this.driver,_,c,I0).forEach(F=>{Db(F,l,c)&&E.push(F)});let O=new Map;p.forEach((F,R)=>{_b(O,this.driver,new Set(F),l,qr)}),E.forEach(F=>{let R=A.get(F),I=O.get(F);A.set(F,new Map([...R?.entries()??[],...I?.entries()??[]]))});let G=[],K=[],te={};a.forEach(F=>{let{element:R,player:I,instruction:re}=F;if(n.has(R)){if(h.has(R)){I.onDestroy(()=>i1(R,re.toStyles)),I.disabled=!0,I.overrideTotalTime(re.totalTime),r.push(I);return}let ve=te;if(w.size>1){let Te=R,ke=[];for(;Te=Te.parentNode;){let ze=w.get(Te);if(ze){ve=ze;break}ke.push(Te)}ke.forEach(ze=>w.set(ze,ve))}let Re=this._buildAnimation(I.namespaceId,re,L,s,O,A);if(I.setRealPlayer(Re),ve===te)G.push(I);else{let Te=this.playersByElement.get(ve);Te&&Te.length&&(I.parentPlayer=ui(Te)),r.push(I)}}else Bi(R,re.fromStyles),I.onDestroy(()=>i1(R,re.toStyles)),K.push(I),h.has(R)&&r.push(I)}),K.forEach(F=>{let R=s.get(F.element);if(R&&R.length){let I=ui(R);F.setRealPlayer(I)}}),r.forEach(F=>{F.parentPlayer?F.syncPlayerEvents(F.parentPlayer):F.destroy()});for(let F=0;F!Re.destroyed);ve.length?KP(this,R,ve):this.processLeaveNode(R)}return y.length=0,G.forEach(F=>{this.players.push(F),F.onDone(()=>{F.destroy();let R=this.players.indexOf(F);this.players.splice(R,1)}),F.play()}),G}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,r,s){let a=[];if(t){let o=this.playersByQueriedElement.get(e);o&&(a=o)}else{let o=this.playersByElement.get(e);if(o){let l=!s||s==Ta;o.forEach(c=>{c.queued||!l&&c.triggerName!=r||a.push(c)})}}return(n||r)&&(a=a.filter(o=>!(n&&n!=o.namespaceId||r&&r!=o.triggerName))),a}_beforeAnimationBuild(e,t,n){let r=t.triggerName,s=t.element,a=t.isRemovalTransition?void 0:e,o=t.isRemovalTransition?void 0:r;for(let l of t.timelines){let c=l.element,h=c!==s,d=u0(n,c,[]);this._getPreviousPlayers(c,h,a,o,t.toState).forEach(p=>{let f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),d.push(p)})}Bi(s,t.fromStyles)}_buildAnimation(e,t,n,r,s,a){let o=t.triggerName,l=t.element,c=[],h=new Set,d=new Set,u=t.timelines.map(f=>{let g=f.element;h.add(g);let y=g[n1];if(y&&y.removedBeforeQueried)return new S1(f.duration,f.delay);let x=g!==l,_=QP((n.get(g)||qP).map(L=>L.getRealPlayer())).filter(L=>{let w=L;return w.element?w.element===g:!1}),b=s.get(g),v=a.get(g),m=o4(this._normalizer,f.keyframes,b,v),M=this._buildPlayer(f,m,_);if(f.subTimeline&&r&&d.add(g),x){let L=new Pa(e,o,g);L.setRealPlayer(M),c.push(L)}return M});c.forEach(f=>{u0(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>WP(this.playersByQueriedElement,f.element,f))}),h.forEach(f=>B0(f,f4));let p=ui(u);return p.onDestroy(()=>{h.forEach(f=>Xr(f,f4)),i1(l,t.toStyles)}),d.forEach(f=>{u0(r,f,[]).push(p)}),p}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new S1(e.duration,e.delay)}},Pa=class{namespaceId;triggerName;element;_player=new S1;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>Ul(e,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){u0(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?!1: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){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function WP(i,e,t){let n=i.get(e);if(n){if(n.length){let r=n.indexOf(t);n.splice(r,1)}n.length==0&&i.delete(e)}return n}function XP(i){return i??null}function Jl(i){return i&&i.nodeType===1}function YP(i){return i=="start"||i=="done"}function Ab(i,e){let t=i.style.display;return i.style.display=e??"none",t}function _b(i,e,t,n,r){let s=[];t.forEach(l=>s.push(Ab(l)));let a=[];n.forEach((l,c)=>{let h=new Map;l.forEach(d=>{let u=e.computeStyle(c,d,r);h.set(d,u),(!u||u.length==0)&&(c[n1]=GP,a.push(c))}),i.set(c,h)});let o=0;return t.forEach(l=>Ab(l,s[o++])),a}function Sb(i,e){let t=new Map;if(i.forEach(o=>t.set(o,[])),e.length==0)return t;let n=1,r=new Set(e),s=new Map;function a(o){if(!o)return n;let l=s.get(o);if(l)return l;let c=o.parentNode;return t.has(c)?l=c:r.has(c)?l=n:l=a(c),s.set(o,l),l}return e.forEach(o=>{let l=a(o);l!==n&&t.get(l).push(o)}),t}function B0(i,e){i.classList?.add(e)}function Xr(i,e){i.classList?.remove(e)}function KP(i,e,t){ui(t).onDone(()=>i.processLeaveNode(e))}function QP(i){let e=[];return Pb(i,e),e}function Pb(i,e){for(let t=0;tr.add(s)):e.set(i,n),t.delete(i),!0}var Yr=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,n){this._driver=t,this._normalizer=n,this._transitionEngine=new V4(e.body,t,n),this._timelineEngine=new D4(e.body,t,n),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(e,t,n,r,s){let a=e+"-"+r,o=this._triggerCache[a];if(!o){let l=[],c=[],h=Vb(this._driver,s,l,c);if(l.length)throw ib(r,l);o=IP(r,h,this._normalizer),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,r,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,r){if(n.charAt(0)=="@"){let[s,a]=l4(n),o=r;this._timelineEngine.command(s,t,a,o)}else this._transitionEngine.trigger(e,t,n,r)}listen(e,t,n,r,s){if(n.charAt(0)=="@"){let[a,o]=l4(n);return this._timelineEngine.listen(a,t,o,s)}return this._transitionEngine.listen(e,t,n,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function ek(i,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=b4(e[0]),e.length>1&&(n=b4(e[e.length-1]))):e instanceof Map&&(t=b4(e)),t||n?new tk(i,t,n):null}var tk=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,n,r){this._element=t,this._startStyles=n,this._endStyles=r;let s=i.initialStylesByElement.get(t);s||i.initialStylesByElement.set(t,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&i1(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(i1(this._element,this._initialStyles),this._endStyles&&(i1(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Bi(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Bi(this._element,this._endStyles),this._endStyles=null),i1(this._element,this._initialStyles),this._state=3)}}return i})();function b4(i){let e=null;return i.forEach((t,n)=>{ik(n)&&(e=e||new Map,e.set(n,t))}),e}function ik(i){return i==="display"||i==="position"}var a2=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,n,r){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=r,this._duration=n.duration,this._delay=n.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;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(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,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_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){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{r!=="offset"&&e.set(r,this._finished?n:Yl(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},o2=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return c4(e,t)}getParentElement(e){return ql(e)}query(e,t,n){return h4(e,t,n)}computeStyle(e,t,n){return Yl(e,t)}animate(e,t,n,r,s,a=[]){let o=r==0?"both":"forwards",l={duration:n,delay:r,fill:o};s&&(l.easing=s);let c=new Map,h=a.filter(p=>p instanceof a2);vb(n,r)&&h.forEach(p=>{p.currentSnapshot.forEach((f,g)=>c.set(g,f))});let d=pb(t).map(p=>new Map(p));d=mb(e,d,c);let u=ek(e,d);return new a2(e,d,l,u)}};var e2="@",kb="@.disabled",l2=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,n,r){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=r}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}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,n,r=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,n){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}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,n,r){this.delegate.setAttribute(e,t,n,r)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,r){this.delegate.setStyle(e,t,n,r)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==e2&&t==kb?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n,r){return this.delegate.listen(e,t,n,r)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},T4=class extends l2{factory;constructor(e,t,n,r,s){super(t,n,r,s),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==e2?t.charAt(1)=="."&&t==kb?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n,r){if(t.charAt(0)==e2){let s=nk(e),a=t.slice(1),o="";return a.charAt(0)!=e2&&([a,o]=rk(a)),this.engine.listen(this.namespaceId,s,a,o,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,n,l)})}return this.delegate.listen(e,t,n,r)}};function nk(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function rk(i){let e=i.indexOf("."),t=i.substring(0,e),n=i.slice(e+1);return[t,n]}var c2=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,t.onRemovalComplete=(r,s)=>{s?.removeChild(null,r)}}createRenderer(e,t){let n="",r=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(r);if(!h){let d=()=>c.delete(r);h=new l2(n,r,this.engine,d),c.set(r,h)}return h}let s=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let o=c=>{Array.isArray(c)?c.forEach(o):this.engine.registerTrigger(s,a,e,c.name,c)};return t.data.animation.forEach(o),new T4(this,a,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(s=>{let[a,o]=s;a(o)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var ak=(()=>{class i extends Yr{constructor(t,n,r){super(t,n,r)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||i)(ee($e),ee(zn),ee(Pn))};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();function ok(){return new t2}function lk(i,e,t){return new c2(i,e,t)}var Fb=[{provide:Pn,useFactory:ok},{provide:Yr,useClass:ak},{provide:w1,useFactory:lk,deps:[ba,Yr,Ne]}],ck=[{provide:zn,useClass:L4},{provide:Js,useValue:"NoopAnimations"},...Fb],Hb=[{provide:zn,useFactory:()=>new o2},{provide:Js,useFactory:()=>"BrowserAnimations"},...Fb],Rb=(()=>{class i{static withConfig(t){return{ngModule:i,providers:t.disableAnimations?ck:Hb}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({providers:Hb,imports:[Ca]})}return i})();var qb=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(Y(c0),Y(Qe))};static \u0275dir=Je({type:i})}return i})(),R4=(()=>{class i extends qb{static \u0275fac=(()=>{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275dir=Je({type:i,features:[Q0]})}return i})(),pi=new J("");var hk={provide:pi,useExisting:k0(()=>y2),multi:!0};function dk(){let i=b0()?b0().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var uk=new J(""),y2=(()=>{class i extends qb{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!dk())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(Y(c0),Y(Qe),Y(uk,8))};static \u0275dir=Je({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&Me("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[R0([hk]),Q0]})}return i})();function O4(i){return i==null||I4(i)===0}function I4(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var Ba=new J(""),B4=new J(""),fk=/^(?=.{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])?)*$/,fi=class{static min(e){return pk(e)}static max(e){return gk(e)}static required(e){return vk(e)}static requiredTrue(e){return mk(e)}static email(e){return wk(e)}static minLength(e){return bk(e)}static maxLength(e){return yk(e)}static pattern(e){return Ck(e)}static nullValidator(e){return Gb()}static compose(e){return Jb(e)}static composeAsync(e){return ey(e)}};function pk(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function vk(i){return O4(i.value)?{required:!0}:null}function mk(i){return i.value===!0?null:{required:!0}}function wk(i){return O4(i.value)||fk.test(i.value)?null:{email:!0}}function bk(i){return e=>{let t=e.value?.length??I4(e.value);return t===null||t===0?null:t{let t=e.value?.length??I4(e.value);return t!==null&&t>i?{maxlength:{requiredLength:i,actualLength:t}}:null}}function Ck(i){if(!i)return Gb;let e,t;return typeof i=="string"?(t="",i.charAt(0)!=="^"&&(t+="^"),t+=i,i.charAt(i.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=i.toString(),e=i),n=>{if(O4(n.value))return null;let r=n.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function Gb(i){return null}function Wb(i){return i!=null}function Xb(i){return yn(i)?je(i):i}function Yb(i){let e={};return i.forEach(t=>{e=t!=null?Z(Z({},e),t):e}),Object.keys(e).length===0?null:e}function Kb(i,e){return e.map(t=>t(i))}function xk(i){return!i.validate}function Qb(i){return i.map(e=>xk(e)?e:t=>e.validate(t))}function Jb(i){if(!i)return null;let e=i.filter(Wb);return e.length==0?null:function(t){return Yb(Kb(t,e))}}function N4(i){return i!=null?Jb(Qb(i)):null}function ey(i){if(!i)return null;let e=i.filter(Wb);return e.length==0?null:function(t){let n=Kb(t,e).map(Xb);return kd(n).pipe(ue(Yb))}}function Z4(i){return i!=null?ey(Qb(i)):null}function Ob(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function ty(i){return i._rawValidators}function iy(i){return i._rawAsyncValidators}function P4(i){return i?Array.isArray(i)?i:[i]:[]}function u2(i,e){return Array.isArray(i)?i.includes(e):i===e}function Ib(i,e){let t=P4(e);return P4(i).forEach(r=>{u2(t,r)||t.push(r)}),t}function Bb(i,e){return P4(e).filter(t=>!u2(i,t))}var f2=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=N4(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Z4(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Ni=class extends f2{name;get formDirective(){return null}get path(){return null}},Ia=class extends f2{_parent=null;name=null;valueAccessor=null},p2=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Mk={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},bQ=se(Z({},Mk),{"[class.ng-submitted]":"isSubmitted"}),ny=(()=>{class i extends p2{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(Y(Ia,2))};static \u0275dir=Je({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&jt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Q0]})}return i})(),C2=(()=>{class i extends p2{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(Y(Ni,10))};static \u0275dir=Je({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&jt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[Q0]})}return i})();var ka="VALID",h2="INVALID",Kr="PENDING",Ha="DISABLED",Zi=class{},g2=class extends Zi{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Ra=class extends Zi{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Oa=class extends Zi{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Qr=class extends Zi{status;source;constructor(e,t){super(),this.status=e,this.source=t}},v2=class extends Zi{source;constructor(e){super(),this.source=e}},m2=class extends Zi{source;constructor(e){super(),this.source=e}};function j4(i){return(x2(i)?i.validators:i)||null}function Ak(i){return Array.isArray(i)?N4(i):i||null}function U4(i,e){return(x2(e)?e.asyncValidators:i)||null}function _k(i){return Array.isArray(i)?Z4(i):i||null}function x2(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function ry(i,e,t){let n=i.controls;if(!(e?Object.keys(n):n).length)throw new X(1e3,"");if(!n[t])throw new X(1001,"")}function sy(i,e,t){i._forEachChild((n,r)=>{if(t[r]===void 0)throw new X(1002,"")})}var Jr=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}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 status(){return M1(this.statusReactive)}set status(e){M1(()=>this.statusReactive.set(e))}_status=Zr(()=>this.statusReactive());statusReactive=Kt(void 0);get valid(){return this.status===ka}get invalid(){return this.status===h2}get pending(){return this.status==Kr}get disabled(){return this.status===Ha}get enabled(){return this.status!==Ha}errors;get pristine(){return M1(this.pristineReactive)}set pristine(e){M1(()=>this.pristineReactive.set(e))}_pristine=Zr(()=>this.pristineReactive());pristineReactive=Kt(!0);get dirty(){return!this.pristine}get touched(){return M1(this.touchedReactive)}set touched(e){M1(()=>this.touchedReactive.set(e))}_touched=Zr(()=>this.touchedReactive());touchedReactive=Kt(!1);get untouched(){return!this.touched}_events=new it;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Ib(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Ib(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Bb(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Bb(e,this._rawAsyncValidators))}hasValidator(e){return u2(this._rawValidators,e)}hasAsyncValidator(e){return u2(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(se(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Oa(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Oa(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(se(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Ra(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Ra(!0,n))}markAsPending(e={}){this.status=Kr;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Qr(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(se(Z({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Ha,this.errors=null,this._forEachChild(r=>{r.disable(se(Z({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new g2(this.value,n)),this._events.next(new Qr(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(se(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=ka,this._forEachChild(n=>{n.enable(se(Z({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(se(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ka||this.status===Kr)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new g2(this.value,t)),this._events.next(new Qr(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(se(Z({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ha:ka}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Kr,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=Xb(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n&&n.errors?n.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,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Qr(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new he,this.statusChanges=new he}_calculateStatus(){return this._allControlsDisabled()?Ha:this.errors?h2:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Kr)?Kr:this._anyControlsHaveStatus(h2)?h2:ka}_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,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new Ra(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Oa(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){x2(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Ak(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=_k(this._rawAsyncValidators)}},es=class extends Jr{constructor(e,t,n){super(j4(t),U4(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;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,n={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.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,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){sy(this,!0,e),Object.keys(e).forEach(n=>{ry(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(n=>{let r=this.controls[n];r&&r.patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((n,r)=>{n.reset(e?e[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&e(n,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(e,t){let n=e;return this._forEachChild((r,s)=>{n=t(n,r,s)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var k4=class extends es{};var M2=new J("",{providedIn:"root",factory:()=>A2}),A2="always";function Sk(i,e){return[...e.path,i]}function H4(i,e,t=A2){$4(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),Ek(i,e),Tk(i,e),Vk(i,e),Dk(i,e)}function Nb(i,e,t=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),b2(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function w2(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Dk(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function $4(i,e){let t=ty(i);e.validator!==null?i.setValidators(Ob(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=iy(i);e.asyncValidator!==null?i.setAsyncValidators(Ob(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();w2(e._rawValidators,r),w2(e._rawAsyncValidators,r)}function b2(i,e){let t=!1;if(i!==null){if(e.validator!==null){let r=ty(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==e.validator);s.length!==r.length&&(t=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let r=iy(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==e.asyncValidator);s.length!==r.length&&(t=!0,i.setAsyncValidators(s))}}}let n=()=>{};return w2(e._rawValidators,n),w2(e._rawAsyncValidators,n),t}function Ek(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&ay(i,e)})}function Vk(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&ay(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function ay(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Tk(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function oy(i,e){i==null,$4(i,e)}function Lk(i,e){return b2(i,e)}function zk(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function Pk(i){return Object.getPrototypeOf(i.constructor)===R4}function ly(i,e){i._syncPendingControls(),e.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function kk(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(s=>{s.constructor===y2?t=s:Pk(s)?n=s:r=s}),r||n||t||null}function Hk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}var Fk={provide:Ni,useExisting:k0(()=>q4)},Fa=Promise.resolve(),q4=(()=>{class i extends Ni{callSetDisabledState;get submitted(){return M1(this.submittedReactive)}_submitted=Zr(()=>this.submittedReactive());submittedReactive=Kt(!1);_directives=new Set;form;ngSubmit=new he;options;constructor(t,n,r){super(),this.callSetDisabledState=r,this.form=new es({},N4(t),Z4(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Fa.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),H4(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Fa.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Fa.then(()=>{let n=this._findContainer(t.path),r=new es({});oy(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Fa.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){Fa.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),ly(this.form,this._directives),this.ngSubmit.emit(t),this.form._events.next(new v2(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!1),this.form._events.next(new m2(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static \u0275fac=function(n){return new(n||i)(Y(Ba,10),Y(B4,10),Y(M2,8))};static \u0275dir=Je({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&Me("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[R0([Fk]),Q0]})}return i})();function Zb(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function jb(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var d2=class extends Jr{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(j4(t),U4(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),x2(t)&&(t.nonNullable||t.initialValueIsDefault)&&(jb(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,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){Zb(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Zb(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){jb(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}};var Rk=i=>i instanceof d2;var _2=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=Je({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})();var cy=new J("");var Ok={provide:Ni,useExisting:k0(()=>G4)},G4=(()=>{class i extends Ni{callSetDisabledState;get submitted(){return M1(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}_submitted=Zr(()=>this._submittedReactive());_submittedReactive=Kt(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new he;constructor(t,n,r){super(),this.callSetDisabledState=r,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(b2(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return H4(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){Nb(t.control||null,t,!1),Hk(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this._submittedReactive.set(!0),ly(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new v2(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new m2(this.form))}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,r=this.form.get(t.path);n!==r&&(Nb(n||null,t),Rk(r)&&(H4(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);oy(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&Lk(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){$4(this.form,this),this._oldForm&&b2(this._oldForm,this)}static \u0275fac=function(n){return new(n||i)(Y(Ba,10),Y(B4,10),Y(M2,8))};static \u0275dir=Je({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&Me("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[R0([Ok]),Q0,Ht]})}return i})();var Ik={provide:Ia,useExisting:k0(()=>W4)},W4=(()=>{class i extends Ia{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(t){}model;update=new he;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=kk(this,s)}ngOnChanges(t){this._added||this._setUpControl(),zk(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return Sk(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||i)(Y(Ni,13),Y(Ba,10),Y(B4,10),Y(pi,10),Y(cy,8))};static \u0275dir=Je({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[R0([Ik]),Q0,Ht]})}return i})();var Bk={provide:pi,useExisting:k0(()=>S2),multi:!0};function hy(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Nk(i){return i.split(":")[0]}var S2=(()=>{class i extends R4{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n=this._getOptionId(t),r=hy(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=Nk(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275dir=Je({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&Me("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[R0([Bk]),Q0]})}return i})(),dy=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(hy(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)(Y(Qe),Y(c0),Y(S2,9))};static \u0275dir=Je({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),Zk={provide:pi,useExisting:k0(()=>uy),multi:!0};function Ub(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function jk(i){return i.split(":")[0]}var uy=(()=>{class i extends R4{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(s=>this._getOptionId(s));n=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let a=s;for(let o=0;o{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275dir=Je({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&Me("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[R0([Zk]),Q0]})}return i})(),fy=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Ub(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Ub(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)(Y(Qe),Y(c0),Y(uy,9))};static \u0275dir=Je({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();var py=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({})}return i})(),F4=class extends Jr{constructor(e,t,n){super(j4(t),U4(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,n={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,t={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,n={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){sy(this,!1,e),e.forEach((n,r)=>{ry(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(e.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((n,r)=>{n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,n)=>n._syncPendingControls()?!0:t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,n)=>{e(t,n)})}_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))}_allControlsDisabled(){for(let 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)}_find(e){return this.at(e)??null}};function $b(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Uk=(()=>{class i{useNonNullable=!1;get nonNullable(){let t=new i;return t.useNonNullable=!0,t}group(t,n=null){let r=this._reduceControls(t),s={};return $b(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new es(r,s)}record(t,n=null){let r=this._reduceControls(t);return new k4(r,n)}control(t,n,r){let s={};return this.useNonNullable?($b(n)?s=n:(s.validators=n,s.asyncValidators=r),new d2(t,se(Z({},s),{nonNullable:!0}))):new d2(t,n,r)}array(t,n,r){let s=t.map(a=>this._createControl(a));return new F4(s,n,r)}_reduceControls(t){let n={};return Object.keys(t).forEach(r=>{n[r]=this._createControl(t[r])}),n}_createControl(t){if(t instanceof d2)return t;if(t instanceof Jr)return t;if(Array.isArray(t)){let n=t[0],r=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(n,r,s)}else return this.control(t)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var D2=(()=>{class i extends Uk{group(t,n=null){return super.group(t,n)}control(t,n,r){return super.control(t,n,r)}array(t,n,r){return super.array(t,n,r)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var gy=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:M2,useValue:t.callSetDisabledState??A2}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({imports:[py]})}return i})(),vy=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:cy,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:M2,useValue:t.callSetDisabledState??A2}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({imports:[py]})}return i})();var me="primary",Ja=Symbol("RouteTitle"),J4=class{params;constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function Fn(i){return new J4(i)}function _y(i,e,t){let n=t.path.split("/");if(n.length>i.length||t.pathMatch==="full"&&(e.hasChildren()||n.lengthn[s]===r)}else return i===e}function Dy(i){return i.length>0?i[i.length-1]:null}function Gi(i){return Dd(i)?i:yn(i)?je(Promise.resolve(i)):ae(i)}var qk={exact:Vy,subset:Ty},Ey={exact:Gk,subset:Wk,ignored:()=>!0};function wy(i,e,t){return qk[t.paths](i.root,e.root,t.matrixParams)&&Ey[t.queryParams](i.queryParams,e.queryParams)&&!(t.fragment==="exact"&&i.fragment!==e.fragment)}function Gk(i,e){return E1(i,e)}function Vy(i,e,t){if(!kn(i.segments,e.segments)||!T2(i.segments,e.segments,t)||i.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!i.children[n]||!Vy(i.children[n],e.children[n],t))return!1;return!0}function Wk(i,e){return Object.keys(e).length<=Object.keys(i).length&&Object.keys(e).every(t=>Sy(i[t],e[t]))}function Ty(i,e,t){return Ly(i,e,e.segments,t)}function Ly(i,e,t,n){if(i.segments.length>t.length){let r=i.segments.slice(0,t.length);return!(!kn(r,t)||e.hasChildren()||!T2(r,t,n))}else if(i.segments.length===t.length){if(!kn(i.segments,t)||!T2(i.segments,t,n))return!1;for(let r in e.children)if(!i.children[r]||!Ty(i.children[r],e.children[r],n))return!1;return!0}else{let r=t.slice(0,i.segments.length),s=t.slice(i.segments.length);return!kn(i.segments,r)||!T2(i.segments,r,n)||!i.children[me]?!1:Ly(i.children[me],e,s,n)}}function T2(i,e,t){return e.every((n,r)=>Ey[t](i[r].parameters,n.parameters))}var T1=class{root;queryParams;fragment;_queryParamMap;constructor(e=new Ze([],{}),t={},n=null){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Fn(this.queryParams),this._queryParamMap}toString(){return Kk.serialize(this)}},Ze=class{segments;children;parent=null;constructor(e,t){this.segments=e,this.children=t,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return L2(this)}},ji=class{path;parameters;_parameterMap;constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=Fn(this.parameters),this._parameterMap}toString(){return Py(this)}};function Xk(i,e){return kn(i,e)&&i.every((t,n)=>E1(t.parameters,e[n].parameters))}function kn(i,e){return i.length!==e.length?!1:i.every((t,n)=>t.path===e[n].path)}function Yk(i,e){let t=[];return Object.entries(i.children).forEach(([n,r])=>{n===me&&(t=t.concat(e(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==me&&(t=t.concat(e(r,n)))}),t}var Rn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>new Ui,providedIn:"root"})}return i})(),Ui=class{parse(e){let t=new nf(e);return new T1(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${Na(e.root,!0)}`,n=eH(e.queryParams),r=typeof e.fragment=="string"?`#${Qk(e.fragment)}`:"";return`${t}${n}${r}`}},Kk=new Ui;function L2(i){return i.segments.map(e=>Py(e)).join("/")}function Na(i,e){if(!i.hasChildren())return L2(i);if(e){let t=i.children[me]?Na(i.children[me],!1):"",n=[];return Object.entries(i.children).forEach(([r,s])=>{r!==me&&n.push(`${r}:${Na(s,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}else{let t=Yk(i,(n,r)=>r===me?[Na(i.children[me],!1)]:[`${r}:${Na(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[me]!=null?`${L2(i)}/${t[0]}`:`${L2(i)}/(${t.join("//")})`}}function zy(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function E2(i){return zy(i).replace(/%3B/gi,";")}function Qk(i){return encodeURI(i)}function tf(i){return zy(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function z2(i){return decodeURIComponent(i)}function by(i){return z2(i.replace(/\+/g,"%20"))}function Py(i){return`${tf(i.path)}${Jk(i.parameters)}`}function Jk(i){return Object.entries(i).map(([e,t])=>`;${tf(e)}=${tf(t)}`).join("")}function eH(i){let e=Object.entries(i).map(([t,n])=>Array.isArray(n)?n.map(r=>`${E2(t)}=${E2(r)}`).join("&"):`${E2(t)}=${E2(n)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var tH=/^[^\/()?;#]+/;function X4(i){let e=i.match(tH);return e?e[0]:""}var iH=/^[^\/()?;=#]+/;function nH(i){let e=i.match(iH);return e?e[0]:""}var rH=/^[^=?&#]+/;function sH(i){let e=i.match(rH);return e?e[0]:""}var aH=/^[^&#]+/;function oH(i){let e=i.match(aH);return e?e[0]:""}var nf=class{url;remaining;constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ze([],{}):new Ze([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[me]=new Ze(e,t)),n}parseSegment(){let e=X4(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new X(4009,!1);return this.capture(e),new ji(z2(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=nH(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let r=X4(this.remaining);r&&(n=r,this.capture(n))}e[z2(t)]=z2(n)}parseQueryParam(e){let t=sH(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let a=oH(this.remaining);a&&(n=a,this.capture(n))}let r=by(t),s=by(n);if(e.hasOwnProperty(r)){let a=e[r];Array.isArray(a)||(a=[a],e[r]=a),a.push(s)}else e[r]=s}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=X4(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new X(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=me);let a=this.parseChildren();t[s]=Object.keys(a).length===1?a[me]:new Ze([],a),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new X(4011,!1)}};function ky(i){return i.segments.length>0?new Ze([],{[me]:i}):i}function Hy(i){let e={};for(let[n,r]of Object.entries(i.children)){let s=Hy(r);if(n===me&&s.segments.length===0&&s.hasChildren())for(let[a,o]of Object.entries(s.children))e[a]=o;else(s.segments.length>0||s.hasChildren())&&(e[n]=s)}let t=new Ze(i.segments,e);return lH(t)}function lH(i){if(i.numberOfChildren===1&&i.children[me]){let e=i.children[me];return new Ze(i.segments.concat(e.segments),e.children)}return i}function $i(i){return i instanceof T1}function Fy(i,e,t=null,n=null){let r=Ry(i);return Oy(r,e,t,n)}function Ry(i){let e;function t(s){let a={};for(let l of s.children){let c=t(l);a[l.outlet]=c}let o=new Ze(s.url,a);return s===i&&(e=o),o}let n=t(i.root),r=ky(n);return e??r}function Oy(i,e,t,n){let r=i;for(;r.parent;)r=r.parent;if(e.length===0)return Y4(r,r,r,t,n);let s=cH(e);if(s.toRoot())return Y4(r,r,new Ze([],{}),t,n);let a=hH(s,r,i),o=a.processChildren?ja(a.segmentGroup,a.index,s.commands):By(a.segmentGroup,a.index,s.commands);return Y4(r,a.segmentGroup,o,t,n)}function k2(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function $a(i){return typeof i=="object"&&i!=null&&i.outlets}function Y4(i,e,t,n,r){let s={};n&&Object.entries(n).forEach(([l,c])=>{s[l]=Array.isArray(c)?c.map(h=>`${h}`):`${c}`});let a;i===e?a=t:a=Iy(i,e,t);let o=ky(Hy(a));return new T1(o,s,r)}function Iy(i,e,t){let n={};return Object.entries(i.children).forEach(([r,s])=>{s===e?n[r]=t:n[r]=Iy(s,e,t)}),new Ze(i.segments,n)}var H2=class{isAbsolute;numberOfDoubleDots;commands;constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&k2(n[0]))throw new X(4003,!1);let r=n.find($a);if(r&&r!==Dy(n))throw new X(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function cH(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new H2(!0,0,i);let e=0,t=!1,n=i.reduce((r,s,a)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let o={};return Object.entries(s.outlets).forEach(([l,c])=>{o[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:o}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:a===0?(s.split("/").forEach((o,l)=>{l==0&&o==="."||(l==0&&o===""?t=!0:o===".."?e++:o!=""&&r.push(o))}),r):[...r,s]},[]);return new H2(t,e,n)}var ns=class{segmentGroup;processChildren;index;constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}};function hH(i,e,t){if(i.isAbsolute)return new ns(e,!0,0);if(!t)return new ns(e,!1,NaN);if(t.parent===null)return new ns(t,!0,0);let n=k2(i.commands[0])?0:1,r=t.segments.length-1+n;return dH(t,r,i.numberOfDoubleDots)}function dH(i,e,t){let n=i,r=e,s=t;for(;s>r;){if(s-=r,n=n.parent,!n)throw new X(4005,!1);r=n.segments.length}return new ns(n,!1,r-s)}function uH(i){return $a(i[0])?i[0].outlets:{[me]:i}}function By(i,e,t){if(i??=new Ze([],{}),i.segments.length===0&&i.hasChildren())return ja(i,e,t);let n=fH(i,e,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexs!==me)&&i.children[me]&&i.numberOfChildren===1&&i.children[me].segments.length===0){let s=ja(i.children[me],e,t);return new Ze(i.segments,s.children)}return Object.entries(n).forEach(([s,a])=>{typeof a=="string"&&(a=[a]),a!==null&&(r[s]=By(i.children[s],e,a))}),Object.entries(i.children).forEach(([s,a])=>{n[s]===void 0&&(r[s]=a)}),new Ze(i.segments,r)}}function fH(i,e,t){let n=0,r=e,s={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return s;let a=i.segments[r],o=t[n];if($a(o))break;let l=`${o}`,c=n0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!Cy(l,c,a))return s;n+=2}else{if(!Cy(l,{},a))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function rf(i,e,t){let n=i.segments.slice(0,e),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(e[t]=rf(new Ze([],{}),0,n))}),e}function yy(i){let e={};return Object.entries(i).forEach(([t,n])=>e[t]=`${n}`),e}function Cy(i,e,t){return i==t.path&&E1(e,t.parameters)}var P2="imperative",St=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(St||{}),x0=class{id;url;constructor(e,t){this.id=e,this.url=t}},qi=class extends x0{type=St.NavigationStart;navigationTrigger;restoredState;constructor(e,t,n="imperative",r=null){super(e,t),this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},N0=class extends x0{urlAfterRedirects;type=St.NavigationEnd;constructor(e,t,n){super(e,t),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},p0=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(p0||{}),ss=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(ss||{}),V1=class extends x0{reason;code;type=St.NavigationCancel;constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},L1=class extends x0{reason;code;type=St.NavigationSkipped;constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r}},as=class extends x0{error;target;type=St.NavigationError;constructor(e,t,n,r){super(e,t),this.error=n,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},qa=class extends x0{urlAfterRedirects;state;type=St.RoutesRecognized;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},F2=class extends x0{urlAfterRedirects;state;type=St.GuardsCheckStart;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},R2=class extends x0{urlAfterRedirects;state;shouldActivate;type=St.GuardsCheckEnd;constructor(e,t,n,r,s){super(e,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=s}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},O2=class extends x0{urlAfterRedirects;state;type=St.ResolveStart;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},I2=class extends x0{urlAfterRedirects;state;type=St.ResolveEnd;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},B2=class{route;type=St.RouteConfigLoadStart;constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},N2=class{route;type=St.RouteConfigLoadEnd;constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Z2=class{snapshot;type=St.ChildActivationStart;constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},j2=class{snapshot;type=St.ChildActivationEnd;constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},U2=class{snapshot;type=St.ActivationStart;constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$2=class{snapshot;type=St.ActivationEnd;constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},os=class{routerEvent;position;anchor;type=St.Scroll;constructor(e,t,n){this.routerEvent=e,this.position=t,this.anchor=n}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},Ga=class{},ls=class{url;navigationBehaviorOptions;constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function gH(i,e){return i.providers&&!i._injector&&(i._injector=ia(i.providers,e,`Route: ${i.path}`)),i._injector??e}function r1(i){return i.outlet||me}function vH(i,e){let t=i.filter(n=>r1(n)===e);return t.push(...i.filter(n=>r1(n)!==e)),t}function eo(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let e=i.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var q2=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return eo(this.route?.snapshot)??this.rootInjector}constructor(e){this.rootInjector=e,this.children=new On(this.rootInjector)}},On=(()=>{class i{rootInjector;contexts=new Map;constructor(t){this.rootInjector=t}onChildOutletCreated(t,n){let r=this.getOrCreateContext(t);r.outlet=n,this.contexts.set(t,r)}onChildOutletDestroyed(t){let n=this.getContext(t);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let n=this.getContext(t);return n||(n=new q2(this.rootInjector),this.contexts.set(t,n)),n}getContext(t){return this.contexts.get(t)||null}static \u0275fac=function(n){return new(n||i)(ee(Bt))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),G2=class{_root;constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=sf(e,this._root);return t?t.children.map(n=>n.value):[]}firstChild(e){let t=sf(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=af(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return af(e,this._root).map(t=>t.value)}};function sf(i,e){if(i===e.value)return e;for(let t of e.children){let n=sf(i,t);if(n)return n}return null}function af(i,e){if(i===e.value)return[e];for(let t of e.children){let n=af(i,t);if(n.length)return n.unshift(e),n}return[]}var C0=class{value;children;constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function is(i){let e={};return i&&i.children.forEach(t=>e[t.value.outlet]=t),e}var Wa=class extends G2{snapshot;constructor(e,t){super(e),this.snapshot=t,pf(this,e)}toString(){return this.snapshot.toString()}};function Ny(i){let e=mH(i),t=new Ct([new ji("",{})]),n=new Ct({}),r=new Ct({}),s=new Ct({}),a=new Ct(""),o=new s1(t,n,s,a,r,me,i,e.root);return o.snapshot=e.root,new Wa(new C0(o,[]),e)}function mH(i){let e={},t={},n={},r="",s=new Hn([],e,n,r,t,me,i,null,{});return new Xa("",new C0(s,[]))}var s1=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(e,t,n,r,s,a,o,l){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=s,this.outlet=a,this.component=o,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(ue(c=>c[Ja]))??ae(void 0),this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(ue(e=>Fn(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(ue(e=>Fn(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function W2(i,e,t="emptyOnly"){let n,{routeConfig:r}=i;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:Z(Z({},e.params),i.params),data:Z(Z({},e.data),i.data),resolve:Z(Z(Z(Z({},i.data),e.data),r?.data),i._resolvedData)}:n={params:Z({},i.params),data:Z({},i.data),resolve:Z(Z({},i.data),i._resolvedData??{})},r&&jy(r)&&(n.resolve[Ja]=r.title),n}var Hn=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Ja]}constructor(e,t,n,r,s,a,o,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=a,this.component=o,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Fn(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Fn(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},Xa=class extends G2{url;constructor(e,t){super(t),this.url=e,pf(this,t)}toString(){return Zy(this._root)}};function pf(i,e){e.value._routerState=i,e.children.forEach(t=>pf(i,t))}function Zy(i){let e=i.children.length>0?` { ${i.children.map(Zy).join(", ")} } `:"";return`${i.value}${e}`}function K4(i){if(i.snapshot){let e=i.snapshot,t=i._futureSnapshot;i.snapshot=t,E1(e.queryParams,t.queryParams)||i.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&i.fragmentSubject.next(t.fragment),E1(e.params,t.params)||i.paramsSubject.next(t.params),$k(e.url,t.url)||i.urlSubject.next(t.url),E1(e.data,t.data)||i.dataSubject.next(t.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function of(i,e){let t=E1(i.params,e.params)&&Xk(i.url,e.url),n=!i.parent!=!e.parent;return t&&!n&&(!i.parent||of(i.parent,e.parent))}function jy(i){return typeof i.title=="string"||i.title===null}var Uy=new J(""),to=(()=>{class i{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=me;activateEvents=new he;deactivateEvents=new he;attachEvents=new he;detachEvents=new he;routerOutletData=Ke(void 0);parentContexts=j(On);location=j(ai);changeDetector=j(Qt);inputBinder=j(io,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(t){if(t.name){let{firstChange:n,previousValue:r}=t.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new X(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new X(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new X(4012,!1);this.location.detach();let t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,n){this.activated=t,this._activatedRoute=n,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){let t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,n){if(this.isActivated)throw new X(4013,!1);this._activatedRoute=t;let r=this.location,a=t.snapshot.component,o=this.parentContexts.getOrCreateContext(this.name).children,l=new lf(t,o,r.injector,this.routerOutletData);this.activated=r.createComponent(a,{index:r.length,injector:l,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||i)};static \u0275dir=Je({type:i,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ht]})}return i})(),lf=class{route;childContexts;parent;outletData;constructor(e,t,n,r){this.route=e,this.childContexts=t,this.parent=n,this.outletData=r}get(e,t){return e===s1?this.route:e===On?this.childContexts:e===Uy?this.outletData:this.parent.get(e,t)}},io=new J(""),gf=(()=>{class i{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){let{activatedRoute:n}=t,r=Hs([n.queryParams,n.params,n.data]).pipe(Wt(([s,a,o],l)=>(o=Z(Z(Z({},s),a),o),l===0?ae(o):Promise.resolve(o)))).subscribe(s=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(t);return}let a=Um(n.component);if(!a){this.unsubscribeFromRouteData(t);return}for(let{templateName:o}of a.inputs)t.activatedComponentRef.setInput(o,s[o])});this.outletDataSubscriptions.set(t,r)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),vf=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Ue({type:i,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,r){n&1&&le(0,"router-outlet")},dependencies:[to],encapsulation:2})}return i})();function mf(i){let e=i.children&&i.children.map(mf),t=e?se(Z({},i),{children:e}):Z({},i);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==me&&(t.component=vf),t}function wH(i,e,t){let n=Ya(i,e._root,t?t._root:void 0);return new Wa(n,e)}function Ya(i,e,t){if(t&&i.shouldReuseRoute(e.value,t.value.snapshot)){let n=t.value;n._futureSnapshot=e.value;let r=bH(i,e,t);return new C0(n,r)}else{if(i.shouldAttach(e.value)){let s=i.retrieve(e.value);if(s!==null){let a=s.route;return a.value._futureSnapshot=e.value,a.children=e.children.map(o=>Ya(i,o)),a}}let n=yH(e.value),r=e.children.map(s=>Ya(i,s));return new C0(n,r)}}function bH(i,e,t){return e.children.map(n=>{for(let r of t.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return Ya(i,n,r);return Ya(i,n)})}function yH(i){return new s1(new Ct(i.url),new Ct(i.params),new Ct(i.queryParams),new Ct(i.fragment),new Ct(i.data),i.outlet,i.component,i)}var cs=class{redirectTo;navigationBehaviorOptions;constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},$y="ngNavigationCancelingError";function X2(i,e){let{redirectTo:t,navigationBehaviorOptions:n}=$i(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=qy(!1,p0.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function qy(i,e){let t=new Error(`NavigationCancelingError: ${i||""}`);return t[$y]=!0,t.cancellationCode=e,t}function CH(i){return Gy(i)&&$i(i.url)}function Gy(i){return!!i&&i[$y]}var xH=(i,e,t,n)=>ue(r=>(new cf(e,r.targetRouterState,r.currentRouterState,t,n).activate(i),r)),cf=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(e,t,n,r,s){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=s}activate(e){let t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),K4(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){let r=is(t);e.children.forEach(s=>{let a=s.value.outlet;this.deactivateRoutes(s,r[a],n),delete r[a]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(e,t,n){let r=e.value,s=t?t.value:null;if(r===s)if(r.component){let a=n.getContext(r.outlet);a&&this.deactivateChildRoutes(e,t,a.children)}else this.deactivateChildRoutes(e,t,n);else s&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,s=is(e);for(let a of Object.values(s))this.deactivateRouteAndItsChildren(a,r);if(n&&n.outlet){let a=n.outlet.detach(),o=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:a,route:e,contexts:o})}}deactivateRouteAndOutlet(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,s=is(e);for(let a of Object.values(s))this.deactivateRouteAndItsChildren(a,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,t,n){let r=is(t);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new $2(s.value.snapshot))}),e.children.length&&this.forwardEvent(new j2(e.value.snapshot))}activateRoutes(e,t,n){let r=e.value,s=t?t.value:null;if(K4(r),r===s)if(r.component){let a=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,a.children)}else this.activateChildRoutes(e,t,n);else if(r.component){let a=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let o=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),a.children.onOutletReAttached(o.contexts),a.attachRef=o.componentRef,a.route=o.route.value,a.outlet&&a.outlet.attach(o.componentRef,o.route.value),K4(o.route.value),this.activateChildRoutes(e,null,a.children)}else a.attachRef=null,a.route=r,a.outlet&&a.outlet.activateWith(r,a.injector),this.activateChildRoutes(e,null,a.children)}else this.activateChildRoutes(e,null,n)}},Y2=class{path;route;constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},rs=class{component;route;constructor(e,t){this.component=e,this.route=t}};function MH(i,e,t){let n=i._root,r=e?e._root:null;return Za(n,r,t,[n.value])}function AH(i){let e=i.routeConfig?i.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:i,guards:e}}function ds(i,e){let t=Symbol(),n=e.get(i,t);return n===t?typeof i=="function"&&!iv(i)?i:e.get(i):n}function Za(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=is(e);return i.children.forEach(a=>{_H(a,s[a.value.outlet],t,n.concat([a.value]),r),delete s[a.value.outlet]}),Object.entries(s).forEach(([a,o])=>Ua(o,t.getContext(a),r)),r}function _H(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=i.value,a=e?e.value:null,o=t?t.getContext(i.value.outlet):null;if(a&&s.routeConfig===a.routeConfig){let l=SH(a,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Y2(n)):(s.data=a.data,s._resolvedData=a._resolvedData),s.component?Za(i,e,o?o.children:null,n,r):Za(i,e,t,n,r),l&&o&&o.outlet&&o.outlet.isActivated&&r.canDeactivateChecks.push(new rs(o.outlet.component,a))}else a&&Ua(e,o,r),r.canActivateChecks.push(new Y2(n)),s.component?Za(i,null,o?o.children:null,n,r):Za(i,null,t,n,r);return r}function SH(i,e,t){if(typeof t=="function")return t(i,e);switch(t){case"pathParamsChange":return!kn(i.url,e.url);case"pathParamsOrQueryParamsChange":return!kn(i.url,e.url)||!E1(i.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!of(i,e)||!E1(i.queryParams,e.queryParams);case"paramsChange":default:return!of(i,e)}}function Ua(i,e,t){let n=is(i),r=i.value;Object.entries(n).forEach(([s,a])=>{r.component?e?Ua(a,e.children.getContext(s),t):Ua(a,null,t):Ua(a,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new rs(e.outlet.component,r)):t.canDeactivateChecks.push(new rs(null,r)):t.canDeactivateChecks.push(new rs(null,r))}function no(i){return typeof i=="function"}function DH(i){return typeof i=="boolean"}function EH(i){return i&&no(i.canLoad)}function VH(i){return i&&no(i.canActivate)}function TH(i){return i&&no(i.canActivateChild)}function LH(i){return i&&no(i.canDeactivate)}function zH(i){return i&&no(i.canMatch)}function Wy(i){return i instanceof q1||i?.name==="EmptyError"}var V2=Symbol("INITIAL_VALUE");function hs(){return Wt(i=>Hs(i.map(e=>e.pipe(G1(1),iu(V2)))).pipe(ue(e=>{for(let t of e)if(t!==!0){if(t===V2)return V2;if(t===!1||PH(t))return t}return!0}),xt(e=>e!==V2),G1(1)))}function PH(i){return $i(i)||i instanceof cs}function kH(i,e){return mt(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:a}}=t;return a.length===0&&s.length===0?ae(se(Z({},t),{guardsResult:!0})):HH(a,n,r,i).pipe(mt(o=>o&&DH(o)?FH(n,s,i,e):ae(o)),ue(o=>se(Z({},t),{guardsResult:o})))})}function HH(i,e,t,n){return je(i).pipe(mt(r=>NH(r.component,r.route,t,e,n)),W1(r=>r!==!0,!0))}function FH(i,e,t,n){return je(e).pipe(f1(r=>ur(OH(r.route.parent,n),RH(r.route,n),BH(i,r.path,t),IH(i,r.route,t))),W1(r=>r!==!0,!0))}function RH(i,e){return i!==null&&e&&e(new U2(i)),ae(!0)}function OH(i,e){return i!==null&&e&&e(new Z2(i)),ae(!0)}function IH(i,e,t){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return ae(!0);let r=n.map(s=>d5(()=>{let a=eo(e)??t,o=ds(s,a),l=VH(o)?o.canActivate(e,i):a0(a,()=>o(e,i));return Gi(l).pipe(W1())}));return ae(r).pipe(hs())}function BH(i,e,t){let n=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(a=>AH(a)).filter(a=>a!==null).map(a=>d5(()=>{let o=a.guards.map(l=>{let c=eo(a.node)??t,h=ds(l,c),d=TH(h)?h.canActivateChild(n,i):a0(c,()=>h(n,i));return Gi(d).pipe(W1())});return ae(o).pipe(hs())}));return ae(s).pipe(hs())}function NH(i,e,t,n,r){let s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||s.length===0)return ae(!0);let a=s.map(o=>{let l=eo(e)??r,c=ds(o,l),h=LH(c)?c.canDeactivate(i,e,t,n):a0(l,()=>c(i,e,t,n));return Gi(h).pipe(W1())});return ae(a).pipe(hs())}function ZH(i,e,t,n){let r=e.canLoad;if(r===void 0||r.length===0)return ae(!0);let s=r.map(a=>{let o=ds(a,i),l=EH(o)?o.canLoad(e,t):a0(i,()=>o(e,t));return Gi(l)});return ae(s).pipe(hs(),Xy(n))}function Xy(i){return Cd(kt(e=>{if(typeof e!="boolean")throw X2(i,e)}),ue(e=>e===!0))}function jH(i,e,t,n){let r=e.canMatch;if(!r||r.length===0)return ae(!0);let s=r.map(a=>{let o=ds(a,i),l=zH(o)?o.canMatch(e,t):a0(i,()=>o(e,t));return Gi(l)});return ae(s).pipe(hs(),Xy(n))}var Ka=class{segmentGroup;constructor(e){this.segmentGroup=e||null}},Qa=class extends Error{urlTree;constructor(e){super(),this.urlTree=e}};function ts(i){return cr(new Ka(i))}function UH(i){return cr(new X(4e3,!1))}function $H(i){return cr(qy(!1,p0.GuardRejected))}var hf=class{urlSerializer;urlTree;constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return ae(n);if(r.numberOfChildren>1||!r.children[me])return UH(`${e.redirectTo}`);r=r.children[me]}}applyRedirectCommands(e,t,n,r,s){if(typeof t!="string"){let o=t,{queryParams:l,fragment:c,routeConfig:h,url:d,outlet:u,params:p,data:f,title:g}=r,y=a0(s,()=>o({params:p,data:f,queryParams:l,fragment:c,routeConfig:h,url:d,outlet:u,title:g}));if(y instanceof T1)throw new Qa(y);t=y}let a=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,n);if(t[0]==="/")throw new Qa(a);return a}applyRedirectCreateUrlTree(e,t,n,r){let s=this.createSegmentGroup(e,t.root,n,r);return new T1(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let n={};return Object.entries(e).forEach(([r,s])=>{if(typeof s=="string"&&s[0]===":"){let o=s.substring(1);n[r]=t[o]}else n[r]=s}),n}createSegmentGroup(e,t,n,r){let s=this.createSegments(e,t.segments,n,r),a={};return Object.entries(t.children).forEach(([o,l])=>{a[o]=this.createSegmentGroup(e,l,n,r)}),new Ze(s,a)}createSegments(e,t,n,r){return t.map(s=>s.path[0]===":"?this.findPosParam(e,s,r):this.findOrReturn(s,n))}findPosParam(e,t,n){let r=n[t.path.substring(1)];if(!r)throw new X(4001,!1);return r}findOrReturn(e,t){let n=0;for(let r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}},df={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function qH(i,e,t,n,r){let s=Yy(i,e,t);return s.matched?(n=gH(e,n),jH(n,e,t,r).pipe(ue(a=>a===!0?s:Z({},df)))):ae(s)}function Yy(i,e,t){if(e.path==="**")return GH(t);if(e.path==="")return e.pathMatch==="full"&&(i.hasChildren()||t.length>0)?Z({},df):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||_y)(t,i,e);if(!r)return Z({},df);let s={};Object.entries(r.posParams??{}).forEach(([o,l])=>{s[o]=l.path});let a=r.consumed.length>0?Z(Z({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:a,positionalParamSegments:r.posParams??{}}}function GH(i){return{matched:!0,parameters:i.length>0?Dy(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function xy(i,e,t,n){return t.length>0&&YH(i,t,n)?{segmentGroup:new Ze(e,XH(n,new Ze(t,i.children))),slicedSegments:[]}:t.length===0&&KH(i,t,n)?{segmentGroup:new Ze(i.segments,WH(i,t,n,i.children)),slicedSegments:t}:{segmentGroup:new Ze(i.segments,i.children),slicedSegments:t}}function WH(i,e,t,n){let r={};for(let s of t)if(Q2(i,e,s)&&!n[r1(s)]){let a=new Ze([],{});r[r1(s)]=a}return Z(Z({},n),r)}function XH(i,e){let t={};t[me]=e;for(let n of i)if(n.path===""&&r1(n)!==me){let r=new Ze([],{});t[r1(n)]=r}return t}function YH(i,e,t){return t.some(n=>Q2(i,e,n)&&r1(n)!==me)}function KH(i,e,t){return t.some(n=>Q2(i,e,n))}function Q2(i,e,t){return(i.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function QH(i,e,t){return e.length===0&&!i.children[t]}var uf=class{};function JH(i,e,t,n,r,s,a="emptyOnly"){return new ff(i,e,t,n,r,a,s).recognize()}var eF=31,ff=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(e,t,n,r,s,a,o){this.injector=e,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=a,this.urlSerializer=o,this.applyRedirects=new hf(this.urlSerializer,this.urlTree)}noMatchError(e){return new X(4002,`'${e.segmentGroup}'`)}recognize(){let e=xy(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(ue(({children:t,rootSnapshot:n})=>{let r=new C0(n,t),s=new Xa("",r),a=Fy(n,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(a),{state:s,tree:a}}))}match(e){let t=new Hn([],Object.freeze({}),Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),me,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,me,t).pipe(ue(n=>({children:n,rootSnapshot:t})),zi(n=>{if(n instanceof Qa)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Ka?this.noMatchError(n):n}))}processSegmentGroup(e,t,n,r,s){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,t,n,s):this.processSegment(e,t,n,n.segments,r,!0,s).pipe(ue(a=>a instanceof C0?[a]:[]))}processChildren(e,t,n,r){let s=[];for(let a of Object.keys(n.children))a==="primary"?s.unshift(a):s.push(a);return je(s).pipe(f1(a=>{let o=n.children[a],l=vH(t,a);return this.processSegmentGroup(e,l,o,a,r)}),tu((a,o)=>(a.push(...o),a)),Pi(null),Qd(),mt(a=>{if(a===null)return ts(n);let o=Ky(a);return tF(o),ae(o)}))}processSegment(e,t,n,r,s,a,o){return je(t).pipe(f1(l=>this.processSegmentAgainstRoute(l._injector??e,t,l,n,r,s,a,o).pipe(zi(c=>{if(c instanceof Ka)return ae(null);throw c}))),W1(l=>!!l),zi(l=>{if(Wy(l))return QH(n,r,s)?ae(new uf):ts(n);throw l}))}processSegmentAgainstRoute(e,t,n,r,s,a,o,l){return r1(n)!==a&&(a===me||!Q2(r,s,n))?ts(r):n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,s,a,l):this.allowRedirects&&o?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,n,s,a,l):ts(r)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,s,a,o){let{matched:l,parameters:c,consumedSegments:h,positionalParamSegments:d,remainingSegments:u}=Yy(t,r,s);if(!l)return ts(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eF&&(this.allowRedirects=!1));let p=new Hn(s,c,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,My(r),r1(r),r.component??r._loadedComponent??null,r,Ay(r)),f=W2(p,o,this.paramsInheritanceStrategy);p.params=Object.freeze(f.params),p.data=Object.freeze(f.data);let g=this.applyRedirects.applyRedirectCommands(h,r.redirectTo,d,p,e);return this.applyRedirects.lineralizeSegments(r,g).pipe(mt(y=>this.processSegment(e,n,t,y.concat(u),a,!1,o)))}matchSegmentAgainstRoute(e,t,n,r,s,a){let o=qH(t,n,r,e,this.urlSerializer);return n.path==="**"&&(t.children={}),o.pipe(Wt(l=>l.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(Wt(({routes:c})=>{let h=n._loadedInjector??e,{parameters:d,consumedSegments:u,remainingSegments:p}=l,f=new Hn(u,d,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,My(n),r1(n),n.component??n._loadedComponent??null,n,Ay(n)),g=W2(f,a,this.paramsInheritanceStrategy);f.params=Object.freeze(g.params),f.data=Object.freeze(g.data);let{segmentGroup:y,slicedSegments:x}=xy(t,u,p,c);if(x.length===0&&y.hasChildren())return this.processChildren(h,c,y,f).pipe(ue(b=>new C0(f,b)));if(c.length===0&&x.length===0)return ae(new C0(f,[]));let _=r1(n)===s;return this.processSegment(h,c,y,x,_?me:s,!0,f).pipe(ue(b=>new C0(f,b instanceof C0?[b]:[])))}))):ts(t)))}getChildConfig(e,t,n){return t.children?ae({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?ae({routes:t._loadedRoutes,injector:t._loadedInjector}):ZH(e,t,n,this.urlSerializer).pipe(mt(r=>r?this.configLoader.loadChildren(e,t).pipe(kt(s=>{t._loadedRoutes=s.routes,t._loadedInjector=s.injector})):$H(t))):ae({routes:[],injector:e})}};function tF(i){i.sort((e,t)=>e.value.outlet===me?-1:t.value.outlet===me?1:e.value.outlet.localeCompare(t.value.outlet))}function iF(i){let e=i.value.routeConfig;return e&&e.path===""}function Ky(i){let e=[],t=new Set;for(let n of i){if(!iF(n)){e.push(n);continue}let r=e.find(s=>n.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...n.children),t.add(r)):e.push(n)}for(let n of t){let r=Ky(n.children);e.push(new C0(n.value,r))}return e.filter(n=>!t.has(n))}function My(i){return i.data||{}}function Ay(i){return i.resolve||{}}function nF(i,e,t,n,r,s){return mt(a=>JH(i,e,t,n,a.extractedUrl,r,s).pipe(ue(({state:o,tree:l})=>se(Z({},a),{targetSnapshot:o,urlAfterRedirects:l}))))}function rF(i,e){return mt(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return ae(t);let s=new Set(r.map(l=>l.route)),a=new Set;for(let l of s)if(!a.has(l))for(let c of Qy(l))a.add(c);let o=0;return je(a).pipe(f1(l=>s.has(l)?sF(l,n,i,e):(l.data=W2(l,l.parent,i).resolve,ae(void 0))),kt(()=>o++),fr(1),mt(l=>o===a.size?ae(t):q0))})}function Qy(i){let e=i.children.map(t=>Qy(t)).flat();return[i,...e]}function sF(i,e,t,n){let r=i.routeConfig,s=i._resolve;return r?.title!==void 0&&!jy(r)&&(s[Ja]=r.title),aF(s,i,e,n).pipe(ue(a=>(i._resolvedData=a,i.data=W2(i,i.parent,t).resolve,null)))}function aF(i,e,t,n){let r=ef(i);if(r.length===0)return ae({});let s={};return je(r).pipe(mt(a=>oF(i[a],e,t,n).pipe(W1(),kt(o=>{if(o instanceof cs)throw X2(new Ui,o);s[a]=o}))),fr(1),ue(()=>s),zi(a=>Wy(a)?q0:cr(a)))}function oF(i,e,t,n){let r=eo(e)??n,s=ds(i,r),a=s.resolve?s.resolve(e,t):a0(r,()=>s(e,t));return Gi(a)}function Q4(i){return Wt(e=>{let t=i(e);return t?je(t).pipe(ue(()=>e)):ae(e)})}var wf=(()=>{class i{buildTitle(t){let n,r=t.root;for(;r!==void 0;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(s=>s.outlet===me);return n}getResolvedTitleForRoute(t){return t.data[Ja]}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(Jy),providedIn:"root"})}return i})(),Jy=(()=>{class i extends wf{title;constructor(t){super(),this.title=t}updateTitle(t){let n=this.buildTitle(t);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||i)(ee(Ow))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),In=new J("",{providedIn:"root",factory:()=>({})}),us=new J(""),J2=(()=>{class i{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=j(Rm);loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return ae(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);let n=Gi(t.loadComponent()).pipe(ue(tC),kt(s=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=s}),ki(()=>{this.componentLoaders.delete(t)})),r=new nn(n,()=>new it).pipe(sr());return this.componentLoaders.set(t,r),r}loadChildren(t,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ae({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let s=eC(n,this.compiler,t,this.onLoadEndListener).pipe(ki(()=>{this.childrenLoaders.delete(n)})),a=new nn(s,()=>new it).pipe(sr());return this.childrenLoaders.set(n,a),a}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function eC(i,e,t,n){return Gi(i.loadChildren()).pipe(ue(tC),mt(r=>r instanceof C6||Array.isArray(r)?ae(r):je(e.compileModuleAsync(r))),ue(r=>{n&&n(i);let s,a,o=!1;return Array.isArray(r)?(a=r,o=!0):(s=r.create(t).injector,a=s.get(us,[],{optional:!0,self:!0}).flat()),{routes:a.map(mf),injector:s}}))}function lF(i){return i&&typeof i=="object"&&"default"in i}function tC(i){return lF(i)?i.default:i}var ec=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(cF),providedIn:"root"})}return i})(),cF=(()=>{class i{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,n){return t}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bf=new J(""),yf=new J("");function iC(i,e,t){let n=i.get(yf),r=i.get($e);return i.get(Ne).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(c=>setTimeout(c));let s,a=new Promise(c=>{s=c}),o=r.startViewTransition(()=>(s(),hF(i))),{onViewTransitionCreated:l}=n;return l&&a0(i,()=>l({transition:o,from:e,to:t})),a})}function hF(i){return new Promise(e=>{i6({read:()=>setTimeout(e)},{injector:i})})}var Cf=new J(""),tc=(()=>{class i{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new it;transitionAbortSubject=new it;configLoader=j(J2);environmentInjector=j(Bt);destroyRef=j(Ri);urlSerializer=j(Rn);rootContexts=j(On);location=j(Ii);inputBindingEnabled=j(io,{optional:!0})!==null;titleStrategy=j(wf);options=j(In,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=j(ec);createViewTransition=j(bf,{optional:!0});navigationErrorHandler=j(Cf,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>ae(void 0);rootComponentType=null;destroyed=!1;constructor(){let t=r=>this.events.next(new B2(r)),n=r=>this.events.next(new N2(r));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=t,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(t){let n=++this.navigationId;this.transitions?.next(se(Z({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:n}))}setupNavigations(t){return this.transitions=new Ct(null),this.transitions.pipe(xt(n=>n!==null),Wt(n=>{let r=!1,s=!1;return ae(n).pipe(Wt(a=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,"",p0.SupersededByNewNavigation),q0;this.currentTransition=n,this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?se(Z({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let o=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),l=a.extras.onSameUrlNavigation??t.onSameUrlNavigation;if(!o&&l!=="reload"){let c="";return this.events.next(new L1(a.id,this.urlSerializer.serialize(a.rawUrl),c,ss.IgnoredSameUrlNavigation)),a.resolve(!1),q0}if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return ae(a).pipe(Wt(c=>(this.events.next(new qi(c.id,this.urlSerializer.serialize(c.extractedUrl),c.source,c.restoredState)),c.id!==this.navigationId?q0:Promise.resolve(c))),nF(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),kt(c=>{n.targetSnapshot=c.targetSnapshot,n.urlAfterRedirects=c.urlAfterRedirects,this.currentNavigation=se(Z({},this.currentNavigation),{finalUrl:c.urlAfterRedirects});let h=new qa(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)}));if(o&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:c,extractedUrl:h,source:d,restoredState:u,extras:p}=a,f=new qi(c,this.urlSerializer.serialize(h),d,u);this.events.next(f);let g=Ny(this.rootComponentType).snapshot;return this.currentTransition=n=se(Z({},a),{targetSnapshot:g,urlAfterRedirects:h,extras:se(Z({},p),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=h,ae(n)}else{let c="";return this.events.next(new L1(a.id,this.urlSerializer.serialize(a.extractedUrl),c,ss.IgnoredByUrlHandlingStrategy)),a.resolve(!1),q0}}),kt(a=>{let o=new F2(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(o)}),ue(a=>(this.currentTransition=n=se(Z({},a),{guards:MH(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),n)),kH(this.environmentInjector,a=>this.events.next(a)),kt(a=>{if(n.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw X2(this.urlSerializer,a.guardsResult);let o=new R2(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(o)}),xt(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",p0.GuardRejected),!1)),Q4(a=>{if(a.guards.canActivateChecks.length!==0)return ae(a).pipe(kt(o=>{let l=new O2(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(l)}),Wt(o=>{let l=!1;return ae(o).pipe(rF(this.paramsInheritanceStrategy,this.environmentInjector),kt({next:()=>l=!0,complete:()=>{l||this.cancelNavigationTransition(o,"",p0.NoDataFromResolver)}}))}),kt(o=>{let l=new I2(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(l)}))}),Q4(a=>{let o=l=>{let c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(kt(h=>{l.component=h}),ue(()=>{})));for(let h of l.children)c.push(...o(h));return c};return Hs(o(a.targetSnapshot.root)).pipe(Pi(null),G1(1))}),Q4(()=>this.afterPreactivation()),Wt(()=>{let{currentSnapshot:a,targetSnapshot:o}=n,l=this.createViewTransition?.(this.environmentInjector,a.root,o.root);return l?je(l).pipe(ue(()=>n)):ae(n)}),ue(a=>{let o=wH(t.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=n=se(Z({},a),{targetRouterState:o}),this.currentNavigation.targetRouterState=o,n}),kt(()=>{this.events.next(new Ga)}),xH(this.rootContexts,t.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),G1(1),kt({next:a=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new N0(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{r=!0}}),Ge(this.transitionAbortSubject.pipe(kt(a=>{throw a}))),ki(()=>{!r&&!s&&this.cancelNavigationTransition(n,"",p0.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation=null,this.currentTransition=null)}),zi(a=>{if(this.destroyed)return n.resolve(!1),q0;if(s=!0,Gy(a))this.events.next(new V1(n.id,this.urlSerializer.serialize(n.extractedUrl),a.message,a.cancellationCode)),CH(a)?this.events.next(new ls(a.url,a.navigationBehaviorOptions)):n.resolve(!1);else{let o=new as(n.id,this.urlSerializer.serialize(n.extractedUrl),a,n.targetSnapshot??void 0);try{let l=a0(this.environmentInjector,()=>this.navigationErrorHandler?.(o));if(l instanceof cs){let{message:c,cancellationCode:h}=X2(this.urlSerializer,l);this.events.next(new V1(n.id,this.urlSerializer.serialize(n.extractedUrl),c,h)),this.events.next(new ls(l.redirectTo,l.navigationBehaviorOptions))}else throw this.events.next(o),a}catch(l){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(l)}}return q0}))}))}cancelNavigationTransition(t,n,r){let s=new V1(t.id,this.urlSerializer.serialize(t.extractedUrl),n,r);this.events.next(s),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let t=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return t.toString()!==n?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function dF(i){return i!==P2}var nC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(uF),providedIn:"root"})}return i})(),K2=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},uF=(()=>{class i extends K2{static \u0275fac=(()=>{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),rC=(()=>{class i{urlSerializer=j(Rn);options=j(In,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=j(Ii);urlHandlingStrategy=j(ec);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new T1;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:t,initialUrl:n,targetBrowserUrl:r}){let s=t!==void 0?this.urlHandlingStrategy.merge(t,n):n,a=r??s;return a instanceof T1?this.urlSerializer.serialize(a):a}commitTransition({targetRouterState:t,finalUrl:n,initialUrl:r}){n&&t?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,r),this.routerState=t):this.rawUrlTree=r}routerState=Ny(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:t}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t??this.rawUrlTree)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(fF),providedIn:"root"})}return i})(),fF=(()=>{class i extends rC{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(t){return this.location.subscribe(n=>{n.type==="popstate"&&setTimeout(()=>{t(n.url,n.state,"popstate")})})}handleRouterEvent(t,n){t instanceof qi?this.updateStateMemento():t instanceof L1?this.commitTransition(n):t instanceof qa?this.urlUpdateStrategy==="eager"&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):t instanceof Ga?(this.commitTransition(n),this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):t instanceof V1&&(t.code===p0.GuardRejected||t.code===p0.NoDataFromResolver)?this.restoreHistory(n):t instanceof as?this.restoreHistory(n,!0):t instanceof N0&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,{extras:n,id:r}){let{replaceUrl:s,state:a}=n;if(this.location.isCurrentPathEqualTo(t)||s){let o=this.browserPageId,l=Z(Z({},a),this.generateNgRouterState(r,o));this.location.replaceState(t,"",l)}else{let o=Z(Z({},a),this.generateNgRouterState(r,this.browserPageId+1));this.location.go(t,"",o)}}restoreHistory(t,n=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,s=this.currentPageId-r;s!==0?this.location.historyGo(s):this.getCurrentUrlTree()===t.finalUrl&&s===0&&(this.resetInternalState(t),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetInternalState(t),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,n){return this.canceledNavigationResolution==="computed"?{navigationId:t,\u0275routerPageId:n}:{navigationId:t}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ic(i,e){i.events.pipe(xt(t=>t instanceof N0||t instanceof V1||t instanceof as||t instanceof L1),ue(t=>t instanceof N0||t instanceof L1?0:(t instanceof V1?t.code===p0.Redirect||t.code===p0.SupersededByNewNavigation:!1)?2:1),xt(t=>t!==2),G1(1)).subscribe(()=>{e()})}var pF={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},gF={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},M0=(()=>{class i{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=j(M6);stateManager=j(rC);options=j(In,{optional:!0})||{};pendingTasks=j(ni);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=j(tc);urlSerializer=j(Rn);location=j(Ii);urlHandlingStrategy=j(ec);_events=new it;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=j(nC);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=j(us,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!j(io,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}eventsSubscription=new He;subscribeToNavigationEvents(){let t=this.navigationTransitions.events.subscribe(n=>{try{let r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(r!==null&&s!==null){if(this.stateManager.handleRouterEvent(n,s),n instanceof V1&&n.code!==p0.Redirect&&n.code!==p0.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof N0)this.navigated=!0;else if(n instanceof ls){let a=n.navigationBehaviorOptions,o=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l=Z({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||dF(r.source)},a);this.scheduleNavigation(o,P2,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}mF(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),P2,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,n,r)=>{this.navigateToSyncWithBrowser(t,r,n)})}navigateToSyncWithBrowser(t,n,r){let s={replaceUrl:!0},a=r?.navigationId?r:null;if(r){let l=Z({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(s.state=l)}let o=this.parseUrl(t);this.scheduleNavigation(o,n,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(mf),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(t,n={}){let{relativeTo:r,queryParams:s,fragment:a,queryParamsHandling:o,preserveFragment:l}=n,c=l?this.currentUrlTree.fragment:a,h=null;switch(o??this.options.defaultQueryParamsHandling){case"merge":h=Z(Z({},this.currentUrlTree.queryParams),s);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=s||null}h!==null&&(h=this.removeEmptyProps(h));let d;try{let u=r?r.snapshot:this.routerState.snapshot.root;d=Ry(u)}catch{(typeof t[0]!="string"||t[0][0]!=="/")&&(t=[]),d=this.currentUrlTree.root}return Oy(d,t,h,c??null)}navigateByUrl(t,n={skipLocationChange:!1}){let r=$i(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,P2,null,n)}navigate(t,n={skipLocationChange:!1}){return vF(t),this.navigateByUrl(this.createUrlTree(t,n),n)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){try{return this.urlSerializer.parse(t)}catch{return this.urlSerializer.parse("/")}}isActive(t,n){let r;if(n===!0?r=Z({},pF):n===!1?r=Z({},gF):r=n,$i(t))return wy(this.currentUrlTree,t,r);let s=this.parseUrl(t);return wy(this.currentUrlTree,s,r)}removeEmptyProps(t){return Object.entries(t).reduce((n,[r,s])=>(s!=null&&(n[r]=s),n),{})}scheduleNavigation(t,n,r,s,a){if(this.disposed)return Promise.resolve(!1);let o,l,c;a?(o=a.resolve,l=a.reject,c=a.promise):c=new Promise((d,u)=>{o=d,l=u});let h=this.pendingTasks.add();return ic(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:s,resolve:o,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function vF(i){for(let e=0;e{class i{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new it;constructor(t,n,r,s,a,o){this.router=t,this.route=n,this.tabIndexAttribute=r,this.renderer=s,this.el=a,this.locationStrategy=o;let l=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=l==="a"||l==="area",this.isAnchorElement?this.subscription=t.events.subscribe(c=>{c instanceof N0&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(t){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",t)}ngOnChanges(t){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(t){t==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):($i(t)?this.routerLinkInput=t:this.routerLinkInput=Array.isArray(t)?t:[t],this.setTabIndexIfNotOnNativeEl("0"))}onClick(t,n,r,s,a){let o=this.urlTree;if(o===null||this.isAnchorElement&&(t!==0||n||r||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let l={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(o,l),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let t=this.urlTree;this.href=t!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(t)):null;let n=this.href===null?null:T9(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(t,n){let r=this.renderer,s=this.el.nativeElement;n!==null?r.setAttribute(s,t,n):r.removeAttribute(s,t)}get urlTree(){return this.routerLinkInput===null?null:$i(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(n){return new(n||i)(Y(M0),Y(s1),W3("tabindex"),Y(c0),Y(Qe),Y(e1))};static \u0275dir=Je({type:i,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(n,r){n&1&&Me("click",function(a){return r.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),n&2&&Ft("target",r.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Nr],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Nr],replaceUrl:[2,"replaceUrl","replaceUrl",Nr],routerLink:"routerLink"},features:[Ht]})}return i})();var ro=class{};var sC=(()=>{class i{router;injector;preloadingStrategy;loader;subscription;constructor(t,n,r,s){this.router=t,this.injector=n,this.preloadingStrategy=r,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(xt(t=>t instanceof N0),f1(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,n){let r=[];for(let s of n){s.providers&&!s._injector&&(s._injector=ia(s.providers,t,`Route: ${s.path}`));let a=s._injector??t,o=s._loadedInjector??a;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(a,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(o,s.children??s._loadedRoutes))}return je(r).pipe(dr())}preloadConfig(t,n){return this.preloadingStrategy.preload(n,()=>{let r;n.loadChildren&&n.canLoad===void 0?r=this.loader.loadChildren(t,n):r=ae(null);let s=r.pipe(mt(a=>a===null?ae(void 0):(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,this.processRoutes(a.injector??t,a.routes))));if(n.loadComponent&&!n._loadedComponent){let a=this.loader.loadComponent(n);return je([s,a]).pipe(dr())}else return s})}static \u0275fac=function(n){return new(n||i)(ee(M0),ee(Bt),ee(ro),ee(J2))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),aC=new J(""),wF=(()=>{class i{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource="imperative";restoredId=0;store={};constructor(t,n,r,s,a={}){this.urlSerializer=t,this.transitions=n,this.viewportScroller=r,this.zone=s,this.options=a,a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof qi?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof N0?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof L1&&t.code===ss.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof os&&(t.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(t.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,n){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new os(t,this.lastSource==="popstate"?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(n){om()};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();function bF(i){return i.routerState.root}function so(i,e){return{\u0275kind:i,\u0275providers:e}}function yF(){let i=j(Yt);return e=>{let t=i.get(ei);if(e!==t.components[0])return;let n=i.get(M0),r=i.get(oC);i.get(Mf)===1&&n.initialNavigation(),i.get(hC,null,we.Optional)?.setUpPreloading(),i.get(aC,null,we.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var oC=new J("",{factory:()=>new it}),Mf=new J("",{providedIn:"root",factory:()=>1});function lC(){let i=[{provide:Mf,useValue:0},S6(()=>{let e=j(Yt);return e.get(P6,Promise.resolve()).then(()=>new Promise(n=>{let r=e.get(M0),s=e.get(oC);ic(r,()=>{n(!0)}),e.get(tc).afterPreactivation=()=>(n(!0),s.closed?ae(void 0):s),r.initialNavigation()}))})];return so(2,i)}function cC(){let i=[S6(()=>{j(M0).setUpLocationChangeListener()}),{provide:Mf,useValue:2}];return so(3,i)}var hC=new J("");function dC(i){return so(0,[{provide:hC,useExisting:sC},{provide:ro,useExisting:i}])}function uC(){return so(8,[gf,{provide:io,useExisting:gf}])}function fC(i){Rr("NgRouterViewTransitions");let e=[{provide:bf,useValue:iC},{provide:yf,useValue:Z({skipNextTransition:!!i?.skipInitialTransition},i)}];return so(9,e)}var pC=[Ii,{provide:Rn,useClass:Ui},M0,On,{provide:s1,useFactory:bF,deps:[M0]},J2,[]],fs=(()=>{class i{constructor(){}static forRoot(t,n){return{ngModule:i,providers:[pC,[],{provide:us,multi:!0,useValue:t},[],n?.errorHandler?{provide:Cf,useValue:n.errorHandler}:[],{provide:In,useValue:n||{}},n?.useHash?xF():MF(),CF(),n?.preloadingStrategy?dC(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?AF(n):[],n?.bindToComponentInputs?uC().\u0275providers:[],n?.enableViewTransitions?fC().\u0275providers:[],_F()]}}static forChild(t){return{ngModule:i,providers:[{provide:us,multi:!0,useValue:t}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({})}return i})();function CF(){return{provide:aC,useFactory:()=>{let i=j(gw),e=j(Ne),t=j(In),n=j(tc),r=j(Rn);return t.scrollOffset&&i.setOffset(t.scrollOffset),new wF(r,n,i,e,t)}}}function xF(){return{provide:e1,useClass:O6}}function MF(){return{provide:e1,useClass:yl}}function AF(i){return[i.initialNavigation==="disabled"?cC().\u0275providers:[],i.initialNavigation==="enabledBlocking"?lC().\u0275providers:[]]}var xf=new J("");function _F(){return[{provide:xf,useFactory:yF},{provide:D6,multi:!0,useExisting:xf}]}var ao={production:!0,url:"https://function-portaldiplomas-prd.azurewebsites.net/api",apptoken:"jpKESs9lnZEhCkS2aInR"};var ps=(()=>{class i{constructor(t){this.http=t,this.baseURL=ao.url,this.headers=new _1({apikey:ao.apptoken})}getInstituicao(t){return this.http.get(`${this.baseURL}/instituicao-ensino`,{headers:this.headers,params:{codGrupoMarca:t}})}getResultado(t,n,r){return this.http.post(`${this.baseURL}/livro-registro-diploma`,t,{headers:this.headers,params:{page_size:n,page_number:r}})}getDiplomaDigital(t){return this.http.get(`${this.baseURL}/diploma-digital`,{headers:this.headers,params:{codValidacaoDiploma:t}})}static{this.\u0275fac=function(n){return new(n||i)(ee(Bl))}}static{this.\u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ef=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:()=>j(SF),providedIn:"root"})}return i})(),_f=class{},SF=(()=>{class i extends Ef{animationModuleType=j(Js,{optional:!0});_nextAnimationId=0;_renderer;constructor(t,n){super();let r={id:"0",encapsulation:P0.None,styles:[],data:{animation:[]}};if(this._renderer=t.createRenderer(n.body,r),this.animationModuleType===null&&!EF(this._renderer))throw new X(3600,!1)}build(t){let n=this._nextAnimationId;this._nextAnimationId++;let r=Array.isArray(t)?Zl(t):t;return gC(this._renderer,null,n,"register",[r]),new Sf(n,this._renderer)}static \u0275fac=function(n){return new(n||i)(ee(w1),ee($e))};static \u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Sf=class extends _f{_id;_renderer;constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new Df(this._id,e,t||{},this._renderer)}},Df=class{id;element;_renderer;parentPlayer=null;_started=!1;constructor(e,t,n,r){this.id=e,this.element=t,this._renderer=r,this._command("create",n)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){gC(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(){return DF(this._renderer)?.engine?.players[this.id]?.getPosition()??0}totalTime=0};function gC(i,e,t,n,r){i.setProperty(e,`@@${t}:${n}`,r)}function DF(i){let e=i.\u0275type;return e===0?i:e===1?i.animationRenderer:null}function EF(i){let e=i.\u0275type;return e===0||e===1}var TF=["overlay"],LF=["*"];function zF(i,e){i&1&&le(0,"div")}function PF(i,e){if(i&1&&(D(0,"div"),ce(1,zF,1,0,"div",6),S()),i&2){let t=ie(2);Cn(t.spinner.class),ra("color",t.spinner.color),k(),q("ngForOf",t.spinner.divArray)}}function kF(i,e){if(i&1&&(le(0,"div",7),dt(1,"safeHtml")),i&2){let t=ie(2);q("innerHTML",oa(1,1,t.template),V9)}}function HF(i,e){if(i&1&&(D(0,"div",2,0),ce(2,PF,2,5,"div",3)(3,kF,2,3,"div",4),D(4,"div",5),x1(5),S()()),i&2){let t=ie();ra("background-color",t.spinner.bdColor)("z-index",t.spinner.zIndex)("position",t.spinner.fullScreen?"fixed":"absolute"),q("@.disabled",t.disableAnimation)("@fadeIn","in"),k(2),q("ngIf",!t.template),k(),q("ngIf",t.template),k(),ra("z-index",t.spinner.zIndex)}}var FF={"ball-8bits":16,"ball-atom":4,"ball-beat":3,"ball-circus":5,"ball-climbing-dot":4,"ball-clip-rotate":1,"ball-clip-rotate-multiple":2,"ball-clip-rotate-pulse":2,"ball-elastic-dots":5,"ball-fall":3,"ball-fussion":4,"ball-grid-beat":9,"ball-grid-pulse":9,"ball-newton-cradle":4,"ball-pulse":3,"ball-pulse-rise":5,"ball-pulse-sync":3,"ball-rotate":1,"ball-running-dots":5,"ball-scale":1,"ball-scale-multiple":3,"ball-scale-pulse":2,"ball-scale-ripple":1,"ball-scale-ripple-multiple":3,"ball-spin":8,"ball-spin-clockwise":8,"ball-spin-clockwise-fade":8,"ball-spin-clockwise-fade-rotating":8,"ball-spin-fade":8,"ball-spin-fade-rotating":8,"ball-spin-rotate":2,"ball-square-clockwise-spin":8,"ball-square-spin":8,"ball-triangle-path":3,"ball-zig-zag":2,"ball-zig-zag-deflect":2,cog:1,"cube-transition":2,fire:3,"line-scale":5,"line-scale-party":5,"line-scale-pulse-out":5,"line-scale-pulse-out-rapid":5,"line-spin-clockwise-fade":8,"line-spin-clockwise-fade-rotating":8,"line-spin-fade":8,"line-spin-fade-rotating":8,pacman:6,"square-jelly-box":2,"square-loader":1,"square-spin":1,timer:1,"triangle-skew-spin":1},Vf={BD_COLOR:"rgba(51,51,51,0.8)",SPINNER_COLOR:"#fff",Z_INDEX:99999},Tf="primary",Bn=class i{constructor(e){Object.assign(this,e)}static create(e){return!e?.template&&!e?.type&&console.warn(`[ngx-spinner]: Property "type" is missed. Please, provide animation type to component and ensure css is added to angular.json file`),new i(e)}},oo=(()=>{class i{constructor(){this.spinnerObservable=new Ct(null)}getSpinner(t){return this.spinnerObservable.asObservable().pipe(xt(n=>n&&n.name===t))}show(t=Tf,n){return new Promise((r,s)=>{setTimeout(()=>{n&&Object.keys(n).length?(n.name=t,this.spinnerObservable.next(new Bn(se(Z({},n),{show:!0}))),r(!0)):(this.spinnerObservable.next(new Bn({name:t,show:!0})),r(!0))},10)})}hide(t=Tf,n=10){return new Promise((r,s)=>{setTimeout(()=>{this.spinnerObservable.next(new Bn({name:t,show:!1})),r(!0)},n)})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),vC=new J("NGX_SPINNER_CONFIG"),RF=(()=>{class i{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static{this.\u0275fac=function(n){return new(n||i)(Y(Sa,16))}}static{this.\u0275pipe=Oi({name:"safeHtml",type:i,pure:!0})}}return i})(),mC=(()=>{class i{constructor(t,n,r,s){this.spinnerService=t,this.changeDetector=n,this.elementRef=r,this.globalConfig=s,this.disableAnimation=!1,this.spinner=new Bn,this.ngUnsubscribe=new it,this.setDefaultOptions=()=>{let{type:a}=this.globalConfig??{};this.spinner=Bn.create({name:this.name,bdColor:this.bdColor,size:this.size,color:this.color,type:this.type??a,fullScreen:this.fullScreen,divArray:this.divArray,divCount:this.divCount,show:this.show,zIndex:this.zIndex,template:this.template,showSpinner:this.showSpinner})},this.bdColor=Vf.BD_COLOR,this.zIndex=Vf.Z_INDEX,this.color=Vf.SPINNER_COLOR,this.size="large",this.fullScreen=!0,this.name=Tf,this.template=null,this.showSpinner=!1,this.divArray=[],this.divCount=0,this.show=!1}initObservable(){this.spinnerService.getSpinner(this.name).pipe(Ge(this.ngUnsubscribe)).subscribe(t=>{this.setDefaultOptions(),Object.assign(this.spinner,t),t.show&&this.onInputChange(),this.changeDetector.detectChanges()})}ngOnInit(){this.setDefaultOptions(),this.initObservable()}isSpinnerZone(t){return t===this.elementRef.nativeElement.parentElement?!0:t.parentNode&&this.isSpinnerZone(t.parentNode)}ngOnChanges(t){for(let n in t)if(n){let r=t[n];if(r.isFirstChange())return;typeof r.currentValue<"u"&&r.currentValue!==r.previousValue&&r.currentValue!==""&&(this.spinner[n]=r.currentValue,n==="showSpinner"&&(r.currentValue?this.spinnerService.show(this.spinner.name,this.spinner):this.spinnerService.hide(this.spinner.name)),n==="name"&&this.initObservable())}}getClass(t,n){this.spinner.divCount=FF[t],this.spinner.divArray=Array(this.spinner.divCount).fill(0).map((s,a)=>a);let r="";switch(n.toLowerCase()){case"small":r="la-sm";break;case"medium":r="la-2x";break;case"large":r="la-3x";break;default:break}return"la-"+t+" "+r}onInputChange(){this.spinner.class=this.getClass(this.spinner.type,this.spinner.size)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}static{this.\u0275fac=function(n){return new(n||i)(Y(oo),Y(Qt),Y(Qe),Y(vC,8))}}static{this.\u0275cmp=Ue({type:i,selectors:[["ngx-spinner"]],viewQuery:function(n,r){if(n&1&&vl(TF,5),n&2){let s;sa(s=aa())&&(r.spinnerDOM=s.first)}},inputs:{bdColor:"bdColor",size:"size",color:"color",type:"type",fullScreen:"fullScreen",name:"name",zIndex:"zIndex",template:"template",showSpinner:"showSpinner",disableAnimation:"disableAnimation"},features:[Ht],ngContentSelectors:LF,decls:1,vars:1,consts:[["overlay",""],["class","ngx-spinner-overlay",3,"background-color","z-index","position",4,"ngIf"],[1,"ngx-spinner-overlay"],[3,"class","color",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"loading-text"],[4,"ngFor","ngForOf"],[3,"innerHTML"]],template:function(n,r){n&1&&(oi(),ce(0,HF,6,12,"div",1)),n&2&&q("ngIf",r.spinner.show)},dependencies:[RF,_t,A1],styles:[".ngx-spinner-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%}.ngx-spinner-overlay[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(.loading-text){top:50%;left:50%;margin:0;position:absolute;transform:translate(-50%,-50%)}.loading-text[_ngcontent-%COMP%]{position:absolute;top:60%;left:50%;transform:translate(-50%,-60%)}"],data:{animation:[i4("fadeIn",[n4("in",y0({opacity:1})),jl(":enter",[y0({opacity:0}),Vn(300)]),jl(":leave",Vn(200,y0({opacity:0})))])]},changeDetection:0})}}return i})(),wC=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[{provide:vC,useValue:t}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i})}static{this.\u0275inj=Oe({})}}return i})();var yC="400ms cubic-bezier(0.4,0.0,0.2,1)",OF=[y0({height:0,visibility:"hidden"}),Vn(yC,y0({height:"*",visibility:"visible"}))],IF=[y0({height:"*",visibility:"visible"}),Vn(yC,y0({height:0,visibility:"hidden"}))],Wi=(()=>{class i{set display(t){if(this._display=t,t==="none"){this.hide();return}this.isAnimated?this.toggle():this.show()}set collapse(t){this.collapseNewValue=t,(!this._player||this._isAnimationDone)&&(this.isExpanded=t,this.toggle())}get collapse(){return this.isExpanded}constructor(t,n,r){this._el=t,this._renderer=n,this.collapsed=new he,this.collapses=new he,this.expanded=new he,this.expands=new he,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(IF),this._factoryExpandAnimation=r.build(OF)}ngAfterViewChecked(){this._stylesLoaded=!0,!(!this._player||!this._isAnimationDone)&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))}toggle(){this.isExpanded?this.hide():this.show()}hide(){this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)(()=>{if(this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated){this.show();return}this.collapsed.emit(this),this._renderer.setStyle(this._el.nativeElement,"display","none")})}show(){this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)(()=>{if(this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated){this.hide();return}this.expanded.emit(this),this._renderer.removeStyle(this._el.nativeElement,"overflow")})}animationRun(t,n){if(!t||!this._stylesLoaded)return s=>s();this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");let r=n===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.reset(),this._player=r.create(this._el.nativeElement),this._player.play(),s=>this._player?.onDone(s)}static{this.\u0275fac=function(n){return new(n||i)(Y(Qe),Y(c0),Y(Ef))}}static{this.\u0275dir=Je({type:i,selectors:[["","collapse",""]],hostVars:9,hostBindings:function(n,r){n&2&&(Ft("aria-hidden",r.isCollapsed),jt("collapse",r.isCollapse)("in",r.isExpanded)("show",r.isExpanded)("collapsing",r.isCollapsing))},inputs:{display:"display",isAnimated:"isAnimated",collapse:"collapse"},outputs:{collapsed:"collapsed",collapses:"collapses",expanded:"expanded",expands:"expands"},exportAs:["bs-collapse"]})}}return i})(),sc=(()=>{class i{static forRoot(){return{ngModule:i,providers:[]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i})}static{this.\u0275inj=Oe({})}}return i})();var BF=["*"],NF=[[["","accordion-heading",""]],"*"],ZF=["[accordion-heading]","*"],jF=i=>({"text-muted":i});function UF(i,e){if(i&1&&(D(0,"button",7),T(1),S()),i&2){let t=ie();q("ngClass",ml(2,jF,t.isDisabled)),k(),Rt(" ",t.heading," ")}}var $F=(()=>{class i{constructor(){this.closeOthers=!1,this.isAnimated=!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Lf=(()=>{class i{constructor(t){this.isAnimated=!1,this.closeOthers=!1,this.groups=[],Object.assign(this,t)}closeOtherPanels(t){this.closeOthers&&this.groups.forEach(n=>{n!==t&&(n.isOpen=!1)})}addGroup(t){t.isAnimated=this.isAnimated,this.groups.push(t)}removeGroup(t){let n=this.groups.indexOf(t);n!==-1&&this.groups.splice(n,1)}static{this.\u0275fac=function(n){return new(n||i)(Y($F))}}static{this.\u0275cmp=Ue({type:i,selectors:[["accordion"]],hostAttrs:["role","tablist",1,"panel-group",2,"display","block"],hostVars:1,hostBindings:function(n,r){n&2&&Ft("aria-multiselectable",r.closeOthers)},inputs:{isAnimated:"isAnimated",closeOthers:"closeOthers"},ngContentSelectors:BF,decls:1,vars:0,template:function(n,r){n&1&&(oi(),x1(0))},encapsulation:2})}}return i})(),zf=(()=>{class i{get isOpen(){return this._isOpen}set isOpen(t){t!==this.isOpen&&(t&&this.accordion.closeOtherPanels(this),this._isOpen=t,Promise.resolve(null).then(()=>{this.isOpenChange.emit(t)}))}constructor(t){this.isAnimated=!1,this.panelClass="panel-default",this.isDisabled=!1,this.isOpenChange=new he,this._isOpen=!1,this.accordion=t}ngOnInit(){this.accordion.addGroup(this)}ngOnDestroy(){this.accordion.removeGroup(this)}toggleOpen(){this.isDisabled||(this.isOpen=!this.isOpen)}static{this.\u0275fac=function(n){return new(n||i)(Y(Lf))}}static{this.\u0275cmp=Ue({type:i,selectors:[["accordion-group"],["accordion-panel"]],hostAttrs:[1,"panel",2,"display","block"],hostVars:2,hostBindings:function(n,r){n&2&&jt("panel-open",r.isOpen)},inputs:{heading:"heading",panelClass:"panelClass",isDisabled:"isDisabled",isOpen:"isOpen"},outputs:{isOpenChange:"isOpenChange"},ngContentSelectors:ZF,decls:9,vars:6,consts:[[1,"panel","card",3,"ngClass"],["role","tab",1,"panel-heading","card-header",3,"click","ngClass"],[1,"panel-title"],["role","button",1,"accordion-toggle"],["class","btn btn-link","type","button",3,"ngClass",4,"ngIf"],["role","tabpanel",1,"panel-collapse","collapse",3,"collapse","isAnimated"],[1,"panel-body","card-block","card-body"],["type","button",1,"btn","btn-link",3,"ngClass"]],template:function(n,r){n&1&&(oi(NF),D(0,"div",0)(1,"div",1),Me("click",function(){return r.toggleOpen()}),D(2,"div",2)(3,"div",3),ce(4,UF,2,4,"button",4),x1(5),S()()(),D(6,"div",5)(7,"div",6),x1(8,1),S()()()),n&2&&(q("ngClass",r.panelClass),k(),q("ngClass",r.isDisabled?"panel-disabled":"panel-enabled"),k(2),Ft("aria-expanded",r.isOpen),k(),q("ngIf",r.heading),k(2),q("collapse",!r.isOpen)("isAnimated",r.isAnimated))},dependencies:[d0,_t,sc,Wi],styles:["[_nghost-%COMP%] .card-header.panel-enabled[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .card-header.panel-disabled[_ngcontent-%COMP%] .btn.btn-link[_ngcontent-%COMP%]{cursor:default;text-decoration:none}"]})}}return i})(),CC=(()=>{class i{static forRoot(){return{ngModule:i,providers:[]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i})}static{this.\u0275inj=Oe({imports:[zf]})}}return i})();var GF=["*"],xC=new J("ngx-bootstrap-icons-module-configuration");function WF(i,e="-"){if(!i)throw Error("missing argument");let t=i.trim();if(!t.includes(e))return t;let n="",r=0;for(r;r0&&!isNaN(+i.charAt(r-1))){n+=s.toUpperCase();continue}r>0&&(n+=s)}return n.trim()}var oc=class{constructor(e){this._icons=e}},XF=16,YF={iconNotFound:"Icon not found"},A0=function(i){return i.Width="width",i.Height="height",i}(A0||{}),lc=(()=>{class i{constructor(t,n,r,s){this._elem=t,this._changeDetector=n,this._icons=r,this._config=s,this.resetDefaultDimensions=!1,this._setSize=(a,o=XF)=>`${a}="${o}"`,this._setIconMessage=(a,o)=>`${a}: ${o} `,this._logMessage=a=>console.warn(a)}ngOnChanges(t){let r=Object.assign({},...this._icons)[WF(t.name.currentValue)]||"";if(!r){this._logMessage(this._setIconMessage(YF.iconNotFound,t.name.currentValue));return}this._config&&(this._config.width&&(r=r.replace(this._setSize(A0.Width),this._setSize(A0.Width,this._config.width))),this._config.height&&(r=r.replace(this._setSize(A0.Height),this._setSize(A0.Height,this._config.height))),this._config.theme&&this._elem.nativeElement.classList.add(this._config.theme)),this.resetDefaultDimensions&&(r=r.replace(this._setSize(A0.Width),""),r=r.replace(this._setSize(A0.Height),"")),this.width&&r.includes(A0.Width)&&(r=r.replace(this._setSize(A0.Width),this._setSize(A0.Width,this.width))),this.height&&r.includes(A0.Height)&&(r=r.replace(this._setSize(A0.Height),this._setSize(A0.Height,this.height))),this._elem.nativeElement.innerHTML=r,this._changeDetector.markForCheck()}}return i.\u0275fac=function(t){return new(t||i)(Y(Qe),Y(Qt),Y(oc),Y(xC))},i.\u0275cmp=Ue({type:i,selectors:[["i-bs"],["","i-bs",""]],inputs:{name:"name",width:"width",height:"height",resetDefaultDimensions:"resetDefaultDimensions"},standalone:!1,features:[Ht],ngContentSelectors:GF,decls:1,vars:0,template:function(t,n){t&1&&(oi(),x1(0))},encapsulation:2}),i})();var MC=` `,AC=` `;var _C=` `;var SC=` `;var DC=` `;var EC=` `;var VC=(()=>{class i{static pick(t,n){return{ngModule:i,providers:[{provide:oc,multi:!0,useValue:t},{provide:xC,useValue:n}]}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=Ie({type:i}),i.\u0275inj=Oe({}),i})();function LC(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(s=(r<3?a(s):r>3?a(e,t,s):a(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s}function zC(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}var _0=typeof window<"u"&&window||{},fee=_0.document,pee=_0.location,gee=_0.gc?()=>_0.gc():()=>null,vee=_0.performance?_0.performance:null,mee=_0.Event,wee=_0.MouseEvent,bee=_0.KeyboardEvent,yee=_0.EventTarget,Cee=_0.History,xee=_0.Location,Mee=_0.EventListener;function PC(){let i="Change";return function(t,n){let r=` __${n}Value`;Object.defineProperty(t,n,{get(){return this[r]},set(s){let a=this[r];this[r]=s,a!==s&&this[n+i]&&this[n+i].emit(s)}})}}var Aee=typeof console>"u"||!("warn"in console);var KF=["*"];function QF(i,e){if(i&1){let t=At();D(0,"button",2),Me("click",function(){ct(t);let r=ie(2);return ht(r.close())}),D(1,"span",3),T(2,"\xD7"),S(),D(3,"span",4),T(4,"Close"),S()()}}function JF(i,e){if(i&1&&(D(0,"div",1),ce(1,QF,5,0,"ng-template",0),x1(2),S()),i&2){let t=ie();Cn("alert alert-"+t.type),q("ngClass",t.classes),k(),q("ngIf",t.dismissible)}}var eR=(()=>{class i{constructor(){this.type="warning",this.dismissible=!1,this.dismissOnTimeout=void 0}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),kC=(()=>{class i{constructor(t,n){this.changeDetection=n,this.type="warning",this.dismissible=!1,this.isOpen=!0,this.onClose=new he,this.onClosed=new he,this.classes="",this.dismissibleChange=new he,Object.assign(this,t),this.dismissibleChange.subscribe(()=>{this.classes=this.dismissible?"alert-dismissible":"",this.changeDetection.markForCheck()})}ngOnInit(){this.dismissOnTimeout&&setTimeout(()=>this.close(),parseInt(this.dismissOnTimeout,10))}close(){this.isOpen&&(this.onClose.emit(this),this.isOpen=!1,this.changeDetection.markForCheck(),this.onClosed.emit(this))}static{this.\u0275fac=function(n){return new(n||i)(Y(eR),Y(Qt))}}static{this.\u0275cmp=Ue({type:i,selectors:[["alert"],["bs-alert"]],inputs:{type:"type",dismissible:"dismissible",dismissOnTimeout:"dismissOnTimeout",isOpen:"isOpen"},outputs:{onClose:"onClose",onClosed:"onClosed"},ngContentSelectors:KF,decls:1,vars:1,consts:[[3,"ngIf"],["role","alert",3,"ngClass"],["type","button","aria-label","Close",1,"close","btn-close",3,"click"],["aria-hidden","true",1,"visually-hidden"],[1,"sr-only","visually-hidden"]],template:function(n,r){n&1&&(oi(),ce(0,JF,3,4,"ng-template",0)),n&2&&q("ngIf",r.isOpen)},dependencies:[_t,d0],encapsulation:2,changeDetection:0})}}return LC([PC(),zC("design:type",Object)],i.prototype,"dismissible",void 0),i})(),HC=(()=>{class i{static forRoot(){return{ngModule:i,providers:[]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i})}static{this.\u0275inj=Oe({})}}return i})();var z=function(i){return i.SEPARATOR="separator",i.PERCENT="percent",i.IP="IP",i.CPF_CNPJ="CPF_CNPJ",i.MONTH="M",i.MONTHS="M0",i.MINUTE="m",i.HOUR="h",i.HOURS="H",i.MINUTES="m0",i.HOURS_HOUR="Hh",i.SECONDS="s0",i.HOURS_MINUTES_SECONDS="Hh:m0:s0",i.EMAIL_MASK="A*@A*.A*",i.HOURS_MINUTES="Hh:m0",i.MINUTES_SECONDS="m0:s0",i.DAYS_MONTHS_YEARS="d0/M0/0000",i.DAYS_MONTHS="d0/M0",i.DAYS="d0",i.DAY="d",i.SECOND="s",i.LETTER_S="S",i.DOT=".",i.COMMA=",",i.CURLY_BRACKETS_LEFT="{",i.CURLY_BRACKETS_RIGHT="}",i.MINUS="-",i.OR="||",i.HASH="#",i.EMPTY_STRING="",i.SYMBOL_STAR="*",i.SYMBOL_QUESTION="?",i.SLASH="/",i.WHITE_SPACE=" ",i.NUMBER_ZERO="0",i.NUMBER_NINE="9",i.BACKSPACE="Backspace",i.DELETE="Delete",i.ARROW_LEFT="ArrowLeft",i.ARROW_UP="ArrowUp",i.DOUBLE_ZERO="00",i}(z||{}),lo=new J("ngx-mask config"),FC=new J("new ngx-mask config"),RC=new J("initial ngx-mask config"),iR={suffix:"",prefix:"",thousandSeparator:" ",decimalMarker:[".",","],clearIfNotMatch:!1,showMaskTyped:!1,instantPrefix:!1,placeHolderCharacter:"_",dropSpecialCharacters:!0,hiddenInput:!1,shownMaskExpression:"",separatorLimit:"",allowNegativeNumbers:!1,validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],leadZeroDateTime:!1,apm:!1,leadZero:!1,keepCharacterPositions:!1,triggerOnMaskChange:!1,inputTransformFn:i=>i,outputTransformFn:i=>i,maskFilled:new he,patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},U:{pattern:new RegExp("[A-Z]")},L:{pattern:new RegExp("[a-z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},nR=[z.HOURS_MINUTES_SECONDS,z.HOURS_MINUTES,z.MINUTES_SECONDS],rR=[z.PERCENT,z.HOURS_HOUR,z.SECONDS,z.MINUTES,z.SEPARATOR,z.DAYS_MONTHS_YEARS,z.DAYS_MONTHS,z.DAYS,z.MONTHS],sR=(()=>{class i{_config=j(lo);dropSpecialCharacters=this._config.dropSpecialCharacters;hiddenInput=this._config.hiddenInput;clearIfNotMatch=this._config.clearIfNotMatch;specialCharacters=this._config.specialCharacters;patterns=this._config.patterns;prefix=this._config.prefix;suffix=this._config.suffix;thousandSeparator=this._config.thousandSeparator;decimalMarker=this._config.decimalMarker;customPattern;showMaskTyped=this._config.showMaskTyped;placeHolderCharacter=this._config.placeHolderCharacter;validation=this._config.validation;separatorLimit=this._config.separatorLimit;allowNegativeNumbers=this._config.allowNegativeNumbers;leadZeroDateTime=this._config.leadZeroDateTime;leadZero=this._config.leadZero;apm=this._config.apm;inputTransformFn=this._config.inputTransformFn;outputTransformFn=this._config.outputTransformFn;keepCharacterPositions=this._config.keepCharacterPositions;instantPrefix=this._config.instantPrefix;triggerOnMaskChange=this._config.triggerOnMaskChange;_shift=new Set;plusOnePosition=!1;maskExpression="";actualValue="";showKeepCharacterExp="";shownMaskExpression=this._config.shownMaskExpression;deletedSpecialCharacter=!1;ipError;cpfCnpjError;applyMask(t,n,r=0,s=!1,a=!1,o=()=>{}){if(!n||typeof t!="string")return z.EMPTY_STRING;let l=0,c="",h=!1,d=!1,u=1,p=!1,f=t,g=r;f.slice(0,this.prefix.length)===this.prefix&&(f=f.slice(this.prefix.length,f.length)),this.suffix&&f.length>0&&(f=this.checkAndRemoveSuffix(f)),f==="("&&this.prefix&&(f="");let y=f.toString().split(z.EMPTY_STRING);if(this.allowNegativeNumbers&&f.slice(l,l+1)===z.MINUS&&(c+=f.slice(l,l+1)),n===z.IP){let L=f.split(z.DOT);this.ipError=this._validIP(L),n="099.099.099.099"}let x=[];for(let L=0;L11?n="00.000.000/0000-00":n="000.000.000-00"),n.startsWith(z.PERCENT)){if(f.match("[a-z]|[A-Z]")||f.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/)&&!a){f=this._stripToDecimal(f);let E=this.getPrecision(n);f=this.checkInputPrecision(f,E,this.decimalMarker)}let L=typeof this.decimalMarker=="string"?this.decimalMarker:z.DOT;if(f.indexOf(L)>0&&!this.percentage(f.substring(0,f.indexOf(L)))){let E=f.substring(0,f.indexOf(L)-1);this.allowNegativeNumbers&&f.slice(l,l+1)===z.MINUS&&!a&&(E=f.substring(0,f.indexOf(L))),f=`${E}${f.substring(f.indexOf(L),f.length)}`}let w="";this.allowNegativeNumbers&&f.slice(l,l+1)===z.MINUS?w=`${z.MINUS}${f.slice(l+1,l+f.length)}`:w=f,this.percentage(w)?c=this._splitPercentZero(f):c=this._splitPercentZero(f.substring(0,f.length-1))}else if(n.startsWith(z.SEPARATOR)){(f.match("[w\u0430-\u044F\u0410-\u042F]")||f.match("[\u0401\u0451\u0410-\u044F]")||f.match("[a-z]|[A-Z]")||f.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\]:";<>.?/]/)||f.match("[^A-Za-z0-9,]"))&&(f=this._stripToDecimal(f));let L=this.getPrecision(n),w=this.decimalMarker;if(Array.isArray(this.decimalMarker)&&(this.actualValue.includes(this.decimalMarker[0])||this.actualValue.includes(this.decimalMarker[1])?w=this.actualValue.includes(this.decimalMarker[0])?this.decimalMarker[0]:this.decimalMarker[1]:w=this.decimalMarker.find(F=>F!==this.thousandSeparator)),a){let{decimalMarkerIndex:F,nonZeroIndex:R}=this._findFirstNonZeroAndDecimalIndex(f,w),I=f[0]===z.MINUS,re=f[0]===z.NUMBER_ZERO,ve=f[0]===w,Re=f[1]===w;(ve&&!R||I&&Re&&!R||re&&!F&&!R)&&(f=z.NUMBER_ZERO),F&&R&&I&&g===1&&(FR)&&(f=z.MINUS+f.slice(R)),!F&&R&&f.length>R&&(f=I?z.MINUS+f.slice(R):f.slice(R)),F&&R&&g===0&&(FR&&(f=f.slice(R)))}L===0?f=this.allowNegativeNumbers?f.length>2&&f[0]===z.MINUS&&f[1]===z.NUMBER_ZERO&&f[2]!==this.thousandSeparator&&f[2]!==z.COMMA&&f[2]!==z.DOT?"-"+f.slice(2,f.length):f[0]===z.NUMBER_ZERO&&f.length>1&&f[1]!==this.thousandSeparator&&f[1]!==z.COMMA&&f[1]!==z.DOT?f.slice(1,f.length):f:f.length>1&&f[0]===z.NUMBER_ZERO&&f[1]!==this.thousandSeparator&&f[1]!==z.COMMA&&f[1]!==z.DOT?f.slice(1,f.length):f:(f[0]===w&&f.length>1&&!a&&(f=z.NUMBER_ZERO+f.slice(0,f.length+1),this.plusOnePosition=!0),f[0]===z.NUMBER_ZERO&&f[1]!==w&&f[1]!==this.thousandSeparator&&!a&&(f=f.length>1?f.slice(0,1)+w+f.slice(1,f.length+1):f,this.plusOnePosition=!0),this.allowNegativeNumbers&&!a&&f[0]===z.MINUS&&(f[1]===w||f[1]===z.NUMBER_ZERO)&&(f=f[1]===w&&f.length>2?f.slice(0,1)+z.NUMBER_ZERO+f.slice(1,f.length):f[1]===z.NUMBER_ZERO&&f.length>2&&f[2]!==w?f.slice(0,2)+w+f.slice(2,f.length):f,this.plusOnePosition=!0));let E=this._charToRegExpExpression(this.thousandSeparator),A='@#!$%^&*()_+|~=`{}\\[\\]:\\s,\\.";<>?\\/'.replace(E,"");if(Array.isArray(this.decimalMarker))for(let F of this.decimalMarker)A=A.replace(this._charToRegExpExpression(F),z.EMPTY_STRING);else A=A.replace(this._charToRegExpExpression(this.decimalMarker),"");let P=new RegExp("["+A+"]");f.match(P)&&(f=f.substring(0,f.length-1)),f=this.checkInputPrecision(f,L,this.decimalMarker);let O=f.replace(new RegExp(E,"g"),"");c=this._formatWithSeparators(O,this.thousandSeparator,this.decimalMarker,L);let G=c.indexOf(z.COMMA)-f.indexOf(z.COMMA),K=c.length-f.length,te=a&&c.length0&&c[g]!==this.thousandSeparator||te){d=!0;let F=0;do this._shift.add(g+F),F++;while(F0&&!(c.indexOf(z.COMMA)>=g&&g>3)||!(c.indexOf(z.DOT)>=g&&g>3)&&K<=0?(this._shift.clear(),d=!0,u=K,g+=K,this._shift.add(g)):this._shift.clear()}else for(let L=0,w=y[0];L9:Number(w)>2)){g=this.leadZeroDateTime?g:g+1,l+=1,this._shiftStep(l),L--,this.leadZeroDateTime&&(c+="0");continue}if(n[l]===z.HOUR&&(this.apm?c.length===1&&Number(c)>1||c==="1"&&Number(w)>2||f.slice(l-1,l).length===1&&Number(f.slice(l-1,l))>2||f.slice(l-1,l)==="1"&&Number(w)>2:c==="2"&&Number(w)>3||(c.slice(l-2,l)==="2"||c.slice(l-3,l)==="2"||c.slice(l-4,l)==="2"||c.slice(l-1,l)==="2")&&Number(w)>3&&l>10)){g=g+1,l+=1,L--;continue}if((n[l]===z.MINUTE||n[l]===z.SECOND)&&Number(w)>5){g=this.leadZeroDateTime?g:g+1,l+=1,this._shiftStep(l),L--,this.leadZeroDateTime&&(c+="0");continue}let A=31,P=f[l],O=f[l+1],G=f[l+2],K=f[l-1],te=f[l-2],F=f.slice(l-3,l-1),R=f.slice(l-1,l+1),I=f.slice(l,l+2),re=f.slice(l-2,l);if(n[l]===z.DAY){let ve=n.slice(0,2)===z.MONTHS,Re=n.slice(0,2)===z.MONTHS&&this.specialCharacters.includes(te);if(Number(w)>3&&this.leadZeroDateTime||!ve&&(Number(I)>A||Number(R)>A||this.specialCharacters.includes(O))||(Re?Number(R)>A||!this.specialCharacters.includes(P)&&this.specialCharacters.includes(G)||this.specialCharacters.includes(P):Number(I)>A||this.specialCharacters.includes(O)&&!a)){g=this.leadZeroDateTime?g:g+1,l+=1,this._shiftStep(l),L--,this.leadZeroDateTime&&(c+="0");continue}}if(n[l]===z.MONTH){let Re=l===0&&(Number(w)>2||Number(I)>12||this.specialCharacters.includes(O)&&!a),Te=n.slice(l+2,l+3),ke=F.includes(Te)&&n.includes("d0")&&(this.specialCharacters.includes(te)&&Number(R)>12&&!this.specialCharacters.includes(P)||this.specialCharacters.includes(P)),ze=Number(F)<=A&&!this.specialCharacters.includes(F)&&this.specialCharacters.includes(K)&&(Number(I)>12||this.specialCharacters.includes(O)),T0=Number(I)>12&&l===5||this.specialCharacters.includes(O)&&l===5,V=Number(F)>A&&!this.specialCharacters.includes(F)&&!this.specialCharacters.includes(re)&&Number(re)>12&&n.includes("d0"),C=Number(F)<=A&&!this.specialCharacters.includes(F)&&!this.specialCharacters.includes(K)&&Number(R)>12;if(Number(w)>1&&this.leadZeroDateTime||Re||ke||C||V||ze||T0&&!this.leadZeroDateTime){g=this.leadZeroDateTime?g:g+1,l+=1,this._shiftStep(l),L--,this.leadZeroDateTime&&(c+="0");continue}}c+=w,l++}else this.specialCharacters.includes(w)&&n[l]===w?(c+=w,l++):this.specialCharacters.indexOf(n[l]??z.EMPTY_STRING)!==-1?(c+=n[l],l++,this._shiftStep(l),L--):n[l]===z.NUMBER_NINE&&this.showMaskTyped?this._shiftStep(l):this.patterns[n[l]??z.EMPTY_STRING]&&this.patterns[n[l]??z.EMPTY_STRING]?.optional?(y[l]&&n!=="099.099.099.099"&&n!=="000.000.000-00"&&n!=="00.000.000/0000-00"&&!n.match(/^9+\.0+$/)&&!this.patterns[n[l]??z.EMPTY_STRING]?.optional&&(c+=y[l]),n.includes(z.NUMBER_NINE+z.SYMBOL_STAR)&&n.includes(z.NUMBER_ZERO+z.SYMBOL_STAR)&&l++,l++,L--):this.maskExpression[l+1]===z.SYMBOL_STAR&&this._findSpecialChar(this.maskExpression[l+2]??z.EMPTY_STRING)&&this._findSpecialChar(w)===this.maskExpression[l+2]&&h||this.maskExpression[l+1]===z.SYMBOL_QUESTION&&this._findSpecialChar(this.maskExpression[l+2]??z.EMPTY_STRING)&&this._findSpecialChar(w)===this.maskExpression[l+2]&&h?(l+=3,c+=w):this.showMaskTyped&&this.specialCharacters.indexOf(w)<0&&w!==this.placeHolderCharacter&&this.placeHolderCharacter.length===1&&(p=!0)}c[g-1]&&c.length+1===n.length&&this.specialCharacters.indexOf(n[n.length-1]??z.EMPTY_STRING)!==-1&&(c+=n[n.length-1]);let _=g+1;for(;this._shift.has(_);)u++,_++;let b=s&&!n.startsWith(z.SEPARATOR)?l:this._shift.has(g)?u:0;p&&b--,o(b,d),u<0&&this._shift.clear();let v=!1;a&&(v=y.every(L=>this.specialCharacters.includes(L)));let m=`${this.prefix}${v?z.EMPTY_STRING:c}${this.showMaskTyped?"":this.suffix}`;c.length===0&&(m=this.instantPrefix?`${this.prefix}${c}`:`${c}`);let M=f.length===1&&this.specialCharacters.includes(n[0])&&f!==n[0];if(!this._checkSymbolMask(f,n[1])&&M)return"";if(c.includes(z.MINUS)&&this.prefix&&this.allowNegativeNumbers){if(a&&c===z.MINUS)return"";m=`${z.MINUS}${this.prefix}${c.split(z.MINUS).join(z.EMPTY_STRING)}${this.suffix}`}return m}_findDropSpecialChar(t){return Array.isArray(this.dropSpecialCharacters)?this.dropSpecialCharacters.find(n=>n===t):this._findSpecialChar(t)}_findSpecialChar(t){return this.specialCharacters.find(n=>n===t)}_checkSymbolMask(t,n){return this.patterns=this.customPattern?this.customPattern:this.patterns,(this.patterns[n]?.pattern&&this.patterns[n]?.pattern.test(t))??!1}_formatWithSeparators=(t,n,r,s)=>{let a=[],o="";if(Array.isArray(r)){let u=new RegExp(r.map(p=>"[\\^$.|?*+()".indexOf(p)>=0?`\\${p}`:p).join("|"));a=t.split(u),o=t.match(u)?.[0]??z.EMPTY_STRING}else a=t.split(r),o=r;let l=a.length>1?`${o}${a[1]}`:z.EMPTY_STRING,c=a[0]??z.EMPTY_STRING,h=this.separatorLimit.replace(/\s/g,z.EMPTY_STRING);h&&+h&&(c[0]===z.MINUS?c=`-${c.slice(1,c.length).slice(0,h.length)}`:c=c.slice(0,h.length));let d=/(\d+)(\d{3})/;for(;n&&d.test(c);)c=c.replace(d,"$1"+n+"$2");return typeof s>"u"?c+l:s===0?c:c+l.substring(0,s+1)};percentage=t=>{let n=t.replace(",","."),r=Number(this.allowNegativeNumbers&&t.includes(z.MINUS)?n.slice(1,t.length):n);return!isNaN(r)&&r>=0&&r<=100};getPrecision=t=>{let n=t.split(z.DOT);return n.length>1?Number(n[n.length-1]):1/0};checkAndRemoveSuffix=t=>{for(let n=this.suffix?.length-1;n>=0;n--){let r=this.suffix.substring(n,this.suffix?.length);if(t.includes(r)&&n!==this.suffix?.length-1&&(n-1<0||!t.includes(this.suffix.substring(n-1,this.suffix?.length))))return t.replace(r,z.EMPTY_STRING)}return t};checkInputPrecision=(t,n,r)=>{let s=t,a=r;if(n<1/0){if(Array.isArray(a)){let h=a.find(d=>d!==this.thousandSeparator);a=h||a[0]}let o=new RegExp(this._charToRegExpExpression(a)+`\\d{${n}}.*$`),l=s.match(o),c=(l&&l[0]?.length)??0;if(c-1>n){let h=c-1-n;s=s.substring(0,s.length-h)}n===0&&this._compareOrIncludes(s[s.length-1],a,this.thousandSeparator)&&(s=s.substring(0,s.length-1))}return s};_stripToDecimal(t){return t.split(z.EMPTY_STRING).filter((n,r)=>{let s=typeof this.decimalMarker=="string"?n===this.decimalMarker:this.decimalMarker.includes(n);return n.match("^-?\\d")||n===this.thousandSeparator||s||n===z.MINUS&&r===0&&this.allowNegativeNumbers}).join(z.EMPTY_STRING)}_charToRegExpExpression(t){return t&&(t===" "?"\\s":"[\\^$.|?*+()".indexOf(t)>=0?`\\${t}`:t)}_shiftStep(t){this._shift.add(t+this.prefix.length||0)}_compareOrIncludes(t,n,r){return Array.isArray(n)?n.filter(s=>s!==r).includes(t):t===n}_validIP(t){return!(t.length===4&&!t.some((n,r)=>t.length!==r+1?n===z.EMPTY_STRING||Number(n)>255:n===z.EMPTY_STRING||Number(n.substring(0,3))>255))}_splitPercentZero(t){if(t===z.MINUS&&this.allowNegativeNumbers)return t;let n=typeof this.decimalMarker=="string"?t.indexOf(this.decimalMarker):t.indexOf(z.DOT),r=this.allowNegativeNumbers&&t.includes(z.MINUS)?"-":"";if(n===-1){let s=parseInt(r?t.slice(1,t.length):t,10);return isNaN(s)?z.EMPTY_STRING:`${r}${s}`}else{let s=parseInt(t.replace("-","").substring(0,n),10),a=t.substring(n+1),o=isNaN(s)?"":s.toString(),l=typeof this.decimalMarker=="string"?this.decimalMarker:z.DOT;return o===z.EMPTY_STRING?z.EMPTY_STRING:`${r}${o}${l}${a}`}}_findFirstNonZeroAndDecimalIndex(t,n){let r=null,s=null;for(let a=0;a="1"&&o<="9"&&s===null&&(s=a),r!==null&&s!==null)break}return{decimalMarkerIndex:r,nonZeroIndex:s}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})(),cc=(()=>{class i extends sR{isNumberValue=!1;maskIsShown="";selStart=null;selEnd=null;maskChanged=!1;maskExpressionArray=[];previousValue="";currentValue="";writingValue=!1;_emitValue=!1;_start;_end;onChange=t=>{};_elementRef=j(Qe,{optional:!0});document=j($e);_config=j(lo);_renderer=j(c0,{optional:!0});applyMask(t,n,r=0,s=!1,a=!1,o=()=>{}){if(!n)return t!==this.actualValue?this.actualValue:t;if(this.maskIsShown=this.showMaskTyped?this.showMaskInInput():z.EMPTY_STRING,this.maskExpression===z.IP&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||z.HASH)),this.maskExpression===z.CPF_CNPJ&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||z.HASH)),!t&&this.showMaskTyped)return this.formControlResult(this.prefix),`${this.prefix}${this.maskIsShown}${this.suffix}`;let l=t&&typeof this.selStart=="number"?t[this.selStart]??z.EMPTY_STRING:z.EMPTY_STRING,c="",h=r;if((this.hiddenInput||t&&t.indexOf(z.SYMBOL_STAR)>=0)&&!this.writingValue){let f=t&&t.length===1?t.split(z.EMPTY_STRING):this.actualValue.split(z.EMPTY_STRING);a&&(f=f.slice(0,r).concat(f.slice(r+1))),this.showMaskTyped&&(t=this.removeMask(t),f=this.removeMask(f.join("")).split(z.EMPTY_STRING)),typeof this.selStart=="object"&&typeof this.selEnd=="object"?(this.selStart=Number(this.selStart),this.selEnd=Number(this.selEnd)):t!==z.EMPTY_STRING&&f.length?typeof this.selStart=="number"&&typeof this.selEnd=="number"&&(t.length>f.length?f.splice(this.selStart,0,l):t.length!this._compareOrIncludes(f,this.decimalMarker,this.thousandSeparator))),(d||d==="")&&(this.previousValue=this.currentValue,this.currentValue=d,this._emitValue=this.previousValue!==this.currentValue||c!==this.currentValue&&this.writingValue||this.previousValue===this.currentValue&&s),this._emitValue&&this.formControlResult(d),!this.showMaskTyped||this.showMaskTyped&&this.hiddenInput)return this.hiddenInput?`${this.hideInput(d,this.maskExpression)}${this.maskIsShown.slice(d.length)}`:d;let u=d.length,p=`${this.prefix}${this.maskIsShown}${this.suffix}`;if(this.maskExpression.includes(z.HOURS)){let f=this._numberSkipedSymbols(d);return`${d}${p.slice(u+f)}`}else if(this.maskExpression===z.IP||this.maskExpression===z.CPF_CNPJ)return`${d}${p}`;return`${d}${p.slice(u)}`}_numberSkipedSymbols(t){let n=/(^|\D)(\d\D)/g,r=n.exec(t),s=0;for(;r!=null;)s+=1,r=n.exec(t);return s}applyValueChanges(t,n,r,s=()=>{}){let a=this._elementRef?.nativeElement;a&&(a.value=this.applyMask(a.value,this.maskExpression,t,n,r,s),a!==this._getActiveElement()&&this.clearIfNotMatchFn())}hideInput(t,n){return t.split(z.EMPTY_STRING).map((r,s)=>this.patterns&&this.patterns[n[s]??z.EMPTY_STRING]&&this.patterns[n[s]??z.EMPTY_STRING]?.symbol?this.patterns[n[s]??z.EMPTY_STRING]?.symbol:r).join(z.EMPTY_STRING)}getActualValue(t){let n=t.split(z.EMPTY_STRING).filter((r,s)=>{let a=this.maskExpression[s]??z.EMPTY_STRING;return this._checkSymbolMask(r,a)||this.specialCharacters.includes(a)&&r===a});return n.join(z.EMPTY_STRING)===t?n.join(z.EMPTY_STRING):t}shiftTypedSymbols(t){let n="";return(t&&t.split(z.EMPTY_STRING).map((s,a)=>{if(this.specialCharacters.includes(t[a+1]??z.EMPTY_STRING)&&t[a+1]!==this.maskExpression[a+1])return n=s,t[a+1];if(n.length){let o=n;return n=z.EMPTY_STRING,o}return s})||[]).join(z.EMPTY_STRING)}numberToString(t){return!t&&t!==0||this.maskExpression.startsWith(z.SEPARATOR)&&(this.leadZero||!this.dropSpecialCharacters)||this.maskExpression.startsWith(z.SEPARATOR)&&this.separatorLimit.length>14&&String(t).length>14?String(t):Number(t).toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20}).replace(`/${z.MINUS}/`,z.MINUS)}showMaskInInput(t){if(this.showMaskTyped&&this.shownMaskExpression){if(this.maskExpression.length!==this.shownMaskExpression.length)throw new Error("Mask expression must match mask placeholder length");return this.shownMaskExpression}else if(this.showMaskTyped){if(t){if(this.maskExpression===z.IP)return this._checkForIp(t);if(this.maskExpression===z.CPF_CNPJ)return this._checkForCpfCnpj(t)}return this.placeHolderCharacter.length===this.maskExpression.length?this.placeHolderCharacter:this.maskExpression.replace(/\w/g,this.placeHolderCharacter)}return""}clearIfNotMatchFn(){let t=this._elementRef?.nativeElement;t&&this.clearIfNotMatch&&this.prefix.length+this.maskExpression.length+this.suffix.length!==t.value.replace(this.placeHolderCharacter,z.EMPTY_STRING).length&&(this.formElementProperty=["value",z.EMPTY_STRING],this.applyMask("",this.maskExpression))}set formElementProperty([t,n]){!this._renderer||!this._elementRef||Promise.resolve().then(()=>this._renderer?.setProperty(this._elementRef?.nativeElement,t,n))}checkDropSpecialCharAmount(t){return t.split(z.EMPTY_STRING).filter(r=>this._findDropSpecialChar(r)).length}removeMask(t){return this._removeMask(this._removeSuffix(this._removePrefix(t)),this.specialCharacters.concat("_").concat(this.placeHolderCharacter))}_checkForIp(t){if(t===z.HASH)return`${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;let n=[];for(let r=0;r3&&n.length<=6?`${this.placeHolderCharacter}.${this.placeHolderCharacter}`:n.length>6&&n.length<=9?this.placeHolderCharacter:(n.length>9&&n.length<=12,"")}_checkForCpfCnpj(t){let n=`${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}-${this.placeHolderCharacter}${this.placeHolderCharacter}`,r=`${this.placeHolderCharacter}${this.placeHolderCharacter}.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}/${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}-${this.placeHolderCharacter}${this.placeHolderCharacter}`;if(t===z.HASH)return n;let s=[];for(let a=0;a3&&s.length<=6?n.slice(s.length+1,n.length):s.length>6&&s.length<=9?n.slice(s.length+2,n.length):s.length>9&&s.length<11?n.slice(s.length+3,n.length):s.length===11?"":s.length===12?t.length===17?r.slice(16,r.length):r.slice(15,r.length):s.length>12&&s.length<=14?r.slice(s.length+4,r.length):""}_getActiveElement(t=this.document){let n=t?.activeElement?.shadowRoot;return n?.activeElement?this._getActiveElement(n):t.activeElement}formControlResult(t){let n=this.outputTransformFn?this.outputTransformFn:r=>r;this.writingValue=!1,this.maskChanged=!1,Array.isArray(this.dropSpecialCharacters)?this.onChange(n(this._toNumber(this._checkSymbols(this._removeMask(this._removeSuffix(this._removePrefix(t)),this.dropSpecialCharacters))))):this.dropSpecialCharacters||!this.dropSpecialCharacters&&this.prefix===t?this.onChange(n(this._toNumber(this._checkSymbols(this._removeSuffix(this._removePrefix(t)))))):this.onChange(n(this._toNumber(t)))}_toNumber(t){if(!this.isNumberValue||t===z.EMPTY_STRING||this.maskExpression.startsWith(z.SEPARATOR)&&(this.leadZero||!this.dropSpecialCharacters))return t;if(String(t).length>14&&this.maskExpression.startsWith(z.SEPARATOR))return String(t);let n=Number(t);if(this.maskExpression.startsWith(z.SEPARATOR)&&Number.isNaN(n)){let r=String(t).replace(",",".");return Number(r)}return Number.isNaN(n)?t:n}_removeMask(t,n){return this.maskExpression.startsWith(z.PERCENT)&&t.includes(z.DOT)?t:t&&t.replace(this._regExpForRemove(n),z.EMPTY_STRING)}_removePrefix(t){return this.prefix?t&&t.replace(this.prefix,z.EMPTY_STRING):t}_removeSuffix(t){return this.suffix?t&&t.replace(this.suffix,z.EMPTY_STRING):t}_retrieveSeparatorValue(t){let n=Array.isArray(this.dropSpecialCharacters)?this.specialCharacters.filter(r=>this.dropSpecialCharacters.includes(r)):this.specialCharacters;return!this.deletedSpecialCharacter&&this._checkPatternForSpace()&&t.includes(z.WHITE_SPACE)&&this.maskExpression.includes(z.SYMBOL_STAR)&&(n=n.filter(r=>r!==z.WHITE_SPACE)),this._removeMask(t,n)}_regExpForRemove(t){return new RegExp(t.map(n=>`\\${n}`).join("|"),"gi")}_replaceDecimalMarkerToDot(t){let n=Array.isArray(this.decimalMarker)?this.decimalMarker:[this.decimalMarker];return t.replace(this._regExpForRemove(n),z.DOT)}_checkSymbols(t){let n=t;if(n===z.EMPTY_STRING)return n;this.maskExpression.startsWith(z.PERCENT)&&this.decimalMarker===z.COMMA&&(n=n.replace(z.COMMA,z.DOT));let r=this._retrieveSeparatorPrecision(this.maskExpression),s=this.specialCharacters.length===0?this._retrieveSeparatorValue(n):this._replaceDecimalMarkerToDot(this._retrieveSeparatorValue(n));return this.isNumberValue&&r?n===this.decimalMarker?null:s.length>14?String(s):this._checkPrecision(this.maskExpression,s):s}_checkPatternForSpace(){for(let t in this.patterns)if(this.patterns[t]&&this.patterns[t]?.hasOwnProperty("pattern")){let n=this.patterns[t]?.pattern.toString(),r=this.patterns[t]?.pattern;if(n?.includes(z.WHITE_SPACE)&&r?.test(this.maskExpression))return!0}return!1}_retrieveSeparatorPrecision(t){let n=t.match(new RegExp("^separator\\.([^d]*)"));return n?Number(n[1]):null}_checkPrecision(t,n){let r=this.getPrecision(t),s=n;return t.indexOf("2")>0||this.leadZero&&Number(r)>0?(this.decimalMarker===z.COMMA&&this.leadZero&&(s=s.replace(",",".")),this.leadZero?Number(s).toFixed(Number(r)):Number(s).toFixed(2)):this.numberToString(s)}_repeatPatternSymbols(t){return t.match(/{[0-9]+}/)&&t.split(z.EMPTY_STRING).reduce((n,r,s)=>{if(this._start=r===z.CURLY_BRACKETS_LEFT?s:this._start,r!==z.CURLY_BRACKETS_RIGHT)return this._findSpecialChar(r)?n+r:n;this._end=s;let a=Number(t.slice(this._start+1,this._end)),o=new Array(a+1).join(t[this._start-1]);if(t.slice(0,this._start).length>1&&t.includes(z.LETTER_S)){let l=t.slice(0,this._start-1);return l.includes(z.CURLY_BRACKETS_LEFT)?n+o:l+n+o}else return n+o},"")||t}currentLocaleDecimalMarker(){return 1.1.toLocaleString().substring(1,2)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=y1(i)))(r||i)}})();static \u0275prov=Q({token:i,factory:i.\u0275fac})}return i})();function aR(){let i=j(RC),e=j(FC);return e instanceof Function?Z(Z({},i),e()):Z(Z({},i),e)}function OC(i){return[{provide:FC,useValue:i},{provide:RC,useValue:iR},{provide:lo,useFactory:aR},cc]}var hc=(()=>{class i{mask=Ke("");specialCharacters=Ke([]);patterns=Ke({});prefix=Ke("");suffix=Ke("");thousandSeparator=Ke(" ");decimalMarker=Ke(".");dropSpecialCharacters=Ke(null);hiddenInput=Ke(null);showMaskTyped=Ke(null);placeHolderCharacter=Ke(null);shownMaskExpression=Ke(null);clearIfNotMatch=Ke(null);validation=Ke(null);separatorLimit=Ke("");allowNegativeNumbers=Ke(null);leadZeroDateTime=Ke(null);leadZero=Ke(null);triggerOnMaskChange=Ke(null);apm=Ke(null);inputTransformFn=Ke(null);outputTransformFn=Ke(null);keepCharacterPositions=Ke(null);instantPrefix=Ke(null);maskFilled=r9();_maskValue=Kt("");_inputValue=Kt("");_position=Kt(null);_code=Kt("");_maskExpressionArray=Kt([]);_justPasted=Kt(!1);_isFocused=Kt(!1);_isComposing=Kt(!1);_maskService=j(cc,{self:!0});document=j($e);_config=j(lo);onChange=t=>{};onTouch=()=>{};ngOnChanges(t){let{mask:n,specialCharacters:r,patterns:s,prefix:a,suffix:o,thousandSeparator:l,decimalMarker:c,dropSpecialCharacters:h,hiddenInput:d,showMaskTyped:u,placeHolderCharacter:p,shownMaskExpression:f,clearIfNotMatch:g,validation:y,separatorLimit:x,allowNegativeNumbers:_,leadZeroDateTime:b,leadZero:v,triggerOnMaskChange:m,apm:M,inputTransformFn:L,outputTransformFn:w,keepCharacterPositions:E,instantPrefix:A}=t;if(n&&(n.currentValue!==n.previousValue&&!n.firstChange&&(this._maskService.maskChanged=!0),n.currentValue&&n.currentValue.split(z.OR).length>1?(this._maskExpressionArray.set(n.currentValue.split(z.OR).sort((P,O)=>P.length-O.length)),this._setMask()):(this._maskExpressionArray.set([]),this._maskValue.set(n.currentValue||z.EMPTY_STRING),this._maskService.maskExpression=this._maskValue())),r){if(!r.currentValue||!Array.isArray(r.currentValue))return;this._maskService.specialCharacters=r.currentValue||[]}if(_&&(this._maskService.allowNegativeNumbers=_.currentValue,this._maskService.allowNegativeNumbers&&(this._maskService.specialCharacters=this._maskService.specialCharacters.filter(P=>P!==z.MINUS))),s&&s.currentValue&&(this._maskService.patterns=s.currentValue),M&&M.currentValue&&(this._maskService.apm=M.currentValue),A&&(this._maskService.instantPrefix=A.currentValue),a&&(this._maskService.prefix=a.currentValue),o&&(this._maskService.suffix=o.currentValue),l&&(this._maskService.thousandSeparator=l.currentValue,l.previousValue&&l.currentValue)){let P=this._maskService.decimalMarker;l.currentValue===this._maskService.decimalMarker&&(this._maskService.decimalMarker=l.currentValue===z.COMMA?z.DOT:z.COMMA),this._maskService.dropSpecialCharacters===!0&&(this._maskService.specialCharacters=this._config.specialCharacters),typeof P=="string"&&typeof this._maskService.decimalMarker=="string"&&(this._inputValue.set(this._inputValue().split(l.previousValue).join("").replace(P,this._maskService.decimalMarker)),this._maskService.actualValue=this._inputValue()),this._maskService.writingValue=!0}c&&(this._maskService.decimalMarker=c.currentValue),h&&(this._maskService.dropSpecialCharacters=h.currentValue),d&&(this._maskService.hiddenInput=d.currentValue,d.previousValue===!0&&d.currentValue===!1&&this._inputValue.set(this._maskService.actualValue)),u&&(this._maskService.showMaskTyped=u.currentValue,u.previousValue===!1&&u.currentValue===!0&&this._isFocused()&&requestAnimationFrame(()=>{this._maskService._elementRef?.nativeElement.click()})),p&&(this._maskService.placeHolderCharacter=p.currentValue),f&&(this._maskService.shownMaskExpression=f.currentValue),g&&(this._maskService.clearIfNotMatch=g.currentValue),y&&(this._maskService.validation=y.currentValue),x&&(this._maskService.separatorLimit=x.currentValue),b&&(this._maskService.leadZeroDateTime=b.currentValue),v&&(this._maskService.leadZero=v.currentValue),m&&(this._maskService.triggerOnMaskChange=m.currentValue),L&&(this._maskService.inputTransformFn=L.currentValue),w&&(this._maskService.outputTransformFn=w.currentValue),E&&(this._maskService.keepCharacterPositions=E.currentValue),this._applyMask()}validate({value:t}){let n=typeof t=="number"?String(t):t,r=this._maskValue();if(!this._maskService.validation||!r)return null;if(this._maskService.ipError)return this._createValidationError(n);if(this._maskService.cpfCnpjError)return this._createValidationError(n);if(r.startsWith(z.SEPARATOR)||rR.includes(r)||this._maskService.clearIfNotMatch)return null;if(nR.includes(r))return this._validateTime(n);if(r===z.EMAIL_MASK)return!/^[^@]+@[^@]+\.[^@]+$/.test(n)&&n?this._createValidationError(n):null;if(n&&n.length>=1){let s=0;if(r.includes(z.CURLY_BRACKETS_LEFT)&&r.includes(z.CURLY_BRACKETS_RIGHT))return r.slice(r.indexOf(z.CURLY_BRACKETS_LEFT)+1,r.indexOf(z.CURLY_BRACKETS_RIGHT))===String(n.length)?null:this._createValidationError(n);if(r.startsWith(z.PERCENT))return null;for(let a in this._maskService.patterns)if(this._maskService.patterns[a]?.optional){if(r.indexOf(a)!==r.lastIndexOf(a)){let o=r.split(z.EMPTY_STRING).filter(l=>l===a).join(z.EMPTY_STRING);s+=o.length}else r.indexOf(a)!==-1&&s++;if(r.indexOf(a)!==-1&&n.length>=r.indexOf(a)||s===r.length)return null}if(r.indexOf(z.SYMBOL_STAR)>1&&n.length1&&n.length1){let l=a[a.length-1];if(l&&this._maskService.specialCharacters.includes(l[0])&&String(n).includes(l[0]??"")&&!this.dropSpecialCharacters()){let c=t.split(l[0]);return c[c.length-1].length===l.length-1?null:this._createValidationError(n)}else return(l&&!this._maskService.specialCharacters.includes(l[0])||!l||this._maskService.dropSpecialCharacters)&&n.length>=o-1?null:this._createValidationError(n)}}if(r.indexOf(z.SYMBOL_STAR)===1||r.indexOf(z.SYMBOL_QUESTION)===1)return null}return t&&this.maskFilled.emit(),null}onPaste(){this._justPasted.set(!0)}onFocus(){this._isFocused.set(!0)}onModelChange(t){(t===z.EMPTY_STRING||t===null||typeof t>"u")&&this._maskService.actualValue&&(this._maskService.actualValue=this._maskService.getActualValue(z.EMPTY_STRING))}onInput(t){if(this._isComposing())return;let n=t.target,r=this._maskService.inputTransformFn?this._maskService.inputTransformFn(n.value):n.value;if(n.type!=="number")if(typeof r=="string"||typeof r=="number"){if(n.value=r.toString(),this._inputValue.set(n.value),this._setMask(),!this._maskValue()){this.onChange(n.value);return}let s=n.selectionStart===1?n.selectionStart+this._maskService.prefix.length:n.selectionStart;if(this.showMaskTyped()&&this.keepCharacterPositions()&&this._maskService.placeHolderCharacter.length===1){let c=this.suffix(),h=this.prefix(),d=n.value.slice(s-1,s),u=h.length,p=this._maskService._checkSymbolMask(d,this._maskService.maskExpression[s-1-u]??z.EMPTY_STRING),f=this._maskService._checkSymbolMask(d,this._maskService.maskExpression[s+1-u]??z.EMPTY_STRING),g=this._maskService.selStart===this._maskService.selEnd,y=Number(this._maskService.selStart)-u,x=Number(this._maskService.selEnd)-u,_=this._code()===z.BACKSPACE||this._code()===z.DELETE;if(_){if(!g)this._maskService.selStart===u?this._maskService.actualValue=`${h}${this._maskService.maskIsShown.slice(0,x)}${this._inputValue().split(h).join("")}`:this._maskService.selStart===this._maskService.maskIsShown.length+u?this._maskService.actualValue=`${this._inputValue()}${this._maskService.maskIsShown.slice(y,x)}`:this._maskService.actualValue=`${h}${this._inputValue().split(h).join("").slice(0,y)}${this._maskService.maskIsShown.slice(y,x)}${this._maskService.actualValue.slice(x+u,this._maskService.maskIsShown.length+u)}${c}`;else if(!this._maskService.specialCharacters.includes(this._maskService.maskExpression.slice(s-u,s+1-u))&&g)if(y===1&&h)this._maskService.actualValue=`${h}${this._maskService.placeHolderCharacter}${n.value.split(h).join("").split(c).join("")}${c}`,s=s-1;else{let b=n.value.substring(0,s),v=n.value.substring(s);this._maskService.actualValue=`${b}${this._maskService.placeHolderCharacter}${v}`}s=this._code()===z.DELETE?s+1:s}_||(!p&&!f&&g?s=Number(n.selectionStart)-1:this._maskService.specialCharacters.includes(n.value.slice(s,s+1))&&f&&!this._maskService.specialCharacters.includes(n.value.slice(s+1,s+2))?(this._maskService.actualValue=`${n.value.slice(0,s-1)}${n.value.slice(s,s+1)}${d}${n.value.slice(s+2)}`,s=s+1):p?n.value.length===1&&s===1?this._maskService.actualValue=`${h}${d}${this._maskService.maskIsShown.slice(1,this._maskService.maskIsShown.length)}${c}`:this._maskService.actualValue=`${n.value.slice(0,s-1)}${d}${n.value.slice(s+1).split(c).join("")}${c}`:h&&n.value.length===1&&s-u===1&&this._maskService._checkSymbolMask(n.value,this._maskService.maskExpression[s-1-u]??z.EMPTY_STRING)&&(this._maskService.actualValue=`${h}${n.value}${this._maskService.maskIsShown.slice(1,this._maskService.maskIsShown.length)}${c}`))}let a=0,o=!1;if(this._code()===z.DELETE&&z.SEPARATOR&&(this._maskService.deletedSpecialCharacter=!0),this._inputValue().length>=this._maskService.maskExpression.length-1&&this._code()!==z.BACKSPACE&&this._maskService.maskExpression===z.DAYS_MONTHS_YEARS&&s<10){let c=this._inputValue().slice(s-1,s);n.value=this._inputValue().slice(0,s-1)+c+this._inputValue().slice(s+1)}if(this._maskService.maskExpression===z.DAYS_MONTHS_YEARS&&this.leadZeroDateTime()&&(s<3&&Number(n.value)>31&&Number(n.value)<40||s===5&&Number(n.value.slice(3,5))>12)&&(s=s+2),this._maskService.maskExpression===z.HOURS_MINUTES_SECONDS&&this.apm()&&(this._justPasted()&&n.value.slice(0,2)===z.DOUBLE_ZERO&&(n.value=n.value.slice(1,2)+n.value.slice(2,n.value.length)),n.value=n.value===z.DOUBLE_ZERO?z.NUMBER_ZERO:n.value),this._maskService.applyValueChanges(s,this._justPasted(),this._code()===z.BACKSPACE||this._code()===z.DELETE,(c,h)=>{this._justPasted.set(!1),a=c,o=h}),this._getActiveElement()!==n)return;if(this._maskService.plusOnePosition&&(s=s+1,this._maskService.plusOnePosition=!1),this._maskExpressionArray().length)if(this._code()===z.BACKSPACE){let c=this.specialCharacters().includes(this._maskService.actualValue.slice(s-1,s)),h=this._maskService.removeMask(this._inputValue())?.length===this._maskService.removeMask(this._maskService.maskExpression)?.length,d=this.specialCharacters().includes(this._maskService.actualValue.slice(s,s+1));h&&!d?s=n.selectionStart+1:s=c?s-1:s}else s=n.selectionStart===1?n.selectionStart+this._maskService.prefix.length:n.selectionStart;this._position.set(this._position()===1&&this._inputValue().length===1?null:this._position());let l=this._position()?this._inputValue().length+s+a:s+(this._code()===z.BACKSPACE&&!o?0:a);l>this._getActualInputLength()&&(l=n.value===this._maskService.decimalMarker&&n.value.length===1?this._getActualInputLength()+1:this._getActualInputLength()),l<0&&(l=0),n.setSelectionRange(l,l),this._position.set(null)}else console.warn("Ngx-mask writeValue work with string | number, your current value:",typeof r);else{if(!this._maskValue()){this.onChange(n.value);return}this._maskService.applyValueChanges(n.value.length,this._justPasted(),this._code()===z.BACKSPACE||this._code()===z.DELETE)}}onCompositionStart(){this._isComposing.set(!0)}onCompositionEnd(t){this._isComposing.set(!1),this._justPasted.set(!0),this.onInput(t)}onBlur(t){if(this._maskValue()){let n=t.target;if(this._maskService.leadZero&&n.value.length>0&&typeof this._maskService.decimalMarker=="string"){let r=this._maskService.maskExpression,s=this._maskService.decimalMarker,a=this._maskService.suffix,o=Number(this._maskService.maskExpression.slice(r.length-1,r.length));if(o>0){n.value=a?n.value.split(a).join(""):n.value;let l=n.value.split(s)[1];n.value=n.value.includes(s)?n.value+z.NUMBER_ZERO.repeat(o-l.length)+a:n.value+s+z.NUMBER_ZERO.repeat(o)+a,this._maskService.actualValue=n.value}}this._maskService.clearIfNotMatchFn()}this._isFocused.set(!1),this.onTouch()}onClick(t){if(!this._maskValue())return;let n=t.target,r=0,s=0;n!==null&&n.selectionStart!==null&&n.selectionStart===n.selectionEnd&&n.selectionStart>this._maskService.prefix.length&&t.keyCode!==38&&this._maskService.showMaskTyped&&!this.keepCharacterPositions()&&(this._maskService.maskIsShown=this._maskService.showMaskInInput(),n.setSelectionRange&&this._maskService.prefix+this._maskService.maskIsShown===n.value?(n.focus(),n.setSelectionRange(r,s)):n.selectionStart>this._maskService.actualValue.length&&n.setSelectionRange(this._maskService.actualValue.length,this._maskService.actualValue.length));let a=n&&(n.value===this._maskService.prefix?this._maskService.prefix+this._maskService.maskIsShown:n.value);if(n&&n.value!==a&&(n.value=a),n&&n.type!=="number"&&(n.selectionStart||n.selectionEnd)<=this._maskService.prefix.length){let o=this._maskService.maskExpression.match(new RegExp(`^[${this._maskService.specialCharacters.map(l=>`\\${l}`).join("")}]+`))?.[0].length||0;n.selectionStart=this._maskService.prefix.length+o;return}n&&n.selectionEnd>this._getActualInputLength()&&(n.selectionEnd=this._getActualInputLength())}onKeyDown(t){if(!this._maskValue())return;if(this._isComposing()){t.key==="Enter"&&this.onCompositionEnd(t);return}this._code.set(t.code?t.code:t.key);let n=t.target;if(this._inputValue.set(n.value),this._setMask(),n.type!=="number"){if(t.key===z.ARROW_UP&&t.preventDefault(),t.key===z.ARROW_LEFT||t.key===z.BACKSPACE||t.key===z.DELETE){if(t.key===z.BACKSPACE&&n.value.length===0&&(n.selectionStart=n.selectionEnd),t.key===z.BACKSPACE&&n.selectionStart!==0){let s=this.prefix().length,a=this.specialCharacters().length?this.specialCharacters():this._config.specialCharacters;if(s>1&&n.selectionStart<=s)n.setSelectionRange(s,n.selectionEnd);else if(this._inputValue().length!==n.selectionStart&&n.selectionStart!==1)for(;a.includes((this._inputValue()[n.selectionStart-1]??z.EMPTY_STRING).toString())&&(s>=1&&n.selectionStart>s||s===0);)n.setSelectionRange(n.selectionStart-1,n.selectionEnd)}this.checkSelectionOnDeletion(n),this._maskService.prefix.length&&n.selectionStart<=this._maskService.prefix.length&&n.selectionEnd<=this._maskService.prefix.length&&t.preventDefault();let r=n.selectionStart;t.key===z.BACKSPACE&&!n.readOnly&&r===0&&n.selectionEnd===n.value.length&&n.value.length!==0&&(this._position.set(this._maskService.prefix?this._maskService.prefix.length:0),this._maskService.applyMask(this._maskService.prefix,this._maskService.maskExpression,this._position()))}this.suffix()&&this.suffix().length>1&&this._inputValue().length-this.suffix().length"u"){(n===null||typeof n>"u"||n==="")&&(this._maskService.currentValue="",this._maskService.previousValue="");let s=n;if(typeof s=="number"||this._maskValue().startsWith(z.SEPARATOR)){s=String(s);let a=this._maskService.currentLocaleDecimalMarker();Array.isArray(this._maskService.decimalMarker)||(s=this._maskService.decimalMarker!==a?s.replace(a,this._maskService.decimalMarker):s),this._maskService.leadZero&&s&&this.mask()&&this.dropSpecialCharacters()!==!1&&(s=this._maskService._checkPrecision(this._maskService.maskExpression,s)),(this._maskService.decimalMarker===z.COMMA||Array.isArray(this._maskService.decimalMarker)&&this._maskService.thousandSeparator===z.DOT)&&(s=s.toString().replace(z.DOT,z.COMMA)),this.mask()?.startsWith(z.SEPARATOR)&&this.leadZero()&&requestAnimationFrame(()=>{this._maskService.applyMask(s?.toString()??"",this._maskService.maskExpression)}),this._maskService.isNumberValue=!0}(typeof s!="string"||n===null||typeof n>"u")&&(s=""),this._inputValue.set(s),this._setMask(),s&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?(this._maskService.writingValue=!0,this._maskService.formElementProperty=["value",this._maskService.applyMask(s,this._maskService.maskExpression)],this._maskService.writingValue=!1):this._maskService.formElementProperty=["value",s],this._inputValue.set(s)}else console.warn("Ngx-mask writeValue work with string | number, your current value:",typeof n)})}registerOnChange(t){this._maskService.onChange=this.onChange=t}registerOnTouched(t){this.onTouch=t}_getActiveElement(t=this.document){let n=t?.activeElement?.shadowRoot;return n?.activeElement?this._getActiveElement(n):t.activeElement}checkSelectionOnDeletion(t){let n=this.prefix().length,r=this.suffix().length,s=this._inputValue().length;t.selectionStart=Math.min(Math.max(n,t.selectionStart),s-r),t.selectionEnd=Math.min(Math.max(n,t.selectionEnd),s-r)}setDisabledState(t){this._maskService.formElementProperty=["disabled",t]}_applyMask(){this._maskService.maskExpression=this._maskService._repeatPatternSymbols(this._maskValue()||""),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue(),this._maskService.maskExpression)]}_validateTime(t){let n=this._maskValue().split(z.EMPTY_STRING).filter(r=>r!==":").length;return t&&(+(t[t.length-1]??-1)==0&&t.length{if(t.split(z.EMPTY_STRING).some(r=>this._maskService.specialCharacters.includes(r))&&this._inputValue()&&this._areAllCharactersInEachStringSame(this._maskExpressionArray())||t.includes(z.CURLY_BRACKETS_LEFT)){let r=this._maskService.removeMask(this._inputValue())?.length<=this._maskService.removeMask(t)?.length;if(r){let s=t.includes(z.CURLY_BRACKETS_LEFT)?this._maskService._repeatPatternSymbols(t):t;return this._maskValue.set(s),this._maskService.maskExpression=s,r}else{let s=this._maskExpressionArray()[this._maskExpressionArray().length-1]??z.EMPTY_STRING,a=s.includes(z.CURLY_BRACKETS_LEFT)?this._maskService._repeatPatternSymbols(s):s;this._maskValue.set(a),this._maskService.maskExpression=a}}else{let r=this._maskService.removeMask(t),s=this._maskService.removeMask(this._inputValue())?.split(z.EMPTY_STRING).every((a,o)=>{let l=r.charAt(o);return this._maskService._checkSymbolMask(a,l)});if(s||this._justPasted())return this._maskValue.set(t),this._maskService.maskExpression=t,s}})}_areAllCharactersInEachStringSame(t){let n=this._maskService.specialCharacters;function r(a){let o=new RegExp(`[${n.map(l=>`\\${l}`).join("")}]`,"g");return a.replace(o,"")}return t.map(r).every(a=>new Set(a).size===1)}static \u0275fac=function(n){return new(n||i)};static \u0275dir=Je({type:i,selectors:[["input","mask",""],["textarea","mask",""]],hostBindings:function(n,r){n&1&&Me("paste",function(){return r.onPaste()})("focus",function(a){return r.onFocus(a)})("ngModelChange",function(a){return r.onModelChange(a)})("input",function(a){return r.onInput(a)})("compositionstart",function(a){return r.onCompositionStart(a)})("compositionend",function(a){return r.onCompositionEnd(a)})("blur",function(a){return r.onBlur(a)})("click",function(a){return r.onClick(a)})("keydown",function(a){return r.onKeyDown(a)})},inputs:{mask:[1,"mask"],specialCharacters:[1,"specialCharacters"],patterns:[1,"patterns"],prefix:[1,"prefix"],suffix:[1,"suffix"],thousandSeparator:[1,"thousandSeparator"],decimalMarker:[1,"decimalMarker"],dropSpecialCharacters:[1,"dropSpecialCharacters"],hiddenInput:[1,"hiddenInput"],showMaskTyped:[1,"showMaskTyped"],placeHolderCharacter:[1,"placeHolderCharacter"],shownMaskExpression:[1,"shownMaskExpression"],clearIfNotMatch:[1,"clearIfNotMatch"],validation:[1,"validation"],separatorLimit:[1,"separatorLimit"],allowNegativeNumbers:[1,"allowNegativeNumbers"],leadZeroDateTime:[1,"leadZeroDateTime"],leadZero:[1,"leadZero"],triggerOnMaskChange:[1,"triggerOnMaskChange"],apm:[1,"apm"],inputTransformFn:[1,"inputTransformFn"],outputTransformFn:[1,"outputTransformFn"],keepCharacterPositions:[1,"keepCharacterPositions"],instantPrefix:[1,"instantPrefix"]},outputs:{maskFilled:"maskFilled"},exportAs:["mask","ngxMask"],features:[R0([{provide:pi,useExisting:i,multi:!0},{provide:Ba,useExisting:i,multi:!0},cc]),Ht]})}return i})(),IC=(()=>{class i{defaultOptions=j(lo);_maskService=j(cc);_maskExpressionArray=[];mask="";transform(t,n,a={}){var o=a,{patterns:r}=o,s=Ds(o,["patterns"]);let l=t,c=se(Z(Z({maskExpression:n},this.defaultOptions),s),{patterns:Z(Z({},this._maskService.patterns),r)});if(Object.entries(c).forEach(([h,d])=>{this._maskService[h]=d}),n.includes("||")){let h=n.split("||");return h.length>1?(this._maskExpressionArray=h.sort((d,u)=>d.length-u.length),this._setMask(`${l}`),this._maskService.applyMask(`${l}`,this.mask)):(this._maskExpressionArray=[],this._maskService.applyMask(`${l}`,this.mask))}if(n.includes(z.CURLY_BRACKETS_LEFT))return this._maskService.applyMask(`${l}`,this._maskService._repeatPatternSymbols(n));if(n.startsWith(z.SEPARATOR)){s.decimalMarker&&(this._maskService.decimalMarker=s.decimalMarker),s.thousandSeparator&&(this._maskService.thousandSeparator=s.thousandSeparator),s.leadZero&&(this._maskService.leadZero=s.leadZero),l=String(l);let h=this._maskService.currentLocaleDecimalMarker();Array.isArray(this._maskService.decimalMarker)||(l=this._maskService.decimalMarker!==h?l.replace(h,this._maskService.decimalMarker):l),this._maskService.leadZero&&l&&this._maskService.dropSpecialCharacters!==!1&&(l=this._maskService._checkPrecision(n,l)),this._maskService.decimalMarker===z.COMMA&&(l=l.replace(z.DOT,z.COMMA)),this._maskService.isNumberValue=!0}return l===null||typeof l>"u"?this._maskService.applyMask("",n):this._maskService.applyMask(`${l}`,n)}_setMask(t){this._maskExpressionArray.length>0&&this._maskExpressionArray.some(n=>{let r=this._maskService.removeMask(t)?.length<=this._maskService.removeMask(n)?.length;if(t&&r)return this.mask=n,r;this.mask=this._maskExpressionArray[this._maskExpressionArray.length-1]??z.EMPTY_STRING})}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=Oi({name:"mask",type:i,pure:!0})}return i})();var oR=(i,e)=>({"pull-left":i,"float-left":e}),lR=(i,e)=>({"pull-right":i,"float-right":e}),dc=(i,e)=>({disabled:i,currentPage:e}),cR=(i,e,t)=>({disabled:i,$implicit:e,currentPage:t});function hR(i,e){if(i&1){let t=At();D(0,"li",11)(1,"a",12),Me("click",function(r){ct(t);let s=ie();return ht(s.selectPage(1,r))}),xn(2,13),S()()}if(i&2){let t=ie(),n=li(13);jt("disabled",t.noPrevious()||t.disabled),k(2),q("ngTemplateOutlet",t.customFirstTemplate||n)("ngTemplateOutletContext",Mn(4,dc,t.noPrevious()||t.disabled,t.page))}}function dR(i,e){if(i&1){let t=At();D(0,"li",14)(1,"a",12),Me("click",function(r){ct(t);let s=ie();return ht(s.selectPage(s.page-1,r))}),xn(2,13),S()()}if(i&2){let t=ie(),n=li(11);jt("disabled",t.noPrevious()||t.disabled),k(2),q("ngTemplateOutlet",t.customPreviousTemplate||n)("ngTemplateOutletContext",Mn(4,dc,t.noPrevious()||t.disabled,t.page))}}function uR(i,e){if(i&1){let t=At();D(0,"li",15)(1,"a",12),Me("click",function(r){let s=ct(t).$implicit,a=ie();return ht(a.selectPage(s.number,r))}),xn(2,13),S()()}if(i&2){let t=e.$implicit,n=ie(),r=li(7);jt("active",t.active)("disabled",n.disabled&&!t.active),k(2),q("ngTemplateOutlet",n.customPageTemplate||r)("ngTemplateOutletContext",Pm(6,cR,n.disabled,t,n.page))}}function fR(i,e){if(i&1){let t=At();D(0,"li",16)(1,"a",12),Me("click",function(r){ct(t);let s=ie();return ht(s.selectPage(s.page+1,r))}),xn(2,13),S()()}if(i&2){let t=ie(),n=li(9);jt("disabled",t.noNext()||t.disabled),k(2),q("ngTemplateOutlet",t.customNextTemplate||n)("ngTemplateOutletContext",Mn(4,dc,t.noNext()||t.disabled,t.page))}}function pR(i,e){if(i&1){let t=At();D(0,"li",17)(1,"a",12),Me("click",function(r){ct(t);let s=ie();return ht(s.selectPage(s.totalPages,r))}),xn(2,13),S()()}if(i&2){let t=ie(),n=li(15);jt("disabled",t.noNext()||t.disabled),k(2),q("ngTemplateOutlet",t.customLastTemplate||n)("ngTemplateOutletContext",Mn(4,dc,t.noNext()||t.disabled,t.page))}}function gR(i,e){if(i&1&&T(0),i&2){let t=e.$implicit;B(t.text)}}function vR(i,e){if(i&1&&T(0),i&2){let t=ie();B(t.getText("next"))}}function mR(i,e){if(i&1&&T(0),i&2){let t=ie();B(t.getText("previous"))}}function wR(i,e){if(i&1&&T(0),i&2){let t=ie();B(t.getText("first"))}}function bR(i,e){if(i&1&&T(0),i&2){let t=ie();B(t.getText("last"))}}var BC=(()=>{class i{constructor(){this.main={itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"\xAB Previous",nextText:"Next \xBB",pageBtnClass:"",align:!0}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),yR={provide:pi,useExisting:k0(()=>CR),multi:!0},CR=(()=>{class i{constructor(t,n,r){this.elementRef=t,this.changeDetection=r,this.align=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.firstText="First",this.previousText="\xAB Previous",this.nextText="Next \xBB",this.lastText="Last",this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new he,this.pageChanged=new he,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=15,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=t,this.config||this.configureOptions(Object.assign({},n.main,n.pager))}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(t){this._itemsPerPage=t,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(t){this._totalItems=t,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(t){this._totalPages=t,this.numPages.emit(t),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(t){let n=this._page;this._page=t>this.totalPages?this.totalPages:t||1,this.changeDetection.markForCheck(),!(n===this._page||typeof n>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(t){this.config=Object.assign({},t)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(t){this.page=t,this.pages=this.getPages(this.page,this.totalPages)}getText(t){return this[`${t}Text`]||this.config[`${t}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}selectPage(t,n){n&&n.preventDefault(),this.disabled||(n&&n.target&&n.target.blur(),this.writeValue(t),this.onChange(this.page))}makePage(t,n,r){return{text:n,number:t,active:r}}getPages(t,n){let r=[],s=1,a=n,o=typeof this.maxSize<"u"&&this.maxSizen&&(a=n,s=a-this.maxSize+1)):(s=(Math.ceil(t/this.maxSize)-1)*this.maxSize+1,a=Math.min(s+this.maxSize-1,n)));for(let l=s;l<=a;l++){let c=this.makePage(l,l.toString(),l===t);r.push(c)}if(o&&!this.rotate){if(s>1){let l=this.makePage(s-1,"...",!1);r.unshift(l)}if(akf),multi:!0},kf=(()=>{class i{constructor(t,n,r){this.elementRef=t,this.changeDetection=r,this.align=!0,this.boundaryLinks=!1,this.directionLinks=!0,this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new he,this.pageChanged=new he,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=10,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=t,this.config||this.configureOptions(n.main)}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(t){this._itemsPerPage=t,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(t){this._totalItems=t,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(t){this._totalPages=t,this.numPages.emit(t),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(t){let n=this._page;this._page=t>this.totalPages?this.totalPages:t||1,this.changeDetection.markForCheck(),!(n===this._page||typeof n>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(t){this.config=Object.assign({},t)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(t){this.page=t,this.pages=this.getPages(this.page,this.totalPages)}getText(t){return this[`${t}Text`]||this.config[`${t}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}selectPage(t,n){n&&n.preventDefault(),this.disabled||(n&&n.target&&n.target.blur(),this.writeValue(t),this.onChange(this.page))}makePage(t,n,r){return{text:n,number:t,active:r}}getPages(t,n){let r=[],s=1,a=n,o=typeof this.maxSize<"u"&&this.maxSizen&&(a=n,s=a-this.maxSize+1)):(s=(Math.ceil(t/this.maxSize)-1)*this.maxSize+1,a=Math.min(s+this.maxSize-1,n)));for(let l=s;l<=a;l++){let c=this.makePage(l,l.toString(),l===t);r.push(c)}if(o&&!this.rotate){if(s>1){let l=this.makePage(s-1,"...",!1);r.unshift(l)}if(a{class i{static forRoot(){return{ngModule:i,providers:[]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i})}static{this.\u0275inj=Oe({imports:[An]})}}return i})();function AR(i,e){i&1&&le(0,"i-bs",8)}function _R(i,e){i&1&&le(0,"i-bs",9)}var ZC=(()=>{class i{constructor(){this.isCollapsed=!0}ngOnInit(){}mais(){this.isCollapsed=!this.isCollapsed}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Ue({type:i,selectors:[["card-busca"]],inputs:{maisInfo:"maisInfo"},standalone:!1,decls:51,vars:16,consts:[[1,"card-content"],[1,"upper-card"],["aria-controls","collapseBasic",1,"chevron",3,"click"],["name","chevron-down",4,"ngIf"],["name","chevron-up",4,"ngIf"],[1,"info"],["id","collapseBasic",3,"collapse","isAnimated"],[1,"mais-info-body"],["name","chevron-down"],["name","chevron-up"]],template:function(n,r){n&1&&(D(0,"div",0)(1,"div",1)(2,"button",2),Me("click",function(){return r.mais()}),ce(3,AR,1,0,"i-bs",3)(4,_R,1,0,"i-bs",4),S(),D(5,"p"),T(6,"Nome do aluno diplomado:"),S(),D(7,"label",5),T(8),S(),D(9,"p"),T(10,"CPF"),S(),D(11,"label",5),T(12),S()(),D(13,"div",6)(14,"div",7)(15,"p"),T(16,"Curso de gradua\xE7\xE3o:"),S(),D(17,"label"),T(18),S(),D(19,"p"),T(20,"IES Expedidora:"),S(),D(21,"label"),T(22),S(),D(23,"p"),T(24,"IES Registradora:"),S(),D(25,"label"),T(26),S(),D(27,"p"),T(28,"Data de Ingresso no curso:"),S(),D(29,"label"),T(30),S(),D(31,"p"),T(32,"Data de conclus\xE3o do curso:"),S(),D(33,"label"),T(34),S(),D(35,"p"),T(36,"Data de expedi\xE7\xE3o do diploma:"),S(),D(37,"label"),T(38),S(),D(39,"p"),T(40,"Data de registro do diploma:"),S(),D(41,"label"),T(42),S(),D(43,"p"),T(44,"N\xFAmero de Registro do diploma:"),S(),D(45,"label"),T(46),S(),D(47,"p"),T(48,"Data de publica\xE7\xE3o no Di\xE1rio Oficial da Uni\xE3o - D.O.U:"),S(),D(49,"label"),T(50),S()()()()),n&2&&(k(2),Ft("aria-expanded",!r.isCollapsed),k(),q("ngIf",r.isCollapsed),k(),q("ngIf",!r.isCollapsed),k(4),B(r.maisInfo.nomeAluno),k(4),B(r.maisInfo.cpfAluno),k(),q("collapse",r.isCollapsed)("isAnimated",!0),k(5),B(r.maisInfo.nomeCursoEMEC),k(4),B(r.maisInfo.nomeInstituicaoExpedidoraEMEC),k(4),B(r.maisInfo.nomeInstituicaoRegistraEMEC),k(4),B(r.maisInfo.dataIngressoCurso),k(4),B(r.maisInfo.dataConclusaoCurso),k(4),B(r.maisInfo.dataExpedicaoDiploma),k(4),B(r.maisInfo.dataRegistroDiploma),k(4),B(r.maisInfo.numRegistroDiplomaSIA),k(4),B(r.maisInfo.dataRegistroDOU))},dependencies:[_t,Wi,lc],styles:[".card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem;color:#3d3d3d;margin-bottom:.438rem}.card-content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%], .card-content[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;color:#3117d6;font-size:1rem;margin-bottom:.875rem}.card-content[_ngcontent-%COMP%] .upper-card[_ngcontent-%COMP%]{padding:1.5rem 1.5rem 2.1888rem}.card-content[_ngcontent-%COMP%] .upper-card[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:last-child{margin-bottom:0}.card-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{border:none;background:none;position:absolute;margin-right:7%;right:0}.card-content[_ngcontent-%COMP%] .mais-info-body[_ngcontent-%COMP%]{background-color:#f8f8f8;padding:1.375rem 1.875rem 3.063rem}.card-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]:hover{cursor:pointer;filter:brightness(.9)}"]})}}return i})();function DR(i,e){if(i&1&&(D(0,"option",27),T(1),S()),i&2){let t=e.$implicit;q("value",t.codInstituicao),k(),B(t.nome)}}function ER(i,e){if(i&1&&(D(0,"h1",28),T(1),S()),i&2){let t=ie();k(),Rt("Resultado da busca: ",t.buscaForm.controls.Nome.value,"")}}function VR(i,e){i&1&&(D(0,"div")(1,"h5",29),T(2,"Nenhum resultado encontrado. =("),S()())}function TR(i,e){if(i&1&&(D(0,"div",30)(1,"div",31),le(2,"card-busca",32),S()()),i&2){let t=e.$implicit;k(2),q("maisInfo",t)}}function LR(i,e){if(i&1){let t=At();D(0,"pagination",33),Me("pageChanged",function(r){ct(t);let s=ie();return ht(s.pageChanged(r))}),S()}if(i&2){let t=ie();q("totalItems",t.resultadosBusca==null?null:t.resultadosBusca.total_record_count)("itemsPerPage",t.resultadosBusca==null?null:t.resultadosBusca.page_size)("maxSize",20)}}var jC=(()=>{class i{constructor(t,n,r){this._formBuilder=t,this.spinner=n,this._busca=r,this.isCollapsed=!0,this.captcha="",this.buscaForm=this._formBuilder.group({Instituicao:["Selecione uma institui\xE7\xE3o",fi.required],Nome:["",fi.required],Captcha:["",fi.required]})}ngOnInit(){this.generateCaptcha(),this._busca.getInstituicao(this.ies.codigo).subscribe(t=>{let n=t.listarTodasInstituicoesEnsinoResult.instituicaoEnsinoDTO;n.length>0&&(this.instituicoes=n.sort((r,s)=>r.nome>s.nome?1:-1),n.length==1&&this.buscaForm.controls.Instituicao.setValue(n[0].codInstituicao))},t=>{console.log(t)})}generateCaptcha(){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZ",n="0123456789",r=4,s="";for(;r--;)this.rand(2)===0?s+=t[this.rand(t.length)]:s+=n[this.rand(n.length)];this.captcha=s}rand(t){return Math.floor(Math.random()*t)}buscar(t,n,r){this.spinnerFunction(),setTimeout(()=>{if(r&&r.preventDefault(),this.validacao()){let s={codCurso:null,codInstituicaoEnsino:parseInt(this.buscaForm.controls.Instituicao.value),nomeAluno:this.buscaForm.controls.Nome.value,numRegistroDiploma:null};this._busca.getResultado(s,t,n).subscribe(a=>{this.resultadosBusca=a,setTimeout(()=>{document.getElementById("Resultado").scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},250),this.isCollapsed=!1},a=>{console.log(a)})}else return},1e3)}pageChanged(t){this.buscar(t.itemsPerPage,t.page)}validacao(){let t=document.getElementById("error-message-instituicao"),n=document.getElementById("error-message-nome"),r=document.getElementById("error-message-captcha"),s=document.getElementById("input-instituicao"),a=document.getElementById("input-nome"),o=document.getElementById("input-captcha");return t.style.display="none",n.style.display="none",r.style.display="none",s.style.boxShadow="none",a.style.boxShadow="none",o.style.boxShadow="none",this.captcha==this.buscaForm.controls.Captcha.value?(this.buscaForm.controls.Instituicao.value==="Selecione uma institui\xE7\xE3o"&&(t.style.display="block",t.innerHTML="Selecione uma institui\xE7\xE3o",t.classList.add("hasError","hasErrorInstituicao"),s.style.boxShadow="0 0 5px red"),!!this.buscaForm.controls.Nome.value):(r.style.display="block",r.innerHTML="Captcha incorreto!",r.style.color="red",r.classList.add("hasError"),o.style.boxShadow="0 0 5px red",!1)}spinnerFunction(){this.spinner.show(),setTimeout(()=>{this.spinner.hide()},2e3)}static{this.\u0275fac=function(n){return new(n||i)(Y(D2),Y(oo),Y(ps))}}static{this.\u0275cmp=Ue({type:i,selectors:[["busca"]],inputs:{ies:"ies"},standalone:!1,decls:37,vars:12,consts:[[1,"row"],[1,"col-md-7","col-lg-6","col-xl-5"],[1,"campo"],["name","nameForm",3,"ngSubmit","formGroup"],[3,"hidden"],["id","input-instituicao","formControlName","Instituicao",1,"form-select"],["selected","","disabled",""],[3,"value",4,"ngFor","ngForOf"],["id","error-message-instituicao",2,"display","none"],["href","#"],[1,"mb-2"],["type","text","id","input-nome","formControlName","Nome",1,"form-control"],["id","error-message-nome",2,"display","none"],["type","text","id","input-captcha","formControlName","Captcha","mask","AAAA",1,"form-captcha"],["id","error-message-captcha",2,"display","none"],["type","submit","aria-controls","collapseBasic",1,"btn","btn-pesquisar",3,"disabled"],[1,"col-md-5","col-lg-6","col-xl-7","image-container","d-none","d-md-flex"],["src","assets/images/pesquisa.svg"],["id","Resultado"],["id","collapseBasic",3,"collapse","isAnimated"],[1,"row","container-resultado"],[1,"col-md-12"],["class","title",4,"ngIf"],[4,"ngIf"],["class","col-md-5",4,"ngFor","ngForOf"],[1,"paginacao"],[3,"totalItems","itemsPerPage","maxSize","pageChanged",4,"ngIf"],[3,"value"],[1,"title"],[1,"mt-4"],[1,"col-md-5"],[1,"card"],[3,"maisInfo"],[3,"pageChanged","totalItems","itemsPerPage","maxSize"]],template:function(n,r){n&1&&(D(0,"div",0)(1,"div",1)(2,"div",2)(3,"form",3),Me("ngSubmit",function(a){return r.buscar(10,1,a)}),D(4,"div",4)(5,"p"),T(6,"Selecione uma institui\xE7\xE3o"),S(),D(7,"select",5)(8,"option",6),T(9,"Selecione uma institui\xE7\xE3o"),S(),ce(10,DR,2,2,"option",7),S(),le(11,"label",8),S(),D(12,"p"),T(13,"Busque pelo seu nome completo ou o n\xFAmero de registro"),S(),D(14,"a",9),T(15,"N\xE3o achei o c\xF3digo, e agora?"),S(),D(16,"div",10),le(17,"input",11),S(),le(18,"label",12),D(19,"div",10),le(20,"input",13),D(21,"span"),T(22),S()(),le(23,"label",14),D(24,"button",15),T(25," Pesquisar "),S()()()(),D(26,"div",16),le(27,"img",17),S()(),D(28,"div",18)(29,"div",19)(30,"div",20)(31,"div",21),ce(32,ER,2,1,"h1",22)(33,VR,3,0,"div",23),S(),ce(34,TR,3,1,"div",24),D(35,"div",25),ce(36,LR,1,3,"pagination",26),S()()()()),n&2&&(k(3),q("formGroup",r.buscaForm),k(),q("hidden",(r.instituicoes==null?null:r.instituicoes.length)===1),k(6),q("ngForOf",r.instituicoes),k(12),B(r.captcha),k(2),q("disabled",r.buscaForm.invalid),Ft("aria-expanded",!r.isCollapsed),k(5),q("collapse",r.isCollapsed)("isAnimated",!0),k(3),q("ngIf",(r.resultadosBusca==null?null:r.resultadosBusca.records.length)>0),k(),q("ngIf",(r.resultadosBusca==null?null:r.resultadosBusca.records.length)==0),k(),q("ngForOf",r.resultadosBusca==null?null:r.resultadosBusca.records),k(2),q("ngIf",(r.resultadosBusca==null?null:r.resultadosBusca.total_record_count)>10))},dependencies:[A1,_t,Wi,kf,_2,dy,fy,y2,S2,ny,C2,G4,W4,hc,ZC],styles:['.paginacao[_ngcontent-%COMP%]{margin:1rem;display:flex;justify-content:center}.campo[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:700;font-size:1.125rem;line-height:1.313rem;color:#4a4a4a;margin-bottom:1.625rem}.campo[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;position:absolute;margin-top:-1.5rem;font-size:.75rem;color:#6184fe}.campo[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .form-select[_ngcontent-%COMP%], .campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:2.688rem;font-family:Roboto;font-weight:400;font-size:.875rem;line-height:1rem;color:#575757;background-color:#f3f3f3;outline:none;border:none}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .form-select[_ngcontent-%COMP%]{margin-bottom:1.625rem;border:.063rem solid #e1e1e1;border-radius:.313rem}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .form-captcha[_ngcontent-%COMP%]{width:7.125rem;margin-right:.313rem;padding:.5rem .75rem}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:.063rem solid #e1e1e1;border-radius:.313rem}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;background-color:#ffba52;font-weight:700;color:#4a4a4a}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{filter:brightness(.9);cursor:pointer!important}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus, .campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{box-shadow:0 1px 2px #0006}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .hasError[_ngcontent-%COMP%]{color:red;font-size:13px;margin:-8px 0 5px}.campo[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .hasErrorInstituicao[_ngcontent-%COMP%]{margin:-24px 0 10px}.image-container[_ngcontent-%COMP%]{align-items:center;justify-content:flex-end}@media screen and (max-width: 767px){.image-container[_ngcontent-%COMP%]{margin-top:1.5rem}}.image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:65%}.container-resultado[_ngcontent-%COMP%]{background-color:#fff;padding-bottom:6.25rem}@media screen and (min-width: 768px){.container-resultado[_ngcontent-%COMP%]{padding-bottom:0}}.container-resultado[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{position:relative;font-weight:700;font-size:2rem;line-height:2.31rem;color:#373737;margin:5rem 0 1.625rem}@media screen and (min-width: 768px){.container-resultado[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:8rem 0 1.625rem}}.container-resultado[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-.438rem;height:.25rem;width:4.063rem;background-color:#ffb934}.container-resultado[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{margin-bottom:1.313rem}']})}}return i})();var uc=(()=>{class i{constructor(t){this.document=t,this.domainList=[{codigo:1,name:"Est\xE1cio",path:"estacio",identifier:"localhost",url:"localhost"},{codigo:1,name:"Est\xE1cio",path:"estacio",identifier:".estacio.",url:"estacio.br"},{codigo:3,name:"IBMEC",path:"ibmec",identifier:".ibmec.",url:"ibmec.br"},{codigo:4,name:"Faculdade Dam\xE1sio",path:"damasio",identifier:".damasio.",url:"faculdadedamasio.com.br"},{codigo:4,name:"Faculdade Dam\xE1sio",path:"damasio",identifier:".faculdadedamasio.",url:"faculdadedamasio.com.br"},{codigo:5,name:"Area 1",path:"area1",identifier:".area1.",url:"area1.br"},{codigo:2,name:"Unitoledo",path:"unitoledo",identifier:".unitoledo.",url:"unitoledo.br"},{codigo:6,name:"UniFanor",path:"unifanor",identifier:".unifanor.",url:"unifanor.com.br"},{codigo:7,name:"UniFBV",path:"unifbv",identifier:".unifbv.",url:"unifbv.com.br"},{codigo:8,name:"UniFacid",path:"unifacid",identifier:".unifacid.",url:"unifacid.com.br"},{codigo:9,name:"Faculdade Martha Falc\xE3o",path:"fmf",identifier:".fmfeducacional.",url:"fmfeducacional.com.br"},{codigo:10,name:"Faculdade Faci",path:"faci",identifier:".facieducacional.",url:"facieducacional.com.br"},{codigo:11,name:"UniMetrocamp",path:"unimetrocamp",identifier:".unimetrocamp.",url:"unimetrocamp.com.br"},{codigo:12,name:"Facimp",path:"facimp",identifier:".facimp.",url:"facimp.com.br"},{codigo:13,name:"UniRuy",path:"uniruy",identifier:".uniruy.",url:"uniruy.com.br"},{codigo:14,name:"UniFavip",path:"unifavip",identifier:".unifavip.",url:"unifavip.com.br"},{codigo:17,name:"Newton Paiva",path:"newton",identifier:".newtonpaiva.",url:"newtonpaiva.br"}]}getIES(){let t=this.domainList.find(n=>this.document.domain.indexOf(n.identifier)>-1);return t||(t=this.domainList.find(n=>n.identifier==="localhost")),t}gatFavicon(t){this.document.getElementById("icon")?.setAttribute("href",`assets/ies/${t}/favicon.png`)}static{this.\u0275fac=function(n){return new(n||i)(ee($e))}}static{this.\u0275prov=Q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var fc=(()=>{class i{constructor(t){this.document=t}ngOnInit(){"ies"in sessionStorage&&(this.ies=JSON.parse(sessionStorage.ies)),this.document.gatFavicon(this.ies.path),this.ies.codigo!==5?this.logo=`assets/ies/${this.ies.path}/logo.svg`:this.logo=`assets/ies/${this.ies.path}/logo.png`}static{this.\u0275fac=function(n){return new(n||i)(Y(uc))}}static{this.\u0275cmp=Ue({type:i,selectors:[["navbar"]],standalone:!1,decls:6,vars:4,consts:[[1,"navbar","navbar-expand-lg",3,"ngClass"],[1,"container"],[1,"row"],[1,"navbar-brand"],["routerLink",""],[3,"src","alt"]],template:function(n,r){n&1&&(D(0,"nav",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),le(5,"img",5),S()()()()()),n&2&&(q("ngClass",r.ies.path),k(5),E6("alt","Logo ",r.ies.name,""),q("src",r.logo,Or))},dependencies:[d0,nc],styles:[".navbar-brand[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:56px}"]})}}return i})();var PR=i=>({estacioSubHeader:i});function kR(i,e){i&1&&(be(0),D(1,"div",4)(2,"p"),T(3,"N\xE3o permitido!"),S()(),ye())}function HR(i,e){i&1&&(D(0,"div",33)(1,"alert",34),T(2,"Diploma n\xE3o encontrado"),S()()),i&2&&(k(),q("type","danger")("dismissible",!0))}function FR(i,e){if(i&1){let t=At();D(0,"div",35),Me("click",function(){let r=ct(t).index,s=ie(2);return ht(s.clicouPesquisar(r))}),D(1,"label"),T(2),S(),le(3,"img",36),S()}if(i&2){let t=e.$implicit;k(2),B(t)}}function RR(i,e){if(i&1){let t=At();D(0,"div",37)(1,"div",38),Me("click",function(){ct(t);let r=ie(2);return ht(r.clicouVoltar())}),le(2,"img",39),D(3,"label"),T(4,"Voltar"),S()(),le(5,"busca",27),S()}if(i&2){let t=ie(2);k(5),q("ies",t.ies)}}function OR(i,e){if(i&1){let t=At();D(0,"div",37)(1,"div",38),Me("click",function(){ct(t);let r=ie(2);return ht(r.clicouVoltar())}),le(2,"img",39),D(3,"label"),T(4,"Voltar"),S()(),D(5,"div")(6,"h3"),T(7,"QRCODE"),S(),D(8,"p"),T(9,"Abra a camera do seu celular e aponte para o QRCODE do seu diploma"),S()(),D(10,"section",40)(11,"div",41)(12,"div",42)(13,"h1",30),T(14,"Onde encontro o QRCODE no diploma?"),S()(),D(15,"div",42)(16,"p"),T(17,"Frente"),S(),le(18,"img",43),S(),D(19,"div",44)(20,"div")(21,"p"),T(22,"Verso"),S(),le(23,"img",45),S()()()()()}}function IR(i,e){i&1&&(D(0,"div",33)(1,"alert",34),T(2,"Diploma n\xE3o encontrado"),S()()),i&2&&(k(),q("type","danger")("dismissible",!0))}function BR(i,e){if(i&1){let t=At();D(0,"div",37)(1,"div",38),Me("click",function(){ct(t);let r=ie(2);return ht(r.clicouVoltar())}),le(2,"img",39),D(3,"label"),T(4,"Voltar"),S()(),D(5,"div",46)(6,"div",47)(7,"div",13)(8,"div",14)(9,"div"),le(10,"img",15),S(),D(11,"p"),T(12,"DIPLOMA DIGITAL"),S()()(),D(13,"form",16),Me("submit",function(){ct(t);let r=li(15),s=ie(2);return ht(s.buscaDigital(r.value))}),le(14,"input",17,0),D(16,"button",18),le(17,"i-bs",19),S()(),ce(18,IR,3,2,"div",20),S()()()}if(i&2){let t=ie(2);k(18),q("ngIf",t.erroDiploma)}}function NR(i,e){i&1&&(D(0,"section",40)(1,"div",6)(2,"div",13)(3,"div",26)(4,"h1",48),T(5,"Onde encontro o c\xF3digo no diploma?"),S(),D(6,"h1",49),T(7,"Onde encontro o c\xF3digo e o QRCODE no diploma?"),S()(),D(8,"div",50)(9,"p"),T(10,"Frente"),S(),le(11,"img",43),S(),D(12,"div",51)(13,"div")(14,"p"),T(15,"Verso"),S(),le(16,"img",45),S()()()()())}function ZR(i,e){i&1&&le(0,"i-bs",57)}function jR(i,e){i&1&&le(0,"i-bs",58)}function UR(i,e){if(i&1){let t=At();D(0,"accordion-group",52),Me("click",function(){let r=ct(t).index,s=ie(2);return ht(s.open(r))}),D(1,"div",53),T(2),D(3,"span",54),ce(4,ZR,1,0,"i-bs",55)(5,jR,1,0,"i-bs",56),S()(),D(6,"p"),T(7),S()()}if(i&2){let t=e.$implicit,n=e.index,r=ie(2);k(2),Rt(" ",t.duvida," "),k(2),q("ngIf",!r.opened[n]),k(),q("ngIf",r.opened[n]),k(2),B(t.texto)}}function $R(i,e){if(i&1){let t=At();be(0),le(1,"navbar"),D(2,"section",5)(3,"div",6)(4,"div",7)(5,"div",8)(6,"div")(7,"h1"),T(8,"Busca de Informa\xE7\xF5es de Registro de Diplomas"),S(),D(9,"p",9),T(10),S(),D(11,"p",10),T(12,"Selecione o nome completo do aluno ou o n\xFAmero de registro do diploma."),S()()(),D(13,"div",11)(14,"div",12)(15,"div",13)(16,"div",14)(17,"div"),le(18,"img",15),S(),D(19,"p"),T(20,"DIPLOMA DIGITAL"),S()()(),D(21,"form",16),Me("submit",function(){ct(t);let r=li(23),s=ie();return ht(s.buscaDigital(r.value))}),le(22,"input",17,0),D(24,"button",18),le(25,"i-bs",19),S()(),ce(26,HR,3,2,"div",20),S()()()()(),D(27,"section",21)(28,"div",6)(29,"div",13)(30,"div",22),ce(31,FR,4,1,"div",23)(32,RR,6,1,"div",24)(33,OR,24,0,"div",24)(34,BR,19,1,"div",24),S()()()(),D(35,"section",25)(36,"div",6)(37,"div",13)(38,"div",26),le(39,"busca",27),S()()()(),ce(40,NR,17,0,"section",28),D(41,"section",29)(42,"div",6)(43,"div",13)(44,"div",26)(45,"h1",30),T(46,"D\xFAvidas frequentes"),S()(),D(47,"div",26)(48,"accordion",31),ce(49,UR,8,4,"accordion-group",32),S()()()()(),ye()}if(i&2){let t=ie();k(2),q("ngClass",ml(11,PR,t.ies.codigo===1)),k(8),Rt(" Busca de Informa\xE7\xF5es de Registro de Diplomas Em atendimento \xE0 Portaria MEC n\xBA 1.095/2018, publicada no Di\xE1rio Oficial da Uni\xE3o em 26.10.2018, que disp\xF5e sobre a expedi\xE7\xE3o e o registro de diplomas de cursos superiores de gradua\xE7\xE3o no \xE2mbito do sistema federal de ensino, a ",t.ies.name," disponibiliza nesta p\xE1gina todos os Diplomas dos alunos que colaram grau a partir de 25.4.2019 para fins de verifica\xE7\xE3o de autenticidade. "),k(16),q("ngIf",t.erroDiploma),k(5),q("ngForOf",t.botaoPesquisa),k(),q("ngIf",t.indexBotao!==null),k(),q("ngIf",t.indexBotao===0),k(),q("ngIf",t.indexBotao===2),k(5),q("ies",t.ies),k(),q("ngIf",t.indexBotao===null),k(8),q("isAnimated",!0),k(),q("ngForOf",t.faq.duvidas)}}var qC=(()=>{class i{constructor(t,n,r,s){this.formBuilder=t,this._busca=n,this.route=r,this.spinner=s,this.isLoading=!1,this.opened=[],this.pesquisarTipo=[!1,!1,!1],this.indexBotao=null,this.botaoPesquisa=["Ler QRCODE","Buscar por Nome ou N\xFAmero do Registro","Buscar por N\xFAmero de Registro"],this.botaoVoltar=!1,this.erroDiploma=!1,this.faq={texto:"Busca de Informa\xE7\xF5es de Registro de Diplomas Em atendimento \xE0 Portaria MEC n\xBA 1.095/2018, publicada no Di\xE1rio Oficial da Uni\xE3o em 26.10.2018, que disp\xF5e sobre a expedi\xE7\xE3o e o registro de diplomas de cursos superiores de gradua\xE7\xE3o no \xE2mbito do sistema federal de ensino, a $INSTITUICAO disponibiliza nesta p\xE1gina todos os Diplomas dos alunos que colaram grau a partir de 25.4.2019 para fins de verifica\xE7\xE3o de autenticidade.",duvidas:[{duvida:"1. O que \xE9 o diploma digital?",texto:"Diploma digital de curso superior de gradua\xE7\xE3o \xE9 aquele que tem sua exist\xEAncia, sua emiss\xE3o e seu armazenamento inteiramente no meio digital, e cuja validade jur\xEDdica \xE9 presumida mediante a assinatura com certifica\xE7\xE3o digital e carimbo de tempo na Infraestrutura de Chaves P\xFAblicas Brasileira - ICP-Brasil, conforme os par\xE2metros do Padr\xE3o Brasileiro de Assinaturas Digitais \u2013 PBAD. Assim, o Diploma Digital \xE9 a representa\xE7\xE3o eletr\xF4nica do diploma de conclus\xE3o de curso de gradua\xE7\xE3o. De acordo com a Portaria n\xBA 544, de 11.3.2019, publicada no Di\xE1rio Oficial da Uni\xE3o no dia 12.3.2019, que disp\xF5e sobre a emiss\xE3o e o registro de diploma de gradua\xE7\xE3o, por meio digital, todas as institui\xE7\xF5es de ensino superior p\xFAblicas e privadas pertencentes ao Sistema Federal de Ensino dever\xE3o emitir o Diploma Digital, que ser\xE1 um documento com exist\xEAncia, emiss\xE3o e armazenamento integralmente digitais."},{duvida:"2. Quando poderei ter o meu Diploma Digital?",texto:"Cada IES ir\xE1 elaborar um cronograma de implementa\xE7\xE3o, respeitando sua autonomia, de modo que em dezembro de 2021 esteja em plena atividade a emiss\xE3o e/ou registro de diploma no formato digital. Dessa maneira, a partir de 1\xBA janeiro de 2022, todo diploma de gradua\xE7\xE3o no Brasil ser\xE1 digital."},{duvida:"3. Depois de formado, sendo um ex-aluno, como ser\xE1 o meu acesso ao diploma?",texto:"A IES deve garantir a consulta e a valida\xE7\xE3o do Diploma Digital bem como a disponibilidade de acesso ao ambiente virtual institucional por interm\xE9dio de um endere\xE7o eletr\xF4nico destinado exclusivamente a institui\xE7\xF5es de ensino, onde ser\xE3o poss\xEDveis o acesso ao XML do Diplomado bem como a gera\xE7\xE3o e o download da Representa\xE7\xE3o Visual do Diploma Digital (RVDD), a qualquer tempo."},{duvida:"4. Diploma Digital e diploma impresso t\xEAm o mesmo valor jur\xEDdico?",texto:"Sim. O uso do ICP-Brasil ao longo de todo o processo garante a que o Diploma Digital tenha todas as garantia e validade do documento f\xEDsico. A diferen\xE7a est\xE1 na seguran\xE7a e facilidade para verifica\xE7\xE3o, que evita fraudes ao refor\xE7ar a seguran\xE7a para registro e emiss\xE3o de diplomas digitais."},{duvida:"5. O diploma f\xEDsico perder\xE1 sua validade com o diploma digital?",texto:"N\xE3o. O diploma f\xEDsico j\xE1 emitido n\xE3o perde sua validade. A quest\xE3o \xE9 que um diploma j\xE1 emitido e registrado de modo digital ter\xE1 toda sua exist\xEAncia neste meio eletr\xF4nico. O diploma digital \xE9 um documento oficial, juridicamente v\xE1lido, tanto quanto o f\xEDsico. Por ser um documento nato digital, ser\xE1 emitido, registrado no formato digital e sempre ser\xE1 acessado de forma eletr\xF4nica. Apesar de ser um documento em XML, haver\xE1 uma representa\xE7\xE3o visual (RVDD) que ser\xE1 sua interface \u2013 e por meio de um QR Code ou uma URL, poder\xE1 ser validado digitalmente de forma pr\xE1tica, r\xE1pida e segura."},{duvida:"6. Possuo o diploma f\xEDsico, terei que solicitar o diploma digital?",texto:"N\xE3o. Os diplomas emitidos no formato f\xEDsico n\xE3o precisam ser substitu\xEDdos ou reemitidos. A partir do dia 1.1.2022, todas as Institui\xE7\xF5es de Ensino Superior dever\xE3o emitir seus diplomas no formato digital. Ap\xF3s esta implanta\xE7\xE3o, as institui\xE7\xF5es n\xE3o ir\xE3o mais emitir os diplomas em formato f\xEDsico para os cursos de gradua\xE7\xE3o."},{duvida:"7. \xC9 poss\xEDvel imprimir o Diploma Digital?",texto:"\xC9 poss\xEDvel apenas imprimir a Representa\xE7\xE3o Visual do Diploma Digital (RVDD). Entretanto, a RVDD n\xE3o poder\xE1 ser considerada como o diploma. A representa\xE7\xE3o visual do Diploma Digital n\xE3o substitui o diploma digital no padr\xE3o XML podendo ser utilizado o modelo adotado pela IES para diploma em meio f\xEDsico, acrescido dos mecanismos de acesso ao XML do diploma digital assinado, mas este n\xE3o \xE9 do Diploma Digital."},{duvida:"8. O diploma digital impresso ter\xE1 validade jur\xEDdica?",texto:"N\xE3o, uma vez que s\xF3 \xE9 poss\xEDvel assegurar a validade jur\xEDdica de documentos digitalmente assinados por meio da verifica\xE7\xE3o da certifica\xE7\xE3o digital, que \xE9 desenvolvida para o meio eletr\xF4nico. A assinatura digital \xE9 um conjunto de dados criptogr\xE1ficos incorporados a um documento. Desta forma, a valida\xE7\xE3o da assinatura digital de um documento precisa ser feita no ambiente digital, uma vez que h\xE1 necessidade de softwares e sistemas espec\xEDficos para ler e compreender estes dados criptografados."},{duvida:"9. O que \xE9 XML?",texto:"O XML P\xFAblico, al\xE9m da Representa\xE7\xE3o Visual do Diploma Digital \u2013 RVDD, \xE9 um conjunto de informa\xE7\xF5es adicionais que o formado ter\xE1 acesso ao buscar sua RVDD atrav\xE9s do link disponibilizado pela IES, assim como: dados da IES emissora (Endere\xE7o da mantenedora, credenciamento e recredenciamento); Registro do diploma (Dados da IES registradora e livro de registro) e Informa\xE7\xF5es sobre o curso conclu\xEDdo (Autoriza\xE7\xE3o do curso, habilita\xE7\xE3o, reconhecimento e renova\xE7\xE3o)."},{duvida:"10. O que \xE9 RVDD?",texto:"A RVDD \xE9 a Representa\xE7\xE3o Visual do Diploma Digital, ou seja, \xE9 a interface entre o meio digital e o meio f\xEDsico para o Diploma Digital, preservando as caracter\xEDsticas dos diplomas emitidos pela Institui\xE7\xE3o de Ensino. A RVDD, apesar de n\xE3o ser o diploma, apresenta uma interface que, com aux\xEDlio do QR-Code ou do c\xF3digo de valida\xE7\xE3o, possibilita a autenticidade do documento de forma r\xE1pida, pr\xE1tica e segura. A representa\xE7\xE3o visual do diploma digital deve zelar pela exatid\xE3o e fidedignidade das informa\xE7\xF5es prestadas no XML do Diploma Digital, garantindo a qualidade da imagem e a integridade de seu texto bem como possibilitando ao diplomado exibir, compartilhar e armazenar esta imagem."},{duvida:"11. Meus dados pessoais ficar\xE3o expostos no diploma digital?",texto:"N\xE3o. Apenas os dados que vinculam voc\xEA ao grau que lhe foi outorgado."},{duvida:"12. Qual \xE9 o prazo de confec\xE7\xE3o do diploma digital?",texto:"Os artigos 18 e 19 da Portaria MEC n\xBA 1.095, de 25 de outubro de 2018, preveem que a IES dever\xE1 expedir o diploma no prazo m\xE1ximo de sessenta dias, contados da cola\xE7\xE3o de grau do egresso, e dever\xE1 registrar o diploma no prazo m\xE1ximo de sessenta dias, contados da data de expedi\xE7\xE3o do diploma."},{duvida:"13. Em caso de necessidade de entrega f\xEDsica do diploma, como proceder?",texto:"De acordo com a Portaria MEC n\xBA 117, de 26.2.2021, todas as Institui\xE7\xF5es de ensino Superior dever\xE3o emitir seus diplomas no formato digital. Ap\xF3s esta implanta\xE7\xE3o, as institui\xE7\xF5es n\xE3o ir\xE3o mais emitir os diplomas em formato f\xEDsico para os cursos de gradua\xE7\xE3o."},{duvida:"14. A emiss\xE3o do diploma digital ocorrer\xE1 logo ap\xF3s a finaliza\xE7\xE3o do meu curso e sem necessidade de solicita\xE7\xE3o?",texto:"Sim, sem necessidade de nenhuma solicita\xE7\xE3o. Ao concluir a cola\xE7\xE3o de grau, o diploma digital ficar\xE1 dispon\xEDvel na \xC1rea do Aluno no site da Institui\xE7\xE3o. Al\xE9m disso, voc\xEA receber\xE1 um e-mail informando sobre a disponibilidade do documento. Cabe ressaltar a import\xE2ncia de manter o e-mail e demais dados de contato atualizados, para que voc\xEA receba esta e outras informa\xE7\xF5es."},{duvida:"15. Participei de um concurso p\xFAblico e est\xE3o me pedindo o documento f\xEDsico, o que devo fazer?",texto:"\xC9 poss\xEDvel fazer a impress\xE3o da Representa\xE7\xE3o Visual do Diploma Digital (RVDD), que n\xE3o poder\xE1 ser considerada como o diploma. A representa\xE7\xE3o visual do Diploma Digital n\xE3o substitui o diploma digital no padr\xE3o XML podendo ser utilizado o modelo adotado pela IES para diploma em meio f\xEDsico, acrescido dos mecanismos de acesso ao XML do diploma digital assinado, mas este n\xE3o \xE9 do Diploma Digital. A valida\xE7\xE3o dessa impress\xE3o pode ser feita pelos dispositivos de valida\xE7\xE3o em meio eletr\xF4nico, quais sejam: c\xF3digo de valida\xE7\xE3o (dispon\xEDvel no canto inferior direito da frente do diploma) ou QR Code (dispon\xEDvel no canto inferior direito do verso do diploma)."},{duvida:"16. Mesmo que haja pagamento de taxa extra, eu desejo meu diploma f\xEDsico. Haver\xE1 essa possibilidade?",texto:"Em atendimento \xE0 legisla\xE7\xE3o, n\xE3o haver\xE1 mais a emiss\xE3o de diplomas f\xEDsicos pela Institui\xE7\xE3o."},{duvida:"17. Com o Diploma Digital, vai acabar a cola\xE7\xE3o de grau ou n\xE3o vou receber mais nada em minha cola\xE7\xE3o de grau?",texto:"N\xE3o. Toda tradi\xE7\xE3o ao diploma e respeito \xE0 autonomia institucional est\xE3o preservados no Diploma Digital. A cola\xE7\xE3o de grau confere a outorga do t\xEDtulo e nada muda com o Diploma Digital. O Diploma Digital ter\xE1 uma Representa\xE7\xE3o Visual do Diploma Digital (RVDD) que, apesar de n\xE3o ser o diploma, ter\xE1 as mesmas caracter\xEDsticas do diploma f\xEDsico que voc\xEA conhece e que sua institui\xE7\xE3o adota. A diferen\xE7a \xE9 que esta representa\xE7\xE3o visual ter\xE1 dois mecanismos para fazer essa liga\xE7\xE3o do mundo real para o virtual. Al\xE9m disso, est\xE1 garantido a IES o uso layout e template que adotam no diploma f\xEDsico na RVDD."}]}}ngOnInit(){"ies"in sessionStorage&&(this.ies=JSON.parse(sessionStorage.getItem("ies")));for(var t=0;t{this.diplomaDigital=n,this.isLoading=!1,this.diplomaDigital?(sessionStorage.setItem("diplomaDigital",JSON.stringify(this.diplomaDigital)),this.route.navigate(["/diploma/"+t])):this.erroDiploma=!0},n=>{console.log("erro no diploma digital")})}spinnerFunction(){this.spinner.show(),setTimeout(()=>{this.spinner.hide()},2e3)}static{this.\u0275fac=function(n){return new(n||i)(Y(D2),Y(ps),Y(M0),Y(oo))}}static{this.\u0275cmp=Ue({type:i,selectors:[["app-main"]],standalone:!1,decls:5,vars:2,consts:[["codigo",""],["bdColor","rgba(0, 0, 0, .3)","size","medium","color","#fff","type","ball-scale-multiple"],[2,"font-size","20px","color","#fff"],[4,"ngIf"],[1,"alert","alert-warning","alert-custom"],[1,"container-fluid",3,"ngClass"],[1,"container"],[1,"row",2,"padding","44px 0 39px 0"],[1,"col-md-7","header"],["id","texto-topo"],["id","subtexto-topo"],[1,"col-md-5","col-lg-4","offset-lg-1","col-xl-4","offset-xl-1","card-blue-container","d-none","d-md-block"],[1,"card-topo-consulta"],[1,"row"],[1,"col-12","content-card"],["src","assets/images/cartao.png"],[3,"submit"],["placeholder","C\xF3digo de verifica\xE7\xE3o","mask","AAA.AAA.AAAAAAAAAAAA||AAAA.AAA.AAAAAAAAAAAA"],["type","submit"],["name","arrow-right-short"],["class","msg-erro-consulta-diploma",4,"ngIf"],[1,"section-pesquisa-mobile","d-block","d-md-none"],[1,"col-sm-12","pesquisa-mobile"],["class","btn-pesquisa",3,"click",4,"ngFor","ngForOf"],["class","container-pesquisa-mobile",4,"ngIf"],[1,"section-pesquisa","d-none","d-md-block"],[1,"col-md-12"],[3,"ies"],["class","section-diploma",4,"ngIf"],[1,"section-faq","d-none__d-md-block"],[1,"title"],[3,"isAnimated"],[3,"click",4,"ngFor","ngForOf"],[1,"msg-erro-consulta-diploma"],[3,"type","dismissible"],[1,"btn-pesquisa",3,"click"],["src","assets/images/arrow-right.svg","alt","seta-direita",1,"seta-direita"],[1,"container-pesquisa-mobile"],[1,"btn-voltar",3,"click"],["src","assets/images/arrow-left.svg","alt","seta-esquerda",1,"seta-esquerda"],[1,"section-diploma"],[1,"row",2,"background-color","#fff"],[1,"col-sm-12"],["src","assets/images/diploma-frente.png",1,"img-fluid"],[1,"col-sm-12","verso"],["src","assets/images/diploma-verso.png",1,"img-fluid"],[1,"card-blue-container"],[1,"card-topo-consulta","card-topo-consulta-mobile"],[1,"title","d-none","d-md-block"],[1,"title","d-block","d-md-none"],[1,"col-sm-12","col-md-6"],[1,"col-sm-12","col-md-6","verso"],[3,"click"],["accordion-heading","",1,"accordion-header"],[1,"chevron"],["name","chevron-down",4,"ngIf"],["name","chevron-up",4,"ngIf"],["name","chevron-down"],["name","chevron-up"]],template:function(n,r){n&1&&(D(0,"ngx-spinner",1)(1,"p",2),T(2,"Carregando..."),S()(),ce(3,kR,4,0,"ng-container",3)(4,$R,50,13,"ng-container",3)),n&2&&(k(3),q("ngIf",!r.ies),k(),q("ngIf",r.ies))},dependencies:[d0,A1,_t,Lf,zf,lc,_2,C2,q4,kC,mC,hc,jC,fc],styles:['navbar[_ngcontent-%COMP%]{margin-bottom:1rem}.header[_ngcontent-%COMP%]{padding:0}@media (min-width: 576px){.header[_ngcontent-%COMP%]{padding:0 .75rem}}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{line-height:2.31rem;color:#373737;margin-bottom:1.5rem;font-size:1.5rem;line-height:1.75rem}@media (min-width: 768px){.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-weight:700;font-size:2rem;margin-bottom:2.5rem}}.header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#676767;margin-bottom:0;font-size:.875rem;line-height:1rem}@media (min-width: 768px){.header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1rem;line-height:1.18rem}}.header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-top:1.5rem}.header[_ngcontent-%COMP%] .remove-texto[_ngcontent-%COMP%]{display:none!important}@media screen and (min-width: 768px){.header[_ngcontent-%COMP%] .remove-texto[_ngcontent-%COMP%]{display:block!important}}@media (max-width: 767px){.card-blue-container[_ngcontent-%COMP%]{margin-top:1.5rem}}.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%]{max-width:17.5rem;min-width:15rem;height:10.688rem;background:linear-gradient(to right,#3117d6,#2511a4);padding:2rem 2rem 1.625rem 1.438rem;border-radius:.313rem;flex-direction:column;display:flex;margin-left:auto}@media (min-width: 320px){.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%]{max-width:18.75rem}}@media (max-width: 767px){.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%]{margin:0}}.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%] .content-card[_ngcontent-%COMP%]{display:flex;margin-bottom:1.75rem}.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%] .content-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:left;vertical-align:middle;font-weight:700;font-size:1.5rem;line-height:1.75rem;color:#fff;margin:0 0 0 .625rem}@media (min-width: 320px){.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%] .content-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 0 1.125rem}}.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:.313rem;border:none;outline:none;width:100%;background:#fff;padding:.5rem 1rem;font-size:.75rem;line-height:.875rem;color:#4e4e4e}.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta[_ngcontent-%COMP%] form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:none;background:none;position:absolute;margin:2px 0 0 -27px}.card-blue-container[_ngcontent-%COMP%] .card-topo-consulta-mobile[_ngcontent-%COMP%]{max-width:100%}.card-blue-container[_ngcontent-%COMP%] .msg-erro-consulta-diploma[_ngcontent-%COMP%]{margin-top:50px}@media (min-width: 768px){.card-blue-container[_ngcontent-%COMP%] .msg-erro-consulta-diploma[_ngcontent-%COMP%]{margin-top:30px}}section.section-pesquisa[_ngcontent-%COMP%], section.section-faq[_ngcontent-%COMP%]{background-color:#fff}.mobile-only[_ngcontent-%COMP%]{display:block}@media (min-width: 768px){.mobile-only[_ngcontent-%COMP%]{display:none}}.title[_ngcontent-%COMP%]{position:relative;margin:0;font-weight:700;color:#373737;font-size:1.5rem;line-height:1.75rem}@media (min-width: 768px){.title[_ngcontent-%COMP%]{font-size:2rem;line-height:2.31rem}}.title[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-.438rem;height:.25rem;width:4.063rem;background-color:#ffb934}.section-pesquisa-mobile[_ngcontent-%COMP%]{background-color:#fff;padding-top:1rem}.section-pesquisa-mobile[_ngcontent-%COMP%] .btn-pesquisa[_ngcontent-%COMP%], .section-pesquisa-mobile[_ngcontent-%COMP%] .btn-voltar[_ngcontent-%COMP%]{background-color:#fbfbfb;border:.063rem solid #ebebeb;border-radius:.313rem;outline:none;font-weight:500;font-size:.875rem;line-height:1rem;color:#5e5e5e;padding:1.25rem;margin-top:.75rem;display:flex;justify-content:space-between;align-items:center}.section-pesquisa-mobile[_ngcontent-%COMP%] .btn-pesquisa[_ngcontent-%COMP%]:hover, .section-pesquisa-mobile[_ngcontent-%COMP%] .btn-voltar[_ngcontent-%COMP%]:hover{cursor:pointer;filter:brightness(.9)}.section-pesquisa-mobile[_ngcontent-%COMP%] .container-pesquisa-mobile[_ngcontent-%COMP%]{z-index:1;top:0;position:fixed;height:100%;width:100%;background:#fff;left:0;padding:0 .75rem;overflow-y:auto}.section-pesquisa-mobile[_ngcontent-%COMP%] .container-pesquisa-mobile[_ngcontent-%COMP%] .btn-voltar[_ngcontent-%COMP%]{max-width:6rem;margin:1.375rem 0 2.938rem}.section-pesquisa-mobile[_ngcontent-%COMP%] .container-pesquisa-mobile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-weight:700;font-size:2rem;line-height:2.313rem;color:#5e5e5e;margin-bottom:1.25rem}.section-pesquisa-mobile[_ngcontent-%COMP%] .container-pesquisa-mobile[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem;line-height:1.438rem;color:#5e5e5e}.section-pesquisa[_ngcontent-%COMP%]{padding:4.313rem 0 5.875rem}.section-diploma[_ngcontent-%COMP%]{padding:3.5rem 0 6.25rem}@media (max-width: 767px){.section-diploma[_ngcontent-%COMP%]{background-color:#fff!important}}.section-diploma[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#2a0e51;font-weight:700;margin:1.625rem 0 .5rem;font-size:18px;line-height:21px}.section-diploma[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-height:22rem}@media (max-width: 767px){.section-diploma[_ngcontent-%COMP%] .verso[_ngcontent-%COMP%]{margin-top:2rem}}.section-diploma[_ngcontent-%COMP%] .marcador-amarelo[_ngcontent-%COMP%]{margin-top:1.25rem}.section-diploma[_ngcontent-%COMP%] .caixa-marcador[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{border:.188rem solid #FFB934;box-sizing:border-box;height:1.875rem;width:3.438rem;margin-left:auto;margin-top:-2.813rem;margin-right:-.313rem}@media (min-width: 400px){.section-diploma[_ngcontent-%COMP%] .caixa-marcador[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{width:4.375rem}}@media screen and (min-width: 1190px){.section-diploma[_ngcontent-%COMP%] .caixa-marcador[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{height:2.625rem;width:5.625rem;margin-left:auto;margin-top:-3.438rem;margin-right:-.563rem}}.section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .img-seta[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .img-seta-qrcode[_ngcontent-%COMP%]{height:.875rem;margin:.5rem 1.25rem;width:auto!important}@media screen and (min-width: 1190px){.section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .img-seta[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .img-seta-qrcode[_ngcontent-%COMP%]{margin:.5rem 1.875rem}}.section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .texto-maracador[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .texto-maracador-qrcode[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-weight:700;font-size:1rem;line-height:1.188rem;color:#ffa700;margin:0;max-width:5.313rem;text-align:center;margin-right:-.75rem}@media (min-width: 768px){.section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .texto-maracador[_ngcontent-%COMP%], .section-diploma[_ngcontent-%COMP%] .container-seta[_ngcontent-%COMP%] .texto-maracador-qrcode[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.438rem;margin-right:0;max-width:100%}}.section-diploma[_ngcontent-%COMP%] .marcador-amarelo-qrcode[_ngcontent-%COMP%]{position:absolute;margin-left:-35%;margin-top:-9%;left:0}@media (min-width: 768px){.section-diploma[_ngcontent-%COMP%] .marcador-amarelo-qrcode[_ngcontent-%COMP%]{display:none}}.section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{height:2.5rem!important;margin-top:-2.438rem;margin-right:-1.25rem}@media (min-width: 370px){.section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{margin-top:-2.688rem}}@media (min-width: 450px){.section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{height:2.8rem!important;margin-top:-3.313rem;margin-right:-.938rem}}@media (min-width: 600px){.section-diploma[_ngcontent-%COMP%] .caixa-marcador-qrcode[_ngcontent-%COMP%]{margin-top:-2.688rem;width:4.8rem}}.section-diploma[_ngcontent-%COMP%] .img-seta-qrcode[_ngcontent-%COMP%]{margin:.5rem 0!important}@media screen and (min-width: 400px){.section-diploma[_ngcontent-%COMP%] .img-seta-qrcode[_ngcontent-%COMP%]{margin:.5rem .625rem!important}}@media screen and (min-width: 500px){.section-diploma[_ngcontent-%COMP%] .img-seta-qrcode[_ngcontent-%COMP%]{margin:.5rem .938rem!important}}.section-diploma[_ngcontent-%COMP%] .texto-maracador-qrcode[_ngcontent-%COMP%]{margin-right:-2.188rem!important}@media (min-width: 380px){.section-diploma[_ngcontent-%COMP%] .texto-maracador-qrcode[_ngcontent-%COMP%]{margin-right:-.938rem!important}}.section-faq[_ngcontent-%COMP%]{padding:4rem 0}.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%]{margin-top:3.875rem}.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%] .accordion-header[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem;line-height:1.5rem;color:#000;padding:1rem 1.75rem;position:relative}@media (max-width: 991px){.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%] .accordion-header[_ngcontent-%COMP%]{padding:.5rem 1.5rem .5rem 0}}.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%] .accordion-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;right:1rem;top:50%;transform:translateY(-50%)}@media (max-width: 991px){.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%] .accordion-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{right:0}}.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%] .accordion-header[_ngcontent-%COMP%]:hover{filter:brightness(.9)!important}.section-faq[_ngcontent-%COMP%] accordion[_ngcontent-%COMP%] accordion-group[_ngcontent-%COMP%]{border:.063rem solid #3117D6;border-bottom:none;border-radius:.25rem} .card{margin-bottom:.875rem} .card-header, .card-body{border-bottom:.063rem solid #3117D6} .card-body{border-radius:.125rem;padding:2rem 3.625rem 2rem 2.75rem}']})}}return i})();var pc=class{constructor(){this.Nome=[],this.CodigoMEC=[],this.CNPJ=[],this.Endereco=[],this.Credenciamento=[],this.Recredenciamento=[],this.DadosMantenedora=[],this.LivroRegistro=[]}};var gc=class{constructor(){this.NomeCurso=[],this.CodigoEMEC=[],this.NomeHabilitacao=[],this.TituloConferido=[],this.GrauConferido=[],this.Endereco=[],this.Autorizacao=[],this.Reconhecimento=[]}};var vc=class{constructor(){this.Nome=[],this.CodigoMEC=[],this.CNPJ=[],this.Endereco=[],this.Credenciamento=[],this.Recredenciamento=[],this.DadosMantenedora=[]}};var f_=S_(tA());var xs={};Hp(xs,{AbortException:()=>NI,AnnotationEditorLayer:()=>ZI,AnnotationEditorParamsType:()=>jI,AnnotationEditorType:()=>F7,AnnotationEditorUIManager:()=>UI,AnnotationLayer:()=>$I,AnnotationMode:()=>qI,ColorPicker:()=>GI,DOMSVGFactory:()=>WI,DrawLayer:()=>XI,FeatureTest:()=>YI,GlobalWorkerOptions:()=>R7,ImageKind:()=>KI,InvalidPDFException:()=>QI,MissingPDFException:()=>JI,OPS:()=>eB,OutputScale:()=>tB,PDFDataRangeTransport:()=>iB,PDFDateString:()=>nB,PDFWorker:()=>rB,PasswordResponses:()=>sB,PermissionFlag:()=>aB,PixelsPerInch:()=>oB,RenderingCancelledException:()=>lB,TextLayer:()=>cB,UnexpectedResponseException:()=>hB,Util:()=>dB,VerbosityLevel:()=>O7,XfaLayer:()=>uB,build:()=>fB,createValidAbsoluteUrl:()=>pB,fetchData:()=>gB,getDocument:()=>I7,getFilenameFromUrl:()=>vB,getPdfFilenameFromUrl:()=>mB,getXfaPageViewport:()=>wB,isDataScheme:()=>bB,isPdfFile:()=>yB,noContextMenu:()=>CB,normalizeUnicode:()=>xB,setLayerDimensions:()=>MB,shadow:()=>AB,version:()=>ko});var wo={};wo.d=(i,e)=>{for(var t in e)wo.o(e,t)&&!wo.o(i,t)&&Object.defineProperty(i,t,{enumerable:!0,get:e[t]})};wo.o=(i,e)=>Object.prototype.hasOwnProperty.call(i,e);var ge=globalThis.pdfjsLib={};wo.d(ge,{AbortException:()=>Ai,AnnotationEditorLayer:()=>BI,AnnotationEditorParamsType:()=>de,AnnotationEditorType:()=>Ce,AnnotationEditorUIManager:()=>Ao,AnnotationLayer:()=>x7,AnnotationMode:()=>Ki,ColorPicker:()=>Ah,DOMSVGFactory:()=>Vo,DrawLayer:()=>E7,FeatureTest:()=>It,GlobalWorkerOptions:()=>Gn,ImageKind:()=>$c,InvalidPDFException:()=>Wc,MissingPDFException:()=>Mi,OPS:()=>a1,OutputScale:()=>Mo,PDFDataRangeTransport:()=>hh,PDFDateString:()=>Yc,PDFWorker:()=>ys,PasswordResponses:()=>WO,PermissionFlag:()=>GO,PixelsPerInch:()=>Qi,RenderingCancelledException:()=>xo,TextLayer:()=>Do,UnexpectedResponseException:()=>Cs,Util:()=>ne,VerbosityLevel:()=>Sh,XfaLayer:()=>fh,build:()=>OI,createValidAbsoluteUrl:()=>QO,fetchData:()=>Th,getDocument:()=>kI,getFilenameFromUrl:()=>aI,getPdfFilenameFromUrl:()=>oI,getXfaPageViewport:()=>lI,isDataScheme:()=>Lh,isPdfFile:()=>L7,noContextMenu:()=>U0,normalizeUnicode:()=>nI,setLayerDimensions:()=>Wn,shadow:()=>Pe,version:()=>RI});var qt=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),mA=[1,0,0,1,0,0],d8=[.001,0,0,.001,0,0],UO=1e7,Uc=1.35,$O=.35,yte=$O/Uc,E0={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},Ki={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},qO="pdfjs_internal_editor_",Ce={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},de={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},GO={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},$t={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},$c={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Dt={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};var po={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};var Sh={ERRORS:0,WARNINGS:1,INFOS:5},a1={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},WO={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},Dh=Sh.WARNINGS;function XO(i){Number.isInteger(i)&&(Dh=i)}function YO(){return Dh}function Eh(i){Dh>=Sh.INFOS&&console.log(`Info: ${i}`)}function De(i){Dh>=Sh.WARNINGS&&console.log(`Warning: ${i}`)}function nt(i){throw new Error(i)}function Et(i,e){i||nt(e)}function KO(i){switch(i?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function QO(i,e=null,t=null){if(!i)return null;try{if(t&&typeof i=="string"&&(t.addDefaultProtocol&&i.startsWith("www.")&&i.match(/\./g)?.length>=2&&(i=`http://${i}`),t.tryConvertEncoding))try{i=iI(i)}catch{}let n=e?new URL(i,e):new URL(i);if(KO(n))return n}catch{}return null}function Pe(i,e,t,n=!1){return Object.defineProperty(i,e,{value:t,enumerable:!n,configurable:!0,writable:!1}),t}var Ji=function(){function e(t,n){this.message=t,this.name=n}return e.prototype=new Error,e.constructor=e,e}(),bo=class extends Ji{constructor(e,t){super(e,"PasswordException"),this.code=t}},yo=class extends Ji{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},Wc=class extends Ji{constructor(e){super(e,"InvalidPDFException")}},Mi=class extends Ji{constructor(e){super(e,"MissingPDFException")}},Cs=class extends Ji{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},u8=class extends Ji{constructor(e){super(e,"FormatError")}},Ai=class extends Ji{constructor(e){super(e,"AbortException")}};function wA(i){(typeof i!="object"||i?.length===void 0)&&nt("Invalid argument for bytesToString");let e=i.length,t=8192;if(e>24&255,i>>16&255,i>>8&255,i&255)}function V7(i){let e=Object.create(null);for(let[t,n]of i)e[t]=n;return e}function eI(){let i=new Uint8Array(4);return i[0]=1,new Uint32Array(i.buffer,0,1)[0]===1}function tI(){try{return new Function(""),!0}catch{return!1}}var It=class{static get isLittleEndian(){return Pe(this,"isLittleEndian",eI())}static get isEvalSupported(){return Pe(this,"isEvalSupported",tI())}static get isOffscreenCanvasSupported(){return Pe(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof navigator?.platform=="string"?Pe(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof navigator?.userAgent=="string"&&navigator.userAgent.includes("Firefox")}):Pe(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){return Pe(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}},a8=Array.from(Array(256).keys(),i=>i.toString(16).padStart(2,"0")),ne=class{static makeHexColor(e,t,n){return`#${a8[e]}${a8[t]}${a8[n]}`}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[1],t[1]=n,n=t[2],t[2]=t[3],t[3]=n,e[1]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){let n=e[0]*t[0]+e[1]*t[2]+t[4],r=e[0]*t[1]+e[1]*t[3]+t[5];return[n,r]}static applyInverseTransform(e,t){let n=t[0]*t[3]-t[1]*t[2],r=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,s=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n;return[r,s]}static getAxialAlignedBoundingBox(e,t){let n=this.applyTransform(e,t),r=this.applyTransform(e.slice(2,4),t),s=this.applyTransform([e[0],e[3]],t),a=this.applyTransform([e[2],e[1]],t);return[Math.min(n[0],r[0],s[0],a[0]),Math.min(n[1],r[1],s[1],a[1]),Math.max(n[0],r[0],s[0],a[0]),Math.max(n[1],r[1],s[1],a[1])]}static inverseTransform(e){let t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){let t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],s=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(n+a)/2,l=Math.sqrt((n+a)**2-4*(n*a-s*r))/2,c=o+l||1,h=o-l||1;return[Math.sqrt(c),Math.sqrt(h)]}static normalizeRect(e){let t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){let n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>r)return null;let s=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return s>a?null:[n,s,r,a]}static#e(e,t,n,r,s,a,o,l,c,h){if(c<=0||c>=1)return;let d=1-c,u=c*c,p=u*c,f=d*(d*(d*e+3*c*t)+3*u*n)+p*r,g=d*(d*(d*s+3*c*a)+3*u*o)+p*l;h[0]=Math.min(h[0],f),h[1]=Math.min(h[1],g),h[2]=Math.max(h[2],f),h[3]=Math.max(h[3],g)}static#t(e,t,n,r,s,a,o,l,c,h,d,u){if(Math.abs(c)<1e-12){Math.abs(h)>=1e-12&&this.#e(e,t,n,r,s,a,o,l,-d/h,u);return}let p=h**2-4*d*c;if(p<0)return;let f=Math.sqrt(p),g=2*c;this.#e(e,t,n,r,s,a,o,l,(-h+f)/g,u),this.#e(e,t,n,r,s,a,o,l,(-h-f)/g,u)}static bezierBoundingBox(e,t,n,r,s,a,o,l,c){return c?(c[0]=Math.min(c[0],e,o),c[1]=Math.min(c[1],t,l),c[2]=Math.max(c[2],e,o),c[3]=Math.max(c[3],t,l)):c=[Math.min(e,o),Math.min(t,l),Math.max(e,o),Math.max(t,l)],this.#t(e,n,s,o,t,r,a,l,3*(-e+3*(n-s)+o),6*(e-2*n+s),3*(n-e),c),this.#t(e,n,s,o,t,r,a,l,3*(-t+3*(r-a)+l),6*(t-2*r+a),3*(r-t),c),c}};function iI(i){return decodeURIComponent(escape(i))}var o8=null,iA=null;function nI(i){return o8||(o8=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,iA=new Map([["\uFB05","\u017Ft"]])),i.replaceAll(o8,(e,t,n)=>t?t.normalize("NFKC"):iA.get(n))}function rI(){if(typeof crypto<"u"&&typeof crypto?.randomUUID=="function")return crypto.randomUUID();let i=new Uint8Array(32);if(typeof crypto<"u"&&typeof crypto?.getRandomValues=="function")crypto.getRandomValues(i);else for(let e=0;e<32;e++)i[e]=Math.floor(Math.random()*255);return wA(i)}var T7="pdfjs_internal_id_",bi={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function sI(i){return Uint8Array.prototype.toBase64?i.toBase64():btoa(wA(i))}var Ci="http://www.w3.org/2000/svg",Qi=class{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF};function Th(i,e="text"){return $(this,null,function*(){if(mo(i,document.baseURI)){let t=yield fetch(i);if(!t.ok)throw new Error(t.statusText);switch(e){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"json":return t.json()}return t.text()}return new Promise((t,n)=>{let r=new XMLHttpRequest;r.open("GET",i,!0),r.responseType=e,r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(r.status===200||r.status===0){switch(e){case"arraybuffer":case"blob":case"json":t(r.response);return}t(r.responseText);return}n(new Error(r.statusText))}},r.send(null)})})}var Co=class i{constructor({viewBox:e,scale:t,rotation:n,offsetX:r=0,offsetY:s=0,dontFlip:a=!1}){this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=r,this.offsetY=s;let o=(e[2]+e[0])/2,l=(e[3]+e[1])/2,c,h,d,u;switch(n%=360,n<0&&(n+=360),n){case 180:c=-1,h=0,d=0,u=1;break;case 90:c=0,h=1,d=1,u=0;break;case 270:c=0,h=-1,d=-1,u=0;break;case 0:c=1,h=0,d=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(d=-d,u=-u);let p,f,g,y;c===0?(p=Math.abs(l-e[1])*t+r,f=Math.abs(o-e[0])*t+s,g=(e[3]-e[1])*t,y=(e[2]-e[0])*t):(p=Math.abs(o-e[0])*t+r,f=Math.abs(l-e[1])*t+s,g=(e[2]-e[0])*t,y=(e[3]-e[1])*t),this.transform=[c*t,h*t,d*t,u*t,p-c*t*o-d*t*l,f-h*t*o-u*t*l],this.width=g,this.height=y}get rawDims(){let{viewBox:e}=this;return Pe(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:r=this.offsetY,dontFlip:s=!1}={}){return new i({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:s})}convertToViewportPoint(e,t){return ne.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){let t=ne.applyTransform([e[0],e[1]],this.transform),n=ne.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return ne.applyInverseTransform([e,t],this.transform)}},xo=class extends Ji{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}};function Lh(i){let e=i.length,t=0;for(;t=1&&r<=12?r-1:0;let s=parseInt(t[3],10);s=s>=1&&s<=31?s:1;let a=parseInt(t[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(t[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;let c=t[7]||"Z",h=parseInt(t[8],10);h=h>=0&&h<=23?h:0;let d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,c==="-"?(a+=h,o+=d):c==="+"&&(a-=h,o-=d),new Date(Date.UTC(n,r,s,a,o,l))}};function lI(i,{scale:e=1,rotation:t=0}){let{width:n,height:r}=i.attributes.style,s=[0,0,parseInt(n),parseInt(r)];return new Co({viewBox:s,scale:e,rotation:t})}function z7(i){if(i.startsWith("#")){let e=parseInt(i.slice(1),16);return[(e&16711680)>>16,(e&65280)>>8,e&255]}return i.startsWith("rgb(")?i.slice(4,-1).split(",").map(e=>parseInt(e)):i.startsWith("rgba(")?i.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(De(`Not a valid color format: "${i}"`),[0,0,0])}function cI(i){let e=document.createElement("span");e.style.visibility="hidden",document.body.append(e);for(let t of i.keys()){e.style.color=t;let n=window.getComputedStyle(e).color;i.set(t,z7(n))}e.remove()}function ot(i){let{a:e,b:t,c:n,d:r,e:s,f:a}=i.getTransform();return[e,t,n,r,s,a]}function yi(i){let{a:e,b:t,c:n,d:r,e:s,f:a}=i.getTransform().invertSelf();return[e,t,n,r,s,a]}function Wn(i,e,t=!1,n=!0){if(e instanceof Co){let{pageWidth:r,pageHeight:s}=e.rawDims,{style:a}=i,o=It.isCSSRoundSupported,l=`var(--scale-factor) * ${r}px`,c=`var(--scale-factor) * ${s}px`,h=o?`round(down, ${l}, var(--scale-round-x, 1px))`:`calc(${l})`,d=o?`round(down, ${c}, var(--scale-round-y, 1px))`:`calc(${c})`;!t||e.rotation%180===0?(a.width=h,a.height=d):(a.width=d,a.height=h)}n&&i.setAttribute("data-main-rotation",e.rotation)}var Mo=class{constructor(){let e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}},f8=class i{#e=null;#t=null;#i;#n=null;#r=null;static#s=null;constructor(e){this.#i=e,i.#s||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"})}render(){let e=this.#e=document.createElement("div");e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");let t=this.#i._uiManager._signal;e.addEventListener("contextmenu",U0,{signal:t}),e.addEventListener("pointerdown",i.#l,{signal:t});let n=this.#n=document.createElement("div");n.className="buttons",e.append(n);let r=this.#i.toolbarPosition;if(r){let{style:s}=e,a=this.#i._uiManager.direction==="ltr"?1-r[0]:r[0];s.insetInlineEnd=`${100*a}%`,s.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return this.#d(),e}get div(){return this.#e}static#l(e){e.stopPropagation()}#c(e){this.#i._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()}#h(e){this.#i._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()}#o(e){let t=this.#i._uiManager._signal;e.addEventListener("focusin",this.#c.bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",this.#h.bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",U0,{signal:t})}hide(){this.#e.classList.add("hidden"),this.#t?.hideDropdown()}show(){this.#e.classList.remove("hidden"),this.#r?.shown()}#d(){let{editorType:e,_uiManager:t}=this.#i,n=document.createElement("button");n.className="delete",n.tabIndex=0,n.setAttribute("data-l10n-id",i.#s[e]),this.#o(n),n.addEventListener("click",r=>{t.delete()},{signal:t._signal}),this.#n.append(n)}get#a(){let e=document.createElement("div");return e.className="divider",e}addAltText(e){return $(this,null,function*(){let t=yield e.render();this.#o(t),this.#n.prepend(t,this.#a),this.#r=e})}addColorPicker(e){this.#t=e;let t=e.renderButton();this.#o(t),this.#n.prepend(t,this.#a)}remove(){this.#e.remove(),this.#t?.destroy(),this.#t=null}},p8=class{#e=null;#t=null;#i;constructor(e){this.#i=e}#n(){let e=this.#t=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",U0,{signal:this.#i._signal});let t=this.#e=document.createElement("div");return t.className="buttons",e.append(t),this.#s(),e}#r(e,t){let n=0,r=0;for(let s of e){let a=s.y+s.height;if(an){r=o,n=a;continue}t?o>r&&(r=o):o{this.#i.highlightSelection("floating_button")},{signal:n}),this.#e.append(e)}};function Kc(i,e,t){for(let n of t)e.addEventListener(n,i[n].bind(i))}function hI(i){return Math.round(Math.min(255,Math.max(1,255*i))).toString(16).padStart(2,"0")}var g8=class{#e=0;get id(){return`${qO}${this.#e++}`}},v8=class i{#e=rI();#t=0;#i=null;static get _isSVGFittingCanvas(){let e='data:image/svg+xml;charset=UTF-8,',n=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),r=new Image;r.src=e;let s=r.decode().then(()=>(n.drawImage(r,0,0,1,1,0,0,1,3),new Uint32Array(n.getImageData(0,0,1,1).data.buffer)[0]===0));return Pe(this,"_isSVGFittingCanvas",s)}#n(e,t){return $(this,null,function*(){this.#i||=new Map;let n=this.#i.get(e);if(n===null)return null;if(n?.bitmap)return n.refCounter+=1,n;try{n||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let r;if(typeof t=="string"?(n.url=t,r=yield Th(t,"blob")):t instanceof File?r=n.file=t:t instanceof Blob&&(r=t),r.type==="image/svg+xml"){let s=i._isSVGFittingCanvas,a=new FileReader,o=new Image,l=new Promise((c,h)=>{o.onload=()=>{n.bitmap=o,n.isSvg=!0,c()},a.onload=()=>$(this,null,function*(){let d=n.svgUrl=a.result;o.src=(yield s)?`${d}#svgView(preserveAspectRatio(none))`:d}),o.onerror=a.onerror=h});a.readAsDataURL(r),yield l}else n.bitmap=yield createImageBitmap(r);n.refCounter=1}catch(r){console.error(r),n=null}return this.#i.set(e,n),n&&this.#i.set(n.id,n),n})}getFromFile(e){return $(this,null,function*(){let{lastModified:t,name:n,size:r,type:s}=e;return this.#n(`${t}_${n}_${r}_${s}`,e)})}getFromUrl(e){return $(this,null,function*(){return this.#n(e,e)})}getFromBlob(e,t){return $(this,null,function*(){let n=yield t;return this.#n(e,n)})}getFromId(e){return $(this,null,function*(){this.#i||=new Map;let t=this.#i.get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){let{blobPromise:n}=t;return delete t.blobPromise,this.getFromBlob(t.id,n)}return this.getFromUrl(t.url)})}getFromCanvas(e,t){this.#i||=new Map;let n=this.#i.get(e);if(n?.bitmap)return n.refCounter+=1,n;let r=new OffscreenCanvas(t.width,t.height);return r.getContext("2d").drawImage(t,0,0),n={bitmap:r.transferToImageBitmap(),id:`image_${this.#e}_${this.#t++}`,refCounter:1,isSvg:!1},this.#i.set(e,n),this.#i.set(n.id,n),n}getSvgUrl(e){let t=this.#i.get(e);return t?.isSvg?t.svgUrl:null}deleteId(e){this.#i||=new Map;let t=this.#i.get(e);if(!t||(t.refCounter-=1,t.refCounter!==0))return;let{bitmap:n}=t;if(!t.url&&!t.file){let r=new OffscreenCanvas(n.width,n.height);r.getContext("bitmaprenderer").transferFromImageBitmap(n),t.blobPromise=r.convertToBlob()}n.close?.(),t.bitmap=null}isValidId(e){return e.startsWith(`image_${this.#e}_`)}},m8=class{#e=[];#t=!1;#i;#n=-1;constructor(e=128){this.#i=e}add({cmd:e,undo:t,post:n,mustExec:r,type:s=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(r&&e(),this.#t)return;let l={cmd:e,undo:t,post:n,type:s};if(this.#n===-1){this.#e.length>0&&(this.#e.length=0),this.#n=0,this.#e.push(l);return}if(a&&this.#e[this.#n].type===s){o&&(l.undo=this.#e[this.#n].undo),this.#e[this.#n]=l;return}let c=this.#n+1;c===this.#i?this.#e.splice(0,1):(this.#n=c,cs===t[a]))return i._colorsMapping.get(n);return t}getHexCode(e){let t=this._colors.get(e);return t?ne.makeHexColor(...t):e}},Ao=(()=>{class i{#e=new AbortController;#t=null;#i=new Map;#n=new Map;#r=null;#s=null;#l=null;#c=new m8;#h=null;#o=0;#d=new Set;#a=null;#u=null;#p=new Set;#f=!1;#g=!1;#m=!1;#v=null;#w=null;#y=null;#M=null;#C=!1;#x=null;#T=new g8;#D=!1;#A=!1;#E=null;#S=null;#L=null;#P=null;#_=Ce.NONE;#b=new Set;#V=null;#z=null;#R=null;#N={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#B=[0,0];#F=null;#O=null;#I=null;#k=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){let t=i.prototype,n=o=>o.#O.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&o.hasSomethingToControl(),r=(o,{target:l})=>{if(l instanceof HTMLInputElement){let{type:c}=l;return c!=="text"&&c!=="number"}return!0},s=this.TRANSLATE_SMALL,a=this.TRANSLATE_BIG;return Pe(this,"_keyboardManager",new Xn([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],t.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:r}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(o,{target:l})=>!(l instanceof HTMLButtonElement)&&o.#O.contains(l)&&!o.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(o,{target:l})=>!(l instanceof HTMLButtonElement)&&o.#O.contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-a,0],checker:n}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[a,0],checker:n}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-a],checker:n}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,a],checker:n}]]))}constructor(t,n,r,s,a,o,l,c,h,d,u){let p=this._signal=this.#e.signal;this.#O=t,this.#I=n,this.#r=r,this._eventBus=s,s._on("editingaction",this.onEditingAction.bind(this),{signal:p}),s._on("pagechanging",this.onPageChanging.bind(this),{signal:p}),s._on("scalechanging",this.onScaleChanging.bind(this),{signal:p}),s._on("rotationchanging",this.onRotationChanging.bind(this),{signal:p}),s._on("setpreference",this.onSetPreference.bind(this),{signal:p}),s._on("switchannotationeditorparams",f=>this.updateParams(f.type,f.value),{signal:p}),this.#ee(),this.#re(),this.#G(),this.#s=a.annotationStorage,this.#v=a.filterFactory,this.#z=o,this.#M=l||null,this.#f=c,this.#g=h,this.#m=d,this.#P=u||null,this.viewParameters={realScale:Qi.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){this.#k?.resolve(),this.#k=null,this.#e?.abort(),this.#e=null,this._signal=null;for(let t of this.#n.values())t.destroy();this.#n.clear(),this.#i.clear(),this.#p.clear(),this.#t=null,this.#b.clear(),this.#c.destroy(),this.#r?.destroy(),this.#x?.hide(),this.#x=null,this.#w&&(clearTimeout(this.#w),this.#w=null),this.#F&&(clearTimeout(this.#F),this.#F=null)}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return this.#P}get useNewAltTextFlow(){return this.#g}get useNewAltTextWhenAddingImage(){return this.#m}get hcmFilter(){return Pe(this,"hcmFilter",this.#z?this.#v.addHCMFilter(this.#z.foreground,this.#z.background):"none")}get direction(){return Pe(this,"direction",getComputedStyle(this.#O).direction)}get highlightColors(){return Pe(this,"highlightColors",this.#M?new Map(this.#M.split(",").map(t=>t.split("=").map(n=>n.trim()))):null)}get highlightColorNames(){return Pe(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}setMainHighlightColorPicker(t){this.#L=t}editAltText(t,n=!1){this.#r?.editAltText(this,t,n)}switchToMode(t,n){this._eventBus.on("annotationeditormodechanged",n,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,n){this._eventBus.dispatch("setpreference",{source:this,name:t,value:n})}onSetPreference({name:t,value:n}){switch(t){case"enableNewAltTextWhenAddingImage":this.#m=n;break}}onPageChanging({pageNumber:t}){this.#o=t-1}focusMainContainer(){this.#O.focus()}findParent(t,n){for(let r of this.#n.values()){let{x:s,y:a,width:o,height:l}=r.div.getBoundingClientRect();if(t>=s&&t<=s+o&&n>=a&&n<=a+l)return r}return null}disableUserSelect(t=!1){this.#I.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#p.add(t)}removeShouldRescale(t){this.#p.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*Qi.PDF_TO_CSS_UNITS;for(let n of this.#p)n.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}#U({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t}#q(t){let{currentLayer:n}=this;if(n.hasTextLayer(t))return n;for(let r of this.#n.values())if(r.hasTextLayer(t))return r;return null}highlightSelection(t=""){let n=document.getSelection();if(!n||n.isCollapsed)return;let{anchorNode:r,anchorOffset:s,focusNode:a,focusOffset:o}=n,l=n.toString(),h=this.#U(n).closest(".textLayer"),d=this.getSelectionBoxes(h);if(!d)return;n.empty();let u=this.#q(h),p=this.#_===Ce.NONE,f=()=>{u?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:d,anchorNode:r,anchorOffset:s,focusNode:a,focusOffset:o,text:l}),p&&this.showAllEditors("highlight",!0,!0)};if(p){this.switchToMode(Ce.HIGHLIGHT,f);return}f()}#Q(){let t=document.getSelection();if(!t||t.isCollapsed)return;let r=this.#U(t).closest(".textLayer"),s=this.getSelectionBoxes(r);s&&(this.#x||=new p8(this),this.#x.show(r,s,this.direction==="ltr"))}addToAnnotationStorage(t){!t.isEmpty()&&this.#s&&!this.#s.has(t.id)&&this.#s.setValue(t.id,t)}#J(){let t=document.getSelection();if(!t||t.isCollapsed){this.#V&&(this.#x?.hide(),this.#V=null,this.#H({hasSelectedText:!1}));return}let{anchorNode:n}=t;if(n===this.#V)return;let s=this.#U(t).closest(".textLayer");if(!s){this.#V&&(this.#x?.hide(),this.#V=null,this.#H({hasSelectedText:!1}));return}if(this.#x?.hide(),this.#V=n,this.#H({hasSelectedText:!0}),!(this.#_!==Ce.HIGHLIGHT&&this.#_!==Ce.NONE)&&(this.#_===Ce.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#C=this.isShiftKeyDown,!this.isShiftKeyDown)){let a=this.#_===Ce.HIGHLIGHT?this.#q(s):null;a?.toggleDrawing();let o=new AbortController,l=this.combinedSignal(o),c=h=>{h.type==="pointerup"&&h.button!==0||(o.abort(),a?.toggleDrawing(!0),h.type==="pointerup"&&this.#$("main_toolbar"))};window.addEventListener("pointerup",c,{signal:l}),window.addEventListener("blur",c,{signal:l})}}#$(t=""){this.#_===Ce.HIGHLIGHT?this.highlightSelection(t):this.#f&&this.#Q()}#ee(){document.addEventListener("selectionchange",this.#J.bind(this),{signal:this._signal})}#te(){if(this.#y)return;this.#y=new AbortController;let t=this.combinedSignal(this.#y);window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}#ie(){this.#y?.abort(),this.#y=null}blur(){if(this.isShiftKeyDown=!1,this.#C&&(this.#C=!1,this.#$("main_toolbar")),!this.hasSelection)return;let{activeElement:t}=document;for(let n of this.#b)if(n.div.contains(t)){this.#S=[n,t],n._focusEventsAllowed=!1;break}}focus(){if(!this.#S)return;let[t,n]=this.#S;this.#S=null,n.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),n.focus()}#G(){if(this.#E)return;this.#E=new AbortController;let t=this.combinedSignal(this.#E);window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}#ne(){this.#E?.abort(),this.#E=null}#W(){if(this.#h)return;this.#h=new AbortController;let t=this.combinedSignal(this.#h);document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}#X(){this.#h?.abort(),this.#h=null}#re(){let t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#G(),this.#W()}removeEditListeners(){this.#ne(),this.#X()}dragOver(t){for(let{type:n}of t.dataTransfer.items)for(let r of this.#u)if(r.isHandlingMimeForPasting(n)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(let n of t.dataTransfer.items)for(let r of this.#u)if(r.isHandlingMimeForPasting(n.type)){r.paste(n,this.currentLayer),t.preventDefault();return}}copy(t){if(t.preventDefault(),this.#t?.commitOrRemove(),!this.hasSelection)return;let n=[];for(let r of this.#b){let s=r.serialize(!0);s&&n.push(s)}n.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(n))}cut(t){this.copy(t),this.delete()}paste(t){return $(this,null,function*(){t.preventDefault();let{clipboardData:n}=t;for(let a of n.items)for(let o of this.#u)if(o.isHandlingMimeForPasting(a.type)){o.paste(a,this.currentLayer);return}let r=n.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(a){De(`paste: "${a.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();let s=this.currentLayer;try{let a=[];for(let c of r){let h=yield s.deserialize(c);if(!h)return;a.push(h)}let o=()=>{for(let c of a)this.#Y(c);this.#K(a)},l=()=>{for(let c of a)c.remove()};this.addCommands({cmd:o,undo:l,mustExec:!0})}catch(a){De(`paste: "${a.message}".`)}})}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),this.#_!==Ce.NONE&&!this.isEditorHandlingKeyboard&&i._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,this.#C&&(this.#C=!1,this.#$("main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#H(t){Object.entries(t).some(([r,s])=>this.#N[r]!==s)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#N,t)}),this.#_===Ce.HIGHLIGHT&&t.hasSelectedEditor===!1&&this.#Z([[de.HIGHLIGHT_FREE,!0]]))}#Z(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#te(),this.#W(),this.#H({isEditing:this.#_!==Ce.NONE,isEmpty:this.#j(),hasSomethingToUndo:this.#c.hasSomethingToUndo(),hasSomethingToRedo:this.#c.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#ie(),this.#X(),this.#H({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#u){this.#u=t;for(let n of this.#u)this.#Z(n.defaultPropertiesToUpdate)}}getId(){return this.#T.id}get currentLayer(){return this.#n.get(this.#o)}getLayer(t){return this.#n.get(t)}get currentPageIndex(){return this.#o}addLayer(t){this.#n.set(t.pageIndex,t),this.#D?t.enable():t.disable()}removeLayer(t){this.#n.delete(t.pageIndex)}updateMode(t,n=null,r=!1){return $(this,null,function*(){if(this.#_!==t&&!(this.#k&&(yield this.#k.promise,!this.#k))){if(this.#k=Promise.withResolvers(),this.#_=t,t===Ce.NONE){this.setEditingState(!1),this.#ae(),this.#k.resolve();return}this.setEditingState(!0),yield this.#se(),this.unselectAll();for(let s of this.#n.values())s.updateMode(t);if(!n){r&&this.addNewEditorFromKeyboard(),this.#k.resolve();return}for(let s of this.#i.values())s.annotationElementId===n?(this.setSelected(s),s.enterInEditMode()):s.unselect();this.#k.resolve()}})}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t!==this.#_&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,n){if(this.#u){switch(t){case de.CREATE:this.currentLayer.addNewEditor();return;case de.HIGHLIGHT_DEFAULT_COLOR:this.#L?.updateColor(n);break;case de.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#R||=new Map).set(t,n),this.showAllEditors("highlight",n);break}for(let r of this.#b)r.updateParams(t,n);for(let r of this.#u)r.updateDefaultParams(t,n)}}showAllEditors(t,n,r=!1){for(let a of this.#i.values())a.editorType===t&&a.show(n);(this.#R?.get(de.HIGHLIGHT_SHOW_ALL)??!0)!==n&&this.#Z([[de.HIGHLIGHT_SHOW_ALL,n]])}enableWaiting(t=!1){if(this.#A!==t){this.#A=t;for(let n of this.#n.values())t?n.disableClick():n.enableClick(),n.div.classList.toggle("waiting",t)}}#se(){return $(this,null,function*(){if(!this.#D){this.#D=!0;let t=[];for(let n of this.#n.values())t.push(n.enable());yield Promise.all(t);for(let n of this.#i.values())n.enable()}})}#ae(){if(this.unselectAll(),this.#D){this.#D=!1;for(let t of this.#n.values())t.disable();for(let t of this.#i.values())t.disable()}}getEditors(t){let n=[];for(let r of this.#i.values())r.pageIndex===t&&n.push(r);return n}getEditor(t){return this.#i.get(t)}addEditor(t){this.#i.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#w&&clearTimeout(this.#w),this.#w=setTimeout(()=>{this.focusMainContainer(),this.#w=null},0)),this.#i.delete(t.id),this.unselect(t),(!t.annotationElementId||!this.#d.has(t.annotationElementId))&&this.#s?.remove(t.id)}addDeletedAnnotationElement(t){this.#d.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#d.has(t)}removeDeletedAnnotationElement(t){this.#d.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#Y(t){let n=this.#n.get(t.pageIndex);n?n.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#t!==t&&(this.#t=t,t&&this.#Z(t.propertiesToUpdate))}get#oe(){let t=null;for(t of this.#b);return t}updateUI(t){this.#oe===t&&this.#Z(t.propertiesToUpdate)}toggleSelected(t){if(this.#b.has(t)){this.#b.delete(t),t.unselect(),this.#H({hasSelectedEditor:this.hasSelection});return}this.#b.add(t),t.select(),this.#Z(t.propertiesToUpdate),this.#H({hasSelectedEditor:!0})}setSelected(t){for(let n of this.#b)n!==t&&n.unselect();this.#b.clear(),this.#b.add(t),t.select(),this.#Z(t.propertiesToUpdate),this.#H({hasSelectedEditor:!0})}isSelected(t){return this.#b.has(t)}get firstSelectedEditor(){return this.#b.values().next().value}unselect(t){t.unselect(),this.#b.delete(t),this.#H({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#b.size!==0}get isEnterHandled(){return this.#b.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#c.undo(),this.#H({hasSomethingToUndo:this.#c.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#j()})}redo(){this.#c.redo(),this.#H({hasSomethingToUndo:!0,hasSomethingToRedo:this.#c.hasSomethingToRedo(),isEmpty:this.#j()})}addCommands(t){this.#c.add(t),this.#H({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#j()})}#j(){if(this.#i.size===0)return!0;if(this.#i.size===1)for(let t of this.#i.values())return t.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;let t=[...this.#b],n=()=>{for(let s of t)s.remove()},r=()=>{for(let s of t)this.#Y(s)};this.addCommands({cmd:n,undo:r,mustExec:!0})}commitOrRemove(){this.#t?.commitOrRemove()}hasSomethingToControl(){return this.#t||this.hasSelection}#K(t){for(let n of this.#b)n.unselect();this.#b.clear();for(let n of t)n.isEmpty()||(this.#b.add(n),n.select());this.#H({hasSelectedEditor:this.hasSelection})}selectAll(){for(let t of this.#b)t.commit();this.#K(this.#i.values())}unselectAll(){if(!(this.#t&&(this.#t.commitOrRemove(),this.#_!==Ce.NONE))&&this.hasSelection){for(let t of this.#b)t.unselect();this.#b.clear(),this.#H({hasSelectedEditor:!1})}}translateSelectedEditors(t,n,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;this.#B[0]+=t,this.#B[1]+=n;let[s,a]=this.#B,o=[...this.#b],l=1e3;this.#F&&clearTimeout(this.#F),this.#F=setTimeout(()=>{this.#F=null,this.#B[0]=this.#B[1]=0,this.addCommands({cmd:()=>{for(let c of o)this.#i.has(c.id)&&c.translateInPage(s,a)},undo:()=>{for(let c of o)this.#i.has(c.id)&&c.translateInPage(-s,-a)},mustExec:!1})},l);for(let c of o)c.translateInPage(t,n)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#a=new Map;for(let t of this.#b)this.#a.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#a)return!1;this.disableUserSelect(!1);let t=this.#a;this.#a=null;let n=!1;for(let[{x:s,y:a,pageIndex:o},l]of t)l.newX=s,l.newY=a,l.newPageIndex=o,n||=s!==l.savedX||a!==l.savedY||o!==l.savedPageIndex;if(!n)return!1;let r=(s,a,o,l)=>{if(this.#i.has(s.id)){let c=this.#n.get(l);c?s._setParentAndPosition(c,a,o):(s.pageIndex=l,s.x=a,s.y=o)}};return this.addCommands({cmd:()=>{for(let[s,{newX:a,newY:o,newPageIndex:l}]of t)r(s,a,o,l)},undo:()=>{for(let[s,{savedX:a,savedY:o,savedPageIndex:l}]of t)r(s,a,o,l)},mustExec:!0}),!0}dragSelectedEditors(t,n){if(this.#a)for(let r of this.#a.keys())r.drag(t,n)}rebuild(t){if(t.parent===null){let n=this.getLayer(t.pageIndex);n?(n.changeParent(t),n.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#b.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#t===t}getActive(){return this.#t}getMode(){return this.#_}get imageManager(){return Pe(this,"imageManager",new v8)}getSelectionBoxes(t){if(!t)return null;let n=document.getSelection();for(let h=0,d=n.rangeCount;h({x:(d-s)/o,y:1-(h+u-r)/a,width:p/o,height:u/a});break;case"180":l=(h,d,u,p)=>({x:1-(h+u-r)/a,y:1-(d+p-s)/o,width:u/a,height:p/o});break;case"270":l=(h,d,u,p)=>({x:1-(d+p-s)/o,y:(h-r)/a,width:p/o,height:u/a});break;default:l=(h,d,u,p)=>({x:(h-r)/a,y:(d-s)/o,width:u/a,height:p/o});break}let c=[];for(let h=0,d=n.rangeCount;h{class i{#e=null;#t=!1;#i=null;#n=null;#r=null;#s=null;#l=!1;#c=null;#h=null;#o=null;#d=null;#a=!1;static#u=null;static _l10n=null;constructor(t){this.#h=t,this.#a=t._uiManager.useNewAltTextFlow,i.#u||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(t){i._l10n??=t}render(){return $(this,null,function*(){let t=this.#i=document.createElement("button");t.className="altText",t.tabIndex="0";let n=this.#n=document.createElement("span");t.append(n),this.#a?(t.classList.add("new"),t.setAttribute("data-l10n-id",i.#u.missing),n.setAttribute("data-l10n-id",i.#u["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),n.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));let r=this.#h._uiManager._signal;t.addEventListener("contextmenu",U0,{signal:r}),t.addEventListener("pointerdown",a=>a.stopPropagation(),{signal:r});let s=a=>{a.preventDefault(),this.#h._uiManager.editAltText(this.#h),this.#a&&this.#h._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#p}})};return t.addEventListener("click",s,{capture:!0,signal:r}),t.addEventListener("keydown",a=>{a.target===t&&a.key==="Enter"&&(this.#l=!0,s(a))},{signal:r}),yield this.#f(),t})}get#p(){return this.#e&&"added"||this.#e===null&&this.guessedText&&"review"||"missing"}finish(){this.#i&&(this.#i.focus({focusVisible:this.#l}),this.#l=!1)}isEmpty(){return this.#a?this.#e===null:!this.#e&&!this.#t}hasData(){return this.#a?this.#e!==null||!!this.#o:this.isEmpty()}get guessedText(){return this.#o}setGuessedText(t){return $(this,null,function*(){this.#e===null&&(this.#o=t,this.#d=yield i._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t}),this.#f())})}toggleAltTextBadge(t=!1){if(!this.#a||this.#e){this.#c?.remove(),this.#c=null;return}if(!this.#c){let n=this.#c=document.createElement("div");n.className="noAltTextBadge",this.#h.div.append(n)}this.#c.classList.toggle("hidden",!t)}serialize(t){let n=this.#e;return!t&&this.#o===n&&(n=this.#d),{altText:n,decorative:this.#t,guessedText:this.#o,textWithDisclaimer:this.#d}}get data(){return{altText:this.#e,decorative:this.#t}}set data({altText:t,decorative:n,guessedText:r,textWithDisclaimer:s,cancel:a=!1}){r&&(this.#o=r,this.#d=s),!(this.#e===t&&this.#t===n)&&(a||(this.#e=t,this.#t=n),this.#f())}toggle(t=!1){this.#i&&(!t&&this.#s&&(clearTimeout(this.#s),this.#s=null),this.#i.disabled=!t)}shown(){this.#h._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#p}})}destroy(){this.#i?.remove(),this.#i=null,this.#n=null,this.#r=null,this.#c?.remove(),this.#c=null}#f(){return $(this,null,function*(){let t=this.#i;if(!t)return;if(this.#a){if(t.classList.toggle("done",!!this.#e),t.setAttribute("data-l10n-id",i.#u[this.#p]),this.#n?.setAttribute("data-l10n-id",i.#u[`${this.#p}-label`]),!this.#e){this.#r?.remove();return}}else{if(!this.#e&&!this.#t){t.classList.remove("done"),this.#r?.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let n=this.#r;if(!n){this.#r=n=document.createElement("span"),n.className="tooltip",n.setAttribute("role","tooltip"),n.id=`alt-text-tooltip-${this.#h.id}`;let s=100,a=this.#h._uiManager._signal;a.addEventListener("abort",()=>{clearTimeout(this.#s),this.#s=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#s=setTimeout(()=>{this.#s=null,this.#r.classList.add("show"),this.#h._reportTelemetry({action:"alt_text_tooltip"})},s)},{signal:a}),t.addEventListener("mouseleave",()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#r?.classList.remove("show")},{signal:a})}this.#t?n.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(n.removeAttribute("data-l10n-id"),n.textContent=this.#e),n.parentNode||t.append(n),this.#h.getImageForAltText()?.setAttribute("aria-describedby",n.id)})}}return i})(),qe=class i{#e=null;#t=null;#i=null;#n=!1;#r=!1;#s=null;#l=null;#c=null;#h="";#o=!1;#d=null;#a=!1;#u=!1;#p=!1;#f=null;#g=0;#m=0;#v=null;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#w=!1;#y=i._zIndex++;static _borderLineWidth=-1;static _colorManager=new w8;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){let e=i.prototype._resizeWithKeyboard,t=Ao.TRANSLATE_SMALL,n=Ao.TRANSLATE_BIG;return Pe(this,"_resizerKeyboardManager",new Xn([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,n]}],[["Escape","mac+Escape"],i.prototype._stopResizingWithKeyboard]]))}constructor(e){this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;let{rotation:t,rawDims:{pageWidth:n,pageHeight:r,pageX:s,pageY:a}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,r],this.pageTranslation=[s,a];let[o,l]=this.parentDimensions;this.x=e.x/o,this.y=e.y/l,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return Pe(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){let t=new b8({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t){if(i._l10n??=e,i._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),i._borderLineWidth!==-1)return;let n=getComputedStyle(document.documentElement);i._borderLineWidth=parseFloat(n.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){nt("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#w}set _isDraggable(e){this.#w=e,this.div?.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){let[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(e*2),this.y+=this.width*e/(t*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(e*2),this.y-=this.width*e/(t*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#y}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):this.#R(),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#o?this.#o=!1:this.parent.setSelected(this))}focusout(e){!this._focusEventsAllowed||!this.isAttachedToDOM||e.relatedTarget?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,n,r){let[s,a]=this.parentDimensions;[n,r]=this.screenToPageTranslation(n,r),this.x=(e+n)/s,this.y=(t+r)/a,this.fixAndSetPosition()}#M([e,t],n,r){[n,r]=this.screenToPageTranslation(n,r),this.x+=n/e,this.y+=r/t,this.fixAndSetPosition()}translate(e,t){this.#M(this.parentDimensions,e,t)}translateInPage(e,t){this.#d||=[this.x,this.y],this.#M(this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){this.#d||=[this.x,this.y];let[n,r]=this.parentDimensions;if(this.x+=e/n,this.y+=t/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:c,y:h}=this.div.getBoundingClientRect();this.parent.findNewParent(this,c,h)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s,y:a}=this,[o,l]=this.getBaseTranslation();s+=o,a+=l,this.div.style.left=`${(100*s).toFixed(2)}%`,this.div.style.top=`${(100*a).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!this.#d&&(this.#d[0]!==this.x||this.#d[1]!==this.y)}getBaseTranslation(){let[e,t]=this.parentDimensions,{_borderLineWidth:n}=i,r=n/e,s=n/t;switch(this.rotation){case 90:return[-r,s];case 180:return[r,s];case 270:return[r,-s];default:return[-r,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){let[t,n]=this.pageDimensions,{x:r,y:s,width:a,height:o}=this;if(a*=t,o*=n,r*=t,s*=n,this._mustFixPosition)switch(e){case 0:r=Math.max(0,Math.min(t-a,r)),s=Math.max(0,Math.min(n-o,s));break;case 90:r=Math.max(0,Math.min(t-o,r)),s=Math.min(n,Math.max(a,s));break;case 180:r=Math.min(t,Math.max(a,r)),s=Math.min(n,Math.max(o,s));break;case 270:r=Math.min(t,Math.max(o,r)),s=Math.max(0,Math.min(n-a,s));break}this.x=r/=t,this.y=s/=n;let[l,c]=this.getBaseTranslation();r+=l,s+=c;let{style:h}=this.div;h.left=`${(100*r).toFixed(2)}%`,h.top=`${(100*s).toFixed(2)}%`,this.moveInDOM()}static#C(e,t,n){switch(n){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}screenToPageTranslation(e,t){return i.#C(e,t,this.parentRotation)}pageTranslationToScreen(e,t){return i.#C(e,t,360-this.parentRotation)}#x(e){switch(e){case 90:{let[t,n]=this.pageDimensions;return[0,-t/n,n/t,0]}case 180:return[-1,0,0,-1];case 270:{let[t,n]=this.pageDimensions;return[0,t/n,-n/t,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){let{parentScale:e,pageDimensions:[t,n]}=this;return[t*e,n*e]}setDims(e,t){let[n,r]=this.parentDimensions;this.div.style.width=`${(100*e/n).toFixed(2)}%`,this.#r||(this.div.style.height=`${(100*t/r).toFixed(2)}%`)}fixDims(){let{style:e}=this.div,{height:t,width:n}=e,r=n.endsWith("%"),s=!this.#r&&t.endsWith("%");if(r&&s)return;let[a,o]=this.parentDimensions;r||(e.width=`${(100*parseFloat(n)/a).toFixed(2)}%`),!this.#r&&!s&&(e.height=`${(100*parseFloat(t)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#T(){if(this.#s)return;this.#s=document.createElement("div"),this.#s.classList.add("resizers");let e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(let n of e){let r=document.createElement("div");this.#s.append(r),r.classList.add("resizer",n),r.setAttribute("data-resizer-name",n),r.addEventListener("pointerdown",this.#D.bind(this,n),{signal:t}),r.addEventListener("contextmenu",U0,{signal:t}),r.tabIndex=-1}this.div.prepend(this.#s)}#D(e,t){t.preventDefault();let{isMac:n}=It.platform;if(t.button!==0||t.ctrlKey&&n)return;this.#i?.toggle(!1);let r=this._isDraggable;this._isDraggable=!1;let s=new AbortController,a=this._uiManager.combinedSignal(s);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#E.bind(this,e),{passive:!0,capture:!0,signal:a}),window.addEventListener("contextmenu",U0,{signal:a});let o=this.x,l=this.y,c=this.width,h=this.height,d=this.parent.div.style.cursor,u=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;let p=()=>{s.abort(),this.parent.togglePointerEvents(!0),this.#i?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=d,this.div.style.cursor=u,this.#A(o,l,c,h)};window.addEventListener("pointerup",p,{signal:a}),window.addEventListener("blur",p,{signal:a})}#A(e,t,n,r){let s=this.x,a=this.y,o=this.width,l=this.height;s===e&&a===t&&o===n&&l===r||this.addCommands({cmd:()=>{this.width=o,this.height=l,this.x=s,this.y=a;let[c,h]=this.parentDimensions;this.setDims(c*o,h*l),this.fixAndSetPosition()},undo:()=>{this.width=n,this.height=r,this.x=e,this.y=t;let[c,h]=this.parentDimensions;this.setDims(c*n,h*r),this.fixAndSetPosition()},mustExec:!0})}#E(e,t){let[n,r]=this.parentDimensions,s=this.x,a=this.y,o=this.width,l=this.height,c=i.MIN_SIZE/n,h=i.MIN_SIZE/r,d=R=>Math.round(R*1e4)/1e4,u=this.#x(this.rotation),p=(R,I)=>[u[0]*R+u[2]*I,u[1]*R+u[3]*I],f=this.#x(360-this.rotation),g=(R,I)=>[f[0]*R+f[2]*I,f[1]*R+f[3]*I],y,x,_=!1,b=!1;switch(e){case"topLeft":_=!0,y=(R,I)=>[0,0],x=(R,I)=>[R,I];break;case"topMiddle":y=(R,I)=>[R/2,0],x=(R,I)=>[R/2,I];break;case"topRight":_=!0,y=(R,I)=>[R,0],x=(R,I)=>[0,I];break;case"middleRight":b=!0,y=(R,I)=>[R,I/2],x=(R,I)=>[0,I/2];break;case"bottomRight":_=!0,y=(R,I)=>[R,I],x=(R,I)=>[0,0];break;case"bottomMiddle":y=(R,I)=>[R/2,I],x=(R,I)=>[R/2,0];break;case"bottomLeft":_=!0,y=(R,I)=>[0,I],x=(R,I)=>[R,0];break;case"middleLeft":b=!0,y=(R,I)=>[0,I/2],x=(R,I)=>[R,I/2];break}let v=y(o,l),m=x(o,l),M=p(...m),L=d(s+M[0]),w=d(a+M[1]),E=1,A=1,[P,O]=this.screenToPageTranslation(t.movementX,t.movementY);if([P,O]=g(P/n,O/r),_){let R=Math.hypot(o,l);E=A=Math.max(Math.min(Math.hypot(m[0]-v[0]-P,m[1]-v[1]-O)/R,1/o,1/l),c/o,h/l)}else b?E=Math.max(c,Math.min(1,Math.abs(m[0]-v[0]-P)))/o:A=Math.max(h,Math.min(1,Math.abs(m[1]-v[1]-O)))/l;let G=d(o*E),K=d(l*A);M=p(...x(G,K));let te=L-M[0],F=w-M[1];this.width=G,this.height=K,this.x=te,this.y=F,this.setDims(n*G,r*K),this.fixAndSetPosition()}altTextFinish(){this.#i?.finish()}addEditToolbar(){return $(this,null,function*(){return this._editToolbar||this.#u?this._editToolbar:(this._editToolbar=new f8(this),this.div.append(this._editToolbar.render()),this.#i&&(yield this._editToolbar.addAltText(this.#i)),this._editToolbar)})}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#i?.destroy())}addContainer(e){let t=this._editToolbar?.div;t?t.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}addAltTextButton(){return $(this,null,function*(){this.#i||(rA.initialize(i._l10n),this.#i=new rA(this),this.#e&&(this.#i.data=this.#e,this.#e=null),yield this.addEditToolbar())})}get altTextData(){return this.#i?.data}set altTextData(e){this.#i&&(this.#i.data=e)}get guessedAltText(){return this.#i?.guessedText}setGuessedAltText(e){return $(this,null,function*(){yield this.#i?.setGuessedText(e)})}serializeAltText(e){return this.#i?.serialize(e)}hasAltText(){return!!this.#i&&!this.#i.isEmpty()}hasAltTextData(){return this.#i?.hasData()??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=this.#n?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),this.#P();let[e,t]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);let[n,r]=this.getInitialTranslation();return this.translate(n,r),Kc(this,this.div,["pointerdown"]),this.div}pointerdown(e){let{isMac:t}=It.platform;if(e.button!==0||e.ctrlKey&&t){e.preventDefault();return}if(this.#o=!0,this._isDraggable){this.#L(e);return}this.#S(e)}get isSelected(){return this._uiManager.isSelected(this)}#S(e){let{isMac:t}=It.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}#L(e){let{isSelected:t}=this;this._uiManager.setUpDragSession();let n=new AbortController,r=this._uiManager.combinedSignal(n);if(t){this.div.classList.add("moving"),this.#g=e.clientX,this.#m=e.clientY;let a=o=>{let{clientX:l,clientY:c}=o,[h,d]=this.screenToPageTranslation(l-this.#g,c-this.#m);this.#g=l,this.#m=c,this._uiManager.dragSelectedEditors(h,d)};window.addEventListener("pointermove",a,{passive:!0,capture:!0,signal:r})}let s=()=>{n.abort(),t&&this.div.classList.remove("moving"),this.#o=!1,this._uiManager.endDragSession()||this.#S(e)};window.addEventListener("pointerup",s,{signal:r}),window.addEventListener("blur",s,{signal:r})}moveInDOM(){this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#f=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(e,t,n){e.changeParent(this),this.x=t,this.y=n,this.fixAndSetPosition()}getRect(e,t,n=this.rotation){let r=this.parentScale,[s,a]=this.pageDimensions,[o,l]=this.pageTranslation,c=e/r,h=t/r,d=this.x*s,u=this.y*a,p=this.width*s,f=this.height*a;switch(n){case 0:return[d+c+o,a-u-h-f+l,d+c+p+o,a-u-h+l];case 90:return[d+h+o,a-u+c+l,d+h+f+o,a-u+c+p+l];case 180:return[d-c-p+o,a-u+h+l,d-c+o,a-u+h+f+l];case 270:return[d-h-f+o,a-u-c-p+l,d-h+o,a-u-c+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){let[n,r,s,a]=e,o=s-n,l=a-r;switch(this.rotation){case 0:return[n,t-a,o,l];case 90:return[n,t-r,l,o];case 180:return[s,t-r,o,l];case 270:return[s,t-a,l,o];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#u=!0}disableEditMode(){this.#u=!1}isInEditMode(){return this.#u}shouldGetKeyboardEvents(){return this.#p}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}#P(){if(this.#c||!this.div)return;this.#c=new AbortController;let e=this._uiManager.combinedSignal(this.#c);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})}rebuild(){this.#P()}rotate(e){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(e=!1,t=null){nt("An editor must be serializable")}static deserialize(e,t,n){return $(this,null,function*(){let r=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:n});r.rotation=e.rotation,r.#e=e.accessibilityData;let[s,a]=r.pageDimensions,[o,l,c,h]=r.getRectInCurrentCoords(e.rect,a);return r.x=o/s,r.y=l/a,r.width=c/s,r.height=h/a,r})}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#c?.abort(),this.#c=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#f&&(clearTimeout(this.#f),this.#f=null),this.#R(),this.removeEditToolbar(),this.#v){for(let e of this.#v.values())clearTimeout(e);this.#v=null}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#T(),this.#s.classList.remove("hidden"),Kc(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),this.#l={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let t=this.#s.children;if(!this.#t){this.#t=Array.from(t);let a=this.#_.bind(this),o=this.#b.bind(this),l=this._uiManager._signal;for(let c of this.#t){let h=c.getAttribute("data-resizer-name");c.setAttribute("role","spinbutton"),c.addEventListener("keydown",a,{signal:l}),c.addEventListener("blur",o,{signal:l}),c.addEventListener("focus",this.#V.bind(this,h),{signal:l}),c.setAttribute("data-l10n-id",i._l10nResizer[h])}}let n=this.#t[0],r=0;for(let a of t){if(a===n)break;r++}let s=(360-this.rotation+this.parentRotation)%360/90*(this.#t.length/4);if(s!==r){if(sr)for(let o=0;o{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#i?.toggleAltTextBadge(!1)}unselect(){this.#s?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#i?.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#a}set isEditing(e){this.#a=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){this.#r=!0;let n=e/t,{style:r}=this.div;r.aspectRatio=n,r.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){this.#v||=new Map;let{action:n}=e,r=this.#v.get(n);r&&clearTimeout(r),r=setTimeout(()=>{this._reportTelemetry(e),this.#v.delete(n),this.#v.size===0&&(this.#v=null)},i._telemetryTimeout),this.#v.set(n,r);return}e.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),this.#n=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#n=!0}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(!t)t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);else if(t.nodeName==="CANVAS"){let n=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),n.before(t)}return t}resetAnnotationElement(e){let{firstChild:t}=e.container;t?.nodeName==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}},b8=class extends qe{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}},sA=3285377520,j0=4294901760,F1=65535,Qc=class{constructor(e){this.h1=e?e&4294967295:sA,this.h2=e?e&4294967295:sA}update(e){let t,n;if(typeof e=="string"){t=new Uint8Array(e.length*2),n=0;for(let g=0,y=e.length;g>>8,t[n++]=x&255)}}else if(ArrayBuffer.isView(e))t=e.slice(),n=t.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");let r=n>>2,s=n-r*4,a=new Uint32Array(t.buffer,0,r),o=0,l=0,c=this.h1,h=this.h2,d=3432918353,u=461845907,p=d&F1,f=u&F1;for(let g=0;g>>17,o=o*u&j0|o*f&F1,c^=o,c=c<<13|c>>>19,c=c*5+3864292196):(l=a[g],l=l*d&j0|l*p&F1,l=l<<15|l>>>17,l=l*u&j0|l*f&F1,h^=l,h=h<<13|h>>>19,h=h*5+3864292196);switch(o=0,s){case 3:o^=t[r*4+2]<<16;case 2:o^=t[r*4+1]<<8;case 1:o^=t[r*4],o=o*d&j0|o*p&F1,o=o<<15|o>>>17,o=o*u&j0|o*f&F1,r&1?c^=o:h^=o}this.h1=c,this.h2=h}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=e*3981806797&j0|e*36045&F1,t=t*4283543511&j0|((t<<16|e>>>16)*2950163797&j0)>>>16,e^=t>>>1,e=e*444984403&j0|e*60499&F1,t=t*3301882366&j0|((t<<16|e>>>16)*3120437893&j0)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}},y8=Object.freeze({map:null,hash:"",transfer:void 0}),_o=class{#e=!1;#t=null;#i=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){let n=this.#i.get(e);return n===void 0?t:Object.assign(t,n)}getRawValue(e){return this.#i.get(e)}remove(e){if(this.#i.delete(e),this.#i.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(let t of this.#i.values())if(t instanceof qe)return;this.onAnnotationEditor(null)}}setValue(e,t){let n=this.#i.get(e),r=!1;if(n!==void 0)for(let[s,a]of Object.entries(t))n[s]!==a&&(r=!0,n[s]=a);else r=!0,this.#i.set(e,t);r&&this.#n(),t instanceof qe&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#i.has(e)}getAll(){return this.#i.size>0?V7(this.#i):null}setAll(e){for(let[t,n]of Object.entries(e))this.setValue(t,n)}get size(){return this.#i.size}#n(){this.#e||(this.#e=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#e&&(this.#e=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new Jc(this)}get serializable(){if(this.#i.size===0)return y8;let e=new Map,t=new Qc,n=[],r=Object.create(null),s=!1;for(let[a,o]of this.#i){let l=o instanceof qe?o.serialize(!1,r):o;l&&(e.set(a,l),t.update(`${a}:${JSON.stringify(l)}`),s||=!!l.bitmap)}if(s)for(let a of e.values())a.bitmap&&n.push(a.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:n}:y8}get editorStats(){let e=null,t=new Map;for(let n of this.#i.values()){if(!(n instanceof qe))continue;let r=n.telemetryFinalData;if(!r)continue;let{type:s}=r;t.has(s)||t.set(s,Object.getPrototypeOf(n).constructor),e||=Object.create(null);let a=e[s]||=new Map;for(let[o,l]of Object.entries(r)){if(o==="type")continue;let c=a.get(o);c||(c=new Map,a.set(o,c));let h=c.get(l)??0;c.set(l,h+1)}}for(let[n,r]of t)e[n]=r.computeTelemetryFinalData(e[n]);return e}resetModifiedIds(){this.#t=null}get modifiedIds(){if(this.#t)return this.#t;let e=[];for(let t of this.#i.values())!(t instanceof qe)||!t.annotationElementId||!t.serialize()||e.push(t.annotationElementId);return this.#t={ids:new Set(e),hash:e.join(",")}}},Jc=class extends _o{#e;constructor(e){super();let{map:t,hash:n,transfer:r}=e.serializable,s=structuredClone(t,r?{transfer:r}:null);this.#e={map:s,hash:n,transfer:r}}get print(){nt("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}get modifiedIds(){return Pe(this,"modifiedIds",{ids:new Set,hash:""})}},C8=class{#e=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));let t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(let e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}loadSystemFont(n){return $(this,arguments,function*({systemFontInfo:e,_inspectFont:t}){if(!(!e||this.#e.has(e.loadedName))){if(Et(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:r,src:s,style:a}=e,o=new FontFace(r,s,a);this.addNativeFontFace(o);try{yield o.load(),this.#e.add(r),t?.(e)}catch{De(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}nt("Not implemented: loadSystemFont without the Font Loading API.")}})}bind(e){return $(this,null,function*(){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){yield this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){let n=e.createNativeFontFace();if(n){this.addNativeFontFace(n);try{yield n.loaded}catch(r){throw De(`Failed to load font '${n.family}': '${r}'.`),e.disableFontFace=!0,r}}return}let t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;yield new Promise(n=>{let r=this._queueLoadingCallback(n);this._prepareFontLoadEvent(e,r)})}})}get isFontLoadingAPISupported(){let e=!!this._document?.fonts;return Pe(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(qt||typeof navigator<"u"&&typeof navigator?.userAgent=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),Pe(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){function t(){for(Et(!r.done,"completeRequest() cannot be called twice."),r.done=!0;n.length>0&&n[0].done;){let s=n.shift();setTimeout(s.callback,0)}}let{loadingRequests:n}=this,r={done:!1,complete:t,callback:e};return n.push(r),r}get _loadTestFont(){let e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return Pe(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function n(v,m){return v.charCodeAt(m)<<24|v.charCodeAt(m+1)<<16|v.charCodeAt(m+2)<<8|v.charCodeAt(m+3)&255}function r(v,m,M,L){let w=v.substring(0,m),E=v.substring(m+M);return w+L+E}let s,a,o=this._document.createElement("canvas");o.width=1,o.height=1;let l=o.getContext("2d"),c=0;function h(v,m){if(++c>30){De("Load test font never loaded."),m();return}if(l.font="30px "+v,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){m();return}setTimeout(h.bind(null,v,m))}let d=`lt${Date.now()}${this.loadTestFontId++}`,u=this._loadTestFont;u=r(u,976,d.length,d);let f=16,g=1482184792,y=n(u,f);for(s=0,a=d.length-3;s{b.remove(),t.complete()})}},x8=class{constructor(e,{disableFontFace:t=!1,inspectFont:n=null}){this.compiledGlyphs=Object.create(null);for(let r in e)this[r]=e[r];this.disableFontFace=t===!0,this._inspectFont=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{let t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;let e=`url(data:${this.mimetype};base64,${sI(this.data)});`,t;if(!this.cssFontInfo)t=`@font-face {font-family:"${this.loadedName}";src:${e}}`;else{let n=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(n+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),t=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${n}src:${e}}`}return this._inspectFont?.(this,e),t}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+"_path_"+t)}catch(s){De(`getPathGenerator - ignoring character: "${s}".`)}if(!Array.isArray(n)||n.length===0)return this.compiledGlyphs[t]=function(s,a){};let r=[];for(let s=0,a=n.length;sp.bezierCurveTo(o,l,c,h,d,u)),s+=6}break;case bi.MOVE_TO:{let[o,l]=n.slice(s,s+2);r.push(c=>c.moveTo(o,l)),s+=2}break;case bi.LINE_TO:{let[o,l]=n.slice(s,s+2);r.push(c=>c.lineTo(o,l)),s+=2}break;case bi.QUADRATIC_CURVE_TO:{let[o,l,c,h]=n.slice(s,s+4);r.push(d=>d.quadraticCurveTo(o,l,c,h)),s+=4}break;case bi.RESTORE:r.push(o=>o.restore());break;case bi.SAVE:r.push(o=>o.save());break;case bi.SCALE:Et(r.length===2,"Scale command is only valid at the third position.");break;case bi.TRANSFORM:{let[o,l,c,h,d,u]=n.slice(s,s+6);r.push(p=>p.transform(o,l,c,h,d,u)),s+=6}break;case bi.TRANSLATE:{let[o,l]=n.slice(s,s+2);r.push(c=>c.translate(o,l)),s+=2}break}return this.compiledGlyphs[t]=function(a,o){r[0](a),r[1](a),a.scale(o,-o);for(let l=2,c=r.length;l({cMapData:r,isCompressed:this.isCompressed})).catch(r=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${n}`)})})}_fetch(e){return $(this,null,function*(){nt("Abstract method `_fetch` called.")})}},ih=class extends th{_fetch(e){return $(this,null,function*(){let t=yield Th(e,this.isCompressed?"arraybuffer":"text");return t instanceof ArrayBuffer?new Uint8Array(t):Vh(t)})}},nh=class{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,n,r,s){return"none"}destroy(e=!1){}},A8=class extends nh{#e;#t;#i;#n;#r;#s;#l=0;constructor({docId:e,ownerDocument:t=globalThis.document}){super(),this.#n=e,this.#r=t}get#c(){return this.#t||=new Map}get#h(){return this.#s||=new Map}get#o(){if(!this.#i){let e=this.#r.createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;let n=this.#r.createElementNS(Ci,"svg");n.setAttribute("width",0),n.setAttribute("height",0),this.#i=this.#r.createElementNS(Ci,"defs"),e.append(n),n.append(this.#i),this.#r.body.append(e)}return this.#i}#d(e){if(e.length===1){let l=e[0],c=new Array(256);for(let d=0;d<256;d++)c[d]=l[d]/255;let h=c.join(",");return[h,h,h]}let[t,n,r]=e,s=new Array(256),a=new Array(256),o=new Array(256);for(let l=0;l<256;l++)s[l]=t[l]/255,a[l]=n[l]/255,o[l]=r[l]/255;return[s.join(","),a.join(","),o.join(",")]}#a(e){if(this.#e===void 0){this.#e="";let t=this.#r.URL;t!==this.#r.baseURI&&(Lh(t)?De('#createUrl: ignore "data:"-URL for performance reasons.'):this.#e=t.split("#",1)[0])}return`url(${this.#e}#${e})`}addFilter(e){if(!e)return"none";let t=this.#c.get(e);if(t)return t;let[n,r,s]=this.#d(e),a=e.length===1?n:`${n}${r}${s}`;if(t=this.#c.get(a),t)return this.#c.set(e,t),t;let o=`g_${this.#n}_transfer_map_${this.#l++}`,l=this.#a(o);this.#c.set(e,l),this.#c.set(a,l);let c=this.#f(o);return this.#m(n,r,s,c),l}addHCMFilter(e,t){let n=`${e}-${t}`,r="base",s=this.#h.get(r);if(s?.key===n||(s?(s.filter?.remove(),s.key=n,s.url="none",s.filter=null):(s={key:n,url:"none",filter:null},this.#h.set(r,s)),!e||!t))return s.url;let a=this.#w(e);e=ne.makeHexColor(...a);let o=this.#w(t);if(t=ne.makeHexColor(...o),this.#o.style.color="",e==="#000000"&&t==="#ffffff"||e===t)return s.url;let l=new Array(256);for(let p=0;p<=255;p++){let f=p/255;l[p]=f<=.03928?f/12.92:((f+.055)/1.055)**2.4}let c=l.join(","),h=`g_${this.#n}_hcm_filter`,d=s.filter=this.#f(h);this.#m(c,c,c,d),this.#p(d);let u=(p,f)=>{let g=a[p]/255,y=o[p]/255,x=new Array(f+1);for(let _=0;_<=f;_++)x[_]=g+_/f*(y-g);return x.join(",")};return this.#m(u(0,5),u(1,5),u(2,5),d),s.url=this.#a(h),s.url}addAlphaFilter(e){let t=this.#c.get(e);if(t)return t;let[n]=this.#d([e]),r=`alpha_${n}`;if(t=this.#c.get(r),t)return this.#c.set(e,t),t;let s=`g_${this.#n}_alpha_map_${this.#l++}`,a=this.#a(s);this.#c.set(e,a),this.#c.set(r,a);let o=this.#f(s);return this.#v(n,o),a}addLuminosityFilter(e){let t=this.#c.get(e||"luminosity");if(t)return t;let n,r;if(e?([n]=this.#d([e]),r=`luminosity_${n}`):r="luminosity",t=this.#c.get(r),t)return this.#c.set(e,t),t;let s=`g_${this.#n}_luminosity_map_${this.#l++}`,a=this.#a(s);this.#c.set(e,a),this.#c.set(r,a);let o=this.#f(s);return this.#u(o),e&&this.#v(n,o),a}addHighlightHCMFilter(e,t,n,r,s){let a=`${t}-${n}-${r}-${s}`,o=this.#h.get(e);if(o?.key===a||(o?(o.filter?.remove(),o.key=a,o.url="none",o.filter=null):(o={key:a,url:"none",filter:null},this.#h.set(e,o)),!t||!n))return o.url;let[l,c]=[t,n].map(this.#w.bind(this)),h=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),d=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[u,p]=[r,s].map(this.#w.bind(this));d{let v=new Array(256),m=(d-h)/b,M=x/255,L=(_-x)/(255*b),w=0;for(let E=0;E<=b;E++){let A=Math.round(h+E*m),P=M+E*L;for(let O=w;O<=A;O++)v[O]=P;w=A+1}for(let E=w;E<256;E++)v[E]=v[w-1];return v.join(",")},g=`g_${this.#n}_hcm_${e}_filter`,y=o.filter=this.#f(g);return this.#p(y),this.#m(f(u[0],p[0],5),f(u[1],p[1],5),f(u[2],p[2],5),y),o.url=this.#a(g),o.url}destroy(e=!1){e&&this.#h.size!==0||(this.#i&&(this.#i.parentNode.parentNode.remove(),this.#i=null),this.#t&&(this.#t.clear(),this.#t=null),this.#l=0)}#u(e){let t=this.#r.createElementNS(Ci,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(t)}#p(e){let t=this.#r.createElementNS(Ci,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)}#f(e){let t=this.#r.createElementNS(Ci,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),this.#o.append(t),t}#g(e,t,n){let r=this.#r.createElementNS(Ci,t);r.setAttribute("type","discrete"),r.setAttribute("tableValues",n),e.append(r)}#m(e,t,n,r){let s=this.#r.createElementNS(Ci,"feComponentTransfer");r.append(s),this.#g(s,"feFuncR",e),this.#g(s,"feFuncG",t),this.#g(s,"feFuncB",n)}#v(e,t){let n=this.#r.createElementNS(Ci,"feComponentTransfer");t.append(n),this.#g(n,"feFuncA",e)}#w(e){return this.#o.style.color=e,z7(getComputedStyle(this.#o).getPropertyValue("color"))}},rh=class{constructor({baseUrl:e=null}){this.baseUrl=e}fetch(t){return $(this,arguments,function*({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");let n=`${this.baseUrl}${e}`;return this._fetch(n).catch(r=>{throw new Error(`Unable to load font data at: ${n}`)})})}_fetch(e){return $(this,null,function*(){nt("Abstract method `_fetch` called.")})}},sh=class extends rh{_fetch(e){return $(this,null,function*(){let t=yield Th(e,"arraybuffer");return new Uint8Array(t)})}};qt&&(qc=Promise.withResolvers(),Gc=null,$(null,null,function*(){let e=yield import("./chunk-L2HEV66R.js"),t=yield import("./chunk-BMBYILCS.js"),n=yield import("./chunk-ALIQTIYY.js"),r=yield import("./chunk-NYZOWURK.js"),s,a;return new Map(Object.entries({fs:e,http:t,https:n,url:r,canvas:s,path2d:a}))}).then(e=>{Gc=e,qc.resolve()},e=>{De(`loadPackages: ${e}`),Gc=new Map,qc.resolve()}));var qc,Gc,R1=class{static get promise(){return qc.promise}static get(e){return Gc?.get(e)}};function bA(i){return $(this,null,function*(){let t=yield R1.get("fs").promises.readFile(i);return new Uint8Array(t)})}var _8=class extends nh{},S8=class extends eh{_createCanvas(e,t){return R1.get("canvas").createCanvas(e,t)}},D8=class extends th{_fetch(e){return $(this,null,function*(){return bA(e)})}},E8=class extends rh{_fetch(e){return $(this,null,function*(){return bA(e)})}},Jt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function V8(i,e){if(!e)return;let t=e[2]-e[0],n=e[3]-e[1],r=new Path2D;r.rect(e[0],e[1],t,n),i.clip(r)}var So=class{getPattern(){nt("Abstract method `getPattern` called.")}},T8=class extends So{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;this._type==="axial"?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let n of this._colorStops)t.addColorStop(n[0],n[1]);return t}getPattern(e,t,n,r){let s;if(r===Jt.STROKE||r===Jt.FILL){let a=t.current.getClippedPathBoundingBox(r,ot(e))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,l=Math.ceil(a[3]-a[1])||1,c=t.cachedCanvases.getCanvas("pattern",o,l),h=c.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-a[0],-a[1]),n=ne.transform(n,[1,0,0,1,a[0],a[1]]),h.transform(...t.baseTransform),this.matrix&&h.transform(...this.matrix),V8(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),s=e.createPattern(c.canvas,"no-repeat");let d=new DOMMatrix(n);s.setTransform(d)}else V8(e,this._bbox),s=this._createGradient(e);return s}};function l8(i,e,t,n,r,s,a,o){let l=e.coords,c=e.colors,h=i.data,d=i.width*4,u;l[t+1]>l[n+1]&&(u=t,t=n,n=u,u=s,s=a,a=u),l[n+1]>l[r+1]&&(u=n,n=r,r=u,u=a,a=o,o=u),l[t+1]>l[n+1]&&(u=t,t=n,n=u,u=s,s=a,a=u);let p=(l[t]+e.offsetX)*e.scaleX,f=(l[t+1]+e.offsetY)*e.scaleY,g=(l[n]+e.offsetX)*e.scaleX,y=(l[n+1]+e.offsetY)*e.scaleY,x=(l[r]+e.offsetX)*e.scaleX,_=(l[r+1]+e.offsetY)*e.scaleY;if(f>=_)return;let b=c[s],v=c[s+1],m=c[s+2],M=c[a],L=c[a+1],w=c[a+2],E=c[o],A=c[o+1],P=c[o+2],O=Math.round(f),G=Math.round(_),K,te,F,R,I,re,ve,Re;for(let Te=O;Te<=G;Te++){if(Te_?C=1:y===_?C=0:C=(y-Te)/(y-_),K=g-(g-x)*C,te=M-(M-E)*C,F=L-(L-A)*C,R=w-(w-P)*C}let ke;Te_?ke=1:ke=(f-Te)/(f-_),I=p-(p-x)*ke,re=b-(b-E)*ke,ve=v-(v-A)*ke,Re=m-(m-P)*ke;let ze=Math.round(Math.min(K,I)),T0=Math.round(Math.max(K,I)),V=d*Te+ze*4;for(let C=ze;C<=T0;C++)ke=(K-C)/(K-I),ke<0?ke=0:ke>1&&(ke=1),h[V++]=te-(te-re)*ke|0,h[V++]=F-(F-ve)*ke|0,h[V++]=R-(R-Re)*ke|0,h[V++]=255}}function dI(i,e,t){let n=e.coords,r=e.colors,s,a;switch(e.type){case"lattice":let o=e.verticesPerRow,l=Math.floor(n.length/o)-1,c=o-1;for(s=0;s{class i{static MAX_PATTERN_SIZE=3e3;constructor(t,n,r,s,a){this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=n,this.ctx=r,this.canvasGraphicsFactory=s,this.baseTransform=a}createPatternCanvas(t){let{bbox:n,operatorList:r,paintType:s,tilingType:a,color:o,canvasGraphicsFactory:l}=this,{xstep:c,ystep:h}=this;c=Math.abs(c),h=Math.abs(h),Eh("TilingType: "+a);let d=n[0],u=n[1],p=n[2],f=n[3],g=p-d,y=f-u,x=ne.singularValueDecompose2dScale(this.matrix),_=ne.singularValueDecompose2dScale(this.baseTransform),b=x[0]*_[0],v=x[1]*_[1],m=g,M=y,L=!1,w=!1,E=Math.ceil(c*b),A=Math.ceil(h*v),P=Math.ceil(g*b),O=Math.ceil(y*v);E>=P?m=c:L=!0,A>=O?M=h:w=!0;let G=this.getSizeAndScale(m,this.ctx.canvas.width,b),K=this.getSizeAndScale(M,this.ctx.canvas.height,v),te=t.cachedCanvases.getCanvas("pattern",G.size,K.size),F=te.context,R=l.createCanvasGraphics(F);if(R.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(R,s,o),F.translate(-G.scale*d,-K.scale*u),R.transform(G.scale,0,0,K.scale,0,0),F.save(),this.clipBbox(R,d,u,p,f),R.baseTransform=ot(R.ctx),R.executeOperatorList(r),R.endDrawing(),F.restore(),L||w){let I=te.canvas;L&&(m=c),w&&(M=h);let re=this.getSizeAndScale(m,this.ctx.canvas.width,b),ve=this.getSizeAndScale(M,this.ctx.canvas.height,v),Re=re.size,Te=ve.size,ke=t.cachedCanvases.getCanvas("pattern-workaround",Re,Te),ze=ke.context,T0=L?Math.floor(g/c):0,V=w?Math.floor(y/h):0;for(let C=0;C<=T0;C++)for(let N=0;N<=V;N++)ze.drawImage(I,Re*C,Te*N,Re,Te,0,0,Re,Te);return{canvas:ke.canvas,scaleX:re.scale,scaleY:ve.scale,offsetX:d,offsetY:u}}return{canvas:te.canvas,scaleX:G.scale,scaleY:K.scale,offsetX:d,offsetY:u}}getSizeAndScale(t,n,r){let s=Math.max(i.MAX_PATTERN_SIZE,n),a=Math.ceil(t*r);return a>=s?a=s:r=a/t,{scale:r,size:a}}clipBbox(t,n,r,s,a){let o=s-n,l=a-r;t.ctx.rect(n,r,o,l),t.current.updateRectMinMax(ot(t.ctx),[n,r,s,a]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,n,r){let s=t.ctx,a=t.current;switch(n){case aA.COLORED:let o=this.ctx;s.fillStyle=o.fillStyle,s.strokeStyle=o.strokeStyle,a.fillColor=o.fillStyle,a.strokeColor=o.strokeStyle;break;case aA.UNCOLORED:let l=ne.makeHexColor(r[0],r[1],r[2]);s.fillStyle=l,s.strokeStyle=l,a.fillColor=l,a.strokeColor=l;break;default:throw new u8(`Unsupported paint type: ${n}`)}}getPattern(t,n,r,s){let a=r;s!==Jt.SHADING&&(a=ne.transform(a,n.baseTransform),this.matrix&&(a=ne.transform(a,this.matrix)));let o=this.createPatternCanvas(n),l=new DOMMatrix(a);l=l.translate(o.offsetX,o.offsetY),l=l.scale(1/o.scaleX,1/o.scaleY);let c=t.createPattern(o.canvas,"repeat");return c.setTransform(l),c}}return i})();function pI({src:i,srcPos:e=0,dest:t,width:n,height:r,nonBlackColor:s=4294967295,inverseDecode:a=!1}){let o=It.isLittleEndian?4278190080:255,[l,c]=a?[s,o]:[o,s],h=n>>3,d=n&7,u=i.length;t=new Uint32Array(t.buffer);let p=0;for(let f=0;f{i.save=i.__originalSave,i.restore=i.__originalRestore,i.rotate=i.__originalRotate,i.scale=i.__originalScale,i.translate=i.__originalTranslate,i.transform=i.__originalTransform,i.setTransform=i.__originalSetTransform,i.resetTransform=i.__originalResetTransform,i.clip=i.__originalClip,i.moveTo=i.__originalMoveTo,i.lineTo=i.__originalLineTo,i.bezierCurveTo=i.__originalBezierCurveTo,i.rect=i.__originalRect,i.closePath=i.__originalClosePath,i.beginPath=i.__originalBeginPath,delete i._removeMirroring},i.save=function(){e.save(),this.__originalSave()},i.restore=function(){e.restore(),this.__originalRestore()},i.translate=function(n,r){e.translate(n,r),this.__originalTranslate(n,r)},i.scale=function(n,r){e.scale(n,r),this.__originalScale(n,r)},i.transform=function(n,r,s,a,o,l){e.transform(n,r,s,a,o,l),this.__originalTransform(n,r,s,a,o,l)},i.setTransform=function(n,r,s,a,o,l){e.setTransform(n,r,s,a,o,l),this.__originalSetTransform(n,r,s,a,o,l)},i.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},i.rotate=function(n){e.rotate(n),this.__originalRotate(n)},i.clip=function(n){e.clip(n),this.__originalClip(n)},i.moveTo=function(t,n){e.moveTo(t,n),this.__originalMoveTo(t,n)},i.lineTo=function(t,n){e.lineTo(t,n),this.__originalLineTo(t,n)},i.bezierCurveTo=function(t,n,r,s,a,o){e.bezierCurveTo(t,n,r,s,a,o),this.__originalBezierCurveTo(t,n,r,s,a,o)},i.rect=function(t,n,r,s){e.rect(t,n,r,s),this.__originalRect(t,n,r,s)},i.closePath=function(){e.closePath(),this.__originalClosePath()},i.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}var P8=class{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let r;return this.cache[e]!==void 0?(r=this.cache[e],this.canvasFactory.reset(r,t,n)):(r=this.canvasFactory.create(t,n),this.cache[e]=r),r}delete(e){delete this.cache[e]}clear(){for(let e in this.cache){let t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}};function Ic(i,e,t,n,r,s,a,o,l,c){let[h,d,u,p,f,g]=ot(i);if(d===0&&u===0){let _=a*h+f,b=Math.round(_),v=o*p+g,m=Math.round(v),M=(a+l)*h+f,L=Math.abs(Math.round(M)-b)||1,w=(o+c)*p+g,E=Math.abs(Math.round(w)-m)||1;return i.setTransform(Math.sign(h),0,0,Math.sign(p),b,m),i.drawImage(e,t,n,r,s,0,0,L,E),i.setTransform(h,d,u,p,f,g),[L,E]}if(h===0&&p===0){let _=o*u+f,b=Math.round(_),v=a*d+g,m=Math.round(v),M=(o+c)*u+f,L=Math.abs(Math.round(M)-b)||1,w=(a+l)*d+g,E=Math.abs(Math.round(w)-m)||1;return i.setTransform(0,Math.sign(d),Math.sign(u),0,b,m),i.drawImage(e,t,n,r,s,0,0,E,L),i.setTransform(h,d,u,p,f,g),[E,L]}i.drawImage(e,t,n,r,s,a,o,l,c);let y=Math.hypot(h,d),x=Math.hypot(u,p);return[y*l,x*c]}function mI(i){let{width:e,height:t}=i;if(e>hA||t>hA)return null;let n=1e3,r=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=e+1,a=new Uint8Array(s*(t+1)),o,l,c,h=e+7&-8,d=new Uint8Array(h*t),u=0;for(let x of i.data){let _=128;for(;_>0;)d[u++]=x&_?0:255,_>>=1}let p=0;for(u=0,d[u]!==0&&(a[0]=1,++p),l=1;l>2)+(d[u+1]?4:0)+(d[u-h+1]?8:0),r[x]&&(a[c+l]=r[x],++p),u++;if(d[u-h]!==d[u]&&(a[c+l]=d[u]?2:4,++p),p>n)return null}for(u=h*(t-1),c=o*s,d[u]!==0&&(a[c]=8,++p),l=1;ln)return null;let f=new Int32Array([0,s,-1,0,-s,0,0,0,1]),g=new Path2D;for(o=0;p&&o<=t;o++){let x=o*s,_=x+e;for(;x<_&&!a[x];)x++;if(x===_)continue;g.moveTo(x%s,o);let b=x,v=a[x];do{let m=f[v];do x+=m;while(!a[x]);let M=a[x];M!==5&&M!==10?(v=M,a[x]=0):(v=M&51*v>>4,a[x]&=v>>2|v<<2),g.lineTo(x%s,x/s|0),a[x]||--p}while(b!==x);--o}return d=null,a=null,function(x){x.save(),x.scale(1/e,-1/t),x.translate(0,-t),x.fill(g),x.beginPath(),x.restore()}}var ah=class{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=mA,this.textMatrixScale=1,this.fontMatrix=d8,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=$t.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="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){let e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=ne.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){let n=ne.applyTransform(t,e),r=ne.applyTransform(t.slice(2),e),s=ne.applyTransform([t[0],t[3]],e),a=ne.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,n[0],r[0],s[0],a[0]),this.minY=Math.min(this.minY,n[1],r[1],s[1],a[1]),this.maxX=Math.max(this.maxX,n[0],r[0],s[0],a[0]),this.maxY=Math.max(this.maxY,n[1],r[1],s[1],a[1])}updateScalingPathMinMax(e,t){ne.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,r,s,a,o,l,c,h){let d=ne.bezierBoundingBox(t,n,r,s,a,o,l,c,h);h||this.updateRectMinMax(e,d)}getPathBoundingBox(e=Jt.FILL,t=null){let n=[this.minX,this.minY,this.maxX,this.maxY];if(e===Jt.STROKE){t||nt("Stroke bounding box must include transform.");let r=ne.singularValueDecompose2dScale(t),s=r[0]*this.lineWidth/2,a=r[1]*this.lineWidth/2;n[0]-=s,n[1]-=a,n[2]+=s,n[3]+=a}return n}updateClipFromPath(){let e=ne.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=Jt.FILL,t=null){return ne.intersect(this.clipBox,this.getPathBoundingBox(e,t))}};function dA(i,e){if(typeof ImageData<"u"&&e instanceof ImageData){i.putImageData(e,0,0);return}let t=e.height,n=e.width,r=t%m0,s=(t-r)/m0,a=r===0?s:s+1,o=i.createImageData(n,m0),l=0,c,h=e.data,d=o.data,u,p,f,g;if(e.kind===$c.GRAYSCALE_1BPP){let y=h.byteLength,x=new Uint32Array(d.buffer,0,d.byteLength>>2),_=x.length,b=n+7>>3,v=4294967295,m=It.isLittleEndian?4278190080:255;for(u=0;ub?n:M*8-7,E=w&-8,A=0,P=0;for(;L>=1}for(;c<_;)x[c++]=0;i.putImageData(o,0,u*m0)}}else if(e.kind===$c.RGBA_32BPP){for(p=0,g=n*m0*4,u=0;u=s&&(f=r,g=n*f),c=0,p=g;p--;)d[c++]=h[l++],d[c++]=h[l++],d[c++]=h[l++],d[c++]=255;i.putImageData(o,0,u*m0)}else throw new Error(`bad image kind: ${e.kind}`)}function uA(i,e){if(e.bitmap){i.drawImage(e.bitmap,0,0);return}let t=e.height,n=e.width,r=t%m0,s=(t-r)/m0,a=r===0?s:s+1,o=i.createImageData(n,m0),l=0,c=e.data,h=o.data;for(let d=0;dcA&&typeof n=="function",h=c?Date.now()+gI:0,d=0,u=this.commonObjs,p=this.objs,f;for(;;){if(r!==void 0&&o===r.nextBreakPoint)return r.breakIt(o,n),o;if(f=a[o],f!==a1.dependency)this[f].apply(this,s[o]);else for(let g of s[o]){let y=g.startsWith("g_")?u:p;if(!y.has(g))return y.get(g,n),o}if(o++,o===l)return o;if(c&&++d>cA){if(Date.now()>h)return n(),o;d=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(let e of this._cachedBitmapsMap.values()){for(let t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){let e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){let t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}_scaleImage(e,t){let n=e.width??e.displayWidth,r=e.height??e.displayHeight,s=Math.max(Math.hypot(t[0],t[1]),1),a=Math.max(Math.hypot(t[2],t[3]),1),o=n,l=r,c="prescale1",h,d;for(;s>2&&o>1||a>2&&l>1;){let u=o,p=l;s>2&&o>1&&(u=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),s/=o/u),a>2&&l>1&&(p=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,a/=l/p),h=this.cachedCanvases.getCanvas(c,u,p),d=h.context,d.clearRect(0,0,u,p),d.drawImage(e,0,0,o,l,0,0,u,p),e=h.canvas,o=u,l=p,c=c==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:o,paintHeight:l}}_createMaskCanvas(e){let t=this.ctx,{width:n,height:r}=e,s=this.current.fillColor,a=this.current.patternFill,o=ot(t),l,c,h,d;if((e.bitmap||e.data)&&e.count>1){let w=e.bitmap||e.data.buffer;c=JSON.stringify(a?o:[o.slice(0,4),s]),l=this._cachedBitmapsMap.get(w),l||(l=new Map,this._cachedBitmapsMap.set(w,l));let E=l.get(c);if(E&&!a){let A=Math.round(Math.min(o[0],o[2])+o[4]),P=Math.round(Math.min(o[1],o[3])+o[5]);return{canvas:E,offsetX:A,offsetY:P}}h=E}h||(d=this.cachedCanvases.getCanvas("maskCanvas",n,r),uA(d.context,e));let u=ne.transform(o,[1/n,0,0,-1/r,0,0]);u=ne.transform(u,[1,0,0,1,0,-r]);let[p,f,g,y]=ne.getAxialAlignedBoundingBox([0,0,n,r],u),x=Math.round(g-p)||1,_=Math.round(y-f)||1,b=this.cachedCanvases.getCanvas("fillCanvas",x,_),v=b.context,m=p,M=f;v.translate(-m,-M),v.transform(...u),h||(h=this._scaleImage(d.canvas,yi(v)),h=h.img,l&&a&&l.set(c,h)),v.imageSmoothingEnabled=fA(ot(v),e.interpolate),Ic(v,h,0,0,h.width,h.height,0,0,n,r),v.globalCompositeOperation="source-in";let L=ne.transform(yi(v),[1,0,0,1,-m,-M]);return v.fillStyle=a?s.getPattern(t,this,L,Jt.FILL):s,v.fillRect(0,0,n,r),l&&!a&&(this.cachedCanvases.delete("fillCanvas"),l.set(c,b.canvas)),{canvas:b.canvas,offsetX:Math.round(m),offsetY:Math.round(M)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=wI[e]}setLineJoin(e){this.ctx.lineJoin=bI[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){let n=this.ctx;n.setLineDash!==void 0&&(n.setLineDash(e),n.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");let e=this.ctx.canvas.width,t=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(n,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;let s=this.ctx;s.setTransform(...ot(this.suspendedCtx)),go(this.suspendedCtx,s),vI(s,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(),go(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let t=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,n,r){let s=r[0],a=r[1],o=r[2]-s,l=r[3]-a;o===0||l===0||(this.genericComposeSMask(t.context,n,o,l,t.subtype,t.backdrop,t.transferMap,s,a,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(n.canvas,0,0),e.restore())}genericComposeSMask(e,t,n,r,s,a,o,l,c,h,d){let u=e.canvas,p=l-h,f=c-d;if(a){let y=ne.makeHexColor(...a);if(p<0||f<0||p+n>u.width||f+r>u.height){let x=this.cachedCanvases.getCanvas("maskExtension",n,r),_=x.context;_.drawImage(u,-p,-f),_.globalCompositeOperation="destination-atop",_.fillStyle=y,_.fillRect(0,0,n,r),_.globalCompositeOperation="source-over",u=x.canvas,p=f=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);let x=new Path2D;x.rect(p,f,n,r),e.clip(x),e.globalCompositeOperation="destination-atop",e.fillStyle=y,e.fillRect(p,f,n,r),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),s==="Alpha"&&o?t.filter=this.filterFactory.addAlphaFilter(o):s==="Luminosity"&&(t.filter=this.filterFactory.addLuminosityFilter(o));let g=new Path2D;g.rect(l,c,n,r),t.clip(g),t.globalCompositeOperation="destination-in",t.drawImage(u,p,f,n,r,l,c,n,r),t.restore()}save(){this.inSMaskMode?(go(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();let e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),go(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,n,r,s,a){this.ctx.transform(e,t,n,r,s,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,n){let r=this.ctx,s=this.current,a=s.x,o=s.y,l,c,h=ot(r),d=h[0]===0&&h[3]===0||h[1]===0&&h[2]===0,u=d?n.slice(0):null;for(let p=0,f=0,g=e.length;plA&&(c=lA),this.current.fontSizeScale=t/c,this.ctx.font=`${l} ${o} ${c}px ${a}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,n,r,s,a){this.current.textMatrix=[e,t,n,r,s,a],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,n,r){let s=this.ctx,a=this.current,o=a.font,l=a.textRenderingMode,c=a.fontSize/a.fontSizeScale,h=l&$t.FILL_STROKE_MASK,d=!!(l&$t.ADD_TO_PATH_FLAG),u=a.patternFill&&!o.missingFile,p;(o.disableFontFace||d||u)&&(p=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||u?(s.save(),s.translate(t,n),s.beginPath(),p(s,c),r&&s.setTransform(...r),(h===$t.FILL||h===$t.FILL_STROKE)&&s.fill(),(h===$t.STROKE||h===$t.FILL_STROKE)&&s.stroke(),s.restore()):((h===$t.FILL||h===$t.FILL_STROKE)&&s.fillText(e,t,n),(h===$t.STROKE||h===$t.FILL_STROKE)&&s.strokeText(e,t,n)),d&&(this.pendingTextPaths||=[]).push({transform:ot(s),x:t,y:n,fontSize:c,addToPath:p})}get isFontSubpixelAAEnabled(){let{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);let t=e.getImageData(0,0,10,10).data,n=!1;for(let r=3;r0&&t[r]<255){n=!0;break}return Pe(this,"isFontSubpixelAAEnabled",n)}showText(e){let t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);let r=t.fontSize;if(r===0)return;let s=this.ctx,a=t.fontSizeScale,o=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,h=t.textHScale*c,d=e.length,u=n.vertical,p=u?1:-1,f=n.defaultVMetrics,g=r*t.fontMatrix[0],y=t.textRenderingMode===$t.FILL&&!n.disableFontFace&&!t.patternFill;s.save(),s.transform(...t.textMatrix),s.translate(t.x,t.y+t.textRise),c>0?s.scale(h,-1):s.scale(h,1);let x;if(t.patternFill){s.save();let M=t.fillColor.getPattern(s,this,yi(s),Jt.FILL);x=ot(s),s.restore(),s.fillStyle=M}let _=t.lineWidth,b=t.textMatrixScale;if(b===0||_===0){let M=t.textRenderingMode&$t.FILL_STROKE_MASK;(M===$t.STROKE||M===$t.FILL_STROKE)&&(_=this.getSinglePixelWidth())}else _/=b;if(a!==1&&(s.scale(a,a),_/=a),s.lineWidth=_,n.isInvalidPDFjsFont){let M=[],L=0;for(let w of e)M.push(w.unicode),L+=w.width;s.fillText(M.join(""),0,0),t.x+=L*g*h,s.restore(),this.compose();return}let v=0,m;for(m=0;m0){let te=s.measureText(E).width*1e3/r*a;if(Gnew i(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new fI(e,n,this.ctx,s,r)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,n){this.ctx.strokeStyle=this.current.strokeColor=ne.makeHexColor(e,t,n)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(e,t,n){this.ctx.fillStyle=this.current.fillColor=ne.makeHexColor(e,t,n),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let n;return this.cachedPatterns.has(e)?n=this.cachedPatterns.get(e):(n=uI(this.getObject(e)),this.cachedPatterns.set(e,n)),t&&(n.matrix=t),n}shadingFill(e){if(!this.contentVisible)return;let t=this.ctx;this.save();let n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,yi(t),Jt.SHADING);let r=yi(t);if(r){let{width:s,height:a}=t.canvas,[o,l,c,h]=ne.getAxialAlignedBoundingBox([0,0,s,a],r);this.ctx.fillRect(o,l,c-o,h-l)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){nt("Should not call beginInlineImage")}beginImageData(){nt("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=ot(this.ctx),t)){let n=t[2]-t[0],r=t[3]-t[1];this.ctx.rect(t[0],t[1],n,r),this.current.updateRectMinMax(ot(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let t=this.ctx;e.isolated||Eh("TODO: Support non-isolated groups."),e.knockout&&De("Knockout groups not supported.");let n=ot(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let r=ne.getAxialAlignedBoundingBox(e.bbox,ot(t)),s=[0,0,t.canvas.width,t.canvas.height];r=ne.intersect(r,s)||[0,0,0,0];let a=Math.floor(r[0]),o=Math.floor(r[1]),l=Math.max(Math.ceil(r[2])-a,1),c=Math.max(Math.ceil(r[3])-o,1);this.current.startNewPathAndClipBox([0,0,l,c]);let h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);let d=this.cachedCanvases.getCanvas(h,l,c),u=d.context;u.translate(-a,-o),u.transform(...n),e.smask?this.smaskStack.push({canvas:d.canvas,context:u,offsetX:a,offsetY:o,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(a,o),t.save()),go(t,u),this.ctx=u,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;let t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();let r=ot(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...r);let s=ne.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],r);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(s)}}beginAnnotation(e,t,n,r,s){if(this.#e(),Bc(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){let a=t[2]-t[0],o=t[3]-t[1];if(s&&this.annotationCanvasMap){n=n.slice(),n[4]-=t[0],n[5]-=t[1],t=t.slice(),t[0]=t[1]=0,t[2]=a,t[3]=o;let[l,c]=ne.singularValueDecompose2dScale(ot(this.ctx)),{viewportScale:h}=this,d=Math.ceil(a*this.outputScaleX*h),u=Math.ceil(o*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(d,u);let{canvas:p,context:f}=this.annotationCanvas;this.annotationCanvasMap.set(e,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=f,this.ctx.save(),this.ctx.setTransform(l,0,0,-c,0,o*c),Bc(this.ctx)}else Bc(this.ctx),this.endPath(),this.ctx.rect(t[0],t[1],a,o),this.ctx.clip(),this.ctx.beginPath()}this.current=new ah(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;let t=e.count;e=this.getObject(e.data,e),e.count=t;let n=this.ctx,r=this.processingType3;if(r&&(r.compiled===void 0&&(r.compiled=mI(e)),r.compiled)){r.compiled(n);return}let s=this._createMaskCanvas(e),a=s.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(a,s.offsetX,s.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,n=0,r=0,s,a){if(!this.contentVisible)return;e=this.getObject(e.data,e);let o=this.ctx;o.save();let l=ot(o);o.transform(t,n,r,s,0,0);let c=this._createMaskCanvas(e);o.setTransform(1,0,0,1,c.offsetX-l[4],c.offsetY-l[5]);for(let h=0,d=a.length;hd?h/d:1,o=c>d?c/d:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(e){let{ctx:t}=this,{lineWidth:n}=this.current,[r,s]=this.getScaleForStroking();if(t.lineWidth=n||1,r===1&&s===1){t.stroke();return}let a=t.getLineDash();if(e&&t.save(),t.scale(r,s),a.length>0){let o=Math.max(r,s);t.setLineDash(a.map(l=>l/o)),t.lineDashOffset/=o}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};for(let i in a1)bs.prototype[i]!==void 0&&(bs.prototype[a1[i]]=bs.prototype[i]);var Gn=class{static#e=null;static#t="";static get workerPort(){return this.#e}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");this.#e=e}static get workerSrc(){return this.#t}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");this.#t=e}},Nc={UNKNOWN:0,DATA:1,ERROR:2},bt={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function D0(i){switch(i instanceof Error||typeof i=="object"&&i!==null||nt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),i.name){case"AbortException":return new Ai(i.message);case"MissingPDFException":return new Mi(i.message);case"PasswordException":return new bo(i.message,i.code);case"UnexpectedResponseException":return new Cs(i.message,i.status);case"UnknownErrorException":return new yo(i.message,i.details);default:return new yo(i.message,i.toString())}}var qn=class{#e=new AbortController;constructor(e,t,n){this.sourceName=e,this.targetName=t,this.comObj=n,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),n.addEventListener("message",this.#t.bind(this),{signal:this.#e.signal})}#t({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){this.#n(e);return}if(e.callback){let n=e.callbackId,r=this.callbackCapabilities[n];if(!r)throw new Error(`Cannot resolve callback ${n}`);if(delete this.callbackCapabilities[n],e.callback===Nc.DATA)r.resolve(e.data);else if(e.callback===Nc.ERROR)r.reject(D0(e.reason));else throw new Error("Unexpected callback case");return}let t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){let n=this.sourceName,r=e.sourceName,s=this.comObj;new Promise(function(a){a(t(e.data))}).then(function(a){s.postMessage({sourceName:n,targetName:r,callback:Nc.DATA,callbackId:e.callbackId,data:a})},function(a){s.postMessage({sourceName:n,targetName:r,callback:Nc.ERROR,callbackId:e.callbackId,reason:D0(a)})});return}if(e.streamId){this.#i(e);return}t(e.data)}on(e,t){let n=this.actionHandler;if(n[e])throw new Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){let r=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[r]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},n)}catch(a){s.reject(a)}return s.promise}sendWithStream(e,t,n,r){let s=this.streamId++,a=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:c=>{let h=Promise.withResolvers();return this.streamControllers[s]={controller:c,startCall:h,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:a,targetName:o,action:e,streamId:s,data:t,desiredSize:c.desiredSize},r),h.promise},pull:c=>{let h=Promise.withResolvers();return this.streamControllers[s].pullCall=h,l.postMessage({sourceName:a,targetName:o,stream:bt.PULL,streamId:s,desiredSize:c.desiredSize}),h.promise},cancel:c=>{Et(c instanceof Error,"cancel must have a valid reason");let h=Promise.withResolvers();return this.streamControllers[s].cancelCall=h,this.streamControllers[s].isClosed=!0,l.postMessage({sourceName:a,targetName:o,stream:bt.CANCEL,streamId:s,reason:D0(c)}),h.promise}},n)}#i(e){let t=e.streamId,n=this.sourceName,r=e.sourceName,s=this.comObj,a=this,o=this.actionHandler[e.action],l={enqueue(c,h=1,d){if(this.isCancelled)return;let u=this.desiredSize;this.desiredSize-=h,u>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:n,targetName:r,stream:bt.ENQUEUE,streamId:t,chunk:c},d)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:n,targetName:r,stream:bt.CLOSE,streamId:t}),delete a.streamSinks[t])},error(c){Et(c instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,s.postMessage({sourceName:n,targetName:r,stream:bt.ERROR,streamId:t,reason:D0(c)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[t]=l,new Promise(function(c){c(o(e.data,l))}).then(function(){s.postMessage({sourceName:n,targetName:r,stream:bt.START_COMPLETE,streamId:t,success:!0})},function(c){s.postMessage({sourceName:n,targetName:r,stream:bt.START_COMPLETE,streamId:t,reason:D0(c)})})}#n(e){let t=e.streamId,n=this.sourceName,r=e.sourceName,s=this.comObj,a=this.streamControllers[t],o=this.streamSinks[t];switch(e.stream){case bt.START_COMPLETE:e.success?a.startCall.resolve():a.startCall.reject(D0(e.reason));break;case bt.PULL_COMPLETE:e.success?a.pullCall.resolve():a.pullCall.reject(D0(e.reason));break;case bt.PULL:if(!o){s.postMessage({sourceName:n,targetName:r,stream:bt.PULL_COMPLETE,streamId:t,success:!0});break}o.desiredSize<=0&&e.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=e.desiredSize,new Promise(function(l){l(o.onPull?.())}).then(function(){s.postMessage({sourceName:n,targetName:r,stream:bt.PULL_COMPLETE,streamId:t,success:!0})},function(l){s.postMessage({sourceName:n,targetName:r,stream:bt.PULL_COMPLETE,streamId:t,reason:D0(l)})});break;case bt.ENQUEUE:if(Et(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(e.chunk);break;case bt.CLOSE:if(Et(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),this.#r(a,t);break;case bt.ERROR:Et(a,"error should have stream controller"),a.controller.error(D0(e.reason)),this.#r(a,t);break;case bt.CANCEL_COMPLETE:e.success?a.cancelCall.resolve():a.cancelCall.reject(D0(e.reason)),this.#r(a,t);break;case bt.CANCEL:if(!o)break;new Promise(function(l){l(o.onCancel?.(D0(e.reason)))}).then(function(){s.postMessage({sourceName:n,targetName:r,stream:bt.CANCEL_COMPLETE,streamId:t,success:!0})},function(l){s.postMessage({sourceName:n,targetName:r,stream:bt.CANCEL_COMPLETE,streamId:t,reason:D0(l)})}),o.sinkCapability.reject(D0(e.reason)),o.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}#r(e,t){return $(this,null,function*(){yield Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]})}destroy(){this.#e?.abort(),this.#e=null}},k8=class{#e;#t;constructor({parsedData:e,rawData:t}){this.#e=e,this.#t=t}getRaw(){return this.#t}get(e){return this.#e.get(e)??null}getAll(){return V7(this.#e)}has(e){return this.#e.has(e)}},ws=Symbol("INTERNAL"),H8=class{#e=!1;#t=!1;#i=!1;#n=!0;constructor(e,{name:t,intent:n,usage:r,rbGroups:s}){this.#e=!!(e&E0.DISPLAY),this.#t=!!(e&E0.PRINT),this.name=t,this.intent=n,this.usage=r,this.rbGroups=s}get visible(){if(this.#i)return this.#n;if(!this.#n)return!1;let{print:e,view:t}=this.usage;return this.#e?t?.viewState!=="OFF":this.#t?e?.printState!=="OFF":!0}_setVisible(e,t,n=!1){e!==ws&&nt("Internal method `_setVisible` called."),this.#i=n,this.#n=t}},F8=class{#e=null;#t=new Map;#i=null;#n=null;constructor(e,t=E0.DISPLAY){if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,this.#n=e.order;for(let n of e.groups)this.#t.set(n.id,new H8(t,n));if(e.baseState==="OFF")for(let n of this.#t.values())n._setVisible(ws,!1);for(let n of e.on)this.#t.get(n)._setVisible(ws,!0);for(let n of e.off)this.#t.get(n)._setVisible(ws,!1);this.#i=this.getHash()}}#r(e){let t=e.length;if(t<2)return!0;let n=e[0];for(let r=1;r0?V7(this.#t):null}getGroup(e){return this.#t.get(e)||null}getHash(){if(this.#e!==null)return this.#e;let e=new Qc;for(let[t,n]of this.#t)e.update(`${t}:${n.visible}`);return this.#e=e.hexdigest()}},R8=class{constructor(e,{disableRange:t=!1,disableStream:n=!1}){Et(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');let{length:r,initialData:s,progressiveDone:a,contentDispositionFilename:o}=e;if(this._queuedChunks=[],this._progressiveDone=a,this._contentDispositionFilename=o,s?.length>0){let l=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!n,this._isRangeSupported=!t,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((l,c)=>{this._onReceiveData({begin:l,chunk:c})}),e.addProgressListener((l,c)=>{this._onProgress({loaded:l,total:c})}),e.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){let n=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;if(e===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n);else{let r=this._rangeReaders.some(function(s){return s._begin!==e?!1:(s._enqueue(n),!0)});Et(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){e.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){let t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){Et(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let e=this._queuedChunks;return this._queuedChunks=null,new O8(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=new I8(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}},O8=class{constructor(e,t,n=!1,r=null){this._stream=e,this._done=n||!1,this._filename=L7(r)?r:null,this._queuedChunks=t||[],this._loaded=0;for(let s of this._queuedChunks)this._loaded+=s.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}read(){return $(this,null,function*(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise})}cancel(e){this._done=!0;for(let t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}},I8=class{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){return $(this,null,function*(){if(this._queuedChunk){let t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise})}cancel(e){this._done=!0;for(let t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}};function CI(i){let e=!0,t=n("filename\\*","i").exec(i);if(t){t=t[1];let h=o(t);return h=unescape(h),h=l(h),h=c(h),s(h)}if(t=a(i),t){let h=c(t);return s(h)}if(t=n("filename","i").exec(i),t){t=t[1];let h=o(t);return h=c(h),s(h)}function n(h,d){return new RegExp("(?:^|;)\\s*"+h+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',d)}function r(h,d){if(h){if(!/^[\x00-\xFF]+$/.test(d))return d;try{let u=new TextDecoder(h,{fatal:!0}),p=Vh(d);d=u.decode(p),e=!1}catch{}}return d}function s(h){return e&&/[\x80-\xff]/.test(h)&&(h=r("utf-8",h),e&&(h=r("iso-8859-1",h))),h}function a(h){let d=[],u,p=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(u=p.exec(h))!==null;){let[,g,y,x]=u;if(g=parseInt(g,10),g in d){if(g===0)break;continue}d[g]=[y,x]}let f=[];for(let g=0;g{if(!yA(s.status))throw zh(s.status,r);this._reader=s.body.getReader(),this._headersCapability.resolve();let a=s.headers,{allowRangeRequests:o,suggestedLength:l}=k7({responseHeaders:a,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=H7(a),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Ai("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(){return $(this,null,function*(){yield this._headersCapability.promise;let{value:e,done:t}=yield this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:xA(e),done:!1})})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}},N8=class{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;let r=e.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;let s=new Headers(e.headers);s.append("Range",`bytes=${t}-${n-1}`);let a=r.url;fetch(a,CA(s,this._withCredentials,this._abortController)).then(o=>{if(!yA(o.status))throw zh(o.status,a);this._readCapability.resolve(),this._reader=o.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){return $(this,null,function*(){yield this._readCapability.promise;let{value:e,done:t}=yield this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:xA(e),done:!1})})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}},c8=200,h8=206;function xI(i){let e=i.response;return typeof e!="string"?e:Vh(e).buffer}var Z8=class{constructor({url:e,httpHeaders:t,withCredentials:n}){this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=P7(this.isHttp,t),this.withCredentials=n||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){let r={begin:e,end:t};for(let s in n)r[s]=n[s];return this.request(r)}requestFull(e){return this.request(e)}request(e){let t=new XMLHttpRequest,n=this.currXhrId++,r=this.pendingRequests[n]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(let[s,a]of this.headers)t.setRequestHeader(s,a);return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=h8):r.expectedStatus=c8,t.responseType="arraybuffer",e.onError&&(t.onerror=function(s){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){let n=this.pendingRequests[e];n&&n.onProgress?.(t)}onStateChange(e,t){let n=this.pendingRequests[e];if(!n)return;let r=n.xhr;if(r.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),r.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],r.status===0&&this.isHttp){n.onError?.(r.status);return}let s=r.status||c8;if(!(s===c8&&n.expectedStatus===h8)&&s!==n.expectedStatus){n.onError?.(r.status);return}let o=xI(r);if(s===h8){let l=r.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);n.onDone({begin:parseInt(c[1],10),chunk:o})}else o?n.onDone({begin:0,chunk:o}):n.onError?.(r.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){let t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}},j8=class{constructor(e){this._source=e,this._manager=new Z8(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){let t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return Et(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new U8(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){let n=new $8(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeRequestReaders.slice(0))t.cancel(e)}},U8=class{constructor(e,t){this._manager=e;let n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=new Headers(t.getAllResponseHeaders().trim().split(/[\r\n]+/).map(a=>{let[o,...l]=a.split(": ");return[o,l.join(": ")]})),{allowRangeRequests:r,suggestedLength:s}=k7({responseHeaders:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=H7(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(let t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=zh(e,this._url),this._headersCapability.reject(this._storedError);for(let t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}read(){return $(this,null,function*(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise})}cancel(e){this._done=!0,this._headersCapability.reject(e);for(let t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},$8=class{constructor(e,t,n){this._manager=e;let r={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,n,r),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){let t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=zh(e,this._url);for(let t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}read(){return $(this,null,function*(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){let t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise})}cancel(e){this._done=!0;for(let t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}},MI=/^[a-z][a-z0-9\-+.]+:/i;function AI(i){if(MI.test(i))return new URL(i);let e=R1.get("url");return new URL(e.pathToFileURL(i))}function MA(i,e,t){return i.protocol==="http:"?R1.get("http").request(i,{headers:e},t):R1.get("https").request(i,{headers:e},t)}var q8=class{constructor(e){this.source=e,this.url=AI(e.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.headers=P7(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Et(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new X8(this):new G8(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=this.isFsUrl?new Y8(this,e,t):new W8(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeRequestReaders.slice(0))t.cancel(e)}},lh=class{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;let t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return $(this,null,function*(){if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Ai("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}},ch=class{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}read(){return $(this,null,function*(){if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}},G8=class extends lh{constructor(e){super(e);let t=Object.fromEntries(e.headers),n=r=>{if(r.statusCode===404){let l=new Mi(`Missing PDF "${this._url}".`);this._storedError=l,this._headersCapability.reject(l);return}this._headersCapability.resolve(),this._setReadableStream(r);let s=new Headers(this._readableStream.headers),{allowRangeRequests:a,suggestedLength:o}=k7({responseHeaders:s,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=o||this._contentLength,this._filename=H7(s)};this._request=MA(this._url,t,n),this._request.on("error",r=>{this._storedError=r,this._headersCapability.reject(r)}),this._request.end()}},W8=class extends ch{constructor(e,t,n){super(e);let r=Object.fromEntries(e.headers);r.Range=`bytes=${t}-${n-1}`;let s=a=>{if(a.statusCode===404){let o=new Mi(`Missing PDF "${this._url}".`);this._storedError=o;return}this._setReadableStream(a)};this._request=MA(this._url,r,s),this._request.on("error",a=>{this._storedError=a}),this._request.end()}},X8=class extends lh{constructor(e){super(e);let t=R1.get("fs");t.promises.lstat(this._url).then(n=>{this._contentLength=n.size,this._setReadableStream(t.createReadStream(this._url)),this._headersCapability.resolve()},n=>{n.code==="ENOENT"&&(n=new Mi(`Missing PDF "${this._url}".`)),this._storedError=n,this._headersCapability.reject(n)})}},Y8=class extends ch{constructor(e,t,n){super(e);let r=R1.get("fs");this._setReadableStream(r.createReadStream(this._url,{start:t,end:n-1}))}},_I=1e5,v0=30,SI=.8,Do=class i{#e=Promise.withResolvers();#t=null;#i=!1;#n=!!globalThis.FontInspector?.enabled;#r=null;#s=null;#l=0;#c=0;#h=null;#o=null;#d=0;#a=0;#u=Object.create(null);#p=[];#f=null;#g=[];#m=new WeakMap;#v=null;static#w=new Map;static#y=new Map;static#M=new WeakMap;static#C=null;static#x=new Set;constructor({textContentSource:e,container:t,viewport:n}){if(e instanceof ReadableStream)this.#f=e;else if(typeof e=="object")this.#f=new ReadableStream({start(l){l.enqueue(e),l.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#t=this.#o=t,this.#a=n.scale*(globalThis.devicePixelRatio||1),this.#d=n.rotation,this.#s={div:null,properties:null,ctx:null};let{pageWidth:r,pageHeight:s,pageX:a,pageY:o}=n.rawDims;this.#v=[1,0,0,-1,-a,o+s],this.#c=r,this.#l=s,i.#L(),Wn(t,n),this.#e.promise.finally(()=>{i.#x.delete(this),this.#s=null,this.#u=null}).catch(()=>{})}static get fontFamilyMap(){let{isWindows:e,isFirefox:t}=It.platform;return Pe(this,"fontFamilyMap",new Map([["sans-serif",`${e&&t?"Calibri, ":""}sans-serif`],["monospace",`${e&&t?"Lucida Console, ":""}monospace`]]))}render(){let e=()=>{this.#h.read().then(({value:t,done:n})=>{if(n){this.#e.resolve();return}this.#r??=t.lang,Object.assign(this.#u,t.styles),this.#T(t.items),e()},this.#e.reject)};return this.#h=this.#f.getReader(),i.#x.add(this),e(),this.#e.promise}update({viewport:e,onBefore:t=null}){let n=e.scale*(globalThis.devicePixelRatio||1),r=e.rotation;if(r!==this.#d&&(t?.(),this.#d=r,Wn(this.#o,{rotation:r})),n!==this.#a){t?.(),this.#a=n;let s={div:null,properties:null,ctx:i.#E(this.#r)};for(let a of this.#g)s.properties=this.#m.get(a),s.div=a,this.#A(s)}}cancel(){let e=new Ai("TextLayer task cancelled.");this.#h?.cancel(e).catch(()=>{}),this.#h=null,this.#e.reject(e)}get textDivs(){return this.#g}get textContentItemsStr(){return this.#p}#T(e){if(this.#i)return;this.#s.ctx??=i.#E(this.#r);let t=this.#g,n=this.#p;for(let r of e){if(t.length>_I){De("Ignoring additional textDivs for performance reasons."),this.#i=!0;return}if(r.str===void 0){if(r.type==="beginMarkedContentProps"||r.type==="beginMarkedContent"){let s=this.#t;this.#t=document.createElement("span"),this.#t.classList.add("markedContent"),r.id!==null&&this.#t.setAttribute("id",`${r.id}`),s.append(this.#t)}else r.type==="endMarkedContent"&&(this.#t=this.#t.parentNode);continue}n.push(r.str),this.#D(r)}}#D(e){let t=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};this.#g.push(t);let r=ne.transform(this.#v,e.transform),s=Math.atan2(r[1],r[0]),a=this.#u[e.fontName];a.vertical&&(s+=Math.PI/2);let o=this.#n&&a.fontSubstitution||a.fontFamily;o=i.fontFamilyMap.get(o)||o;let l=Math.hypot(r[2],r[3]),c=l*i.#P(o,this.#r),h,d;s===0?(h=r[4],d=r[5]-c):(h=r[4]+c*Math.sin(s),d=r[5]-c*Math.cos(s));let u="calc(var(--scale-factor)*",p=t.style;this.#t===this.#o?(p.left=`${(100*h/this.#c).toFixed(2)}%`,p.top=`${(100*d/this.#l).toFixed(2)}%`):(p.left=`${u}${h.toFixed(2)}px)`,p.top=`${u}${d.toFixed(2)}px)`),p.fontSize=`${u}${(i.#C*l).toFixed(2)}px)`,p.fontFamily=o,n.fontSize=l,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,this.#n&&(t.dataset.fontName=a.fontSubstitutionLoadedName||e.fontName),s!==0&&(n.angle=s*(180/Math.PI));let f=!1;if(e.str.length>1)f=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){let g=Math.abs(e.transform[0]),y=Math.abs(e.transform[3]);g!==y&&Math.max(g,y)/Math.min(g,y)>1.5&&(f=!0)}if(f&&(n.canvasWidth=a.vertical?e.height:e.width),this.#m.set(t,n),this.#s.div=t,this.#s.properties=n,this.#A(this.#s),n.hasText&&this.#t.append(t),n.hasEOL){let g=document.createElement("br");g.setAttribute("role","presentation"),this.#t.append(g)}}#A(e){let{div:t,properties:n,ctx:r}=e,{style:s}=t,a="";if(i.#C>1&&(a=`scale(${1/i.#C})`),n.canvasWidth!==0&&n.hasText){let{fontFamily:o}=s,{canvasWidth:l,fontSize:c}=n;i.#S(r,c*this.#a,o);let{width:h}=r.measureText(t.textContent);h>0&&(a=`scaleX(${l*this.#a/h}) ${a}`)}n.angle!==0&&(a=`rotate(${n.angle}deg) ${a}`),a.length>0&&(s.transform=a)}static cleanup(){if(!(this.#x.size>0)){this.#w.clear();for(let{canvas:e}of this.#y.values())e.remove();this.#y.clear()}}static#E(e=null){let t=this.#y.get(e||="");if(!t){let n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=e,document.body.append(n),t=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#y.set(e,t),this.#M.set(t,{size:0,family:""})}return t}static#S(e,t,n){let r=this.#M.get(e);t===r.size&&n===r.family||(e.font=`${t}px ${n}`,r.size=t,r.family=n)}static#L(){if(this.#C!==null)return;let e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),this.#C=e.getBoundingClientRect().height,e.remove()}static#P(e,t){let n=this.#w.get(e);if(n)return n;let r=this.#E(t);r.canvas.width=r.canvas.height=v0,this.#S(r,v0,e);let s=r.measureText(""),a=s.fontBoundingBoxAscent,o=Math.abs(s.fontBoundingBoxDescent);if(a){let h=a/(a+o);return this.#w.set(e,h),r.canvas.width=r.canvas.height=0,h}r.strokeStyle="red",r.clearRect(0,0,v0,v0),r.strokeText("g",0,0);let l=r.getImageData(0,0,v0,v0).data;o=0;for(let h=l.length-1-3;h>=0;h-=4)if(l[h]>0){o=Math.ceil(h/4/v0);break}r.clearRect(0,0,v0,v0),r.strokeText("A",0,v0),l=r.getImageData(0,0,v0,v0).data,a=0;for(let h=0,d=l.length;h0){a=v0-Math.floor(h/4/v0);break}r.canvas.width=r.canvas.height=0;let c=a?a/(a+o):SI;return this.#w.set(e,c),c}},Eo=class i{static textContent(e){let t=[],n={items:t,styles:Object.create(null)};function r(s){if(!s)return;let a=null,o=s.name;if(o==="#text")a=s.value;else if(i.shouldBuildText(o))s?.attributes?.textContent?a=s.attributes.textContent:s.value&&(a=s.value);else return;if(a!==null&&t.push({str:a}),!!s.children)for(let l of s.children)r(l)}return r(e),n}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}},DI=65536,EI=100,VI=5e3,TI=qt?S8:M8,LI=qt?D8:ih,zI=qt?_8:A8,PI=qt?E8:sh;function kI(i={}){typeof i=="string"||i instanceof URL?i={url:i}:(i instanceof ArrayBuffer||ArrayBuffer.isView(i))&&(i={data:i});let e=new K8,{docId:t}=e,n=i.url?HI(i.url):null,r=i.data?FI(i.data):null,s=i.httpHeaders||null,a=i.withCredentials===!0,o=i.password??null,l=i.range instanceof hh?i.range:null,c=Number.isInteger(i.rangeChunkSize)&&i.rangeChunkSize>0?i.rangeChunkSize:DI,h=i.worker instanceof ys?i.worker:null,d=i.verbosity,u=typeof i.docBaseUrl=="string"&&!Lh(i.docBaseUrl)?i.docBaseUrl:null,p=typeof i.cMapUrl=="string"?i.cMapUrl:null,f=i.cMapPacked!==!1,g=i.CMapReaderFactory||LI,y=typeof i.standardFontDataUrl=="string"?i.standardFontDataUrl:null,x=i.StandardFontDataFactory||PI,_=i.stopAtErrors!==!0,b=Number.isInteger(i.maxImageSize)&&i.maxImageSize>-1?i.maxImageSize:-1,v=i.isEvalSupported!==!1,m=typeof i.isOffscreenCanvasSupported=="boolean"?i.isOffscreenCanvasSupported:!qt,M=typeof i.isChrome=="boolean"?i.isChrome:!It.platform.isFirefox&&typeof window<"u"&&!!window?.chrome,L=Number.isInteger(i.canvasMaxAreaInBytes)?i.canvasMaxAreaInBytes:-1,w=typeof i.disableFontFace=="boolean"?i.disableFontFace:qt,E=i.fontExtraProperties===!0,A=i.enableXfa===!0,P=i.ownerDocument||globalThis.document,O=i.disableRange===!0,G=i.disableStream===!0,K=i.disableAutoFetch===!0,te=i.pdfBug===!0,F=i.CanvasFactory||TI,R=i.FilterFactory||zI,I=i.enableHWA===!0,re=l?l.length:i.length??NaN,ve=typeof i.useSystemFonts=="boolean"?i.useSystemFonts:!qt&&!w,Re=typeof i.useWorkerFetch=="boolean"?i.useWorkerFetch:g===ih&&x===sh&&p&&y&&mo(p,document.baseURI)&&mo(y,document.baseURI);i.canvasFactory&&nA("`canvasFactory`-instance option, please use `CanvasFactory` instead."),i.filterFactory&&nA("`filterFactory`-instance option, please use `FilterFactory` instead.");let Te=null;XO(d);let ke={canvasFactory:new F({ownerDocument:P,enableHWA:I}),filterFactory:new R({docId:t,ownerDocument:P}),cMapReaderFactory:Re?null:new g({baseUrl:p,isCompressed:f}),standardFontDataFactory:Re?null:new x({baseUrl:y})};if(!h){let V={verbosity:d,port:Gn.workerPort};h=V.port?ys.fromPort(V):new ys(V),e._worker=h}let ze={docId:t,apiVersion:"4.8.69",data:r,password:o,disableAutoFetch:K,rangeChunkSize:c,length:re,docBaseUrl:u,enableXfa:A,evaluatorOptions:{maxImageSize:b,disableFontFace:w,ignoreErrors:_,isEvalSupported:v,isOffscreenCanvasSupported:m,isChrome:M,canvasMaxAreaInBytes:L,fontExtraProperties:E,useSystemFonts:ve,cMapUrl:Re?p:null,standardFontDataUrl:Re?y:null}},T0={disableFontFace:w,fontExtraProperties:E,ownerDocument:P,pdfBug:te,styleElement:Te,loadingParams:{disableAutoFetch:K,enableXfa:A}};return h.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");let V=h.messageHandler.sendWithPromise("GetDocRequest",ze,r?[r.buffer]:null),C;if(l)C=new R8(l,{disableRange:O,disableStream:G});else if(!r){if(!n)throw new Error("getDocument - no `url` parameter provided.");let N;qt?N=typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype&&mo(n)?oh:q8:N=mo(n)?oh:j8,C=new N({url:n,length:re,httpHeaders:s,withCredentials:a,rangeChunkSize:c,disableRange:O,disableStream:G})}return V.then(N=>{if(e.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");let H=new qn(t,N,h.port),Le=new t7(H,e,C,T0,ke);e._transport=Le,H.send("Ready",null)})}).catch(e._capability.reject),e}function HI(i){if(i instanceof URL)return i.href;try{return new URL(i,window.location).href}catch{if(qt&&typeof i=="string")return i}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function FI(i){if(qt&&typeof Buffer<"u"&&i instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength)return i;if(typeof i=="string")return Vh(i);if(i instanceof ArrayBuffer||ArrayBuffer.isView(i)||typeof i=="object"&&!isNaN(i?.length))return new Uint8Array(i);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function gA(i){return typeof i=="object"&&Number.isInteger(i?.num)&&i.num>=0&&Number.isInteger(i?.gen)&&i.gen>=0}var K8=class i{static#e=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${i.#e++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}destroy(){return $(this,null,function*(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),yield this._transport?.destroy()}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)})}},hh=class{constructor(e,t,n=!1,r=null){this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(let n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(let n of this._progressListeners)n(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(let t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(let e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){nt("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}},Q8=class{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Pe(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){let{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}},J8=class{#e=null;#t=!1;constructor(e,t,n,r=!1){this._pageIndex=e,this._pageInfo=t,this._transport=n,this._stats=r?new Xc:null,this._pdfBug=r,this.commonObjs=n.commonObjs,this.objs=new dh,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:s=!1}={}){return new Co({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:s})}getAnnotations({intent:e="display"}={}){let{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Pe(this,"isPureXfa",!!this._transport._htmlForXfa)}getXfa(){return $(this,null,function*(){return this._transport._htmlForXfa?.children[this._pageIndex]||null})}render({canvasContext:e,viewport:t,intent:n="display",annotationMode:r=Ki.ENABLE,transform:s=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:h=null,isEditing:d=!1}){this._stats?.time("Overall");let u=this._transport.getRenderingIntent(n,r,h,d),{renderingIntent:p,cacheKey:f}=u;this.#t=!1,this.#n(),o||=this._transport.getOptionalContentConfig(p);let g=this._intentStates.get(f);g||(g=Object.create(null),this._intentStates.set(f,g)),g.streamReaderCancelTimeout&&(clearTimeout(g.streamReaderCancelTimeout),g.streamReaderCancelTimeout=null);let y=!!(p&E0.PRINT);g.displayReadyCapability||(g.displayReadyCapability=Promise.withResolvers(),g.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(u));let x=v=>{g.renderTasks.delete(_),(this._maybeCleanupAfterRender||y)&&(this.#t=!0),this.#i(!y),v?(_.capability.reject(v),this._abortOperatorList({intentState:g,reason:v instanceof Error?v:new Error(v)})):_.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},_=new n7({callback:x,params:{canvasContext:e,viewport:t,transform:s,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:g.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!y,pdfBug:this._pdfBug,pageColors:c});(g.renderTasks||=new Set).add(_);let b=_.task;return Promise.all([g.displayReadyCapability.promise,o]).then(([v,m])=>{if(this.destroyed){x();return}if(this._stats?.time("Rendering"),!(m.renderingIntent&p))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");_.initializeGraphics({transparency:v,optionalContentConfig:m}),_.operatorListChanged()}).catch(x),b}getOperatorList({intent:e="display",annotationMode:t=Ki.ENABLE,printAnnotationStorage:n=null,isEditing:r=!1}={}){function s(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}let a=this._transport.getRenderingIntent(e,t,n,r,!0),o=this._intentStates.get(a.cacheKey);o||(o=Object.create(null),this._intentStates.set(a.cacheKey,o));let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=s,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||=new Set).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size(r){return r.items.length}})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(n=>Eo.textContent(n));let t=this.streamTextContent(e);return new Promise(function(n,r){function s(){a.read().then(function({value:l,done:c}){if(c){n(o);return}o.lang??=l.lang,Object.assign(o.styles,l.styles),o.items.push(...l.items),s()},r)}let a=t.getReader(),o={items:[],styles:Object.create(null),lang:null};s()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let e=[];for(let t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(let n of t.renderTasks)e.push(n.completed),n.cancel();return this.objs.clear(),this.#t=!1,this.#n(),Promise.all(e)}cleanup(e=!1){this.#t=!0;let t=this.#i(!1);return e&&t&&(this._stats&&=new Xc),t}#i(e=!1){if(this.#n(),!this.#t||this.destroyed)return!1;if(e)return this.#e=setTimeout(()=>{this.#e=null,this.#i(!1)},VI),!1;for(let{renderTasks:t,operatorList:n}of this._intentStates.values())if(t.size>0||!n.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}#n(){this.#e&&(clearTimeout(this.#e),this.#e=null)}_startRenderPage(e,t){let n=this._intentStates.get(t);n&&(this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(e))}_renderPageChunk(e,t){for(let n=0,r=e.length;n{l.read().then(({value:d,done:u})=>{if(u){c.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(d,c),h())},d=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(let u of c.renderTasks)u.operatorListChanged();this.#i(!0)}if(c.displayReadyCapability)c.displayReadyCapability.reject(d);else if(c.opListReadCapability)c.opListReadCapability.reject(d);else throw d}})};h()}_abortOperatorList({intentState:e,reason:t,force:n=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!n){if(e.renderTasks.size>0)return;if(t instanceof xo){let r=EI;t.extraDelay>0&&t.extraDelay<1e3&&(r+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},r);return}}if(e.streamReader.cancel(new Ai(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(let[r,s]of this._intentStates)if(s===e){this._intentStates.delete(r);break}this.cleanup()}}}get stats(){return this._stats}},e7=class{#e=new Map;#t=Promise.resolve();postMessage(e,t){let n={data:structuredClone(e,t?{transfer:t}:null)};this.#t.then(()=>{for(let[r]of this.#e)r.call(this,n)})}addEventListener(e,t,n=null){let r=null;if(n?.signal instanceof AbortSignal){let{signal:s}=n;if(s.aborted){De("LoopbackPort - cannot use an `aborted` signal.");return}let a=()=>this.removeEventListener(e,t);r=()=>s.removeEventListener("abort",a),s.addEventListener("abort",a)}this.#e.set(t,r)}removeEventListener(e,t){this.#e.get(t)?.(),this.#e.delete(t)}terminate(){for(let[,e]of this.#e)e?.();this.#e.clear()}},ys=class i{static#e=0;static#t=!1;static#i;static{qt&&(this.#t=!0,Gn.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(e,t)=>{let n;try{if(n=new URL(e),!n.origin||n.origin==="null")return!1}catch{return!1}let r=new URL(t,n);return n.origin===r.origin},this._createCDNWrapper=e=>{let t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}}constructor({name:e=null,port:t=null,verbosity:n=YO()}={}){if(this.name=e,this.destroyed=!1,this.verbosity=n,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if(i.#i?.has(t))throw new Error("Cannot use more than one PDFWorker per port.");(i.#i||=new WeakMap).set(t,this),this._initializeFromPort(t);return}this._initialize()}get promise(){return qt?Promise.all([R1.promise,this._readyCapability.promise]):this._readyCapability.promise}#n(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new qn("main","worker",e),this._messageHandler.on("ready",function(){}),this.#n()}_initialize(){if(i.#t||i.#r){this._setupFakeWorker();return}let{workerSrc:e}=i;try{i._isSameOrigin(window.location.href,e)||(e=i._createCDNWrapper(new URL(e,window.location).href));let t=new Worker(e,{type:"module"}),n=new qn("main","worker",t),r=()=>{s.abort(),n.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},s=new AbortController;t.addEventListener("error",()=>{this._webWorker||r()},{signal:s.signal}),n.on("test",o=>{if(s.abort(),this.destroyed||!o){r();return}this._messageHandler=n,this._port=t,this._webWorker=t,this.#n()}),n.on("ready",o=>{if(s.abort(),this.destroyed){r();return}try{a()}catch{this._setupFakeWorker()}});let a=()=>{let o=new Uint8Array;n.send("test",o,[o.buffer])};a();return}catch{Eh("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){i.#t||(De("Setting up fake worker."),i.#t=!0),i._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}let t=new e7;this._port=t;let n=`fake${i.#e++}`,r=new qn(n+"_worker",n,t);e.setup(r,t),this._messageHandler=new qn(n,n+"_worker",t),this.#n()}).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),i.#i?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");let t=this.#i?.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new i(e)}static get workerSrc(){if(Gn.workerSrc)return Gn.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#r(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return Pe(this,"_setupFakeWorkerGlobal",$(this,null,function*(){return this.#r?this.#r:(yield import(this.workerSrc)).WorkerMessageHandler}))}},t7=class{#e=new Map;#t=new Map;#i=new Map;#n=new Map;#r=null;constructor(e,t,n,r,s){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new dh,this.fontLoader=new C8({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.cMapReaderFactory=s.cMapReaderFactory,this.standardFontDataFactory=s.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#s(e,t=null){let n=this.#e.get(e);if(n)return n;let r=this.messageHandler.sendWithPromise(e,t);return this.#e.set(e,r),r}get annotationStorage(){return Pe(this,"annotationStorage",new _o)}getRenderingIntent(e,t=Ki.ENABLE,n=null,r=!1,s=!1){let a=E0.DISPLAY,o=y8;switch(e){case"any":a=E0.ANY;break;case"display":break;case"print":a=E0.PRINT;break;default:De(`getRenderingIntent - invalid intent: ${e}`)}let l=a&E0.PRINT&&n instanceof Jc?n:this.annotationStorage;switch(t){case Ki.DISABLE:a+=E0.ANNOTATIONS_DISABLE;break;case Ki.ENABLE:break;case Ki.ENABLE_FORMS:a+=E0.ANNOTATIONS_FORMS;break;case Ki.ENABLE_STORAGE:a+=E0.ANNOTATIONS_STORAGE,o=l.serializable;break;default:De(`getRenderingIntent - invalid annotationMode: ${t}`)}r&&(a+=E0.IS_EDITING),s&&(a+=E0.OPLIST);let{ids:c,hash:h}=l.modifiedIds,d=[a,o.hash,h];return{renderingIntent:a,cacheKey:d.join("_"),annotationStorageSerializable:o,modifiedIds:c}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#r?.reject(new Error("Worker was destroyed during onPassword callback"));let e=[];for(let n of this.#t.values())e.push(n._destroy());this.#t.clear(),this.#i.clear(),this.#n.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();let t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),Do.cleanup(),this._networkStream?.cancelAllRequests(new Ai("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(n,r)=>{Et(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=s=>{this._lastProgress={loaded:s.loaded,total:s.total}},r.onPull=()=>{this._fullReader.read().then(function({value:s,done:a}){if(a){r.close();return}Et(s instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{r.error(s)})},r.onCancel=s=>{this._fullReader.cancel(s),r.ready.catch(a=>{if(!this.destroyed)throw a})}}),e.on("ReaderHeadersReady",n=>$(this,null,function*(){yield this._fullReader.headersReady;let{isStreamingSupported:r,isRangeSupported:s,contentLength:a}=this._fullReader;return(!r||!s)&&(this._lastProgress&&t.onProgress?.(this._lastProgress),this._fullReader.onProgress=o=>{t.onProgress?.({loaded:o.loaded,total:o.total})}),{isStreamingSupported:r,isRangeSupported:s,contentLength:a}})),e.on("GetRangeReader",(n,r)=>{Et(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let s=this._networkStream.getRangeReader(n.begin,n.end);if(!s){r.close();return}r.onPull=()=>{s.read().then(function({value:a,done:o}){if(o){r.close();return}Et(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{r.error(a)})},r.onCancel=a=>{s.cancel(a),r.ready.catch(o=>{if(!this.destroyed)throw o})}}),e.on("GetDoc",({pdfInfo:n})=>{this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,t._capability.resolve(new Q8(n,this))}),e.on("DocException",function(n){let r;switch(n.name){case"PasswordException":r=new bo(n.message,n.code);break;case"InvalidPDFException":r=new Wc(n.message);break;case"MissingPDFException":r=new Mi(n.message);break;case"UnexpectedResponseException":r=new Cs(n.message,n.status);break;case"UnknownErrorException":r=new yo(n.message,n.details);break;default:nt("DocException - expected a valid Error.")}t._capability.reject(r)}),e.on("PasswordRequest",n=>{if(this.#r=Promise.withResolvers(),t.onPassword){let r=s=>{s instanceof Error?this.#r.reject(s):this.#r.resolve({password:s})};try{t.onPassword(r,n.code)}catch(s){this.#r.reject(s)}}else this.#r.reject(new bo(n.message,n.code));return this.#r.promise}),e.on("DataLoaded",n=>{t.onProgress?.({loaded:n.length,total:n.length}),this.downloadInfoCapability.resolve(n)}),e.on("StartRenderPage",n=>{if(this.destroyed)return;this.#t.get(n.pageIndex)._startRenderPage(n.transparency,n.cacheKey)}),e.on("commonobj",([n,r,s])=>{if(this.destroyed||this.commonObjs.has(n))return null;switch(r){case"Font":let{disableFontFace:a,fontExtraProperties:o,pdfBug:l}=this._params;if("error"in s){let u=s.error;De(`Error during font loading: ${u}`),this.commonObjs.resolve(n,u);break}let c=l&&globalThis.FontInspector?.enabled?(u,p)=>globalThis.FontInspector.fontAdded(u,p):null,h=new x8(s,{disableFontFace:a,inspectFont:c});this.fontLoader.bind(h).catch(()=>e.sendWithPromise("FontFallback",{id:n})).finally(()=>{!o&&h.data&&(h.data=null),this.commonObjs.resolve(n,h)});break;case"CopyLocalImage":let{imageRef:d}=s;Et(d,"The imageRef must be defined.");for(let u of this.#t.values())for(let[,p]of u.objs)if(p?.ref===d)return p.dataLen?(this.commonObjs.resolve(n,structuredClone(p)),p.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,s);break;default:throw new Error(`Got unknown common object type ${r}`)}return null}),e.on("obj",([n,r,s,a])=>{if(this.destroyed)return;let o=this.#t.get(r);if(!o.objs.has(n)){if(o._intentStates.size===0){a?.bitmap?.close();return}switch(s){case"Image":o.objs.resolve(n,a),a?.dataLen>UO&&(o._maybeCleanupAfterRender=!0);break;case"Pattern":o.objs.resolve(n,a);break;default:throw new Error(`Got unknown object type ${s}`)}}}),e.on("DocProgress",n=>{this.destroyed||t.onProgress?.({loaded:n.loaded,total:n.total})}),e.on("FetchBuiltInCMap",n=>$(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(n)})),e.on("FetchStandardFontData",n=>$(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(n)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&De("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));let t=e-1,n=this.#i.get(t);if(n)return n;let r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(s=>{if(this.destroyed)throw new Error("Transport destroyed");s.refStr&&this.#n.set(s.refStr,e);let a=new J8(t,s,this,this._params.pdfBug);return this.#t.set(t,a),a});return this.#i.set(t,r),r}getPageIndex(e){return gA(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#s("GetFieldObjects")}hasJSActions(){return this.#s("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#s("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return this.#s("GetOptionalContentConfig").then(t=>new F8(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){let e="GetMetadata",t=this.#e.get(e);if(t)return t;let n=this.messageHandler.sendWithPromise(e,null).then(r=>({info:r[0],metadata:r[1]?new k8(r[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(e,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(e=!1){return $(this,null,function*(){if(!this.destroyed){yield this.messageHandler.sendWithPromise("Cleanup",null);for(let t of this.#t.values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0),Do.cleanup()}})}cachedPageNumber(e){if(!gA(e))return null;let t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return this.#n.get(t)??null}},Zc=Symbol("INITIAL_DATA"),dh=class{#e=Object.create(null);#t(e){return this.#e[e]||=se(Z({},Promise.withResolvers()),{data:Zc})}get(e,t=null){if(t){let r=this.#t(e);return r.promise.then(()=>t(r.data)),null}let n=this.#e[e];if(!n||n.data===Zc)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return n.data}has(e){let t=this.#e[e];return!!t&&t.data!==Zc}resolve(e,t=null){let n=this.#t(e);n.data=t,n.resolve()}clear(){for(let e in this.#e){let{data:t}=this.#e[e];t?.bitmap?.close()}this.#e=Object.create(null)}*[Symbol.iterator](){for(let e in this.#e){let{data:t}=this.#e[e];t!==Zc&&(yield[e,t])}}},i7=class{#e=null;constructor(e){this.#e=e,this.onContinue=null}get promise(){return this.#e.capability.promise}cancel(e=0){this.#e.cancel(null,e)}get separateAnnots(){let{separateAnnots:e}=this.#e.operatorList;if(!e)return!1;let{annotationCanvasMap:t}=this.#e;return e.form||e.canvas&&t?.size>0}},n7=class i{#e=null;static#t=new WeakSet;constructor({callback:e,params:t,objs:n,commonObjs:r,annotationCanvasMap:s,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:h=!1,pdfBug:d=!1,pageColors:u=null}){this.callback=e,this.params=t,this.objs=n,this.commonObjs=r,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=d,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=h===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new i7(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;if(this._canvas){if(i.#t.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.");i.#t.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{canvasContext:n,viewport:r,transform:s,background:a}=this.params;this.gfx=new bs(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:s,viewport:r,transparency:e,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null),i.#t.delete(this._canvas),this.callback(e||new xo(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#e=window.requestAnimationFrame(()=>{this.#e=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){return $(this,null,function*(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),i.#t.delete(this._canvas),this.callback())))})}},RI="4.8.69",OI="3634dab10";function vA(i){return Math.floor(Math.max(0,Math.min(1,i))*255).toString(16).padStart(2,"0")}function vo(i){return Math.max(0,Math.min(255,255*i))}var uh=class{static CMYK_G([e,t,n,r]){return["G",1-Math.min(1,.3*e+.59*n+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return e=vo(e),[e,e,e]}static G_HTML([e]){let t=vA(e);return`#${t}${t}${t}`}static RGB_G([e,t,n]){return["G",.3*e+.59*t+.11*n]}static RGB_rgb(e){return e.map(vo)}static RGB_HTML(e){return`#${e.map(vA).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,n,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,n+r),1-Math.min(1,t+r)]}static CMYK_rgb([e,t,n,r]){return[vo(1-Math.min(1,e+r)),vo(1-Math.min(1,n+r)),vo(1-Math.min(1,t+r))]}static CMYK_HTML(e){let t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,n]){let r=1-e,s=1-t,a=1-n,o=Math.min(r,s,a);return["CMYK",r,s,a,o]}},r7=class{create(e,t,n=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");let r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),n||(r.setAttribute("width",`${e}px`),r.setAttribute("height",`${t}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${e} ${t}`),r}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){nt("Abstract method `_createSVG` called.")}},Vo=class extends r7{_createSVG(e){return document.createElementNS(Ci,e)}},fh=class{static setupStorage(e,t,n,r,s){let a=r.getValue(t,{value:null});switch(n.name){case"textarea":if(a.value!==null&&(e.textContent=a.value),s==="print")break;e.addEventListener("input",o=>{r.setValue(t,{value:o.target.value})});break;case"input":if(n.attributes.type==="radio"||n.attributes.type==="checkbox"){if(a.value===n.attributes.xfaOn?e.setAttribute("checked",!0):a.value===n.attributes.xfaOff&&e.removeAttribute("checked"),s==="print")break;e.addEventListener("change",o=>{r.setValue(t,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&e.setAttribute("value",a.value),s==="print")break;e.addEventListener("input",o=>{r.setValue(t,{value:o.target.value})})}break;case"select":if(a.value!==null){e.setAttribute("value",a.value);for(let o of n.children)o.attributes.value===a.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}e.addEventListener("input",o=>{let l=o.target.options,c=l.selectedIndex===-1?"":l[l.selectedIndex].value;r.setValue(t,{value:c})});break}}static setAttributes({html:e,element:t,storage:n=null,intent:r,linkService:s}){let{attributes:a}=t,o=e instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${r}`);for(let[l,c]of Object.entries(a))if(c!=null)switch(l){case"class":c.length&&e.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",c);break;case"style":Object.assign(e.style,c);break;case"textContent":e.textContent=c;break;default:(!o||l!=="href"&&l!=="newWindow")&&e.setAttribute(l,c)}o&&s.addLinkAttributes(e,a.href,a.newWindow),n&&a.dataId&&this.setupStorage(e,a.dataId,t,n)}static render(e){let t=e.annotationStorage,n=e.linkService,r=e.xfaHtml,s=e.intent||"display",a=document.createElement(r.name);r.attributes&&this.setAttributes({html:a,element:r,intent:s,linkService:n});let o=s!=="richText",l=e.div;if(l.append(a),e.viewport){let d=`matrix(${e.viewport.transform.join(",")})`;l.style.transform=d}o&&l.setAttribute("class","xfaLayer xfaFont");let c=[];if(r.children.length===0){if(r.value){let d=document.createTextNode(r.value);a.append(d),o&&Eo.shouldBuildText(r.name)&&c.push(d)}return{textDivs:c}}let h=[[r,-1,a]];for(;h.length>0;){let[d,u,p]=h.at(-1);if(u+1===d.children.length){h.pop();continue}let f=d.children[++h.at(-1)[1]];if(f===null)continue;let{name:g}=f;if(g==="#text"){let x=document.createTextNode(f.value);c.push(x),p.append(x);continue}let y=f?.attributes?.xmlns?document.createElementNS(f.attributes.xmlns,g):document.createElement(g);if(p.append(y),f.attributes&&this.setAttributes({html:y,element:f,storage:t,intent:s,linkService:n}),f.children?.length>0)h.push([f,-1,y]);else if(f.value){let x=document.createTextNode(f.value);o&&Eo.shouldBuildText(g)&&c.push(x),y.append(x)}}for(let d of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))d.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){let t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}},Po=1e3,II=9,Yn=new WeakSet;function xi(i){return{width:i[2]-i[0],height:i[3]-i[1]}}var s7=class{static create(e){switch(e.data.annotationType){case Dt.LINK:return new ph(e);case Dt.TEXT:return new a7(e);case Dt.WIDGET:switch(e.data.fieldType){case"Tx":return new o7(e);case"Btn":return e.data.radioButton?new gh(e):e.data.checkBox?new c7(e):new h7(e);case"Ch":return new d7(e);case"Sig":return new l7(e)}return new _i(e);case Dt.POPUP:return new To(e);case Dt.FREETEXT:return new vh(e);case Dt.LINE:return new f7(e);case Dt.SQUARE:return new p7(e);case Dt.CIRCLE:return new g7(e);case Dt.POLYLINE:return new mh(e);case Dt.CARET:return new m7(e);case Dt.INK:return new Lo(e);case Dt.POLYGON:return new v7(e);case Dt.HIGHLIGHT:return new wh(e);case Dt.UNDERLINE:return new w7(e);case Dt.SQUIGGLY:return new b7(e);case Dt.STRIKEOUT:return new y7(e);case Dt.STAMP:return new bh(e);case Dt.FILEATTACHMENT:return new C7(e);default:return new vt(e)}}},vt=class i{#e=null;#t=!1;#i=null;constructor(e,{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(n)),r&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:n}){return!!(e?.str||t?.str||n?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return i._hasPopupData(this.data)}updateEdited(e){if(!this.container)return;this.#e||={rect:this.data.rect.slice(0)};let{rect:t}=e;t&&this.#n(t),this.#i?.popup.updateEdited(e)}resetEdited(){this.#e&&(this.#n(this.#e.rect),this.#i?.popup.resetEdited(),this.#e=null)}#n(e){let{container:{style:t},data:{rect:n,rotation:r},parent:{viewport:{rawDims:{pageWidth:s,pageHeight:a,pageX:o,pageY:l}}}}=this;n?.splice(0,4,...e);let{width:c,height:h}=xi(e);t.left=`${100*(e[0]-o)/s}%`,t.top=`${100*(a-e[3]+l)/a}%`,r===0?(t.width=`${100*c/s}%`,t.height=`${100*h/a}%`):this.setRotation(r)}_createContainer(e){let{data:t,parent:{page:n,viewport:r}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",t.id),this instanceof _i||(s.tabIndex=Po);let{style:a}=s;if(a.zIndex=this.parent.zIndex++,t.alternativeText&&(s.title=t.alternativeText),t.noRotate&&s.classList.add("norotate"),!t.rect||this instanceof To){let{rotation:g}=t;return!t.hasOwnCanvas&&g!==0&&this.setRotation(g,s),s}let{width:o,height:l}=xi(t.rect);if(!e&&t.borderStyle.width>0){a.borderWidth=`${t.borderStyle.width}px`;let g=t.borderStyle.horizontalCornerRadius,y=t.borderStyle.verticalCornerRadius;if(g>0||y>0){let _=`calc(${g}px * var(--scale-factor)) / calc(${y}px * var(--scale-factor))`;a.borderRadius=_}else if(this instanceof gh){let _=`calc(${o}px * var(--scale-factor)) / calc(${l}px * var(--scale-factor))`;a.borderRadius=_}switch(t.borderStyle.style){case po.SOLID:a.borderStyle="solid";break;case po.DASHED:a.borderStyle="dashed";break;case po.BEVELED:De("Unimplemented border style: beveled");break;case po.INSET:De("Unimplemented border style: inset");break;case po.UNDERLINE:a.borderBottomStyle="solid";break;default:break}let x=t.borderColor||null;x?(this.#t=!0,a.borderColor=ne.makeHexColor(x[0]|0,x[1]|0,x[2]|0)):a.borderWidth=0}let c=ne.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]),{pageWidth:h,pageHeight:d,pageX:u,pageY:p}=r.rawDims;a.left=`${100*(c[0]-u)/h}%`,a.top=`${100*(c[1]-p)/d}%`;let{rotation:f}=t;return t.hasOwnCanvas||f===0?(a.width=`${100*o/h}%`,a.height=`${100*l/d}%`):this.setRotation(f,s),s}setRotation(e,t=this.container){if(!this.data.rect)return;let{pageWidth:n,pageHeight:r}=this.parent.viewport.rawDims,{width:s,height:a}=xi(this.data.rect),o,l;e%180===0?(o=100*s/n,l=100*a/r):(o=100*a/n,l=100*s/r),t.style.width=`${o}%`,t.style.height=`${l}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){let e=(t,n,r)=>{let s=r.detail[t],a=s[0],o=s.slice(1);r.target.style[n]=uh[`${a}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[n]:uh[`${a}_rgb`](o)})};return Pe(this,"_commonActions",{display:t=>{let{display:n}=t.detail,r=n%2===1;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:r,noPrint:n===1||n===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{let{hidden:n}=t.detail;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:n,noView:n})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{let n=t.detail.rotation;this.setRotation(n),this.annotationStorage.setValue(this.data.id,{rotation:n})}})}_dispatchEventFromSandbox(e,t){let n=this._commonActions;for(let r of Object.keys(t.detail))(e[r]||n[r])?.(t)}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;let t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;let n=this._commonActions;for(let[r,s]of Object.entries(t)){let a=n[r];if(a){let o={detail:{[r]:s},target:e};a(o),delete t[r]}}}_createQuadrilaterals(){if(!this.container)return;let{quadPoints:e}=this.data;if(!e)return;let[t,n,r,s]=this.data.rect.map(g=>Math.fround(g));if(e.length===8){let[g,y,x,_]=e.subarray(2,6);if(r===g&&s===y&&t===x&&n===_)return}let{style:a}=this.container,o;if(this.#t){let{borderColor:g,borderWidth:y}=a;a.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}let l=r-t,c=s-n,{svgFactory:h}=this,d=h.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0);let u=h.createElement("defs");d.append(u);let p=h.createElement("clipPath"),f=`clippath_${this.data.id}`;p.setAttribute("id",f),p.setAttribute("clipPathUnits","objectBoundingBox"),u.append(p);for(let g=2,y=e.length;g`)}this.#t&&(o.push("')"),a.backgroundImage=o.join("")),this.container.append(d),this.container.style.clipPath=`url(#${f})`}_createPopup(){let{data:e}=this,t=this.#i=new To({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]});this.parent.div.append(t.render())}render(){nt("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){let n=[];if(this._fieldObjects){let r=this._fieldObjects[e];if(r)for(let{page:s,id:a,exportValues:o}of r){if(s===-1||a===t)continue;let l=typeof o=="string"?o:null,c=document.querySelector(`[data-element-id="${a}"]`);if(c&&!Yn.has(c)){De(`_getElementsByName - element not allowed: ${a}`);continue}n.push({id:a,exportValue:l,domElement:c})}return n}for(let r of document.getElementsByName(e)){let{exportValue:s}=r,a=r.getAttribute("data-element-id");a!==t&&Yn.has(r)&&n.push({id:a,exportValue:s,domElement:r})}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){let e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(let t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}},ph=class extends vt{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){let{data:e,linkService:t}=this,n=document.createElement("a");n.setAttribute("data-element-id",e.id);let r=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(n,e.action),r=!0):e.attachment?(this.#t(n,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(this.#i(n,e.setOCGState),r=!0):e.dest?(this._bindLink(n,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),r=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(n,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(n),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||t==="")&&this.#e()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#e()}#t(e,t,n=null){e.href=this.linkService.getAnchorUrl(""),t.description&&(e.title=t.description),e.onclick=()=>(this.downloadManager?.openOrDownloadData(t.content,t.filename,n),!1),this.#e()}#i(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#e()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");let n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let r of Object.keys(t.actions)){let s=n.get(r);s&&(e[s]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||(e.onclick=()=>!1),this.#e()}_bindResetFormAction(e,t){let n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){De('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(e.onclick=()=>!1);return}e.onclick=()=>{n?.();let{fields:r,refs:s,include:a}=t,o=[];if(r.length!==0||s.length!==0){let h=new Set(s);for(let d of r){let u=this._fieldObjects[d]||[];for(let{id:p}of u)h.add(p)}for(let d of Object.values(this._fieldObjects))for(let u of d)h.has(u.id)===a&&o.push(u)}else for(let h of Object.values(this._fieldObjects))o.push(...h);let l=this.annotationStorage,c=[];for(let h of o){let{id:d}=h;switch(c.push(d),h.type){case"text":{let p=h.defaultValue||"";l.setValue(d,{value:p});break}case"checkbox":case"radiobutton":{let p=h.defaultValue===h.exportValues;l.setValue(d,{value:p});break}case"combobox":case"listbox":{let p=h.defaultValue||"";l.setValue(d,{value:p});break}default:continue}let u=document.querySelector(`[data-element-id="${d}"]`);if(u){if(!Yn.has(u)){De(`_bindResetFormAction - element not allowed: ${d}`);continue}}else continue;u.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}}),!1}}},a7=class extends vt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");let e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}},_i=class extends vt{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&(e.previousSibling?.nodeName==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return It.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,n,r,s){n.includes("mouse")?e.addEventListener(n,a=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:s(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):e.addEventListener(n,a=>{if(n==="blur"){if(!t.focused||!a.relatedTarget)return;t.focused=!1}else if(n==="focus"){if(t.focused)return;t.focused=!0}s&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:s(a)}})})}_setEventListeners(e,t,n,r){for(let[s,a]of n)(a==="Action"||this.data.actions?.[a])&&((a==="Focus"||a==="Blur")&&(t||={focused:!1}),this._setEventListener(e,t,s,a,r),a==="Focus"&&!this.data.actions?.Blur?this._setEventListener(e,t,"blur","Blur",null):a==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(e,t,"focus","Focus",null))}_setBackgroundColor(e){let t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":ne.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){let t=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||II,s=e.style,a,o=2,l=c=>Math.round(10*c)/10;if(this.data.multiLine){let c=Math.abs(this.data.rect[3]-this.data.rect[1]-o),h=Math.round(c/(Uc*r))||1,d=c/h;a=Math.min(r,l(d/Uc))}else{let c=Math.abs(this.data.rect[3]-this.data.rect[1]-o);a=Math.min(r,l(c/Uc))}s.fontSize=`calc(${a}px * var(--scale-factor))`,s.color=ne.makeHexColor(n[0],n[1],n[2]),this.data.textAlignment!==null&&(s.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}},o7=class extends _i{constructor(e){let t=e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,{isRenderable:t})}setPropertyOnSiblings(e,t,n,r){let s=this.annotationStorage;for(let a of this._getElementsByName(e.name,e.id))a.domElement&&(a.domElement[t]=n),s.setValue(a.id,{[r]:n})}render(){let e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){let r=e.getValue(t,{value:this.data.fieldValue}),s=r.value||"",a=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;a&&s.length>a&&(s=s.slice(0,a));let o=r.formattedValue||this.data.textContent?.join(` `)||null;o&&this.data.comb&&(o=o.replaceAll(/\s+/g,""));let l={userValue:s,formattedValue:o,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=o??s,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type="text",n.setAttribute("value",o??s),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),Yn.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=Po,this._setRequired(n,this.data.required),a&&(n.maxLength=a),n.addEventListener("input",h=>{e.setValue(t,{value:h.target.value}),this.setPropertyOnSiblings(n,"value",h.target.value,"value"),l.formattedValue=null}),n.addEventListener("resetform",h=>{let d=this.data.defaultFieldValue??"";n.value=l.userValue=d,l.formattedValue=null});let c=h=>{let{formattedValue:d}=l;d!=null&&(h.target.value=d),h.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",d=>{if(l.focused)return;let{target:u}=d;l.userValue&&(u.value=l.userValue),l.lastCommittedValue=u.value,l.commitKey=1,this.data.actions?.Focus||(l.focused=!0)}),n.addEventListener("updatefromsandbox",d=>{this.showElementAndHideCanvas(d.target);let u={value(p){l.userValue=p.detail.value??"",e.setValue(t,{value:l.userValue.toString()}),p.target.value=l.userValue},formattedValue(p){let{formattedValue:f}=p.detail;l.formattedValue=f,f!=null&&p.target!==document.activeElement&&(p.target.value=f),e.setValue(t,{formattedValue:f})},selRange(p){p.target.setSelectionRange(...p.detail.selRange)},charLimit:p=>{let{charLimit:f}=p.detail,{target:g}=p;if(f===0){g.removeAttribute("maxLength");return}g.setAttribute("maxLength",f);let y=l.userValue;!y||y.length<=f||(y=y.slice(0,f),g.value=l.userValue=y,e.setValue(t,{value:y}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:y,willCommit:!0,commitKey:1,selStart:g.selectionStart,selEnd:g.selectionEnd}}))}};this._dispatchEventFromSandbox(u,d)}),n.addEventListener("keydown",d=>{l.commitKey=1;let u=-1;if(d.key==="Escape"?u=0:d.key==="Enter"&&!this.data.multiLine?u=2:d.key==="Tab"&&(l.commitKey=3),u===-1)return;let{value:p}=d.target;l.lastCommittedValue!==p&&(l.lastCommittedValue=p,l.userValue=p,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:p,willCommit:!0,commitKey:u,selStart:d.target.selectionStart,selEnd:d.target.selectionEnd}}))});let h=c;c=null,n.addEventListener("blur",d=>{if(!l.focused||!d.relatedTarget)return;this.data.actions?.Blur||(l.focused=!1);let{value:u}=d.target;l.userValue=u,l.lastCommittedValue!==u&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:u,willCommit:!0,commitKey:l.commitKey,selStart:d.target.selectionStart,selEnd:d.target.selectionEnd}}),h(d)}),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",d=>{l.lastCommittedValue=null;let{data:u,target:p}=d,{value:f,selectionStart:g,selectionEnd:y}=p,x=g,_=y;switch(d.inputType){case"deleteWordBackward":{let b=f.substring(0,g).match(/\w*[^\w]*$/);b&&(x-=b[0].length);break}case"deleteWordForward":{let b=f.substring(g).match(/^[^\w]*\w*/);b&&(_+=b[0].length);break}case"deleteContentBackward":g===y&&(x-=1);break;case"deleteContentForward":g===y&&(_+=1);break}d.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:f,change:u||"",willCommit:!1,selStart:x,selEnd:_}})}),this._setEventListeners(n,l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],d=>d.target.value)}if(c&&n.addEventListener("blur",c),this.data.comb){let d=(this.data.rect[2]-this.data.rect[0])/a;n.classList.add("comb"),n.style.letterSpacing=`calc(${d}px * var(--scale-factor) - 1ch)`}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}},l7=class extends _i{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}},c7=class extends _i{constructor(e){super(e,{isRenderable:e.renderForms})}render(){let e=this.annotationStorage,t=this.data,n=t.id,r=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;typeof r=="string"&&(r=r!=="Off",e.setValue(n,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");let s=document.createElement("input");return Yn.add(s),s.setAttribute("data-element-id",n),s.disabled=t.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=t.fieldName,r&&s.setAttribute("checked",!0),s.setAttribute("exportValue",t.exportValue),s.tabIndex=Po,s.addEventListener("change",a=>{let{name:o,checked:l}=a.target;for(let c of this._getElementsByName(o,n)){let h=l&&c.exportValue===t.exportValue;c.domElement&&(c.domElement.checked=h),e.setValue(c.id,{value:h})}e.setValue(n,{value:l})}),s.addEventListener("resetform",a=>{let o=t.defaultFieldValue||"Off";a.target.checked=o===t.exportValue}),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",a=>{let o={value(l){l.target.checked=l.detail.value!=="Off",e.setValue(n,{value:l.target.checked})}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}},gh=class extends _i{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let e=this.annotationStorage,t=this.data,n=t.id,r=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;if(typeof r=="string"&&(r=r!==t.buttonValue,e.setValue(n,{value:r})),r)for(let a of this._getElementsByName(t.fieldName,n))e.setValue(a.id,{value:!1});let s=document.createElement("input");if(Yn.add(s),s.setAttribute("data-element-id",n),s.disabled=t.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=t.fieldName,r&&s.setAttribute("checked",!0),s.tabIndex=Po,s.addEventListener("change",a=>{let{name:o,checked:l}=a.target;for(let c of this._getElementsByName(o,n))e.setValue(c.id,{value:!1});e.setValue(n,{value:l})}),s.addEventListener("resetform",a=>{let o=t.defaultFieldValue;a.target.checked=o!=null&&o===t.buttonValue}),this.enableScripting&&this.hasJSActions){let a=t.buttonValue;s.addEventListener("updatefromsandbox",o=>{let l={value:c=>{let h=a===c.detail.value;for(let d of this._getElementsByName(c.target.name)){let u=h&&d.id===n;d.domElement&&(d.domElement.checked=u),e.setValue(d.id,{value:u})}}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}},h7=class extends ph{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){let e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");let t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",n=>{this._dispatchEventFromSandbox({},n)})),e}},d7=class extends _i{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement("select");Yn.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=Po;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",h=>{let d=this.data.defaultFieldValue;for(let u of r.options)u.selected=u.value===d});for(let h of this.data.options){let d=document.createElement("option");d.textContent=h.displayValue,d.value=h.exportValue,n.value.includes(h.exportValue)&&(d.setAttribute("selected",!0),s=!1),r.append(d)}let a=null;if(s){let h=document.createElement("option");h.value=" ",h.setAttribute("hidden",!0),h.setAttribute("selected",!0),r.prepend(h),a=()=>{h.remove(),r.removeEventListener("input",a),a=null},r.addEventListener("input",a)}let o=h=>{let d=h?"value":"textContent",{options:u,multiple:p}=r;return p?Array.prototype.filter.call(u,f=>f.selected).map(f=>f[d]):u.selectedIndex===-1?null:u[u.selectedIndex][d]},l=o(!1),c=h=>{let d=h.target.options;return Array.prototype.map.call(d,u=>({displayValue:u.textContent,exportValue:u.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",h=>{let d={value(u){a?.();let p=u.detail.value,f=new Set(Array.isArray(p)?p:[p]);for(let g of r.options)g.selected=f.has(g.value);e.setValue(t,{value:o(!0)}),l=o(!1)},multipleSelection(u){r.multiple=!0},remove(u){let p=r.options,f=u.detail.remove;p[f].selected=!1,r.remove(f),p.length>0&&Array.prototype.findIndex.call(p,y=>y.selected)===-1&&(p[0].selected=!0),e.setValue(t,{value:o(!0),items:c(u)}),l=o(!1)},clear(u){for(;r.length!==0;)r.remove(0);e.setValue(t,{value:null,items:[]}),l=o(!1)},insert(u){let{index:p,displayValue:f,exportValue:g}=u.detail.insert,y=r.children[p],x=document.createElement("option");x.textContent=f,x.value=g,y?y.before(x):r.append(x),e.setValue(t,{value:o(!0),items:c(u)}),l=o(!1)},items(u){let{items:p}=u.detail;for(;r.length!==0;)r.remove(0);for(let f of p){let{displayValue:g,exportValue:y}=f,x=document.createElement("option");x.textContent=g,x.value=y,r.append(x)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:o(!0),items:c(u)}),l=o(!1)},indices(u){let p=new Set(u.detail.indices);for(let f of u.target.options)f.selected=p.has(f.index);e.setValue(t,{value:o(!0)}),l=o(!1)},editable(u){u.target.disabled=!u.detail.editable}};this._dispatchEventFromSandbox(d,h)}),r.addEventListener("input",h=>{let d=o(!0),u=o(!1);e.setValue(t,{value:d}),h.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:l,change:u,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],h=>h.target.value)):r.addEventListener("input",function(h){e.setValue(t,{value:o(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}},To=class extends vt{constructor(e){let{data:t,elements:n}=e;super(e,{isRenderable:vt._hasPopupData(t)}),this.elements=n,this.popup=null}render(){this.container.classList.add("popupAnnotation");let e=this.popup=new u7({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(let n of this.elements)n.popup=e,n.container.ariaHasPopup="dialog",t.push(n.data.id),n.addHighlightArea();return this.container.setAttribute("aria-controls",t.map(n=>`${T7}${n}`).join(",")),this.container}},u7=class{#e=this.#T.bind(this);#t=this.#S.bind(this);#i=this.#E.bind(this);#n=this.#A.bind(this);#r=null;#s=null;#l=null;#c=null;#h=null;#o=null;#d=null;#a=!1;#u=null;#p=null;#f=null;#g=null;#m=null;#v=null;#w=!1;constructor({container:e,color:t,elements:n,titleObj:r,modificationDate:s,contentsObj:a,richText:o,parent:l,rect:c,parentRect:h,open:d}){this.#s=e,this.#m=r,this.#l=a,this.#g=o,this.#o=l,this.#r=t,this.#f=c,this.#d=h,this.#h=n,this.#c=Yc.toDateObject(s),this.trigger=n.flatMap(u=>u.getElementsToTriggerPopup());for(let u of this.trigger)u.addEventListener("click",this.#n),u.addEventListener("mouseenter",this.#i),u.addEventListener("mouseleave",this.#t),u.classList.add("popupTriggerArea");for(let u of n)u.container?.addEventListener("keydown",this.#e);this.#s.hidden=!0,d&&this.#A()}render(){if(this.#u)return;let e=this.#u=document.createElement("div");if(e.className="popup",this.#r){let s=e.style.outlineColor=ne.makeHexColor(...this.#r);CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`:e.style.backgroundColor=ne.makeHexColor(...this.#r.map(o=>Math.floor(.7*(255-o)+o)))}let t=document.createElement("span");t.className="header";let n=document.createElement("h1");if(t.append(n),{dir:n.dir,str:n.textContent}=this.#m,e.append(t),this.#c){let s=document.createElement("span");s.classList.add("popupDate"),s.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),s.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#c.valueOf()})),t.append(s)}let r=this.#y;if(r)fh.render({xfaHtml:r,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{let s=this._formatContents(this.#l);e.append(s)}this.#s.append(e)}get#y(){let e=this.#g,t=this.#l;return e?.str&&(!t?.str||t.str===e.str)&&this.#g.html||null}get#M(){return this.#y?.attributes?.style?.fontSize||0}get#C(){return this.#y?.attributes?.style?.color||null}#x(e){let t=[],n={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},r={style:{color:this.#C,fontSize:this.#M?`calc(${this.#M}px * var(--scale-factor))`:""}};for(let s of e.split(` `))t.push({name:"span",value:s,attributes:r});return n}_formatContents({str:e,dir:t}){let n=document.createElement("p");n.classList.add("popupContent"),n.dir=t;let r=e.split(/(?:\r\n?|\n)/);for(let s=0,a=r.length;s{s.key==="Enter"&&(r?s.metaKey:s.ctrlKey)&&this.#t()}),!t.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),e.append(n),e}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}#t(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}},x7=class{#e=null;#t=null;#i=new Map;#n=null;constructor({div:e,accessibilityManager:t,annotationCanvasMap:n,annotationEditorUIManager:r,page:s,viewport:a,structTreeLayer:o}){this.div=e,this.#e=t,this.#t=n,this.#n=o||null,this.page=s,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=r}hasEditableAnnotations(){return this.#i.size>0}#r(e,t){return $(this,null,function*(){let n=e.firstChild||e,r=n.id=`${T7}${t}`,s=yield this.#n?.getAriaAttributes(r);if(s)for(let[a,o]of s)n.setAttribute(a,o);this.div.append(e),this.#e?.moveElementInDOM(this.div,e,n,!1)})}render(e){return $(this,null,function*(){let{annotations:t}=e,n=this.div;Wn(n,this.viewport);let r=new Map,s={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new Vo,annotationStorage:e.annotationStorage||new _o,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(let a of t){if(a.noHTML)continue;let o=a.annotationType===Dt.POPUP;if(o){let h=r.get(a.id);if(!h)continue;s.elements=h}else{let{width:h,height:d}=xi(a.rect);if(h<=0||d<=0)continue}s.data=a;let l=s7.create(s);if(!l.isRenderable)continue;if(!o&&a.popupRef){let h=r.get(a.popupRef);h?h.push(l):r.set(a.popupRef,[l])}let c=l.render();a.hidden&&(c.style.visibility="hidden"),yield this.#r(c,a.id),l._isEditable&&(this.#i.set(l.data.id,l),this._annotationEditorUIManager?.renderAnnotationElement(l))}this.#s()})}update({viewport:e}){let t=this.div;this.viewport=e,Wn(t,{rotation:e.rotation}),this.#s(),t.hidden=!1}#s(){if(!this.#t)return;let e=this.div;for(let[t,n]of this.#t){let r=e.querySelector(`[data-annotation-id="${t}"]`);if(!r)continue;n.className="annotationContent";let{firstChild:s}=r;s?s.nodeName==="CANVAS"?s.replaceWith(n):s.classList.contains("annotationContent")?s.after(n):s.before(n):r.append(n)}this.#t.clear()}getEditableAnnotations(){return Array.from(this.#i.values())}getEditableAnnotation(e){return this.#i.get(e)}},jc=/\r\n?|\n/g,M7=class i extends qe{#e;#t="";#i=`${this.id}-editor`;#n=null;#r;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){let e=i.prototype,t=s=>s.isEmpty(),n=Ao.TRANSLATE_SMALL,r=Ao.TRANSLATE_BIG;return Pe(this,"_keyboardManager",new Xn([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-n,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[n,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-n],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,n],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:t}]]))}static _type="freetext";static _editorType=Ce.FREETEXT;constructor(e){super(se(Z({},e),{name:"freeTextEditor"})),this.#e=e.color||i._defaultColor||qe._defaultLineColor,this.#r=e.fontSize||i._defaultFontSize}static initialize(e,t){qe.initialize(e,t);let n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case de.FREETEXT_SIZE:i._defaultFontSize=t;break;case de.FREETEXT_COLOR:i._defaultColor=t;break}}updateParams(e,t){switch(e){case de.FREETEXT_SIZE:this.#s(t);break;case de.FREETEXT_COLOR:this.#l(t);break}}static get defaultPropertiesToUpdate(){return[[de.FREETEXT_SIZE,i._defaultFontSize],[de.FREETEXT_COLOR,i._defaultColor||qe._defaultLineColor]]}get propertiesToUpdate(){return[[de.FREETEXT_SIZE,this.#r],[de.FREETEXT_COLOR,this.#e]]}#s(e){let t=r=>{this.editorDiv.style.fontSize=`calc(${r}px * var(--scale-factor))`,this.translate(0,-(r-this.#r)*this.parentScale),this.#r=r,this.#h()},n=this.#r;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#l(e){let t=r=>{this.#e=this.editorDiv.style.color=r},n=this.#e;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){let e=this.parentScale;return[-i._internalPadding*e,-(i._internalPadding+this.#r)*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(Ce.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#n=new AbortController;let e=this._uiManager.combinedSignal(this.#n);this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#i),this._isDraggable=!0,this.#n?.abort(),this.#n=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#c(){let e=[];this.editorDiv.normalize();let t=null;for(let n of this.editorDiv.childNodes)t?.nodeType===Node.TEXT_NODE&&n.nodeName==="BR"||(e.push(i.#o(n)),t=n);return e.join(` `)}#h(){let[e,t]=this.parentDimensions,n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{let{currentLayer:r,div:s}=this,a=s.style.display,o=s.classList.contains("hidden");s.classList.remove("hidden"),s.style.display="hidden",r.div.append(this.div),n=s.getBoundingClientRect(),s.remove(),s.style.display=a,s.classList.toggle("hidden",o)}this.rotation%180===this.parentRotation%180?(this.width=n.width/e,this.height=n.height/t):(this.width=n.height/e,this.height=n.width/t),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let e=this.#t,t=this.#t=this.#c().trimEnd();if(e===t)return;let n=r=>{if(this.#t=r,!r){this.remove();return}this.#d(),this._uiManager.rebuild(this),this.#h()};this.addCommands({cmd:()=>{n(t)},undo:()=>{n(e)},mustExec:!1}),this.#h()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){i._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#i),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#r}px * var(--scale-factor))`,n.color=this.#e,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),Kc(this,this.div,["dblclick","keydown"]),this.width){let[r,s]=this.parentDimensions;if(this.annotationElementId){let{position:a}=this._initialData,[o,l]=this.getInitialTranslation();[o,l]=this.pageTranslationToScreen(o,l);let[c,h]=this.pageDimensions,[d,u]=this.pageTranslation,p,f;switch(this.rotation){case 0:p=e+(a[0]-d)/c,f=t+this.height-(a[1]-u)/h;break;case 90:p=e+(a[0]-d)/c,f=t-(a[1]-u)/h,[o,l]=[l,-o];break;case 180:p=e-this.width+(a[0]-d)/c,f=t-(a[1]-u)/h,[o,l]=[-o,-l];break;case 270:p=e+(a[0]-d-this.height*h)/c,f=t+(a[1]-u-this.width*c)/h,[o,l]=[-l,o];break}this.setAt(p*r,f*s,o,l)}else this.setAt(e*r,t*s,this.width*r,this.height*s);this.#d(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#o(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(jc,"")}editorDivPaste(e){let t=e.clipboardData||window.clipboardData,{types:n}=t;if(n.length===1&&n[0]==="text/plain")return;e.preventDefault();let r=i.#u(t.getData("text")||"").replaceAll(jc,` `);if(!r)return;let s=window.getSelection();if(!s.rangeCount)return;this.editorDiv.normalize(),s.deleteFromDocument();let a=s.getRangeAt(0);if(!r.includes(` `)){a.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),s.collapseToStart();return}let{startContainer:o,startOffset:l}=a,c=[],h=[];if(o.nodeType===Node.TEXT_NODE){let p=o.parentElement;if(h.push(o.nodeValue.slice(l).replaceAll(jc,"")),p!==this.editorDiv){let f=c;for(let g of this.editorDiv.childNodes){if(g===p){f=h;continue}f.push(i.#o(g))}}c.push(o.nodeValue.slice(0,l).replaceAll(jc,""))}else if(o===this.editorDiv){let p=c,f=0;for(let g of this.editorDiv.childNodes)f++===l&&(p=h),p.push(i.#o(g))}this.#t=`${c.join(` `)}${r}${h.join(` `)}`,this.#d();let d=new Range,u=c.reduce((p,f)=>p+f.length,0);for(let{firstChild:p}of this.editorDiv.childNodes)if(p.nodeType===Node.TEXT_NODE){let f=p.nodeValue.length;if(u<=f){d.setStart(p,u),d.setEnd(p,u);break}u-=f}s.removeAllRanges(),s.addRange(d)}#d(){if(this.editorDiv.replaceChildren(),!!this.#t)for(let e of this.#t.split(` `)){let t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}}#a(){return this.#t.replaceAll("\xA0"," ")}static#u(e){return e.replaceAll(" ","\xA0")}get contentDiv(){return this.editorDiv}static deserialize(e,t,n){return $(this,null,function*(){let r=null;if(e instanceof vh){let{data:{defaultAppearanceData:{fontSize:a,fontColor:o},rect:l,rotation:c,id:h,popupRef:d},textContent:u,textPosition:p,parent:{page:{pageNumber:f}}}=e;if(!u||u.length===0)return null;r=e={annotationType:Ce.FREETEXT,color:Array.from(o),fontSize:a,value:u.join(` `),position:p,pageIndex:f-1,rect:l.slice(0),rotation:c,id:h,deleted:!1,popupRef:d}}let s=yield ir(i,this,"deserialize").call(this,e,t,n);return s.#r=e.fontSize,s.#e=ne.makeHexColor(...e.color),s.#t=i.#u(e.value),s.annotationElementId=e.id||null,s._initialData=r,s})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let t=i._internalPadding*this.parentScale,n=this.getRect(t,t),r=qe._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#e),s={annotationType:Ce.FREETEXT,color:r,fontSize:this.#r,value:this.#a(),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?s:this.annotationElementId&&!this.#p(s)?null:(s.id=this.annotationElementId,s)}#p(e){let{value:t,fontSize:n,color:r,pageIndex:s}=this._initialData;return this._hasBeenMoved||e.value!==t||e.fontSize!==n||e.color.some((a,o)=>a!==r[o])||e.pageIndex!==s}renderAnnotationElement(e){let t=super.renderAnnotationElement(e);if(this.deleted)return t;let{style:n}=t;n.fontSize=`calc(${this.#r}px * var(--scale-factor))`,n.color=this.#e,t.replaceChildren();for(let s of this.#t.split(` `)){let a=document.createElement("div");a.append(s?document.createTextNode(s):document.createElement("br")),t.append(a)}let r=i._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(r,r),popupContent:this.#t}),t}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}},yh=class{toSVGPath(){nt("Abstract method `toSVGPath` must be implemented.")}get box(){nt("Abstract getter `box` must be implemented.")}serialize(e,t){nt("Abstract method `serialize` must be implemented.")}get classNamesForDrawing(){nt("Abstract getter `classNamesForDrawing` must be implemented.")}get classNamesForOutlining(){nt("Abstract getter `classNamesForOutlining` must be implemented.")}get mustRemoveSelfIntersections(){return!1}},Ch=class i{#e;#t=[];#i;#n;#r=[];#s=new Float64Array(18);#l;#c;#h;#o;#d;#a;#u=[];static#p=8;static#f=2;static#g=i.#p+i.#f;constructor({x:e,y:t},n,r,s,a,o=0){this.#e=n,this.#a=s*r,this.#n=a,this.#s.set([NaN,NaN,NaN,NaN,e,t],6),this.#i=o,this.#o=i.#p*r,this.#h=i.#g*r,this.#d=r,this.#u.push(e,t)}isEmpty(){return isNaN(this.#s[8])}#m(){let e=this.#s.subarray(4,6),t=this.#s.subarray(16,18),[n,r,s,a]=this.#e;return[(this.#l+(e[0]-t[0])/2-n)/s,(this.#c+(e[1]-t[1])/2-r)/a,(this.#l+(t[0]-e[0])/2-n)/s,(this.#c+(t[1]-e[1])/2-r)/a]}add({x:e,y:t}){this.#l=e,this.#c=t;let[n,r,s,a]=this.#e,[o,l,c,h]=this.#s.subarray(8,12),d=e-c,u=t-h,p=Math.hypot(d,u);if(p=6;r-=6)isNaN(t[r])?n.push(`L${t[r+4]} ${t[r+5]}`):n.push(`C${t[r]} ${t[r+1]} ${t[r+2]} ${t[r+3]} ${t[r+4]} ${t[r+5]}`);return this.#w(n),n.join(" ")}#v(){let[e,t,n,r]=this.#e,[s,a,o,l]=this.#m();return`M${(this.#s[2]-e)/n} ${(this.#s[3]-t)/r} L${(this.#s[4]-e)/n} ${(this.#s[5]-t)/r} L${s} ${a} L${o} ${l} L${(this.#s[16]-e)/n} ${(this.#s[17]-t)/r} L${(this.#s[14]-e)/n} ${(this.#s[15]-t)/r} Z`}#w(e){let t=this.#t;e.push(`L${t[4]} ${t[5]} Z`)}#y(e){let[t,n,r,s]=this.#e,a=this.#s.subarray(4,6),o=this.#s.subarray(16,18),[l,c,h,d]=this.#m();e.push(`L${(a[0]-t)/r} ${(a[1]-n)/s} L${l} ${c} L${h} ${d} L${(o[0]-t)/r} ${(o[1]-n)/s}`)}newFreeDrawOutline(e,t,n,r,s,a){return new xh(e,t,n,r,s,a)}getOutlines(){let e=this.#r,t=this.#t,n=this.#s,[r,s,a,o]=this.#e,l=new Float64Array((this.#u?.length??0)+2);for(let d=0,u=l.length-2;d=6;d-=6)for(let u=0;u<6;u+=2){if(isNaN(t[d+u])){c[h]=c[h+1]=NaN,h+=2;continue}c[h]=t[d+u],c[h+1]=t[d+u+1],h+=2}return this.#C(c,h),this.newFreeDrawOutline(c,l,this.#e,this.#d,this.#i,this.#n)}#M(e){let t=this.#s,[n,r,s,a]=this.#e,[o,l,c,h]=this.#m(),d=new Float64Array(36);return d.set([NaN,NaN,NaN,NaN,(t[2]-n)/s,(t[3]-r)/a,NaN,NaN,NaN,NaN,(t[4]-n)/s,(t[5]-r)/a,NaN,NaN,NaN,NaN,o,l,NaN,NaN,NaN,NaN,c,h,NaN,NaN,NaN,NaN,(t[16]-n)/s,(t[17]-r)/a,NaN,NaN,NaN,NaN,(t[14]-n)/s,(t[15]-r)/a],0),this.newFreeDrawOutline(d,e,this.#e,this.#d,this.#i,this.#n)}#C(e,t){let n=this.#t;return e.set([NaN,NaN,NaN,NaN,n[4],n[5]],t),t+=6}#x(e,t){let n=this.#s.subarray(4,6),r=this.#s.subarray(16,18),[s,a,o,l]=this.#e,[c,h,d,u]=this.#m();return e.set([NaN,NaN,NaN,NaN,(n[0]-s)/o,(n[1]-a)/l,NaN,NaN,NaN,NaN,c,h,NaN,NaN,NaN,NaN,d,u,NaN,NaN,NaN,NaN,(r[0]-s)/o,(r[1]-a)/l],t),t+=24}},xh=class extends yh{#e;#t=null;#i;#n;#r;#s;#l;constructor(e,t,n,r,s,a){super(),this.#l=e,this.#r=t,this.#e=n,this.#s=r,this.#i=s,this.#n=a,this.#o(a);let{x:o,y:l,width:c,height:h}=this.#t;for(let d=0,u=e.length;dt[0]-n[0]||t[1]-n[1]||t[2]-n[2]);let e=[];for(let t of this.#t)t[3]?(e.push(...this.#c(t)),this.#s(t)):(this.#l(t),e.push(...this.#c(t)));return this.#n(e)}#n(e){let t=[],n=new Set;for(let a of e){let[o,l,c]=a;t.push([o,l,a],[o,c,a])}t.sort((a,o)=>a[1]-o[1]||a[0]-o[0]);for(let a=0,o=t.length;a0;){let a=n.values().next().value,[o,l,c,h,d]=a;n.delete(a);let u=o,p=l;for(s=[o,c],r.push(s);;){let f;if(n.has(h))f=h;else if(n.has(d))f=d;else break;n.delete(f),[o,l,c,h,d]=f,u!==o&&(s.push(u,p,o,p===l?l:c),u=o),p=p===l?c:l}s.push(u,p)}return new A7(r,this.#e)}#r(e){let t=this.#i,n=0,r=t.length-1;for(;n<=r;){let s=n+r>>1,a=t[s][0];if(a===e)return s;a=0;r--){let[s,a]=this.#i[r];if(s!==e)break;if(s===e&&a===t){this.#i.splice(r,1);return}}}#c(e){let[t,n,r]=e,s=[[t,n,r]],a=this.#r(r);for(let o=0;o=l){if(p>c)s[h][1]=c;else{if(d===1)return[];s.splice(h,1),h--,d--}continue}s[h][2]=l,p>c&&s.push([t,c,p])}}}return s}},A7=class extends yh{#e;#t;constructor(e,t){super(),this.#t=e,this.#e=t}toSVGPath(){let e=[];for(let t of this.#t){let[n,r]=t;e.push(`M${n} ${r}`);for(let s=2;s-1?(this.#a=!0,this.#y(e),this.#D()):this.#i&&(this.#e=e.anchorNode,this.#t=e.anchorOffset,this.#l=e.focusNode,this.#c=e.focusOffset,this.#w(),this.#D(),this.rotate(this.rotation))}get telemetryInitialData(){return{action:"added",type:this.#a?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:this.#m,methodOfCreation:this.#v}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}#w(){let e=new Mh(this.#i,.001);this.#o=e.getOutlines(),{x:this.x,y:this.y,width:this.width,height:this.height}=this.#o.box;let t=new Mh(this.#i,.0025,.001,this._uiManager.direction==="ltr");this.#s=t.getOutlines();let{lastPoint:n}=this.#s.box;this.#u=[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height]}#y({highlightOutlines:e,highlightId:t,clipPathId:n}){this.#o=e;let r=1.5;if(this.#s=e.getNewOutline(this.#m/2+r,.0025),t>=0)this.#d=t,this.#n=n,this.parent.drawLayer.finalizeLine(t,e),this.#f=this.parent.drawLayer.drawOutline(this.#s);else if(this.parent){let h=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(this.#d,e),this.parent.drawLayer.updateBox(this.#d,i.#A(this.#o.box,(h-this.rotation+360)%360)),this.parent.drawLayer.updateLine(this.#f,this.#s),this.parent.drawLayer.updateBox(this.#f,i.#A(this.#s.box,h))}let{x:s,y:a,width:o,height:l}=e.box;switch(this.rotation){case 0:this.x=s,this.y=a,this.width=o,this.height=l;break;case 90:{let[h,d]=this.parentDimensions;this.x=a,this.y=1-s,this.width=o*d/h,this.height=l*h/d;break}case 180:this.x=1-s,this.y=1-a,this.width=o,this.height=l;break;case 270:{let[h,d]=this.parentDimensions;this.x=1-a,this.y=s,this.width=o*d/h,this.height=l*h/d;break}}let{lastPoint:c}=this.#s.box;this.#u=[(c[0]-s)/o,(c[1]-a)/l]}static initialize(e,t){qe.initialize(e,t),i._defaultColor||=t.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(e,t){switch(e){case de.HIGHLIGHT_DEFAULT_COLOR:i._defaultColor=t;break;case de.HIGHLIGHT_THICKNESS:i._defaultThickness=t;break}}translateInPage(e,t){}get toolbarPosition(){return this.#u}updateParams(e,t){switch(e){case de.HIGHLIGHT_COLOR:this.#M(t);break;case de.HIGHLIGHT_THICKNESS:this.#C(t);break}}static get defaultPropertiesToUpdate(){return[[de.HIGHLIGHT_DEFAULT_COLOR,i._defaultColor],[de.HIGHLIGHT_THICKNESS,i._defaultThickness]]}get propertiesToUpdate(){return[[de.HIGHLIGHT_COLOR,this.color||i._defaultColor],[de.HIGHLIGHT_THICKNESS,this.#m||i._defaultThickness],[de.HIGHLIGHT_FREE,this.#a]]}#M(e){let t=(s,a)=>{this.color=s,this.parent?.drawLayer.changeColor(this.#d,s),this.#r?.updateColor(s),this.#p=a,this.parent?.drawLayer.changeOpacity(this.#d,a)},n=this.color,r=this.#p;this.addCommands({cmd:t.bind(this,e,i._defaultOpacity),undo:t.bind(this,n,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)}#C(e){let t=this.#m,n=r=>{this.#m=r,this.#x(r)};this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)}addEditToolbar(){return $(this,null,function*(){let e=yield ir(i.prototype,this,"addEditToolbar").call(this);return e?(this._uiManager.highlightColors&&(this.#r=new Ah({editor:this}),e.addColorPicker(this.#r)),e):null})}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#L())}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,this.#L())}onceAdded(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}remove(){this.#T(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#D(),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let t=!1;this.parent&&!e?this.#T():e&&(this.#D(e),t=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),this.show(this._isVisible),t&&this.select()}#x(e){if(!this.#a)return;this.#y({highlightOutlines:this.#o.getNewOutline(e/2)}),this.fixAndSetPosition();let[t,n]=this.parentDimensions;this.setDims(this.width*t,this.height*n)}#T(){this.#d===null||!this.parent||(this.parent.drawLayer.remove(this.#d),this.#d=null,this.parent.drawLayer.remove(this.#f),this.#f=null)}#D(e=this.parent){this.#d===null&&({id:this.#d,clipPathId:this.#n}=e.drawLayer.draw(this.#o,this.color,this.#p),this.#f=e.drawLayer.drawOutline(this.#s),this.#h&&(this.#h.style.clipPath=this.#n))}static#A({x:e,y:t,width:n,height:r},s){switch(s){case 90:return{x:1-t-r,y:e,width:r,height:n};case 180:return{x:1-e-n,y:1-t-r,width:n,height:r};case 270:return{x:t,y:1-e-n,width:r,height:n}}return{x:e,y:t,width:n,height:r}}rotate(e){let{drawLayer:t}=this.parent,n;this.#a?(e=(e-this.rotation+360)%360,n=i.#A(this.#o.box,e)):n=i.#A(this,e),t.rotate(this.#d,e),t.rotate(this.#f,e),t.updateBox(this.#d,n),t.updateBox(this.#f,i.#A(this.#s.box,e))}render(){if(this.div)return this.div;let e=super.render();this.#g&&(e.setAttribute("aria-label",this.#g),e.setAttribute("role","mark")),this.#a?e.classList.add("free"):this.div.addEventListener("keydown",this.#E.bind(this),{signal:this._uiManager._signal});let t=this.#h=document.createElement("div");e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal",t.style.clipPath=this.#n;let[n,r]=this.parentDimensions;return this.setDims(this.width*n,this.height*r),Kc(this,this.#h,["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent.drawLayer.addClass(this.#f,"hovered")}pointerleave(){this.isSelected||this.parent.drawLayer.removeClass(this.#f,"hovered")}#E(e){i._keyboardManager.exec(this,e)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:this.#S(!0);break;case 1:case 3:this.#S(!1);break}}#S(e){if(!this.#e)return;let t=window.getSelection();e?t.setPosition(this.#e,this.#t):t.setPosition(this.#l,this.#c)}select(){super.select(),this.#f&&(this.parent?.drawLayer.removeClass(this.#f,"hovered"),this.parent?.drawLayer.addClass(this.#f,"selected"))}unselect(){super.unselect(),this.#f&&(this.parent?.drawLayer.removeClass(this.#f,"selected"),this.#a||this.#S(!1))}get _mustFixPosition(){return!this.#a}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.show(this.#d,e),this.parent.drawLayer.show(this.#f,e))}#L(){return this.#a?this.rotation:0}#P(){if(this.#a)return null;let[e,t]=this.pageDimensions,[n,r]=this.pageTranslation,s=this.#i,a=new Float32Array(s.length*8),o=0;for(let{x:l,y:c,width:h,height:d}of s){let u=l*e+n,p=(1-c-d)*t+r;a[o]=a[o+4]=u,a[o+1]=a[o+3]=p,a[o+2]=a[o+6]=u+h*e,a[o+5]=a[o+7]=p+d*t,o+=8}return a}#_(e){return this.#o.serialize(e,this.#L())}static startHighlighting(e,t,{target:n,x:r,y:s}){let{x:a,y:o,width:l,height:c}=n.getBoundingClientRect(),h=new AbortController,d=e.combinedSignal(h),u=f=>{f.preventDefault(),f.stopPropagation()},p=f=>{h.abort(),this.#V(e,f)};window.addEventListener("blur",p,{signal:d}),window.addEventListener("pointerup",p,{signal:d}),window.addEventListener("pointerdown",u,{capture:!0,passive:!1,signal:d}),window.addEventListener("contextmenu",U0,{signal:d}),n.addEventListener("pointermove",this.#b.bind(this,e),{signal:d}),this._freeHighlight=new zo({x:r,y:s},[a,o,l,c],e.scale,this._defaultThickness/2,t,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0)}static#b(e,t){this._freeHighlight.add(t)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}static#V(e,t){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static deserialize(e,t,n){return $(this,null,function*(){let r=null;if(e instanceof wh){let{data:{quadPoints:f,rect:g,rotation:y,id:x,color:_,opacity:b,popupRef:v},parent:{page:{pageNumber:m}}}=e;r=e={annotationType:Ce.HIGHLIGHT,color:Array.from(_),opacity:b,quadPoints:f,boxes:null,pageIndex:m-1,rect:g.slice(0),rotation:y,id:x,deleted:!1,popupRef:v}}else if(e instanceof Lo){let{data:{inkLists:f,rect:g,rotation:y,id:x,color:_,borderStyle:{rawWidth:b},popupRef:v},parent:{page:{pageNumber:m}}}=e;r=e={annotationType:Ce.HIGHLIGHT,color:Array.from(_),thickness:b,inkLists:f,boxes:null,pageIndex:m-1,rect:g.slice(0),rotation:y,id:x,deleted:!1,popupRef:v}}let{color:s,quadPoints:a,inkLists:o,opacity:l}=e,c=yield ir(i,this,"deserialize").call(this,e,t,n);c.color=ne.makeHexColor(...s),c.#p=l||1,o&&(c.#m=e.thickness),c.annotationElementId=e.id||null,c._initialData=r;let[h,d]=c.pageDimensions,[u,p]=c.pageTranslation;if(a){let f=c.#i=[];for(let g=0;gn!==t[r])}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}},S7=class i extends qe{#e=0;#t=0;#i=null;#n=new Path2D;#r=!1;#s=null;#l=!1;#c=!1;#h=null;#o=null;#d=0;#a=0;#u=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";static _editorType=Ce.INK;constructor(e){super(se(Z({},e),{name:"inkEditor"})),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,t){qe.initialize(e,t)}static updateDefaultParams(e,t){switch(e){case de.INK_THICKNESS:i._defaultThickness=t;break;case de.INK_COLOR:i._defaultColor=t;break;case de.INK_OPACITY:i._defaultOpacity=t/100;break}}updateParams(e,t){switch(e){case de.INK_THICKNESS:this.#p(t);break;case de.INK_COLOR:this.#f(t);break;case de.INK_OPACITY:this.#g(t);break}}static get defaultPropertiesToUpdate(){return[[de.INK_THICKNESS,i._defaultThickness],[de.INK_COLOR,i._defaultColor||qe._defaultLineColor],[de.INK_OPACITY,Math.round(i._defaultOpacity*100)]]}get propertiesToUpdate(){return[[de.INK_THICKNESS,this.thickness||i._defaultThickness],[de.INK_COLOR,this.color||i._defaultColor||qe._defaultLineColor],[de.INK_OPACITY,Math.round(100*(this.opacity??i._defaultOpacity))]]}#p(e){let t=r=>{this.thickness=r,this.#k()},n=this.thickness;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#f(e){let t=r=>{this.color=r,this.#A()},n=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#g(e){let t=r=>{this.opacity=r,this.#A()};e/=100;let n=this.opacity;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:de.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(this.#P(),this.#_()),this.isAttachedToDOM||(this.parent.add(this),this.#b()),this.#k()))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#i&&(clearTimeout(this.#i),this.#i=null),this.#h?.disconnect(),this.#h=null,super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&e===null&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){let[e,t]=this.parentDimensions,n=this.width*e,r=this.height*t;this.setDimensions(n,r)}enableEditMode(){this.#r||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.#E())}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.#S())}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}#m(){let{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}}#v(){let{ctx:e,color:t,opacity:n,thickness:r,parentScale:s,scaleFactor:a}=this;e.lineWidth=r*s/a,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${t}${hI(n)}`}#w(e,t){this.canvas.addEventListener("contextmenu",U0,{signal:this._uiManager._signal}),this.#S(),this.#s=new AbortController;let n=this._uiManager.combinedSignal(this.#s);this.canvas.addEventListener("pointerleave",this.canvasPointerleave.bind(this),{signal:n}),this.canvas.addEventListener("pointermove",this.canvasPointermove.bind(this),{signal:n}),this.canvas.addEventListener("pointerup",this.canvasPointerup.bind(this),{signal:n}),this.isEditing=!0,this.#c||(this.#c=!0,this.#b(),this.thickness||=i._defaultThickness,this.color||=i._defaultColor||qe._defaultLineColor,this.opacity??=i._defaultOpacity),this.currentPath.push([e,t]),this.#l=!1,this.#v(),this.#u=()=>{this.#x(),this.#u&&window.requestAnimationFrame(this.#u)},window.requestAnimationFrame(this.#u)}#y(e,t){let[n,r]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&t===r)return;let s=this.currentPath,a=this.#n;if(s.push([e,t]),this.#l=!0,s.length<=2){a.moveTo(...s[0]),a.lineTo(e,t);return}s.length===3&&(this.#n=a=new Path2D,a.moveTo(...s[0])),this.#T(a,...s.at(-3),...s.at(-2),e,t)}#M(){if(this.currentPath.length===0)return;let e=this.currentPath.at(-1);this.#n.lineTo(...e)}#C(e,t){this.#u=null,e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),this.#y(e,t),this.#M();let n;if(this.currentPath.length!==1)n=this.#D();else{let l=[e,t];n=[[l,l.slice(),l.slice(),l]]}let r=this.#n,s=this.currentPath;this.currentPath=[],this.#n=new Path2D;let a=()=>{this.allRawPaths.push(s),this.paths.push(n),this.bezierPath2D.push(r),this._uiManager.rebuild(this)},o=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(this.#P(),this.#_()),this.#k())};this.addCommands({cmd:a,undo:o,mustExec:!0})}#x(){if(!this.#l)return;this.#l=!1;let e=Math.ceil(this.thickness*this.parentScale),t=this.currentPath.slice(-3),n=t.map(h=>h[0]),r=t.map(h=>h[1]),s=Math.min(...n)-e,a=Math.max(...n)+e,o=Math.min(...r)-e,l=Math.max(...r)+e,{ctx:c}=this;c.save(),c.clearRect(0,0,this.canvas.width,this.canvas.height);for(let h of this.bezierPath2D)c.stroke(h);c.stroke(this.#n),c.restore()}#T(e,t,n,r,s,a,o){let l=(t+r)/2,c=(n+s)/2,h=(r+a)/2,d=(s+o)/2;e.bezierCurveTo(l+2*(r-l)/3,c+2*(s-c)/3,h+2*(r-h)/3,d+2*(s-d)/3,h,d)}#D(){let e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];let t=[],n,[r,s]=e[0];for(n=1;n{this.#i=null,this.canvas.removeEventListener("contextmenu",U0)},10),this.#C(e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#P(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#_(){this.#h=new ResizeObserver(e=>{let t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}),this.#h.observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{this.#h?.disconnect(),this.#h=null},{once:!0})}get isResizable(){return!this.isEmpty()&&this.#r}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");let[n,r,s,a]=this.#m();if(this.setAt(n,r,0,0),this.setDims(s,a),this.#P(),this.width){let[o,l]=this.parentDimensions;this.setAspectRatio(this.width*o,this.height*l),this.setAt(e*o,t*l,this.width*o,this.height*l),this.#c=!0,this.#b(),this.setDims(this.width*o,this.height*l),this.#A(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#_(),this.div}#b(){if(!this.#c)return;let[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),this.#z()}setDimensions(e,t){let n=Math.round(e),r=Math.round(t);if(this.#d===n&&this.#a===r)return;this.#d=n,this.#a=r,this.canvas.style.visibility="hidden";let[s,a]=this.parentDimensions;this.width=e/s,this.height=t/a,this.fixAndSetPosition(),this.#r&&this.#V(e,t),this.#b(),this.#A(),this.canvas.style.visibility="visible",this.fixDims()}#V(e,t){let n=this.#I(),r=(e-n)/this.#t,s=(t-n)/this.#e;this.scaleFactor=Math.min(r,s)}#z(){let e=this.#I()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static#R(e){let t=new Path2D;for(let n=0,r=e.length;n`image/${t}`))}static get supportedTypesStr(){return Pe(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(Ce.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(e){let t=e.get("hasAltText");return{hasAltText:t.get(!0)??0,hasNoAltText:t.get(!1)??0}}#a(e,t=!1){if(!e){this.remove();return}this.#e=e.bitmap,t||(this.#t=e.id,this.#o=e.isSvg),e.file&&(this.#s=e.file.name),this.#f()}#u(){if(this.#i=null,this._uiManager.enableWaiting(!1),!!this.#l){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#e){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#e){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}mlGuessAltText(e=null,t=!0){return $(this,null,function*(){if(this.hasAltTextData())return null;let{mlManager:n}=this._uiManager;if(!n)throw new Error("No ML.");if(!(yield n.isEnabledFor("altText")))throw new Error("ML isn't enabled for alt text.");let{data:r,width:s,height:a}=e||this.copyCanvas(null,null,!0).imageData,o=yield n.guess({name:"altText",request:{data:r,width:s,height:a,channels:r.length/(s*a)}});if(!o)throw new Error("No response from the AI service.");if(o.error)throw new Error("Error from the AI service.");if(o.cancel)return null;if(!o.output)throw new Error("No valid response from the AI service.");let l=o.output;return yield this.setGuessedAltText(l),t&&!this.hasAltTextData()&&(this.altTextData={alt:l,decorative:!1}),l})}#p(){if(this.#t){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#t).then(n=>this.#a(n,!0)).finally(()=>this.#u());return}if(this.#n){let n=this.#n;this.#n=null,this._uiManager.enableWaiting(!0),this.#i=this._uiManager.imageManager.getFromUrl(n).then(r=>this.#a(r)).finally(()=>this.#u());return}if(this.#r){let n=this.#r;this.#r=null,this._uiManager.enableWaiting(!0),this.#i=this._uiManager.imageManager.getFromFile(n).then(r=>this.#a(r)).finally(()=>this.#u());return}let e=document.createElement("input");e.type="file",e.accept=i.supportedTypesStr;let t=this._uiManager._signal;this.#i=new Promise(n=>{e.addEventListener("change",()=>$(this,null,function*(){if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);let r=yield this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#a(r)}n()}),{signal:t}),e.addEventListener("cancel",()=>{this.remove(),n()},{signal:t})}).finally(()=>this.#u()),e.click()}remove(){this.#t&&(this.#e=null,this._uiManager.imageManager.deleteId(this.#t),this.#l?.remove(),this.#l=null,this.#c?.disconnect(),this.#c=null,this.#h&&(clearTimeout(this.#h),this.#h=null)),super.remove()}rebuild(){if(!this.parent){this.#t&&this.#p();return}super.rebuild(),this.div!==null&&(this.#t&&this.#l===null&&this.#p(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#i||this.#e||this.#n||this.#r||this.#t)}get isResizable(){return!0}render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),this.#e?this.#f():this.#p(),this.width&&!this.annotationElementId){let[n,r]=this.parentDimensions;this.setAt(e*n,t*r,this.width*n,this.height*r)}return this.div}#f(){let{div:e}=this,{width:t,height:n}=this.#e,[r,s]=this.pageDimensions,a=.75;if(this.width)t=this.width*r,n=this.height*s;else if(t>a*r||n>a*s){let h=Math.min(a*r/t,a*s/n);t*=h,n*=h}let[o,l]=this.parentDimensions;this.setDims(t*o/r,n*l/s),this._uiManager.enableWaiting(!1);let c=this.#l=document.createElement("canvas");c.setAttribute("role","img"),this.addContainer(c),(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),this.#v(t,n),this.#y(),this.#d||(this.parent.addUndoableEditor(this),this.#d=!0),this._reportTelemetry({action:"inserted_image"}),this.#s&&c.setAttribute("aria-label",this.#s)}copyCanvas(e,t,n=!1){e||(e=224);let{width:r,height:s}=this.#e,a=new Mo,o=this.#e,l=r,c=s,h=null;if(t){if(r>t||s>t){let M=Math.min(t/r,t/s);l=Math.floor(r*M),c=Math.floor(s*M)}h=document.createElement("canvas");let u=h.width=Math.ceil(l*a.sx),p=h.height=Math.ceil(c*a.sy);this.#o||(o=this.#m(u,p));let f=h.getContext("2d");f.filter=this._uiManager.hcmFilter;let g="white",y="#cfcfd8";this._uiManager.hcmFilter!=="none"?y="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(g="#8f8f9d",y="#42414d");let x=15,_=x*a.sx,b=x*a.sy,v=new OffscreenCanvas(_*2,b*2),m=v.getContext("2d");m.fillStyle=g,m.fillRect(0,0,_*2,b*2),m.fillStyle=y,m.fillRect(0,0,_,b),m.fillRect(_,b,_,b),f.fillStyle=f.createPattern(v,"repeat"),f.fillRect(0,0,u,p),f.drawImage(o,0,0,o.width,o.height,0,0,u,p)}let d=null;if(n){let u,p;if(a.symmetric&&o.widthe||s>e){let y=Math.min(e/r,e/s);u=Math.floor(r*y),p=Math.floor(s*y),this.#o||(o=this.#m(u,p))}let g=new OffscreenCanvas(u,p).getContext("2d",{willReadFrequently:!0});g.drawImage(o,0,0,o.width,o.height,0,0,u,p),d={width:u,height:p,data:g.getImageData(0,0,u,p).data}}return{canvas:h,width:l,height:c,imageData:d}}#g(e,t){let[n,r]=this.parentDimensions;this.width=e/n,this.height=t/r,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this.#h!==null&&clearTimeout(this.#h);let s=200;this.#h=setTimeout(()=>{this.#h=null,this.#v(e,t)},s)}#m(e,t){let{width:n,height:r}=this.#e,s=n,a=r,o=this.#e;for(;s>2*e||a>2*t;){let l=s,c=a;s>2*e&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2)),a>2*t&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2));let h=new OffscreenCanvas(s,a);h.getContext("2d").drawImage(o,0,0,l,c,0,0,s,a),o=h.transferToImageBitmap()}return o}#v(e,t){let n=new Mo,r=Math.ceil(e*n.sx),s=Math.ceil(t*n.sy),a=this.#l;if(!a||a.width===r&&a.height===s)return;a.width=r,a.height=s;let o=this.#o?this.#e:this.#m(r,s),l=a.getContext("2d");l.filter=this._uiManager.hcmFilter,l.drawImage(o,0,0,o.width,o.height,0,0,r,s)}getImageForAltText(){return this.#l}#w(e){if(e){if(this.#o){let r=this._uiManager.imageManager.getSvgUrl(this.#t);if(r)return r}let t=document.createElement("canvas");return{width:t.width,height:t.height}=this.#e,t.getContext("2d").drawImage(this.#e,0,0),t.toDataURL()}if(this.#o){let[t,n]=this.pageDimensions,r=Math.round(this.width*t*Qi.PDF_TO_CSS_UNITS),s=Math.round(this.height*n*Qi.PDF_TO_CSS_UNITS),a=new OffscreenCanvas(r,s);return a.getContext("2d").drawImage(this.#e,0,0,this.#e.width,this.#e.height,0,0,r,s),a.transferToImageBitmap()}return structuredClone(this.#e)}#y(){this._uiManager._signal&&(this.#c=new ResizeObserver(e=>{let t=e[0].contentRect;t.width&&t.height&&this.#g(t.width,t.height)}),this.#c.observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{this.#c?.disconnect(),this.#c=null},{once:!0}))}static deserialize(e,t,n){return $(this,null,function*(){let r=null;if(e instanceof bh){let{data:{rect:f,rotation:g,id:y,structParent:x,popupRef:_},container:b,parent:{page:{pageNumber:v}}}=e,m=b.querySelector("canvas"),M=n.imageManager.getFromCanvas(b.id,m);m.remove();let L=(yield t._structTree.getAriaAttributes(`${T7}${y}`))?.get("aria-label")||"";r=e={annotationType:Ce.STAMP,bitmapId:M.id,bitmap:M.bitmap,pageIndex:v-1,rect:f.slice(0),rotation:g,id:y,deleted:!1,accessibilityData:{decorative:!1,altText:L},isSvg:!1,structParent:x,popupRef:_}}let s=yield ir(i,this,"deserialize").call(this,e,t,n),{rect:a,bitmap:o,bitmapUrl:l,bitmapId:c,isSvg:h,accessibilityData:d}=e;c&&n.imageManager.isValidId(c)?(s.#t=c,o&&(s.#e=o)):s.#n=l,s.#o=h;let[u,p]=s.pageDimensions;return s.width=(a[2]-a[0])/u,s.height=(a[3]-a[1])/p,s.annotationElementId=e.id||null,d&&(s.altTextData=d),s._initialData=r,s.#d=!!r,s})}serialize(e=!1,t=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let n={annotationType:Ce.STAMP,bitmapId:this.#t,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#o,structTreeParentId:this._structTreeParentId};if(e)return n.bitmapUrl=this.#w(!0),n.accessibilityData=this.serializeAltText(!0),n;let{decorative:r,altText:s}=this.serializeAltText(!1);if(!r&&s&&(n.accessibilityData={type:"Figure",alt:s}),this.annotationElementId){let o=this.#M(n);if(o.isSame)return null;o.isSameAltText?delete n.accessibilityData:n.accessibilityData.structParent=this._initialData.structParent??-1}if(n.id=this.annotationElementId,t===null)return n;t.stamps||=new Map;let a=this.#o?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(!t.stamps.has(this.#t))t.stamps.set(this.#t,{area:a,serialized:n}),n.bitmap=this.#w(!1);else if(this.#o){let o=t.stamps.get(this.#t);a>o.area&&(o.area=a,o.serialized.bitmap.close(),o.serialized.bitmap=this.#w(!1))}return n}#M(e){let{rect:t,pageIndex:n,accessibilityData:{altText:r}}=this._initialData,s=e.rect.every((l,c)=>Math.abs(l-t[c])<1),a=e.pageIndex===n,o=(e.accessibilityData?.alt||"")===r;return{isSame:s&&a&&o,isSameAltText:o}}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}},BI=(()=>{class i{#e;#t=!1;#i=null;#n=null;#r=null;#s=new Map;#l=!1;#c=!1;#h=!1;#o=null;#d=null;#a;static _initialized=!1;static#u=new Map([M7,S7,D7,_h].map(t=>[t._editorType,t]));constructor({uiManager:t,pageIndex:n,div:r,structTreeLayer:s,accessibilityManager:a,annotationLayer:o,drawLayer:l,textLayer:c,viewport:h,l10n:d}){let u=[...i.#u.values()];if(!i._initialized){i._initialized=!0;for(let p of u)p.initialize(d,t)}t.registerEditorTypes(u),this.#a=t,this.pageIndex=n,this.div=r,this.#e=a,this.#i=o,this.viewport=h,this.#o=c,this.drawLayer=l,this._structTree=s,this.#a.addLayer(this)}get isEmpty(){return this.#s.size===0}get isInvisible(){return this.isEmpty&&this.#a.getMode()===Ce.NONE}updateToolbar(t){this.#a.updateToolbar(t)}updateMode(t=this.#a.getMode()){switch(this.#v(),t){case Ce.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case Ce.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case Ce.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:n}=this.div;for(let r of i.#u.values())n.toggle(`${r._type}Editing`,t===r._editorType);this.div.hidden=!1}hasTextLayer(t){return t===this.#o?.div}addInkEditorIfNeeded(t){if(this.#a.getMode()!==Ce.INK)return;if(!t){for(let r of this.#s.values())if(r.isEmpty()){r.setInBackground();return}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(t){this.#a.setEditingState(t)}addCommands(t){this.#a.addCommands(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){this.#i?.div.classList.toggle("disabled",!t)}enable(){return $(this,null,function*(){this.div.tabIndex=0,this.togglePointerEvents(!0);let t=new Set;for(let r of this.#s.values())r.enableEditing(),r.show(!0),r.annotationElementId&&(this.#a.removeChangedExistingAnnotation(r),t.add(r.annotationElementId));if(!this.#i)return;let n=this.#i.getEditableAnnotations();for(let r of n){if(r.hide(),this.#a.isDeletedAnnotationElement(r.data.id)||t.has(r.data.id))continue;let s=yield this.deserialize(r);s&&(this.addOrRebuild(s),s.enableEditing())}})}disable(){this.#h=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1);let t=new Map,n=new Map;for(let s of this.#s.values())if(s.disableEditing(),!!s.annotationElementId){if(s.serialize()!==null){t.set(s.annotationElementId,s);continue}else n.set(s.annotationElementId,s);this.getEditableAnnotation(s.annotationElementId)?.show(),s.remove()}if(this.#i){let s=this.#i.getEditableAnnotations();for(let a of s){let{id:o}=a.data;if(this.#a.isDeletedAnnotationElement(o))continue;let l=n.get(o);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=t.get(o),l&&(this.#a.addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}this.#v(),this.isEmpty&&(this.div.hidden=!0);let{classList:r}=this.div;for(let s of i.#u.values())r.remove(`${s._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#h=!1}getEditableAnnotation(t){return this.#i?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#a.getActive()!==t&&this.#a.setActiveEditor(t)}enableTextSelection(){if(this.div.tabIndex=-1,this.#o?.div&&!this.#d){this.#d=new AbortController;let t=this.#a.combinedSignal(this.#d);this.#o.div.addEventListener("pointerdown",this.#p.bind(this),{signal:t}),this.#o.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#o?.div&&this.#d&&(this.#d.abort(),this.#d=null,this.#o.div.classList.remove("highlighting"))}#p(t){this.#a.unselectAll();let{target:n}=t;if(n===this.#o.div||(n.getAttribute("role")==="img"||n.classList.contains("endOfContent"))&&this.#o.div.contains(n)){let{isMac:r}=It.platform;if(t.button!==0||t.ctrlKey&&r)return;this.#a.showAllEditors("highlight",!0,!0),this.#o.div.classList.add("free"),this.toggleDrawing(),_h.startHighlighting(this,this.#a.direction==="ltr",{target:this.#o.div,x:t.x,y:t.y}),this.#o.div.addEventListener("pointerup",()=>{this.#o.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#a._signal}),t.preventDefault()}}enableClick(){if(this.#n)return;this.#n=new AbortController;let t=this.#a.combinedSignal(this.#n);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t}),this.div.addEventListener("pointerup",this.pointerup.bind(this),{signal:t})}disableClick(){this.#n?.abort(),this.#n=null}attach(t){this.#s.set(t.id,t);let{annotationElementId:n}=t;n&&this.#a.isDeletedAnnotationElement(n)&&this.#a.removeDeletedAnnotationElement(t)}detach(t){this.#s.delete(t.id),this.#e?.removePointerInTextLayer(t.contentDiv),!this.#h&&t.annotationElementId&&this.#a.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#a.removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1,this.#c||this.addInkEditorIfNeeded(!1)}changeParent(t){t.parent!==this&&(t.parent&&t.annotationElementId&&(this.#a.addDeletedAnnotationElement(t.annotationElementId),qe.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),this.#a.addEditor(t),this.attach(t),!t.isAttachedToDOM){let n=t.render();this.div.append(n),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(),this.#a.addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;let{activeElement:n}=document;t.div.contains(n)&&!this.#r&&(t._focusEventsAllowed=!1,this.#r=setTimeout(()=>{this.#r=null,t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this.#a._signal}),n.focus())},0)),t._structTreeParentId=this.#e?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||=this,t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){let n=()=>t._uiManager.rebuild(t),r=()=>{t.remove()};this.addCommands({cmd:n,undo:r,mustExec:!1})}getNextId(){return this.#a.getId()}get#f(){return i.#u.get(this.#a.getMode())}combinedSignal(t){return this.#a.combinedSignal(t)}#g(t){let n=this.#f;return n?new n.prototype.constructor(t):null}canCreateNewEmptyEditor(){return this.#f?.canCreateNewEmptyEditor()}pasteEditor(t,n){this.#a.updateToolbar(t),this.#a.updateMode(t);let{offsetX:r,offsetY:s}=this.#m(),a=this.getNextId(),o=this.#g(Z({parent:this,id:a,x:r,y:s,uiManager:this.#a,isCentered:!0},n));o&&this.add(o)}deserialize(t){return $(this,null,function*(){return(yield i.#u.get(t.annotationType??t.annotationEditorType)?.deserialize(t,this,this.#a))||null})}createAndAddNewEditor(t,n,r={}){let s=this.getNextId(),a=this.#g(Z({parent:this,id:s,x:t.offsetX,y:t.offsetY,uiManager:this.#a,isCentered:n},r));return a&&this.add(a),a}#m(){let{x:t,y:n,width:r,height:s}=this.div.getBoundingClientRect(),a=Math.max(0,t),o=Math.max(0,n),l=Math.min(window.innerWidth,t+r),c=Math.min(window.innerHeight,n+s),h=(a+l)/2-t,d=(o+c)/2-n,[u,p]=this.viewport.rotation%180===0?[h,d]:[d,h];return{offsetX:u,offsetY:p}}addNewEditor(){this.createAndAddNewEditor(this.#m(),!0)}setSelected(t){this.#a.setSelected(t)}toggleSelected(t){this.#a.toggleSelected(t)}unselect(t){this.#a.unselect(t)}pointerup(t){let{isMac:n}=It.platform;if(!(t.button!==0||t.ctrlKey&&n)&&t.target===this.div&&this.#l){if(this.#l=!1,!this.#t){this.#t=!0;return}if(this.#a.getMode()===Ce.STAMP){this.#a.unselectAll();return}this.createAndAddNewEditor(t,!1)}}pointerdown(t){if(this.#a.getMode()===Ce.HIGHLIGHT&&this.enableTextSelection(),this.#l){this.#l=!1;return}let{isMac:n}=It.platform;if(t.button!==0||t.ctrlKey&&n||t.target!==this.div)return;this.#l=!0;let r=this.#a.getActive();this.#t=!r||r.isEmpty()}findNewParent(t,n,r){let s=this.#a.findParent(n,r);return s===null||s===this?!1:(s.changeParent(t),!0)}destroy(){this.#a.getActive()?.parent===this&&(this.#a.commitOrRemove(),this.#a.setActiveEditor(null)),this.#r&&(clearTimeout(this.#r),this.#r=null);for(let t of this.#s.values())this.#e?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#s.clear(),this.#a.removeLayer(this)}#v(){this.#c=!0;for(let t of this.#s.values())t.isEmpty()&&t.remove();this.#c=!1}render({viewport:t}){this.viewport=t,Wn(this.div,t);for(let n of this.#a.getEditors(this.pageIndex))this.add(n),n.rebuild();this.updateMode()}update({viewport:t}){this.#a.commitOrRemove(),this.#v();let n=this.viewport.rotation,r=t.rotation;if(this.viewport=t,Wn(this.div,{rotation:r}),n!==r)for(let s of this.#s.values())s.rotate(r);this.addInkEditorIfNeeded(!1)}get pageDimensions(){let{pageWidth:t,pageHeight:n}=this.viewport.rawDims;return[t,n]}get scale(){return this.#a.viewParameters.realScale}}return i})(),E7=class i{#e=null;#t=0;#i=new Map;#n=new Map;constructor({pageIndex:e}){this.pageIndex=e}setParent(e){if(!this.#e){this.#e=e;return}if(this.#e!==e){if(this.#i.size>0)for(let t of this.#i.values())t.remove(),e.append(t);this.#e=e}}static get _svgFactory(){return Pe(this,"_svgFactory",new Vo)}static#r(e,{x:t=0,y:n=0,width:r=1,height:s=1}={}){let{style:a}=e;a.top=`${100*n}%`,a.left=`${100*t}%`,a.width=`${100*r}%`,a.height=`${100*s}%`}#s(e){let t=i._svgFactory.create(1,1,!0);return this.#e.append(t),t.setAttribute("aria-hidden",!0),i.#r(t,e),t}#l(e,t){let n=i._svgFactory.createElement("clipPath");e.append(n);let r=`clip_${t}`;n.setAttribute("id",r),n.setAttribute("clipPathUnits","objectBoundingBox");let s=i._svgFactory.createElement("use");return n.append(s),s.setAttribute("href",`#${t}`),s.classList.add("clip"),r}draw(e,t,n,r=!1){let s=this.#t++,a=this.#s(e.box);a.classList.add(...e.classNamesForDrawing);let o=i._svgFactory.createElement("defs");a.append(o);let l=i._svgFactory.createElement("path");o.append(l);let c=`path_p${this.pageIndex}_${s}`;l.setAttribute("id",c),l.setAttribute("d",e.toSVGPath()),r&&this.#n.set(s,l);let h=this.#l(o,c),d=i._svgFactory.createElement("use");return a.append(d),a.setAttribute("fill",t),a.setAttribute("fill-opacity",n),d.setAttribute("href",`#${c}`),this.#i.set(s,a),{id:s,clipPathId:`url(#${h})`}}drawOutline(e){let t=this.#t++,n=this.#s(e.box);n.classList.add(...e.classNamesForOutlining);let r=i._svgFactory.createElement("defs");n.append(r);let s=i._svgFactory.createElement("path");r.append(s);let a=`path_p${this.pageIndex}_${t}`;s.setAttribute("id",a),s.setAttribute("d",e.toSVGPath()),s.setAttribute("vector-effect","non-scaling-stroke");let o;if(e.mustRemoveSelfIntersections){let h=i._svgFactory.createElement("mask");r.append(h),o=`mask_p${this.pageIndex}_${t}`,h.setAttribute("id",o),h.setAttribute("maskUnits","objectBoundingBox");let d=i._svgFactory.createElement("rect");h.append(d),d.setAttribute("width","1"),d.setAttribute("height","1"),d.setAttribute("fill","white");let u=i._svgFactory.createElement("use");h.append(u),u.setAttribute("href",`#${a}`),u.setAttribute("stroke","none"),u.setAttribute("fill","black"),u.setAttribute("fill-rule","nonzero"),u.classList.add("mask")}let l=i._svgFactory.createElement("use");n.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);let c=l.cloneNode();return n.append(c),l.classList.add("mainOutline"),c.classList.add("secondaryOutline"),this.#i.set(t,n),t}finalizeLine(e,t){let n=this.#n.get(e);this.#n.delete(e),this.updateBox(e,t.box),n.setAttribute("d",t.toSVGPath())}updateLine(e,t){this.#i.get(e).firstChild.firstChild.setAttribute("d",t.toSVGPath())}updatePath(e,t){this.#n.get(e).setAttribute("d",t.toSVGPath())}updateBox(e,t){i.#r(this.#i.get(e),t)}show(e,t){this.#i.get(e).classList.toggle("hidden",!t)}rotate(e,t){this.#i.get(e).setAttribute("data-main-rotation",t)}changeColor(e,t){this.#i.get(e).setAttribute("fill",t)}changeOpacity(e,t){this.#i.get(e).setAttribute("fill-opacity",t)}addClass(e,t){this.#i.get(e).classList.add(t)}removeClass(e,t){this.#i.get(e).classList.remove(t)}getSVGRoot(e){return this.#i.get(e)}remove(e){this.#n.delete(e),this.#e!==null&&(this.#i.get(e).remove(),this.#i.delete(e))}destroy(){this.#e=null;for(let e of this.#i.values())e.remove();this.#i.clear(),this.#n.clear()}};var NI=ge.AbortException,ZI=ge.AnnotationEditorLayer,jI=ge.AnnotationEditorParamsType,F7=ge.AnnotationEditorType,UI=ge.AnnotationEditorUIManager,$I=ge.AnnotationLayer,qI=ge.AnnotationMode,GI=ge.ColorPicker,WI=ge.DOMSVGFactory,XI=ge.DrawLayer,YI=ge.FeatureTest,R7=ge.GlobalWorkerOptions,KI=ge.ImageKind,QI=ge.InvalidPDFException,JI=ge.MissingPDFException,eB=ge.OPS,tB=ge.OutputScale,iB=ge.PDFDataRangeTransport,nB=ge.PDFDateString,rB=ge.PDFWorker,sB=ge.PasswordResponses,aB=ge.PermissionFlag,oB=ge.PixelsPerInch,lB=ge.RenderingCancelledException,cB=ge.TextLayer,hB=ge.UnexpectedResponseException,dB=ge.Util,O7=ge.VerbosityLevel,uB=ge.XfaLayer,fB=ge.build,pB=ge.createValidAbsoluteUrl,gB=ge.fetchData,I7=ge.getDocument,vB=ge.getFilenameFromUrl,mB=ge.getPdfFilenameFromUrl,wB=ge.getXfaPageViewport,bB=ge.isDataScheme,yB=ge.isPdfFile,CB=ge.noContextMenu,xB=ge.normalizeUnicode,MB=ge.setLayerDimensions,AB=ge.shadow,ko=ge.version;var Dp={};Hp(Dp,{AnnotationLayerBuilder:()=>dZ,DownloadManager:()=>uZ,EventBus:()=>fZ,FindState:()=>pZ,GenericL10n:()=>xp,LinkTarget:()=>er,PDFFindController:()=>Mp,PDFHistory:()=>gZ,PDFLinkService:()=>Ap,PDFPageView:()=>vZ,PDFScriptingManager:()=>mZ,PDFSinglePageViewer:()=>_p,PDFViewer:()=>Sp,ProgressBar:()=>wZ,RenderingStates:()=>bZ,ScrollMode:()=>yZ,SimpleLinkService:()=>CZ,SpreadMode:()=>xZ,StructTreeLayerBuilder:()=>MZ,TextLayerBuilder:()=>AZ,XfaLayerBuilder:()=>_Z,parseQueryString:()=>SZ});var Fo={};Fo.d=(i,e)=>{for(var t in e)Fo.o(e,t)&&!Fo.o(i,t)&&Object.defineProperty(i,t,{enumerable:!0,get:e[t]})};Fo.o=(i,e)=>Object.prototype.hasOwnProperty.call(i,e);var lt=globalThis.pdfjsViewer={};Fo.d(lt,{AnnotationLayerBuilder:()=>Zh,DownloadManager:()=>Q7,EventBus:()=>jh,FindState:()=>en,GenericL10n:()=>Ss,LinkTarget:()=>Kn,PDFFindController:()=>Y7,PDFHistory:()=>cp,PDFLinkService:()=>Bh,PDFPageView:()=>Xh,PDFScriptingManager:()=>wp,PDFSinglePageViewer:()=>Cp,PDFViewer:()=>Yh,ProgressBar:()=>X7,RenderingStates:()=>ut,ScrollMode:()=>Fe,SimpleLinkService:()=>Io,SpreadMode:()=>Gt,StructTreeLayerBuilder:()=>qh,TextLayerBuilder:()=>Gh,XfaLayerBuilder:()=>Wh,parseQueryString:()=>Kh});var _B="auto",n_=1,AA=1.1,SB=.1,DB=10,B7=0,EB=1.25,_A=40,SA=5,ut={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},Ms={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};var O1={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2},Fe={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},Gt={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};function r_(i,e,t=!1){let n=i.offsetParent;if(!n){console.error("offsetParent is not set -- cannot scroll");return}let r=i.offsetTop+i.clientTop,s=i.offsetLeft+i.clientLeft;for(;n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||t&&(n.classList.contains("markedContent")||getComputedStyle(n).overflow==="hidden");)if(r+=n.offsetTop,s+=n.offsetLeft,n=n.offsetParent,!n)return;e&&(e.top!==void 0&&(r+=e.top),e.left!==void 0&&(s+=e.left,n.scrollLeft=s)),n.scrollTop=r}function VB(i,e,t=void 0){let n=function(a){s||(s=window.requestAnimationFrame(function(){s=null;let l=i.scrollLeft,c=r.lastX;l!==c&&(r.right=l>c),r.lastX=l;let h=i.scrollTop,d=r.lastY;h!==d&&(r.down=h>d),r.lastY=h,e(r)}))},r={right:!0,down:!0,lastX:i.scrollLeft,lastY:i.scrollTop,_eventHandler:n},s=null;return i.addEventListener("scroll",n,{useCapture:!0,signal:t}),t?.addEventListener("abort",()=>window.cancelAnimationFrame(s),{once:!0}),r}function Kh(i){let e=new Map;for(let[t,n]of new URLSearchParams(i))e.set(t.toLowerCase(),n);return e}var DA=/[\x00-\x1F]/g;function Ro(i,e=!1){return DA.test(i)?e?i.replaceAll(DA,t=>t==="\0"?"":" "):i.replaceAll("\0",""):i}function Oo(i,e,t=0){let n=t,r=i.length-1;if(r<0||!e(i[r]))return i.length;if(e(i[n]))return n;for(;n>1,a=i[s];e(a)?r=s:n=s+1}return n}function EA(i){if(Math.floor(i)===i)return[i,1];let e=1/i,t=8;if(e>t)return[1,t];if(Math.floor(e)===e)return[1,e];let n=i>1?e:i,r=0,s=1,a=1,o=1;for(;;){let c=r+a,h=s+o;if(h>t)break;n<=c/h?(a=c,o=h):(r=c,s=h)}let l;return n-r/s=t&&(n=e[i-1].div,r=n.offsetTop+n.clientTop);for(let s=i-2;s>=0&&(n=e[s].div,!(n.offsetTop+n.clientTop+n.clientHeight<=r));--s)i=s;return i}function LB({scrollEl:i,views:e,sortByVisibility:t=!1,horizontal:n=!1,rtl:r=!1}){let s=i.scrollTop,a=s+i.clientHeight,o=i.scrollLeft,l=o+i.clientWidth;function c(_){let b=_.div;return b.offsetTop+b.clientTop+b.clientHeight>s}function h(_){let b=_.div,v=b.offsetLeft+b.clientLeft,m=v+b.clientWidth;return r?vo}let d=[],u=new Set,p=e.length,f=Oo(e,n?h:c);f>0&&f=a&&(g=A);else if((n?m:M)>g)break;if(A<=s||M>=a||E<=o||m>=l)continue;let P=Math.max(0,s-M)+Math.max(0,A-a),O=Math.max(0,o-m)+Math.max(0,E-l),G=(w-P)/w,K=(L-O)/L,te=G*K*100|0;d.push({id:b.id,x:m,y:M,view:b,percent:te,widthPercent:K*100|0}),u.add(b.id)}let y=d[0],x=d.at(-1);return t&&d.sort(function(_,b){let v=_.percent-b.percent;return Math.abs(v)>.001?-v:_.id-b.id}),{first:y,last:x,views:d,ids:u}}function s_(i){return Number.isInteger(i)&&i%90===0}function zB(i){return Number.isInteger(i)&&Object.values(Fe).includes(i)&&i!==Fe.UNKNOWN}function PB(i){return Number.isInteger(i)&&Object.values(Gt).includes(i)&&i!==Gt.UNKNOWN}function VA(i){return i.width<=i.height}var xte=new Promise(function(i){window.requestAnimationFrame(i)}),kB=document.documentElement.style;function HB(i,e,t){return Math.min(Math.max(i,e),t)}var X7=class{#e=null;#t=null;#i=0;#n=null;#r=!0;constructor(e){this.#e=e.classList,this.#n=e.style}get percent(){return this.#i}set percent(e){if(this.#i=HB(e,0,100),isNaN(e)){this.#e.add("indeterminate");return}this.#e.remove("indeterminate"),this.#n.setProperty("--progressBar-percent",`${this.#i}%`)}setWidth(e){if(!e)return;let n=e.parentNode.offsetWidth-e.offsetWidth;n>0&&this.#n.setProperty("--progressBar-end-offset",`${n}px`)}setDisableAutoFetch(e=5e3){this.#i===100||isNaN(this.#i)||(this.#t&&clearTimeout(this.#t),this.show(),this.#t=setTimeout(()=>{this.#t=null,this.hide()},e))}hide(){this.#r&&(this.#r=!1,this.#e.add("hidden"))}show(){this.#r||(this.#r=!0,this.#e.remove("hidden"))}};function FB(i){let e=Fe.VERTICAL,t=Gt.NONE;switch(i){case"SinglePage":e=Fe.PAGE;break;case"OneColumn":break;case"TwoPageLeft":e=Fe.PAGE;case"TwoColumnLeft":t=Gt.ODD;break;case"TwoPageRight":e=Fe.PAGE;case"TwoColumnRight":t=Gt.EVEN;break}return{scrollMode:e,spreadMode:t}}var kh=function(){let i=document.createElement("div");return i.style.width="round(down, calc(1.6666666666666665 * 792px), 1px)",i.style.width==="calc(1320px)"?Math.fround:e=>e}(),o1={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};function RB(i){return i<11904}function OB(i){return(i&65408)===0}function IB(i){return i>=97&&i<=122||i>=65&&i<=90}function BB(i){return i>=48&&i<=57}function NB(i){return i===32||i===9||i===13||i===10}function ZB(i){return i>=13312&&i<=40959||i>=63744&&i<=64255}function jB(i){return i>=12448&&i<=12543}function UB(i){return i>=12352&&i<=12447}function $B(i){return i>=65376&&i<=65439}function qB(i){return(i&65408)===3584}function Hh(i){return RB(i)?OB(i)?NB(i)?o1.SPACE:IB(i)||BB(i)||i===95?o1.ALPHA_LETTER:o1.PUNCT:qB(i)?o1.THAI_LETTER:i===160?o1.SPACE:o1.ALPHA_LETTER:ZB(i)?o1.HAN_LETTER:jB(i)?o1.KATAKANA_LETTER:UB(i)?o1.HIRAGANA_LETTER:$B(i)?o1.HALFWIDTH_KATAKANA_LETTER:o1.ALPHA_LETTER}var TA;function GB(){return TA||="\xA0\xA8\xAA\xAF\xB2-\xB5\xB8-\xBA\xBC-\xBE\u0132-\u0133\u013F-\u0140\u0149\u017F\u01C4-\u01CC\u01F1-\u01F3\u02B0-\u02B8\u02D8-\u02DD\u02E0-\u02E4\u0374\u037A\u037E\u0384-\u0385\u0387\u03D0-\u03D6\u03F0-\u03F2\u03F4-\u03F5\u03F9\u0587\u0675-\u0678\u0958-\u095F\u09DC-\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B5C-\u0B5D\u0E33\u0EB3\u0EDC-\u0EDD\u0F0C\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u10FC\u1D2C-\u1D2E\u1D30-\u1D3A\u1D3C-\u1D4D\u1D4F-\u1D6A\u1D78\u1D9B-\u1DBF\u1E9A-\u1E9B\u1F71\u1F73\u1F75\u1F77\u1F79\u1F7B\u1F7D\u1FBB\u1FBD-\u1FC1\u1FC9\u1FCB\u1FCD-\u1FCF\u1FD3\u1FDB\u1FDD-\u1FDF\u1FE3\u1FEB\u1FED-\u1FEF\u1FF9\u1FFB\u1FFD-\u1FFE\u2000-\u200A\u2011\u2017\u2024-\u2026\u202F\u2033-\u2034\u2036-\u2037\u203C\u203E\u2047-\u2049\u2057\u205F\u2070-\u2071\u2074-\u208E\u2090-\u209C\u20A8\u2100-\u2103\u2105-\u2107\u2109-\u2113\u2115-\u2116\u2119-\u211D\u2120-\u2122\u2124\u2126\u2128\u212A-\u212D\u212F-\u2131\u2133-\u2139\u213B-\u2140\u2145-\u2149\u2150-\u217F\u2189\u222C-\u222D\u222F-\u2230\u2329-\u232A\u2460-\u24EA\u2A0C\u2A74-\u2A76\u2ADC\u2C7C-\u2C7D\u2D6F\u2E9F\u2EF3\u2F00-\u2FD5\u3000\u3036\u3038-\u303A\u309B-\u309C\u309F\u30FF\u3131-\u318E\u3192-\u319F\u3200-\u321E\u3220-\u3247\u3250-\u327E\u3280-\u33FF\uA69C-\uA69D\uA770\uA7F2-\uA7F4\uA7F8-\uA7F9\uAB5C-\uAB5F\uAB69\uF900-\uFA0D\uFA10\uFA12\uFA15-\uFA1E\uFA20\uFA22\uFA25-\uFA26\uFA2A-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE10-\uFE19\uFE30-\uFE44\uFE47-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE72\uFE74\uFE76-\uFEFC\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6",TA}var en={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},WB=250,XB=-50,YB=-400,LA={"\u2010":"-","\u2018":"'","\u2019":"'","\u201A":"'","\u201B":"'","\u201C":'"',"\u201D":'"',"\u201E":'"',"\u201F":'"',"\xBC":"1/4","\xBD":"1/2","\xBE":"3/4"},zA=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]),PA,KB=new RegExp("\\p{M}+","gu"),QB=new RegExp("([.*+?^${}()|[\\]\\\\])|(\\p{P})|(\\s+)|(\\p{M})|(\\p{L})","gu"),JB=new RegExp("([^\\p{M}])\\p{M}*$","u"),eN=new RegExp("^\\p{M}*([^\\p{M}])","u"),tN=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,kA=new Map,iN="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",HA=new Map,N7=null,Z7=null;function j7(i){let e=[],t;for(;(t=tN.exec(i))!==null;){let{index:p}=t;for(let f of t[0]){let g=kA.get(f);g||(g=f.normalize("NFD").length,kA.set(f,g)),e.push([g,p++])}}let n;if(e.length===0&&N7)n=N7;else if(e.length>0&&Z7)n=Z7;else{let p=Object.keys(LA).join(""),f=GB(),_=`([${p}])|([${f}])|((?:\u3099|\u309A)\\n)|(\\p{M}+(?:-\\n)?)|(\\p{Ll}-\\n\\p{Lu})|(\\S-\\n)|((?:\\p{Ideographic}|[\u3040-\u30FF])\\n)|(\\n)`;e.length===0?n=N7=new RegExp(_+"|(\\u0000)","gum"):n=Z7=new RegExp(_+`|(${iN})`,"gum")}let r=[];for(;(t=KB.exec(i))!==null;)r.push([t[0].length,t.index]);let s=i.normalize("NFD"),a=[[0,0]],o=0,l=0,c=0,h=0,d=0,u=!1;return s=s.replace(n,(p,f,g,y,x,_,b,v,m,M,L)=>{if(L-=h,f){let w=LA[f],E=w.length;for(let A=1;Ah[0]>=n);i[s][0]>n&&--s;let a=Oo(i,h=>h[0]>=r,s);i[a][0]>r&&--a;let o=n+i[s][1],c=r+i[a][1]+1-o;return[o,c]}var Y7=class{#e=null;#t=!0;#i=0;constructor({linkService:e,eventBus:t,updateMatchesCountOnProgress:n=!0}){this._linkService=e,this._eventBus=t,this.#t=n,this.onIsPageVisible=null,this.#r(),t._on("find",this.#n.bind(this)),t._on("findbarclose",this.#w.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this.#e}setDocument(e){this._pdfDocument&&this.#r(),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}#n(e){if(!e)return;let t=this._pdfDocument,{type:n}=e;(this.#e===null||this.#l(e))&&(this._dirtyMatch=!0),this.#e=e,n!=="highlightallchange"&&this.#C(en.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||t&&this._pdfDocument!==t)return;this.#d();let r=!this._highlightMatches,s=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),n?this._dirtyMatch?this.#p():n==="again"?(this.#p(),r&&this.#e.highlightAll&&this.#u()):n==="highlightallchange"?(s?this.#p():this._highlightMatches=!0,this.#u()):this.#p():this._findTimeout=setTimeout(()=>{this.#p(),this._findTimeout=null},WB)})}scrollMatchIntoView({element:e=null,selectedLeft:t=0,pageIndex:n=-1,matchIndex:r=-1}){if(!this._scrollMatches||!e)return;if(r===-1||r!==this._selected.matchIdx)return;if(n===-1||n!==this._selected.pageIdx)return;this._scrollMatches=!1;let s={top:XB,left:t+YB};r_(e,s,!0)}#r(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this.#i=0,this.#e=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=Promise.withResolvers()}get#s(){let{query:e}=this.#e;return typeof e=="string"?(e!==this._rawQuery&&(this._rawQuery=e,[this._normalizedQuery]=j7(e)),this._normalizedQuery):(e||[]).filter(t=>!!t).map(t=>j7(t)[0])}#l(e){let t=e.query,n=this.#e.query,r=typeof t;if(r!==typeof n)return!0;if(r==="string"){if(t!==n)return!0}else if(JSON.stringify(t)!==JSON.stringify(n))return!0;switch(e.type){case"again":let a=this._selected.pageIdx+1,o=this._linkService;return a>=1&&a<=o.pagesCount&&a!==o.page&&!(this.onIsPageVisible?.(a)??!0);case"highlightallchange":return!1}return!0}#c(e,t,n){let r=e.slice(0,t).match(JB);if(r){let s=e.charCodeAt(t),a=r[1].charCodeAt(0);if(Hh(s)===Hh(a))return!1}if(r=e.slice(t+n).match(eN),r){let s=e.charCodeAt(t+n-1),a=r[1].charCodeAt(0);if(Hh(s)===Hh(a))return!1}return!0}#h(e,t){let{matchDiacritics:n}=this.#e,r=!1;e=e.replaceAll(QB,(a,o,l,c,h,d)=>o?`[ ]*\\${o}[ ]*`:l?`[ ]*${l}[ ]*`:c?"[ ]+":n?h||d:h?zA.has(h.charCodeAt(0))?h:"":t?(r=!0,`${d}\\p{M}*`):d);let s="[ ]*";return e.endsWith(s)&&(e=e.slice(0,e.length-s.length)),n&&t&&(PA||=String.fromCharCode(...zA),r=!0,e=`${e}(?=[${PA}]|[^\\p{M}]|$)`),[r,e]}#o(e){let t=this.#s;if(t.length===0)return;let n=this._pageContents[e],r=this.match(t,n,e),s=this._pageMatches[e]=[],a=this._pageMatchesLength[e]=[],o=this._pageDiffs[e];r?.forEach(({index:c,length:h})=>{let[d,u]=nN(o,c,h);u&&(s.push(d),a.push(u))}),this.#e.highlightAll&&this.#a(e),this._resumePageIdx===e&&(this._resumePageIdx=null,this.#g());let l=s.length;this._matchesCountTotal+=l,this.#t?l>0&&this.#M():++this.#i===this._linkService.pagesCount&&this.#M()}match(e,t,n){let r=this._hasDiacritics[n],s=!1;if(typeof e=="string"?[s,e]=this.#h(e,r):e=e.sort().reverse().map(d=>{let[u,p]=this.#h(d,r);return s||=u,`(${p})`}).join("|"),!e)return;let{caseSensitive:a,entireWord:o}=this.#e,l=`g${s?"u":""}${a?"":"i"}`;e=new RegExp(e,l);let c=[],h;for(;(h=e.exec(t))!==null;)o&&!this.#c(t,h.index,h[0].length)||c.push({index:h.index,length:h[0].length});return c}#d(){if(this._extractTextPromises.length>0)return;let e=Promise.resolve(),t={disableNormalization:!0};for(let n=0,r=this._linkService.pagesCount;nthis._pdfDocument.getPage(n+1).then(o=>o.getTextContent(t)).then(o=>{let l=[];for(let c of o.items)l.push(c.str),c.hasEOL&&l.push(` `);[this._pageContents[n],this._pageDiffs[n],this._hasDiacritics[n]]=j7(l.join("")),a()},o=>{console.error(`Unable to get text content for page ${n+1}`,o),this._pageContents[n]="",this._pageDiffs[n]=null,this._hasDiacritics[n]=!1,a()}))}}#a(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}#u(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}#p(){let e=this.#e.findPrevious,t=this._linkService.page-1,n=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=t,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this.#i=0,this._matchesCountTotal=0,this.#u();for(let a=0;a{this._pendingFindMatches.delete(a),this.#o(a)}))}if(this.#s.length===0){this.#C(en.FOUND);return}if(this._resumePageIdx)return;let s=this._offset;if(this._pagesToSearch=n,s.matchIdx!==null){let a=this._pageMatches[s.pageIdx].length;if(!e&&s.matchIdx+10){s.matchIdx=e?s.matchIdx-1:s.matchIdx+1,this.#v(!0);return}this.#m(e)}this.#g()}#f(e){let t=this._offset,n=e.length,r=this.#e.findPrevious;return n?(t.matchIdx=r?n-1:0,this.#v(!0),!0):(this.#m(r),t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0)?(this.#v(!1),!0):!1)}#g(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");let e=null;do{let t=this._offset.pageIdx;if(e=this._pageMatches[t],!e){this._resumePageIdx=t;break}}while(!this.#f(e))}#m(e){let t=this._offset,n=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=n||t.pageIdx<0)&&(t.pageIdx=e?n-1:0,t.wrapped=!0)}#v(e=!1){let t=en.NOT_FOUND,n=this._offset.wrapped;if(this._offset.wrapped=!1,e){let r=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=n?en.WRAPPED:en.FOUND,r!==-1&&r!==this._selected.pageIdx&&this.#a(r)}this.#C(t,this.#e.findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,this.#a(this._selected.pageIdx))}#w(e){let t=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||t&&this._pdfDocument!==t||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this.#C(en.FOUND),this._highlightMatches=!1,this.#u())})}#y(){let{pageIdx:e,matchIdx:t}=this._selected,n=0,r=this._matchesCountTotal;if(t!==-1){for(let s=0;sr)&&(n=r=0),{current:n,total:r}}#M(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this.#y()})}#C(e,t=!1){!this.#t&&(this.#i!==this._linkService.pagesCount||e===en.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,entireWord:this.#e?.entireWord??null,matchesCount:this.#y(),rawQuery:this.#e?.query??null})}},rN="noopener noreferrer nofollow",Kn={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},Bh=class i{externalLinkEnabled=!0;constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:n=null,ignoreDestinationZoom:r=!1}={}){this.eventBus=e,this.externalLinkTarget=t,this.externalLinkRel=n,this._ignoreDestinationZoom=r,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(e,t=null){this.baseUrl=t,this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfDocument?this.pdfViewer.currentPageNumber:1}set page(e){this.pdfDocument&&(this.pdfViewer.currentPageNumber=e)}get rotation(){return this.pdfDocument?this.pdfViewer.pagesRotation:0}set rotation(e){this.pdfDocument&&(this.pdfViewer.pagesRotation=e)}get isInPresentationMode(){return this.pdfDocument?this.pdfViewer.isInPresentationMode:!1}goToDestination(e){return $(this,null,function*(){if(!this.pdfDocument)return;let t,n,r;if(typeof e=="string"?(t=e,n=yield this.pdfDocument.getDestination(e)):(t=null,n=yield e),!Array.isArray(n)){console.error(`goToDestination: "${n}" is not a valid destination array, for dest="${e}".`);return}let[s]=n;if(s&&typeof s=="object"){if(r=this.pdfDocument.cachedPageNumber(s),!r)try{r=(yield this.pdfDocument.getPageIndex(s))+1}catch{console.error(`goToDestination: "${s}" is not a valid page reference, for dest="${e}".`);return}}else Number.isInteger(s)&&(r=s+1);if(!r||r<1||r>this.pagesCount){console.error(`goToDestination: "${r}" is not a valid page number, for dest="${e}".`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:t,explicitDest:n,pageNumber:r})),this.pdfViewer.scrollPageIntoView({pageNumber:r,destArray:n,ignoreDestinationZoom:this._ignoreDestinationZoom})})}goToPage(e){if(!this.pdfDocument)return;let t=typeof e=="string"&&this.pdfViewer.pageLabelToPageNumber(e)||e|0;if(!(Number.isInteger(t)&&t>0&&t<=this.pagesCount)){console.error(`PDFLinkService.goToPage: "${e}" is not a valid page.`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(t)),this.pdfViewer.scrollPageIntoView({pageNumber:t})}addLinkAttributes(e,t,n=!1){if(!t||typeof t!="string")throw new Error('A valid "url" parameter must provided.');let r=n?Kn.BLANK:this.externalLinkTarget,s=this.externalLinkRel;this.externalLinkEnabled?e.href=e.title=t:(e.href="",e.title=`Disabled: ${t}`,e.onclick=()=>!1);let a="";switch(r){case Kn.NONE:break;case Kn.SELF:a="_self";break;case Kn.BLANK:a="_blank";break;case Kn.PARENT:a="_parent";break;case Kn.TOP:a="_top";break}e.target=a,e.rel=typeof s=="string"?s:rN}getDestinationHash(e){if(typeof e=="string"){if(e.length>0)return this.getAnchorUrl("#"+escape(e))}else if(Array.isArray(e)){let t=JSON.stringify(e);if(t.length>0)return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return this.baseUrl?this.baseUrl+e:e}setHash(e){if(!this.pdfDocument)return;let t,n;if(e.includes("=")){let r=Kh(e);if(r.has("search")){let s=r.get("search").replaceAll('"',""),a=r.get("phrase")==="true";this.eventBus.dispatch("findfromurlhash",{source:this,query:a?s:s.match(/\S+/g)})}if(r.has("page")&&(t=r.get("page")|0||1),r.has("zoom")){let s=r.get("zoom").split(","),a=s[0],o=parseFloat(a);a.includes("Fit")?a==="Fit"||a==="FitB"?n=[null,{name:a}]:a==="FitH"||a==="FitBH"||a==="FitV"||a==="FitBV"?n=[null,{name:a},s.length>1?s[1]|0:null]:a==="FitR"?s.length!==5?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):n=[null,{name:a},s[1]|0,s[2]|0,s[3]|0,s[4]|0]:console.error(`PDFLinkService.setHash: "${a}" is not a valid zoom value.`):n=[null,{name:"XYZ"},s.length>1?s[1]|0:null,s.length>2?s[2]|0:null,o?o/100:a]}n?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:n,allowNegativeOffset:!0}):t&&(this.page=t),r.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:r.get("pagemode")}),r.has("nameddest")&&this.goToDestination(r.get("nameddest"));return}n=unescape(e);try{n=JSON.parse(n),Array.isArray(n)||(n=n.toString())}catch{}if(typeof n=="string"||i.#e(n)){this.goToDestination(n);return}console.error(`PDFLinkService.setHash: "${unescape(e)}" is not a valid destination.`)}executeNamedAction(e){if(this.pdfDocument){switch(e){case"GoBack":this.pdfHistory?.back();break;case"GoForward":this.pdfHistory?.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break;default:break}this.eventBus.dispatch("namedaction",{source:this,action:e})}}executeSetOCGState(e){return $(this,null,function*(){if(!this.pdfDocument)return;let t=this.pdfDocument,n=yield this.pdfViewer.optionalContentConfigPromise;t===this.pdfDocument&&(n.setOCGState(e),this.pdfViewer.optionalContentConfigPromise=Promise.resolve(n))})}static#e(e){if(!Array.isArray(e)||e.length<2)return!1;let[t,n,...r]=e;if(!(typeof t=="object"&&Number.isInteger(t?.num)&&Number.isInteger(t?.gen))&&!Number.isInteger(t)||!(typeof n=="object"&&typeof n?.name=="string"))return!1;let s=r.length,a=!0;switch(n.name){case"XYZ":if(s<2||s>3)return!1;break;case"Fit":case"FitB":return s===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(s>1)return!1;break;case"FitR":if(s!==4)return!1;a=!1;break;default:return!1}for(let o of r)if(!(typeof o=="number"||a&&o===null))return!1;return!0}},Io=class extends Bh{setDocument(e,t=null){}},{AbortException:sN,AnnotationEditorLayer:aN,AnnotationEditorParamsType:Mte,AnnotationEditorType:V0,AnnotationEditorUIManager:oN,AnnotationLayer:lN,AnnotationMode:Di,build:Ate,ColorPicker:_te,createValidAbsoluteUrl:cN,DOMSVGFactory:Ste,DrawLayer:hN,FeatureTest:Dte,fetchData:FA,getDocument:Ete,getFilenameFromUrl:Vte,getPdfFilenameFromUrl:dN,getXfaPageViewport:Tte,GlobalWorkerOptions:Lte,ImageKind:zte,InvalidPDFException:Pte,isDataScheme:kte,isPdfFile:uN,MissingPDFException:Hte,noContextMenu:Fte,normalizeUnicode:fN,OPS:Rte,OutputScale:pN,PasswordResponses:Ote,PDFDataRangeTransport:Ite,PDFDateString:Bte,PDFWorker:Nte,PermissionFlag:Fh,PixelsPerInch:Si,RenderingCancelledException:K7,setLayerDimensions:gN,shadow:Nh,TextLayer:vN,UnexpectedResponseException:Zte,Util:jte,VerbosityLevel:Ute,version:RA,XfaLayer:U7}=globalThis.pdfjsLib,Zh=class{#e=null;#t=null;constructor({pdfPage:e,linkService:t,downloadManager:n,annotationStorage:r=null,imageResourcesPath:s="",renderForms:a=!0,enableScripting:o=!1,hasJSActionsPromise:l=null,fieldObjectsPromise:c=null,annotationCanvasMap:h=null,accessibilityManager:d=null,annotationEditorUIManager:u=null,onAppend:p=null}){this.pdfPage=e,this.linkService=t,this.downloadManager=n,this.imageResourcesPath=s,this.renderForms=a,this.annotationStorage=r,this.enableScripting=o,this._hasJSActionsPromise=l||Promise.resolve(!1),this._fieldObjectsPromise=c||Promise.resolve(null),this._annotationCanvasMap=h,this._accessibilityManager=d,this._annotationEditorUIManager=u,this.#e=p,this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=t.eventBus}render(e,t,n="display"){return $(this,null,function*(){if(this.div){if(this._cancelled||!this.annotationLayer)return;this.annotationLayer.update({viewport:e.clone({dontFlip:!0})});return}let[r,s,a]=yield Promise.all([this.pdfPage.getAnnotations({intent:n}),this._hasJSActionsPromise,this._fieldObjectsPromise]);if(this._cancelled)return;let o=this.div=document.createElement("div");if(o.className="annotationLayer",this.#e?.(o),r.length===0){this.hide();return}this.annotationLayer=new lN({div:o,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,annotationEditorUIManager:this._annotationEditorUIManager,page:this.pdfPage,viewport:e.clone({dontFlip:!0}),structTreeLayer:t?.structTreeLayer||null}),yield this.annotationLayer.render({annotations:r,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:s,fieldObjects:a}),this.linkService.isInPresentationMode&&this.#i(Ms.FULLSCREEN),this.#t||(this.#t=new AbortController,this._eventBus?._on("presentationmodechanged",l=>{this.#i(l.state)},{signal:this.#t.signal}))})}cancel(){this._cancelled=!0,this.#t?.abort(),this.#t=null}hide(){this.div&&(this.div.hidden=!0)}hasEditableAnnotations(){return!!this.annotationLayer?.hasEditableAnnotations()}#i(e){if(!this.div)return;let t=!1;switch(e){case Ms.FULLSCREEN:t=!0;break;case Ms.NORMAL:break;default:return}for(let n of this.div.childNodes)n.hasAttribute("data-internal-link")||(n.inert=t)}};function OA(i,e){let t=document.createElement("a");if(!t.click)throw new Error('DownloadManager: "a.click()" is not supported.');t.href=i,t.target="_parent","download"in t&&(t.download=e),(document.body||document.documentElement).append(t),t.click(),t.remove()}var Q7=class{#e=new WeakMap;downloadData(e,t,n){let r=URL.createObjectURL(new Blob([e],{type:n}));OA(r,t)}openOrDownloadData(e,t,n=null){let s=uN(t)?"application/pdf":"";return this.downloadData(e,t,s),!1}download(e,t,n){let r;if(e)r=URL.createObjectURL(new Blob([e],{type:"application/pdf"}));else{if(!cN(t,"http://example.com")){console.error(`download - not a valid URL: ${t}`);return}r=t+"#pdfjs.action=download"}OA(r,n)}},IA={EVENT:"event",TIMEOUT:"timeout"};function mN(n){return $(this,arguments,function*({target:i,name:e,delay:t=0}){if(typeof i!="object"||!(e&&typeof e=="string")||!(Number.isInteger(t)&&t>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");let{promise:r,resolve:s}=Promise.withResolvers(),a=new AbortController;function o(h){a.abort(),clearTimeout(c),s(h)}let l=i instanceof jh?"_on":"addEventListener";i[l](e,o.bind(null,IA.EVENT),{signal:a.signal});let c=setTimeout(o.bind(null,IA.TIMEOUT),t);return r})}var jh=class{#e=Object.create(null);on(e,t,n=null){this._on(e,t,{external:!0,once:n?.once,signal:n?.signal})}off(e,t,n=null){this._off(e,t)}dispatch(e,t){let n=this.#e[e];if(!n||n.length===0)return;let r;for(let{listener:s,external:a,once:o}of n.slice(0)){if(o&&this._off(e,s),a){(r||=[]).push(s);continue}s(t)}if(r){for(let s of r)s(t);r=null}}_on(e,t,n=null){let r=null;if(n?.signal instanceof AbortSignal){let{signal:a}=n;if(a.aborted){console.error("Cannot use an `aborted` signal.");return}let o=()=>this._off(e,t);r=()=>a.removeEventListener("abort",o),a.addEventListener("abort",o)}(this.#e[e]||=[]).push({listener:t,external:n?.external===!0,once:n?.once===!0,rmAbort:r})}_off(e,t,n=null){let r=this.#e[e];if(r)for(let s=0,a=r.length;s1;for(let r of e){if(typeof r=="string"){t.push(i.bundle._transform(r));continue}if(i.placeables++,i.placeables>BA)throw i.dirty.delete(e),new RangeError(`Too many placeables expanded: ${i.placeables}, max allowed is ${BA}`);n&&t.push(wN),t.push(Bo(i,r).toString(i)),n&&t.push(bN)}return i.dirty.delete(e),t.join("")}function _s(i,e){return typeof e=="string"?i.bundle._transform(e):a_(i,e)}var ep=class{constructor(e,t,n){this.dirty=new WeakSet,this.params=null,this.placeables=0,this.bundle=e,this.errors=t,this.args=n}reportError(e){if(!this.errors||!(e instanceof Error))throw e;this.errors.push(e)}memoizeIntlObject(e,t){let n=this.bundle._intls.get(e);n||(n={},this.bundle._intls.set(e,n));let r=JSON.stringify(t);return n[r]||(n[r]=new e(this.bundle.locales,t)),n[r]}};function Uh(i,e){let t=Object.create(null);for(let[n,r]of Object.entries(i))e.includes(n)&&(t[n]=r.valueOf());return t}var ZA=["unitDisplay","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function SN(i,e){let t=i[0];if(t instanceof ft)return new ft(`NUMBER(${t.valueOf()})`);if(t instanceof l1)return new l1(t.valueOf(),Z(Z({},t.opts),Uh(e,ZA)));if(t instanceof Jn)return new l1(t.valueOf(),Z({},Uh(e,ZA)));throw new TypeError("Invalid argument to NUMBER")}var jA=["dateStyle","timeStyle","fractionalSecondDigits","dayPeriod","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function DN(i,e){let t=i[0];if(t instanceof ft)return new ft(`DATETIME(${t.valueOf()})`);if(t instanceof Jn)return new Jn(t.valueOf(),Z(Z({},t.opts),Uh(e,jA)));if(t instanceof l1)return new Jn(t.valueOf(),Z({},Uh(e,jA)));throw new TypeError("Invalid argument to DATETIME")}var UA=new Map;function EN(i){let e=Array.isArray(i)?i.join(" "):i,t=UA.get(e);return t===void 0&&(t=new Map,UA.set(e,t)),t}var tp=class{constructor(e,{functions:t,useIsolating:n=!0,transform:r=s=>s}={}){this._terms=new Map,this._messages=new Map,this.locales=Array.isArray(e)?e:[e],this._functions=Z({NUMBER:SN,DATETIME:DN},t),this._useIsolating=n,this._transform=r,this._intls=EN(e)}hasMessage(e){return this._messages.has(e)}getMessage(e){return this._messages.get(e)}addResource(e,{allowOverrides:t=!1}={}){let n=[];for(let r=0;r\s*/y,NN=/\s*:\s*/y,ZN=/\s*,?\s*/y,jN=/\s+/y,ip=class{constructor(e){this.body=[],$7.lastIndex=0;let t=0;for(;;){let E=$7.exec(e);if(E===null)break;t=$7.lastIndex;try{this.body.push(l(E[1]))}catch(A){if(A instanceof SyntaxError)continue;throw A}}function n(E){return E.lastIndex=t,E.test(e)}function r(E,A){if(e[t]===E)return t++,!0;if(A)throw new A(`Expected ${E}`);return!1}function s(E,A){if(n(E))return t=E.lastIndex,!0;if(A)throw new A(`Expected ${E.toString()}`);return!1}function a(E){E.lastIndex=t;let A=E.exec(e);if(A===null)throw new SyntaxError(`Expected ${E.toString()}`);return t=E.lastIndex,A}function o(E){return a(E)[1]}function l(E){let A=h(),P=c();if(A===null&&Object.keys(P).length===0)throw new SyntaxError("Expected message value or attributes");return{id:E,value:A,attributes:P}}function c(){let E=Object.create(null);for(;n($A);){let A=o($A),P=h();if(P===null)throw new SyntaxError("Expected attribute value");E[A]=P}return E}function h(){let E;if(n(Rh)&&(E=o(Rh)),e[t]==="{"||e[t]==="}")return d(E?[E]:[],1/0);let A=M();return A?E?d([E,A],A.length):(A.value=L(A.value,PN),d([A],A.length)):E?L(E,XA):null}function d(E=[],A){for(;;){if(n(Rh)){E.push(o(Rh));continue}if(e[t]==="{"){E.push(u());continue}if(e[t]==="}")throw new SyntaxError("Unbalanced closing brace");let K=M();if(K){E.push(K),A=Math.min(A,K.length);continue}break}let P=E.length-1,O=E[P];typeof O=="string"&&(E[P]=L(O,XA));let G=[];for(let K of E)K instanceof $h&&(K=K.value.slice(0,K.value.length-A)),K&&G.push(K);return G}function u(){s(FN,SyntaxError);let E=p();if(s(YA))return E;if(s(BN)){let A=y();return s(YA,SyntaxError),Z({type:"select",selector:E},A)}throw new SyntaxError("Unclosed placeable")}function p(){if(e[t]==="{")return u();if(n(qA)){let[,E,A,P=null]=a(qA);if(E==="$")return{type:"var",name:A};if(s(IN)){let O=f();if(E==="-")return{type:"term",name:A,attr:P,args:O};if(LN.test(A))return{type:"func",name:A,args:O};throw new SyntaxError("Function names must be all upper-case")}return E==="-"?{type:"term",name:A,attr:P,args:[]}:{type:"mesg",name:A,attr:P}}return _()}function f(){let E=[];for(;;){switch(e[t]){case")":return t++,E;case void 0:throw new SyntaxError("Unclosed argument list")}E.push(g()),s(ZN)}}function g(){let E=p();return E.type!=="mesg"?E:s(NN)?{type:"narg",name:E.name,value:_()}:E}function y(){let E=[],A=0,P;for(;n(VN);){r("*")&&(P=A);let O=x(),G=h();if(G===null)throw new SyntaxError("Expected variant value");E[A++]={key:O,value:G}}if(A===0)return null;if(P===void 0)throw new SyntaxError("Expected default variant");return{variants:E,star:P}}function x(){s(RN,SyntaxError);let E;return n(q7)?E=b():E={type:"str",value:o(TN)},s(ON,SyntaxError),E}function _(){if(n(q7))return b();if(e[t]==='"')return v();throw new SyntaxError("Invalid expression")}function b(){let[,E,A=""]=a(q7),P=A.length;return{type:"num",value:parseFloat(E),precision:P}}function v(){r('"',SyntaxError);let E="";for(;;){if(E+=o(zN),e[t]==="\\"){E+=m();continue}if(r('"'))return{type:"str",value:E};throw new SyntaxError("Unclosed string literal")}}function m(){if(n(GA))return o(GA);if(n(WA)){let[,E,A]=a(WA),P=parseInt(E||A,16);return P<=55295||57344<=P?String.fromCodePoint(P):"\uFFFD"}throw new SyntaxError("Unknown escape sequence")}function M(){let E=t;switch(s(jN),e[t]){case".":case"[":case"*":case"}":case void 0:return!1;case"{":return w(e.slice(E,t))}return e[t-1]===" "?w(e.slice(E,t)):!1}function L(E,A){return E.replace(A,"")}function w(E){let A=E.replace(kN,` `),P=HN.exec(E)[1].length;return new $h(A,P)}}},$h=class{constructor(e,t){this.value=e,this.length=t}},UN=/<|&#?\w+;/,$N={"http://www.w3.org/1999/xhtml":["em","strong","small","s","cite","q","dfn","abbr","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr"]},qN={"http://www.w3.org/1999/xhtml":{global:["title","aria-label","aria-valuetext"],a:["download"],area:["download","alt"],input:["alt","placeholder"],menuitem:["label"],menu:["label"],optgroup:["label"],option:["label"],track:["label"],img:["alt"],textarea:["placeholder"],th:["abbr"]},"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul":{global:["accesskey","aria-label","aria-valuetext","label","title","tooltiptext"],description:["value"],key:["key","keycode"],label:["value"],textbox:["placeholder","value"]}};function GN(i,e){let{value:t}=e;if(typeof t=="string")if(i.localName==="title"&&i.namespaceURI==="http://www.w3.org/1999/xhtml")i.textContent=t;else if(!UN.test(t))i.textContent=t;else{let n=i.ownerDocument.createElementNS("http://www.w3.org/1999/xhtml","template");n.innerHTML=t,WN(n.content,i)}o_(e,i)}function WN(i,e){for(let t of i.childNodes)if(t.nodeType!==t.TEXT_NODE){if(t.hasAttribute("data-l10n-name")){let n=YN(e,t);i.replaceChild(n,t);continue}if(QN(t)){let n=KN(t);i.replaceChild(n,t);continue}console.warn(`An element of forbidden type "${t.localName}" was found in the translation. Only safe text-level elements and elements with data-l10n-name are allowed.`),i.replaceChild(np(t),t)}e.textContent="",e.appendChild(i)}function XN(i,e){if(!i)return!1;for(let t of i)if(t.name===e)return!0;return!1}function o_(i,e){let t=e.hasAttribute("data-l10n-attrs")?e.getAttribute("data-l10n-attrs").split(",").map(n=>n.trim()):null;for(let n of Array.from(e.attributes))KA(n.name,e,t)&&!XN(i.attributes,n.name)&&e.removeAttribute(n.name);if(i.attributes)for(let n of Array.from(i.attributes))KA(n.name,e,t)&&e.getAttribute(n.name)!==n.value&&e.setAttribute(n.name,n.value)}function YN(i,e){let t=e.getAttribute("data-l10n-name"),n=i.querySelector(`[data-l10n-name="${t}"]`);if(!n)return console.warn(`An element named "${t}" wasn't found in the source.`),np(e);if(n.localName!==e.localName)return console.warn(`An element named "${t}" was found in the translation but its type ${e.localName} didn't match the element found in the source (${n.localName}).`),np(e);i.removeChild(n);let r=n.cloneNode(!1);return l_(e,r)}function KN(i){let e=i.ownerDocument.createElement(i.localName);return l_(i,e)}function np(i){return i.ownerDocument.createTextNode(i.textContent)}function QN(i){let e=$N[i.namespaceURI];return e&&e.includes(i.localName)}function KA(i,e,t=null){if(t&&t.includes(i))return!0;let n=qN[e.namespaceURI];if(!n)return!1;let r=i.toLowerCase(),s=e.localName;if(n.global.includes(r))return!0;if(!n[s])return!1;if(n[s].includes(r))return!0;if(e.namespaceURI==="http://www.w3.org/1999/xhtml"&&s==="input"&&r==="value"){let a=e.type.toLowerCase();if(a==="submit"||a==="button"||a==="reset")return!0}return!1}function l_(i,e){return e.textContent=i.textContent,o_(i,e),e}var rp=class extends Array{static from(e){return e instanceof this?e:new this(e)}};var sp=class extends rp{constructor(e){if(super(),Symbol.asyncIterator in Object(e))this.iterator=e[Symbol.asyncIterator]();else if(Symbol.iterator in Object(e))this.iterator=e[Symbol.iterator]();else throw new TypeError("Argument must implement the iteration protocol.")}[Symbol.asyncIterator](){let e=this,t=0;return{next(){return $(this,null,function*(){return e.length<=t&&e.push(e.iterator.next()),e[t++]})}}}touchNext(e=1){return $(this,null,function*(){let t=0;for(;t++!e.includes(t)),this.onChange(),this.resourceIds.length}formatWithFallback(e,t){return $(this,null,function*(){let n=[],r=!1;try{for(var s=Fp(this.bundles),a,o,l;a=!(o=yield s.next()).done;a=!1){let c=o.value;r=!0;let h=tZ(t,c,e,n);if(h.size===0)break;if(typeof console<"u"){let d=c.locales[0],u=Array.from(h).join(", ");console.warn(`[fluent] Missing translations in ${d}: ${u}`)}}}catch{l=[o]}finally{try{a&&(o=s.return)&&(yield o.call(s))}finally{if(l)throw l[0]}}return!r&&typeof console<"u"&&console.warn(`[fluent] Request for keys failed because no resource bundles got generated. keys: ${JSON.stringify(e)}. resourceIds: ${JSON.stringify(this.resourceIds)}.`),n})}formatMessages(e){return this.formatWithFallback(e,eZ)}formatValues(e){return this.formatWithFallback(e,JN)}formatValue(e,t){return $(this,null,function*(){let[n]=yield this.formatValues([{id:e,args:t}]);return n})}handleEvent(){this.onChange()}onChange(e=!1){this.bundles=sp.from(this.generateBundles(this.resourceIds)),e&&this.bundles.touchNext(2)}};function JN(i,e,t,n){return t.value?i.formatPattern(t.value,n,e):null}function eZ(i,e,t,n){let r={value:null,attributes:null};t.value&&(r.value=i.formatPattern(t.value,n,e));let s=Object.keys(t.attributes);if(s.length>0){r.attributes=new Array(s.length);for(let[a,o]of s.entries()){let l=i.formatPattern(t.attributes[o],n,e);r.attributes[a]={name:o,value:l}}}return r}function tZ(i,e,t,n){let r=[],s=new Set;return t.forEach(({id:a,args:o},l)=>{if(n[l]!==void 0)return;let c=e.getMessage(a);if(c){if(r.length=0,n[l]=i(e,r,c,o),r.length>0&&typeof console<"u"){let h=e.locales[0],d=r.join(", ");console.warn(`[fluent][resolver] errors in ${h}/${a}: ${d}.`)}}else s.add(a)}),s}var Qn="data-l10n-id",Ho="data-l10n-args",iZ=`[${Qn}]`,op=class extends ap{constructor(e,t){super(e,t),this.roots=new Set,this.pendingrAF=null,this.pendingElements=new Set,this.windowElement=null,this.mutationObserver=null,this.observerConfig={attributes:!0,characterData:!1,childList:!0,subtree:!0,attributeFilter:[Qn,Ho]}}onChange(e=!1){super.onChange(e),this.roots&&this.translateRoots()}setAttributes(e,t,n){return e.setAttribute(Qn,t),n?e.setAttribute(Ho,JSON.stringify(n)):e.removeAttribute(Ho),e}getAttributes(e){return{id:e.getAttribute(Qn),args:JSON.parse(e.getAttribute(Ho)||null)}}connectRoot(e){for(let t of this.roots)if(t===e||t.contains(e)||e.contains(t))throw new Error("Cannot add a root that overlaps with existing root.");if(this.windowElement){if(this.windowElement!==e.ownerDocument.defaultView)throw new Error(`Cannot connect a root: DOMLocalization already has a root from a different window.`)}else this.windowElement=e.ownerDocument.defaultView,this.mutationObserver=new this.windowElement.MutationObserver(t=>this.translateMutations(t));this.roots.add(e),this.mutationObserver.observe(e,this.observerConfig)}disconnectRoot(e){return this.roots.delete(e),this.pauseObserving(),this.roots.size===0?(this.mutationObserver=null,this.windowElement&&this.pendingrAF&&this.windowElement.cancelAnimationFrame(this.pendingrAF),this.windowElement=null,this.pendingrAF=null,this.pendingElements.clear(),!0):(this.resumeObserving(),!1)}translateRoots(){let e=Array.from(this.roots);return Promise.all(e.map(t=>this.translateFragment(t)))}pauseObserving(){this.mutationObserver&&(this.translateMutations(this.mutationObserver.takeRecords()),this.mutationObserver.disconnect())}resumeObserving(){if(this.mutationObserver)for(let e of this.roots)this.mutationObserver.observe(e,this.observerConfig)}translateMutations(e){for(let t of e)switch(t.type){case"attributes":t.target.hasAttribute("data-l10n-id")&&this.pendingElements.add(t.target);break;case"childList":for(let n of t.addedNodes)if(n.nodeType===n.ELEMENT_NODE)if(n.childElementCount)for(let r of this.getTranslatables(n))this.pendingElements.add(r);else n.hasAttribute(Qn)&&this.pendingElements.add(n);break}this.pendingElements.size>0&&this.pendingrAF===null&&(this.pendingrAF=this.windowElement.requestAnimationFrame(()=>{this.translateElements(Array.from(this.pendingElements)),this.pendingElements.clear(),this.pendingrAF=null}))}translateFragment(e){return this.translateElements(this.getTranslatables(e))}translateElements(e){return $(this,null,function*(){if(!e.length)return;let t=e.map(this.getKeysForElement),n=yield this.formatMessages(t);return this.applyTranslations(e,n)})}applyTranslations(e,t){this.pauseObserving();for(let n=0;n({id:a})),(yield this.#n.formatMessages(e)).map(a=>a.value)):(yield this.#n.formatMessages([{id:e,args:t}]))[0]?.value||n})}translate(e){return $(this,null,function*(){(this.#t||=new Set).add(e);try{this.#n.connectRoot(e),yield this.#n.translateRoots()}catch{}})}translateOnce(e){return $(this,null,function*(){try{yield this.#n.translateElements([e])}catch(t){console.error(`translateOnce: "${t}".`)}})}destroy(){return $(this,null,function*(){if(this.#t){for(let e of this.#t)this.#n.disconnectRoot(e);this.#t.clear(),this.#t=null}this.#n.pauseObserving()})}pause(){this.#n.pauseObserving()}resume(){this.#n.resumeObserving()}static#r(e){return e=e?.toLowerCase()||"en-us",{en:"en-us",es:"es-es",fy:"fy-nl",ga:"ga-ie",gu:"gu-in",hi:"hi-in",hy:"hy-am",nb:"nb-no",ne:"ne-np",nn:"nn-no",pa:"pa-in",pt:"pt-pt",sv:"sv-se",zh:"zh-cn"}[e]||e}static#s(e){let t=e.split("-",1)[0];return["ar","he","fa","ps","ur"].includes(t)}};function QA(i,e){let t=new ip(e),n=new tp(i),r=n.addResource(t);return r.length&&console.error("L10n errors",r),n}var Ss=class i extends lp{constructor(e){super({lang:e});let t=e?i.#e.bind(i,"en-us",this.getLanguage()):i.#n.bind(i,this.getLanguage());this._setL10n(new op([],t))}static#e(e,t){return td(this,null,function*(){let{baseURL:n,paths:r}=yield new Uo(this.#i()),s=[t];if(e!==t){let a=t.split("-",1)[0];a!==t&&s.push(a),s.push(e)}for(let a of s){let o=yield new Uo(this.#t(a,n,r));o?yield o:a==="en-us"&&(yield this.#r(a))}})}static#t(e,t,n){return $(this,null,function*(){let r=n[e];if(!r)return null;let s=new URL(r,t),a=yield FA(s,"text");return QA(e,a)})}static#i(){return $(this,null,function*(){try{let{href:e}=document.querySelector('link[type="application/l10n"]'),t=yield FA(e,"json");return{baseURL:e.replace(/[^/]*$/,"")||"./",paths:t}}catch{}return{baseURL:"./",paths:Object.create(null)}})}static#n(e){return td(this,null,function*(){yield this.#r(e)})}static#r(e){return $(this,null,function*(){return QA(e,`pdfjs-previous-button = .title = Previous Page pdfjs-previous-button-label = Previous pdfjs-next-button = .title = Next Page pdfjs-next-button-label = Next pdfjs-page-input = .title = Page pdfjs-of-pages = of { $pagesCount } pdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount }) pdfjs-zoom-out-button = .title = Zoom Out pdfjs-zoom-out-button-label = Zoom Out pdfjs-zoom-in-button = .title = Zoom In pdfjs-zoom-in-button-label = Zoom In pdfjs-zoom-select = .title = Zoom pdfjs-presentation-mode-button = .title = Switch to Presentation Mode pdfjs-presentation-mode-button-label = Presentation Mode pdfjs-open-file-button = .title = Open File pdfjs-open-file-button-label = Open pdfjs-print-button = .title = Print pdfjs-print-button-label = Print pdfjs-save-button = .title = Save pdfjs-save-button-label = Save pdfjs-download-button = .title = Download pdfjs-download-button-label = Download pdfjs-bookmark-button = .title = Current Page (View URL from Current Page) pdfjs-bookmark-button-label = Current Page pdfjs-tools-button = .title = Tools pdfjs-tools-button-label = Tools pdfjs-first-page-button = .title = Go to First Page pdfjs-first-page-button-label = Go to First Page pdfjs-last-page-button = .title = Go to Last Page pdfjs-last-page-button-label = Go to Last Page pdfjs-page-rotate-cw-button = .title = Rotate Clockwise pdfjs-page-rotate-cw-button-label = Rotate Clockwise pdfjs-page-rotate-ccw-button = .title = Rotate Counterclockwise pdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise pdfjs-cursor-text-select-tool-button = .title = Enable Text Selection Tool pdfjs-cursor-text-select-tool-button-label = Text Selection Tool pdfjs-cursor-hand-tool-button = .title = Enable Hand Tool pdfjs-cursor-hand-tool-button-label = Hand Tool pdfjs-scroll-page-button = .title = Use Page Scrolling pdfjs-scroll-page-button-label = Page Scrolling pdfjs-scroll-vertical-button = .title = Use Vertical Scrolling pdfjs-scroll-vertical-button-label = Vertical Scrolling pdfjs-scroll-horizontal-button = .title = Use Horizontal Scrolling pdfjs-scroll-horizontal-button-label = Horizontal Scrolling pdfjs-scroll-wrapped-button = .title = Use Wrapped Scrolling pdfjs-scroll-wrapped-button-label = Wrapped Scrolling pdfjs-spread-none-button = .title = Do not join page spreads pdfjs-spread-none-button-label = No Spreads pdfjs-spread-odd-button = .title = Join page spreads starting with odd-numbered pages pdfjs-spread-odd-button-label = Odd Spreads pdfjs-spread-even-button = .title = Join page spreads starting with even-numbered pages pdfjs-spread-even-button-label = Even Spreads pdfjs-document-properties-button = .title = Document Properties\u2026 pdfjs-document-properties-button-label = Document Properties\u2026 pdfjs-document-properties-file-name = File name: pdfjs-document-properties-file-size = File size: pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes) pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes) pdfjs-document-properties-title = Title: pdfjs-document-properties-author = Author: pdfjs-document-properties-subject = Subject: pdfjs-document-properties-keywords = Keywords: pdfjs-document-properties-creation-date = Creation Date: pdfjs-document-properties-modification-date = Modification Date: pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") } pdfjs-document-properties-creator = Creator: pdfjs-document-properties-producer = PDF Producer: pdfjs-document-properties-version = PDF Version: pdfjs-document-properties-page-count = Page Count: pdfjs-document-properties-page-size = Page Size: pdfjs-document-properties-page-size-unit-inches = in pdfjs-document-properties-page-size-unit-millimeters = mm pdfjs-document-properties-page-size-orientation-portrait = portrait pdfjs-document-properties-page-size-orientation-landscape = landscape pdfjs-document-properties-page-size-name-a-three = A3 pdfjs-document-properties-page-size-name-a-four = A4 pdfjs-document-properties-page-size-name-letter = Letter pdfjs-document-properties-page-size-name-legal = Legal pdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation }) pdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation }) pdfjs-document-properties-linearized = Fast Web View: pdfjs-document-properties-linearized-yes = Yes pdfjs-document-properties-linearized-no = No pdfjs-document-properties-close-button = Close pdfjs-print-progress-message = Preparing document for printing\u2026 pdfjs-print-progress-percent = { $progress }% pdfjs-print-progress-close-button = Cancel pdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser. pdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing. pdfjs-toggle-sidebar-button = .title = Toggle Sidebar pdfjs-toggle-sidebar-notification-button = .title = Toggle Sidebar (document contains outline/attachments/layers) pdfjs-toggle-sidebar-button-label = Toggle Sidebar pdfjs-document-outline-button = .title = Show Document Outline (double-click to expand/collapse all items) pdfjs-document-outline-button-label = Document Outline pdfjs-attachments-button = .title = Show Attachments pdfjs-attachments-button-label = Attachments pdfjs-layers-button = .title = Show Layers (double-click to reset all layers to the default state) pdfjs-layers-button-label = Layers pdfjs-thumbs-button = .title = Show Thumbnails pdfjs-thumbs-button-label = Thumbnails pdfjs-current-outline-item-button = .title = Find Current Outline Item pdfjs-current-outline-item-button-label = Current Outline Item pdfjs-findbar-button = .title = Find in Document pdfjs-findbar-button-label = Find pdfjs-additional-layers = Additional Layers pdfjs-thumb-page-title = .title = Page { $page } pdfjs-thumb-page-canvas = .aria-label = Thumbnail of Page { $page } pdfjs-find-input = .title = Find .placeholder = Find in document\u2026 pdfjs-find-previous-button = .title = Find the previous occurrence of the phrase pdfjs-find-previous-button-label = Previous pdfjs-find-next-button = .title = Find the next occurrence of the phrase pdfjs-find-next-button-label = Next pdfjs-find-highlight-checkbox = Highlight All pdfjs-find-match-case-checkbox-label = Match Case pdfjs-find-match-diacritics-checkbox-label = Match Diacritics pdfjs-find-entire-word-checkbox-label = Whole Words pdfjs-find-reached-top = Reached top of document, continued from bottom pdfjs-find-reached-bottom = Reached end of document, continued from top pdfjs-find-match-count = { $total -> [one] { $current } of { $total } match *[other] { $current } of { $total } matches } pdfjs-find-match-count-limit = { $limit -> [one] More than { $limit } match *[other] More than { $limit } matches } pdfjs-find-not-found = Phrase not found pdfjs-page-scale-width = Page Width pdfjs-page-scale-fit = Page Fit pdfjs-page-scale-auto = Automatic Zoom pdfjs-page-scale-actual = Actual Size pdfjs-page-scale-percent = { $scale }% pdfjs-page-landmark = .aria-label = Page { $page } pdfjs-loading-error = An error occurred while loading the PDF. pdfjs-invalid-file-error = Invalid or corrupted PDF file. pdfjs-missing-file-error = Missing PDF file. pdfjs-unexpected-response-error = Unexpected server response. pdfjs-rendering-error = An error occurred while rendering the page. pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") } pdfjs-text-annotation-type = .alt = [{ $type } Annotation] pdfjs-password-label = Enter the password to open this PDF file. pdfjs-password-invalid = Invalid password. Please try again. pdfjs-password-ok-button = OK pdfjs-password-cancel-button = Cancel pdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts. pdfjs-editor-free-text-button = .title = Text pdfjs-editor-free-text-button-label = Text pdfjs-editor-ink-button = .title = Draw pdfjs-editor-ink-button-label = Draw pdfjs-editor-stamp-button = .title = Add or edit images pdfjs-editor-stamp-button-label = Add or edit images pdfjs-editor-highlight-button = .title = Highlight pdfjs-editor-highlight-button-label = Highlight pdfjs-highlight-floating-button1 = .title = Highlight .aria-label = Highlight pdfjs-highlight-floating-button-label = Highlight pdfjs-editor-remove-ink-button = .title = Remove drawing pdfjs-editor-remove-freetext-button = .title = Remove text pdfjs-editor-remove-stamp-button = .title = Remove image pdfjs-editor-remove-highlight-button = .title = Remove highlight pdfjs-editor-free-text-color-input = Color pdfjs-editor-free-text-size-input = Size pdfjs-editor-ink-color-input = Color pdfjs-editor-ink-thickness-input = Thickness pdfjs-editor-ink-opacity-input = Opacity pdfjs-editor-stamp-add-image-button = .title = Add image pdfjs-editor-stamp-add-image-button-label = Add image pdfjs-editor-free-highlight-thickness-input = Thickness pdfjs-editor-free-highlight-thickness-title = .title = Change thickness when highlighting items other than text pdfjs-free-text2 = .aria-label = Text Editor .default-content = Start typing\u2026 pdfjs-ink = .aria-label = Draw Editor pdfjs-ink-canvas = .aria-label = User-created image pdfjs-editor-alt-text-button = .aria-label = Alt text pdfjs-editor-alt-text-button-label = Alt text pdfjs-editor-alt-text-edit-button = .aria-label = Edit alt text pdfjs-editor-alt-text-dialog-label = Choose an option pdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load. pdfjs-editor-alt-text-add-description-label = Add a description pdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions. pdfjs-editor-alt-text-mark-decorative-label = Mark as decorative pdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks. pdfjs-editor-alt-text-cancel-button = Cancel pdfjs-editor-alt-text-save-button = Save pdfjs-editor-alt-text-decorative-tooltip = Marked as decorative pdfjs-editor-alt-text-textarea = .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D pdfjs-editor-resizer-top-left = .aria-label = Top left corner \u2014 resize pdfjs-editor-resizer-top-middle = .aria-label = Top middle \u2014 resize pdfjs-editor-resizer-top-right = .aria-label = Top right corner \u2014 resize pdfjs-editor-resizer-middle-right = .aria-label = Middle right \u2014 resize pdfjs-editor-resizer-bottom-right = .aria-label = Bottom right corner \u2014 resize pdfjs-editor-resizer-bottom-middle = .aria-label = Bottom middle \u2014 resize pdfjs-editor-resizer-bottom-left = .aria-label = Bottom left corner \u2014 resize pdfjs-editor-resizer-middle-left = .aria-label = Middle left \u2014 resize pdfjs-editor-highlight-colorpicker-label = Highlight color pdfjs-editor-colorpicker-button = .title = Change color pdfjs-editor-colorpicker-dropdown = .aria-label = Color choices pdfjs-editor-colorpicker-yellow = .title = Yellow pdfjs-editor-colorpicker-green = .title = Green pdfjs-editor-colorpicker-blue = .title = Blue pdfjs-editor-colorpicker-pink = .title = Pink pdfjs-editor-colorpicker-red = .title = Red pdfjs-editor-highlight-show-all-button-label = Show all pdfjs-editor-highlight-show-all-button = .title = Show all pdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description) pdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description) pdfjs-editor-new-alt-text-textarea = .placeholder = Write your description here\u2026 pdfjs-editor-new-alt-text-description = Short description for people who can\u2019t see the image or when the image doesn\u2019t load. pdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate. pdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more pdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically pdfjs-editor-new-alt-text-not-now-button = Not now pdfjs-editor-new-alt-text-error-title = Couldn\u2019t create alt text automatically pdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later. pdfjs-editor-new-alt-text-error-close-button = Close pdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB) .aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB) pdfjs-editor-new-alt-text-added-button = .aria-label = Alt text added pdfjs-editor-new-alt-text-added-button-label = Alt text added pdfjs-editor-new-alt-text-missing-button = .aria-label = Missing alt text pdfjs-editor-new-alt-text-missing-button-label = Missing alt text pdfjs-editor-new-alt-text-to-review-button = .aria-label = Review alt text pdfjs-editor-new-alt-text-to-review-button-label = Review alt text pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText } pdfjs-image-alt-text-settings-button = .title = Image alt text settings pdfjs-image-alt-text-settings-button-label = Image alt text settings pdfjs-editor-alt-text-settings-dialog-label = Image alt text settings pdfjs-editor-alt-text-settings-automatic-title = Automatic alt text pdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically pdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can\u2019t see the image or when the image doesn\u2019t load. pdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB) pdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text. pdfjs-editor-alt-text-settings-delete-model-button = Delete pdfjs-editor-alt-text-settings-download-model-button = Download pdfjs-editor-alt-text-settings-downloading-model-button = Downloading\u2026 pdfjs-editor-alt-text-settings-editor-title = Alt text editor pdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image pdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text. pdfjs-editor-alt-text-settings-close-button = Close`)})}},nZ=1e3,G7=50,JA=1e3;function W7(){return document.location.hash}var cp=class{#e=null;constructor({linkService:e,eventBus:t}){this.linkService=e,this.eventBus=t,this._initialized=!1,this._fingerprint="",this.reset(),this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",n=>{this._isPagesLoaded=!!n.pagesCount},{once:!0})})}initialize({fingerprint:e,resetHistory:t=!1,updateUrl:n=!1}){if(!e||typeof e!="string"){console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');return}this._initialized&&this.reset();let r=this._fingerprint!==""&&this._fingerprint!==e;this._fingerprint=e,this._updateUrl=n===!0,this._initialized=!0,this.#d();let s=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=W7(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this.#r(s,!0)||t){let{hash:o,page:l,rotation:c}=this.#l(!0);if(!o||r||t){this.#t(null,!0);return}this.#t({hash:o,page:l,rotation:c},!0);return}let a=s.destination;this.#s(a,s.uid,!0),a.rotation!==void 0&&(this._initialRotation=a.rotation),a.dest?(this._initialBookmark=JSON.stringify(a.dest),this._destination.page=null):a.hash?this._initialBookmark=a.hash:a.page&&(this._initialBookmark=`page=${a.page}`)}reset(){this._initialized&&(this.#o(),this._initialized=!1,this.#a()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:e=null,explicitDest:t,pageNumber:n}){if(!this._initialized)return;if(e&&typeof e!="string"){console.error(`PDFHistory.push: "${e}" is not a valid namedDest parameter.`);return}else if(Array.isArray(t)){if(!this.#n(n)&&(n!==null||this._destination)){console.error(`PDFHistory.push: "${n}" is not a valid pageNumber parameter.`);return}}else{console.error(`PDFHistory.push: "${t}" is not a valid explicitDest parameter.`);return}let r=e||JSON.stringify(t);if(!r)return;let s=!1;if(this._destination&&(rZ(this._destination.hash,r)||sZ(this._destination.dest,t))){if(this._destination.page)return;s=!0}this._popStateInProgress&&!s||(this.#t({dest:t,hash:r,page:n,rotation:this.linkService.rotation},s),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushPage(e){if(this._initialized){if(!this.#n(e)){console.error(`PDFHistory.pushPage: "${e}" is not a valid page number.`);return}this._destination?.page!==e&&(this._popStateInProgress||(this.#t({dest:null,hash:`page=${e}`,page:e,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))))}}pushCurrentPosition(){!this._initialized||this._popStateInProgress||this.#i()}back(){if(!this._initialized||this._popStateInProgress)return;let e=window.history.state;this.#r(e)&&e.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;let e=window.history.state;this.#r(e)&&e.uid0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}#t(e,t=!1){let n=t||!this._destination,r={fingerprint:this._fingerprint,uid:n?this._uid:this._uid+1,destination:e};this.#s(e,r.uid);let s;if(this._updateUrl&&e?.hash){let a=document.location.href.split("#",1)[0];a.startsWith("file://")||(s=`${a}#${e.hash}`)}n?window.history.replaceState(r,"",s):window.history.pushState(r,"",s)}#i(e=!1){if(!this._position)return;let t=this._position;if(e&&(t=Object.assign(Object.create(null),this._position),t.temporary=!0),!this._destination){this.#t(t);return}if(this._destination.temporary){this.#t(t,!0);return}if(this._destination.hash===t.hash||!this._destination.page&&(G7<=0||this._numPositionUpdates<=G7))return;let n=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest!==void 0||!this._destination.first)return;n=!0}this.#t(t,n)}#n(e){return Number.isInteger(e)&&e>0&&e<=this.linkService.pagesCount}#r(e,t=!1){if(!e)return!1;if(e.fingerprint!==this._fingerprint)if(t){if(typeof e.fingerprint!="string"||e.fingerprint.length!==this._fingerprint.length)return!1;let[n]=performance.getEntriesByType("navigation");if(n?.type!=="reload")return!1}else return!1;return!(!Number.isInteger(e.uid)||e.uid<0||e.destination===null||typeof e.destination!="object")}#s(e,t,n=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),n&&e?.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._maxUid=Math.max(this._maxUid,t),this._numPositionUpdates=0}#l(e=!1){let t=unescape(W7()).substring(1),n=Kh(t),r=n.get("nameddest")||"",s=n.get("page")|0;return(!this.#n(s)||e&&r.length>0)&&(s=null),{hash:t,page:s,rotation:this.linkService.rotation}}#c({location:e}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:e.pdfOpenParams.substring(1),page:this.linkService.page,first:e.pageNumber,rotation:e.rotation},!this._popStateInProgress&&(G7>0&&this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,JA>0&&(this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this.#i(!0),this._updateViewareaTimeout=null},JA)))}#h({state:e}){let t=W7(),n=this._currentHash!==t;if(this._currentHash=t,!e){this._uid++;let{hash:s,page:a,rotation:o}=this.#l();this.#t({hash:s,page:a,rotation:o},!0);return}if(!this.#r(e))return;this._popStateInProgress=!0,n&&(this._blockHashChange++,mN({target:window,name:"hashchange",delay:nZ}).then(()=>{this._blockHashChange--}));let r=e.destination;this.#s(r,e.uid,!0),s_(r.rotation)&&(this.linkService.rotation=r.rotation),r.dest?this.linkService.goToDestination(r.dest):r.hash?this.linkService.setHash(r.hash):r.page&&(this.linkService.page=r.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})}#o(){(!this._destination||this._destination.temporary)&&this.#i()}#d(){if(this.#e)return;this.#e=new AbortController;let{signal:e}=this.#e;this.eventBus._on("updateviewarea",this.#c.bind(this),{signal:e}),window.addEventListener("popstate",this.#h.bind(this),{signal:e}),window.addEventListener("pagehide",this.#o.bind(this),{signal:e})}#a(){this.#e?.abort(),this.#e=null}};function rZ(i,e){return typeof i!="string"||typeof e!="string"?!1:i===e||Kh(i).get("nameddest")===e}function sZ(i,e){function t(n,r){if(typeof n!=typeof r||Array.isArray(n)||Array.isArray(r))return!1;if(n!==null&&typeof n=="object"&&r!==null){if(Object.keys(n).length!==Object.keys(r).length)return!1;for(let s in n)if(!t(n[s],r[s]))return!1;return!0}return n===r||Number.isNaN(n)&&Number.isNaN(r)}if(!(Array.isArray(i)&&Array.isArray(e))||i.length!==e.length)return!1;for(let n=0,r=i.length;n1;(function(){(r||n)&&Ih.set("maxCanvasPixels",5242880)})(),function(){n&&Ih.set("useSystemFonts",!1)}()}var Ih,W={BROWSER:1,VIEWER:2,API:4,WORKER:8,EVENT_DISPATCH:16,PREFERENCE:128},dp={BOOLEAN:1,NUMBER:2,OBJECT:4,STRING:8,UNDEFINED:16},I1={allowedGlobalEvents:{value:null,kind:W.BROWSER},canvasMaxAreaInBytes:{value:-1,kind:W.BROWSER+W.API},isInAutomation:{value:!1,kind:W.BROWSER},localeProperties:{value:{lang:navigator.language||"en-US"},kind:W.BROWSER},nimbusDataStr:{value:"",kind:W.BROWSER},supportsCaretBrowsingMode:{value:!1,kind:W.BROWSER},supportsDocumentFonts:{value:!0,kind:W.BROWSER},supportsIntegratedFind:{value:!1,kind:W.BROWSER},supportsMouseWheelZoomCtrlKey:{value:!0,kind:W.BROWSER},supportsMouseWheelZoomMetaKey:{value:!0,kind:W.BROWSER},supportsPinchToZoom:{value:!0,kind:W.BROWSER},toolbarDensity:{value:0,kind:W.BROWSER+W.EVENT_DISPATCH},altTextLearnMoreUrl:{value:"",kind:W.VIEWER+W.PREFERENCE},annotationEditorMode:{value:0,kind:W.VIEWER+W.PREFERENCE},annotationMode:{value:2,kind:W.VIEWER+W.PREFERENCE},cursorToolOnLoad:{value:0,kind:W.VIEWER+W.PREFERENCE},debuggerSrc:{value:"./debugger.mjs",kind:W.VIEWER},defaultZoomDelay:{value:400,kind:W.VIEWER+W.PREFERENCE},defaultZoomValue:{value:"",kind:W.VIEWER+W.PREFERENCE},disableHistory:{value:!1,kind:W.VIEWER},disablePageLabels:{value:!1,kind:W.VIEWER+W.PREFERENCE},enableAltText:{value:!1,kind:W.VIEWER+W.PREFERENCE},enableAltTextModelDownload:{value:!0,kind:W.VIEWER+W.PREFERENCE+W.EVENT_DISPATCH},enableGuessAltText:{value:!0,kind:W.VIEWER+W.PREFERENCE+W.EVENT_DISPATCH},enableHighlightFloatingButton:{value:!1,kind:W.VIEWER+W.PREFERENCE},enableNewAltTextWhenAddingImage:{value:!0,kind:W.VIEWER+W.PREFERENCE},enablePermissions:{value:!1,kind:W.VIEWER+W.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:W.VIEWER+W.PREFERENCE},enableScripting:{value:!0,kind:W.VIEWER+W.PREFERENCE},enableUpdatedAddImage:{value:!1,kind:W.VIEWER+W.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:W.VIEWER},externalLinkTarget:{value:0,kind:W.VIEWER+W.PREFERENCE},highlightEditorColors:{value:"yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F",kind:W.VIEWER+W.PREFERENCE},historyUpdateUrl:{value:!1,kind:W.VIEWER+W.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:W.VIEWER+W.PREFERENCE},imageResourcesPath:{value:"./images/",kind:W.VIEWER},maxCanvasPixels:{value:2**25,kind:W.VIEWER},forcePageColors:{value:!1,kind:W.VIEWER+W.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:W.VIEWER+W.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:W.VIEWER+W.PREFERENCE},pdfBugEnabled:{value:!1,kind:W.VIEWER+W.PREFERENCE},printResolution:{value:150,kind:W.VIEWER},sidebarViewOnLoad:{value:-1,kind:W.VIEWER+W.PREFERENCE},scrollModeOnLoad:{value:-1,kind:W.VIEWER+W.PREFERENCE},spreadModeOnLoad:{value:-1,kind:W.VIEWER+W.PREFERENCE},textLayerMode:{value:1,kind:W.VIEWER+W.PREFERENCE},viewOnLoad:{value:0,kind:W.VIEWER+W.PREFERENCE},cMapPacked:{value:!0,kind:W.API},cMapUrl:{value:"../web/cmaps/",kind:W.API},disableAutoFetch:{value:!1,kind:W.API+W.PREFERENCE},disableFontFace:{value:!1,kind:W.API+W.PREFERENCE},disableRange:{value:!1,kind:W.API+W.PREFERENCE},disableStream:{value:!1,kind:W.API+W.PREFERENCE},docBaseUrl:{value:"",kind:W.API},enableHWA:{value:!0,kind:W.API+W.VIEWER+W.PREFERENCE},enableXfa:{value:!0,kind:W.API+W.PREFERENCE},fontExtraProperties:{value:!1,kind:W.API},isEvalSupported:{value:!0,kind:W.API},isOffscreenCanvasSupported:{value:!0,kind:W.API},maxImageSize:{value:-1,kind:W.API},pdfBug:{value:!1,kind:W.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:W.API},useSystemFonts:{value:void 0,kind:W.API,type:dp.BOOLEAN+dp.UNDEFINED},verbosity:{value:1,kind:W.API},workerPort:{value:null,kind:W.WORKER},workerSrc:{value:"../build/pdf.worker.mjs",kind:W.WORKER}};I1.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:W.VIEWER},I1.sandboxBundleSrc={value:"../build/pdf.sandbox.mjs",kind:W.VIEWER},I1.viewerCssTheme={value:0,kind:W.VIEWER+W.PREFERENCE},I1.enableFakeMLManager={value:!0,kind:W.VIEWER};I1.disablePreferences={value:!1,kind:W.VIEWER};var up=class{static eventBus;static#e=new Map;static{for(let e in I1)this.#e.set(e,I1[e].value);for(let[e,t]of Ih)this.#e.set(e,t);this._hasInvokedSet=!1,this._checkDisablePreferences=()=>this.get("disablePreferences")?!0:(this._hasInvokedSet&&console.warn('The Preferences may override manually set AppOptions; please use the "disablePreferences"-option to prevent that.'),!1)}static get(e){return this.#e.get(e)}static getAll(e=null,t=!1){let n=Object.create(null);for(let r in I1){let s=I1[r];e&&!(e&s.kind)||(n[r]=t?s.value:this.#e.get(r))}return n}static set(e,t){this.setAll({[e]:t})}static setAll(e,t=!1){this._hasInvokedSet||=!0;let n;for(let r in e){let s=I1[r],a=e[r];if(!s||!(typeof a==typeof s.value||dp[(typeof a).toUpperCase()]&s.type))continue;let{kind:o}=s;t&&!(o&W.BROWSER||o&W.PREFERENCE)||(this.eventBus&&o&W.EVENT_DISPATCH&&(n||=new Map).set(r,a),this.#e.set(r,a))}if(n)for(let[r,s]of n)this.eventBus.dispatch(r.toLowerCase(),{source:this,value:s})}},fp=class{#e=null;constructor(e){this.pageIndex=e.pageIndex}render(e="display"){return $(this,null,function*(){e!=="display"||this.#e||this._cancelled||(this.#e=new hN({pageIndex:this.pageIndex}))})}cancel(){this._cancelled=!0,this.#e&&(this.#e.destroy(),this.#e=null)}setParent(e){this.#e?.setParent(e)}getDrawLayer(){return this.#e}},e_={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},aZ=/^H(\d+)$/,qh=class{#e;#t=null;#i;#n=new Map;#r;#s=null;constructor(e,t){this.#e=e.getStructTree(),this.#r=t}render(){return $(this,null,function*(){if(this.#i)return this.#i;let{promise:e,resolve:t,reject:n}=Promise.withResolvers();this.#i=e;try{this.#t=this.#h(yield this.#e)}catch(r){n(r)}return this.#e=null,this.#t?.classList.add("structTree"),t(this.#t),e})}getAriaAttributes(e){return $(this,null,function*(){try{return yield this.render(),this.#n.get(e)}catch{}return null})}hide(){this.#t&&!this.#t.hidden&&(this.#t.hidden=!0)}show(){this.#t?.hidden&&(this.#t.hidden=!1)}#l(e,t){let{alt:n,id:r,lang:s}=e;if(n!==void 0){let a=!1,o=Ro(n);for(let l of e.children)if(l.type==="annotation"){let c=this.#n.get(l.id);c||(c=new Map,this.#n.set(l.id,c)),c.set("aria-label",o),a=!0}a||t.setAttribute("aria-label",o)}r!==void 0&&t.setAttribute("aria-owns",r),s!==void 0&&t.setAttribute("lang",Ro(s,!0))}#c(e,t){let{alt:n,bbox:r,children:s}=e,a=s?.[0];if(!this.#r||!n||!r||a?.type!=="content")return!1;let{id:o}=a;if(!o)return!1;t.setAttribute("aria-owns",o);let l=document.createElement("span");(this.#s||=new Map).set(o,l),l.setAttribute("role","img"),l.setAttribute("aria-label",Ro(n));let{pageHeight:c,pageX:h,pageY:d}=this.#r,u="calc(var(--scale-factor)*",{style:p}=l;return p.width=`${u}${r[2]-r[0]}px)`,p.height=`${u}${r[3]-r[1]}px)`,p.left=`${u}${r[0]-h}px)`,p.top=`${u}${c-r[3]+d}px)`,!0}addElementsToTextLayer(){if(this.#s){for(let[e,t]of this.#s)document.getElementById(e)?.append(t);this.#s.clear(),this.#s=null}}#h(e){if(!e)return null;let t=document.createElement("span");if("role"in e){let{role:n}=e,r=n.match(aZ);if(r?(t.setAttribute("role","heading"),t.setAttribute("aria-level",r[1])):e_[n]&&t.setAttribute("role",e_[n]),n==="Figure"&&this.#c(e,t))return t}if(this.#l(e,t),e.children)if(e.children.length===1&&"id"in e.children[0])this.#l(e.children[0],t);else for(let n of e.children)t.append(this.#h(n));return t}},pp=class i{#e=!1;#t=null;#i=new Map;#n=new Map;setTextMapping(e){this.#t=e}static#r(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(n.width===0&&n.height===0)return 1;if(r.width===0&&r.height===0)return-1;let s=n.y,a=n.y+n.height,o=n.y+n.height/2,l=r.y,c=r.y+r.height,h=r.y+r.height/2;if(o<=l&&h>=a)return-1;if(h<=s&&o>=c)return 1;let d=n.x+n.width/2,u=r.x+r.width/2;return d-u}enable(){if(this.#e)throw new Error("TextAccessibilityManager is already enabled.");if(!this.#t)throw new Error("Text divs and strings have not been set.");if(this.#e=!0,this.#t=this.#t.slice(),this.#t.sort(i.#r),this.#i.size>0){let e=this.#t;for(let[t,n]of this.#i){if(!document.getElementById(t)){this.#i.delete(t);continue}this.#s(t,e[n])}}for(let[e,t]of this.#n)this.addPointerInTextLayer(e,t);this.#n.clear()}disable(){this.#e&&(this.#n.clear(),this.#t=null,this.#e=!1)}removePointerInTextLayer(e){if(!this.#e){this.#n.delete(e);return}let t=this.#t;if(!t||t.length===0)return;let{id:n}=e,r=this.#i.get(n);if(r===void 0)return;let s=t[r];this.#i.delete(n);let a=s.getAttribute("aria-owns");a?.includes(n)&&(a=a.split(" ").filter(o=>o!==n).join(" "),a?s.setAttribute("aria-owns",a):(s.removeAttribute("aria-owns"),s.setAttribute("role","presentation")))}#s(e,t){let n=t.getAttribute("aria-owns");n?.includes(e)||t.setAttribute("aria-owns",n?`${n} ${e}`:e),t.removeAttribute("role")}addPointerInTextLayer(e,t){let{id:n}=e;if(!n)return null;if(!this.#e)return this.#n.set(e,t),null;t&&this.removePointerInTextLayer(e);let r=this.#t;if(!r||r.length===0)return null;let s=Oo(r,c=>i.#r(e,c)<0),a=Math.max(0,s-1),o=r[a];this.#s(n,o),this.#i.set(n,a);let l=o.parentNode;return l?.classList.contains("markedContent")?l.id:null}moveElementInDOM(e,t,n,r){let s=this.addPointerInTextLayer(n,r);if(!e.hasChildNodes())return e.append(t),s;let a=Array.from(e.childNodes).filter(c=>c!==t);if(a.length===0)return s;let o=n||t,l=Oo(a,c=>i.#r(o,c)<0);return l===0?a[0].before(t):a[l-1].after(t),s}},gp=class{#e=null;constructor({findController:e,eventBus:t,pageIndex:n}){this.findController=e,this.matches=[],this.eventBus=t,this.pageIdx=n,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(e,t){this.textDivs=e,this.textContentItemsStr=t}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this.#e||(this.#e=new AbortController,this.eventBus._on("updatetextlayermatches",e=>{(e.pageIndex===this.pageIdx||e.pageIndex===-1)&&this._updateMatches()},{signal:this.#e.signal})),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this.#e?.abort(),this.#e=null,this._updateMatches(!0))}_convertMatches(e,t){if(!e)return[];let{textContentItemsStr:n}=this,r=0,s=0,a=n.length-1,o=[];for(let l=0,c=e.length;l=s+n[r].length;)s+=n[r].length,r++;r===n.length&&console.error("Could not find a matching mapping");let d={begin:{divIdx:r,offset:h-s}};for(h+=t[l];r!==a&&h>s+n[r].length;)s+=n[r].length,r++;d.end={divIdx:r,offset:h-s},o.push(d)}return o}_renderMatches(e){if(e.length===0)return;let{findController:t,pageIdx:n}=this,{textContentItemsStr:r,textDivs:s}=this,a=n===t.selected.pageIdx,o=t.selected.matchIdx,l=t.state.highlightAll,c=null,h={divIdx:-1,offset:void 0};function d(x,_){let b=x.divIdx;return s[b].textContent="",u(b,0,x.offset,_)}function u(x,_,b,v){let m=s[x];if(m.nodeType===Node.TEXT_NODE){let w=document.createElement("span");m.before(w),w.append(m),s[x]=w,m=w}let M=r[x].substring(_,b),L=document.createTextNode(M);if(v){let w=document.createElement("span");return w.className=`${v} appended`,w.append(L),m.append(w),v.includes("selected")?w.offsetLeft:0}return m.append(L),0}let p=o,f=p+1;if(l)p=0,f=e.length;else if(!a)return;let g=-1,y=-1;for(let x=p;x{t.classList.add("selecting")}),t.addEventListener("copy",n=>{if(!this.#e){let r=document.getSelection();n.clipboardData.setData("text/plain",Ro(fN(r.toString())))}n.preventDefault(),n.stopPropagation()}),i.#r.set(t,e),i.#h()}static#c(e){this.#r.delete(e),this.#r.size===0&&(this.#s?.abort(),this.#s=null)}static#h(){if(this.#s)return;this.#s=new AbortController;let{signal:e}=this.#s,t=(a,o)=>{o.append(a),a.style.width="",a.style.height="",o.classList.remove("selecting")},n=!1;document.addEventListener("pointerdown",()=>{n=!0},{signal:e}),document.addEventListener("pointerup",()=>{n=!1,this.#r.forEach(t)},{signal:e}),window.addEventListener("blur",()=>{n=!1,this.#r.forEach(t)},{signal:e}),document.addEventListener("keyup",()=>{n||this.#r.forEach(t)},{signal:e});var r,s;document.addEventListener("selectionchange",()=>{let a=document.getSelection();if(a.rangeCount===0){this.#r.forEach(t);return}let o=new Set;for(let p=0;p{s===this._optionalContentConfigPromise&&(this.#u.initialOptionalContent=a.hasInitialVisibility)}),e.l10n||this.l10n.translate(this.div)}}#g(e,t){let n=lZ.get(t),r=this.#f[n];if(this.#f[n]=e,r){r.replaceWith(e);return}for(let s=n-1;s>=0;s--){let a=this.#f[s];if(a){a.after(e);return}}this.div.prepend(e)}get renderingState(){return this.#d}set renderingState(e){if(e!==this.#d)switch(this.#d=e,this.#s&&(clearTimeout(this.#s),this.#s=null),e){case ut.PAUSED:this.div.classList.remove("loading");break;case ut.RUNNING:this.div.classList.add("loadingIcon"),this.#s=setTimeout(()=>{this.div.classList.add("loading"),this.#s=null},0);break;case ut.INITIAL:case ut.FINISHED:this.div.classList.remove("loadingIcon","loading");break}}#m(){let{viewport:e}=this;if(this.pdfPage){if(this.#l===e.rotation)return;this.#l=e.rotation}gN(this.div,e,!0,!1)}setPdfPage(e){this._isStandalone&&(this.pageColors?.foreground==="CanvasText"||this.pageColors?.background==="Canvas")&&(this._container?.style.setProperty("--hcm-highlight-filter",e.filterFactory.addHighlightHCMFilter("highlight","CanvasText","Canvas","HighlightText","Highlight")),this._container?.style.setProperty("--hcm-highlight-selected-filter",e.filterFactory.addHighlightHCMFilter("highlight_selected","CanvasText","Canvas","HighlightText","Highlight"))),this.pdfPage=e,this.pdfPageRotate=e.rotate;let t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*Si.PDF_TO_CSS_UNITS,rotation:t}),this.#m(),this.reset()}destroy(){this.reset(),this.pdfPage?.cleanup()}hasEditableAnnotations(){return!!this.annotationLayer?.hasEditableAnnotations()}get _textHighlighter(){return Nh(this,"_textHighlighter",new gp({pageIndex:this.id-1,eventBus:this.eventBus,findController:this.#r.findController}))}#v(e,t){this.eventBus.dispatch(e,{source:this,pageNumber:this.id,error:t})}#w(){return $(this,null,function*(){let e=null;try{yield this.annotationLayer.render(this.viewport,{structTreeLayer:this.structTreeLayer},"display")}catch(t){console.error(`#renderAnnotationLayer: "${t}".`),e=t}finally{this.#v("annotationlayerrendered",e)}})}#y(){return $(this,null,function*(){let e=null;try{yield this.annotationEditorLayer.render(this.viewport,"display")}catch(t){console.error(`#renderAnnotationEditorLayer: "${t}".`),e=t}finally{this.#v("annotationeditorlayerrendered",e)}})}#M(){return $(this,null,function*(){try{yield this.drawLayer.render("display")}catch(e){console.error(`#renderDrawLayer: "${e}".`)}})}#C(){return $(this,null,function*(){let e=null;try{let t=yield this.xfaLayer.render(this.viewport,"display");t?.textDivs&&this._textHighlighter&&this.#D(t.textDivs)}catch(t){console.error(`#renderXfaLayer: "${t}".`),e=t}finally{this.xfaLayer?.div&&(this.l10n.pause(),this.#g(this.xfaLayer.div,"xfaLayer"),this.l10n.resume()),this.#v("xfalayerrendered",e)}})}#x(){return $(this,null,function*(){if(!this.textLayer)return;let e=null;try{yield this.textLayer.render(this.viewport)}catch(t){if(t instanceof sN)return;console.error(`#renderTextLayer: "${t}".`),e=t}this.#v("textlayerrendered",e),this.#T()})}#T(){return $(this,null,function*(){if(!this.textLayer)return;let e=yield this.structTreeLayer?.render();e&&(this.l10n.pause(),this.structTreeLayer?.addElementsToTextLayer(),this.canvas&&e.parentNode!==this.canvas&&this.canvas.append(e),this.l10n.resume()),this.structTreeLayer?.show()})}#D(e){return $(this,null,function*(){let t=yield this.pdfPage.getTextContent(),n=[];for(let r of t.items)n.push(r.str);this._textHighlighter.setTextMapping(e,n),this._textHighlighter.enable()})}_resetZoomLayer(e=!1){if(!this.zoomLayer)return;let t=this.zoomLayer.firstChild;this.#p.delete(t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}reset({keepZoomLayer:e=!1,keepAnnotationLayer:t=!1,keepAnnotationEditorLayer:n=!1,keepXfaLayer:r=!1,keepTextLayer:s=!1}={}){this.cancelRendering({keepAnnotationLayer:t,keepAnnotationEditorLayer:n,keepXfaLayer:r,keepTextLayer:s}),this.renderingState=ut.INITIAL;let a=this.div,o=a.childNodes,l=e&&this.zoomLayer||null,c=t&&this.annotationLayer?.div||null,h=n&&this.annotationEditorLayer?.div||null,d=r&&this.xfaLayer?.div||null,u=s&&this.textLayer?.div||null;for(let p=o.length-1;p>=0;p--){let f=o[p];switch(f){case l:case c:case h:case d:case u:continue}f.remove();let g=this.#f.indexOf(f);g>=0&&(this.#f[g]=null)}a.removeAttribute("data-loaded"),c&&this.annotationLayer.hide(),h&&this.annotationEditorLayer.hide(),d&&this.xfaLayer.hide(),u&&this.textLayer.hide(),this.structTreeLayer?.hide(),l||(this.canvas&&(this.#p.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer())}toggleEditingMode(e){this.hasEditableAnnotations()&&(this.#n=e,this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0}))}update({scale:e=0,rotation:t=null,optionalContentConfigPromise:n=null,drawingDelay:r=-1}){this.scale=e||this.scale,typeof t=="number"&&(this.rotation=t),n instanceof Promise&&(this._optionalContentConfigPromise=n,n.then(a=>{n===this._optionalContentConfigPromise&&(this.#u.initialOptionalContent=a.hasInitialVisibility)})),this.#u.directDrawing=!0;let s=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*Si.PDF_TO_CSS_UNITS,rotation:s}),this.#m(),this._isStandalone&&this._container?.style.setProperty("--scale-factor",this.viewport.scale),this.canvas){let a=!1;if(this.#i){if(this.maxCanvasPixels===0)a=!0;else if(this.maxCanvasPixels>0){let{width:l,height:c}=this.viewport,{sx:h,sy:d}=this.outputScale;a=(Math.floor(l)*h|0)*(Math.floor(c)*d|0)>this.maxCanvasPixels}}let o=r>=0&&r<1e3;if(o||a){if(o&&!a&&this.renderingState!==ut.FINISHED&&(this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:r}),this.renderingState=ut.FINISHED,this.#u.directDrawing=!1),this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!o,hideTextLayer:o}),o)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this.#o});return}!this.zoomLayer&&!this.canvas.hidden&&(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}cancelRendering({keepAnnotationLayer:e=!1,keepAnnotationEditorLayer:t=!1,keepXfaLayer:n=!1,keepTextLayer:r=!1,cancelExtraDelay:s=0}={}){this.renderTask&&(this.renderTask.cancel(s),this.renderTask=null),this.resume=null,this.textLayer&&(!r||!this.textLayer.div)&&(this.textLayer.cancel(),this.textLayer=null),this.annotationLayer&&(!e||!this.annotationLayer.div)&&(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null),this.annotationEditorLayer&&(!t||!this.annotationEditorLayer.div)&&(this.drawLayer&&(this.drawLayer.cancel(),this.drawLayer=null),this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),this.xfaLayer&&(!n||!this.xfaLayer.div)&&(this.xfaLayer.cancel(),this.xfaLayer=null,this._textHighlighter?.disable())}cssTransform({target:e,redrawAnnotationLayer:t=!1,redrawAnnotationEditorLayer:n=!1,redrawXfaLayer:r=!1,redrawTextLayer:s=!1,hideTextLayer:a=!1}){if(!e.hasAttribute("zooming")){e.setAttribute("zooming",!0);let{style:l}=e;l.width=l.height=""}let o=this.#p.get(e);if(this.viewport!==o){let l=this.viewport.rotation-o.rotation,c=Math.abs(l),h=1,d=1;if(c===90||c===270){let{width:u,height:p}=this.viewport;h=p/u,d=u/p}e.style.transform=`rotate(${l}deg) scale(${h}, ${d})`}t&&this.annotationLayer&&this.#w(),n&&this.annotationEditorLayer&&(this.drawLayer&&this.#M(),this.#y()),r&&this.xfaLayer&&this.#C(),this.textLayer&&(a?(this.textLayer.hide(),this.structTreeLayer?.hide()):s&&this.#x())}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}#A(e,t=null){return $(this,null,function*(){if(e===this.renderTask&&(this.renderTask=null),t instanceof K7){this.#o=null;return}if(this.#o=t,this.renderingState=ut.FINISHED,this._resetZoomLayer(!0),this.#u.regularAnnotations=!e.separateAnnots,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:this.#o}),t)throw t})}draw(){return $(this,null,function*(){this.renderingState!==ut.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());let{div:e,l10n:t,pageColors:n,pdfPage:r,viewport:s}=this;if(!r)throw this.renderingState=ut.FINISHED,new Error("pdfPage is not loaded");this.renderingState=ut.RUNNING;let a=document.createElement("div");if(a.classList.add("canvasWrapper"),this.#g(a,"canvasWrapper"),!this.textLayer&&this.#a!==O1.DISABLE&&!r.isPureXfa&&(this._accessibilityManager||=new pp,this.textLayer=new Gh({pdfPage:r,highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,enablePermissions:this.#a===O1.ENABLE_PERMISSIONS,onAppend:E=>{this.l10n.pause(),this.#g(E,"textLayer"),this.l10n.resume()}})),!this.annotationLayer&&this.#e!==Di.DISABLE){let{annotationStorage:E,annotationEditorUIManager:A,downloadManager:P,enableScripting:O,fieldObjectsPromise:G,hasJSActionsPromise:K,linkService:te}=this.#r;this._annotationCanvasMap||=new Map,this.annotationLayer=new Zh({pdfPage:r,annotationStorage:E,imageResourcesPath:this.imageResourcesPath,renderForms:this.#e===Di.ENABLE_FORMS,linkService:te,downloadManager:P,enableScripting:O,hasJSActionsPromise:K,fieldObjectsPromise:G,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager,annotationEditorUIManager:A,onAppend:F=>{this.#g(F,"annotationLayer")}})}let o=E=>{if(u?.(!1),this.renderingQueue&&!this.renderingQueue.isHighestPriority(this)){this.renderingState=ut.PAUSED,this.resume=()=>{this.renderingState=ut.RUNNING,E()};return}E()},{width:l,height:c}=s,h=document.createElement("canvas");h.setAttribute("role","presentation"),h.hidden=!0;let d=!!(n?.background&&n?.foreground),u=E=>{(!d||E)&&(h.hidden=!1,u=null)};a.append(h),this.canvas=h;let p=h.getContext("2d",{alpha:!1,willReadFrequently:!this.#t}),f=this.outputScale=new pN;if(this.maxCanvasPixels===0){let E=1/this.scale;f.sx*=E,f.sy*=E,this.#i=!0}else if(this.maxCanvasPixels>0){let E=l*c,A=Math.sqrt(this.maxCanvasPixels/E);f.sx>A||f.sy>A?(f.sx=A,f.sy=A,this.#i=!0):this.#i=!1}let g=EA(f.sx),y=EA(f.sy),x=h.width=Ph(kh(l*f.sx),g[0]),_=h.height=Ph(kh(c*f.sy),y[0]),b=Ph(kh(l),g[1]),v=Ph(kh(c),y[1]);f.sx=x/b,f.sy=_/v,this.#c!==g[1]&&(e.style.setProperty("--scale-round-x",`${g[1]}px`),this.#c=g[1]),this.#h!==y[1]&&(e.style.setProperty("--scale-round-y",`${y[1]}px`),this.#h=y[1]),this.#p.set(h,s);let m=f.scaled?[f.sx,0,0,f.sy,0,0]:null,M={canvasContext:p,transform:m,viewport:s,annotationMode:this.#e,optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:n,isEditing:this.#n},L=this.renderTask=r.render(M);L.onContinue=o;let w=L.promise.then(()=>$(this,null,function*(){u?.(!0),yield this.#A(L),this.structTreeLayer||=new qh(r,s.rawDims),this.#x(),this.annotationLayer&&(yield this.#w());let{annotationEditorUIManager:E}=this.#r;E&&(this.drawLayer||=new fp({pageIndex:this.id}),yield this.#M(),this.drawLayer.setParent(a),this.annotationEditorLayer||=new hp({uiManager:E,pdfPage:r,l10n:t,structTreeLayer:this.structTreeLayer,accessibilityManager:this._accessibilityManager,annotationLayer:this.annotationLayer?.annotationLayer,textLayer:this.textLayer,drawLayer:this.drawLayer.getDrawLayer(),onAppend:A=>{this.#g(A,"annotationEditorLayer")}}),this.#y())}),E=>(E instanceof K7||u?.(!0),this.#A(L,E)));if(r.isPureXfa){if(!this.xfaLayer){let{annotationStorage:E,linkService:A}=this.#r;this.xfaLayer=new Wh({pdfPage:r,annotationStorage:E,linkService:A})}this.#C()}return e.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),w})}setPageLabel(e){this.pageLabel=typeof e=="string"?e:null,this.div.setAttribute("data-l10n-args",JSON.stringify({page:this.pageLabel??this.id})),this.pageLabel!==null?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){let{directDrawing:e,initialOptionalContent:t,regularAnnotations:n}=this.#u;return e&&t&&n?this.canvas:null}};function cZ(i){return $(this,null,function*(){let e="",t=e.split("#",1)[0],{info:n,metadata:r,contentDispositionFilename:s,contentLength:a}=yield i.getMetadata();if(!a){let{length:o}=yield i.getDownloadInfo();a=o}return se(Z({},n),{baseURL:t,filesize:a,filename:s||dN(e),metadata:r?.getRaw(),authors:r?.get("dc:creator"),numPages:i.numPages,URL:e})})}var vp=class{constructor(e){this._ready=new Promise((t,n)=>{import(e).then(s=>{t(s.QuickJSSandbox())}).catch(n)})}createSandbox(e){return $(this,null,function*(){(yield this._ready).create(e)})}dispatchEventInSandbox(e){return $(this,null,function*(){let t=yield this._ready;setTimeout(()=>t.dispatchEvent(e),0)})}destroySandbox(){return $(this,null,function*(){(yield this._ready).nukeSandbox()})}},mp=class{#e=null;#t=null;#i=null;#n=null;#r=null;#s=null;#l=null;#c=null;#h=!1;#o=null;#d=null;constructor({eventBus:e,externalServices:t=null,docProperties:n=null}){this.#r=e,this.#s=t,this.#i=n}setViewer(e){this.#c=e}setDocument(e){return $(this,null,function*(){if(this.#l&&(yield this.#g()),this.#l=e,!e)return;let[t,n,r]=yield Promise.all([e.getFieldObjects(),e.getCalculationOrderIds(),e.getJSActions()]);if(!t&&!r){yield this.#g();return}if(e!==this.#l)return;try{this.#o=this.#f()}catch(o){console.error(`setDocument: "${o.message}".`),yield this.#g();return}let s=this.#r;this.#n=new AbortController;let{signal:a}=this.#n;s._on("updatefromsandbox",o=>{o?.source===window&&this.#a(o.detail)},{signal:a}),s._on("dispatcheventinsandbox",o=>{this.#o?.dispatchEventInSandbox(o.detail)},{signal:a}),s._on("pagechanging",({pageNumber:o,previous:l})=>{o!==l&&(this.#p(l),this.#u(o))},{signal:a}),s._on("pagerendered",({pageNumber:o})=>{this._pageOpenPending.has(o)&&o===this.#c.currentPageNumber&&this.#u(o)},{signal:a}),s._on("pagesdestroy",()=>$(this,null,function*(){yield this.#p(this.#c.currentPageNumber),yield this.#o?.dispatchEventInSandbox({id:"doc",name:"WillClose"}),this.#e?.resolve()}),{signal:a});try{let o=yield this.#i(e);if(e!==this.#l)return;yield this.#o.createSandbox({objects:t,calculationOrder:n,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:se(Z({},o),{actions:r})}),s.dispatch("sandboxcreated",{source:this})}catch(o){console.error(`setDocument: "${o.message}".`),yield this.#g();return}yield this.#o?.dispatchEventInSandbox({id:"doc",name:"Open"}),yield this.#u(this.#c.currentPageNumber,!0),Promise.resolve().then(()=>{e===this.#l&&(this.#h=!0)})})}dispatchWillSave(){return $(this,null,function*(){return this.#o?.dispatchEventInSandbox({id:"doc",name:"WillSave"})})}dispatchDidSave(){return $(this,null,function*(){return this.#o?.dispatchEventInSandbox({id:"doc",name:"DidSave"})})}dispatchWillPrint(){return $(this,null,function*(){if(this.#o){yield this.#d?.promise,this.#d=Promise.withResolvers();try{yield this.#o.dispatchEventInSandbox({id:"doc",name:"WillPrint"})}catch(e){throw this.#d.resolve(),this.#d=null,e}yield this.#d.promise}})}dispatchDidPrint(){return $(this,null,function*(){return this.#o?.dispatchEventInSandbox({id:"doc",name:"DidPrint"})})}get destroyPromise(){return this.#t?.promise||null}get ready(){return this.#h}get _pageOpenPending(){return Nh(this,"_pageOpenPending",new Set)}get _visitedPages(){return Nh(this,"_visitedPages",new Map)}#a(e){return $(this,null,function*(){let t=this.#c,n=t.isInPresentationMode||t.isChangingPresentationMode,{id:r,siblings:s,command:a,value:o}=e;if(!r){switch(a){case"clear":console.clear();break;case"error":console.error(o);break;case"layout":if(!n){let c=FB(o);t.spreadMode=c.spreadMode}break;case"page-num":t.currentPageNumber=o+1;break;case"print":yield t.pagesPromise,this.#r.dispatch("print",{source:this});break;case"println":console.log(o);break;case"zoom":n||(t.currentScaleValue=o);break;case"SaveAs":this.#r.dispatch("download",{source:this});break;case"FirstPage":t.currentPageNumber=1;break;case"LastPage":t.currentPageNumber=t.pagesCount;break;case"NextPage":t.nextPage();break;case"PrevPage":t.previousPage();break;case"ZoomViewIn":n||t.increaseScale();break;case"ZoomViewOut":n||t.decreaseScale();break;case"WillPrintFinished":this.#d?.resolve(),this.#d=null;break}return}if(n&&e.focus)return;delete e.id,delete e.siblings;let l=s?[r,...s]:[r];for(let c of l){let h=document.querySelector(`[data-element-id="${c}"]`);h?h.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:e})):this.#l?.annotationStorage.setValue(c,e)}})}#u(e,t=!1){return $(this,null,function*(){let n=this.#l,r=this._visitedPages;if(t&&(this.#e=Promise.withResolvers()),!this.#e)return;let s=this.#c.getPageView(e-1);if(s?.renderingState!==ut.FINISHED){this._pageOpenPending.add(e);return}this._pageOpenPending.delete(e);let a=$(this,null,function*(){let o=yield r.has(e)?null:s.pdfPage?.getJSActions();n===this.#l&&(yield this.#o?.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:e,actions:o}))});r.set(e,a)})}#p(e){return $(this,null,function*(){let t=this.#l,n=this._visitedPages;if(!this.#e||this._pageOpenPending.has(e))return;let r=n.get(e);r&&(n.set(e,null),yield r,t===this.#l&&(yield this.#o?.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:e})))})}#f(){if(this.#t=Promise.withResolvers(),this.#o)throw new Error("#initScripting: Scripting already exists.");return this.#s.createScripting()}#g(){return $(this,null,function*(){if(!this.#o){this.#l=null,this.#t?.resolve();return}this.#e&&(yield Promise.race([this.#e.promise,new Promise(e=>{setTimeout(e,1e3)})]).catch(()=>{}),this.#e=null),this.#l=null;try{yield this.#o.destroySandbox()}catch{}this.#d?.reject(new Error("Scripting destroyed.")),this.#d=null,this.#n?.abort(),this.#n=null,this._pageOpenPending.clear(),this._visitedPages.clear(),this.#o=null,this.#h=!1,this.#t?.resolve()})}},wp=class extends mp{constructor(e){e.externalServices||window.addEventListener("updatefromsandbox",t=>{e.eventBus.dispatch("updatefromsandbox",{source:window,detail:t.detail})}),e.externalServices||={createScripting:()=>new vp(e.sandboxBundleSrc)},e.docProperties||=t=>cZ(t),super(e)}},hZ=3e4,bp=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1,Object.defineProperty(this,"hasViewer",{value:()=>!!this.pdfViewer})}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}renderHighestPriority(e){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),!this.pdfViewer.forceRendering(e)&&(this.isThumbnailViewEnabled&&this.pdfThumbnailViewer?.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),hZ)))}getHighestPriority(e,t,n,r=!1){let s=e.views,a=s.length;if(a===0)return null;for(let d=0;da){let d=e.ids;for(let u=1,p=l-o;u{this.renderHighestPriority()}).catch(t=>{t instanceof K7||console.error(`renderView: "${t}"`)});break}return!0}},t_=10,Oh={FORCE_SCROLL_MODE_PAGE:1e4,FORCE_LAZY_PAGE_INIT:5e3,PAUSE_EAGER_PAGE_INIT:250};function i_(i){return Object.values(V0).includes(i)&&i!==V0.DISABLE}var yp=class{#e=new Set;#t=0;constructor(e){this.#t=e}push(e){let t=this.#e;t.has(e)&&t.delete(e),t.add(e),t.size>this.#t&&this.#i()}resize(e,t=null){this.#t=e;let n=this.#e;if(t){let r=n.size,s=1;for(let a of n)if(t.has(a.id)&&(n.delete(a),n.add(a)),++s>r)break}for(;n.size>this.#t;)this.#i()}has(e){return this.#e.has(e)}[Symbol.iterator](){return this.#e.keys()}#i(){let e=this.#e.keys().next().value;e?.destroy(),this.#e.delete(e)}},Yh=class{#e=null;#t=null;#i=null;#n=V0.NONE;#r=null;#s=Di.ENABLE_FORMS;#l=null;#c=!1;#h=!1;#o=!1;#d=!1;#a=!1;#u=null;#p=null;#f=null;#g=null;#m=!1;#v=null;#w=!1;#y=0;#M=new ResizeObserver(this.#O.bind(this));#C=null;#x=null;#T=O1.ENABLE;constructor(e){let t="4.8.69";if(RA!==t)throw new Error(`The API version "${RA}" does not match the Viewer version "${t}".`);if(this.container=e.container,this.viewer=e.viewer||e.container.firstElementChild,this.container?.tagName!=="DIV"||this.viewer?.tagName!=="DIV")throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&getComputedStyle(this.container).position!=="absolute")throw new Error("The `container` must be absolutely positioned.");this.#M.observe(this.container),this.eventBus=e.eventBus,this.linkService=e.linkService||new Io,this.downloadManager=e.downloadManager||null,this.findController=e.findController||null,this.#t=e.altTextManager||null,this.findController&&(this.findController.onIsPageVisible=r=>this._getVisiblePages().ids.has(r)),this._scriptingManager=e.scriptingManager||null,this.#T=e.textLayerMode??O1.ENABLE,this.#s=e.annotationMode??Di.ENABLE_FORMS,this.#n=e.annotationEditorMode??V0.NONE,this.#i=e.annotationEditorHighlightColors||null,this.#h=e.enableHighlightFloatingButton===!0,this.#d=e.enableUpdatedAddImage===!0,this.#a=e.enableNewAltTextWhenAddingImage===!0,this.imageResourcesPath=e.imageResourcesPath||"",this.enablePrintAutoRotate=e.enablePrintAutoRotate||!1,this.removePageBorders=e.removePageBorders||!1,this.maxCanvasPixels=e.maxCanvasPixels,this.l10n=e.l10n,this.l10n||=new Ss,this.#o=e.enablePermissions||!1,this.pageColors=e.pageColors||null,this.#p=e.mlManager||null,this.#c=e.enableHWA||!1,this.defaultRenderingQueue=!e.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new bp,this.renderingQueue.setViewer(this)):this.renderingQueue=e.renderingQueue;let{abortSignal:n}=e;n?.addEventListener("abort",()=>{this.#M.disconnect(),this.#M=null},{once:!0}),this.scroll=VB(this.container,this._scrollUpdate.bind(this),n),this.presentationModeState=Ms.UNKNOWN,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),this.#F(),this.eventBus._on("thumbnailrendered",({pageNumber:r,pdfPage:s})=>{let a=this._pages[r-1];this.#e.has(a)||s?.cleanup()}),e.l10n||this.l10n.translate(this.container)}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}getCachedPageViews(){return new Set(this.#e)}get pageViewsReady(){return this._pages.every(e=>e?.pdfPage)}get renderForms(){return this.#s===Di.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(e){if(!Number.isInteger(e))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(e,!0)||console.error(`currentPageNumber: "${e}" is not a valid page.`))}_setCurrentPageNumber(e,t=!1){if(this._currentPageNumber===e)return t&&this.#z(),!0;if(!(0=0&&(t=n+1)}this._setCurrentPageNumber(t,!0)||console.error(`currentPageLabel: "${e}" is not a valid page.`)}get currentScale(){return this._currentScale!==B7?this._currentScale:n_}set currentScale(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this.#V(e,{noScroll:!1})}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){this.pdfDocument&&this.#V(e,{noScroll:!1})}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!s_(e))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument||(e%=360,e<0&&(e+=360),this._pagesRotation===e))return;this._pagesRotation=e;let t=this._currentPageNumber;this.refresh(!0,{rotation:e}),this._currentScaleValue&&this.#V(this._currentScaleValue,{noScroll:!0}),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:e,pageNumber:t}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _layerProperties(){let e=this;return Nh(this,"_layerProperties",{get annotationEditorUIManager(){return e.#r},get annotationStorage(){return e.pdfDocument?.annotationStorage},get downloadManager(){return e.downloadManager},get enableScripting(){return!!e._scriptingManager},get fieldObjectsPromise(){return e.pdfDocument?.getFieldObjects()},get findController(){return e.findController},get hasJSActionsPromise(){return e.pdfDocument?.hasJSActions()},get linkService(){return e.linkService}})}#D(e){let t={annotationEditorMode:this.#n,annotationMode:this.#s,textLayerMode:this.#T};return e&&(!e.includes(Fh.COPY)&&this.#T===O1.ENABLE&&(t.textLayerMode=O1.ENABLE_PERMISSIONS),e.includes(Fh.MODIFY_CONTENTS)||(t.annotationEditorMode=V0.DISABLE),!e.includes(Fh.MODIFY_ANNOTATIONS)&&!e.includes(Fh.FILL_INTERACTIVE_FORMS)&&this.#s===Di.ENABLE_FORMS&&(t.annotationMode=Di.ENABLE)),t}#A(e){return $(this,null,function*(){if(document.visibilityState==="hidden"||!this.container.offsetParent||this._getVisiblePages().views.length===0)return;let t=Promise.withResolvers(),n=new AbortController;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&t.resolve()},{signal:typeof AbortSignal.any=="function"?AbortSignal.any([e,n.signal]):e}),yield Promise.race([this._onePageRenderedCapability.promise,t.promise]),n.abort()})}getAllText(){return $(this,null,function*(){let e=[],t=[];for(let n=1,r=this.pdfDocument.numPages;n<=r;++n){if(this.#w)return null;t.length=0;let s=yield this.pdfDocument.getPage(n),{items:a}=yield s.getTextContent();for(let o of a)o.str&&t.push(o.str),o.hasEOL&&t.push(` `);e.push(Ro(t.join("")))}return e.join(` `)})}#E(e,t){let n=document.getSelection(),{focusNode:r,anchorNode:s}=n;if(s&&r&&n.containsNode(this.#v)){if(this.#m||e===O1.ENABLE_PERMISSIONS){t.preventDefault(),t.stopPropagation();return}this.#m=!0;let{classList:a}=this.viewer;a.add("copyAll");let o=new AbortController;window.addEventListener("keydown",l=>this.#w=l.key==="Escape",{signal:o.signal}),this.getAllText().then(l=>$(this,null,function*(){l!==null&&(yield navigator.clipboard.writeText(l))})).catch(l=>{console.warn(`Something goes wrong when extracting the text: ${l.message}`)}).finally(()=>{this.#m=!1,this.#w=!1,o.abort(),a.remove("copyAll")}),t.preventDefault(),t.stopPropagation()}}setDocument(e){if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),this.findController?.setDocument(null),this._scriptingManager?.setDocument(null),this.#r?.destroy(),this.#r=null),this.pdfDocument=e,!e)return;let t=e.numPages,n=e.getPage(1),r=e.getOptionalContentConfig({intent:"display"}),s=this.#o?e.getPermissions():Promise.resolve(),{eventBus:a,pageColors:o,viewer:l}=this;this.#u=new AbortController;let{signal:c}=this.#u;if(t>Oh.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");let u=this._scrollMode=Fe.PAGE;a.dispatch("scrollmodechanged",{source:this,mode:u})}this._pagesCapability.promise.then(()=>{a.dispatch("pagesloaded",{source:this,pagesCount:t})},()=>{});let h=u=>{let p=this._pages[u.pageNumber-1];p&&this.#e.push(p)};a._on("pagerender",h,{signal:c});let d=u=>{u.cssTransform||(this._onePageRenderedCapability.resolve({timestamp:u.timestamp}),a._off("pagerendered",d))};a._on("pagerendered",d,{signal:c}),Promise.all([n,s]).then(([u,p])=>{if(e!==this.pdfDocument)return;this._firstPageCapability.resolve(u),this._optionalContentConfigPromise=r;let{annotationEditorMode:f,annotationMode:g,textLayerMode:y}=this.#D(p);if(y!==O1.DISABLE){let v=this.#v=document.createElement("div");v.id="hiddenCopyElement",l.before(v)}if(typeof AbortSignal.any=="function"&&f!==V0.DISABLE){let v=f;e.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):i_(v)?(this.#r=new oN(this.container,l,this.#t,a,e,o,this.#i,this.#h,this.#d,this.#a,this.#p),a.dispatch("annotationeditoruimanager",{source:this,uiManager:this.#r}),v!==V0.NONE&&(v===V0.STAMP&&this.#p?.loadModel("altText"),this.#r.updateMode(v))):console.error(`Invalid AnnotationEditor mode: ${v}`)}let x=this._scrollMode===Fe.PAGE?null:l,_=this.currentScale,b=u.getViewport({scale:_*Si.PDF_TO_CSS_UNITS});l.style.setProperty("--scale-factor",b.scale),o?.background&&l.style.setProperty("--page-bg-color",o.background),(o?.foreground==="CanvasText"||o?.background==="Canvas")&&(l.style.setProperty("--hcm-highlight-filter",e.filterFactory.addHighlightHCMFilter("highlight","CanvasText","Canvas","HighlightText","Highlight")),l.style.setProperty("--hcm-highlight-selected-filter",e.filterFactory.addHighlightHCMFilter("highlight_selected","CanvasText","Canvas","HighlightText","ButtonText")));for(let v=1;v<=t;++v){let m=new Xh({container:x,eventBus:a,id:v,scale:_,defaultViewport:b.clone(),optionalContentConfigPromise:r,renderingQueue:this.renderingQueue,textLayerMode:y,annotationMode:g,imageResourcesPath:this.imageResourcesPath,maxCanvasPixels:this.maxCanvasPixels,pageColors:o,l10n:this.l10n,layerProperties:this._layerProperties,enableHWA:this.#c});this._pages.push(m)}this._pages[0]?.setPdfPage(u),this._scrollMode===Fe.PAGE?this.#S():this._spreadMode!==Gt.NONE&&this._updateSpreadMode(),this.#A(c).then(()=>$(this,null,function*(){if(e!==this.pdfDocument)return;if(this.findController?.setDocument(e),this._scriptingManager?.setDocument(e),this.#v&&document.addEventListener("copy",this.#E.bind(this,y),{signal:c}),this.#r&&a.dispatch("annotationeditormodechanged",{source:this,mode:this.#n}),e.loadingParams.disableAutoFetch||t>Oh.FORCE_LAZY_PAGE_INIT){this._pagesCapability.resolve();return}let v=t-1;if(v<=0){this._pagesCapability.resolve();return}for(let m=2;m<=t;++m){let M=e.getPage(m).then(L=>{let w=this._pages[m-1];w.pdfPage||w.setPdfPage(L),--v===0&&this._pagesCapability.resolve()},L=>{console.error(`Unable to get page ${m} to initialize viewer`,L),--v===0&&this._pagesCapability.resolve()});m%Oh.PAUSE_EAGER_PAGE_INIT===0&&(yield M)}})),a.dispatch("pagesinit",{source:this}),e.getMetadata().then(({info:v})=>{e===this.pdfDocument&&v.Language&&(l.lang=v.Language)}),this.defaultRenderingQueue&&this.update()}).catch(u=>{console.error("Unable to initialize viewer",u),this._pagesCapability.reject(u)})}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let t=0,n=this._pages.length;t=t.previousPageNumber,t.previousPageNumber=e}_scrollUpdate(){this.pagesCount!==0&&this.update()}#L(e,t=null){let{div:n,id:r}=e;if(this._currentPageNumber!==r&&this._setCurrentPageNumber(r),this._scrollMode===Fe.PAGE&&(this.#S(),this.update()),!t&&!this.isInPresentationMode){let s=n.offsetLeft+n.clientLeft,a=s+n.clientWidth,{scrollLeft:o,clientWidth:l}=this.container;(this._scrollMode===Fe.HORIZONTAL||so+l)&&(t={left:0,top:0})}r_(n,t),!this._currentScaleValue&&this._location&&(this._location=null)}#P(e){return e===this._currentScale||Math.abs(e-this._currentScale)<1e-15}#_(e,t,{noScroll:n=!1,preset:r=!1,drawingDelay:s=-1,origin:a=null}){if(this._currentScaleValue=t.toString(),this.#P(e)){r&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});return}this.viewer.style.setProperty("--scale-factor",e*Si.PDF_TO_CSS_UNITS);let o=s>=0&&s<1e3;this.refresh(!0,{scale:e,drawingDelay:o?s:-1}),o&&(this.#x=setTimeout(()=>{this.#x=null,this.refresh()},s));let l=this._currentScale;if(this._currentScale=e,!n){let c=this._currentPageNumber,h;if(this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)&&(c=this._location.pageNumber,h=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:c,destArray:h,allowNegativeOffset:!0}),Array.isArray(a)){let d=e/l-1,[u,p]=this.containerTopLeft;this.container.scrollLeft+=(a[0]-p)*d,this.container.scrollTop+=(a[1]-u)*d}}this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:r?t:void 0}),this.defaultRenderingQueue&&this.update()}get#b(){return this._spreadMode!==Gt.NONE&&this._scrollMode!==Fe.HORIZONTAL?2:1}#V(e,t){let n=parseFloat(e);if(n>0)t.preset=!1,this.#_(n,e,t);else{let r=this._pages[this._currentPageNumber-1];if(!r)return;let s=_A,a=SA;this.isInPresentationMode?(s=a=4,this._spreadMode!==Gt.NONE&&(s*=2)):this.removePageBorders?s=a=0:this._scrollMode===Fe.HORIZONTAL&&([s,a]=[a,s]);let o=(this.container.clientWidth-s)/r.width*r.scale/this.#b,l=(this.container.clientHeight-a)/r.height*r.scale;switch(e){case"page-actual":n=1;break;case"page-width":n=o;break;case"page-height":n=l;break;case"page-fit":n=Math.min(o,l);break;case"auto":let c=VA(r)?o:Math.min(l,o);n=Math.min(EB,c);break;default:console.error(`#setScale: "${e}" is an unknown zoom value.`);return}t.preset=!0,this.#_(n,e,t)}}#z(){let e=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&this.#V(this._currentScaleValue,{noScroll:!0}),this.#L(e)}pageLabelToPageNumber(e){if(!this._pageLabels)return null;let t=this._pageLabels.indexOf(e);return t<0?null:t+1}scrollPageIntoView({pageNumber:e,destArray:t=null,allowNegativeOffset:n=!1,ignoreDestinationZoom:r=!1}){if(!this.pdfDocument)return;let s=Number.isInteger(e)&&this._pages[e-1];if(!s){console.error(`scrollPageIntoView: "${e}" is not a valid pageNumber parameter.`);return}if(this.isInPresentationMode||!t){this._setCurrentPageNumber(e,!0);return}let a=0,o=0,l=0,c=0,h,d,u=s.rotation%180!==0,p=(u?s.height:s.width)/s.scale/Si.PDF_TO_CSS_UNITS,f=(u?s.width:s.height)/s.scale/Si.PDF_TO_CSS_UNITS,g=0;switch(t[1].name){case"XYZ":a=t[2],o=t[3],g=t[4],a=a!==null?a:0,o=o!==null?o:f;break;case"Fit":case"FitB":g="page-fit";break;case"FitH":case"FitBH":o=t[2],g="page-width",o===null&&this._location?(a=this._location.left,o=this._location.top):(typeof o!="number"||o<0)&&(o=f);break;case"FitV":case"FitBV":a=t[2],l=p,c=f,g="page-height";break;case"FitR":a=t[2],o=t[3],l=t[4]-a,c=t[5]-o;let b=_A,v=SA;this.removePageBorders&&(b=v=0),h=(this.container.clientWidth-b)/l/Si.PDF_TO_CSS_UNITS,d=(this.container.clientHeight-v)/c/Si.PDF_TO_CSS_UNITS,g=Math.min(Math.abs(h),Math.abs(d));break;default:console.error(`scrollPageIntoView: "${t[1].name}" is not a valid destination type.`);return}if(r||(g&&g!==this._currentScale?this.currentScaleValue=g:this._currentScale===B7&&(this.currentScaleValue=_B)),g==="page-fit"&&!t[4]){this.#L(s);return}let y=[s.viewport.convertToViewportPoint(a,o),s.viewport.convertToViewportPoint(a+l,o+c)],x=Math.min(y[0][0],y[1][0]),_=Math.min(y[0][1],y[1][1]);n||(x=Math.max(x,0),_=Math.max(_,0)),this.#L(s,{left:x,top:_})}_updateLocation(e){let t=this._currentScale,n=this._currentScaleValue,r=parseFloat(n)===t?Math.round(t*1e4)/100:n,s=e.id,a=this._pages[s-1],o=this.container,l=a.getPagePoint(o.scrollLeft-e.x,o.scrollTop-e.y),c=Math.round(l[0]),h=Math.round(l[1]),d=`#page=${s}`;this.isInPresentationMode||(d+=`&zoom=${r},${c},${h}`),this._location={pageNumber:s,scale:r,top:h,left:c,rotation:this._pagesRotation,pdfOpenParams:d}}update(){let e=this._getVisiblePages(),t=e.views,n=t.length;if(n===0)return;let r=Math.max(t_,2*n+1);this.#e.resize(r,e.ids),this.renderingQueue.renderHighestPriority(e);let s=this._spreadMode===Gt.NONE&&(this._scrollMode===Fe.PAGE||this._scrollMode===Fe.VERTICAL),a=this._currentPageNumber,o=!1;for(let l of t){if(l.percent<100)break;if(l.id===a&&s){o=!0;break}}this._setCurrentPageNumber(o?a:t[0].id),this._updateLocation(e.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}#R(){let e=this._getVisiblePages(),t=[],{ids:n,views:r}=e;for(let s of r){let{view:a}=s;if(!a.hasEditableAnnotations()){n.delete(a.id);continue}t.push(s)}return t.length===0?null:(this.renderingQueue.renderHighestPriority({first:t[0],last:t.at(-1),views:t,ids:n}),n)}containsElement(e){return this.container.contains(e)}focus(){this.container.focus()}get _isContainerRtl(){return getComputedStyle(this.container).direction==="rtl"}get isInPresentationMode(){return this.presentationModeState===Ms.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===Ms.CHANGING}get isHorizontalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){let e=this._scrollMode===Fe.PAGE?this.#C.pages:this._pages,t=this._scrollMode===Fe.HORIZONTAL,n=t&&this._isContainerRtl;return LB({scrollEl:this.container,views:e,sortByVisibility:!0,horizontal:t,rtl:n})}cleanup(){for(let e of this._pages)e.renderingState!==ut.FINISHED&&e.reset()}_cancelRendering(){for(let e of this._pages)e.cancelRendering()}#N(e){return $(this,null,function*(){if(e.pdfPage)return e.pdfPage;try{let t=yield this.pdfDocument.getPage(e.id);return e.pdfPage||e.setPdfPage(t),t}catch(t){return console.error("Unable to get page for page view",t),null}})}#B(e){if(e.first?.id===1)return!0;if(e.last?.id===this.pagesCount)return!1;switch(this._scrollMode){case Fe.PAGE:return this.#C.scrollDown;case Fe.HORIZONTAL:return this.scroll.right}return this.scroll.down}forceRendering(e){let t=e||this._getVisiblePages(),n=this.#B(t),r=this._spreadMode!==Gt.NONE&&this._scrollMode!==Fe.HORIZONTAL,s=this.renderingQueue.getHighestPriority(t,this._pages,n,r);return s?(this.#N(s).then(()=>{this.renderingQueue.renderView(s)}),!0):!1}get hasEqualPageSizes(){let e=this._pages[0];for(let t=1,n=this._pages.length;t{let n=t.pdfPage.getViewport({scale:1}),r=VA(n);if(e===void 0)e=r;else if(this.enablePrintAutoRotate&&r!==e)return{width:n.height,height:n.width,rotation:(n.rotation-90)%360};return{width:n.width,height:n.height,rotation:n.rotation}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig({intent:"display"})):Promise.resolve(null)}set optionalContentConfigPromise(e){if(!(e instanceof Promise))throw new Error(`Invalid optionalContentConfigPromise: ${e}`);this.pdfDocument&&this._optionalContentConfigPromise&&(this._optionalContentConfigPromise=e,this.refresh(!1,{optionalContentConfigPromise:e}),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:e}))}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode!==e){if(!zB(e))throw new Error(`Invalid scroll mode: ${e}`);this.pagesCount>Oh.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=e,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(e=null){let t=this._scrollMode,n=this.viewer;n.classList.toggle("scrollHorizontal",t===Fe.HORIZONTAL),n.classList.toggle("scrollWrapped",t===Fe.WRAPPED),!(!this.pdfDocument||!e)&&(t===Fe.PAGE?this.#S():this._previousScrollMode===Fe.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&this.#V(this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(e,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode!==e){if(!PB(e))throw new Error(`Invalid spread mode: ${e}`);this._spreadMode=e,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(e=null){if(!this.pdfDocument)return;let t=this.viewer,n=this._pages;if(this._scrollMode===Fe.PAGE)this.#S();else if(t.textContent="",this._spreadMode===Gt.NONE)for(let r of this._pages)t.append(r.div);else{let r=this._spreadMode-1,s=null;for(let a=0,o=n.length;a=c;l--){let h=s[l],d=s[l+1]-1;if(hd)return d-e}if(t){let l=s[0];if(le)return l-e+1}break}break}case Fe.HORIZONTAL:break;case Fe.PAGE:case Fe.VERTICAL:{if(this._spreadMode===Gt.NONE)break;let n=this._spreadMode-1;if(t&&e%2!==n)break;if(!t&&e%2===n)break;let{views:r}=this._getVisiblePages(),s=t?e-1:e+1;for(let{id:a,percent:o,widthPercent:l}of r)if(a===s){if(o>0&&l===100)return 2;break}break}}return 1}nextPage(){let e=this._currentPageNumber,t=this.pagesCount;if(e>=t)return!1;let n=this._getPageAdvance(e,!1)||1;return this.currentPageNumber=Math.min(e+n,t),!0}previousPage(){let e=this._currentPageNumber;if(e<=1)return!1;let t=this._getPageAdvance(e,!0)||1;return this.currentPageNumber=Math.max(e-t,1),!0}updateScale({drawingDelay:e,scaleFactor:t=null,steps:n=null,origin:r}){if(n===null&&t===null)throw new Error("Invalid updateScale options: either `steps` or `scaleFactor` must be provided.");if(!this.pdfDocument)return;let s=this._currentScale;if(t>0&&t!==1)s=Math.round(s*t*100)/100;else if(n){let a=n>0?AA:1/AA,o=n>0?Math.ceil:Math.floor;n=Math.abs(n);do s=o((s*a).toFixed(2)*10)/10;while(--n>0)}s=Math.max(SB,Math.min(DB,s)),this.#V(s,{noScroll:!1,drawingDelay:e,origin:r})}increaseScale(e={}){this.updateScale(se(Z({},e),{steps:e.steps??1}))}decreaseScale(e={}){this.updateScale(se(Z({},e),{steps:-(e.steps??1)}))}#F(e=this.container.clientHeight){e!==this.#y&&(this.#y=e,kB.setProperty("--viewer-container-height",`${e}px`))}#O(e){for(let t of e)if(t.target===this.container){this.#F(Math.floor(t.borderBoxSize[0].blockSize)),this.#l=null;break}}get containerTopLeft(){return this.#l||=[this.container.offsetTop,this.container.offsetLeft]}#I(){this.#f?.abort(),this.#f=null,this.#g!==null&&(clearTimeout(this.#g),this.#g=null)}get annotationEditorMode(){return this.#r?this.#n:V0.DISABLE}set annotationEditorMode({mode:e,editId:t=null,isFromKeyboard:n=!1}){if(!this.#r)throw new Error("The AnnotationEditor is not enabled.");if(this.#n===e)return;if(!i_(e))throw new Error(`Invalid AnnotationEditor mode: ${e}`);if(!this.pdfDocument)return;e===V0.STAMP&&this.#p?.loadModel("altText");let{eventBus:r}=this,s=()=>{this.#I(),this.#n=e,this.#r.updateMode(e,t,n),r.dispatch("annotationeditormodechanged",{source:this,mode:e})};if(e===V0.NONE||this.#n===V0.NONE){let a=e!==V0.NONE;a||this.pdfDocument.annotationStorage.resetModifiedIds();for(let l of this._pages)l.toggleEditingMode(a);let o=this.#R();if(a&&o){this.#I(),this.#f=new AbortController;let l=AbortSignal.any([this.#u.signal,this.#f.signal]);r._on("pagerendered",({pageNumber:c})=>{o.delete(c),o.size===0&&(this.#g=setTimeout(s,0))},{signal:l});return}}s()}refresh(e=!1,t=Object.create(null)){if(this.pdfDocument){for(let n of this._pages)n.update(t);this.#x!==null&&(clearTimeout(this.#x),this.#x=null),e||this.update()}}},Cp=class extends Yh{_resetView(){super._resetView(),this._scrollMode=Fe.PAGE,this._spreadMode=Gt.NONE}set scrollMode(e){}_updateScrollMode(){}set spreadMode(e){}_updateSpreadMode(){}};var dZ=lt.AnnotationLayerBuilder,uZ=lt.DownloadManager,fZ=lt.EventBus,pZ=lt.FindState,xp=lt.GenericL10n,er=lt.LinkTarget,Mp=lt.PDFFindController,gZ=lt.PDFHistory,Ap=lt.PDFLinkService,vZ=lt.PDFPageView,mZ=lt.PDFScriptingManager,_p=lt.PDFSinglePageViewer,Sp=lt.PDFViewer,wZ=lt.ProgressBar,bZ=lt.RenderingStates,yZ=lt.ScrollMode,CZ=lt.SimpleLinkService,xZ=lt.SpreadMode,MZ=lt.StructTreeLayerBuilder,AZ=lt.TextLayerBuilder,_Z=lt.XfaLayerBuilder,SZ=lt.parseQueryString;var DZ=["pdfViewerContainer"];function EZ(i,e){let t=new i.EventBus;return VZ(t,e),t}function VZ(i,e){st(i,"documentload").pipe(Ge(e)).subscribe(()=>{let t=document.createEvent("CustomEvent");t.initCustomEvent("documentload",!0,!0,{}),window.dispatchEvent(t)}),st(i,"pagerendered").pipe(Ge(e)).subscribe(({pageNumber:t,cssTransform:n,source:r})=>{let s=document.createEvent("CustomEvent");s.initCustomEvent("pagerendered",!0,!0,{pageNumber:t,cssTransform:n}),r.div.dispatchEvent(s)}),st(i,"textlayerrendered").pipe(Ge(e)).subscribe(({pageNumber:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("textlayerrendered",!0,!0,{pageNumber:t}),n.textLayerDiv?.dispatchEvent(r)}),st(i,"pagechanging").pipe(Ge(e)).subscribe(({pageNumber:t,source:n})=>{let r=document.createEvent("UIEvents");r.initEvent("pagechanging",!0,!0),r.pageNumber=t,n.container.dispatchEvent(r)}),st(i,"pagesinit").pipe(Ge(e)).subscribe(({source:t})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("pagesinit",!0,!0,null),t.container.dispatchEvent(n)}),st(i,"pagesloaded").pipe(Ge(e)).subscribe(({pagesCount:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("pagesloaded",!0,!0,{pagesCount:t}),n.container.dispatchEvent(r)}),st(i,"scalechange").pipe(Ge(e)).subscribe(({scale:t,presetValue:n,source:r})=>{let s=document.createEvent("UIEvents");s.initEvent("scalechange",!0,!0),s.scale=t,s.presetValue=n,r.container.dispatchEvent(s)}),st(i,"updateviewarea").pipe(Ge(e)).subscribe(({location:t,source:n})=>{let r=document.createEvent("UIEvents");r.initEvent("updateviewarea",!0,!0),r.location=t,n.container.dispatchEvent(r)}),st(i,"find").pipe(Ge(e)).subscribe(({source:t,type:n,query:r,phraseSearch:s,caseSensitive:a,highlightAll:o,findPrevious:l})=>{if(t===window)return;let c=document.createEvent("CustomEvent");c.initCustomEvent("find"+n,!0,!0,{query:r,phraseSearch:s,caseSensitive:a,highlightAll:o,findPrevious:l}),window.dispatchEvent(c)}),st(i,"attachmentsloaded").pipe(Ge(e)).subscribe(({attachmentsCount:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("attachmentsloaded",!0,!0,{attachmentsCount:t}),n.container.dispatchEvent(r)}),st(i,"sidebarviewchanged").pipe(Ge(e)).subscribe(({view:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("sidebarviewchanged",!0,!0,{view:t}),n.outerContainer.dispatchEvent(r)}),st(i,"pagemode").pipe(Ge(e)).subscribe(({mode:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("pagemode",!0,!0,{mode:t}),n.pdfViewer.container.dispatchEvent(r)}),st(i,"namedaction").pipe(Ge(e)).subscribe(({action:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("namedaction",!0,!0,{action:t}),n.pdfViewer.container.dispatchEvent(r)}),st(i,"presentationmodechanged").pipe(Ge(e)).subscribe(({active:t,switchInProgress:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("presentationmodechanged",!0,!0,{active:t,switchInProgress:n}),window.dispatchEvent(r)}),st(i,"outlineloaded").pipe(Ge(e)).subscribe(({outlineCount:t,source:n})=>{let r=document.createEvent("CustomEvent");r.initCustomEvent("outlineloaded",!0,!0,{outlineCount:t}),n.container.dispatchEvent(r)})}function Ep(i,e,t){i[e]=t}function No(){return typeof window>"u"}No()||Ep(xs,"verbosity",O7.INFOS);typeof Promise.withResolvers>"u"&&window&&(window.Promise.withResolvers=()=>{let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}});var Vp=function(i){return i[i.DISABLED=0]="DISABLED",i[i.ENABLED=1]="ENABLED",i[i.ENHANCED=2]="ENHANCED",i}(Vp||{}),c_=(()=>{class i{element;ngZone;static CSS_UNITS=96/72;static BORDER_WIDTH=9;pdfViewerContainer;eventBus;pdfLinkService;pdfFindController;pdfViewer;isVisible=!1;_cMapsUrl=typeof xs<"u"?`https://unpkg.com/pdfjs-dist@${ko}/cmaps/`:null;_imageResourcesPath=typeof xs<"u"?`https://unpkg.com/pdfjs-dist@${ko}/web/images/`:void 0;_renderText=!0;_renderTextMode=Vp.ENABLED;_stickToPage=!1;_originalSize=!0;_pdf;_page=1;_zoom=1;_zoomScale="page-width";_rotation=0;_showAll=!0;_canAutoResize=!0;_fitToPage=!1;_externalLinkTarget="blank";_showBorders=!1;lastLoaded;_latestScrolledPage;pageScrollTimeout=null;isInitialized=!1;loadingTask;destroy$=new it;afterLoadComplete=new he;pageRendered=new he;pageInitialized=new he;textLayerRendered=new he;onError=new he;onProgress=new he;pageChange=new he(!0);src;set cMapsUrl(t){this._cMapsUrl=t}set page(t){t=parseInt(t,10)||1;let n=t;this._pdf&&(t=this.getValidPageNumber(t)),this._page=t,n!==t&&this.pageChange.emit(t)}set renderText(t){this._renderText=t}set renderTextMode(t){this._renderTextMode=t}set originalSize(t){this._originalSize=t}set showAll(t){this._showAll=t}set stickToPage(t){this._stickToPage=t}set zoom(t){t<=0||(this._zoom=t)}get zoom(){return this._zoom}set zoomScale(t){this._zoomScale=t}get zoomScale(){return this._zoomScale}set rotation(t){if(!(typeof t=="number"&&t%90===0)){console.warn("Invalid pages rotation angle.");return}this._rotation=t}set externalLinkTarget(t){this._externalLinkTarget=t}set autoresize(t){this._canAutoResize=!!t}set fitToPage(t){this._fitToPage=!!t}set showBorders(t){this._showBorders=!!t}static getLinkTarget(t){switch(t){case"blank":return er.BLANK;case"none":return er.NONE;case"self":return er.SELF;case"parent":return er.PARENT;case"top":return er.TOP}return null}constructor(t,n){if(this.element=t,this.ngZone=n,No())return;let r,s=ko,a=window[`pdfWorkerSrc${s}`];a?r=a:window.hasOwnProperty("pdfWorkerSrc")&&typeof window.pdfWorkerSrc=="string"&&window.pdfWorkerSrc?r=window.pdfWorkerSrc:r=`https://cdn.jsdelivr.net/npm/pdfjs-dist@${s}/legacy/build/pdf.worker.min.mjs`,Ep(R7,"workerSrc",r)}ngAfterViewChecked(){if(this.isInitialized)return;let t=this.pdfViewerContainer.nativeElement.offsetParent;if(this.isVisible===!0&&t==null){this.isVisible=!1;return}this.isVisible===!1&&t!=null&&(this.isVisible=!0,setTimeout(()=>{this.initialize(),this.ngOnChanges({src:this.src})}))}ngOnInit(){this.initialize(),this.setupResizeListener()}ngOnDestroy(){this.clear(),this.destroy$.next(),this.loadingTask=null}ngOnChanges(t){if(!(No()||!this.isVisible)){if("src"in t)this.loadPDF();else if(this._pdf){if(("renderText"in t||"showAll"in t)&&(this.setupViewer(),this.resetPdfDocument()),"page"in t){let{page:n}=t;if(n.currentValue===this._latestScrolledPage)return;this.pdfViewer.scrollPageIntoView({pageNumber:this._page})}this.update()}}}updateSize(){je(this._pdf.getPage(this.pdfViewer.currentPageNumber)).pipe(Ge(this.destroy$)).subscribe({next:t=>{let n=this._rotation+t.rotate,r=t.getViewport({scale:this._zoom,rotation:n}).width*i.CSS_UNITS,s=this._zoom,a=!0;if(!this._originalSize||this._fitToPage&&r>this.pdfViewerContainer.nativeElement.clientWidth){let o=t.getViewport({scale:1,rotation:n});s=this.getScale(o.width,o.height),a=!this._stickToPage}this.pdfViewer.currentScale=s,a&&this.pdfViewer.scrollPageIntoView({pageNumber:t.pageNumber,ignoreDestinationZoom:!0})}})}clear(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._latestScrolledPage=0,this._pdf.destroy(),this._pdf=void 0),this.pdfViewer&&this.pdfViewer.setDocument(null),this.pdfLinkService&&this.pdfLinkService.setDocument(null,null),this.pdfFindController&&this.pdfFindController.setDocument(null)}getPDFLinkServiceConfig(){let t=i.getLinkTarget(this._externalLinkTarget);return t?{externalLinkTarget:t}:{}}initEventBus(){this.eventBus=EZ(Dp,this.destroy$),st(this.eventBus,"pagerendered").pipe(Ge(this.destroy$)).subscribe(t=>{this.pageRendered.emit(t)}),st(this.eventBus,"pagesinit").pipe(Ge(this.destroy$)).subscribe(t=>{this.pageInitialized.emit(t)}),st(this.eventBus,"pagechanging").pipe(Ge(this.destroy$)).subscribe(({pageNumber:t})=>{this.pageScrollTimeout&&clearTimeout(this.pageScrollTimeout),this.pageScrollTimeout=window.setTimeout(()=>{this._latestScrolledPage=t,this.pageChange.emit(t)},100)}),st(this.eventBus,"textlayerrendered").pipe(Ge(this.destroy$)).subscribe(t=>{this.textLayerRendered.emit(t)})}initPDFServices(){this.pdfLinkService=new Ap(Z({eventBus:this.eventBus},this.getPDFLinkServiceConfig())),this.pdfFindController=new Mp({eventBus:this.eventBus,linkService:this.pdfLinkService})}getPDFOptions(){return{eventBus:this.eventBus,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfLinkService,textLayerMode:this._renderText?this._renderTextMode:Vp.DISABLED,findController:this.pdfFindController,l10n:new xp("en"),imageResourcesPath:this._imageResourcesPath,annotationEditorMode:F7.DISABLE}}setupViewer(){this.pdfViewer&&this.pdfViewer.setDocument(null),Ep(xs,"disableTextLayer",!this._renderText),this.initPDFServices(),this._showAll?this.pdfViewer=new Sp(this.getPDFOptions()):this.pdfViewer=new _p(this.getPDFOptions()),this.pdfLinkService.setViewer(this.pdfViewer),this.pdfViewer._currentPageNumber=this._page}getValidPageNumber(t){return t<1?1:t>this._pdf.numPages?this._pdf.numPages:t}getDocumentParams(){let t=typeof this.src;if(!this._cMapsUrl)return this.src;let n={cMapUrl:this._cMapsUrl,cMapPacked:!0,enableXfa:!0};return n.isEvalSupported=!1,t==="string"?n.url=this.src:t==="object"&&(this.src.byteLength!==void 0?n.data=this.src:Object.assign(n,this.src)),n}loadPDF(){if(!this.src)return;if(this.lastLoaded===this.src){this.update();return}this.clear(),this.setupViewer(),this.loadingTask=I7(this.getDocumentParams()),this.loadingTask.onProgress=n=>{this.onProgress.emit(n)};let t=this.src;je(this.loadingTask.promise).pipe(Ge(this.destroy$)).subscribe({next:n=>{this._pdf=n,this.lastLoaded=t,this.afterLoadComplete.emit(n),this.resetPdfDocument(),this.update()},error:n=>{this.lastLoaded=null,this.onError.emit(n)}})}update(){this.page=this._page,this.render()}render(){if(this._page=this.getValidPageNumber(this._page),(this._rotation!==0||this.pdfViewer.pagesRotation!==this._rotation)&&this.pdfViewer.firstPagePromise?.then(()=>this.pdfViewer.pagesRotation=this._rotation),this._stickToPage&&setTimeout(()=>{this.pdfViewer.currentPageNumber=this._page}),this.pdfViewer._pages?.length)this.updateSize();else{let t=this.pageInitialized.subscribe(()=>{this.updateSize(),t.unsubscribe()})}}getScale(t,n){let r=this._showBorders?2*i.BORDER_WIDTH:0,s=this.pdfViewerContainer.nativeElement.clientWidth-r,a=this.pdfViewerContainer.nativeElement.clientHeight-r;if(a===0||n===0||s===0||t===0)return 1;let o=1;switch(this._zoomScale){case"page-fit":o=Math.min(a/n,s/t);break;case"page-height":o=a/n;break;case"page-width":default:o=s/t;break}return this._zoom*o/i.CSS_UNITS}resetPdfDocument(){this.pdfLinkService.setDocument(this._pdf,null),this.pdfFindController.setDocument(this._pdf),this.pdfViewer.setDocument(this._pdf)}initialize(){No()||!this.isVisible||(this.isInitialized=!0,this.initEventBus(),this.setupViewer())}setupResizeListener(){No()||this.ngZone.runOutsideAngular(()=>{st(window,"resize").pipe(Nd(100),xt(()=>this._canAutoResize&&!!this._pdf),Ge(this.destroy$)).subscribe(()=>{this.updateSize()})})}static \u0275fac=function(n){return new(n||i)(Y(Qe),Y(Ne))};static \u0275cmp=Ue({type:i,selectors:[["pdf-viewer"]],viewQuery:function(n,r){if(n&1&&vl(DZ,5),n&2){let s;sa(s=aa())&&(r.pdfViewerContainer=s.first)}},inputs:{src:"src",cMapsUrl:[0,"c-maps-url","cMapsUrl"],page:"page",renderText:[0,"render-text","renderText"],renderTextMode:[0,"render-text-mode","renderTextMode"],originalSize:[0,"original-size","originalSize"],showAll:[0,"show-all","showAll"],stickToPage:[0,"stick-to-page","stickToPage"],zoom:"zoom",zoomScale:[0,"zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:[0,"external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:[0,"fit-to-page","fitToPage"],showBorders:[0,"show-borders","showBorders"]},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",pageInitialized:"pages-initialized",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},standalone:!1,features:[Ht],decls:3,vars:0,consts:[["pdfViewerContainer",""],[1,"ng2-pdf-viewer-container"],[1,"pdfViewer"]],template:function(n,r){n&1&&(D(0,"div",1,0),le(2,"div",2),S())},styles:[`.ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:absolute;height:100%;width:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%]{display:block;position:relative}[_nghost-%COMP%] {--pdfViewer-padding-bottom: 0;--page-margin: 1px auto -8px;--page-border: 9px solid transparent;--spreadHorizontalWrapped-margin-LR: -3.5px;--viewer-container-height: 0;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,");--xfa-unfocused-field-background: var( --annotation-unfocused-field-background );--page-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAA1ElEQVQ4jbWUWw6EIAxFy2NFs/8NzR4UJhpqLsdi5mOmSSMUOfYWqv3S0gMr4XlYH/64gZa/gN3ANYA7KAXALt4ktoQ5MI9YxqaG8bWmsIysMuT6piSQCa4whZThCu8CM4zP9YJaKci9jicPq3NcBWYoPMGUlhG7ivtkB+gVyFY75wXghOvh8t5mto1Mdim6e+MBqH6XsY+YAwjpq3vGF7weTWQptLEDVCZvPTMl5JZZsdh47FHW6qFMyvLYqjcnmdFfY9Xk/KDOlzCusX2mi/ofM7MPkzBcSp4Q1/wAAAAASUVORK5CYII=) 9 9 repeat;--scale-factor: 1;--focus-outline: solid 2px blue;--hover-outline: dashed 2px blue;--freetext-line-height: 1.35;--freetext-padding: 2px;--editorInk-editing-cursor: pointer}@media screen and (forced-colors: active){[_nghost-%COMP%] {--pdfViewer-padding-bottom: 9px;--page-margin: 8px auto -1px;--page-border: 1px solid CanvasText;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: 3.5px}}@media (forced-colors: active){[_nghost-%COMP%] {--focus-outline: solid 3px ButtonText;--hover-outline: dashed 3px ButtonText}}[_nghost-%COMP%] .textLayer{position:absolute;text-align:initial;inset:0;overflow:hidden;opacity:.2;line-height:1;-webkit-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0}[_nghost-%COMP%] .textLayer span, [_nghost-%COMP%] .textLayer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%}[_nghost-%COMP%] .textLayer span.markedContent{top:0;height:0}[_nghost-%COMP%] .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%] .textLayer .highlight.appended{position:initial}[_nghost-%COMP%] .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%] .textLayer ::selection{background:rgb(0,0,255)}[_nghost-%COMP%] .textLayer br::selection{background:transparent}[_nghost-%COMP%] .textLayer .endOfContent{display:block;position:absolute;inset:100% 0 0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .textLayer .endOfContent.active{top:0}@media (forced-colors: active){[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:required, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:required, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:required, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:required, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid selectedItem}}[_nghost-%COMP%] .annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0}[_nghost-%COMP%] .annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0}[_nghost-%COMP%] .annotationLayer .linkAnnotation>a, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>canvas{width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .linkAnnotation>a:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:rgb(255,255,0);box-shadow:0 2px 10px #ff0}[_nghost-%COMP%] .annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:1px solid transparent;box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:required, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:required, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:required, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:required, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid red}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{resize:none}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea[disabled], [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:none;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:hover, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:1px solid rgb(0,0,0)}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:focus, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input :focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea :focus, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select :focus, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox :focus, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-image:none;background-color:transparent;outline:auto}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;appearance:none}[_nghost-%COMP%] .annotationLayer .popupTriggerArea{height:100%;width:100%}[_nghost-%COMP%] .annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}[_nghost-%COMP%] .annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}[_nghost-%COMP%] .annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}[_nghost-%COMP%] .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%] .annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}[_nghost-%COMP%] .annotationLayer .popupContent{border-top:1px solid rgb(51,51,51);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}[_nghost-%COMP%] .annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}[_nghost-%COMP%] .annotationLayer .highlightAnnotation, [_nghost-%COMP%] .annotationLayer .underlineAnnotation, [_nghost-%COMP%] .annotationLayer .squigglyAnnotation, [_nghost-%COMP%] .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%] .annotationLayer .freeTextAnnotation, [_nghost-%COMP%] .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%] .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%] .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%] .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%] .annotationLayer .caretAnnotation, [_nghost-%COMP%] .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .stampAnnotation, [_nghost-%COMP%] .annotationLayer .fileAttachmentAnnotation{cursor:pointer}[_nghost-%COMP%] .annotationLayer section svg{position:absolute;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}[_nghost-%COMP%] .annotationLayer .annotationTextContent span{width:100%;display:inline-block}@media (forced-colors: active){[_nghost-%COMP%] .xfaLayer *:required{outline:1.5px solid selectedItem}}[_nghost-%COMP%] .xfaLayer .highlight{margin:-1px;padding:1px;background-color:#efcbed;border-radius:4px}[_nghost-%COMP%] .xfaLayer .highlight.appended{position:initial}[_nghost-%COMP%] .xfaLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .xfaLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .xfaLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .xfaLayer .highlight.selected{background-color:#cbdfcb}[_nghost-%COMP%] .xfaLayer ::selection{background:rgb(0,0,255)}[_nghost-%COMP%] .xfaPage{overflow:hidden;position:relative}[_nghost-%COMP%] .xfaContentarea{position:absolute}[_nghost-%COMP%] .xfaPrintOnly{display:none}[_nghost-%COMP%] .xfaLayer{position:absolute;text-align:initial;top:0;left:0;transform-origin:0 0;line-height:1.2}[_nghost-%COMP%] .xfaLayer *{color:inherit;font:inherit;font-style:inherit;font-weight:inherit;font-kerning:inherit;letter-spacing:-.01px;text-align:inherit;text-decoration:inherit;box-sizing:border-box;background-color:transparent;padding:0;margin:0;pointer-events:auto;line-height:inherit}[_nghost-%COMP%] .xfaLayer *:required{outline:1.5px solid red}[_nghost-%COMP%] .xfaLayer div{pointer-events:none}[_nghost-%COMP%] .xfaLayer svg{pointer-events:none}[_nghost-%COMP%] .xfaLayer svg *{pointer-events:none}[_nghost-%COMP%] .xfaLayer a{color:#00f}[_nghost-%COMP%] .xfaRich li{margin-left:3em}[_nghost-%COMP%] .xfaFont{color:#000;font-weight:400;font-kerning:none;font-size:10px;font-style:normal;letter-spacing:0;text-decoration:none;vertical-align:0}[_nghost-%COMP%] .xfaCaption{overflow:hidden;flex:0 0 auto}[_nghost-%COMP%] .xfaCaptionForCheckButton{overflow:hidden;flex:1 1 auto}[_nghost-%COMP%] .xfaLabel{height:100%;width:100%}[_nghost-%COMP%] .xfaLeft{display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .xfaRight{display:flex;flex-direction:row-reverse;align-items:center}[_nghost-%COMP%] .xfaLeft>.xfaCaption, [_nghost-%COMP%] .xfaLeft>.xfaCaptionForCheckButton, [_nghost-%COMP%] .xfaRight>.xfaCaption, [_nghost-%COMP%] .xfaRight>.xfaCaptionForCheckButton{max-height:100%}[_nghost-%COMP%] .xfaTop{display:flex;flex-direction:column;align-items:flex-start}[_nghost-%COMP%] .xfaBottom{display:flex;flex-direction:column-reverse;align-items:flex-start}[_nghost-%COMP%] .xfaTop>.xfaCaption, [_nghost-%COMP%] .xfaTop>.xfaCaptionForCheckButton, [_nghost-%COMP%] .xfaBottom>.xfaCaption, [_nghost-%COMP%] .xfaBottom>.xfaCaptionForCheckButton{width:100%}[_nghost-%COMP%] .xfaBorder{background-color:transparent;position:absolute;pointer-events:none}[_nghost-%COMP%] .xfaWrapped{width:100%;height:100%}[_nghost-%COMP%] .xfaTextfield:focus, [_nghost-%COMP%] .xfaSelect:focus{background-image:none;background-color:transparent;outline:auto;outline-offset:-1px}[_nghost-%COMP%] .xfaCheckbox:focus, [_nghost-%COMP%] .xfaRadio:focus{outline:auto}[_nghost-%COMP%] .xfaTextfield, [_nghost-%COMP%] .xfaSelect{height:100%;width:100%;flex:1 1 auto;border:none;resize:none;background-image:var(--xfa-unfocused-field-background)}[_nghost-%COMP%] .xfaTop>.xfaTextfield, [_nghost-%COMP%] .xfaTop>.xfaSelect, [_nghost-%COMP%] .xfaBottom>.xfaTextfield, [_nghost-%COMP%] .xfaBottom>.xfaSelect{flex:0 1 auto}[_nghost-%COMP%] .xfaButton{cursor:pointer;width:100%;height:100%;border:none;text-align:center}[_nghost-%COMP%] .xfaLink{width:100%;height:100%;position:absolute;top:0;left:0}[_nghost-%COMP%] .xfaCheckbox, [_nghost-%COMP%] .xfaRadio{width:100%;height:100%;flex:0 0 auto;border:none}[_nghost-%COMP%] .xfaRich{white-space:pre-wrap;width:100%;height:100%}[_nghost-%COMP%] .xfaImage{object-position:left top;object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .xfaLrTb, [_nghost-%COMP%] .xfaRlTb, [_nghost-%COMP%] .xfaTb{display:flex;flex-direction:column;align-items:stretch}[_nghost-%COMP%] .xfaLr{display:flex;flex-direction:row;align-items:stretch}[_nghost-%COMP%] .xfaRl{display:flex;flex-direction:row-reverse;align-items:stretch}[_nghost-%COMP%] .xfaTb>div{justify-content:left}[_nghost-%COMP%] .xfaPosition{position:relative}[_nghost-%COMP%] .xfaArea{position:relative}[_nghost-%COMP%] .xfaValignMiddle{display:flex;align-items:center}[_nghost-%COMP%] .xfaTable{display:flex;flex-direction:column;align-items:stretch}[_nghost-%COMP%] .xfaTable .xfaRow{display:flex;flex-direction:row;align-items:stretch}[_nghost-%COMP%] .xfaTable .xfaRlRow{display:flex;flex-direction:row-reverse;align-items:stretch;flex:1}[_nghost-%COMP%] .xfaTable .xfaRlRow>div{flex:1}[_nghost-%COMP%] .xfaNonInteractive input, [_nghost-%COMP%] .xfaNonInteractive textarea, [_nghost-%COMP%] .xfaDisabled input, [_nghost-%COMP%] .xfaDisabled textarea, [_nghost-%COMP%] .xfaReadOnly input, [_nghost-%COMP%] .xfaReadOnly textarea{background:initial}@media print{[_nghost-%COMP%] .xfaTextfield, [_nghost-%COMP%] .xfaSelect{background:transparent}[_nghost-%COMP%] .xfaSelect{-webkit-appearance:none;appearance:none;text-indent:1px;text-overflow:""}}[_nghost-%COMP%] [data-editor-rotation="90"]{transform:rotate(90deg)}[_nghost-%COMP%] [data-editor-rotation="180"]{transform:rotate(180deg)}[_nghost-%COMP%] [data-editor-rotation="270"]{transform:rotate(270deg)}[_nghost-%COMP%] .annotationEditorLayer{background:transparent;position:absolute;top:0;left:0;font-size:calc(100px * var(--scale-factor));transform-origin:0 0}[_nghost-%COMP%] .annotationEditorLayer .selectedEditor{outline:var(--focus-outline);resize:none}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor{position:absolute;background:transparent;border-radius:3px;padding:calc(var(--freetext-padding) * var(--scale-factor));resize:none;width:auto;height:auto;z-index:1;transform-origin:0 0;touch-action:none}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor .internal{background:transparent;border:none;top:0;left:0;overflow:visible;white-space:nowrap;resize:none;font:10px sans-serif;line-height:var(--freetext-line-height)}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor .overlay{position:absolute;display:none;background:transparent;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor .overlay.enabled{display:block}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor .internal:empty:before{content:attr(default-content);color:gray}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor .internal:focus{outline:none}[_nghost-%COMP%] .annotationEditorLayer .inkEditor.disabled{resize:none}[_nghost-%COMP%] .annotationEditorLayer .inkEditor.disabled.selectedEditor{resize:horizontal}[_nghost-%COMP%] .annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor), [_nghost-%COMP%] .annotationEditorLayer .inkEditor:hover:not(.selectedEditor){outline:var(--hover-outline)}[_nghost-%COMP%] .annotationEditorLayer .inkEditor{position:absolute;background:transparent;border-radius:3px;overflow:auto;width:100%;height:100%;z-index:1;transform-origin:0 0;cursor:auto}[_nghost-%COMP%] .annotationEditorLayer .inkEditor.editing{resize:none;cursor:var(--editorInk-editing-cursor),pointer}[_nghost-%COMP%] .annotationEditorLayer .inkEditor .inkEditorCanvas{position:absolute;top:0;left:0;width:100%;height:100%;touch-action:none}[_nghost-%COMP%] [data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[_nghost-%COMP%] [data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[_nghost-%COMP%] [data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}[_nghost-%COMP%] .pdfViewer{padding-bottom:var(--pdfViewer-padding-bottom)}[_nghost-%COMP%] .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%] .pdfViewer .canvasWrapper canvas{width:100%}[_nghost-%COMP%] .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:var(--page-margin);position:relative;overflow:visible;border:var(--page-border);border-image:var(--page-border-image);background-clip:content-box;background-color:#fff}[_nghost-%COMP%] .pdfViewer .dummyPage{position:relative;width:0;height:var(--viewer-container-height)}[_nghost-%COMP%] .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%] .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%] .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .pdfViewer.scrollWrapped, [_nghost-%COMP%] .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .spread{white-space:nowrap}[_nghost-%COMP%] .pdfViewer.removePageBorders, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%] .spread .page, [_nghost-%COMP%] .spread .dummyPage, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}[_nghost-%COMP%] .spread .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page{margin-left:var(--spreadHorizontalWrapped-margin-LR);margin-right:var(--spreadHorizontalWrapped-margin-LR)}[_nghost-%COMP%] .pdfViewer.removePageBorders .spread .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%] .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%] .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%] .pdfViewer .page .loadingIcon{position:absolute;display:block;inset:0;background:url(data:image/gif;base64,R0lGODlhGAAYAPQQAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/ilPcHRpbWl6ZWQgd2l0aCBodHRwczovL2V6Z2lmLmNvbS9vcHRpbWl6ZQAh+QQJBwAQACwAAAAAGAAYAAAFmiAkjiTkOGVaBgjZNGSgkgKjjM8zLoI8iy+BKCdiCX8iBeMAhEEIPRXLxViYUE9CbCQoFAzFhHY3zkaT3oPvBz1zE4UBsr1eWZH4vAowOBwGAHk8AoQLfH6Agm0Ed3qOAXWOIgQKiWyFJQgDgJEpdG+WEACNEFNFmKVlVzJQk6qdkwqBoi1mebJ3ALNGeIZHtGSwNDS1RZKueCEAIfkECQcAEAAsAAAAABgAGAAABZcgJI4kpChlWgYCWRQkEKgjURgjw4zOg9CjVwuiEyEeO6CxkBC9nA+HiuUqLEyoBZI0Mx4SAFFgQCDZuguBoGv6Dtg0gvpqdhxQQDkBzuUr/4A1JwMKP39pc2mDhYCIc4GQYn6QCwCMeY91l0p6dBAEJ0OfcFRimZ91Mwt0alxxAIZyRmuAsKxDLKKvZbM1tJxmvGKRpn8hACH5BAkHABAALAAAAAAYABgAAAWhICSOJGQYZVoGAnkcJBKoI3EAY1GMCtPSosSBINKJBIwGkHdwBGGQA0OhYpEGQxNqkYzNIITBACEKKBaxxNfBeOCO4vMy0Hg8nDHFeCktkKtfNAtoS4UqAicKBj9zBAKPC4iKi4aRkISGmWWBmjUIAIyHkCUEAKCVo2WmREecVqoCgZhgP4NHrGWCj7e3szSpuxAsoVWxnp6cVV4kyZW+KSEAIfkECQcAEAAsAAAAABgAGAAABZkgJI4kBABlWgYEOQykEKgjMSDjcYxG0dKi108nEhQKQN4rCIMkCgbawjWYnSCLY2yGVSgEooBhWqsGGwxc0RtNBgoMhmJ1QgETjANYFeBKyUmBKQQIdT9JDmgPDQ6EhoKJD4sOgpWWgiwChyqEBH5hmptSoSOZgJ4kLKWkYTF7C2SaqaM/hEWygay4mYG8t6uffFuzl1iANCEAIfkECQcAEAAsAAAAABgAGAAABZ0gJI4khCBlmhKkopBCoI6LIozDMAIHO4uuBVBnOiR+I4FrCDwAZsKdQnaCLIwwmRUA8JmioprWUCjcwlwUMnAoG0qL03k2KCS8cC0UjOzDCQKBfHQFDAwFU4CCfgqFhy9+kZJWgzSKSAcPZn+BfQENDw8OljGWJAFeDoZPYTBnC1GdSXqnsoBolSulX2GyP6hgvnG0KrS3NJNhuSQhACH5BAkHABAALAAAAAAYABgAAAWaICSOJCQIZZoupGGQRKCOC0CMijIiwz2LABtQZxoMfjQhxAXszWQ7gOwECRhh0MCJJRJARTUoIHFAgbfI6uBwAJS01J/i4PClVYHvfV8lbLlIBmwFbQt+aGmChG18jXeGT4dICQxlb4g/AQUMDER9XjR6BAdiDQwINDBmkAsPDVh4cX4imw53iLKuaVqAcUsPqEiidkt6j4AzIQAh+QQJBwAQACwAAAAAGAAYAAAFmSAkjiREEGWaBiSCtCoZCMsIAKOg1LEo0KKbaKFQ9EYLoOkFuQlirNxzCQkUW9GZ0hQd4nyDAWr4G/esYSbyZFYZwu3jqiuvr8u8I2BwOAwASXh1e31/doeHC3klWnElfAlTd46MfQUGk2stCVEGBQWSdCciDg5VDAVYKoEiDQ0iBwxGcj9RDw8+qHIzebc2DJJQJK6qiKVyIQAh+QQJBwAQACwAAAAAGAAYAAAFmSAkjiS0LGWaBiRBtCoZCKgoCCMB1DF0sz6cCQDo5W62l28XAyZFpyECBv3lnCbhUqHMIo0Qg4Jbmn1jRCa4iV27TzfXGjEecOFWMN1OdvvfPGUuXSoKBw6EXokrAwcHRVU0UAeEBANAAAmUI1gNDyhjJgUHLW0iDg8FIqOnBQZrDA9TELE2rEYIDw4jta2LMpCrqld/YQpgIQAh+QQJBwAQACwAAAAAGAAYAAAFmyAkjiS0LGWaBiRBkKw6BgIqCsJcyyMe4yJajhcEml5H26o1PN2QQd3uFiv2AADlAgflIbDdZLgkABOJgep5LfWty4p4zeU+w+XsvJWXliEKDwdEBgMKYQ4PDw1qK3EDCCMAiQ5BCV0LCj+FSDQkgCgGBiYHAy2MIgoMghAHqw4HAGsNDEMFBTekdgwKI7aRB2MwkL2rVHoQoWchACH5BAkHABAALAAAAAAYABgAAAWWICSOJLQsZZoGJEGQrDoGAioKwlzLIx7jIlqOFwSaXkfbqjU83ZBB3e4WK0qrCxyU55peid0qcUwuixyNx6PhILsAcAJazXYj4lvz2MkLiFsHDAlEcABKZwwMBX8pBgoKQxAIigpBA1sLBj+PSDQkB4uSACYDlTMyBgWDEKVnl2QFBUigN61gBQYjtLV5JZ4jtlR6omMhACH5BAkHABAALAAAAAAYABgAAAWaICSOJLQsZZoGJEGQrDoGAioKwlzLIx7jIlqOFwSaXkdbidYanm7I4AjwYDh6saJuJ3JUG1mZi9srPA7EcRimJLrfJYWZUVC8TziXnEG3u/E+cIJaPAFrPQl1aQAIbRAGBZGHJQiMUQKRBkEKbQsAPZaEXQcslSYKmjMyAAdXj34ACkNEiUgDA5t+PAQHn6Ogjkuzry2DNwhuIQAh+QQFBwAQACwAAAAAGAAYAAAFnCAkjiS0LGVaBgBJEGSguo8zCsK4CPIsMg+ECCcKEH0ix6MwhJl4KiOp8UCdmrEbo6EoHpxF8A6aBBZ6vhf5dmAkkGr0CoWs21WGQ2FvsI9xC3l7B311fy93iWGKJQQOhHCAJQB6A3IqcWwJLU90i2FkUiMKlhBELEI6MwgDXRAGhQgAYD6tTqRFAJxpA6mvrqazSKJJhUWMpjlIIQA7) center no-repeat}[_nghost-%COMP%] .pdfViewer .page .loadingIcon.notVisible{background:none}[_nghost-%COMP%] .pdfViewer.enablePermissions .textLayer span{-webkit-user-select:none!important;user-select:none!important;cursor:not-allowed}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer{padding-bottom:0}[_nghost-%COMP%] .pdfPresentationMode .spread{margin:0}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page{margin:0 auto;border:2px solid transparent}`]})}return i})(),h_=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ie({type:i});static \u0275inj=Oe({})}return i})();function LZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Logradouro"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Logradouro[0])}}function zZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"N\xFAmero"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Numero[0])}}function PZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Complemento"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Complemento[0])}}function kZ(i,e){if(i&1&&(be(0),ce(1,LZ,5,1,"ng-container",0)(2,zZ,5,1,"ng-container",0)(3,PZ,5,1,"ng-container",0),D(4,"label"),T(5,"Bairro"),S(),D(6,"p"),T(7),S(),D(8,"label"),T(9,"CEP"),S(),D(10,"p"),T(11),S(),D(12,"label"),T(13,"Munic\xEDpio"),S(),D(14,"p"),T(15),S(),D(16,"label"),T(17,"C\xF3digo do Munic\xEDpio"),S(),D(18,"p"),T(19),S(),D(20,"label"),T(21,"UF"),S(),D(22,"p"),T(23),S(),ye()),i&2){let t=e.ngIf;k(),q("ngIf",t.Logradouro),k(),q("ngIf",t.Numero),k(),q("ngIf",t.Complemento),k(4),B(t.Bairro==null?null:t.Bairro[0]),k(4),B(t.CEP==null?null:t.CEP[0]),k(4),B(t.NomeMunicipio==null?null:t.NomeMunicipio[0]),k(4),B(t.CodigoMunicipio==null?null:t.CodigoMunicipio[0]),k(4),B(t.UF==null?null:t.UF[0])}}function HZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Credenciamento"),S(),D(3,"label"),T(4,"Tipo"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"N\xFAmero"),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12,"Data"),S(),D(13,"p"),T(14),dt(15,"date"),S(),D(16,"label"),T(17,"Data de publica\xE7\xE3o"),S(),D(18,"p"),T(19),dt(20,"date"),S(),D(21,"label"),T(22,"Se\xE7\xE3o"),S(),D(23,"p"),T(24),S(),D(25,"label"),T(26,"P\xE1gina"),S(),D(27,"p"),T(28),S(),ye()),i&2){let t=e.ngIf;k(6),B(t.Tipo==null?null:t.Tipo[0]),k(4),B(t.Numero==null?null:t.Numero[0]),k(4),B(Lt(15,6,t.Data==null?null:t.Data[0],"dd/MM/YYYY")),k(5),B(Lt(20,9,t.DataPublicacao==null?null:t.DataPublicacao[0],"dd/MM/YYYY")),k(5),B(t.SecaoPublicacao==null?null:t.SecaoPublicacao[0]),k(4),B(t.PaginaPublicacao==null?null:t.PaginaPublicacao[0])}}function FZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Recredenciamento"),S(),D(3,"label"),T(4,"Recredenciado"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"N\xFAmero"),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12,"Data"),S(),D(13,"p"),T(14),dt(15,"date"),S(),D(16,"label"),T(17,"Se\xE7\xE3o"),S(),D(18,"p"),T(19),S(),D(20,"label"),T(21,"P\xE1gina"),S(),D(22,"p"),T(23),S(),D(24,"label"),T(25,"Data de Publica\xE7\xE3o"),S(),D(26,"p"),T(27),dt(28,"date"),S(),ye()),i&2){let t=e.ngIf;k(6),B(t.Tipo==null?null:t.Tipo[0]),k(4),B(t.Numero==null?null:t.Numero[0]),k(4),B(Lt(15,6,t.Data==null?null:t.Data[0],"dd/MM/YYYY")),k(5),B(t.SecaoPublicacao==null?null:t.SecaoPublicacao[0]),k(4),B(t.PaginaPublicacao==null?null:t.PaginaPublicacao[0]),k(4),B(Lt(28,9,t.DataPublicacao==null?null:t.DataPublicacao[0],"dd/MM/YYYY"))}}function RZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Logradouro"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Logradouro[0])}}function OZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"N\xFAmero"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Numero[0])}}function IZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Complemento"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Complemento[0])}}function BZ(i,e){if(i&1&&(be(0),ce(1,RZ,5,1,"ng-container",0)(2,OZ,5,1,"ng-container",0)(3,IZ,5,1,"ng-container",0),D(4,"label"),T(5,"Bairro"),S(),D(6,"p"),T(7),S(),D(8,"label"),T(9,"CEP"),S(),D(10,"p"),T(11),S(),D(12,"label"),T(13,"Munic\xEDpio"),S(),D(14,"p"),T(15),S(),D(16,"label"),T(17,"C\xF3digo do Munic\xEDpio"),S(),D(18,"p"),T(19),S(),D(20,"label"),T(21,"UF"),S(),D(22,"p"),T(23),S(),ye()),i&2){let t=e.ngIf;k(),q("ngIf",t.Logradouro),k(),q("ngIf",t.Numero),k(),q("ngIf",t.Complemento),k(4),B(t.Bairro==null?null:t.Bairro[0]),k(4),B(t.CEP==null?null:t.CEP[0]),k(4),B(t.NomeMunicipio==null?null:t.NomeMunicipio[0]),k(4),B(t.CodigoMunicipio==null?null:t.CodigoMunicipio[0]),k(4),B(t.UF==null?null:t.UF[0])}}function NZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Dados da Mantenedora"),S(),D(3,"label"),T(4,"Raz\xE3o Social"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"CNPJ"),S(),D(9,"p"),T(10),S(),ce(11,BZ,24,8,"ng-container",0),ye()),i&2){let t=e.ngIf;k(6),B(t.RazaoSocial==null?null:t.RazaoSocial[0]),k(4),B(t.CNPJ==null?null:t.CNPJ[0]),k(),q("ngIf",t.Endereco==null?null:t.Endereco[0])}}function ZZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Processo do Diploma"),S(),D(3,"p"),T(4),S(),D(5,"label"),T(6,"Data Cola\xE7\xE3o Grau"),S(),D(7,"p"),T(8),dt(9,"date"),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.ProcessoDoDiploma==null?null:t.ProcessoDoDiploma[0]),k(4),B(Lt(9,2,t.DataColacaoGrau==null?null:t.DataColacaoGrau[0],"dd/MM/YYYY"))}}function jZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Livro Registro"),S(),D(3,"label"),T(4,"Livro Registro"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12),S(),D(13,"p"),T(14),S(),ce(15,ZZ,10,5,"ng-container",0),D(16,"label"),T(17),S(),D(18,"p"),T(19),dt(20,"date"),S(),D(21,"label"),T(22),S(),D(23,"p"),T(24),dt(25,"date"),S(),ye()),i&2){let t=e.ngIf,n=ie(2);k(6),B(t.LivroRegistro==null?null:t.LivroRegistro[0]),k(2),Rt("N\xFAmero Folha do ",n.tipoCurso===1?"Certificado":"Diploma",""),k(2),B(t.NumeroFolhaDoDiploma==null?null:t.NumeroFolhaDoDiploma[0]),k(2),Rt("N\xFAmero Sequ\xEAncia do ",n.tipoCurso===1?"Certificado":"Diploma",""),k(2),B(t.NumeroSequenciaDoDiploma==null?null:t.NumeroSequenciaDoDiploma[0]),k(),q("ngIf",n.tipoCurso!==1),k(2),Rt("Data de Expedi\xE7\xE3o do ",n.tipoCurso===1?"Certificado":"Diploma",""),k(2),B(Lt(20,10,t.DataExpedicaoDiploma==null?null:t.DataExpedicaoDiploma[0],"dd/MM/YYYY")),k(3),Rt("Data de Registro do ",n.tipoCurso===1?"Certificado":"Diploma",""),k(2),B(Lt(25,13,t.DataRegistroDiploma==null?null:t.DataRegistroDiploma[0],"dd/MM/YYYY"))}}function UZ(i,e){if(i&1&&(D(0,"div")(1,"div",1)(2,"label"),T(3,"Nome"),S(),D(4,"p"),T(5),S(),D(6,"label"),T(7,"C\xF3digo MEC"),S(),D(8,"p"),T(9),S(),D(10,"label"),T(11,"CNPJ"),S(),D(12,"p"),T(13),S(),D(14,"h5"),T(15,"Endere\xE7o do Curso"),S(),ce(16,kZ,24,8,"ng-container",0)(17,HZ,29,12,"ng-container",0)(18,FZ,29,12,"ng-container",0)(19,NZ,12,3,"ng-container",0)(20,jZ,26,16,"ng-container",0),S()()),i&2){let t=ie();k(5),B(t.dados==null||t.dados.Nome==null?null:t.dados.Nome[0]),k(4),B(t.dados==null||t.dados.CodigoMEC==null?null:t.dados.CodigoMEC[0]),k(4),B(t.dados==null||t.dados.CNPJ==null?null:t.dados.CNPJ[0]),k(3),q("ngIf",t.dados==null||t.dados.Endereco==null?null:t.dados.Endereco[0]),k(),q("ngIf",t.dados==null||t.dados.Credenciamento==null?null:t.dados.Credenciamento[0]),k(),q("ngIf",t.dados==null||t.dados.Recredenciamento==null?null:t.dados.Recredenciamento[0]),k(),q("ngIf",t.dados==null||t.dados.Mantenedora==null?null:t.dados.Mantenedora[0]),k(),q("ngIf",t.dados==null?null:t.dados.LivroRegistro)}}function $Z(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Nome Habilita\xE7\xE3o"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie(2);k(4),B(t.dados==null||t.dados.NomeHabilitacao==null?null:t.dados.NomeHabilitacao[0])}}function qZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Logradouro"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Logradouro[0])}}function GZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Endere\xE7o do Curso"),S(),ce(3,qZ,5,1,"ng-container",0),D(4,"label"),T(5,"Bairro"),S(),D(6,"p"),T(7),S(),D(8,"label"),T(9,"CEP"),S(),D(10,"p"),T(11),S(),D(12,"label"),T(13,"Munic\xEDpio"),S(),D(14,"p"),T(15),S(),D(16,"label"),T(17,"C\xF3digo do Munic\xEDpio"),S(),D(18,"p"),T(19),S(),D(20,"label"),T(21,"UF"),S(),D(22,"p"),T(23),S(),ye()),i&2){let t=e.ngIf;k(3),q("ngIf",t.Logradouro),k(4),B(t.Bairro==null?null:t.Bairro[0]),k(4),B(t.CEP==null?null:t.CEP[0]),k(4),B(t.NomeMunicipio==null?null:t.NomeMunicipio[0]),k(4),B(t.CodigoMunicipio==null?null:t.CodigoMunicipio[0]),k(4),B(t.UF==null?null:t.UF[0])}}function WZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"N\xFAmero"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Numero[0])}}function XZ(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Complemento"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Complemento[0])}}function YZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Autoriza\xE7\xE3o"),S(),D(3,"label"),T(4,"Tipo"),S(),D(5,"p"),T(6),S(),ce(7,WZ,5,1,"ng-container",0)(8,XZ,5,1,"ng-container",0),D(9,"label"),T(10,"Data"),S(),D(11,"p"),T(12),dt(13,"date"),S(),ye()),i&2){let t=e.ngIf;k(6),B(t.Tipo==null?null:t.Tipo[0]),k(),q("ngIf",t.Numero),k(),q("ngIf",t.Complemento),k(4),B(Lt(13,4,t.Data==null?null:t.Data[0],"dd/MM/YYYY"))}}function KZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Reconhecimento"),S(),D(3,"label"),T(4,"Tipo"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"N\xFAmero"),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12,"Data"),S(),D(13,"p"),T(14),dt(15,"date"),S(),ye()),i&2){let t=e.ngIf;k(6),B(t.Tipo==null?null:t.Tipo[0]),k(4),B(t.Numero==null?null:t.Numero[0]),k(4),B(Lt(15,3,t.Data==null?null:t.Data[0],"dd/MM/YYYY"))}}function QZ(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Renova\xE7\xE3o Reconhecimento"),S(),D(3,"label"),T(4,"Data"),S(),D(5,"p"),T(6),dt(7,"date"),S(),D(8,"label"),T(9,"N\xFAmero"),S(),D(10,"p"),T(11),S(),D(12,"label"),T(13,"Tipo"),S(),D(14,"p"),T(15),S(),ye()),i&2){let t=e.ngIf;k(6),B(Lt(7,3,t.Data==null?null:t.Data[0],"dd/MM/YYYY")),k(5),B(t.Numero==null?null:t.Numero[0]),k(4),B(t.Tipo==null?null:t.Tipo[0])}}function JZ(i,e){if(i&1&&(D(0,"div")(1,"div",1)(2,"label"),T(3,"Nome do Curso"),S(),D(4,"p"),T(5),S(),D(6,"label"),T(7,"C\xF3digo Curso EMEC"),S(),D(8,"p"),T(9),S(),ce(10,$Z,5,1,"ng-container",0),D(11,"label"),T(12,"Titulo Conferido"),S(),D(13,"p"),T(14),S(),D(15,"label"),T(16,"Grau Conferido"),S(),D(17,"p"),T(18),S(),ce(19,GZ,24,6,"ng-container",0)(20,YZ,14,7,"ng-container",0)(21,KZ,16,6,"ng-container",0)(22,QZ,16,6,"ng-container",0),S()()),i&2){let t=ie();k(5),B(t.dados==null||t.dados.NomeCurso==null?null:t.dados.NomeCurso[0]),k(4),B(t.dados==null||t.dados.CodigoCursoEMEC==null?null:t.dados.CodigoCursoEMEC[0]),k(),q("ngIf",t.dados==null?null:t.dados.NumeroHabilitacao),k(4),B(t.dados==null||t.dados.TituloConferido==null||t.dados.TituloConferido[0]==null||t.dados.TituloConferido[0].OutroTitulo==null?null:t.dados.TituloConferido[0].OutroTitulo[0]),k(4),B(t.dados==null||t.dados.GrauConferido==null?null:t.dados.GrauConferido[0]),k(),q("ngIf",t.dados==null||t.dados.EnderecoCurso==null?null:t.dados.EnderecoCurso[0]),k(),q("ngIf",t.dados==null||t.dados.Autorizacao==null?null:t.dados.Autorizacao[0]),k(),q("ngIf",t.dados==null||t.dados.Reconhecimento==null?null:t.dados.Reconhecimento[0]),k(),q("ngIf",t.dados==null||t.dados.RenovacaoReconhecimento==null?null:t.dados.RenovacaoReconhecimento[0])}}function ej(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Logradouro"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Logradouro[0])}}function tj(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"N\xFAmero"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Numero[0])}}function ij(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Complemento"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Complemento[0])}}function nj(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Endere\xE7o"),S(),ce(3,ej,5,1,"ng-container",0)(4,tj,5,1,"ng-container",0)(5,ij,5,1,"ng-container",0),D(6,"label"),T(7,"Bairro"),S(),D(8,"p"),T(9),S(),D(10,"label"),T(11,"CEP"),S(),D(12,"p"),T(13),S(),D(14,"label"),T(15,"Munic\xEDpio"),S(),D(16,"p"),T(17),S(),D(18,"label"),T(19,"C\xF3digo do Munic\xEDpio"),S(),D(20,"p"),T(21),S(),D(22,"label"),T(23,"UF"),S(),D(24,"p"),T(25),S(),ye()),i&2){let t=e.ngIf;k(3),q("ngIf",t.Logradouro),k(),q("ngIf",t.Numero),k(),q("ngIf",t.Complemento),k(4),B(t.Bairro==null?null:t.Bairro[0]),k(4),B(t.CEP==null?null:t.CEP[0]),k(4),B(t.NomeMunicipio==null?null:t.NomeMunicipio[0]),k(4),B(t.CodigoMunicipio==null?null:t.CodigoMunicipio[0]),k(4),B(t.UF==null?null:t.UF[0])}}function rj(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Credenciamento"),S(),D(3,"label"),T(4,"Tipo"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"N\xFAmero"),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12,"Data"),S(),D(13,"p"),T(14),dt(15,"date"),S(),D(16,"label"),T(17,"Data de publica\xE7\xE3o"),S(),D(18,"p"),T(19),dt(20,"date"),S(),D(21,"label"),T(22,"Se\xE7\xE3o"),S(),D(23,"p"),T(24),S(),D(25,"label"),T(26,"P\xE1gina"),S(),D(27,"p"),T(28),S(),ye()),i&2){let t=e.ngIf;k(6),B(t.Tipo==null?null:t.Tipo[0]),k(4),B(t.Numero==null?null:t.Numero[0]),k(4),B(Lt(15,6,t.Data==null?null:t.Data[0],"dd/MM/YYYY")),k(5),B(Lt(20,9,t.DataPublicacao==null?null:t.DataPublicacao[0],"dd/MM/YYYY")),k(5),B(t.SecaoPublicacao==null?null:t.SecaoPublicacao[0]),k(4),B(t.PaginaPublicacao==null?null:t.PaginaPublicacao[0])}}function sj(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Recredenciamento"),S(),D(3,"label"),T(4,"Recredenciado"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"N\xFAmero"),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12,"Data"),S(),D(13,"p"),T(14),dt(15,"date"),S(),D(16,"label"),T(17,"Se\xE7\xE3o"),S(),D(18,"p"),T(19),S(),D(20,"label"),T(21,"P\xE1gina"),S(),D(22,"p"),T(23),S(),D(24,"label"),T(25,"Data de Publica\xE7\xE3o"),S(),D(26,"p"),T(27),dt(28,"date"),S(),ye()),i&2){let t=e.ngIf;k(6),B(t.Tipo==null?null:t.Tipo[0]),k(4),B(t.Numero==null?null:t.Numero[0]),k(4),B(Lt(15,6,t.Data==null?null:t.Data[0],"dd/MM/YYYY")),k(5),B(t.SecaoPublicacao==null?null:t.SecaoPublicacao[0]),k(4),B(t.PaginaPublicacao==null?null:t.PaginaPublicacao[0]),k(4),B(Lt(28,9,t.DataPublicacao==null?null:t.DataPublicacao[0],"dd/MM/YYYY"))}}function aj(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"Logradouro"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Logradouro[0])}}function oj(i,e){if(i&1&&(be(0),D(1,"label"),T(2,"N\xFAmero"),S(),D(3,"p"),T(4),S(),ye()),i&2){let t=ie().ngIf;k(4),B(t.Numero[0])}}function lj(i,e){if(i&1&&(be(0),ce(1,aj,5,1,"ng-container",0)(2,oj,5,1,"ng-container",0),D(3,"label"),T(4,"Bairro"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"CEP"),S(),D(9,"p"),T(10),S(),D(11,"label"),T(12,"Munic\xEDpio"),S(),D(13,"p"),T(14),S(),D(15,"label"),T(16,"C\xF3digo do Munic\xEDpio"),S(),D(17,"p"),T(18),S(),D(19,"label"),T(20,"UF"),S(),D(21,"p"),T(22),S(),ye()),i&2){let t=e.ngIf;k(),q("ngIf",t.Logradouro),k(),q("ngIf",t.Numero),k(4),B(t.Bairro==null?null:t.Bairro[0]),k(4),B(t.CEP==null?null:t.CEP[0]),k(4),B(t.NomeMunicipio==null?null:t.NomeMunicipio[0]),k(4),B(t.CodigoMunicipio==null?null:t.CodigoMunicipio[0]),k(4),B(t.UF==null?null:t.UF[0])}}function cj(i,e){if(i&1&&(be(0),D(1,"h5"),T(2,"Dados da Mantenedora"),S(),D(3,"label"),T(4,"Raz\xE3o Social"),S(),D(5,"p"),T(6),S(),D(7,"label"),T(8,"CNPJ"),S(),D(9,"p"),T(10),S(),ce(11,lj,23,7,"ng-container",0),ye()),i&2){let t=e.ngIf;k(6),B(t.RazaoSocial==null?null:t.RazaoSocial[0]),k(4),B(t.CNPJ==null?null:t.CNPJ[0]),k(),q("ngIf",t.Endereco==null?null:t.Endereco[0])}}function hj(i,e){if(i&1&&(D(0,"div")(1,"div",1)(2,"label"),T(3,"Nome"),S(),D(4,"p"),T(5),S(),D(6,"label"),T(7,"C\xF3digo MEC"),S(),D(8,"p"),T(9),S(),D(10,"label"),T(11,"CNPJ"),S(),D(12,"p"),T(13),S(),ce(14,nj,26,8,"ng-container",0)(15,rj,29,12,"ng-container",0)(16,sj,29,12,"ng-container",0)(17,cj,12,3,"ng-container",0),S()()),i&2){let t=ie();k(5),B(t.dados==null||t.dados.Nome==null?null:t.dados.Nome[0]),k(4),B(t.dados==null||t.dados.CodigoMEC==null?null:t.dados.CodigoMEC[0]),k(4),B(t.dados==null||t.dados.CNPJ==null?null:t.dados.CNPJ[0]),k(),q("ngIf",t.dados==null||t.dados.Endereco==null?null:t.dados.Endereco[0]),k(),q("ngIf",t.dados==null||t.dados.Credenciamento==null?null:t.dados.Credenciamento[0]),k(),q("ngIf",t.dados==null||t.dados.Recredenciamento==null?null:t.dados.Recredenciamento[0]),k(),q("ngIf",t.dados==null||t.dados.Mantenedora==null?null:t.dados.Mantenedora[0])}}var d_=(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Ue({type:i,selectors:[["dados"]],inputs:{dados:"dados",tipo:"tipo",tipoCurso:"tipoCurso"},standalone:!1,decls:3,vars:3,consts:[[4,"ngIf"],[1,"body"]],template:function(n,r){n&1&&ce(0,UZ,21,8,"div",0)(1,JZ,23,9,"div",0)(2,hj,18,7,"div",0),n&2&&(q("ngIf",r.tipo=="dados-registro"),k(),q("ngIf",r.tipo=="dados-curso"),k(),q("ngIf",r.tipo=="dados-ies"))},dependencies:[_t,pa],styles:[".body[_ngcontent-%COMP%]{background:#fff;border:.063rem solid #F5F5F5;padding:1.25rem 1.25rem 2.375rem;margin-bottom:.5rem}.body[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.938rem;line-height:1rem;color:#3d3d3d;margin-bottom:0}.body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:700;font-size:1rem;line-height:1.188rem;color:#3117d6;margin-bottom:.75rem}.body[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{color:#7179ff;padding:.688rem 0 .313rem}"]})}}return i})();var u_=(()=>{class i{transform(t,...n){switch(t){case"F":return"Feminino";case"M":return"Masculino";case"N":return"Ativo";case"S":return"Inativo";default:return t}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=Oi({name:"sexoEStatus",type:i,pure:!0,standalone:!1})}}return i})();function fj(i,e){if(i&1&&(be(0),D(1,"a",18),T(2,"Baixar XML"),S(),ye()),i&2){let t=ie(2);k(),q("href",t.xmlDownloadLink,Or)}}function pj(i,e){i&1&&(be(0),D(1,"div",15)(2,"a",19),T(3,"Portal de conformidade do XML"),S()(),ye())}function gj(i,e){if(i&1){let t=At();be(0),D(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1"),T(5),S(),D(6,"div",4)(7,"p")(8,"b"),T(9,"CPF: "),S(),T(10),dt(11,"mask"),S(),D(12,"p")(13,"b"),T(14,"Data de Nascimento: "),S(),T(15),dt(16,"date"),S()(),D(17,"div",5)(18,"p")(19,"b"),T(20,"Naturalidade: "),S(),T(21),S(),D(22,"p")(23,"b"),T(24,"RG: "),S(),T(25),S(),D(26,"p")(27,"b"),T(28,"Sexo: "),S(),T(29),dt(30,"sexoEStatus"),S()(),D(31,"div",6)(32,"button",7),T(33,"Status do diploma: "),D(34,"b"),T(35),dt(36,"sexoEStatus"),S()()()()()(),D(37,"section",8)(38,"div",1)(39,"div",3)(40,"section",9),le(41,"pdf-viewer",10),S(),D(42,"section",11)(43,"div",12)(44,"div",13),ce(45,fj,3,1,"ng-container",0),D(46,"a",14),T(47),S()(),ce(48,pj,4,0,"ng-container",0),D(49,"div",15)(50,"button",16),Me("click",function(){ct(t);let r=ie();return ht(r.open(1))}),T(51,"Dados da IES Emissora"),S(),le(52,"dados",17),S(),D(53,"div",15)(54,"button",16),Me("click",function(){ct(t);let r=ie();return ht(r.open(2))}),T(55,"Dados do Curso"),S(),le(56,"dados",17),S(),D(57,"div",15)(58,"button",16),Me("click",function(){ct(t);let r=ie();return ht(r.open(3))}),T(59,"Dados do Registro"),S(),le(60,"dados",17),S()()()()()(),ye()}if(i&2){let t=ie();k(5),B(t.user.nomeAluno),k(5),B(Lt(11,34,t.formataCPF(t.user.cpfAluno),"000.000.000-00")),k(5),B(Lt(16,37,t.user.dataNascimento,"dd/MM/yyyy")),k(6),Rt(" ",t.user.naturalidade,""),k(4),B(t.user.numIdentidade),k(4),B(oa(30,40,t.user.sexo)),k(3),q("ngClass",t.user.diplomaDigitalCancelado==="N"?"ativo":"inativo"),k(3),B(oa(36,42,t.user.diplomaDigitalCancelado)),k(6),q("src",t.pdf)("render-text",!1)("fit-to-page",!0)("autoresize",!0),k(4),q("ngIf",!t.semXML),k(),q("href",t.pdfDownloadLink,Or),k(),Rt("Baixar ",t.user.codTipoCurso===1?"RVCD":"RVDD",""),k(),q("ngIf",t.user.diplomaDigitalCancelado==="N"&&!t.semXML),k(2),Ft("aria-expanded",t.dadosDiplomaOpen[1]),k(2),q("collapse",!t.dadosDiplomaOpen[1])("isAnimated",!0)("dados",t.dadosIES)("tipo","dados-ies")("tipoCurso",t.user.codTipoCurso),k(2),Ft("aria-expanded",t.dadosDiplomaOpen[2]),k(2),q("collapse",!t.dadosDiplomaOpen[2])("isAnimated",!0)("dados",t.dadosCurso)("tipo","dados-curso")("tipoCurso",t.user.codTipoCurso),k(2),Ft("aria-expanded",t.dadosDiplomaOpen[3]),k(2),q("collapse",!t.dadosDiplomaOpen[3])("isAnimated",!0)("dados",t.dadosRegistro)("tipo","dados-registro")("tipoCurso",t.user.codTipoCurso)}}var p_=(()=>{class i{constructor(t,n,r,s){this.router=t,this.route=n,this._busca=r,this.domSanitizer=s,this.dadosDiplomaOpen=[!1,!1,!1],this.opened=0,this.codigo="",this.semXML=!1,this.dadosCurso=new gc,this.dadosRegistro=new pc,this.dadosIES=new vc}ngOnInit(){this.route.paramMap.subscribe(r=>{this.codigo=r.get("id")});let t=JSON.parse(sessionStorage.getItem("diplomaDigital")),n=t?t.codValidacaoDiploma:"";"diplomaDigital"in sessionStorage&&n===this.codigo?(this.user=JSON.parse(sessionStorage.getItem("diplomaDigital")),this.user.codXmlPublico!=null&&(this.ajeitarPdfXml(),this.lerXML(atob(this.user.codXmlPublico))),(this.user.codTipoCurso===1||this.user.codTipoCurso===3||this.user.codTipoCurso===45)&&(this.semXML=!0)):this.codigo!=""?this._busca.getDiplomaDigital(this.codigo).subscribe(r=>{this.user=r,(this.user.codTipoCurso===1||this.user.codTipoCurso===3||this.user.codTipoCurso===45)&&(this.semXML=!0),this.user?(sessionStorage.setItem("diplomaDigital",JSON.stringify(this.user)),this.user.codXmlPublico!=null&&(this.ajeitarPdfXml(),this.lerXML(atob(this.user.codXmlPublico)))):this.router.navigate([""])}):this.router.navigate([""])}open(t){this.dadosDiplomaOpen[t]?this.dadosDiplomaOpen[t]=!1:(this.dadosDiplomaOpen=[!1,!1,!1],this.dadosDiplomaOpen[t]=!0)}ajeitarPdfXml(){let t=this.user.imgRvdd;this.pdf=this.getPDF(t),this.xmlDownloadLink=this.domSanitizer.bypassSecurityTrustResourceUrl("data:application/octet-stream;base64,"+this.user.codXmlPublico),this.pdfDownloadLink=this.domSanitizer.bypassSecurityTrustResourceUrl("data:application/octet-stream;base64,"+t)}getPDF(t){let n=new Uint8Array(atob(t).split("").map(s=>s.charCodeAt(0))),r=new Blob([n],{type:"data:application/pdf"});return URL.createObjectURL(r)}lerXML(t){let n=decodeURIComponent(escape(t)),r=null;(0,f_.parseString)(n,function(s,a){r=a}),this.dadosRegistro=r.Diploma.infDiploma[0].DadosRegistro[0]?.IesRegistradora[0],this.dadosRegistro.LivroRegistro=r.Diploma.infDiploma[0].DadosRegistro[0].LivroRegistro[0],this.dadosCurso=r.Diploma.infDiploma[0].DadosDiploma[0].DadosCurso[0],this.dadosIES=r.Diploma.infDiploma[0].DadosDiploma[0].IesEmissora[0]}formataCPF(t){return String(t).padStart(11,"0")}static{this.\u0275fac=function(n){return new(n||i)(Y(M0),Y(s1),Y(ps),Y(Sa))}}static{this.\u0275cmp=Ue({type:i,selectors:[["app-diploma"]],standalone:!1,decls:2,vars:1,consts:[[4,"ngIf"],[1,"container"],[1,"header"],[1,"row"],[1,"col-md-3"],[1,"col-md-3","offset-md-1","col-lg-3","second-block"],[1,"col-md-5","col-lg-6","btn-status-container"],[3,"ngClass"],[1,"section-pesquisa"],[1,"col-md-8"],[1,"pdf-content",3,"src","render-text","fit-to-page","autoresize"],[1,"col-md-4"],[1,"row","pdf-buttons"],[1,"col-sm-12","btn-downloads"],["download","documento.pdf",1,"btn","btn-orange",3,"href"],[1,"col-sm-12"],["aria-controls","collapseBasic",1,"btn","btn-dados",3,"click"],["id","collapseBasic",3,"collapse","isAnimated","dados","tipo","tipoCurso"],["download","documento.xml",1,"btn","btn-orange",3,"href"],["href","https://validadordiplomadigital.mec.gov.br/diploma","target","_blank",1,"btn","btn-validar"]],template:function(n,r){n&1&&(le(0,"navbar"),ce(1,gj,61,44,"ng-container",0)),n&2&&(k(),q("ngIf",r.user))},dependencies:[d0,_t,Wi,c_,fc,d_,pa,IC,u_],styles:[".header[_ngcontent-%COMP%]{padding:3.313rem 0 2.25rem}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-weight:700;font-size:1.25rem;line-height:1.5rem;color:#3d3d3d}.header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:400;font-size:.875rem;line-height:1rem;color:#3d3d3d;margin-bottom:.625rem}@media (min-width: 992px){.header[_ngcontent-%COMP%] .second-block[_ngcontent-%COMP%]{margin-left:0}}.header[_ngcontent-%COMP%] .btn-status-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:flex-end}.header[_ngcontent-%COMP%] .btn-status-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:none;outline:none;border-radius:.313rem;padding:.5rem .75rem}.header[_ngcontent-%COMP%] .btn-status-container[_ngcontent-%COMP%] button.ativo[_ngcontent-%COMP%]{background-color:#a5d6a7}.header[_ngcontent-%COMP%] .btn-status-container[_ngcontent-%COMP%] button.inativo[_ngcontent-%COMP%]{background-color:#ffcc80}.header[_ngcontent-%COMP%] .btn-status-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{cursor:default!important}.pdf-content[_ngcontent-%COMP%]{height:850px}@media (max-width: 767px){.pdf-content[_ngcontent-%COMP%]{height:500px}}@media (max-width: 767px){button[_ngcontent-%COMP%]{width:100%}}.section-pesquisa[_ngcontent-%COMP%]{background-color:#fff;padding:2.813rem 0}.section-pesquisa[_ngcontent-%COMP%] .diploma-container[_ngcontent-%COMP%]{border:.063rem solid #ededed;padding:1rem 1rem 1.813rem;max-height:53.438rem}.section-pesquisa[_ngcontent-%COMP%] .diploma-container[_ngcontent-%COMP%] .diploma-verso[_ngcontent-%COMP%]{margin-top:.625rem}@media screen and (max-width: 767px){.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:1rem;width:100%;font-weight:700;margin-bottom:.5rem;font-size:.813rem;line-height:.938rem;color:#383838;max-height:3rem}.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] .btn-orange[_ngcontent-%COMP%]{background-color:#ffb934}.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] .btn-dados[_ngcontent-%COMP%]{background-color:#e8e8e8;border:.063rem solid #d1d1d1}.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{filter:brightness(.9);cursor:pointer}.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] .btn-validar[_ngcontent-%COMP%]{background-color:#00b3ff;color:#fff}.section-pesquisa[_ngcontent-%COMP%] .pdf-buttons[_ngcontent-%COMP%] .btn-downloads[_ngcontent-%COMP%]{display:flex;grid-gap:.5rem}"]})}}return i})();var vj=[{path:"",component:qC},{path:"diploma/:id",component:p_},{path:"**",pathMatch:"full",redirectTo:""}],g_=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i})}static{this.\u0275inj=Oe({imports:[An,fs.forRoot(vj),fs]})}}return i})();var v_=(()=>{class i{constructor(t){this.document=t,this.ies=this.document.getIES()}ngOnInit(){sessionStorage.setItem("ies",JSON.stringify(this.ies))}static{this.\u0275fac=function(n){return new(n||i)(Y(uc))}}static{this.\u0275cmp=Ue({type:i,selectors:[["app-root"]],standalone:!1,decls:1,vars:0,template:function(n,r){n&1&&le(0,"router-outlet")},dependencies:[to],encapsulation:2})}}return i})();var mj={alarm:AC,alarmFill:MC,alignBottom:_C,chevronDown:DC,chevronUp:EC,arrowRightShort:SC};pw(Iw);var m_=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ie({type:i,bootstrap:[v_]})}static{this.\u0275inj=Oe({providers:[{provide:Br,useValue:"pt-BR"},OC(),e4(t4())],imports:[Ca,Rb,CC.forRoot(),sc.forRoot(),VC.pick(mj),NC.forRoot(),gy,vy,g_,fs,HC.forRoot(),wC,h_]})}}return i})();ao.production&&void 0;W6().bootstrapModule(m_).catch(i=>console.error(i));